From e9de36484deab02a3c122abd3b4f85b280caf131 Mon Sep 17 00:00:00 2001 From: Jonas Jelonek Date: Thu, 30 Apr 2026 21:32:29 +0000 Subject: [PATCH] realtek: dts: rtl930x: add pinctrl and pinmux for UART1 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 Link: https://github.com/openwrt/openwrt/pull/23218 Signed-off-by: Robert Marko --- target/linux/realtek/dts/rtl930x.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/target/linux/realtek/dts/rtl930x.dtsi b/target/linux/realtek/dts/rtl930x.dtsi index ebc121523a..3096c78d8d 100644 --- a/target/linux/realtek/dts/rtl930x.dtsi +++ b/target/linux/realtek/dts/rtl930x.dtsi @@ -131,6 +131,9 @@ fifo-size = <1>; no-loopback-test; + pinctrl-0 = <&pinmux_enable_uart1>; + pinctrl-names = "default"; + status = "disabled"; }; @@ -337,6 +340,20 @@ }; }; + 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>;