xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun* NVIDIA Tegra Secure Digital Host Controller
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunThis controller on Tegra family SoCs provides an interface for MMC, SD,
4*4882a593Smuzhiyunand SDIO types of memory cards.
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunThis file documents differences between the core properties described
7*4882a593Smuzhiyunby mmc.txt and the properties used by the sdhci-tegra driver.
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunRequired properties:
10*4882a593Smuzhiyun- compatible : should be one of:
11*4882a593Smuzhiyun  - "nvidia,tegra20-sdhci": for Tegra20
12*4882a593Smuzhiyun  - "nvidia,tegra30-sdhci": for Tegra30
13*4882a593Smuzhiyun  - "nvidia,tegra114-sdhci": for Tegra114
14*4882a593Smuzhiyun  - "nvidia,tegra124-sdhci": for Tegra124 and Tegra132
15*4882a593Smuzhiyun  - "nvidia,tegra210-sdhci": for Tegra210
16*4882a593Smuzhiyun  - "nvidia,tegra186-sdhci": for Tegra186
17*4882a593Smuzhiyun  - "nvidia,tegra194-sdhci": for Tegra194
18*4882a593Smuzhiyun- clocks: For Tegra210, Tegra186 and Tegra194 must contain two entries.
19*4882a593Smuzhiyun	  One for the module clock and one for the timeout clock.
20*4882a593Smuzhiyun	  For all other Tegra devices, must contain a single entry for
21*4882a593Smuzhiyun	  the module clock. See ../clocks/clock-bindings.txt for details.
22*4882a593Smuzhiyun- clock-names: For Tegra210, Tegra186 and Tegra194 must contain the
23*4882a593Smuzhiyun	       strings 'sdhci' and 'tmclk' to represent the module and
24*4882a593Smuzhiyun	       the timeout clocks, respectively.
25*4882a593Smuzhiyun	       For all other Tegra devices must contain the string 'sdhci'
26*4882a593Smuzhiyun	       to represent the module clock.
27*4882a593Smuzhiyun- resets : Must contain an entry for each entry in reset-names.
28*4882a593Smuzhiyun  See ../reset/reset.txt for details.
29*4882a593Smuzhiyun- reset-names : Must include the following entries:
30*4882a593Smuzhiyun  - sdhci
31*4882a593Smuzhiyun
32*4882a593SmuzhiyunOptional properties:
33*4882a593Smuzhiyun- power-gpios : Specify GPIOs for power control
34*4882a593Smuzhiyun
35*4882a593SmuzhiyunExample:
36*4882a593Smuzhiyun
37*4882a593Smuzhiyunsdhci@c8000200 {
38*4882a593Smuzhiyun	compatible = "nvidia,tegra20-sdhci";
39*4882a593Smuzhiyun	reg = <0xc8000200 0x200>;
40*4882a593Smuzhiyun	interrupts = <47>;
41*4882a593Smuzhiyun	clocks = <&tegra_car 14>;
42*4882a593Smuzhiyun	resets = <&tegra_car 14>;
43*4882a593Smuzhiyun	reset-names = "sdhci";
44*4882a593Smuzhiyun	cd-gpios = <&gpio 69 0>; /* gpio PI5 */
45*4882a593Smuzhiyun	wp-gpios = <&gpio 57 0>; /* gpio PH1 */
46*4882a593Smuzhiyun	power-gpios = <&gpio 155 0>; /* gpio PT3 */
47*4882a593Smuzhiyun	bus-width = <8>;
48*4882a593Smuzhiyun};
49*4882a593Smuzhiyun
50*4882a593SmuzhiyunOptional properties for Tegra210, Tegra186 and Tegra194:
51*4882a593Smuzhiyun- pinctrl-names, pinctrl-0, pinctrl-1 : Specify pad voltage
52*4882a593Smuzhiyun  configurations. Valid pinctrl-names are "sdmmc-3v3" and "sdmmc-1v8"
53*4882a593Smuzhiyun  for controllers supporting multiple voltage levels. The order of names
54*4882a593Smuzhiyun  should correspond to the pin configuration states in pinctrl-0 and
55*4882a593Smuzhiyun  pinctrl-1.
56*4882a593Smuzhiyun- pinctrl-names : "sdmmc-3v3-drv" and "sdmmc-1v8-drv" are applicable for
57*4882a593Smuzhiyun  Tegra210 where pad config registers are in the pinmux register domain
58*4882a593Smuzhiyun  for pull-up-strength and pull-down-strength values configuration when
59*4882a593Smuzhiyun  using pads at 3V3 and 1V8 levels.
60*4882a593Smuzhiyun- nvidia,only-1-8-v : The presence of this property indicates that the
61*4882a593Smuzhiyun  controller operates at a 1.8 V fixed I/O voltage.
62*4882a593Smuzhiyun- nvidia,pad-autocal-pull-up-offset-3v3,
63*4882a593Smuzhiyun  nvidia,pad-autocal-pull-down-offset-3v3 : Specify drive strength
64*4882a593Smuzhiyun  calibration offsets for 3.3 V signaling modes.
65*4882a593Smuzhiyun- nvidia,pad-autocal-pull-up-offset-1v8,
66*4882a593Smuzhiyun  nvidia,pad-autocal-pull-down-offset-1v8 : Specify drive strength
67*4882a593Smuzhiyun  calibration offsets for 1.8 V signaling modes.
68*4882a593Smuzhiyun- nvidia,pad-autocal-pull-up-offset-3v3-timeout,
69*4882a593Smuzhiyun  nvidia,pad-autocal-pull-down-offset-3v3-timeout : Specify drive
70*4882a593Smuzhiyun  strength used as a fallback in case the automatic calibration times
71*4882a593Smuzhiyun  out on a 3.3 V signaling mode.
72*4882a593Smuzhiyun- nvidia,pad-autocal-pull-up-offset-1v8-timeout,
73*4882a593Smuzhiyun  nvidia,pad-autocal-pull-down-offset-1v8-timeout : Specify drive
74*4882a593Smuzhiyun  strength used as a fallback in case the automatic calibration times
75*4882a593Smuzhiyun  out on a 1.8 V signaling mode.
76*4882a593Smuzhiyun- nvidia,pad-autocal-pull-up-offset-sdr104,
77*4882a593Smuzhiyun  nvidia,pad-autocal-pull-down-offset-sdr104 : Specify drive strength
78*4882a593Smuzhiyun  calibration offsets for SDR104 mode.
79*4882a593Smuzhiyun- nvidia,pad-autocal-pull-up-offset-hs400,
80*4882a593Smuzhiyun  nvidia,pad-autocal-pull-down-offset-hs400 : Specify drive strength
81*4882a593Smuzhiyun  calibration offsets for HS400 mode.
82*4882a593Smuzhiyun- nvidia,default-tap : Specify the default inbound sampling clock
83*4882a593Smuzhiyun  trimmer value for non-tunable modes.
84*4882a593Smuzhiyun- nvidia,default-trim : Specify the default outbound clock trimmer
85*4882a593Smuzhiyun  value.
86*4882a593Smuzhiyun- nvidia,dqs-trim : Specify DQS trim value for HS400 timing
87*4882a593Smuzhiyun
88*4882a593Smuzhiyun  Notes on the pad calibration pull up and pulldown offset values:
89*4882a593Smuzhiyun    - The property values are drive codes which are programmed into the
90*4882a593Smuzhiyun      PD_OFFSET and PU_OFFSET sections of the
91*4882a593Smuzhiyun      SDHCI_TEGRA_AUTO_CAL_CONFIG register.
92*4882a593Smuzhiyun    - A higher value corresponds to higher drive strength. Please refer
93*4882a593Smuzhiyun      to the reference manual of the SoC for correct values.
94*4882a593Smuzhiyun    - The SDR104 and HS400 timing specific values are used in
95*4882a593Smuzhiyun      corresponding modes if specified.
96*4882a593Smuzhiyun
97*4882a593Smuzhiyun  Notes on tap and trim values:
98*4882a593Smuzhiyun    - The values are used for compensating trace length differences
99*4882a593Smuzhiyun      by adjusting the sampling point.
100*4882a593Smuzhiyun    - The values are programmed to the Vendor Clock Control Register.
101*4882a593Smuzhiyun      Please refer to the reference manual of the SoC for correct
102*4882a593Smuzhiyun      values.
103*4882a593Smuzhiyun    - The DQS trim values are only used on controllers which support
104*4882a593Smuzhiyun      HS400 timing. Only SDMMC4 on Tegra210 and Tegra 186 supports
105*4882a593Smuzhiyun      HS400.
106*4882a593Smuzhiyun
107*4882a593SmuzhiyunExample:
108*4882a593Smuzhiyunsdhci@700b0000 {
109*4882a593Smuzhiyun	compatible = "nvidia,tegra124-sdhci";
110*4882a593Smuzhiyun	reg = <0x0 0x700b0000 0x0 0x200>;
111*4882a593Smuzhiyun	interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
112*4882a593Smuzhiyun	clocks = <&tegra_car TEGRA210_CLK_SDMMC1>;
113*4882a593Smuzhiyun	clock-names = "sdhci";
114*4882a593Smuzhiyun	resets = <&tegra_car 14>;
115*4882a593Smuzhiyun	reset-names = "sdhci";
116*4882a593Smuzhiyun	pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
117*4882a593Smuzhiyun	pinctrl-0 = <&sdmmc1_3v3>;
118*4882a593Smuzhiyun	pinctrl-1 = <&sdmmc1_1v8>;
119*4882a593Smuzhiyun	nvidia,pad-autocal-pull-up-offset-3v3 = <0x00>;
120*4882a593Smuzhiyun	nvidia,pad-autocal-pull-down-offset-3v3 = <0x7d>;
121*4882a593Smuzhiyun	nvidia,pad-autocal-pull-up-offset-1v8 = <0x7b>;
122*4882a593Smuzhiyun	nvidia,pad-autocal-pull-down-offset-1v8 = <0x7b>;
123*4882a593Smuzhiyun	status = "disabled";
124*4882a593Smuzhiyun};
125*4882a593Smuzhiyun
126*4882a593Smuzhiyunsdhci@700b0000 {
127*4882a593Smuzhiyun	compatible = "nvidia,tegra210-sdhci";
128*4882a593Smuzhiyun	reg = <0x0 0x700b0000 0x0 0x200>;
129*4882a593Smuzhiyun	interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
130*4882a593Smuzhiyun	clocks = <&tegra_car TEGRA210_CLK_SDMMC1>,
131*4882a593Smuzhiyun		 <&tegra_car TEGRA210_CLK_SDMMC_LEGACY>;
132*4882a593Smuzhiyun	clock-names = "sdhci", "tmclk";
133*4882a593Smuzhiyun	resets = <&tegra_car 14>;
134*4882a593Smuzhiyun	reset-names = "sdhci";
135*4882a593Smuzhiyun	pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
136*4882a593Smuzhiyun	pinctrl-0 = <&sdmmc1_3v3>;
137*4882a593Smuzhiyun	pinctrl-1 = <&sdmmc1_1v8>;
138*4882a593Smuzhiyun	nvidia,pad-autocal-pull-up-offset-3v3 = <0x00>;
139*4882a593Smuzhiyun	nvidia,pad-autocal-pull-down-offset-3v3 = <0x7d>;
140*4882a593Smuzhiyun	nvidia,pad-autocal-pull-up-offset-1v8 = <0x7b>;
141*4882a593Smuzhiyun	nvidia,pad-autocal-pull-down-offset-1v8 = <0x7b>;
142*4882a593Smuzhiyun	status = "disabled";
143*4882a593Smuzhiyun};
144