diff mbox series

[v2,11/16] realtek: rtl839x: replace pinctrl nodes

Message ID c5d098c710d6ab042d35678501df4b8d0dcc0619.1664830160.git.sander@svanheule.net
State Superseded
Delegated to: Sander Vanheule
Headers show
Series realtek: pinctrl and switch LED drivers | expand

Commit Message

Sander Vanheule Oct. 3, 2022, 8:52 p.m. UTC
Replace the current "pinctrl-single" nodes by the new
"realtek,cypress-pinctrl" node. This allows users to specify pin groups
and features without having to dig into SoC documentation.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
---
 target/linux/realtek/dts-5.10/rtl839x.dtsi | 52 +++++++++-------------
 1 file changed, 21 insertions(+), 31 deletions(-)
diff mbox series

Patch

diff --git a/target/linux/realtek/dts-5.10/rtl839x.dtsi b/target/linux/realtek/dts-5.10/rtl839x.dtsi
index 78e2454b7e28..07017c587191 100644
--- a/target/linux/realtek/dts-5.10/rtl839x.dtsi
+++ b/target/linux/realtek/dts-5.10/rtl839x.dtsi
@@ -242,37 +242,27 @@ 
 
 	};
 
-	pinmux@1b000004 {
-		compatible = "pinctrl-single";
-		reg = <0x1b000004 0x4>;
-
-		pinctrl-single,bit-per-mux;
-		pinctrl-single,register-width = <32>;
-		pinctrl-single,function-mask = <0x1>;
-		#pinctrl-cells = <2>;
-
-		enable_uart1: pinmux_enable_uart1 {
-			pinctrl-single,bits = <0x0 0x1 0x3>;
-		};
-
-		disable_jtag: pinmux_disable_jtag {
-			pinctrl-single,bits = <0x0 0x2 0x3>;
-		};
-	};
-
-	/* LED_GLB_CTRL */
-	pinmux@1b0000e4 {
-		compatible = "pinctrl-single";
-		reg = <0x1b0000e4 0x4>;
-
-		pinctrl-single,bit-per-mux;
-		pinctrl-single,register-width = <32>;
-		pinctrl-single,function-mask = <0x1>;
-		#pinctrl-cells = <2>;
-
-		/* enable GPIO 0 */
-		pinmux_disable_sys_led: disable_sys_led {
-			pinctrl-single,bits = <0x0 0x0 0x4000>;
+	switchcore: switchcore-bus@1b000000 {
+		compatible = "realtek,cypress-switchcore", "syscon";
+		reg = <0x1b000000 0x10000>;
+
+		pinctrl: pinctrl {
+			compatible = "realtek,cypress-pinctrl";
+
+			enable_uart1: pinmux-jtag-uart1 {
+				groups = "jtag";
+				function = "uart1";
+			};
+
+			disable_jtag: pinmux-jtag-gpio {
+				groups = "jtag";
+				function = "gpio";
+			};
+
+			pinmux_disable_sys_led: pinmux-sysled-gpio {
+				groups = "sys-led";
+				function = "gpio";
+			};
 		};
 	};