[PATCH v3 06/13] realtek: rtl838x: replace pinctrl nodes

Sander Vanheule sander at svanheule.net
Sun Oct 30 11:30:59 PDT 2022


Replace the current "pinctrl-single" nodes by the new
"realtek,maple-pinctrl" node. This allows users to specify pin groups
and features without having to dig into SoC documentation.

Signed-off-by: Sander Vanheule <sander at svanheule.net>
---
 target/linux/realtek/dts-5.10/rtl838x.dtsi | 43 ++++++++--------------
 1 file changed, 16 insertions(+), 27 deletions(-)

diff --git a/target/linux/realtek/dts-5.10/rtl838x.dtsi b/target/linux/realtek/dts-5.10/rtl838x.dtsi
index 64e13e1ff37a..a953db7c328b 100644
--- a/target/linux/realtek/dts-5.10/rtl838x.dtsi
+++ b/target/linux/realtek/dts-5.10/rtl838x.dtsi
@@ -226,33 +226,22 @@
 		};
 	};
 
-	pinmux: pinmux at 1b001000 {
-		compatible = "pinctrl-single";
-		reg = <0x1b001000 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 0x10 0x10>;
-		};
-	};
-
-	/* LED_GLB_CTRL */
-	pinmux_led: pinmux at 1b00a000 {
-		compatible = "pinctrl-single";
-		reg = <0x1b00a000 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 0x8000>;
+	switchcore: switchcore-bus at 1b000000 {
+		compatible = "realtek,maple-switchcore", "syscon";
+		reg = <0x1b000000 0x10000>;
+
+		pinctrl {
+			compatible = "realtek,maple-pinctrl";
+
+			pinmux_disable_sys_led: pinmux-sys-led-gpio {
+				groups = "sys-led";
+				function = "gpio";
+			};
+
+			enable_uart1: pinmux-uart1 {
+				groups = "uart1";
+				function = "uart1";
+			};
 		};
 	};
 
-- 
2.38.1




More information about the openwrt-devel mailing list