1 Scope of Document
This document describes EMMC hardware design
2 Requiremen
2.1 Function Requirement
support 4G capacity EMMC in linux
2.2 Performance Requirement
NA
3 Hardware Overview
standard 8 bit emmc interface, eight data line ,one line for emmc_cmd, one line for emmc_clk
4 Functional Description
4.1 Functional Block Diagram
NA
4.2 EMMC
4.2.1 Overview
Reference: https://blog.csdn.net/wuyusheng314/article/details/64127687
https://blog.csdn.net/u013686019/article/details/66472291
5 Porting
5.1 4.14.40 Kernel porting
Change the dts file for support EMMC
mmc2_pins: pinmux_mmc2_pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2) /* (U9) gpmc_csn1.mmc1_clk */
AM33XX_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2) /* (V9) gpmc_csn2.mmc1_cmd */
AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE1) /* (U7) gpmc_ad0.mmc1_dat0 */
AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE1) /* (V7) gpmc_ad1.mmc1_dat1 */
AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE1) /* (R8) gpmc_ad2.mmc1_dat2 */
AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE1) /* (T8) gpmc_ad3.mmc1_dat3 */
AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE1) /* (U8) gpmc_ad4.mmc1_dat4 */
AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE1) /* (V8) gpmc_ad5.mmc1_dat5 */
AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE1) /* (R9) gpmc_ad6.mmc1_dat6 */
AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE1) /* (T9) gpmc_ad7.mmc1_dat7 */
>;
};
&mmc2 {
status = "okay";
vmmc-supply = <&vcc3v3>;
bus-width = <8>;
pinctrl-names = "default";
pinctrl-0 = <&mmc2_pins>;
};
Kernel log:
[ 1.814326] mmc1: new high speed MMC card at address 0001
[ 1.830872] mmcblk1: mmc1:0001 SEM04G 3.69 GiB
[ 1.835755] mmcblk1boot0: mmc1:0001 SEM04G partition 1 1.00 MiB
Device interface:
# ls /dev/mmcblk1*
mmcblk1 mmcblk1boot0 mmcblk1boot1 mmcblk1p1 mmcblk1p2