imx7dsabresd fsl yocto 4.9.88 usdhc fails with error -16 ( 2nd sd-card )

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx7dsabresd fsl yocto 4.9.88 usdhc fails with error -16 ( 2nd sd-card )

Jump to solution
1,011 Views
edwardtyrrell
Senior Contributor I

Hi, 


We're using the latest recommended FSL Yocto release ( document NXP Rev. L4.9.88_2.0.0-ga, 05/2018 ) Rocko ( kernel 4.9.88 ) on a custom iMx7d board and are getting an error -16 when probing usdhc2 ( esdhc controller 30b50000 )

This board is a known working board, eMMC works on usdhc3, 1DX BT/WiFi module on usdhc1 and the sd card slot on usdhc2. If we use the Krogoth 4.1 kernel then everything works fine; but the kernel is too old for our requirements.

Using the newer 4.9.88 BSP the sd-card slot usdhc2 fails on probing ( eMMC works fine ). The device tree changes are very basic and are tried and tested on the earlier 4.1 kernel. Same failure if booted with card in or out.

[ 2nd sd-card slot settings, fine on 4.1 kernel, fails on 4.9.88 kernel ] 

&usdhc2 {
pinctrl-names = "default", "state_100mhz", "state_200mhz";
pinctrl-0 = <&pinctrl_usdhc2>;
pinctrl-1 = <&pinctrl_usdhc2_100mhz>;
pinctrl-2 = <&pinctrl_usdhc2_200mhz>;
/* MX7D_PAD_SD2_CD_B__GPIO5_IO9 */
cd-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
/* MX7D_PAD_SD2_WP__GPIO5_IO10 */
wp-gpios = <&gpio5 10 GPIO_ACTIVE_HIGH>;

bus-width = <4>;
removable;
wakeup-source;
// vmmc-supply = <&reg_sd1_vmmc>;
enable-sdio-wakeup;
keep-power-in-suspend;
status = "okay";
};

   

Booting with kernel sdhc debug on offers no extra insight; I get the following:

sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
usbcore: registered new interface driver ushc
sdhci-pltfm: SDHCI platform and OF driver helper
sdhci-esdhc-imx: probe of 30b50000.usdhc failed with error -16                        <== 2nd sd card slot fails

mmc0: SDHCI controller on 30b60000.usdhc [30b60000.usdhc] using ADMA   <== eMMC good

One forum mentioned an aliases { mmc2 = &usdhc2; } problem with 4.9 kernels but this didn't do anything, bear in mind the eMMC is found on usdhc3 alright... 

To summarize; known board, dtb settings work with 4.1 kernel but fail when used with the 4.9.88 kernel. 

  Thanks.  

0 Kudos
1 Solution
884 Views
edwardtyrrell
Senior Contributor I

Fixed, a pin grabbed by the touchscreen in the dtb hogged the pin needed by the ushdc2.

View solution in original post

0 Kudos
1 Reply
885 Views
edwardtyrrell
Senior Contributor I

Fixed, a pin grabbed by the touchscreen in the dtb hogged the pin needed by the ushdc2.

0 Kudos