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.
Tool/software: Linux
we need mmc3 support sd card in am5728 platform base on ti-processor-sdk-linux-am57xx-evm-03.01.00.06,
the patch as attachment, my question is:mmc1/mmc2 can send init cmd from controller,but mmc3 cannot send init cmd,
and i cannot get any waveform from mmc3.
Index: ../source/u-boot-2016.05/arch/arm/dts/am57xx-gf33a1.dts =================================================================== --- ../source/u-boot-2016.05/arch/arm/dts/am57xx-gf33a1.dts (版本 1719) +++ ../source/u-boot-2016.05/arch/arm/dts/am57xx-gf33a1.dts (工作副本) @@ -152,6 +152,27 @@ >; }; + mmc3_pins_default: mmc3_pins_default { + pinctrl-single,pins = < + 0x37c (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc3_clk.mmc3_clk */ + 0x380 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc3_cmd.mmc3_cmd */ + 0x384 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc3_dat0.mmc3_dat0 */ + 0x388 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc3_dat1.mmc3_dat1 */ + 0x38c (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc3_dat2.mmc3_dat2 */ + 0x390 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc3_dat3.mmc3_dat3 */ + >; + }; + + mmc3_pins_hs: mmc3_pins_hs { + pinctrl-single,pins = < + 0x37c (PIN_INPUT_PULLUP |MUX_VIRTUAL_MODE11 | MUX_MODE0) /* mmc3_clk.mmc3_clk */ + 0x380 (PIN_INPUT_PULLUP |MUX_VIRTUAL_MODE11 | MUX_MODE0) /* mmc3_cmd.mmc3_cmd */ + 0x384 (PIN_INPUT_PULLUP |MUX_VIRTUAL_MODE11 | MUX_MODE0) /* mmc3_dat0.mmc3_dat0 */ + 0x388 (PIN_INPUT_PULLUP |MUX_VIRTUAL_MODE11 | MUX_MODE0) /* mmc3_dat1.mmc3_dat1 */ + 0x38c (PIN_INPUT_PULLUP |MUX_VIRTUAL_MODE11 | MUX_MODE0) /* mmc3_dat2.mmc3_dat2 */ + 0x390 (PIN_INPUT_PULLUP |MUX_VIRTUAL_MODE11 | MUX_MODE0) /* mmc3_dat3.mmc3_dat3 */ + >; + }; }; &dra7_iodelay_core { @@ -434,3 +455,15 @@ max-frequency = <96000000>; /delete-property/ mmc-hs200-1_8v; }; + +&mmc3 { + status = "okay"; + + pinctrl-names = "default", "hs"; + pinctrl-0 = <&mmc3_pins_default>; + pinctrl-1 = <&mmc3_pins_hs>; + + vmmc-supply = <&ldo1_reg>; + bus-width = <4>; + cd-gpios = <&gpio7 12 GPIO_ACTIVE_LOW>; /* gpio 219 */ +}; Index: ../source/u-boot-2016.05/board/ti/advantech/mux_gf33a1.h =================================================================== --- ../source/u-boot-2016.05/board/ti/advantech/mux_gf33a1.h (版本 1719) +++ ../source/u-boot-2016.05/board/ti/advantech/mux_gf33a1.h (工作副本) @@ -155,14 +155,29 @@ {MMC1_DAT3, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_dat3.mmc1_dat3 */ {MMC1_SDCD, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_sdcd.mmc1_sdcd */ {MMC1_SDWP, (M0 | PIN_INPUT_PULLUP)}, /* mmc1_sdwp.mmc1_sdwp */ + + /* MMC3 */ + {MMC3_CLK, (M0 | PIN_INPUT_PULLUP)}, /* mmc3_clk.mmc3_clk */ + {MMC3_CMD, (M0 | PIN_INPUT_PULLUP)}, /* mmc3_cmd.mmc3_cmd */ + {MMC3_DAT0, (M0 | PIN_INPUT_PULLUP)}, /* mmc3_dat0.mmc3_dat0 */ + {MMC3_DAT1, (M0 | PIN_INPUT_PULLUP)}, /* mmc3_dat1.mmc3_dat1 */ + {MMC3_DAT2, (M0 | PIN_INPUT_PULLUP)}, /* mmc3_dat2.mmc3_dat2 */ + {MMC3_DAT3, (M0 | PIN_INPUT_PULLUP)}, /* mmc3_dat3.mmc3_dat3 */ /* PWM */ {GPIO6_10, (M10 | PIN_OUTPUT_PULLDOWN)}, /* gpio6_10.ehrpwm2A */ {GPIO6_11, (M10 | PIN_OUTPUT_PULLDOWN)}, /* gpio6_11.ehrpwm2B */ /* CAN */ + {SPI1_CS2, (M2 | PIN_INPUT_PULLUP)}, /* spi1_cs2.dcan2_tx */ + {SPI1_CS3, (M2 | PIN_INPUT_PULLUP)}, /* spi1_cs3.dcan2_rx */ /* SATA */ {DCAN1_RX, (M4 | PIN_OUTPUT)}, /* dcan1_rx.sata1_led */ /* Weakup*/ @@ -221,14 +236,14 @@ {GPMC_BEN0, (M14 | PIN_INPUT_PULLDOWN)}, /* gpmc_ben0.gpio2_26 */ {GPMC_BEN1, (M14 | PIN_INPUT_PULLDOWN)}, /* gpmc_ben1.gpio2_27 */ {GPMC_WAIT0, (M14 | PIN_INPUT_PULLDOWN)}, /* gpmc_wait0.gpio2_28 */ {SPI1_CS1, (M14 | PIN_OUTPUT_PULLUP)}, /* spi1_cs1.gpio7_11 */ {MCASP1_AXR2, (M14 | PIN_INPUT_PULLDOWN)}, /* mcasp1_axr2.gpio5_4 */ {MCASP1_AXR3, (M14 | PIN_INPUT_PULLDOWN)}, /* mcasp1_axr3.gpio5_5 */ @@ -293,8 +308,8 @@ /* PWM as gpio function */ {GPIO6_10, (M0 | PIN_INPUT)}, {GPIO6_11, (M0 | PIN_INPUT)}, /* CLKOUT as gpio */ {GPMC_CLK, (M14 | PIN_INPUT)}, {MCASP1_AXR12, (M14 | PIN_INPUT)}, @@ -303,14 +318,14 @@ /* CLKIN as gpio */ {VIN2A_D2, (M14 | PIN_INPUT)}, {VIN2A_CLK0, (M14 | PIN_INPUT)}, {VOUT1_D3, (M14 | PIN_INPUT)}, {VOUT1_D12, (M14 | PIN_INPUT)}, {VOUT1_D5, (M14 | PIN_INPUT)}, /* CN7*/ {XREF_CLK0, (M14 | PIN_INPUT)}, {VOUT1_D8, (M14 | PIN_INPUT)}, /* vout1_d8.vout1_d8 */ {VOUT1_D9, (M14 | PIN_INPUT)}, #endif @@ -330,6 +345,23 @@ {0x0AE0, 189, 1462}, /* CFG_VIN2A_D21_IN */ {0x0AEC, 232, 1278}, /* CFG_VIN2A_D22_IN */ {0x0AF8, 0, 1397}, /* CFG_VIN2A_D23_IN */ + {0x678 , 0, 386}, /* CFG_MMC3_CLK_IN */ + {0x680 , 605, 0}, /* CFG_MMC3_CLK_OUT */ + {0x684 , 0, 0}, /* CFG_MMC3_CMD_IN */ + {0x688 , 0, 0}, /* CFG_MMC3_CMD_OEN */ + {0x68c , 0, 0}, /* CFG_MMC3_CMD_OUT */ + {0x690 , 171, 0}, /* CFG_MMC3_DAT0_IN */ + {0x694 , 0, 0}, /* CFG_MMC3_DAT0_OEN */ + {0x698 , 0, 0}, /* CFG_MMC3_DAT0_OUT */ + {0x69c , 211, 0}, /* CFG_MMC3_DAT1_IN */ + {0x6a0 , 0, 0}, /* CFG_MMC3_DAT1_OEN */ + {0x6a4 , 0, 0}, /* CFG_MMC3_DAT1_OUT */ + {0x6a8 , 0, 0}, /* CFG_MMC3_DAT2_IN */ + {0x6ac , 0, 0}, /* CFG_MMC3_DAT2_OEN */ + {0x6b0 , 0, 0}, /* CFG_MMC3_DAT2_OUT */ + {0x6b4 , 474, 0}, /* CFG_MMC3_DAT3_IN */ + {0x6b8 , 0, 0}, /* CFG_MMC3_DAT3_OEN */ + {0x6bc , 0, 0}, /* CFG_MMC3_DAT3_OUT */ }; #endif Index: ../source/u-boot-2016.05/drivers/mmc/mmc_private.h =================================================================== --- ../source/u-boot-2016.05/drivers/mmc/mmc_private.h (版本 1719) +++ ../source/u-boot-2016.05/drivers/mmc/mmc_private.h (工作副本) @@ -11,6 +11,7 @@ #define _MMC_PRIVATE_H_ #include <mmc.h> +#define CONFIG_MMC_TRACE extern int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data); Index: ../source/u-boot-2016.05/drivers/mmc/omap_hsmmc.c =================================================================== --- ../source/u-boot-2016.05/drivers/mmc/omap_hsmmc.c (版本 1720) +++ ../source/u-boot-2016.05/drivers/mmc/omap_hsmmc.c (工作副本) @@ -1391,6 +1391,7 @@ struct mmc_config *cfg; uint host_caps_val; priv_data = malloc(sizeof(*priv_data)); if (priv_data == NULL) return -1; @@ -1418,7 +1419,7 @@ priv_data->base_addr = (struct hsmmc *)OMAP_HSMMC3_BASE; #if (defined(CONFIG_DRA7XX) || defined(CONFIG_AM57XX)) && defined(CONFIG_HSMMC3_8BIT) /* Enable 8-bit interface for eMMC on DRA7XX */ - host_caps_val |= MMC_MODE_8BIT; + //host_caps_val |= MMC_MODE_8BIT; #endif break; #endif @@ -1798,6 +1799,7 @@ struct omap_mmc_of_data *data; #endif cfg = &priv->cfg; cfg->name = "OMAP SD/MMC"; cfg->ops = &omap_hsmmc_ops; Index: ../source/u-boot-2016.05/include/configs/am57xx_gf33a1.h =================================================================== --- ../source/u-boot-2016.05/include/configs/am57xx_gf33a1.h (版本 1719) +++ ../source/u-boot-2016.05/include/configs/am57xx_gf33a1.h (工作副本) @@ -26,7 +26,7 @@ /* SPI SPL boot support. */ #define CONFIG_SPL_SPI_SUPPORT -#define CONFIG_MMC_DEVICE_MAX 2 +#define CONFIG_MMC_DEVICE_MAX 3 #define CONFIG_SPL_PARAM_ADDR (0XC1000000) #define CONFIG_NR_DRAM_BANKS 2
log:
U-Boot SPL 2016.05-svn1715 (Aug 21 2017 - 14:25:10)
DRA752-GP ES2.0
Trying to boot from SPI
mmc index:0
omap_mmc_init:0
CMD_SEND:0
ARG 0x00000000
MMC_RSP_NONE
CMD_SEND:8
ARG 0x000001AA
RET -19
……………….
Card did not respond to voltage select!
spl: mmc init failed with error: -17
mmc index:1
omap_mmc_init:1
CMD_SEND:0
ARG 0x00000000
MMC_RSP_NONE
CMD_SEND:8
ARG 0x000001AA
RET -19
……………
spl_load_image_fat: error reading image u-boot.img, err - -1
mmc index:2
omap_mmc_init:2
The Data Manual states that mmc1 and mmc2 are optimized for SD/MMC/eMMC while mmc3 and mmc4 are optimized for SDIO.
Steve K.
Please refer to this link:
We have removed ti,dual-volt from the dts file.
The source code is the same for SDK03.01.00.06 and the patch you provided.
So what you said we've tried. The result is failed.
Can you make sure the patch was cleanly applied?
Also, can you change max-frequency to 64000000 instead of 192000000?
Steve K.
Please check TI SDK03.01.00.06 source code. It's the same as the patch you provided.
I have also checked our source code several times, it's also the same as the patch you provided.
Please refer to this link:
Our SDIO initializes successfully only when the max-frequency waw set under 4MHz.