diff mbox series

arm64: dts: rockchip: include uhs support for rockpro64

Message ID CWXP265MB2680938B222248792AC205F9C4419@CWXP265MB2680.GBRP265.PROD.OUTLOOK.COM (mailing list archive)
State New, archived
Headers show
Series arm64: dts: rockchip: include uhs support for rockpro64 | expand

Commit Message

Christian Loehle April 27, 2021, 6:20 a.m. UTC
The DesignWare Host Controller has full UHS-I support, so use it.

Signed-off-by: Christian Loehle <cloehle@hyperstone.com>
---
 arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi | 1 +
 1 file changed, 1 insertion(+)

Comments

Soeren Moch April 27, 2021, 3:07 p.m. UTC | #1
On 27.04.21 08:20, Christian L?hle wrote:
> The DesignWare Host Controller has full UHS-I support, so use it.
Enabling this UHS support makes 'reboot' hang when booting the RockPro64
from SD card. It would work when booting from eMMC, or with a modified
ATF which does a power cycle on reboot.

But for general use it is not save to enable UHS support, or did I miss
some recent changes?

Regards,
Soeren
>
> Signed-off-by: Christian Loehle <cloehle@hyperstone.com>
> ---
>  arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> index 6bff8db7d33e..d22a489ec214 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> @@ -722,6 +722,7 @@ &sdmmc {
>  	max-frequency = <150000000>;
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
> +	sd-uhs-sdr104;
>  	vmmc-supply = <&vcc3v0_sd>;
>  	vqmmc-supply = <&vcc_sdio>;
>  	status = "okay";
Christian Loehle April 28, 2021, 6:28 a.m. UTC | #2
Oh okay, I was not aware of this issue
and have not encountered it yet.
But wouldn't it be more appropriate
to get u-boot to power cycle the host controller at boot?


From: Soeren Moch <smoch@web.de>
Sent: Tuesday, April 27, 2021 5:07 PM
To: Christian Löhle <CLoehle@hyperstone.com>; robh+dt@kernel.org <robh+dt@kernel.org>; heiko@sntech.de <heiko@sntech.de>; jbx6244@gmail.com <jbx6244@gmail.com>; devicetree@vger.kernel.org <devicetree@vger.kernel.org>; linux-arm-kernel@lists.infradead.org <linux-arm-kernel@lists.infradead.org>; linux-rockchip@lists.infradead.org <linux-rockchip@lists.infradead.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] arm64: dts: rockchip: include uhs support for rockpro64 
 
On 27.04.21 08:20, Christian L?hle wrote:
> The DesignWare Host Controller has full UHS-I support, so use it.
Enabling this UHS support makes 'reboot' hang when booting the RockPro64
from SD card. It would work when booting from eMMC, or with a modified
ATF which does a power cycle on reboot.

But for general use it is not save to enable UHS support, or did I miss
some recent changes?

Regards,
Soeren
>
> Signed-off-by: Christian Loehle <cloehle@hyperstone.com>
> ---
>  arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> index 6bff8db7d33e..d22a489ec214 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> @@ -722,6 +722,7 @@ &sdmmc {
>        max-frequency = <150000000>;
>        pinctrl-names = "default";
>        pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
> +     sd-uhs-sdr104;
>        vmmc-supply = <&vcc3v0_sd>;
>        vqmmc-supply = <&vcc_sdio>;
>        status = "okay";

Hyperstone GmbH | Line-Eid-Strasse 3 | 78467 Konstanz
Managing Directors: Dr. Jan Peter Berns.
Commercial register of local courts: Freiburg HRB381782
Soeren Moch April 28, 2021, 8:43 a.m. UTC | #3
On 28.04.21 08:28, Christian Löhle wrote:
> Oh okay, I was not aware of this issue
> and have not encountered it yet.
> But wouldn't it be more appropriate
> to get u-boot to power cycle the host controller at boot?
This is not about power-cycling the host controller. We have to
power-cycle the SD card itself to switch it back to default speed and
3.3V operation. This is the mode the boot ROM expects.

Unfortunately there is no separate power switch for SD card power on
RockPro64. So we have to power-cycle the whole SoC. This obviously
cannot be done easily after reboot in u-boot, but can be done in trusted
firmware (TF-A, was called ATF before) at reboot. This is what I use on
my boards, see the hack in [1]. Rockchip seems to prefer soft reset,
maybe someone from Rockchip can comment on the exact reasons.

Regards,
Soeren


[1] https://github.com/s-moch/arm-trusted-firmware-rockpro64
>
>
> From: Soeren Moch <smoch@web.de>
> Sent: Tuesday, April 27, 2021 5:07 PM
> To: Christian Löhle <CLoehle@hyperstone.com>; robh+dt@kernel.org <robh+dt@kernel.org>; heiko@sntech.de <heiko@sntech.de>; jbx6244@gmail.com <jbx6244@gmail.com>; devicetree@vger.kernel.org <devicetree@vger.kernel.org>; linux-arm-kernel@lists.infradead.org <linux-arm-kernel@lists.infradead.org>; linux-rockchip@lists.infradead.org <linux-rockchip@lists.infradead.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>
> Subject: Re: [PATCH] arm64: dts: rockchip: include uhs support for rockpro64
>  
> On 27.04.21 08:20, Christian L?hle wrote:
>> The DesignWare Host Controller has full UHS-I support, so use it.
> Enabling this UHS support makes 'reboot' hang when booting the RockPro64
> from SD card. It would work when booting from eMMC, or with a modified
> ATF which does a power cycle on reboot.
>
> But for general use it is not save to enable UHS support, or did I miss
> some recent changes?
>
> Regards,
> Soeren
>> Signed-off-by: Christian Loehle <cloehle@hyperstone.com>
>> ---
>>   arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
>> index 6bff8db7d33e..d22a489ec214 100644
>> --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
>> +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
>> @@ -722,6 +722,7 @@ &sdmmc {
>>         max-frequency = <150000000>;
>>         pinctrl-names = "default";
>>         pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
>> +     sd-uhs-sdr104;
>>         vmmc-supply = <&vcc3v0_sd>;
>>         vqmmc-supply = <&vcc_sdio>;
>>         status = "okay";
> Hyperstone GmbH | Line-Eid-Strasse 3 | 78467 Konstanz
> Managing Directors: Dr. Jan Peter Berns.
> Commercial register of local courts: Freiburg HRB381782
>
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
index 6bff8db7d33e..d22a489ec214 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
@@ -722,6 +722,7 @@  &sdmmc {
 	max-frequency = <150000000>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
+	sd-uhs-sdr104;
 	vmmc-supply = <&vcc3v0_sd>;
 	vqmmc-supply = <&vcc_sdio>;
 	status = "okay";