From: Paul Kocialkowski Date: Thu, 26 Sep 2024 18:31:08 +0000 (+0200) Subject: rockchip: rk3399-roc-pc: Hook sysreset gpio to enable full reset X-Git-Tag: v2025.04-rc1~66^2~46 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7882f556efb11f00fbb93ce13ef2df297b6b1c7;p=pandora-u-boot.git rockchip: rk3399-roc-pc: Hook sysreset gpio to enable full reset The reset mechanism used by Linux to reset the SoC is known to only partially reset the logic. A mechanism is implemented in rk3399_force_power_on_reset to use a GPIO connected to the PMIC's over-temperature (OTP) reset pin, which fully resets all logic. Hook the associated GPIO where the function expects it to enable this reset mechanism and avoid any possible side-effect of partially-reset units. Without this patch, reading from the micro sd slot fails after a reset. With this mechanism, U-Boot is able to boot from it reliably. Signed-off-by: Paul Kocialkowski Reviewed-by: Quentin Schulz --- diff --git a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi index aecf7dbe383..883d399a06a 100644 --- a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi +++ b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi @@ -7,6 +7,10 @@ #include "rk3399-sdram-lpddr4-100.dtsi" / { + config { + sysreset-gpio = <&gpio1 RK_PA6 GPIO_ACTIVE_HIGH>; + }; + vcc_hub_en: vcc_hub_en-regulator { compatible = "regulator-fixed"; enable-active-high; @@ -36,6 +40,10 @@ bootph-pre-ram; }; +&gpio1 { + bootph-pre-ram; +}; + &spi1 { flash@0 { bootph-pre-ram;