This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM62X: Use the mmc2 ports to connect to sdmmc,uboot cannot detect the SD card

Part Number: PROCESSOR-SDK-AM62X
Other Parts Discussed in Thread: AM625, SK-AM62

Hi TI Team,

We are going to use AM625 SoC in our custom device, ti-processor-sdk-linux-am62xx-evm-09.00.00.03 as SDK.

We modified k3-am625-sk.dts with reference to mmc1 and used the mmc2 ports to connect to sdmmc, but a problem occurred that no card present.

=> mmc list                                                                     
mmc@fa20000: 2                                                                  
=> mmc dev 2                                                                    
MMC: no card present 

Specifically k3-am625-sk.dts is modified as follows

aliases {
+       mmc2 = &sdhci2;
}

vdd_mmc2: regulator-3 {
		compatible = "regulator-fixed";
		regulator-name = "vdd_mmc2";
		pinctrl-names = "default";
		pinctrl-0 = <&sd_en_pins_default>;
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-boot-on;
		enable-active-high;
		vin-supply = <&vcc_3v3_sys>;
		gpio = <&main_gpio0 63 GPIO_ACTIVE_LOW>;
};

sd_en_pins_default:sd-en-default-pins {
		pinctrl-single,pins = <
			AM62X_IOPAD(0x0100, PIN_OUTPUT, 7) /* (AC25) VOUT0_VSYNC.GPIO0_63 */
		>;
};

mymmc21_pins_default: mymmc21-default-pins {
		pinctrl-single,pins = <
			AM62X_IOPAD(0x0120, PIN_INPUT_PULLUP, 0) /* (C24) MMC2_CMD */
			AM62X_IOPAD(0x0118, PIN_OUTPUT_PULLUP, 0) /* (D25) MMC2_CLK */
			AM62X_IOPAD(0x011C, PIN_INPUT, 0) /* () MMC2_CLKLB */
			AM62X_IOPAD(0x0114, PIN_INPUT_PULLUP, 0) /* (B24) MMC2_DAT0 */
			AM62X_IOPAD(0x0110, PIN_INPUT_PULLUP, 0) /* (C25) MMC2_DAT1 */
			AM62X_IOPAD(0x010c, PIN_INPUT, 0) /* (E23) MMC2_DAT2 */
			AM62X_IOPAD(0x0108, PIN_INPUT, 0) /* (D24) MMC2_DAT3 */
		>;
};

&sdhci2 {
	status = "okay";
	vmmc-supply = <&vdd_mmc2>;
	pinctrl-names = "default";
	pinctrl-0 = <&mymmc21_pins_default>;
	ti,driver-strength-ohm = <50>;
	disable-wp;
};

Related Schematic Diagrams as follows,(Q605)RE1C002ZPMGTL is P-channel mosfet.

Whether or not these changes are wrong,or continue to change the devicetree and deconfig?

Thanks in advance.

  • Hello Long,
    Have we checked if the new mmc is listed from running "dm tree" @u-boot prompt?
    Best,
    -Hong

  • Hello Hong

    => dm tree
     Class     Index  Probed  Driver                Name
    -----------------------------------------------------------
     root          0  [ + ]   root_driver           root_driver
     rsa_mod_ex    0  [   ]   mod_exp_sw            |-- mod_exp_sw
     simple_bus    0  [ + ]   simple_bus            |-- bus@f0000
     simple_bus    1  [   ]   simple_bus            |   |-- bus@4000000
     pinctrl       0  [   ]   single-pinctrl        |   |   |-- pinctrl@4084000
     gpio          0  [   ]   ti_dm6441_gpio        |   |   |-- gpio@4201000
     remoteproc    0  [   ]   k3_m4                 |   |   `-- m4fss@5000000
     simple_bus    2  [ + ]   simple_bus            |   |-- bus@2b000000
     syscon        0  [ + ]   syscon                |   |   `-- syscon@43000000
     soc           0  [ + ]   soc_ti_k3             |   |       `-- chipid@14
     syscon        1  [   ]   syscon                |   |-- syscon@100000
     syscon        2  [   ]   syscon                |   |   |-- clock@4130
     syscon        3  [   ]   syscon                |   |   `-- dss-oldi-io-ctrl@8600
     simple_bus    3  [ + ]   simple_bus            |   |-- bus@48000000
     mailbox       0  [ + ]   k3-secure-proxy       |   |   |-- mailbox@4d000000
     dma           0  [   ]   ti-udma               |   |   |-- dma-controller@485c0100
     dma           1  [   ]   ti-udma               |   |   `-- dma-controller@485c0000
     firmware      0  [ + ]   ti_sci                |   |-- system-controller@44043000
     power_doma    0  [ + ]   ti-sci-pm-domains     |   |   |-- power-controller
     clk           0  [ + ]   ti-sci-clk            |   |   |-- clock-controller
     reset         0  [   ]   ti-sci-reset          |   |   |-- reset-controller
     sysreset      0  [   ]   ti-sci-sysreset       |   |   `-- sysreset-controller
     pinctrl       1  [ + ]   single-pinctrl        |   |-- pinctrl@f4000
     pinconfig     0  [ + ]   pinconfig             |   |   |-- main-uart0-pins-default
     pinconfig     1  [ + ]   pinconfig             |   |   |-- main-i2c0-pins-default
     pinconfig     2  [   ]   pinconfig             |   |   |-- main-i2c1-pins-default
     pinconfig     3  [   ]   pinconfig             |   |   |-- main-i2c2-pins-default
     pinconfig     4  [   ]   pinconfig             |   |   |-- main-mmc0-pins-default
     pinconfig     5  [   ]   pinconfig             |   |   |-- main-mmc1-pins-default
     pinconfig     6  [   ]   pinconfig             |   |   |-- usr-led-pins-default
     pinconfig     7  [   ]   pinconfig             |   |   |-- main-mdio1-pins-default
     pinconfig     8  [   ]   pinconfig             |   |   |-- main-rgmii1-pins-default
     pinconfig     9  [   ]   pinconfig             |   |   |-- main-rgmii2-pins-default
     pinconfig    10  [   ]   pinconfig             |   |   |-- ospi0-pins-default
     pinconfig    11  [   ]   pinconfig             |   |   |-- vdd-sd-dv-pins-default
     pinconfig    12  [   ]   pinconfig             |   |   |-- main-gpio1-ioexp-intr-pins-default
     pinconfig    13  [ + ]   pinconfig             |   |   |-- main-usb1-pins-default
     pinconfig    14  [   ]   pinconfig             |   |   |-- main-dss0-pins-default
     pinconfig    15  [   ]   pinconfig             |   |   |-- gpio0-default-pins
     pinconfig    16  [   ]   pinconfig             |   |   |-- sd-en-default-pins
     pinconfig    17  [   ]   pinconfig             |   |   |-- gpio1-default-pins
     pinconfig    18  [   ]   pinconfig             |   |   |-- mcasp0-default-pins
     pinconfig    19  [   ]   pinconfig             |   |   |-- mcasp1-default-pins
     pinconfig    20  [   ]   pinconfig             |   |   |-- mcasp2-default-pins
     pinconfig    21  [ + ]   pinconfig             |   |   |-- mymmc21-default-pins
     pinconfig    22  [   ]   pinconfig             |   |   |-- qspi0-default-pins
     pinconfig    23  [   ]   pinconfig             |   |   |-- spi0-default-pins
     pinconfig    24  [   ]   pinconfig             |   |   |-- spi1-default-pins
     pinconfig    25  [   ]   pinconfig             |   |   |-- pps-default-pins
     pinconfig    26  [   ]   pinconfig             |   |   |-- clk-default-pins
     pinconfig    27  [   ]   pinconfig             |   |   |-- uart5-default-pins
     pinconfig    28  [   ]   pinconfig             |   |   |-- uart2-default-pins
     pinconfig    29  [   ]   pinconfig             |   |   |-- uart3-default-pins
     pinconfig    30  [   ]   pinconfig             |   |   |-- uart4-default-pins
     pinconfig    31  [   ]   pinconfig             |   |   `-- usb-default-pins
     serial        0  [ + ]   omap_serial           |   |-- serial@2800000
     i2c           0  [ + ]   i2c_omap              |   |-- i2c@20000000
     gpio          1  [   ]   ti_dm6441_gpio        |   |-- gpio@600000
     gpio          2  [   ]   ti_dm6441_gpio        |   |-- gpio@601000
     mmc           0  [ + ]   am654_sdhci           |   |-- mmc@fa20000
     blk           0  [   ]   mmc_blk               |   |   |-- mmc@fa20000.blk
     bootdev       0  [   ]   mmc_bootdev           |   |   `-- mmc@fa20000.bootdev
     simple_bus    4  [   ]   dwc3-am62             |   |-- dwc3-usb@f900000
     usb           0  [   ]   dwc3-generic-periphe  |   |   `-- usb@31000000
     simple_bus    5  [ + ]   dwc3-am62             |   |-- dwc3-usb@f910000
     usb           0  [ + ]   dwc3-generic-host     |   |   `-- usb@31100000
     usb_hub       0  [ + ]   usb_hub               |   |       `-- usb_hub
     simple_bus    6  [   ]   simple_bus            |   `-- bus@fc00000
     spi           0  [   ]   cadence_spi           |       `-- spi@fc40000
     spi_flash     0  [   ]   jedec_spi_nor         |           `-- flash@0
     regulator     0  [   ]   regulator_fixed       |-- regulator-0
     regulator     1  [   ]   regulator_fixed       |-- regulator-1
     regulator     2  [   ]   regulator_fixed       |-- regulator-2
     regulator     3  [   ]   regulator_fixed       |-- regulator-3
     firmware      1  [   ]   psci                  |-- psci
     bootstd       0  [   ]   bootstd_drv           `-- bootstd
     bootmeth      0  [   ]   bootmeth_distro           |-- distro
     bootmeth      1  [   ]   bootmeth_efi              |-- efi
     bootmeth      2  [   ]   bootmeth_pxe              |-- pxe
     bootmeth      3  [   ]   vbe_simple                `-- vbe_simple

    Thanks!

  • Hello Long,
    Do we have MMC2_SDCD pin connected on your board?
    e.g. on SK-AM62 board (www.ti.com/.../SK-AM62B)
    - Search for "MMC1_SDCD" in SK-AM62 schematics on how "MMC1_SDCD" is connected.
    - "MMC1_SDCD" configuration in MMC1 node for SK-AM62 board
    https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/arch/arm/dts/k3-am625-sk.dts?h=09.01.00.008#n264
    https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/arch/arm/dts/k3-am625-sk.dts?h=09.01.00.008#n449

    Some options for you:
    1. Connect/configure "MMC2_SDCD" for your board as for "MMC1_SDCD" on TI SK-AM62
    2. Alternatively, try adding "broken-cd" to MMC2 DT node
    https://www.kernel.org/doc/Documentation/devicetree/bindings/mmc/mmc-controller.yaml
    Best,
    -Hong

  • Hello Hong,

    I check and find that there is no "MMC2_SDCD" connected to our board, I'll connect  "MMC2_SDCD" and test  again.

    Thanks