[PATCH] arm64: dts: rockchip: fix nEXTRST on SOQuartz

Heiko Stuebner heiko at sntech.de
Fri Apr 21 04:58:58 PDT 2023


Hi,

Am Mittwoch, 19. April 2023, 19:17:31 CEST schrieb Nicolas Frattaroli:
> diff --git a/arch/arm64/boot/dts/rockchip/rk3566-soquartz.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-soquartz.dtsi
> index ce7165d7f1a1..f589a4fdaccb 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3566-soquartz.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3566-soquartz.dtsi
> @@ -65,6 +65,17 @@ led_work: led-work {
>  		};
>  	};
>  
> +	nextrst_pin: nextrst-pin-regulator {
> +		compatible = "regulator-fixed";
> +		enable-active-high;
> +		gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&nextrst_h>;
> +		regulator-always-on;
> +		regulator-boot-on;
> +		regulator-name = "nextrst";
> +	};
> +

I agree with the sentiment and of course the rationale of the change,
but not necessarily with the implementation ;-) .

Why is this done as a regulator?

If you want the nextrst line to be high, you could just use a gpio-hog
for the line instead of doing a (fake?-)regulator.

For example the px30-ringneck.dtsi does something similar:

&gpio2 {        
        /*      
         * The Qseven BIOS_DISABLE signal on the PX30-µQ7 keeps the on-module
         * eMMC powered-down initially (in fact it keeps the reset signal
         * asserted). BIOS_DISABLE_OVERRIDE pin allows to re-enable eMMC after
         * the SPL has been booted from SD Card.
         */     
        bios-disable-override-hog {
                gpios = <RK_PB5 GPIO_ACTIVE_LOW>;
                output-high;
                line-name = "bios_disable_override";
                gpio-hog;
        };      
...
};


Thanks
Heiko





More information about the linux-arm-kernel mailing list