diff mbox series

[U-Boot] rk3188/rock_defconfig sdmmc failures

Message ID 20170905225038.GA89171@gmail.com
State Not Applicable
Delegated to: Philipp Tomsich
Headers show
Series [U-Boot] rk3188/rock_defconfig sdmmc failures | expand

Commit Message

Artturi Alm Sept. 5, 2017, 10:50 p.m. UTC
Hi,

i'd like to get U-Boot working on rockchip/rk3188(rock_defconfig).
current as-is:

U-Boot SPL 2017.09-rc4-00009-ga0e80c9 (Sep 05 2017 - 23:47:57)
Returning to boot ROM...


U-Boot 2017.09-rc4-00009-ga0e80c9 (Sep 05 2017 - 23:47:57 +0300)

Model: Radxa Rock
DRAM:  2 GiB
MMC:   
MMC Device 0 not found
*** Warning - No MMC card found, using default environment

In:    serial@20064000
Out:   serial@20064000
Err:   serial@20064000
Model: Radxa Rock
Net:   Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot:  0 
No MMC device available
No MMC device available
No ethernet found.
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-rockchip
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default
No ethernet found.
Config file not found
No ethernet found.
No ethernet found.
=> mmc rescan
No MMC device available
=> usb
Unknown command 'usb' - try 'help'
=> 

So, being optimistic, i added compatible found from arch/arm/dts/rk3xxx.dtsi,
included by rk3188:


And it built w/no errors, but apparently dwmmc probe does fail w/-22:

U-Boot SPL 2017.09-rc4-00010-g1d12cc7 (Sep 06 2017 - 00:47:27)
Returning to boot ROM...


U-Boot 2017.09-rc4-00010-g1d12cc7 (Sep 06 2017 - 00:47:27 +0300)

Model: Radxa Rock
DRAM:  2 GiB
MMC:   dwmmc@10214000 - probe failed: -22

*** Warning - No MMC card found, using default environment

In:    serial@20064000
Out:   serial@20064000
Err:   serial@20064000
Model: Radxa Rock
Net:   Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot:  0 
no mmc device at slot 0
MMC Device 1 not found
no mmc device at slot 1
No ethernet found.
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-rockchip
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default
No ethernet found.
Config file not found
No ethernet found.
No ethernet found.
=> mmc rescan
no mmc device at slot 0
=> mmc list

=> 


now i've "successfully" enabled usb, but it took like +30tries
w/"usb reset" until the host ports succesfully found my usb mass storage,
and sometimes it leaves the dwc2 otg controller in a state where
"usb tree" will fault while printing out, and reset the board, so i'd
rather have sdmmc working for now instead, as it is enabled already in
the default config for the board.

Anyone w/clues about what's broken/missing? or patches for me to try?

-Artturi

Comments

Heiko Stübner Sept. 5, 2017, 11:13 p.m. UTC | #1
Hi Artturi,

Am Mittwoch, 6. September 2017, 01:50:38 CEST schrieb Artturi Alm:
> So, being optimistic, i added compatible found from
> arch/arm/dts/rk3xxx.dtsi, included by rk3188:
> 
> diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c
> index e7fcf89..a879fcd 100644
> --- a/drivers/mmc/rockchip_dw_mmc.c
> +++ b/drivers/mmc/rockchip_dw_mmc.c
> @@ -160,6 +160,7 @@ static int rockchip_dwmmc_bind(struct udevice *dev)
> 
>  static const struct udevice_id rockchip_dwmmc_ids[] = {
>         { .compatible = "rockchip,rk3288-dw-mshc" },
> +       { .compatible = "rockchip,rk2928-dw-mshc" },
>         { }
>  };

The rk3188 SPL is using OF_PLATDATA which transforms the devicetree entry
into a struct during compilation to save space in the image.
Relevant to this would be the U_BOOT_DRIVER below that compatibles, which
currently binds to the rockchip_rk3288_dw_mshc transformed compatible.

Adding a second U_BOOT_DRIVER entry there might help for the probing,
but seeing that the dw-mmc in the Linux kernel behaves differently for
rk3188 and rk3288 onwards, I'm not sure if it would work out of the box.

[...]

> now i've "successfully" enabled usb, but it took like +30tries
> w/"usb reset" until the host ports succesfully found my usb mass storage,
> and sometimes it leaves the dwc2 otg controller in a state where
> "usb tree" will fault while printing out, and reset the board, so i'd
> rather have sdmmc working for now instead, as it is enabled already in
> the default config for the board.

For usb you might want to make sure the usb host regulator is enabled
I have the below commands in my netboot uboot for the rock and it is
working quite reliable and so far I haven't seen usb-related issues there.

regulator dev host-pwr;
regulator enable;
usb start;


Hope that helps a bit
Heiko
diff mbox series

Patch

diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c
index e7fcf89..a879fcd 100644
--- a/drivers/mmc/rockchip_dw_mmc.c
+++ b/drivers/mmc/rockchip_dw_mmc.c
@@ -160,6 +160,7 @@  static int rockchip_dwmmc_bind(struct udevice *dev)
 
 static const struct udevice_id rockchip_dwmmc_ids[] = {
        { .compatible = "rockchip,rk3288-dw-mshc" },
+       { .compatible = "rockchip,rk2928-dw-mshc" },
        { }
 };