1e67e8565SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2e67e8565SEmmanuel Vadot%YAML 1.2 3e67e8565SEmmanuel Vadot--- 4e67e8565SEmmanuel Vadot$id: http://devicetree.org/schemas/mmc/nvidia,tegra20-sdhci.yaml# 5e67e8565SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6e67e8565SEmmanuel Vadot 7e67e8565SEmmanuel Vadottitle: NVIDIA Tegra Secure Digital Host Controller 8e67e8565SEmmanuel Vadot 9e67e8565SEmmanuel Vadotmaintainers: 10e67e8565SEmmanuel Vadot - Thierry Reding <thierry.reding@gmail.com> 11e67e8565SEmmanuel Vadot - Jon Hunter <jonathanh@nvidia.com> 12e67e8565SEmmanuel Vadot 13e67e8565SEmmanuel Vadotdescription: | 14e67e8565SEmmanuel Vadot This controller on Tegra family SoCs provides an interface for MMC, SD, and 15e67e8565SEmmanuel Vadot SDIO types of memory cards. 16e67e8565SEmmanuel Vadot 17e67e8565SEmmanuel Vadot This file documents differences between the core properties described by 18e67e8565SEmmanuel Vadot mmc-controller.yaml and the properties for the Tegra SDHCI controller. 19e67e8565SEmmanuel Vadot 20e67e8565SEmmanuel Vadotproperties: 21e67e8565SEmmanuel Vadot compatible: 22e67e8565SEmmanuel Vadot oneOf: 23e67e8565SEmmanuel Vadot - enum: 24e67e8565SEmmanuel Vadot - nvidia,tegra20-sdhci 25e67e8565SEmmanuel Vadot - nvidia,tegra30-sdhci 26e67e8565SEmmanuel Vadot - nvidia,tegra114-sdhci 27e67e8565SEmmanuel Vadot - nvidia,tegra124-sdhci 28e67e8565SEmmanuel Vadot - nvidia,tegra210-sdhci 29e67e8565SEmmanuel Vadot - nvidia,tegra186-sdhci 30e67e8565SEmmanuel Vadot - nvidia,tegra194-sdhci 31e67e8565SEmmanuel Vadot 32e67e8565SEmmanuel Vadot - items: 33e67e8565SEmmanuel Vadot - const: nvidia,tegra132-sdhci 34e67e8565SEmmanuel Vadot - const: nvidia,tegra124-sdhci 35e67e8565SEmmanuel Vadot 36e67e8565SEmmanuel Vadot - items: 37e67e8565SEmmanuel Vadot - enum: 38e67e8565SEmmanuel Vadot - nvidia,tegra194-sdhci 39e67e8565SEmmanuel Vadot - nvidia,tegra234-sdhci 40e67e8565SEmmanuel Vadot - const: nvidia,tegra186-sdhci 41e67e8565SEmmanuel Vadot 42e67e8565SEmmanuel Vadot reg: 43e67e8565SEmmanuel Vadot maxItems: 1 44e67e8565SEmmanuel Vadot 45e67e8565SEmmanuel Vadot interrupts: 46e67e8565SEmmanuel Vadot maxItems: 1 47e67e8565SEmmanuel Vadot 48e67e8565SEmmanuel Vadot assigned-clocks: true 49e67e8565SEmmanuel Vadot assigned-clock-parents: true 50e67e8565SEmmanuel Vadot assigned-clock-rates: true 51e67e8565SEmmanuel Vadot 52e67e8565SEmmanuel Vadot clocks: 53e67e8565SEmmanuel Vadot minItems: 1 54e67e8565SEmmanuel Vadot maxItems: 2 55e67e8565SEmmanuel Vadot 56e67e8565SEmmanuel Vadot clock-names: 57e67e8565SEmmanuel Vadot minItems: 1 58e67e8565SEmmanuel Vadot maxItems: 2 59e67e8565SEmmanuel Vadot 60e67e8565SEmmanuel Vadot resets: 61e67e8565SEmmanuel Vadot items: 62e67e8565SEmmanuel Vadot - description: module reset 63e67e8565SEmmanuel Vadot 64e67e8565SEmmanuel Vadot reset-names: 65e67e8565SEmmanuel Vadot items: 66e67e8565SEmmanuel Vadot - const: sdhci 67e67e8565SEmmanuel Vadot 68e67e8565SEmmanuel Vadot power-gpios: 69e67e8565SEmmanuel Vadot description: specify GPIOs for power control 70e67e8565SEmmanuel Vadot maxItems: 1 71e67e8565SEmmanuel Vadot 72e67e8565SEmmanuel Vadot interconnects: 73e67e8565SEmmanuel Vadot items: 74e67e8565SEmmanuel Vadot - description: memory read client 75e67e8565SEmmanuel Vadot - description: memory write client 76e67e8565SEmmanuel Vadot 77e67e8565SEmmanuel Vadot interconnect-names: 78e67e8565SEmmanuel Vadot items: 79e67e8565SEmmanuel Vadot - const: dma-mem # read 80e67e8565SEmmanuel Vadot - const: write 81e67e8565SEmmanuel Vadot 82e67e8565SEmmanuel Vadot iommus: 83e67e8565SEmmanuel Vadot maxItems: 1 84e67e8565SEmmanuel Vadot 85*cb7aa33aSEmmanuel Vadot operating-points-v2: true 86e67e8565SEmmanuel Vadot 87e67e8565SEmmanuel Vadot power-domains: 88e67e8565SEmmanuel Vadot items: 89e67e8565SEmmanuel Vadot - description: phandle to the core power domain 90e67e8565SEmmanuel Vadot 91e67e8565SEmmanuel Vadot nvidia,default-tap: 92e67e8565SEmmanuel Vadot description: Specify the default inbound sampling clock trimmer value for 93e67e8565SEmmanuel Vadot non-tunable modes. 94e67e8565SEmmanuel Vadot 95e67e8565SEmmanuel Vadot The values are used for compensating trace length differences by 96e67e8565SEmmanuel Vadot adjusting the sampling point. The values are programmed to the Vendor 97e67e8565SEmmanuel Vadot Clock Control Register. Please refer to the reference manual of the SoC 98e67e8565SEmmanuel Vadot for correct values. 99e67e8565SEmmanuel Vadot 100e67e8565SEmmanuel Vadot The DQS trim values are only used on controllers which support HS400 101e67e8565SEmmanuel Vadot timing. Only SDMMC4 on Tegra210 and Tegra186 supports HS400. 102*cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 103e67e8565SEmmanuel Vadot 104e67e8565SEmmanuel Vadot nvidia,default-trim: 105e67e8565SEmmanuel Vadot description: Specify the default outbound clock trimmer value. 106*cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 107e67e8565SEmmanuel Vadot 108e67e8565SEmmanuel Vadot nvidia,dqs-trim: 109e67e8565SEmmanuel Vadot description: Specify DQS trim value for HS400 timing. 110*cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 111e67e8565SEmmanuel Vadot 112e67e8565SEmmanuel Vadot nvidia,pad-autocal-pull-down-offset-1v8: 113e67e8565SEmmanuel Vadot description: Specify drive strength calibration offsets for 1.8 V 114e67e8565SEmmanuel Vadot signaling modes. 115*cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 116e67e8565SEmmanuel Vadot 117e67e8565SEmmanuel Vadot nvidia,pad-autocal-pull-down-offset-1v8-timeout: 118e67e8565SEmmanuel Vadot description: Specify drive strength used as a fallback in case the 119e67e8565SEmmanuel Vadot automatic calibration times out on a 1.8 V signaling mode. 120*cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 121e67e8565SEmmanuel Vadot 122e67e8565SEmmanuel Vadot nvidia,pad-autocal-pull-down-offset-3v3: 123e67e8565SEmmanuel Vadot description: Specify drive strength calibration offsets for 3.3 V 124e67e8565SEmmanuel Vadot signaling modes. 125*cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 126e67e8565SEmmanuel Vadot 127e67e8565SEmmanuel Vadot nvidia,pad-autocal-pull-down-offset-3v3-timeout: 128e67e8565SEmmanuel Vadot description: Specify drive strength used as a fallback in case the 129e67e8565SEmmanuel Vadot automatic calibration times out on a 3.3 V signaling mode. 130*cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 131e67e8565SEmmanuel Vadot 132e67e8565SEmmanuel Vadot nvidia,pad-autocal-pull-down-offset-sdr104: 133e67e8565SEmmanuel Vadot description: Specify drive strength calibration offsets for SDR104 mode. 134*cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 135e67e8565SEmmanuel Vadot 136e67e8565SEmmanuel Vadot nvidia,pad-autocal-pull-down-offset-hs400: 137e67e8565SEmmanuel Vadot description: Specify drive strength calibration offsets for HS400 mode. 138*cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 139e67e8565SEmmanuel Vadot 140e67e8565SEmmanuel Vadot nvidia,pad-autocal-pull-up-offset-1v8: 141e67e8565SEmmanuel Vadot description: Specify drive strength calibration offsets for 1.8 V 142e67e8565SEmmanuel Vadot signaling modes. 143*cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 144e67e8565SEmmanuel Vadot 145e67e8565SEmmanuel Vadot nvidia,pad-autocal-pull-up-offset-1v8-timeout: 146e67e8565SEmmanuel Vadot description: Specify drive strength used as a fallback in case the 147e67e8565SEmmanuel Vadot automatic calibration times out on a 1.8 V signaling mode. 148*cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 149e67e8565SEmmanuel Vadot 150e67e8565SEmmanuel Vadot nvidia,pad-autocal-pull-up-offset-3v3: 151e67e8565SEmmanuel Vadot description: Specify drive strength calibration offsets for 3.3 V 152e67e8565SEmmanuel Vadot signaling modes. 153e67e8565SEmmanuel Vadot 154e67e8565SEmmanuel Vadot The property values are drive codes which are programmed into the 155e67e8565SEmmanuel Vadot PD_OFFSET and PU_OFFSET sections of the SDHCI_TEGRA_AUTO_CAL_CONFIG 156e67e8565SEmmanuel Vadot register. A higher value corresponds to higher drive strength. Please 157e67e8565SEmmanuel Vadot refer to the reference manual of the SoC for correct values. The SDR104 158e67e8565SEmmanuel Vadot and HS400 timing specific values are used in corresponding modes if 159e67e8565SEmmanuel Vadot specified. 160*cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 161e67e8565SEmmanuel Vadot 162e67e8565SEmmanuel Vadot nvidia,pad-autocal-pull-up-offset-3v3-timeout: 163e67e8565SEmmanuel Vadot description: Specify drive strength used as a fallback in case the 164e67e8565SEmmanuel Vadot automatic calibration times out on a 3.3 V signaling mode. 165*cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 166e67e8565SEmmanuel Vadot 167e67e8565SEmmanuel Vadot nvidia,pad-autocal-pull-up-offset-sdr104: 168e67e8565SEmmanuel Vadot description: Specify drive strength calibration offsets for SDR104 mode. 169*cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 170e67e8565SEmmanuel Vadot 171e67e8565SEmmanuel Vadot nvidia,pad-autocal-pull-up-offset-hs400: 172e67e8565SEmmanuel Vadot description: Specify drive strength calibration offsets for HS400 mode. 173*cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 174e67e8565SEmmanuel Vadot 175e67e8565SEmmanuel Vadot nvidia,only-1-8v: 176e67e8565SEmmanuel Vadot description: The presence of this property indicates that the controller 177e67e8565SEmmanuel Vadot operates at a 1.8 V fixed I/O voltage. 178*cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 179e67e8565SEmmanuel Vadot 180e67e8565SEmmanuel Vadotrequired: 181e67e8565SEmmanuel Vadot - compatible 182e67e8565SEmmanuel Vadot - reg 183e67e8565SEmmanuel Vadot - interrupts 184e67e8565SEmmanuel Vadot - clocks 185e67e8565SEmmanuel Vadot - resets 186e67e8565SEmmanuel Vadot - reset-names 187e67e8565SEmmanuel Vadot 188e67e8565SEmmanuel VadotallOf: 189*cb7aa33aSEmmanuel Vadot - $ref: mmc-controller.yaml 190e67e8565SEmmanuel Vadot - if: 191e67e8565SEmmanuel Vadot properties: 192e67e8565SEmmanuel Vadot compatible: 193e67e8565SEmmanuel Vadot contains: 194e67e8565SEmmanuel Vadot enum: 195e67e8565SEmmanuel Vadot - nvidia,tegra20-sdhci 196e67e8565SEmmanuel Vadot - nvidia,tegra30-sdhci 197e67e8565SEmmanuel Vadot - nvidia,tegra114-sdhci 198e67e8565SEmmanuel Vadot - nvidia,tegra124-sdhci 199c9ccf3a3SEmmanuel Vadot then: 200c9ccf3a3SEmmanuel Vadot properties: 201e67e8565SEmmanuel Vadot clocks: 202e67e8565SEmmanuel Vadot items: 203e67e8565SEmmanuel Vadot - description: module clock 204e67e8565SEmmanuel Vadot else: 205e67e8565SEmmanuel Vadot properties: 206e67e8565SEmmanuel Vadot clocks: 207e67e8565SEmmanuel Vadot items: 208e67e8565SEmmanuel Vadot - description: module clock 209e67e8565SEmmanuel Vadot - description: timeout clock 210c9ccf3a3SEmmanuel Vadot 211e67e8565SEmmanuel Vadot clock-names: 212e67e8565SEmmanuel Vadot items: 213e67e8565SEmmanuel Vadot - const: sdhci 214e67e8565SEmmanuel Vadot - const: tmclk 215e67e8565SEmmanuel Vadot required: 216e67e8565SEmmanuel Vadot - clock-names 217e67e8565SEmmanuel Vadot 218e67e8565SEmmanuel Vadot - if: 219e67e8565SEmmanuel Vadot properties: 220e67e8565SEmmanuel Vadot compatible: 221e67e8565SEmmanuel Vadot contains: 222e67e8565SEmmanuel Vadot const: nvidia,tegra210-sdhci 223e67e8565SEmmanuel Vadot then: 224e67e8565SEmmanuel Vadot properties: 225e67e8565SEmmanuel Vadot pinctrl-names: 226e67e8565SEmmanuel Vadot oneOf: 227e67e8565SEmmanuel Vadot - items: 228e67e8565SEmmanuel Vadot - const: sdmmc-3v3 229e67e8565SEmmanuel Vadot description: pad configuration for 3.3 V 230e67e8565SEmmanuel Vadot - const: sdmmc-1v8 231e67e8565SEmmanuel Vadot description: pad configuration for 1.8 V 232e67e8565SEmmanuel Vadot - const: sdmmc-3v3-drv 233e67e8565SEmmanuel Vadot description: pull-up/down configuration for 3.3 V 234e67e8565SEmmanuel Vadot - const: sdmmc-1v8-drv 235e67e8565SEmmanuel Vadot description: pull-up/down configuration for 1.8 V 236e67e8565SEmmanuel Vadot - items: 237e67e8565SEmmanuel Vadot - const: sdmmc-3v3-drv 238e67e8565SEmmanuel Vadot description: pull-up/down configuration for 3.3 V 239e67e8565SEmmanuel Vadot - const: sdmmc-1v8-drv 240e67e8565SEmmanuel Vadot description: pull-up/down configuration for 1.8 V 241e67e8565SEmmanuel Vadot - items: 242e67e8565SEmmanuel Vadot - const: sdmmc-1v8-drv 243e67e8565SEmmanuel Vadot description: pull-up/down configuration for 1.8 V 244e67e8565SEmmanuel Vadot required: 245e67e8565SEmmanuel Vadot - clock-names 246e67e8565SEmmanuel Vadot - if: 247e67e8565SEmmanuel Vadot properties: 248e67e8565SEmmanuel Vadot compatible: 249e67e8565SEmmanuel Vadot contains: 250e67e8565SEmmanuel Vadot enum: 251e67e8565SEmmanuel Vadot - nvidia,tegra186-sdhci 252e67e8565SEmmanuel Vadot - nvidia,tegra194-sdhci 253e67e8565SEmmanuel Vadot then: 254e67e8565SEmmanuel Vadot properties: 255e67e8565SEmmanuel Vadot pinctrl-names: 256e67e8565SEmmanuel Vadot items: 257e67e8565SEmmanuel Vadot - const: sdmmc-3v3 258e67e8565SEmmanuel Vadot description: pad configuration for 3.3 V 259e67e8565SEmmanuel Vadot - const: sdmmc-1v8 260e67e8565SEmmanuel Vadot description: pad configuration for 1.8 V 261e67e8565SEmmanuel Vadot required: 262e67e8565SEmmanuel Vadot - clock-names 263e67e8565SEmmanuel Vadot 264e67e8565SEmmanuel VadotunevaluatedProperties: false 265e67e8565SEmmanuel Vadot 266e67e8565SEmmanuel Vadotexamples: 267e67e8565SEmmanuel Vadot - | 268e67e8565SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 269e67e8565SEmmanuel Vadot 270e67e8565SEmmanuel Vadot mmc@c8000200 { 271e67e8565SEmmanuel Vadot compatible = "nvidia,tegra20-sdhci"; 272e67e8565SEmmanuel Vadot reg = <0xc8000200 0x200>; 273e67e8565SEmmanuel Vadot interrupts = <47>; 274e67e8565SEmmanuel Vadot clocks = <&tegra_car 14>; 275e67e8565SEmmanuel Vadot resets = <&tegra_car 14>; 276e67e8565SEmmanuel Vadot reset-names = "sdhci"; 277e67e8565SEmmanuel Vadot cd-gpios = <&gpio 69 0>; /* gpio PI5 */ 278e67e8565SEmmanuel Vadot wp-gpios = <&gpio 57 0>; /* gpio PH1 */ 279e67e8565SEmmanuel Vadot power-gpios = <&gpio 155 0>; /* gpio PT3 */ 280e67e8565SEmmanuel Vadot bus-width = <8>; 281e67e8565SEmmanuel Vadot }; 282e67e8565SEmmanuel Vadot 283e67e8565SEmmanuel Vadot - | 284e67e8565SEmmanuel Vadot #include <dt-bindings/clock/tegra210-car.h> 285e67e8565SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 286e67e8565SEmmanuel Vadot 287e67e8565SEmmanuel Vadot mmc@700b0000 { 288e67e8565SEmmanuel Vadot compatible = "nvidia,tegra210-sdhci"; 289e67e8565SEmmanuel Vadot reg = <0x700b0000 0x200>; 290e67e8565SEmmanuel Vadot interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; 291e67e8565SEmmanuel Vadot clocks = <&tegra_car TEGRA210_CLK_SDMMC1>, 292e67e8565SEmmanuel Vadot <&tegra_car TEGRA210_CLK_SDMMC_LEGACY>; 293e67e8565SEmmanuel Vadot clock-names = "sdhci", "tmclk"; 294e67e8565SEmmanuel Vadot resets = <&tegra_car 14>; 295e67e8565SEmmanuel Vadot reset-names = "sdhci"; 296e67e8565SEmmanuel Vadot pinctrl-names = "sdmmc-3v3", "sdmmc-1v8", 297e67e8565SEmmanuel Vadot "sdmmc-3v3-drv", "sdmmc-1v8-drv"; 298e67e8565SEmmanuel Vadot pinctrl-0 = <&sdmmc1_3v3>; 299e67e8565SEmmanuel Vadot pinctrl-1 = <&sdmmc1_1v8>; 300e67e8565SEmmanuel Vadot pinctrl-2 = <&sdmmc1_3v3_drv>; 301e67e8565SEmmanuel Vadot pinctrl-3 = <&sdmmc1_1v8_drv>; 302e67e8565SEmmanuel Vadot nvidia,pad-autocal-pull-up-offset-3v3 = <0x00>; 303e67e8565SEmmanuel Vadot nvidia,pad-autocal-pull-down-offset-3v3 = <0x7d>; 304e67e8565SEmmanuel Vadot nvidia,pad-autocal-pull-up-offset-1v8 = <0x7b>; 305e67e8565SEmmanuel Vadot nvidia,pad-autocal-pull-down-offset-1v8 = <0x7b>; 306e67e8565SEmmanuel Vadot nvidia,default-tap = <0x2>; 307e67e8565SEmmanuel Vadot nvidia,default-trim = <0x4>; 308e67e8565SEmmanuel Vadot assigned-clocks = <&tegra_car TEGRA210_CLK_SDMMC4>, 309e67e8565SEmmanuel Vadot <&tegra_car TEGRA210_CLK_PLL_C4_OUT0>, 310e67e8565SEmmanuel Vadot <&tegra_car TEGRA210_CLK_PLL_C4>; 311e67e8565SEmmanuel Vadot assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_C4_OUT0>; 312e67e8565SEmmanuel Vadot assigned-clock-rates = <200000000>, <1000000000>, <1000000000>; 313e67e8565SEmmanuel Vadot }; 314