2019-10-23 10:16:38

by Andreas Färber

[permalink] [raw]
Subject: [PATCH v2 00/11] arm64: Realtek RTD1295 reset controllers

Hello,

This series adds reset controllers for the Realtek RTD1295 and RTD1195 SoCs.

v2 adopts reset-simple driver and DesignWare bindings as simplification
and covers RTD1195, too.

Note that reset-simple driver would allow to cover RTD1195's reset1-3 in one
DT node, but it only maps the first resource, so RTD1295's reset4 would need
to remain separate due to a gap in between. I've therefore left them all as
separate nodes for now.

Also note that my initial 32-bit arm patch already selects RESET_CONTROLLER,
to avoid needing a separate patch here to add that one line as done for arm64.

If I can take the bindings patches through the Realtek tree then I can squash
the two final DT patches depending on them into the patches added the resets,
otherwise they need to go into v5.6 or be merged via a topic branch.

More experimental patches at:
https://github.com/afaerber/linux/commits/rtd1295-next

Have a lot of fun!

Cheers,
Andreas

v1 -> v2:
* Drop custom reset driver
* Drop "realtek,rtd1295-reset" binding
* Reordered to not depend on irqchip or clk patches
* Extended with RTD1195 patches

Cc: Philipp Zabel <[email protected]>
Cc: [email protected]

Andreas Färber (11):
dt-bindings: reset: Add Realtek RTD1295
dt-bindings: reset: Add Realtek RTD1195
reset: simple: Keep alphabetical order
reset: simple: Add Realtek RTD1195/RTD1295
arm64: realtek: Select reset controller
arm64: dts: realtek: Add RTD129x reset controller nodes
arm64: dts: realtek: Add RTD129x UART resets
ARM: dts: rtd1195: Add reset nodes
ARM: dts: rtd1195: Add UART resets
arm64: dts: realtek: Adopt RTD129x reset constants
ARM: dts: rtd1195: Adopt reset constants

arch/arm/boot/dts/rtd1195.dtsi | 27 +++++++
arch/arm64/Kconfig.platforms | 1 +
arch/arm64/boot/dts/realtek/rtd129x.dtsi | 34 +++++++++
drivers/reset/Kconfig | 5 +-
include/dt-bindings/reset/realtek,rtd1195.h | 74 +++++++++++++++++++
include/dt-bindings/reset/realtek,rtd1295.h | 111 ++++++++++++++++++++++++++++
6 files changed, 250 insertions(+), 2 deletions(-)
create mode 100644 include/dt-bindings/reset/realtek,rtd1195.h
create mode 100644 include/dt-bindings/reset/realtek,rtd1295.h

--
2.16.4


2019-10-23 10:18:13

by Andreas Färber

[permalink] [raw]
Subject: [PATCH v2 05/11] arm64: realtek: Select reset controller

Select RESET_CONTROLLER for ARCH_REALTEK.

Signed-off-by: Andreas Färber <[email protected]>
---
v2: New

arch/arm64/Kconfig.platforms | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index 63b463b88040..90d3c04ebff0 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -189,6 +189,7 @@ config ARCH_QCOM

config ARCH_REALTEK
bool "Realtek Platforms"
+ select RESET_CONTROLLER
help
This enables support for the ARMv8 based Realtek chipsets,
like the RTD1295.
--
2.16.4

2019-10-23 12:48:09

by Andreas Färber

[permalink] [raw]
Subject: [PATCH v2 11/11] ARM: dts: rtd1195: Adopt reset constants

Replace reset controller indices with constants.

Signed-off-by: Andreas Färber <[email protected]>
---
v2: New

arch/arm/boot/dts/rtd1195.dtsi | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/rtd1195.dtsi b/arch/arm/boot/dts/rtd1195.dtsi
index e2cdcbcf70f4..9ccf8fa04718 100644
--- a/arch/arm/boot/dts/rtd1195.dtsi
+++ b/arch/arm/boot/dts/rtd1195.dtsi
@@ -13,6 +13,7 @@
/memreserve/ 0x18100000 0x01000000; /* nor */

#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/reset/realtek,rtd1195.h>

/ {
compatible = "realtek,rtd1195";
@@ -128,7 +129,7 @@
reg = <0x18007800 0x400>;
reg-shift = <2>;
reg-io-width = <4>;
- resets = <&iso_reset 8>;
+ resets = <&iso_reset RTD1195_ISO_RSTN_UR0>;
clock-frequency = <27000000>;
status = "disabled";
};
@@ -138,7 +139,7 @@
reg = <0x1801b200 0x100>;
reg-shift = <2>;
reg-io-width = <4>;
- resets = <&reset2 28>;
+ resets = <&reset2 RTD1195_RSTN_UR1>;
clock-frequency = <27000000>;
status = "disabled";
};
--
2.16.4

2019-10-23 12:50:16

by Andreas Färber

[permalink] [raw]
Subject: [PATCH v2 10/11] arm64: dts: realtek: Adopt RTD129x reset constants

Replace reset controller indices with constants.

Signed-off-by: Andreas Färber <[email protected]>
---
v1 -> v2: Unchanged

arch/arm64/boot/dts/realtek/rtd129x.dtsi | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/realtek/rtd129x.dtsi b/arch/arm64/boot/dts/realtek/rtd129x.dtsi
index 15d321d9515c..4433114476f5 100644
--- a/arch/arm64/boot/dts/realtek/rtd129x.dtsi
+++ b/arch/arm64/boot/dts/realtek/rtd129x.dtsi
@@ -12,6 +12,7 @@
/memreserve/ 0x0000000001ffe000 0x0000000000004000;

#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/reset/realtek,rtd1295.h>

/ {
interrupt-parent = <&gic>;
@@ -79,7 +80,7 @@
reg-shift = <2>;
reg-io-width = <4>;
clock-frequency = <27000000>;
- resets = <&iso_reset 8>;
+ resets = <&iso_reset RTD1295_ISO_RSTN_UR0>;
status = "disabled";
};

@@ -89,7 +90,7 @@
reg-shift = <2>;
reg-io-width = <4>;
clock-frequency = <432000000>;
- resets = <&reset2 28>;
+ resets = <&reset2 RTD1295_RSTN_UR1>;
status = "disabled";
};

@@ -99,7 +100,7 @@
reg-shift = <2>;
reg-io-width = <4>;
clock-frequency = <432000000>;
- resets = <&reset2 27>;
+ resets = <&reset2 RTD1295_RSTN_UR2>;
status = "disabled";
};

--
2.16.4

2019-10-25 01:22:52

by Philipp Zabel

[permalink] [raw]
Subject: Re: [PATCH v2 00/11] arm64: Realtek RTD1295 reset controllers

Hi Andreas,

On Wed, 2019-10-23 at 12:13 +0200, Andreas Färber wrote:
> Hello,
>
> This series adds reset controllers for the Realtek RTD1295 and RTD1195 SoCs.
>
> v2 adopts reset-simple driver and DesignWare bindings as simplification
> and covers RTD1195, too.
>
> Note that reset-simple driver would allow to cover RTD1195's reset1-3 in one
> DT node, but it only maps the first resource, so RTD1295's reset4 would need
> to remain separate due to a gap in between. I've therefore left them all as
> separate nodes for now.
>
> Also note that my initial 32-bit arm patch already selects RESET_CONTROLLER,
> to avoid needing a separate patch here to add that one line as done for arm64.
>
> If I can take the bindings patches through the Realtek tree then I can squash
> the two final DT patches depending on them into the patches added the resets,
> otherwise they need to go into v5.6 or be merged via a topic branch.

I'm fine with the DT binding patches going in through the Realtek tree,
feel free to add

Acked-by: Philipp Zabel <[email protected]>

to both. I'll just pick up patches 3 and 4.

regards
Philipp

2019-10-26 00:37:48

by Andreas Färber

[permalink] [raw]
Subject: Re: [PATCH v2 05/11] arm64: realtek: Select reset controller

Am 23.10.19 um 12:13 schrieb Andreas Färber:
> Select RESET_CONTROLLER for ARCH_REALTEK.
>
> Signed-off-by: Andreas Färber <[email protected]>
> ---
> v2: New
>
> arch/arm64/Kconfig.platforms | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
> index 63b463b88040..90d3c04ebff0 100644
> --- a/arch/arm64/Kconfig.platforms
> +++ b/arch/arm64/Kconfig.platforms
> @@ -189,6 +189,7 @@ config ARCH_QCOM
>
> config ARCH_REALTEK
> bool "Realtek Platforms"
> + select RESET_CONTROLLER
> help
> This enables support for the ARMv8 based Realtek chipsets,
> like the RTD1295.

Applied to linux-realtek.git v5.5/arm64:

https://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-realtek.git/log/?h=v5.5/arm64

Regards,
Andreas

--
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)

2019-10-29 07:28:19

by Andreas Färber

[permalink] [raw]
Subject: Re: [PATCH v2 10/11] arm64: dts: realtek: Adopt RTD129x reset constants

Am 23.10.19 um 12:13 schrieb Andreas Färber:
> Replace reset controller indices with constants.
>
> Signed-off-by: Andreas Färber <[email protected]>
> ---
> v1 -> v2: Unchanged
>
> arch/arm64/boot/dts/realtek/rtd129x.dtsi | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)

Squashed into preceding arm64 patch and applied to linux-realtek.git
v5.5/dt64:

https://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-realtek.git/log/?h=v5.5/dt64

Thanks,
Andreas

--
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)