[RFC PATCH 5/7] realtek: rtl838x: replace pinctrl-single

Olliver Schinagl oliver at schinagl.nl
Fri Jul 29 05:58:36 PDT 2022


On 16-07-2022 21:09, Sander Vanheule wrote:
> Replace the pinctrl-single node with the dedicated pinctrl driver for
> RTL838x SoCs. The node names are kept to stay compatible with existing
> references.
>
> Signed-off-by: Sander Vanheule <sander at svanheule.net>
> ---
>   target/linux/realtek/dts-5.10/rtl838x.dtsi | 38 ++++++++++------------
>   1 file changed, 17 insertions(+), 21 deletions(-)
>
> diff --git a/target/linux/realtek/dts-5.10/rtl838x.dtsi b/target/linux/realtek/dts-5.10/rtl838x.dtsi
> index 11cabc3f63cb..6aac2be95368 100644
> --- a/target/linux/realtek/dts-5.10/rtl838x.dtsi
> +++ b/target/linux/realtek/dts-5.10/rtl838x.dtsi
> @@ -169,33 +169,29 @@
>   		};
>   	};
>   
> -	pinmux: pinmux at 1b001000 {
> -		compatible = "pinctrl-single";
> -		reg = <0x1b001000 0x4>;
> +	switchcore: switchcore-bus at 1b000000 {
> +		compatible = "realtek,rtl8380-switchcore", "syscon";
> +		reg = <0x1b000000 0x10000>;
>   
> -		pinctrl-single,bit-per-mux;
> -		pinctrl-single,register-width = <32>;
> -		pinctrl-single,function-mask = <0x1>;
> -		#pinctrl-cells = <2>;
> +		hw_led_sys: led-sys {
> +			status = "disabled";
>   
> -		enable_uart1: pinmux_enable_uart1 {
> -			pinctrl-single,bits = <0x0 0x10 0x10>;
> +			label = "green:status";
>   		};
> -	};
>   
> -	/* LED_GLB_CTRL */
> -	pinmux_led: pinmux at 1b00a000 {
> -		compatible = "pinctrl-single";
> -		reg = <0x1b00a000 0x4>;
> +		pinctrl {
> +			compatible = "realtek,rtl8380-pinctrl";
>   
> -		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: sys-led-mux {
> +				groups = "sys-led";
> +				function = "gpio";
> +			};
with your changes, why not use the hw function?
>   
> -		/* enable GPIO 0 */
> -		pinmux_disable_sys_led: disable_sys_led {
> -			pinctrl-single,bits = <0x0 0x0 0x8000>;
> +			enable_uart1: uart1-mux {
&enable_uart1 { status=disabled }; reads weird though :p
> +				groups = "uart1";
> +				function = "uart1";
> +			};
>   		};
>   	};
>   
>




More information about the openwrt-devel mailing list