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>
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>;