diff mbox series

[v2,3/5] realtek: add sys-led disable pinctrl for rtl931x

Message ID e7b1f1456b20e45159548746dbc6eee609fbddb1.1654594890.git.sander@svanheule.net
State Superseded
Delegated to: Sander Vanheule
Headers show
Series None | expand

Commit Message

Sander Vanheule June 7, 2022, 9:48 a.m. UTC
Add a pinctrl-single node to manage the sys-led mux and JTAG mux.
This allows using the associated pins as GPIOs:
  - sys-led: GPIO0
  - JTAG: GPIO6, GPIO7, others unknown (TDO, TDI, TMS, TCK /TRST)

Suggested-by: Birger Koblitz <mail@birger-koblitz.de>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
---
 target/linux/realtek/dts-5.10/rtl931x.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

Comments

Sander Vanheule June 7, 2022, 9:57 a.m. UTC | #1
On Tue, 2022-06-07 at 11:48 +0200, Sander Vanheule wrote:
> Add a pinctrl-single node to manage the sys-led mux and JTAG mux.
> This allows using the associated pins as GPIOs:
>   - sys-led: GPIO0
>   - JTAG: GPIO6, GPIO7, others unknown (TDO, TDI, TMS, TCK /TRST)
> 
> Suggested-by: Birger Koblitz <mail@birger-koblitz.de>
> Signed-off-by: Sander Vanheule <sander@svanheule.net>
> ---

Oops, an old version snuck into the series. You can ingore this patch.

Best,
Sander
diff mbox series

Patch

diff --git a/target/linux/realtek/dts-5.10/rtl931x.dtsi b/target/linux/realtek/dts-5.10/rtl931x.dtsi
index 29aee1f7b268..a5166141e6fd 100644
--- a/target/linux/realtek/dts-5.10/rtl931x.dtsi
+++ b/target/linux/realtek/dts-5.10/rtl931x.dtsi
@@ -155,6 +155,25 @@ 
 		};
 	};
 
+	pinmux: pinmux@1b001358 {
+		compatible = "pinctrl-single";
+		reg = <0x1b001358 0x4>;
+
+		pinctrl-single,bit-per-mux;
+		pinctrl-single,register-width = <32>;
+		pinctrl-single,function-mask = <0x1>;
+		#pinctrl-cells = <2>;
+
+		/* Enable GPIO6 and GPIO7, possibly unknown others */
+		pinmux_disable_jtag: disable_jtag {
+			pinctrl-single,bits = <0x0 0x0 0x8000>;
+		};
+
+		/* Controls GPIO0 */
+		pinmux_disable_sys_led: disable_sys_led {
+			pinctrl-single,bits = <0x0 0x0 0x100>;
+		};
+	};
 
 	ethernet0: ethernet@1b00a300 {
 		status = "okay";