* [PATCH 0/5] arm64: Realtek RTD1295 reset controllers
@ 2017-08-16 0:38 Andreas Färber
[not found] ` <20170816003847.6208-1-afaerber-l3A5Bk7waGM@public.gmane.org>
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Andreas Färber @ 2017-08-16 0:38 UTC (permalink / raw)
To: Philipp Zabel, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Roc He,
蒋丽琴, Andreas Färber,
devicetree-u79uwXL29TY76Z2rM5mHXA
Hello,
This series adds reset controllers for the Realtek RTD1295 SoC.
Since there is still no public source code for RTD1295, the individual resets
were derived from reset-names in the vendor DT; the implementation was a guess.
More experimental patches at:
https://github.com/afaerber/linux/commits/rtd1295-next
Have a lot of fun!
Cheers,
Andreas
Cc: Roc He <hepeng-qoVzM6YEWSw@public.gmane.org>
Cc: 蒋丽琴 <jiang.liqin-31gW8twSeR21Z/+hSey0Gg@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Andreas Färber (5):
dt-bindings: reset: Add Realtek RTD1295
arm64: dts: realtek: Add RTD1295 reset controller nodes
reset: Add Realtek RTD1295 driver
arm64: dts: realtek: Add RTD1295 UART resets
arm64: dts: realtek: Adopt RTD1295 reset constants
.../bindings/reset/realtek,rtd129x-reset.txt | 18 ++++
arch/arm64/boot/dts/realtek/rtd1295.dtsi | 34 +++++++
drivers/reset/Kconfig | 6 ++
drivers/reset/Makefile | 1 +
drivers/reset/reset-rtd129x.c | 100 ++++++++++++++++++
include/dt-bindings/reset/realtek,rtd1295.h | 112 +++++++++++++++++++++
6 files changed, 271 insertions(+)
create mode 100644 Documentation/devicetree/bindings/reset/realtek,rtd129x-reset.txt
create mode 100644 drivers/reset/reset-rtd129x.c
create mode 100644 include/dt-bindings/reset/realtek,rtd1295.h
--
2.12.3
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/5] dt-bindings: reset: Add Realtek RTD1295
[not found] ` <20170816003847.6208-1-afaerber-l3A5Bk7waGM@public.gmane.org>
@ 2017-08-16 0:38 ` Andreas Färber
2017-08-17 21:44 ` Rob Herring
0 siblings, 1 reply; 6+ messages in thread
From: Andreas Färber @ 2017-08-16 0:38 UTC (permalink / raw)
To: Philipp Zabel, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Roc He,
蒋丽琴, Andreas Färber, Rob Herring,
Mark Rutland, devicetree-u79uwXL29TY76Z2rM5mHXA
Add binding for Realtek RTD1295 reset controller.
Signed-off-by: Andreas Färber <afaerber-l3A5Bk7waGM@public.gmane.org>
---
.../bindings/reset/realtek,rtd129x-reset.txt | 18 ++++
include/dt-bindings/reset/realtek,rtd1295.h | 112 +++++++++++++++++++++
2 files changed, 130 insertions(+)
create mode 100644 Documentation/devicetree/bindings/reset/realtek,rtd129x-reset.txt
create mode 100644 include/dt-bindings/reset/realtek,rtd1295.h
diff --git a/Documentation/devicetree/bindings/reset/realtek,rtd129x-reset.txt b/Documentation/devicetree/bindings/reset/realtek,rtd129x-reset.txt
new file mode 100644
index 000000000000..79fb37feb0a2
--- /dev/null
+++ b/Documentation/devicetree/bindings/reset/realtek,rtd129x-reset.txt
@@ -0,0 +1,18 @@
+Realtek RTD129x Reset Controller
+================================
+
+Required properties:
+- compatible : Should be "realtek,rtd1295-reset"
+- reg : Should contain the register address and 4 as size.
+- #reset-cells : Should be 1
+
+See reset.txt for common reset controller bindings.
+
+
+Example:
+
+ reset-controller@98000000 {
+ compatible = "realtek,rtd1295-reset";
+ reg = <0x98000000 0x4>;
+ #reset-cells = <1>;
+ };
diff --git a/include/dt-bindings/reset/realtek,rtd1295.h b/include/dt-bindings/reset/realtek,rtd1295.h
new file mode 100644
index 000000000000..237b3ff6697e
--- /dev/null
+++ b/include/dt-bindings/reset/realtek,rtd1295.h
@@ -0,0 +1,112 @@
+/*
+ * Realtek RTD1295 reset controllers
+ *
+ * Copyright (c) 2017 Andreas Färber
+ *
+ * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+ */
+#ifndef DT_BINDINGS_RESET_RTD1295_H
+#define DT_BINDINGS_RESET_RTD1295_H
+
+/* soft reset 1 */
+#define RTD1295_RSTN_MISC 0
+#define RTD1295_RSTN_NAT 1
+#define RTD1295_RSTN_USB3_PHY0_POW 2
+#define RTD1295_RSTN_GSPI 3
+#define RTD1295_RSTN_USB3_P0_MDIO 4
+#define RTD1295_RSTN_SATA_0 5
+#define RTD1295_RSTN_USB 6
+#define RTD1295_RSTN_SATA_PHY_0 7
+#define RTD1295_RSTN_USB_PHY0 8
+#define RTD1295_RSTN_USB_PHY1 9
+#define RTD1295_RSTN_SATA_PHY_POW_0 10
+#define RTD1295_RSTN_SATA_FUNC_EXIST_0 11
+#define RTD1295_RSTN_HDMI 12
+#define RTD1295_RSTN_VE1 13
+#define RTD1295_RSTN_VE2 14
+#define RTD1295_RSTN_VE3 15
+#define RTD1295_RSTN_ETN 16
+#define RTD1295_RSTN_AIO 17
+#define RTD1295_RSTN_GPU 18
+#define RTD1295_RSTN_TVE 19
+#define RTD1295_RSTN_VO 20
+#define RTD1295_RSTN_LVDS 21
+#define RTD1295_RSTN_SE 22
+#define RTD1295_RSTN_DCU 23
+#define RTD1295_RSTN_DC_PHY 24
+#define RTD1295_RSTN_CP 25
+#define RTD1295_RSTN_MD 26
+#define RTD1295_RSTN_TP 27
+#define RTD1295_RSTN_AE 28
+#define RTD1295_RSTN_NF 29
+#define RTD1295_RSTN_MIPI 30
+#define RTD1295_RSTN_RSA 31
+
+/* soft reset 2 */
+#define RTD1295_RSTN_ACPU 0
+#define RTD1295_RSTN_JPEG 1
+#define RTD1295_RSTN_USB_PHY3 2
+#define RTD1295_RSTN_USB_PHY2 3
+#define RTD1295_RSTN_USB3_PHY1_POW 4
+#define RTD1295_RSTN_USB3_P1_MDIO 5
+#define RTD1295_RSTN_PCIE0_STITCH 6
+#define RTD1295_RSTN_PCIE0_PHY 7
+#define RTD1295_RSTN_PCIE0 8
+#define RTD1295_RSTN_PCR_CNT 9
+#define RTD1295_RSTN_CR 10
+#define RTD1295_RSTN_EMMC 11
+#define RTD1295_RSTN_SDIO 12
+#define RTD1295_RSTN_PCIE0_CORE 13
+#define RTD1295_RSTN_PCIE0_POWER 14
+#define RTD1295_RSTN_PCIE0_NONSTICH 15
+#define RTD1295_RSTN_PCIE1_PHY 16
+#define RTD1295_RSTN_PCIE1 17
+#define RTD1295_RSTN_I2C_5 18
+#define RTD1295_RSTN_PCIE1_STITCH 19
+#define RTD1295_RSTN_PCIE1_CORE 20
+#define RTD1295_RSTN_PCIE1_POWER 21
+#define RTD1295_RSTN_PCIE1_NONSTICH 22
+#define RTD1295_RSTN_I2C_4 23
+#define RTD1295_RSTN_I2C_3 24
+#define RTD1295_RSTN_I2C_2 25
+#define RTD1295_RSTN_I2C_1 26
+#define RTD1295_RSTN_UR2 27
+#define RTD1295_RSTN_UR1 28
+#define RTD1295_RSTN_MISC_SC 29
+#define RTD1295_RSTN_CBUS_TX 30
+#define RTD1295_RSTN_SDS_PHY 31
+
+/* soft reset 4 */
+#define RTD1295_RSTN_DCPHY_CRT 0
+#define RTD1295_RSTN_DCPHY_ALERT_RX 1
+#define RTD1295_RSTN_DCPHY_PTR 2
+#define RTD1295_RSTN_DCPHY_LDO 3
+#define RTD1295_RSTN_DCPHY_SSC_DIG 4
+#define RTD1295_RSTN_HDMIRX 5
+#define RTD1295_RSTN_CBUSRX 6
+#define RTD1295_RSTN_SATA_PHY_POW_1 7
+#define RTD1295_RSTN_SATA_FUNC_EXIST_1 8
+#define RTD1295_RSTN_SATA_PHY_1 9
+#define RTD1295_RSTN_SATA_1 10
+#define RTD1295_RSTN_FAN 11
+#define RTD1295_RSTN_HDMIRX_WRAP 12
+#define RTD1295_RSTN_PCIE0_PHY_MDIO 13
+#define RTD1295_RSTN_PCIE1_PHY_MDIO 14
+#define RTD1295_RSTN_DISP 15
+
+/* iso reset */
+#define RTD1295_ISO_RSTN_IR 1
+#define RTD1295_ISO_RSTN_CEC0 2
+#define RTD1295_ISO_RSTN_CEC1 3
+#define RTD1295_ISO_RSTN_DP 4
+#define RTD1295_ISO_RSTN_CBUSTX 5
+#define RTD1295_ISO_RSTN_CBUSRX 6
+#define RTD1295_ISO_RSTN_EFUSE 7
+#define RTD1295_ISO_RSTN_UR0 8
+#define RTD1295_ISO_RSTN_GMAC 9
+#define RTD1295_ISO_RSTN_GPHY 10
+#define RTD1295_ISO_RSTN_I2C_0 11
+#define RTD1295_ISO_RSTN_I2C_1 12
+#define RTD1295_ISO_RSTN_CBUS 13
+
+#endif
--
2.12.3
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/5] arm64: dts: realtek: Add RTD1295 reset controller nodes
2017-08-16 0:38 [PATCH 0/5] arm64: Realtek RTD1295 reset controllers Andreas Färber
[not found] ` <20170816003847.6208-1-afaerber-l3A5Bk7waGM@public.gmane.org>
@ 2017-08-16 0:38 ` Andreas Färber
2017-08-16 0:38 ` [PATCH 4/5] arm64: dts: realtek: Add RTD1295 UART resets Andreas Färber
2017-08-16 0:38 ` [PATCH 5/5] arm64: dts: realtek: Adopt RTD1295 reset constants Andreas Färber
3 siblings, 0 replies; 6+ messages in thread
From: Andreas Färber @ 2017-08-16 0:38 UTC (permalink / raw)
To: Philipp Zabel, linux-arm-kernel
Cc: linux-kernel, Roc He, 蒋丽琴,
Andreas Färber, Rob Herring, Mark Rutland, Catalin Marinas,
Will Deacon, devicetree
Add nodes for the Realtek RTD1295 reset controllers.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
arch/arm64/boot/dts/realtek/rtd1295.dtsi | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/arch/arm64/boot/dts/realtek/rtd1295.dtsi b/arch/arm64/boot/dts/realtek/rtd1295.dtsi
index 43da91fce2b1..9f1dcd1fa8b3 100644
--- a/arch/arm64/boot/dts/realtek/rtd1295.dtsi
+++ b/arch/arm64/boot/dts/realtek/rtd1295.dtsi
@@ -87,6 +87,36 @@
/* Exclude up to 2 GiB of RAM */
ranges = <0x80000000 0x80000000 0x80000000>;
+ reset1: reset-controller@98000000 {
+ compatible = "realtek,rtd1295-reset";
+ reg = <0x98000000 0x4>;
+ #reset-cells = <1>;
+ };
+
+ reset2: reset-controller@98000004 {
+ compatible = "realtek,rtd1295-reset";
+ reg = <0x98000004 0x4>;
+ #reset-cells = <1>;
+ };
+
+ reset3: reset-controller@98000008 {
+ compatible = "realtek,rtd1295-reset";
+ reg = <0x98000008 0x4>;
+ #reset-cells = <1>;
+ };
+
+ reset4: reset-controller@98000050 {
+ compatible = "realtek,rtd1295-reset";
+ reg = <0x98000050 0x4>;
+ #reset-cells = <1>;
+ };
+
+ iso_reset: reset-controller@98007088 {
+ compatible = "realtek,rtd1295-reset";
+ reg = <0x98007088 0x4>;
+ #reset-cells = <1>;
+ };
+
uart0: serial@98007800 {
compatible = "snps,dw-apb-uart";
reg = <0x98007800 0x400>;
--
2.12.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/5] arm64: dts: realtek: Add RTD1295 UART resets
2017-08-16 0:38 [PATCH 0/5] arm64: Realtek RTD1295 reset controllers Andreas Färber
[not found] ` <20170816003847.6208-1-afaerber-l3A5Bk7waGM@public.gmane.org>
2017-08-16 0:38 ` [PATCH 2/5] arm64: dts: realtek: Add RTD1295 reset controller nodes Andreas Färber
@ 2017-08-16 0:38 ` Andreas Färber
2017-08-16 0:38 ` [PATCH 5/5] arm64: dts: realtek: Adopt RTD1295 reset constants Andreas Färber
3 siblings, 0 replies; 6+ messages in thread
From: Andreas Färber @ 2017-08-16 0:38 UTC (permalink / raw)
To: Philipp Zabel, linux-arm-kernel
Cc: linux-kernel, Roc He, 蒋丽琴,
Andreas Färber, Rob Herring, Mark Rutland, Catalin Marinas,
Will Deacon, devicetree
Associate the UART nodes with the corresponding reset controller bits.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
arch/arm64/boot/dts/realtek/rtd1295.dtsi | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm64/boot/dts/realtek/rtd1295.dtsi b/arch/arm64/boot/dts/realtek/rtd1295.dtsi
index 9f1dcd1fa8b3..e777200d84b9 100644
--- a/arch/arm64/boot/dts/realtek/rtd1295.dtsi
+++ b/arch/arm64/boot/dts/realtek/rtd1295.dtsi
@@ -123,6 +123,7 @@
reg-shift = <2>;
reg-io-width = <4>;
clock-frequency = <27000000>;
+ resets = <&iso_reset 8>;
status = "disabled";
};
@@ -132,6 +133,7 @@
reg-shift = <2>;
reg-io-width = <4>;
clock-frequency = <432000000>;
+ resets = <&reset2 28>;
status = "disabled";
};
@@ -141,6 +143,7 @@
reg-shift = <2>;
reg-io-width = <4>;
clock-frequency = <432000000>;
+ resets = <&reset2 27>;
status = "disabled";
};
--
2.12.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 5/5] arm64: dts: realtek: Adopt RTD1295 reset constants
2017-08-16 0:38 [PATCH 0/5] arm64: Realtek RTD1295 reset controllers Andreas Färber
` (2 preceding siblings ...)
2017-08-16 0:38 ` [PATCH 4/5] arm64: dts: realtek: Add RTD1295 UART resets Andreas Färber
@ 2017-08-16 0:38 ` Andreas Färber
3 siblings, 0 replies; 6+ messages in thread
From: Andreas Färber @ 2017-08-16 0:38 UTC (permalink / raw)
To: Philipp Zabel, linux-arm-kernel
Cc: Mark Rutland, devicetree, Roc He, 蒋丽琴,
Catalin Marinas, Will Deacon, linux-kernel, Rob Herring,
Andreas Färber
Replace reset controller indices with constants.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
arch/arm64/boot/dts/realtek/rtd1295.dtsi | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/boot/dts/realtek/rtd1295.dtsi b/arch/arm64/boot/dts/realtek/rtd1295.dtsi
index e777200d84b9..2d2d84b573e3 100644
--- a/arch/arm64/boot/dts/realtek/rtd1295.dtsi
+++ b/arch/arm64/boot/dts/realtek/rtd1295.dtsi
@@ -7,6 +7,7 @@
*/
#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/reset/realtek,rtd1295.h>
/ {
compatible = "realtek,rtd1295";
@@ -123,7 +124,7 @@
reg-shift = <2>;
reg-io-width = <4>;
clock-frequency = <27000000>;
- resets = <&iso_reset 8>;
+ resets = <&iso_reset RTD1295_ISO_RSTN_UR0>;
status = "disabled";
};
@@ -133,7 +134,7 @@
reg-shift = <2>;
reg-io-width = <4>;
clock-frequency = <432000000>;
- resets = <&reset2 28>;
+ resets = <&reset2 RTD1295_RSTN_UR1>;
status = "disabled";
};
@@ -143,7 +144,7 @@
reg-shift = <2>;
reg-io-width = <4>;
clock-frequency = <432000000>;
- resets = <&reset2 27>;
+ resets = <&reset2 RTD1295_RSTN_UR2>;
status = "disabled";
};
--
2.12.3
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/5] dt-bindings: reset: Add Realtek RTD1295
2017-08-16 0:38 ` [PATCH 1/5] dt-bindings: reset: Add Realtek RTD1295 Andreas Färber
@ 2017-08-17 21:44 ` Rob Herring
0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2017-08-17 21:44 UTC (permalink / raw)
To: Andreas Färber
Cc: Philipp Zabel, linux-arm-kernel, linux-kernel, Roc He,
蒋丽琴, Mark Rutland, devicetree
On Wed, Aug 16, 2017 at 02:38:43AM +0200, Andreas Färber wrote:
> Add binding for Realtek RTD1295 reset controller.
>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
> .../bindings/reset/realtek,rtd129x-reset.txt | 18 ++++
> include/dt-bindings/reset/realtek,rtd1295.h | 112 +++++++++++++++++++++
> 2 files changed, 130 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/reset/realtek,rtd129x-reset.txt
> create mode 100644 include/dt-bindings/reset/realtek,rtd1295.h
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-08-17 21:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-16 0:38 [PATCH 0/5] arm64: Realtek RTD1295 reset controllers Andreas Färber
[not found] ` <20170816003847.6208-1-afaerber-l3A5Bk7waGM@public.gmane.org>
2017-08-16 0:38 ` [PATCH 1/5] dt-bindings: reset: Add Realtek RTD1295 Andreas Färber
2017-08-17 21:44 ` Rob Herring
2017-08-16 0:38 ` [PATCH 2/5] arm64: dts: realtek: Add RTD1295 reset controller nodes Andreas Färber
2017-08-16 0:38 ` [PATCH 4/5] arm64: dts: realtek: Add RTD1295 UART resets Andreas Färber
2017-08-16 0:38 ` [PATCH 5/5] arm64: dts: realtek: Adopt RTD1295 reset constants Andreas Färber
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).