lkml.org 
[lkml]   [2019]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH 3/3] arm64: dts: rockchip: fix Roc kPro64 sdmmc settings【请注意,邮件由lin ux-rockchip-bounces+shawn.lin= =?UTF-8?B?YWRlYWQub3Jn5Luj5Y+
From
Date


On 04.10.19 04:13, Shawn Lin wrote:
> On 2019/10/4 8:53, Soeren Moch wrote:
>>
>>
>> On 04.10.19 02:01, Robin Murphy wrote:
>>> On 2019-10-03 10:50 pm, Soeren Moch wrote:
>>>> According to the RockPro64 schematic [1] the rk3399 sdmmc
>>>> controller is
>>>> connected to a microSD (TF card) slot, which cannot be switched to
>>>> 1.8V.
>>>
>>> Really? AFAICS the SDMMC0 wiring looks pretty much identical to the
>>> NanoPC-T4 schematic (it's the same reference design, after all), and I
>>> know that board can happily drive a UHS-I microSD card with 1.8v I/Os,
>>> because mine's doing so right now.
>>>
>>> Robin.
>> OK, the RockPro64 does not allow a card reset (power cycle) since
>> VCC3V0_SD is directly connected to VCC3V3_SYS (via R89555), the
>> SDMMC0_PWH_H signal is not connected. So the card fails to identify
>> itself after suspend or reboot when switched to 1.8V operation.
>>
>
> I believe we addressed this issue long time ago, please check:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6a11fc47f175c8d87018e89cb58e2d36c66534cb
>
Thanks for the pointer.
In this case I guess I should use following patch instead:

--- rk3399-rockpro64.dts.bak    2019-10-03 22:14:00.067745799 +0200
+++ rk3399-rockpro64.dts    2019-10-04 00:02:50.047892366 +0200
@@ -619,6 +619,8 @@
     max-frequency = <150000000>;
     pinctrl-names = "default";
     pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
+    sd-uhs-sdr104;
+    vqmmc-supply = <&vcc_sdio>;
     status = "okay";
 };
 
When I do so, the sd card is detected as SDR104, but a reboot hangs:

Boot1: 2018-06-26, version: 1.14
CPUId = 0x0
ChipType = 0x10, 286
Spi_ChipId = c84018
no find rkpartition
SpiBootInit:ffffffff
mmc: ERROR: SDHCI ERR:cmd:0x102,stat:0x18000
mmc: ERROR: Card did not respond to voltage select!
emmc reinit
mmc: ERROR: SDHCI ERR:cmd:0x102,stat:0x18000
mmc: ERROR: Card did not respond to voltage select!
emmc reinit
mmc: ERROR: SDHCI ERR:cmd:0x102,stat:0x18000
mmc: ERROR: Card did not respond to voltage select!
SdmmcInit=2 1
mmc0:cmd5,32
mmc0:cmd7,32
mmc0:cmd5,32
mmc0:cmd7,32
mmc0:cmd5,32
mmc0:cmd7,32
SdmmcInit=0 1

So I guess I should use a different miniloader for this reboot to work!?
Or what else could be wrong here?

Thanks,
Soeren

>> Regards,
>> Soeren
>>>
>>>> So also configure the vcc_sdio regulator, which drives the i/o voltage
>>>> of the sdmmc controller, accordingly.
>>>>
>>>> While at it, also remove the cap-mmc-highspeed property of the sdmmc
>>>> controller, since no mmc card can be connected here.
>>>>
>>>> [1] http://files.pine64.org/doc/rockpro64/rockpro64_v21-SCH.pdf
>>>>
>>>> Fixes: e4f3fb490967 ("arm64: dts: rockchip: add initial dts support
>>>> for Rockpro64")
>>>> Signed-off-by: Soeren Moch <smoch@web.de>
>>>> ---
>>>> Cc: Heiko Stuebner <heiko@sntech.de>
>>>> Cc: linux-rockchip@lists.infradead.org
>>>> Cc: linux-arm-kernel@lists.infradead.org
>>>> Cc: linux-kernel@vger.kernel.org
>>>> ---
>>>>    arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts | 3 +--
>>>>    1 file changed, 1 insertion(+), 2 deletions(-)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
>>>> b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
>>>> index 2e44dae4865a..084f1d994a50 100644
>>>> --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
>>>> +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
>>>> @@ -353,7 +353,7 @@
>>>>                    regulator-name = "vcc_sdio";
>>>>                    regulator-always-on;
>>>>                    regulator-boot-on;
>>>> -                regulator-min-microvolt = <1800000>;
>>>> +                regulator-min-microvolt = <3000000>;
>>>>                    regulator-max-microvolt = <3000000>;
>>>>                    regulator-state-mem {
>>>>                        regulator-on-in-suspend;
>>>> @@ -624,7 +624,6 @@
>>>>
>>>>    &sdmmc {
>>>>        bus-width = <4>;
>>>> -    cap-mmc-highspeed;
>>>>        cap-sd-highspeed;
>>>>        cd-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
>>>>        disable-wp;
>>>> -- 
>>>> 2.17.1
>>>>
>>>>
>>>> _______________________________________________
>>>> Linux-rockchip mailing list
>>>> Linux-rockchip@lists.infradead.org
>>>> http://lists.infradead.org/mailman/listinfo/linux-rockchip
>>>>
>>
>> _______________________________________________
>> Linux-rockchip mailing list
>> Linux-rockchip@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-rockchip
>>
>
>

\
 
 \ /
  Last update: 2019-10-04 05:40    [W:0.111 / U:2.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site