]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: dts: rtl930x: add pinctrl and pinmux for UART1
authorJonas Jelonek <jelonek.jonas@gmail.com>
Thu, 30 Apr 2026 21:32:29 +0000 (21:32 +0000)
committerRobert Marko <robimarko@gmail.com>
Mon, 11 May 2026 08:34:53 +0000 (10:34 +0200)
RTL930x SoCs have a second serial interface UART1 which is exposed on
dual-function pins shared with JTAG. The SoC defaults to the JTAG
functionality after reset. Similar to existing pinmux registers, there's
a separate register for that where a selector decides about JTAG vs
UART.

Add a now pinctrl node for that register and a pinmux node to enable
UART1 functionality. Reference the pinmux in the (by default disabled)
uart1 node. Without this, UART1 doesn't work when it is actually needed.
This is e.g. the case with some PoE-capable switch where the PSE MCU
communicates with the SoC via UART instead of I2C.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23218
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/dts/rtl930x.dtsi

index ebc121523a2e42cc59540d27c559e90571496a76..3096c78d8d85d4f50520f964b80c44e0dbd92689 100644 (file)
                        fifo-size = <1>;
                        no-loopback-test;
 
+                       pinctrl-0 = <&pinmux_enable_uart1>;
+                       pinctrl-names = "default";
+
                        status = "disabled";
                };
 
                };
        };
 
+       pinmux@1b000204 {
+               compatible = "pinctrl-single";
+               reg = <0x1b000204 0x4>;
+
+               pinctrl-single,bit-per-mux;
+               pinctrl-single,register-width = <32>;
+               pinctrl-single,function-mask = <0x1>;
+               #pinctrl-cells = <2>;
+
+               pinmux_enable_uart1: enable-uart1 {
+                       pinctrl-single,bits = <0x0 0x1 0x3>;
+               };
+       };
+
        pinmux@1b00c600 {
                compatible = "pinctrl-single";
                reg = <0x1b00c600 0x4>;