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