I'm trying to add reading support for emmc on efusA9 to u-boot from V3.0
The diff below to fsimx6.c board file seems to work as it enables reading a file from an emmc partition,
but I'm quite puzzled about the details.
- The devicetree patch explicitly mentions vmmc-supply, allthough there doesn't seem to be an equivalent in the board file for adding this.
- Is a bus width of 8 needed or desirable for just reading or is this only for additional stuff?
(WLAN or other RF modems (like mentioned in the board file comments)) - The pad configuration of the reset button in the device tree is 0x1B071, a value,
that isn't completely explained by https://www.kosagi.com/w/index…ce_Tree_Naming_Convention
What does this mean to achive and is it actually sufficient just to replace it with IOMUX_PADS(PAD_SD3_RST__SD3_RESET | MUX_PAD_CTRL(NO_PAD_CTRL)) in u-boot? - Does the reset pin need additional initialization?
Diff
- --- 0-fsimx6.c 2016-10-25 16:00:54.544988678 +0300
- +++ fsimx6.c 2016-10-26 12:56:25.999273652 +0300
- @@ -475,6 +475,24 @@
- IOMUX_PADS(PAD_NANDF_CS2__GPIO6_IO15 | MUX_PAD_CTRL(NO_PAD_CTRL)),/* CD */
- };
- +/* configuration for efusa9 emmc */
- +static iomux_v3_cfg_t const usdhc3_emmc_pads[] = {
- + IOMUX_PADS(PAD_SD3_CMD__SD3_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL)), /* used here as in usdhc3_pads, in linux devicetree it's 0x17071 */
- + IOMUX_PADS(PAD_SD3_CLK__SD3_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL)), /* used here as in usdhc3_pads; in linux devicetree it's 0x10071 */
- + IOMUX_PADS(PAD_SD3_DAT0__SD3_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
- + IOMUX_PADS(PAD_SD3_DAT1__SD3_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
- + IOMUX_PADS(PAD_SD3_DAT2__SD3_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
- + IOMUX_PADS(PAD_SD3_DAT3__SD3_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
- + IOMUX_PADS(PAD_SD3_DAT4__SD3_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
- + IOMUX_PADS(PAD_SD3_DAT5__SD3_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
- + IOMUX_PADS(PAD_SD3_DAT6__SD3_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
- + IOMUX_PADS(PAD_SD3_DAT7__SD3_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
- + /* Reset eMMC, active low */
- + IOMUX_PADS(PAD_SD3_RST__SD3_RESET | MUX_PAD_CTRL(NO_PAD_CTRL)), /* ? in linux devicetree it's 0x1B071 */
- +};
- +
- +
- +
- struct fsl_esdhc_cfg esdhc_cfg[] = {
- {
- .esdhc_base = USDHC1_BASE_ADDR,
- @@ -629,6 +647,25 @@
- for on-board EMMC. This may also optionally be used for WLAN or
- other RF modems in the future. */
- + switch (fs_nboot_args.chBoardType) {
- + case BT_EFUSA9:
- + SETUP_IOMUX_PADS(usdhc3_emmc_pads);
- + ccgr6 |= (3 << 6);
- + index = 2;
- + break;
- + }
- +
- + // do something with reset pin?
- +
- + writel(ccgr6, &mxc_ccm->CCGR6);
- +
- + esdhc_cfg[index].sdhc_clk = mxc_get_clock(esdhc_cfg[index].sdhc_clk);
- + ret = fsl_esdhc_initialize(bis, &esdhc_cfg[index]);
- +
- + if (ret)
- + return ret;
- +
- +
- return 0;
- }
- #endif