18c2ecf20Sopenharmony_ci* NVIDIA Tegra Secure Digital Host Controller
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciThis controller on Tegra family SoCs provides an interface for MMC, SD,
48c2ecf20Sopenharmony_ciand SDIO types of memory cards.
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ciThis file documents differences between the core properties described
78c2ecf20Sopenharmony_ciby mmc.txt and the properties used by the sdhci-tegra driver.
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciRequired properties:
108c2ecf20Sopenharmony_ci- compatible : should be one of:
118c2ecf20Sopenharmony_ci  - "nvidia,tegra20-sdhci": for Tegra20
128c2ecf20Sopenharmony_ci  - "nvidia,tegra30-sdhci": for Tegra30
138c2ecf20Sopenharmony_ci  - "nvidia,tegra114-sdhci": for Tegra114
148c2ecf20Sopenharmony_ci  - "nvidia,tegra124-sdhci": for Tegra124 and Tegra132
158c2ecf20Sopenharmony_ci  - "nvidia,tegra210-sdhci": for Tegra210
168c2ecf20Sopenharmony_ci  - "nvidia,tegra186-sdhci": for Tegra186
178c2ecf20Sopenharmony_ci  - "nvidia,tegra194-sdhci": for Tegra194
188c2ecf20Sopenharmony_ci- clocks: For Tegra210, Tegra186 and Tegra194 must contain two entries.
198c2ecf20Sopenharmony_ci	  One for the module clock and one for the timeout clock.
208c2ecf20Sopenharmony_ci	  For all other Tegra devices, must contain a single entry for
218c2ecf20Sopenharmony_ci	  the module clock. See ../clocks/clock-bindings.txt for details.
228c2ecf20Sopenharmony_ci- clock-names: For Tegra210, Tegra186 and Tegra194 must contain the
238c2ecf20Sopenharmony_ci	       strings 'sdhci' and 'tmclk' to represent the module and
248c2ecf20Sopenharmony_ci	       the timeout clocks, respectively.
258c2ecf20Sopenharmony_ci	       For all other Tegra devices must contain the string 'sdhci'
268c2ecf20Sopenharmony_ci	       to represent the module clock.
278c2ecf20Sopenharmony_ci- resets : Must contain an entry for each entry in reset-names.
288c2ecf20Sopenharmony_ci  See ../reset/reset.txt for details.
298c2ecf20Sopenharmony_ci- reset-names : Must include the following entries:
308c2ecf20Sopenharmony_ci  - sdhci
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ciOptional properties:
338c2ecf20Sopenharmony_ci- power-gpios : Specify GPIOs for power control
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ciExample:
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_cisdhci@c8000200 {
388c2ecf20Sopenharmony_ci	compatible = "nvidia,tegra20-sdhci";
398c2ecf20Sopenharmony_ci	reg = <0xc8000200 0x200>;
408c2ecf20Sopenharmony_ci	interrupts = <47>;
418c2ecf20Sopenharmony_ci	clocks = <&tegra_car 14>;
428c2ecf20Sopenharmony_ci	resets = <&tegra_car 14>;
438c2ecf20Sopenharmony_ci	reset-names = "sdhci";
448c2ecf20Sopenharmony_ci	cd-gpios = <&gpio 69 0>; /* gpio PI5 */
458c2ecf20Sopenharmony_ci	wp-gpios = <&gpio 57 0>; /* gpio PH1 */
468c2ecf20Sopenharmony_ci	power-gpios = <&gpio 155 0>; /* gpio PT3 */
478c2ecf20Sopenharmony_ci	bus-width = <8>;
488c2ecf20Sopenharmony_ci};
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ciOptional properties for Tegra210, Tegra186 and Tegra194:
518c2ecf20Sopenharmony_ci- pinctrl-names, pinctrl-0, pinctrl-1 : Specify pad voltage
528c2ecf20Sopenharmony_ci  configurations. Valid pinctrl-names are "sdmmc-3v3" and "sdmmc-1v8"
538c2ecf20Sopenharmony_ci  for controllers supporting multiple voltage levels. The order of names
548c2ecf20Sopenharmony_ci  should correspond to the pin configuration states in pinctrl-0 and
558c2ecf20Sopenharmony_ci  pinctrl-1.
568c2ecf20Sopenharmony_ci- pinctrl-names : "sdmmc-3v3-drv" and "sdmmc-1v8-drv" are applicable for
578c2ecf20Sopenharmony_ci  Tegra210 where pad config registers are in the pinmux register domain
588c2ecf20Sopenharmony_ci  for pull-up-strength and pull-down-strength values configuration when
598c2ecf20Sopenharmony_ci  using pads at 3V3 and 1V8 levels.
608c2ecf20Sopenharmony_ci- nvidia,only-1-8-v : The presence of this property indicates that the
618c2ecf20Sopenharmony_ci  controller operates at a 1.8 V fixed I/O voltage.
628c2ecf20Sopenharmony_ci- nvidia,pad-autocal-pull-up-offset-3v3,
638c2ecf20Sopenharmony_ci  nvidia,pad-autocal-pull-down-offset-3v3 : Specify drive strength
648c2ecf20Sopenharmony_ci  calibration offsets for 3.3 V signaling modes.
658c2ecf20Sopenharmony_ci- nvidia,pad-autocal-pull-up-offset-1v8,
668c2ecf20Sopenharmony_ci  nvidia,pad-autocal-pull-down-offset-1v8 : Specify drive strength
678c2ecf20Sopenharmony_ci  calibration offsets for 1.8 V signaling modes.
688c2ecf20Sopenharmony_ci- nvidia,pad-autocal-pull-up-offset-3v3-timeout,
698c2ecf20Sopenharmony_ci  nvidia,pad-autocal-pull-down-offset-3v3-timeout : Specify drive
708c2ecf20Sopenharmony_ci  strength used as a fallback in case the automatic calibration times
718c2ecf20Sopenharmony_ci  out on a 3.3 V signaling mode.
728c2ecf20Sopenharmony_ci- nvidia,pad-autocal-pull-up-offset-1v8-timeout,
738c2ecf20Sopenharmony_ci  nvidia,pad-autocal-pull-down-offset-1v8-timeout : Specify drive
748c2ecf20Sopenharmony_ci  strength used as a fallback in case the automatic calibration times
758c2ecf20Sopenharmony_ci  out on a 1.8 V signaling mode.
768c2ecf20Sopenharmony_ci- nvidia,pad-autocal-pull-up-offset-sdr104,
778c2ecf20Sopenharmony_ci  nvidia,pad-autocal-pull-down-offset-sdr104 : Specify drive strength
788c2ecf20Sopenharmony_ci  calibration offsets for SDR104 mode.
798c2ecf20Sopenharmony_ci- nvidia,pad-autocal-pull-up-offset-hs400,
808c2ecf20Sopenharmony_ci  nvidia,pad-autocal-pull-down-offset-hs400 : Specify drive strength
818c2ecf20Sopenharmony_ci  calibration offsets for HS400 mode.
828c2ecf20Sopenharmony_ci- nvidia,default-tap : Specify the default inbound sampling clock
838c2ecf20Sopenharmony_ci  trimmer value for non-tunable modes.
848c2ecf20Sopenharmony_ci- nvidia,default-trim : Specify the default outbound clock trimmer
858c2ecf20Sopenharmony_ci  value.
868c2ecf20Sopenharmony_ci- nvidia,dqs-trim : Specify DQS trim value for HS400 timing
878c2ecf20Sopenharmony_ci
888c2ecf20Sopenharmony_ci  Notes on the pad calibration pull up and pulldown offset values:
898c2ecf20Sopenharmony_ci    - The property values are drive codes which are programmed into the
908c2ecf20Sopenharmony_ci      PD_OFFSET and PU_OFFSET sections of the
918c2ecf20Sopenharmony_ci      SDHCI_TEGRA_AUTO_CAL_CONFIG register.
928c2ecf20Sopenharmony_ci    - A higher value corresponds to higher drive strength. Please refer
938c2ecf20Sopenharmony_ci      to the reference manual of the SoC for correct values.
948c2ecf20Sopenharmony_ci    - The SDR104 and HS400 timing specific values are used in
958c2ecf20Sopenharmony_ci      corresponding modes if specified.
968c2ecf20Sopenharmony_ci
978c2ecf20Sopenharmony_ci  Notes on tap and trim values:
988c2ecf20Sopenharmony_ci    - The values are used for compensating trace length differences
998c2ecf20Sopenharmony_ci      by adjusting the sampling point.
1008c2ecf20Sopenharmony_ci    - The values are programmed to the Vendor Clock Control Register.
1018c2ecf20Sopenharmony_ci      Please refer to the reference manual of the SoC for correct
1028c2ecf20Sopenharmony_ci      values.
1038c2ecf20Sopenharmony_ci    - The DQS trim values are only used on controllers which support
1048c2ecf20Sopenharmony_ci      HS400 timing. Only SDMMC4 on Tegra210 and Tegra 186 supports
1058c2ecf20Sopenharmony_ci      HS400.
1068c2ecf20Sopenharmony_ci
1078c2ecf20Sopenharmony_ciExample:
1088c2ecf20Sopenharmony_cisdhci@700b0000 {
1098c2ecf20Sopenharmony_ci	compatible = "nvidia,tegra124-sdhci";
1108c2ecf20Sopenharmony_ci	reg = <0x0 0x700b0000 0x0 0x200>;
1118c2ecf20Sopenharmony_ci	interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
1128c2ecf20Sopenharmony_ci	clocks = <&tegra_car TEGRA210_CLK_SDMMC1>;
1138c2ecf20Sopenharmony_ci	clock-names = "sdhci";
1148c2ecf20Sopenharmony_ci	resets = <&tegra_car 14>;
1158c2ecf20Sopenharmony_ci	reset-names = "sdhci";
1168c2ecf20Sopenharmony_ci	pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
1178c2ecf20Sopenharmony_ci	pinctrl-0 = <&sdmmc1_3v3>;
1188c2ecf20Sopenharmony_ci	pinctrl-1 = <&sdmmc1_1v8>;
1198c2ecf20Sopenharmony_ci	nvidia,pad-autocal-pull-up-offset-3v3 = <0x00>;
1208c2ecf20Sopenharmony_ci	nvidia,pad-autocal-pull-down-offset-3v3 = <0x7d>;
1218c2ecf20Sopenharmony_ci	nvidia,pad-autocal-pull-up-offset-1v8 = <0x7b>;
1228c2ecf20Sopenharmony_ci	nvidia,pad-autocal-pull-down-offset-1v8 = <0x7b>;
1238c2ecf20Sopenharmony_ci	status = "disabled";
1248c2ecf20Sopenharmony_ci};
1258c2ecf20Sopenharmony_ci
1268c2ecf20Sopenharmony_cisdhci@700b0000 {
1278c2ecf20Sopenharmony_ci	compatible = "nvidia,tegra210-sdhci";
1288c2ecf20Sopenharmony_ci	reg = <0x0 0x700b0000 0x0 0x200>;
1298c2ecf20Sopenharmony_ci	interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
1308c2ecf20Sopenharmony_ci	clocks = <&tegra_car TEGRA210_CLK_SDMMC1>,
1318c2ecf20Sopenharmony_ci		 <&tegra_car TEGRA210_CLK_SDMMC_LEGACY>;
1328c2ecf20Sopenharmony_ci	clock-names = "sdhci", "tmclk";
1338c2ecf20Sopenharmony_ci	resets = <&tegra_car 14>;
1348c2ecf20Sopenharmony_ci	reset-names = "sdhci";
1358c2ecf20Sopenharmony_ci	pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
1368c2ecf20Sopenharmony_ci	pinctrl-0 = <&sdmmc1_3v3>;
1378c2ecf20Sopenharmony_ci	pinctrl-1 = <&sdmmc1_1v8>;
1388c2ecf20Sopenharmony_ci	nvidia,pad-autocal-pull-up-offset-3v3 = <0x00>;
1398c2ecf20Sopenharmony_ci	nvidia,pad-autocal-pull-down-offset-3v3 = <0x7d>;
1408c2ecf20Sopenharmony_ci	nvidia,pad-autocal-pull-up-offset-1v8 = <0x7b>;
1418c2ecf20Sopenharmony_ci	nvidia,pad-autocal-pull-down-offset-1v8 = <0x7b>;
1428c2ecf20Sopenharmony_ci	status = "disabled";
1438c2ecf20Sopenharmony_ci};
144