[PATCH v1 3/5] realtek: add sys-led disable pinctrl for rtl931x

Birger Koblitz mail at birger-koblitz.de
Tue Jun 7 01:15:43 PDT 2022


Hi,

has anyone tested that??? This does not make sense at all, there is no LED disable
in the LED_GLB_CTRL register. Instead one needs to use RTL9310_MAC_L2_GLOBAL_CTRL2

The following works nicely on the XS1930 and Edgecore:

	pinmux: pinmux at 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>;
		};

		pinmux_disable_sys_led: disable_sys_led {
			pinctrl-single,bits = <0x0 0x0 0x100>;
		};
	};

Cheers,
  Birger

On 07.06.22 09:50, Sander Vanheule wrote:
> Like for RTL838x devices, add a pinctrl-single node to manage the
> sys-led/gpio0 mux, and allow using the pin as GPIO.
> 
> Signed-off-by: Sander Vanheule <sander at svanheule.net>
> ---
>  target/linux/realtek/dts-5.10/rtl931x.dtsi | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/target/linux/realtek/dts-5.10/rtl931x.dtsi b/target/linux/realtek/dts-5.10/rtl931x.dtsi
> index 29aee1f7b268..f4e2fd248f7e 100644
> --- a/target/linux/realtek/dts-5.10/rtl931x.dtsi
> +++ b/target/linux/realtek/dts-5.10/rtl931x.dtsi
> @@ -155,6 +155,20 @@
>  		};
>  	};
>  
> +	pinmux_led: pinmux at 1b000600 {
> +		compatible = "pinctrl-single";
> +		reg = <0x1b000600 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 0x3000 0x3000>;
> +		};
> +	};
>  
>  	ethernet0: ethernet at 1b00a300 {
>  		status = "okay";



More information about the openwrt-devel mailing list