Project

General

Profile

eMMC not enabling on Docker based image buiding

Added by Sandeep Sivadas about 9 hours ago

Hi,

I tried to build am572x image using docker build environment with eMMC enabled. But my image not detecting eMMC.
I have modified the kernel file am57xx-mitysom-baseboard.dtsi as

&mmc2 {
status = "okay";

pinctrl-names = "default";
pinctrl-0 = <&mmc2_pins_default>;
vmmc-supply = <&v3_3d>;
bus-width = <8>;
ti,non-removable;
cap-mmc-dual-data-rate;
};

uboot details are

{GPMC_A8, (M14 | PIN_INPUT_PULLDOWN)},    /* N7 gpmc_a8.gpio1_30 J5.12 */
{GPMC_A9, (M14 | PIN_INPUT_PULLDOWN)},    /* R4 gpmc_a9.gpio1_31 J5.13 */
{GPMC_A10, (M14 | PIN_INPUT_PULLDOWN)},    /* N9 gpmc_a10.gpio2_0 J5.10 */
{GPMC_A11, (M14 | PIN_INPUT_PULLDOWN)},    /* P9 gpmc_a11.gpio2_1 J5.8 */
{GPMC_A12, (M14 | PIN_INPUT_PULLDOWN)},    /* P4 gpmc_a12.gpio2_2 J11.8 */
{GPMC_A13, (M1 | PIN_INPUT | MANUAL_MODE)},    /* R3 gpmc_a13.qspi1_rtclk */
{GPMC_A14, (M1 | PIN_INPUT | MANUAL_MODE)},    /* T2 gpmc_a14.qspi1_d3 */
{GPMC_A15, (M1 | PIN_INPUT | MANUAL_MODE)},    /* U2 gpmc_a15.qspi1_d2 */
{GPMC_A16, (M1 | PIN_INPUT | MANUAL_MODE)},    /* U1 gpmc_a16.qspi1_d0 */
{GPMC_A17, (M1 | PIN_INPUT | MANUAL_MODE)},    /* P3 gpmc_a17.qspi1_d1 */
{GPMC_A18, (M1 | PIN_OUTPUT | MANUAL_MODE)},    /* R2 gpmc_a18.qspi1_sclk */

I am getting eMMC data when kernel buiding separately as given in wiki
https://support.criticallink.com/redmine/projects/mitysom_am57x/wiki/Linux_Kernel

Kindly look in to it.

With regards
Sandeep S


Replies (1)

RE: eMMC not enabling on Docker based image buiding - Added by Jonathan Cormier about 4 hours ago

Which kernel are you using? Can you please share whole boot logs for working and non-working cases.

Note: It doesn't make much sense that a docker build vs a native build would behave that differently. The emmc is all setup in the device tree and the device tree compiler isn't even cross compiling. You should be able to use dtc on your generated dtb files to print the contents of them and then compare the emmc sections to see if they are infact different.

I've also used the fdt-viewer to more easily view a dtb file and double check that specific changes I made, made it into the dtb.

Here is a tested emmc config for the 4.19 kernel.

/* eMMC */
&mmc2 {
>-------status = "okay";

>-------vmmc-supply = <&v3_3d>;
>-------vqmmc-supply = <&v1_8d>;
>-------bus-width = <8>;
>-------ti,non-removable;
>-------non-removable;
>-------// Handle resetting eMMC
>-------// Currently gpio7_6 is not pinmuxed in u-boot, leaving this hear in case it turns out we need this to boot from eMMC
>-------// mmc-pwrseq = <&emmc_pwrseq>;

>-------dmas = <&sdma_xbar 47>, <&sdma_xbar 48>;
>-------dma-names = "tx", "rx";
>-------pinctrl-names = "default", "hs", "ddr_1_8v", "hs200_1_8v";
>-------pinctrl-0 = <&mmc2_pins_default>;
>-------pinctrl-1 = <&mmc2_pins_hs>;
>-------pinctrl-2 = <&mmc2_pins_ddr_rev20>;
>-------pinctrl-3 = <&mmc2_pins_hs200>;
};

Also the pinmux you sent me doesn't make sense. Its setting pins up for gpio and qspi. Those pins also don't have a mmc2 pinmux available.

Here is an example of a working mmc2 pinmux but I don't know which pins you've hooked up your emmc to.

   {GPMC_A19, (M1 | PIN_INPUT_PULLUP)},    /* K7 gpmc_a19.mmc2_dat4 */
   {GPMC_A20, (M1 | PIN_INPUT_PULLUP)},    /* M7 gpmc_a20.mmc2_dat5 */
   {GPMC_A21, (M1 | PIN_INPUT_PULLUP)},    /* J5 gpmc_a21.mmc2_dat6 */
   {GPMC_A22, (M1 | PIN_INPUT_PULLUP)},    /* K6 gpmc_a22.mmc2_dat7 */
   {GPMC_A23, (M1 | PIN_INPUT_PULLUP)},    /* J7 gpmc_a23.mmc2_clk */
   {GPMC_A24, (M1 | PIN_INPUT_PULLUP)},    /* J4 gpmc_a24.mmc2_dat0 */
   {GPMC_A25, (M1 | PIN_INPUT_PULLUP)},    /* J6 gpmc_a25.mmc2_dat1 */
   {GPMC_A26, (M1 | PIN_INPUT_PULLUP)},    /* H4 gpmc_a26.mmc2_dat2 */
   {GPMC_A27, (M1 | PIN_INPUT_PULLUP)},    /* H5 gpmc_a27.mmc2_dat3 */
   {GPMC_CS1, (M1 | PIN_INPUT_PULLUP)},    /* H6 gpmc_cs1.mmc2_cmd */
    (1-1/1)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)