Merge tag 'for-linus-4.15-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / mmc / mtk-sd.txt
1 * MTK MMC controller
2
3 The MTK  MSDC can act as a MMC controller
4 to support MMC, SD, and SDIO types of memory cards.
5
6 This file documents differences between the core properties in mmc.txt
7 and the properties used by the msdc driver.
8
9 Required properties:
10 - compatible: value should be either of the following.
11         "mediatek,mt8135-mmc": for mmc host ip compatible with mt8135
12         "mediatek,mt8173-mmc": for mmc host ip compatible with mt8173
13         "mediatek,mt2701-mmc": for mmc host ip compatible with mt2701
14         "mediatek,mt2712-mmc": for mmc host ip compatible with mt2712
15 - reg: physical base address of the controller and length
16 - interrupts: Should contain MSDC interrupt number
17 - clocks: Should contain phandle for the clock feeding the MMC controller
18 - clock-names: Should contain the following:
19         "source" - source clock (required)
20         "hclk" - HCLK which used for host (required)
21         "source_cg" - independent source clock gate (required for MT2712)
22 - pinctrl-names: should be "default", "state_uhs"
23 - pinctrl-0: should contain default/high speed pin ctrl
24 - pinctrl-1: should contain uhs mode pin ctrl
25 - vmmc-supply: power to the Core
26 - vqmmc-supply: power to the IO
27
28 Optional properties:
29 - assigned-clocks: PLL of the source clock
30 - assigned-clock-parents: parent of source clock, used for HS400 mode to get 400Mhz source clock
31 - hs400-ds-delay: HS400 DS delay setting
32 - mediatek,hs200-cmd-int-delay: HS200 command internal delay setting.
33                                 This field has total 32 stages.
34                                 The value is an integer from 0 to 31.
35 - mediatek,hs400-cmd-int-delay: HS400 command internal delay setting
36                                 This field has total 32 stages.
37                                 The value is an integer from 0 to 31.
38 - mediatek,hs400-cmd-resp-sel-rising:  HS400 command response sample selection
39                                        If present,HS400 command responses are sampled on rising edges.
40                                        If not present,HS400 command responses are sampled on falling edges.
41 - mediatek,latch-ck: Some SoCs do not support enhance_rx, need set correct latch-ck to avoid data crc
42                      error caused by stop clock(fifo full)
43                      Valid range = [0:0x7]. if not present, default value is 0.
44                      applied to compatible "mediatek,mt2701-mmc".
45
46 Examples:
47 mmc0: mmc@11230000 {
48         compatible = "mediatek,mt8173-mmc", "mediatek,mt8135-mmc";
49         reg = <0 0x11230000 0 0x108>;
50         interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_LOW>;
51         vmmc-supply = <&mt6397_vemc_3v3_reg>;
52         vqmmc-supply = <&mt6397_vio18_reg>;
53         clocks = <&pericfg CLK_PERI_MSDC30_0>,
54                  <&topckgen CLK_TOP_MSDC50_0_H_SEL>;
55         clock-names = "source", "hclk";
56         pinctrl-names = "default", "state_uhs";
57         pinctrl-0 = <&mmc0_pins_default>;
58         pinctrl-1 = <&mmc0_pins_uhs>;
59         assigned-clocks = <&topckgen CLK_TOP_MSDC50_0_SEL>;
60         assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL_D2>;
61         hs400-ds-delay = <0x14015>;
62         mediatek,hs200-cmd-int-delay = <26>;
63         mediatek,hs400-cmd-int-delay = <14>;
64         mediatek,hs400-cmd-resp-sel-rising;
65 };