1*4882a593Smuzhiyun* MTK MMC controller 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunThe MTK MSDC can act as a MMC controller 4*4882a593Smuzhiyunto support MMC, SD, and SDIO types of memory cards. 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunThis file documents differences between the core properties in mmc.txt 7*4882a593Smuzhiyunand the properties used by the msdc driver. 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunRequired properties: 10*4882a593Smuzhiyun- compatible: value should be either of the following. 11*4882a593Smuzhiyun "mediatek,mt8135-mmc": for mmc host ip compatible with mt8135 12*4882a593Smuzhiyun "mediatek,mt8173-mmc": for mmc host ip compatible with mt8173 13*4882a593Smuzhiyun "mediatek,mt8183-mmc": for mmc host ip compatible with mt8183 14*4882a593Smuzhiyun "mediatek,mt8516-mmc": for mmc host ip compatible with mt8516 15*4882a593Smuzhiyun "mediatek,mt6779-mmc": for mmc host ip compatible with mt6779 16*4882a593Smuzhiyun "mediatek,mt2701-mmc": for mmc host ip compatible with mt2701 17*4882a593Smuzhiyun "mediatek,mt2712-mmc": for mmc host ip compatible with mt2712 18*4882a593Smuzhiyun "mediatek,mt7622-mmc": for MT7622 SoC 19*4882a593Smuzhiyun "mediatek,mt7623-mmc", "mediatek,mt2701-mmc": for MT7623 SoC 20*4882a593Smuzhiyun "mediatek,mt7620-mmc", for MT7621 SoC (and others) 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun- reg: physical base address of the controller and length 23*4882a593Smuzhiyun- interrupts: Should contain MSDC interrupt number 24*4882a593Smuzhiyun- clocks: Should contain phandle for the clock feeding the MMC controller 25*4882a593Smuzhiyun- clock-names: Should contain the following: 26*4882a593Smuzhiyun "source" - source clock (required) 27*4882a593Smuzhiyun "hclk" - HCLK which used for host (required) 28*4882a593Smuzhiyun "source_cg" - independent source clock gate (required for MT2712) 29*4882a593Smuzhiyun "bus_clk" - bus clock used for internal register access (required for MT2712 MSDC0/3) 30*4882a593Smuzhiyun- pinctrl-names: should be "default", "state_uhs" 31*4882a593Smuzhiyun- pinctrl-0: should contain default/high speed pin ctrl 32*4882a593Smuzhiyun- pinctrl-1: should contain uhs mode pin ctrl 33*4882a593Smuzhiyun- vmmc-supply: power to the Core 34*4882a593Smuzhiyun- vqmmc-supply: power to the IO 35*4882a593Smuzhiyun 36*4882a593SmuzhiyunOptional properties: 37*4882a593Smuzhiyun- assigned-clocks: PLL of the source clock 38*4882a593Smuzhiyun- assigned-clock-parents: parent of source clock, used for HS400 mode to get 400Mhz source clock 39*4882a593Smuzhiyun- hs400-ds-delay: HS400 DS delay setting 40*4882a593Smuzhiyun- mediatek,hs200-cmd-int-delay: HS200 command internal delay setting. 41*4882a593Smuzhiyun This field has total 32 stages. 42*4882a593Smuzhiyun The value is an integer from 0 to 31. 43*4882a593Smuzhiyun- mediatek,hs400-cmd-int-delay: HS400 command internal delay setting 44*4882a593Smuzhiyun This field has total 32 stages. 45*4882a593Smuzhiyun The value is an integer from 0 to 31. 46*4882a593Smuzhiyun- mediatek,hs400-cmd-resp-sel-rising: HS400 command response sample selection 47*4882a593Smuzhiyun If present,HS400 command responses are sampled on rising edges. 48*4882a593Smuzhiyun If not present,HS400 command responses are sampled on falling edges. 49*4882a593Smuzhiyun- mediatek,latch-ck: Some SoCs do not support enhance_rx, need set correct latch-ck to avoid data crc 50*4882a593Smuzhiyun error caused by stop clock(fifo full) 51*4882a593Smuzhiyun Valid range = [0:0x7]. if not present, default value is 0. 52*4882a593Smuzhiyun applied to compatible "mediatek,mt2701-mmc". 53*4882a593Smuzhiyun- resets: Phandle and reset specifier pair to softreset line of MSDC IP. 54*4882a593Smuzhiyun- reset-names: Should be "hrst". 55*4882a593Smuzhiyun 56*4882a593SmuzhiyunExamples: 57*4882a593Smuzhiyunmmc0: mmc@11230000 { 58*4882a593Smuzhiyun compatible = "mediatek,mt8173-mmc", "mediatek,mt8135-mmc"; 59*4882a593Smuzhiyun reg = <0 0x11230000 0 0x108>; 60*4882a593Smuzhiyun interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_LOW>; 61*4882a593Smuzhiyun vmmc-supply = <&mt6397_vemc_3v3_reg>; 62*4882a593Smuzhiyun vqmmc-supply = <&mt6397_vio18_reg>; 63*4882a593Smuzhiyun clocks = <&pericfg CLK_PERI_MSDC30_0>, 64*4882a593Smuzhiyun <&topckgen CLK_TOP_MSDC50_0_H_SEL>; 65*4882a593Smuzhiyun clock-names = "source", "hclk"; 66*4882a593Smuzhiyun pinctrl-names = "default", "state_uhs"; 67*4882a593Smuzhiyun pinctrl-0 = <&mmc0_pins_default>; 68*4882a593Smuzhiyun pinctrl-1 = <&mmc0_pins_uhs>; 69*4882a593Smuzhiyun assigned-clocks = <&topckgen CLK_TOP_MSDC50_0_SEL>; 70*4882a593Smuzhiyun assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL_D2>; 71*4882a593Smuzhiyun hs400-ds-delay = <0x14015>; 72*4882a593Smuzhiyun mediatek,hs200-cmd-int-delay = <26>; 73*4882a593Smuzhiyun mediatek,hs400-cmd-int-delay = <14>; 74*4882a593Smuzhiyun mediatek,hs400-cmd-resp-sel-rising; 75*4882a593Smuzhiyun}; 76