18c2ecf20Sopenharmony_ci* MTK MMC controller 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciThe MTK MSDC can act as a MMC controller 48c2ecf20Sopenharmony_cito support MMC, SD, and SDIO types of memory cards. 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ciThis file documents differences between the core properties in mmc.txt 78c2ecf20Sopenharmony_ciand the properties used by the msdc driver. 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ciRequired properties: 108c2ecf20Sopenharmony_ci- compatible: value should be either of the following. 118c2ecf20Sopenharmony_ci "mediatek,mt8135-mmc": for mmc host ip compatible with mt8135 128c2ecf20Sopenharmony_ci "mediatek,mt8173-mmc": for mmc host ip compatible with mt8173 138c2ecf20Sopenharmony_ci "mediatek,mt8183-mmc": for mmc host ip compatible with mt8183 148c2ecf20Sopenharmony_ci "mediatek,mt8516-mmc": for mmc host ip compatible with mt8516 158c2ecf20Sopenharmony_ci "mediatek,mt6779-mmc": for mmc host ip compatible with mt6779 168c2ecf20Sopenharmony_ci "mediatek,mt2701-mmc": for mmc host ip compatible with mt2701 178c2ecf20Sopenharmony_ci "mediatek,mt2712-mmc": for mmc host ip compatible with mt2712 188c2ecf20Sopenharmony_ci "mediatek,mt7622-mmc": for MT7622 SoC 198c2ecf20Sopenharmony_ci "mediatek,mt7623-mmc", "mediatek,mt2701-mmc": for MT7623 SoC 208c2ecf20Sopenharmony_ci "mediatek,mt7620-mmc", for MT7621 SoC (and others) 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci- reg: physical base address of the controller and length 238c2ecf20Sopenharmony_ci- interrupts: Should contain MSDC interrupt number 248c2ecf20Sopenharmony_ci- clocks: Should contain phandle for the clock feeding the MMC controller 258c2ecf20Sopenharmony_ci- clock-names: Should contain the following: 268c2ecf20Sopenharmony_ci "source" - source clock (required) 278c2ecf20Sopenharmony_ci "hclk" - HCLK which used for host (required) 288c2ecf20Sopenharmony_ci "source_cg" - independent source clock gate (required for MT2712) 298c2ecf20Sopenharmony_ci "bus_clk" - bus clock used for internal register access (required for MT2712 MSDC0/3) 308c2ecf20Sopenharmony_ci- pinctrl-names: should be "default", "state_uhs" 318c2ecf20Sopenharmony_ci- pinctrl-0: should contain default/high speed pin ctrl 328c2ecf20Sopenharmony_ci- pinctrl-1: should contain uhs mode pin ctrl 338c2ecf20Sopenharmony_ci- vmmc-supply: power to the Core 348c2ecf20Sopenharmony_ci- vqmmc-supply: power to the IO 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ciOptional properties: 378c2ecf20Sopenharmony_ci- assigned-clocks: PLL of the source clock 388c2ecf20Sopenharmony_ci- assigned-clock-parents: parent of source clock, used for HS400 mode to get 400Mhz source clock 398c2ecf20Sopenharmony_ci- hs400-ds-delay: HS400 DS delay setting 408c2ecf20Sopenharmony_ci- mediatek,hs200-cmd-int-delay: HS200 command internal delay setting. 418c2ecf20Sopenharmony_ci This field has total 32 stages. 428c2ecf20Sopenharmony_ci The value is an integer from 0 to 31. 438c2ecf20Sopenharmony_ci- mediatek,hs400-cmd-int-delay: HS400 command internal delay setting 448c2ecf20Sopenharmony_ci This field has total 32 stages. 458c2ecf20Sopenharmony_ci The value is an integer from 0 to 31. 468c2ecf20Sopenharmony_ci- mediatek,hs400-cmd-resp-sel-rising: HS400 command response sample selection 478c2ecf20Sopenharmony_ci If present,HS400 command responses are sampled on rising edges. 488c2ecf20Sopenharmony_ci If not present,HS400 command responses are sampled on falling edges. 498c2ecf20Sopenharmony_ci- mediatek,latch-ck: Some SoCs do not support enhance_rx, need set correct latch-ck to avoid data crc 508c2ecf20Sopenharmony_ci error caused by stop clock(fifo full) 518c2ecf20Sopenharmony_ci Valid range = [0:0x7]. if not present, default value is 0. 528c2ecf20Sopenharmony_ci applied to compatible "mediatek,mt2701-mmc". 538c2ecf20Sopenharmony_ci- resets: Phandle and reset specifier pair to softreset line of MSDC IP. 548c2ecf20Sopenharmony_ci- reset-names: Should be "hrst". 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ciExamples: 578c2ecf20Sopenharmony_cimmc0: mmc@11230000 { 588c2ecf20Sopenharmony_ci compatible = "mediatek,mt8173-mmc", "mediatek,mt8135-mmc"; 598c2ecf20Sopenharmony_ci reg = <0 0x11230000 0 0x108>; 608c2ecf20Sopenharmony_ci interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_LOW>; 618c2ecf20Sopenharmony_ci vmmc-supply = <&mt6397_vemc_3v3_reg>; 628c2ecf20Sopenharmony_ci vqmmc-supply = <&mt6397_vio18_reg>; 638c2ecf20Sopenharmony_ci clocks = <&pericfg CLK_PERI_MSDC30_0>, 648c2ecf20Sopenharmony_ci <&topckgen CLK_TOP_MSDC50_0_H_SEL>; 658c2ecf20Sopenharmony_ci clock-names = "source", "hclk"; 668c2ecf20Sopenharmony_ci pinctrl-names = "default", "state_uhs"; 678c2ecf20Sopenharmony_ci pinctrl-0 = <&mmc0_pins_default>; 688c2ecf20Sopenharmony_ci pinctrl-1 = <&mmc0_pins_uhs>; 698c2ecf20Sopenharmony_ci assigned-clocks = <&topckgen CLK_TOP_MSDC50_0_SEL>; 708c2ecf20Sopenharmony_ci assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL_D2>; 718c2ecf20Sopenharmony_ci hs400-ds-delay = <0x14015>; 728c2ecf20Sopenharmony_ci mediatek,hs200-cmd-int-delay = <26>; 738c2ecf20Sopenharmony_ci mediatek,hs400-cmd-int-delay = <14>; 748c2ecf20Sopenharmony_ci mediatek,hs400-cmd-resp-sel-rising; 758c2ecf20Sopenharmony_ci}; 76