* [PATCH v3 0/3] reset: amlogic-a4/a5: add reset driver
@ 2024-09-18 7:42 zelong dong
2024-09-18 7:42 ` [PATCH v3 1/3] dt-bindings: reset: Add compatible for Amlogic A4/A5 Reset Controller zelong dong
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: zelong dong @ 2024-09-18 7:42 UTC (permalink / raw)
To: Neil Armstrong, Philipp Zabel, Kevin Hilman, Rob Herring,
Martin Blumenstingl, Jerome Brunet, Krzysztof Kozlowski
Cc: linux-kernel, linux-amlogic, linux-arm-kernel, devicetree,
kelvin.zhang, Zelong Dong
From: Zelong Dong <zelong.dong@amlogic.com>
This patchset adds Reset controller driver support for
Amlogic A4/A5 SoC. The RESET registers count and offset
for A4/A5 Soc are same as S4 Soc.
Changes since v2:
- rebase on 'amlogic,t7-reset' patchset
Changes since v1:
- remove 'amlogic,t7-reset'
- move 'amlogic,c3-reset' to the other enum list
- move reset node from amlogic-a4-common.dtsi to
amlogic-a4.dtsi/amlogic-a5.dtsi
---
v1:https://lore.kernel.org/all/20240703061610.37217-1-zelong.dong@amlogic.com/
v2:https://lore.kernel.org/all/20240715051217.5286-1-zelong.dong@amlogic.com/
Zelong Dong (3):
dt-bindings: reset: Add compatible for Amlogic A4/A5 Reset Controller
arm64: dts: amlogic: Add Amlogic A4 reset controller
arm64: dts: amlogic: Add Amlogic A5 reset controller
.../bindings/reset/amlogic,meson-reset.yaml | 23 +++--
.../arm64/boot/dts/amlogic/amlogic-a4-reset.h | 93 ++++++++++++++++++
arch/arm64/boot/dts/amlogic/amlogic-a4.dtsi | 10 ++
.../arm64/boot/dts/amlogic/amlogic-a5-reset.h | 95 +++++++++++++++++++
arch/arm64/boot/dts/amlogic/amlogic-a5.dtsi | 10 ++
5 files changed, 223 insertions(+), 8 deletions(-)
create mode 100644 arch/arm64/boot/dts/amlogic/amlogic-a4-reset.h
create mode 100644 arch/arm64/boot/dts/amlogic/amlogic-a5-reset.h
--
2.35.1
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH v3 1/3] dt-bindings: reset: Add compatible for Amlogic A4/A5 Reset Controller 2024-09-18 7:42 [PATCH v3 0/3] reset: amlogic-a4/a5: add reset driver zelong dong @ 2024-09-18 7:42 ` zelong dong 2024-09-18 7:51 ` Philipp Zabel 2024-09-18 7:42 ` [PATCH v3 2/3] arm64: dts: amlogic: Add Amlogic A4 reset controller zelong dong 2024-09-18 7:42 ` [PATCH v3 3/3] arm64: dts: amlogic: Add Amlogic A5 " zelong dong 2 siblings, 1 reply; 9+ messages in thread From: zelong dong @ 2024-09-18 7:42 UTC (permalink / raw) To: Neil Armstrong, Philipp Zabel, Kevin Hilman, Rob Herring, Martin Blumenstingl, Jerome Brunet, Krzysztof Kozlowski Cc: linux-kernel, linux-amlogic, linux-arm-kernel, devicetree, kelvin.zhang, Zelong Dong, Conor Dooley From: Zelong Dong <zelong.dong@amlogic.com> Add new compatible for Amlogic A4/A5 Reset Controller Signed-off-by: Zelong Dong <zelong.dong@amlogic.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> --- .../bindings/reset/amlogic,meson-reset.yaml | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml b/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml index 695ef38a7bb3..0ad81fe7b629 100644 --- a/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml +++ b/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml @@ -12,14 +12,21 @@ maintainers: properties: compatible: - enum: - - amlogic,meson8b-reset # Reset Controller on Meson8b and compatible SoCs - - amlogic,meson-gxbb-reset # Reset Controller on GXBB and compatible SoCs - - amlogic,meson-axg-reset # Reset Controller on AXG and compatible SoCs - - amlogic,meson-a1-reset # Reset Controller on A1 and compatible SoCs - - amlogic,meson-s4-reset # Reset Controller on S4 and compatible SoCs - - amlogic,c3-reset # Reset Controller on C3 and compatible SoCs - - amlogic,t7-reset + oneOf: + - items: + - enum: + - amlogic,meson8b-reset # Reset Controller on Meson8b and compatible SoCs + - amlogic,meson-gxbb-reset # Reset Controller on GXBB and compatible SoCs + - amlogic,meson-axg-reset # Reset Controller on AXG and compatible SoCs + - amlogic,meson-a1-reset # Reset Controller on A1 and compatible SoCs + - amlogic,meson-s4-reset # Reset Controller on S4 and compatible SoCs + - amlogic,c3-reset # Reset Controller on C3 and compatible SoCs + - amlogic,t7-reset + - items: + - enum: + - amlogic,a4-reset + - amlogic,a5-reset + - const: amlogic,meson-s4-reset reg: maxItems: 1 -- 2.35.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: reset: Add compatible for Amlogic A4/A5 Reset Controller 2024-09-18 7:42 ` [PATCH v3 1/3] dt-bindings: reset: Add compatible for Amlogic A4/A5 Reset Controller zelong dong @ 2024-09-18 7:51 ` Philipp Zabel 2024-09-18 8:01 ` Conor Dooley 0 siblings, 1 reply; 9+ messages in thread From: Philipp Zabel @ 2024-09-18 7:51 UTC (permalink / raw) To: zelong dong, Neil Armstrong, Kevin Hilman, Rob Herring, Martin Blumenstingl, Jerome Brunet, Krzysztof Kozlowski Cc: linux-kernel, linux-amlogic, linux-arm-kernel, devicetree, kelvin.zhang, Conor Dooley On Mi, 2024-09-18 at 15:42 +0800, zelong dong wrote: > From: Zelong Dong <zelong.dong@amlogic.com> > > Add new compatible for Amlogic A4/A5 Reset Controller > > Signed-off-by: Zelong Dong <zelong.dong@amlogic.com> > Acked-by: Conor Dooley <conor.dooley@microchip.com> > --- > .../bindings/reset/amlogic,meson-reset.yaml | 23 ++++++++++++------- > 1 file changed, 15 insertions(+), 8 deletions(-) > > diff --git a/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml b/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml > index 695ef38a7bb3..0ad81fe7b629 100644 > --- a/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml > +++ b/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml > @@ -12,14 +12,21 @@ maintainers: > > properties: > compatible: > - enum: > - - amlogic,meson8b-reset # Reset Controller on Meson8b and compatible SoCs > - - amlogic,meson-gxbb-reset # Reset Controller on GXBB and compatible SoCs > - - amlogic,meson-axg-reset # Reset Controller on AXG and compatible SoCs > - - amlogic,meson-a1-reset # Reset Controller on A1 and compatible SoCs > - - amlogic,meson-s4-reset # Reset Controller on S4 and compatible SoCs > - - amlogic,c3-reset # Reset Controller on C3 and compatible SoCs > - - amlogic,t7-reset > + oneOf: > + - items: I'm not well versed in preferred dt-bindings style, but this items looks superfluous to me. It only contains a single enum. > + - enum: > + - amlogic,meson8b-reset # Reset Controller on Meson8b and compatible SoCs > + - amlogic,meson-gxbb-reset # Reset Controller on GXBB and compatible SoCs > + - amlogic,meson-axg-reset # Reset Controller on AXG and compatible SoCs > + - amlogic,meson-a1-reset # Reset Controller on A1 and compatible SoCs > + - amlogic,meson-s4-reset # Reset Controller on S4 and compatible SoCs > + - amlogic,c3-reset # Reset Controller on C3 and compatible SoCs > + - amlogic,t7-reset > + - items: > + - enum: > + - amlogic,a4-reset > + - amlogic,a5-reset > + - const: amlogic,meson-s4-reset > > reg: > maxItems: 1 I think this can be merged together with the dts patches. Acked-by: Philipp Zabel <p.zabel@pengutronix.de> regards Philipp ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: reset: Add compatible for Amlogic A4/A5 Reset Controller 2024-09-18 7:51 ` Philipp Zabel @ 2024-09-18 8:01 ` Conor Dooley 2025-03-11 9:48 ` Kelvin Zhang 0 siblings, 1 reply; 9+ messages in thread From: Conor Dooley @ 2024-09-18 8:01 UTC (permalink / raw) To: Philipp Zabel Cc: zelong dong, Neil Armstrong, Kevin Hilman, Rob Herring, Martin Blumenstingl, Jerome Brunet, Krzysztof Kozlowski, linux-kernel, linux-amlogic, linux-arm-kernel, devicetree, kelvin.zhang, Conor Dooley [-- Attachment #1: Type: text/plain, Size: 1669 bytes --] On Wed, Sep 18, 2024 at 09:51:28AM +0200, Philipp Zabel wrote: > On Mi, 2024-09-18 at 15:42 +0800, zelong dong wrote: > > From: Zelong Dong <zelong.dong@amlogic.com> > > > > Add new compatible for Amlogic A4/A5 Reset Controller > > > > Signed-off-by: Zelong Dong <zelong.dong@amlogic.com> > > Acked-by: Conor Dooley <conor.dooley@microchip.com> > > --- > > .../bindings/reset/amlogic,meson-reset.yaml | 23 ++++++++++++------- > > 1 file changed, 15 insertions(+), 8 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml b/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml > > index 695ef38a7bb3..0ad81fe7b629 100644 > > --- a/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml > > +++ b/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml > > @@ -12,14 +12,21 @@ maintainers: > > > > properties: > > compatible: > > - enum: > > - - amlogic,meson8b-reset # Reset Controller on Meson8b and compatible SoCs > > - - amlogic,meson-gxbb-reset # Reset Controller on GXBB and compatible SoCs > > - - amlogic,meson-axg-reset # Reset Controller on AXG and compatible SoCs > > - - amlogic,meson-a1-reset # Reset Controller on A1 and compatible SoCs > > - - amlogic,meson-s4-reset # Reset Controller on S4 and compatible SoCs > > - - amlogic,c3-reset # Reset Controller on C3 and compatible SoCs > > - - amlogic,t7-reset > > + oneOf: > > + - items: > > I'm not well versed in preferred dt-bindings style, but this items > looks superfluous to me. It only contains a single enum. Oh, ye. Good spot. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: reset: Add compatible for Amlogic A4/A5 Reset Controller 2024-09-18 8:01 ` Conor Dooley @ 2025-03-11 9:48 ` Kelvin Zhang 2025-03-12 20:31 ` Conor Dooley 0 siblings, 1 reply; 9+ messages in thread From: Kelvin Zhang @ 2025-03-11 9:48 UTC (permalink / raw) To: Conor Dooley, Philipp Zabel Cc: zelong dong, Neil Armstrong, Kevin Hilman, Rob Herring, Martin Blumenstingl, Jerome Brunet, Krzysztof Kozlowski, linux-kernel, linux-amlogic, linux-arm-kernel, devicetree, Conor Dooley On 2024/9/18 16:01, Conor Dooley wrote: > On Wed, Sep 18, 2024 at 09:51:28AM +0200, Philipp Zabel wrote: >> On Mi, 2024-09-18 at 15:42 +0800, zelong dong wrote: >>> From: Zelong Dong<zelong.dong@amlogic.com> >>> >>> Add new compatible for Amlogic A4/A5 Reset Controller >>> >>> Signed-off-by: Zelong Dong<zelong.dong@amlogic.com> >>> Acked-by: Conor Dooley<conor.dooley@microchip.com> >>> --- >>> .../bindings/reset/amlogic,meson-reset.yaml | 23 ++++++++++++------- >>> 1 file changed, 15 insertions(+), 8 deletions(-) >>> >>> diff --git a/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml b/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml >>> index 695ef38a7bb3..0ad81fe7b629 100644 >>> --- a/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml >>> +++ b/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml >>> @@ -12,14 +12,21 @@ maintainers: >>> >>> properties: >>> compatible: >>> - enum: >>> - - amlogic,meson8b-reset # Reset Controller on Meson8b and compatible SoCs >>> - - amlogic,meson-gxbb-reset # Reset Controller on GXBB and compatible SoCs >>> - - amlogic,meson-axg-reset # Reset Controller on AXG and compatible SoCs >>> - - amlogic,meson-a1-reset # Reset Controller on A1 and compatible SoCs >>> - - amlogic,meson-s4-reset # Reset Controller on S4 and compatible SoCs >>> - - amlogic,c3-reset # Reset Controller on C3 and compatible SoCs >>> - - amlogic,t7-reset >>> + oneOf: >>> + - items: >> I'm not well versed in preferred dt-bindings style, but this items >> looks superfluous to me. It only contains a single enum. > Oh, ye. Good spot. Hello Philipp, Conor, Sorry for the late reply. Do you mean to use 'amlogic,meson-s4-reset' for A4 and A5 directly, without the fallback? -- Best regards, Kelvin Zhang ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: reset: Add compatible for Amlogic A4/A5 Reset Controller 2025-03-11 9:48 ` Kelvin Zhang @ 2025-03-12 20:31 ` Conor Dooley 2025-03-13 1:48 ` Kelvin Zhang 0 siblings, 1 reply; 9+ messages in thread From: Conor Dooley @ 2025-03-12 20:31 UTC (permalink / raw) To: Kelvin Zhang Cc: Philipp Zabel, zelong dong, Neil Armstrong, Kevin Hilman, Rob Herring, Martin Blumenstingl, Jerome Brunet, Krzysztof Kozlowski, linux-kernel, linux-amlogic, linux-arm-kernel, devicetree, Conor Dooley [-- Attachment #1: Type: text/plain, Size: 2387 bytes --] On Tue, Mar 11, 2025 at 05:48:26PM +0800, Kelvin Zhang wrote: > > > On 2024/9/18 16:01, Conor Dooley wrote: > > On Wed, Sep 18, 2024 at 09:51:28AM +0200, Philipp Zabel wrote: > > > On Mi, 2024-09-18 at 15:42 +0800, zelong dong wrote: > > > > From: Zelong Dong<zelong.dong@amlogic.com> > > > > > > > > Add new compatible for Amlogic A4/A5 Reset Controller > > > > > > > > Signed-off-by: Zelong Dong<zelong.dong@amlogic.com> > > > > Acked-by: Conor Dooley<conor.dooley@microchip.com> > > > > --- > > > > .../bindings/reset/amlogic,meson-reset.yaml | 23 ++++++++++++------- > > > > 1 file changed, 15 insertions(+), 8 deletions(-) > > > > > > > > diff --git a/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml b/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml > > > > index 695ef38a7bb3..0ad81fe7b629 100644 > > > > --- a/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml > > > > +++ b/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml > > > > @@ -12,14 +12,21 @@ maintainers: > > > > properties: > > > > compatible: > > > > - enum: > > > > - - amlogic,meson8b-reset # Reset Controller on Meson8b and compatible SoCs > > > > - - amlogic,meson-gxbb-reset # Reset Controller on GXBB and compatible SoCs > > > > - - amlogic,meson-axg-reset # Reset Controller on AXG and compatible SoCs > > > > - - amlogic,meson-a1-reset # Reset Controller on A1 and compatible SoCs > > > > - - amlogic,meson-s4-reset # Reset Controller on S4 and compatible SoCs > > > > - - amlogic,c3-reset # Reset Controller on C3 and compatible SoCs > > > > - - amlogic,t7-reset > > > > + oneOf: > > > > + - items: > > > I'm not well versed in preferred dt-bindings style, but this items > > > looks superfluous to me. It only contains a single enum. > > Oh, ye. Good spot. > > Hello Philipp, Conor, > Sorry for the late reply. > > Do you mean to use 'amlogic,meson-s4-reset' for A4 and A5 directly, without > the fallback? No. We are saying that + - items: + - enum: + - amlogic,meson8b-reset # Reset Controller on Meson8b and compatible SoCs is pointless duplication, because your "items" list only has only entry in it (the enum) and you could just remove the "- items" line entirely and have the same outcome. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: reset: Add compatible for Amlogic A4/A5 Reset Controller 2025-03-12 20:31 ` Conor Dooley @ 2025-03-13 1:48 ` Kelvin Zhang 0 siblings, 0 replies; 9+ messages in thread From: Kelvin Zhang @ 2025-03-13 1:48 UTC (permalink / raw) To: Conor Dooley Cc: Philipp Zabel, zelong dong, Neil Armstrong, Kevin Hilman, Rob Herring, Martin Blumenstingl, Jerome Brunet, Krzysztof Kozlowski, linux-kernel, linux-amlogic, linux-arm-kernel, devicetree, Conor Dooley On 2025/3/13 04:31, Conor Dooley wrote: > On Tue, Mar 11, 2025 at 05:48:26PM +0800, Kelvin Zhang wrote: >> >> On 2024/9/18 16:01, Conor Dooley wrote: >>> On Wed, Sep 18, 2024 at 09:51:28AM +0200, Philipp Zabel wrote: >>>> On Mi, 2024-09-18 at 15:42 +0800, zelong dong wrote: >>>>> From: Zelong Dong<zelong.dong@amlogic.com> >>>>> >>>>> Add new compatible for Amlogic A4/A5 Reset Controller >>>>> >>>>> Signed-off-by: Zelong Dong<zelong.dong@amlogic.com> >>>>> Acked-by: Conor Dooley<conor.dooley@microchip.com> >>>>> --- >>>>> .../bindings/reset/amlogic,meson-reset.yaml | 23 ++++++++++++------- >>>>> 1 file changed, 15 insertions(+), 8 deletions(-) >>>>> >>>>> diff --git a/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml b/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml >>>>> index 695ef38a7bb3..0ad81fe7b629 100644 >>>>> --- a/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml >>>>> +++ b/Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml >>>>> @@ -12,14 +12,21 @@ maintainers: >>>>> properties: >>>>> compatible: >>>>> - enum: >>>>> - - amlogic,meson8b-reset # Reset Controller on Meson8b and compatible SoCs >>>>> - - amlogic,meson-gxbb-reset # Reset Controller on GXBB and compatible SoCs >>>>> - - amlogic,meson-axg-reset # Reset Controller on AXG and compatible SoCs >>>>> - - amlogic,meson-a1-reset # Reset Controller on A1 and compatible SoCs >>>>> - - amlogic,meson-s4-reset # Reset Controller on S4 and compatible SoCs >>>>> - - amlogic,c3-reset # Reset Controller on C3 and compatible SoCs >>>>> - - amlogic,t7-reset >>>>> + oneOf: >>>>> + - items: >>>> I'm not well versed in preferred dt-bindings style, but this items >>>> looks superfluous to me. It only contains a single enum. >>> Oh, ye. Good spot. >> Hello Philipp, Conor, >> Sorry for the late reply. >> >> Do you mean to use 'amlogic,meson-s4-reset' for A4 and A5 directly, without >> the fallback? > No. We are saying that > > + - items: > + - enum: > + - amlogic,meson8b-reset # Reset Controller on Meson8b and compatible SoCs > > is pointless duplication, because your "items" list only has only > entry in it (the enum) and you could just remove the "- items" line > entirely and have the same outcome. Got it. Thanks! -- Best regards, Kelvin Zhang ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v3 2/3] arm64: dts: amlogic: Add Amlogic A4 reset controller 2024-09-18 7:42 [PATCH v3 0/3] reset: amlogic-a4/a5: add reset driver zelong dong 2024-09-18 7:42 ` [PATCH v3 1/3] dt-bindings: reset: Add compatible for Amlogic A4/A5 Reset Controller zelong dong @ 2024-09-18 7:42 ` zelong dong 2024-09-18 7:42 ` [PATCH v3 3/3] arm64: dts: amlogic: Add Amlogic A5 " zelong dong 2 siblings, 0 replies; 9+ messages in thread From: zelong dong @ 2024-09-18 7:42 UTC (permalink / raw) To: Neil Armstrong, Philipp Zabel, Kevin Hilman, Rob Herring, Martin Blumenstingl, Jerome Brunet, Krzysztof Kozlowski Cc: linux-kernel, linux-amlogic, linux-arm-kernel, devicetree, kelvin.zhang, Zelong Dong From: Zelong Dong <zelong.dong@amlogic.com> Add the device node and related header file for Amlogic A4 reset controller. The count and offset for A4 Soc RESET registers are same as S4 Soc. Signed-off-by: Zelong Dong <zelong.dong@amlogic.com> --- .../arm64/boot/dts/amlogic/amlogic-a4-reset.h | 93 +++++++++++++++++++ arch/arm64/boot/dts/amlogic/amlogic-a4.dtsi | 10 ++ 2 files changed, 103 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/amlogic-a4-reset.h diff --git a/arch/arm64/boot/dts/amlogic/amlogic-a4-reset.h b/arch/arm64/boot/dts/amlogic/amlogic-a4-reset.h new file mode 100644 index 000000000000..f6a4c90bab3c --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/amlogic-a4-reset.h @@ -0,0 +1,93 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ +/* + * Copyright (c) 2024 Amlogic, Inc. All rights reserved. + */ + +#ifndef __DTS_AMLOGIC_A4_RESET_H +#define __DTS_AMLOGIC_A4_RESET_H + +/* RESET0 */ +/* 0-3 */ +#define RESET_USB 4 +/* 5-6*/ +#define RESET_U2PHY22 7 +#define RESET_USBPHY20 8 +#define RESET_U2PHY21 9 +#define RESET_USB2DRD 10 +#define RESET_U2H 11 +#define RESET_LED_CTRL 12 +/* 13-31 */ + +/* RESET1 */ +#define RESET_AUDIO 32 +#define RESET_AUDIO_VAD 33 +/* 34*/ +#define RESET_DDR_APB 35 +#define RESET_DDR 36 +#define RESET_VOUT_VENC 37 +#define RESET_VOUT 38 +/* 39-47 */ +#define RESET_ETHERNET 48 +/* 49-63 */ + +/* RESET2 */ +#define RESET_DEVICE_MMC_ARB 64 +#define RESET_IRCTRL 65 +/* 66*/ +#define RESET_TS_PLL 67 +/* 68-72*/ +#define RESET_SPICC_0 73 +#define RESET_SPICC_1 74 +/* 75-79*/ +#define RESET_MSR_CLK 80 +/* 81*/ +#define RESET_SAR_ADC 82 +/* 83-87*/ +#define RESET_ACODEC 88 +/* 89-90*/ +#define RESET_WATCHDOG 91 +/* 92-95*/ + +/* RESET3 */ +/* 96-127 */ + +/* RESET4 */ +/* 128-131 */ +#define RESET_PWM_AB 132 +#define RESET_PWM_CD 133 +#define RESET_PWM_EF 134 +#define RESET_PWM_GH 135 +/* 136-137*/ +#define RESET_UART_A 138 +#define RESET_UART_B 139 +/* 140*/ +#define RESET_UART_D 141 +#define RESET_UART_E 142 +/* 143-144*/ +#define RESET_I2C_M_A 145 +#define RESET_I2C_M_B 146 +#define RESET_I2C_M_C 147 +#define RESET_I2C_M_D 148 +/* 149-151*/ +#define RESET_SDEMMC_A 152 +/* 153*/ +#define RESET_SDEMMC_C 154 +/* 155-159*/ + +/* RESET5 */ +/* 160-175*/ +#define RESET_BRG_AO_NIC_SYS 176 +/* 177*/ +#define RESET_BRG_AO_NIC_MAIN 178 +#define RESET_BRG_AO_NIC_AUDIO 179 +/* 180-183*/ +#define RESET_BRG_AO_NIC_ALL 184 +/* 185*/ +#define RESET_BRG_NIC_SDIO 186 +#define RESET_BRG_NIC_EMMC 187 +#define RESET_BRG_NIC_DSU 188 +#define RESET_BRG_NIC_CLK81 189 +#define RESET_BRG_NIC_MAIN 190 +#define RESET_BRG_NIC_ALL 191 + +#endif diff --git a/arch/arm64/boot/dts/amlogic/amlogic-a4.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-a4.dtsi index de10e7aebf21..3fd1c52fb55b 100644 --- a/arch/arm64/boot/dts/amlogic/amlogic-a4.dtsi +++ b/arch/arm64/boot/dts/amlogic/amlogic-a4.dtsi @@ -4,6 +4,7 @@ */ #include "amlogic-a4-common.dtsi" +#include "amlogic-a4-reset.h" #include <dt-bindings/power/amlogic,a4-pwrc.h> / { cpus { @@ -48,3 +49,12 @@ pwrc: power-controller { }; }; }; + +&apb { + reset: reset-controller@2000 { + compatible = "amlogic,a4-reset", + "amlogic,meson-s4-reset"; + reg = <0x0 0x2000 0x0 0x98>; + #reset-cells = <1>; + }; +}; -- 2.35.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 3/3] arm64: dts: amlogic: Add Amlogic A5 reset controller 2024-09-18 7:42 [PATCH v3 0/3] reset: amlogic-a4/a5: add reset driver zelong dong 2024-09-18 7:42 ` [PATCH v3 1/3] dt-bindings: reset: Add compatible for Amlogic A4/A5 Reset Controller zelong dong 2024-09-18 7:42 ` [PATCH v3 2/3] arm64: dts: amlogic: Add Amlogic A4 reset controller zelong dong @ 2024-09-18 7:42 ` zelong dong 2 siblings, 0 replies; 9+ messages in thread From: zelong dong @ 2024-09-18 7:42 UTC (permalink / raw) To: Neil Armstrong, Philipp Zabel, Kevin Hilman, Rob Herring, Martin Blumenstingl, Jerome Brunet, Krzysztof Kozlowski Cc: linux-kernel, linux-amlogic, linux-arm-kernel, devicetree, kelvin.zhang, Zelong Dong From: Zelong Dong <zelong.dong@amlogic.com> Add the device node and related header file for Amlogic A5 reset controller. The count and offset for A5 Soc RESET registers are same as S4 Soc. Signed-off-by: Zelong Dong <zelong.dong@amlogic.com> --- .../arm64/boot/dts/amlogic/amlogic-a5-reset.h | 95 +++++++++++++++++++ arch/arm64/boot/dts/amlogic/amlogic-a5.dtsi | 10 ++ 2 files changed, 105 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/amlogic-a5-reset.h diff --git a/arch/arm64/boot/dts/amlogic/amlogic-a5-reset.h b/arch/arm64/boot/dts/amlogic/amlogic-a5-reset.h new file mode 100644 index 000000000000..cdf0f5159620 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/amlogic-a5-reset.h @@ -0,0 +1,95 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ +/* + * Copyright (c) 2024 Amlogic, Inc. All rights reserved. + */ + +#ifndef __DTS_AMLOGIC_A5_RESET_H +#define __DTS_AMLOGIC_A5_RESET_H + +/* RESET0 */ +/* 0-3 */ +#define RESET_USB 4 +/* 5-7 */ +#define RESET_USBPHY20 8 +/* 9 */ +#define RESET_USB2DRD 10 +/* 11-31 */ + +/* RESET1 */ +#define RESET_AUDIO 32 +#define RESET_AUDIO_VAD 33 +/* 34 */ +#define RESET_DDR_APB 35 +#define RESET_DDR 36 +/* 37-40 */ +#define RESET_DSPA_DEBUG 41 +/* 42 */ +#define RESET_DSPA 43 +/* 44-46 */ +#define RESET_NNA 47 +#define RESET_ETHERNET 48 +/* 49-63 */ + +/* RESET2 */ +#define RESET_ABUS_ARB 64 +#define RESET_IRCTRL 65 +/* 66 */ +#define RESET_TS_PLL 67 +/* 68-72 */ +#define RESET_SPICC_0 73 +#define RESET_SPICC_1 74 +#define RESET_RSA 75 + +/* 76-79 */ +#define RESET_MSR_CLK 80 +#define RESET_SPIFC 81 +#define RESET_SAR_ADC 82 +/* 83-90 */ +#define RESET_WATCHDOG 91 +/* 92-95 */ + +/* RESET3 */ +/* 96-127 */ + +/* RESET4 */ +#define RESET_RTC 128 +/* 129-131 */ +#define RESET_PWM_AB 132 +#define RESET_PWM_CD 133 +#define RESET_PWM_EF 134 +#define RESET_PWM_GH 135 +/* 104-105 */ +#define RESET_UART_A 138 +#define RESET_UART_B 139 +#define RESET_UART_C 140 +#define RESET_UART_D 141 +#define RESET_UART_E 142 +/* 143*/ +#define RESET_I2C_S_A 144 +#define RESET_I2C_M_A 145 +#define RESET_I2C_M_B 146 +#define RESET_I2C_M_C 147 +#define RESET_I2C_M_D 148 +/* 149-151 */ +#define RESET_SDEMMC_A 152 +/* 153 */ +#define RESET_SDEMMC_C 154 +/* 155-159*/ + +/* RESET5 */ +/* 160-175 */ +#define RESET_BRG_AO_NIC_SYS 176 +#define RESET_BRG_AO_NIC_DSPA 177 +#define RESET_BRG_AO_NIC_MAIN 178 +#define RESET_BRG_AO_NIC_AUDIO 179 +/* 180-183 */ +#define RESET_BRG_AO_NIC_ALL 184 +#define RESET_BRG_NIC_NNA 185 +#define RESET_BRG_NIC_SDIO 186 +#define RESET_BRG_NIC_EMMC 187 +#define RESET_BRG_NIC_DSU 188 +#define RESET_BRG_NIC_SYSCLK 189 +#define RESET_BRG_NIC_MAIN 190 +#define RESET_BRG_NIC_ALL 191 + +#endif diff --git a/arch/arm64/boot/dts/amlogic/amlogic-a5.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-a5.dtsi index 17a6316de891..b97e2f3091bf 100644 --- a/arch/arm64/boot/dts/amlogic/amlogic-a5.dtsi +++ b/arch/arm64/boot/dts/amlogic/amlogic-a5.dtsi @@ -4,6 +4,7 @@ */ #include "amlogic-a4-common.dtsi" +#include "amlogic-a5-reset.h" #include <dt-bindings/power/amlogic,a5-pwrc.h> / { cpus { @@ -48,3 +49,12 @@ pwrc: power-controller { }; }; }; + +&apb { + reset: reset-controller@2000 { + compatible = "amlogic,a5-reset", + "amlogic,meson-s4-reset"; + reg = <0x0 0x2000 0x0 0x98>; + #reset-cells = <1>; + }; +}; -- 2.35.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-03-13 1:49 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-09-18 7:42 [PATCH v3 0/3] reset: amlogic-a4/a5: add reset driver zelong dong 2024-09-18 7:42 ` [PATCH v3 1/3] dt-bindings: reset: Add compatible for Amlogic A4/A5 Reset Controller zelong dong 2024-09-18 7:51 ` Philipp Zabel 2024-09-18 8:01 ` Conor Dooley 2025-03-11 9:48 ` Kelvin Zhang 2025-03-12 20:31 ` Conor Dooley 2025-03-13 1:48 ` Kelvin Zhang 2024-09-18 7:42 ` [PATCH v3 2/3] arm64: dts: amlogic: Add Amlogic A4 reset controller zelong dong 2024-09-18 7:42 ` [PATCH v3 3/3] arm64: dts: amlogic: Add Amlogic A5 " zelong dong
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).