1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0 2*4882a593Smuzhiyun%YAML 1.2 3*4882a593Smuzhiyun--- 4*4882a593Smuzhiyun$id: http://devicetree.org/schemas/mmc/mmc-controller.yaml# 5*4882a593Smuzhiyun$schema: http://devicetree.org/meta-schemas/core.yaml# 6*4882a593Smuzhiyun 7*4882a593Smuzhiyuntitle: MMC Controller Generic Binding 8*4882a593Smuzhiyun 9*4882a593Smuzhiyunmaintainers: 10*4882a593Smuzhiyun - Ulf Hansson <ulf.hansson@linaro.org> 11*4882a593Smuzhiyun 12*4882a593Smuzhiyundescription: | 13*4882a593Smuzhiyun These properties are common to multiple MMC host controllers. Any host 14*4882a593Smuzhiyun that requires the respective functionality should implement them using 15*4882a593Smuzhiyun these definitions. 16*4882a593Smuzhiyun 17*4882a593Smuzhiyun It is possible to assign a fixed index mmcN to an MMC host controller 18*4882a593Smuzhiyun (and the corresponding mmcblkN devices) by defining an alias in the 19*4882a593Smuzhiyun /aliases device tree node. 20*4882a593Smuzhiyun 21*4882a593Smuzhiyunproperties: 22*4882a593Smuzhiyun $nodename: 23*4882a593Smuzhiyun pattern: "^mmc(@.*)?$" 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun "#address-cells": 26*4882a593Smuzhiyun const: 1 27*4882a593Smuzhiyun description: | 28*4882a593Smuzhiyun The cell is the slot ID if a function subnode is used. 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun "#size-cells": 31*4882a593Smuzhiyun const: 0 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun # Card Detection. 34*4882a593Smuzhiyun # If none of these properties are supplied, the host native card 35*4882a593Smuzhiyun # detect will be used. Only one of them should be provided. 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun broken-cd: 38*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 39*4882a593Smuzhiyun description: 40*4882a593Smuzhiyun There is no card detection available; polling must be used. 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun cd-gpios: 43*4882a593Smuzhiyun description: 44*4882a593Smuzhiyun The card detection will be done using the GPIO provided. 45*4882a593Smuzhiyun 46*4882a593Smuzhiyun non-removable: 47*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 48*4882a593Smuzhiyun description: 49*4882a593Smuzhiyun Non-removable slot (like eMMC); assume always present. 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun # *NOTE* on CD and WP polarity. To use common for all SD/MMC host 52*4882a593Smuzhiyun # controllers line polarity properties, we have to fix the meaning 53*4882a593Smuzhiyun # of the "normal" and "inverted" line levels. We choose to follow 54*4882a593Smuzhiyun # the SDHCI standard, which specifies both those lines as "active 55*4882a593Smuzhiyun # low." Therefore, using the "cd-inverted" property means, that the 56*4882a593Smuzhiyun # CD line is active high, i.e. it is high, when a card is 57*4882a593Smuzhiyun # inserted. Similar logic applies to the "wp-inverted" property. 58*4882a593Smuzhiyun # 59*4882a593Smuzhiyun # CD and WP lines can be implemented on the hardware in one of two 60*4882a593Smuzhiyun # ways: as GPIOs, specified in cd-gpios and wp-gpios properties, or 61*4882a593Smuzhiyun # as dedicated pins. Polarity of dedicated pins can be specified, 62*4882a593Smuzhiyun # using *-inverted properties. GPIO polarity can also be specified 63*4882a593Smuzhiyun # using the GPIO_ACTIVE_LOW flag. This creates an ambiguity in the 64*4882a593Smuzhiyun # latter case. We choose to use the XOR logic for GPIO CD and WP 65*4882a593Smuzhiyun # lines. This means, the two properties are "superimposed," for 66*4882a593Smuzhiyun # example leaving the GPIO_ACTIVE_LOW flag clear and specifying the 67*4882a593Smuzhiyun # respective *-inverted property property results in a 68*4882a593Smuzhiyun # double-inversion and actually means the "normal" line polarity is 69*4882a593Smuzhiyun # in effect. 70*4882a593Smuzhiyun wp-inverted: 71*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 72*4882a593Smuzhiyun description: 73*4882a593Smuzhiyun The Write Protect line polarity is inverted. 74*4882a593Smuzhiyun 75*4882a593Smuzhiyun cd-inverted: 76*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 77*4882a593Smuzhiyun description: 78*4882a593Smuzhiyun The CD line polarity is inverted. 79*4882a593Smuzhiyun 80*4882a593Smuzhiyun # Other properties 81*4882a593Smuzhiyun 82*4882a593Smuzhiyun bus-width: 83*4882a593Smuzhiyun description: 84*4882a593Smuzhiyun Number of data lines. 85*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 86*4882a593Smuzhiyun enum: [1, 4, 8] 87*4882a593Smuzhiyun default: 1 88*4882a593Smuzhiyun 89*4882a593Smuzhiyun max-frequency: 90*4882a593Smuzhiyun description: 91*4882a593Smuzhiyun Maximum operating frequency of the bus. 92*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 93*4882a593Smuzhiyun minimum: 400000 94*4882a593Smuzhiyun maximum: 200000000 95*4882a593Smuzhiyun 96*4882a593Smuzhiyun disable-wp: 97*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 98*4882a593Smuzhiyun description: 99*4882a593Smuzhiyun When set, no physical write-protect line is present. This 100*4882a593Smuzhiyun property should only be specified when the controller has a 101*4882a593Smuzhiyun dedicated write-protect detection logic. If a GPIO is always used 102*4882a593Smuzhiyun for the write-protect detection logic, it is sufficient to not 103*4882a593Smuzhiyun specify the wp-gpios property in the absence of a write-protect 104*4882a593Smuzhiyun line. Not used in combination with eMMC or SDIO. 105*4882a593Smuzhiyun 106*4882a593Smuzhiyun wp-gpios: 107*4882a593Smuzhiyun description: 108*4882a593Smuzhiyun GPIO to use for the write-protect detection. 109*4882a593Smuzhiyun 110*4882a593Smuzhiyun cd-debounce-delay-ms: 111*4882a593Smuzhiyun description: 112*4882a593Smuzhiyun Set delay time before detecting card after card insert 113*4882a593Smuzhiyun interrupt. 114*4882a593Smuzhiyun 115*4882a593Smuzhiyun no-1-8-v: 116*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 117*4882a593Smuzhiyun description: 118*4882a593Smuzhiyun When specified, denotes that 1.8V card voltage is not supported 119*4882a593Smuzhiyun on this system, even if the controller claims it. 120*4882a593Smuzhiyun 121*4882a593Smuzhiyun cap-sd-highspeed: 122*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 123*4882a593Smuzhiyun description: 124*4882a593Smuzhiyun SD high-speed timing is supported. 125*4882a593Smuzhiyun 126*4882a593Smuzhiyun cap-mmc-highspeed: 127*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 128*4882a593Smuzhiyun description: 129*4882a593Smuzhiyun MMC high-speed timing is supported. 130*4882a593Smuzhiyun 131*4882a593Smuzhiyun sd-uhs-sdr12: 132*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 133*4882a593Smuzhiyun description: 134*4882a593Smuzhiyun SD UHS SDR12 speed is supported. 135*4882a593Smuzhiyun 136*4882a593Smuzhiyun sd-uhs-sdr25: 137*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 138*4882a593Smuzhiyun description: 139*4882a593Smuzhiyun SD UHS SDR25 speed is supported. 140*4882a593Smuzhiyun 141*4882a593Smuzhiyun sd-uhs-sdr50: 142*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 143*4882a593Smuzhiyun description: 144*4882a593Smuzhiyun SD UHS SDR50 speed is supported. 145*4882a593Smuzhiyun 146*4882a593Smuzhiyun sd-uhs-sdr104: 147*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 148*4882a593Smuzhiyun description: 149*4882a593Smuzhiyun SD UHS SDR104 speed is supported. 150*4882a593Smuzhiyun 151*4882a593Smuzhiyun sd-uhs-ddr50: 152*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 153*4882a593Smuzhiyun description: 154*4882a593Smuzhiyun SD UHS DDR50 speed is supported. 155*4882a593Smuzhiyun 156*4882a593Smuzhiyun cap-power-off-card: 157*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 158*4882a593Smuzhiyun description: 159*4882a593Smuzhiyun Powering off the card is safe. 160*4882a593Smuzhiyun 161*4882a593Smuzhiyun cap-mmc-hw-reset: 162*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 163*4882a593Smuzhiyun description: 164*4882a593Smuzhiyun eMMC hardware reset is supported 165*4882a593Smuzhiyun 166*4882a593Smuzhiyun cap-sdio-irq: 167*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 168*4882a593Smuzhiyun description: 169*4882a593Smuzhiyun enable SDIO IRQ signalling on this interface 170*4882a593Smuzhiyun 171*4882a593Smuzhiyun full-pwr-cycle: 172*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 173*4882a593Smuzhiyun description: 174*4882a593Smuzhiyun Full power cycle of the card is supported. 175*4882a593Smuzhiyun 176*4882a593Smuzhiyun full-pwr-cycle-in-suspend: 177*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 178*4882a593Smuzhiyun description: 179*4882a593Smuzhiyun Full power cycle of the card in suspend is supported. 180*4882a593Smuzhiyun 181*4882a593Smuzhiyun mmc-ddr-1_2v: 182*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 183*4882a593Smuzhiyun description: 184*4882a593Smuzhiyun eMMC high-speed DDR mode (1.2V I/O) is supported. 185*4882a593Smuzhiyun 186*4882a593Smuzhiyun mmc-ddr-1_8v: 187*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 188*4882a593Smuzhiyun description: 189*4882a593Smuzhiyun eMMC high-speed DDR mode (1.8V I/O) is supported. 190*4882a593Smuzhiyun 191*4882a593Smuzhiyun mmc-ddr-3_3v: 192*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 193*4882a593Smuzhiyun description: 194*4882a593Smuzhiyun eMMC high-speed DDR mode (3.3V I/O) is supported. 195*4882a593Smuzhiyun 196*4882a593Smuzhiyun mmc-hs200-1_2v: 197*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 198*4882a593Smuzhiyun description: 199*4882a593Smuzhiyun eMMC HS200 mode (1.2V I/O) is supported. 200*4882a593Smuzhiyun 201*4882a593Smuzhiyun mmc-hs200-1_8v: 202*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 203*4882a593Smuzhiyun description: 204*4882a593Smuzhiyun eMMC HS200 mode (1.8V I/O) is supported. 205*4882a593Smuzhiyun 206*4882a593Smuzhiyun mmc-hs400-1_2v: 207*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 208*4882a593Smuzhiyun description: 209*4882a593Smuzhiyun eMMC HS400 mode (1.2V I/O) is supported. 210*4882a593Smuzhiyun 211*4882a593Smuzhiyun mmc-hs400-1_8v: 212*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 213*4882a593Smuzhiyun description: 214*4882a593Smuzhiyun eMMC HS400 mode (1.8V I/O) is supported. 215*4882a593Smuzhiyun 216*4882a593Smuzhiyun mmc-hs400-enhanced-strobe: 217*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 218*4882a593Smuzhiyun description: 219*4882a593Smuzhiyun eMMC HS400 enhanced strobe mode is supported 220*4882a593Smuzhiyun 221*4882a593Smuzhiyun dsr: 222*4882a593Smuzhiyun description: 223*4882a593Smuzhiyun Value the card Driver Stage Register (DSR) should be programmed 224*4882a593Smuzhiyun with. 225*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 226*4882a593Smuzhiyun minimum: 0 227*4882a593Smuzhiyun maximum: 0xffff 228*4882a593Smuzhiyun 229*4882a593Smuzhiyun no-sdio: 230*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 231*4882a593Smuzhiyun description: 232*4882a593Smuzhiyun Controller is limited to send SDIO commands during 233*4882a593Smuzhiyun initialization. 234*4882a593Smuzhiyun 235*4882a593Smuzhiyun no-sd: 236*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 237*4882a593Smuzhiyun description: 238*4882a593Smuzhiyun Controller is limited to send SD commands during initialization. 239*4882a593Smuzhiyun 240*4882a593Smuzhiyun no-mmc: 241*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 242*4882a593Smuzhiyun description: 243*4882a593Smuzhiyun Controller is limited to send MMC commands during 244*4882a593Smuzhiyun initialization. 245*4882a593Smuzhiyun 246*4882a593Smuzhiyun fixed-emmc-driver-type: 247*4882a593Smuzhiyun description: 248*4882a593Smuzhiyun For non-removable eMMC, enforce this driver type. The value is 249*4882a593Smuzhiyun the driver type as specified in the eMMC specification (table 250*4882a593Smuzhiyun 206 in spec version 5.1) 251*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 252*4882a593Smuzhiyun minimum: 0 253*4882a593Smuzhiyun maximum: 4 254*4882a593Smuzhiyun 255*4882a593Smuzhiyun post-power-on-delay-ms: 256*4882a593Smuzhiyun description: 257*4882a593Smuzhiyun It was invented for MMC pwrseq-simple which could be referred to 258*4882a593Smuzhiyun mmc-pwrseq-simple.txt. But now it\'s reused as a tunable delay 259*4882a593Smuzhiyun waiting for I/O signalling and card power supply to be stable, 260*4882a593Smuzhiyun regardless of whether pwrseq-simple is used. Default to 10ms if 261*4882a593Smuzhiyun no available. 262*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 263*4882a593Smuzhiyun default: 10 264*4882a593Smuzhiyun 265*4882a593Smuzhiyun supports-cqe: 266*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 267*4882a593Smuzhiyun description: 268*4882a593Smuzhiyun The presence of this property indicates that the corresponding 269*4882a593Smuzhiyun MMC host controller supports HW command queue feature. 270*4882a593Smuzhiyun 271*4882a593Smuzhiyun disable-cqe-dcmd: 272*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 273*4882a593Smuzhiyun description: 274*4882a593Smuzhiyun The presence of this property indicates that the MMC 275*4882a593Smuzhiyun controller\'s command queue engine (CQE) does not support direct 276*4882a593Smuzhiyun commands (DCMDs). 277*4882a593Smuzhiyun 278*4882a593Smuzhiyun keep-power-in-suspend: 279*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 280*4882a593Smuzhiyun description: 281*4882a593Smuzhiyun SDIO only. Preserves card power during a suspend/resume cycle. 282*4882a593Smuzhiyun 283*4882a593Smuzhiyun # Deprecated: enable-sdio-wakeup 284*4882a593Smuzhiyun wakeup-source: 285*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 286*4882a593Smuzhiyun description: 287*4882a593Smuzhiyun SDIO only. Enables wake up of host system on SDIO IRQ assertion. 288*4882a593Smuzhiyun 289*4882a593Smuzhiyun vmmc-supply: 290*4882a593Smuzhiyun description: 291*4882a593Smuzhiyun Supply for the card power 292*4882a593Smuzhiyun 293*4882a593Smuzhiyun vqmmc-supply: 294*4882a593Smuzhiyun description: 295*4882a593Smuzhiyun Supply for the bus IO line power 296*4882a593Smuzhiyun 297*4882a593Smuzhiyun mmc-pwrseq: 298*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/phandle 299*4882a593Smuzhiyun description: 300*4882a593Smuzhiyun System-on-Chip designs may specify a specific MMC power 301*4882a593Smuzhiyun sequence. To successfully detect an (e)MMC/SD/SDIO card, that 302*4882a593Smuzhiyun power sequence must be maintained while initializing the card. 303*4882a593Smuzhiyun 304*4882a593SmuzhiyunpatternProperties: 305*4882a593Smuzhiyun "^.*@[0-9]+$": 306*4882a593Smuzhiyun type: object 307*4882a593Smuzhiyun description: | 308*4882a593Smuzhiyun On embedded systems the cards connected to a host may need 309*4882a593Smuzhiyun additional properties. These can be specified in subnodes to the 310*4882a593Smuzhiyun host controller node. The subnodes are identified by the 311*4882a593Smuzhiyun standard \'reg\' property. Which information exactly can be 312*4882a593Smuzhiyun specified depends on the bindings for the SDIO function driver 313*4882a593Smuzhiyun for the subnode, as specified by the compatible string. 314*4882a593Smuzhiyun 315*4882a593Smuzhiyun properties: 316*4882a593Smuzhiyun compatible: 317*4882a593Smuzhiyun description: | 318*4882a593Smuzhiyun Name of SDIO function following generic names recommended 319*4882a593Smuzhiyun practice 320*4882a593Smuzhiyun 321*4882a593Smuzhiyun reg: 322*4882a593Smuzhiyun items: 323*4882a593Smuzhiyun - minimum: 0 324*4882a593Smuzhiyun maximum: 7 325*4882a593Smuzhiyun description: 326*4882a593Smuzhiyun Must contain the SDIO function number of the function this 327*4882a593Smuzhiyun subnode describes. A value of 0 denotes the memory SD 328*4882a593Smuzhiyun function, values from 1 to 7 denote the SDIO functions. 329*4882a593Smuzhiyun 330*4882a593Smuzhiyun broken-hpi: 331*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 332*4882a593Smuzhiyun description: 333*4882a593Smuzhiyun Use this to indicate that the mmc-card has a broken hpi 334*4882a593Smuzhiyun implementation, and that hpi should not be used. 335*4882a593Smuzhiyun 336*4882a593Smuzhiyun required: 337*4882a593Smuzhiyun - reg 338*4882a593Smuzhiyun 339*4882a593Smuzhiyun "^clk-phase-(legacy|sd-hs|mmc-(hs|hs[24]00|ddr52)|uhs-(sdr(12|25|50|104)|ddr50))$": 340*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32-array 341*4882a593Smuzhiyun 342*4882a593Smuzhiyun minItems: 2 343*4882a593Smuzhiyun maxItems: 2 344*4882a593Smuzhiyun items: 345*4882a593Smuzhiyun minimum: 0 346*4882a593Smuzhiyun maximum: 359 347*4882a593Smuzhiyun description: 348*4882a593Smuzhiyun Set the clock (phase) delays which are to be configured in the 349*4882a593Smuzhiyun controller while switching to particular speed mode. These values 350*4882a593Smuzhiyun are in pair of degrees. 351*4882a593Smuzhiyun 352*4882a593Smuzhiyundependencies: 353*4882a593Smuzhiyun cd-debounce-delay-ms: [ cd-gpios ] 354*4882a593Smuzhiyun fixed-emmc-driver-type: [ non-removable ] 355*4882a593Smuzhiyun 356*4882a593SmuzhiyunadditionalProperties: true 357*4882a593Smuzhiyun 358*4882a593Smuzhiyunexamples: 359*4882a593Smuzhiyun - | 360*4882a593Smuzhiyun mmc@ab000000 { 361*4882a593Smuzhiyun compatible = "sdhci"; 362*4882a593Smuzhiyun reg = <0xab000000 0x200>; 363*4882a593Smuzhiyun interrupts = <23>; 364*4882a593Smuzhiyun bus-width = <4>; 365*4882a593Smuzhiyun cd-gpios = <&gpio 69 0>; 366*4882a593Smuzhiyun cd-inverted; 367*4882a593Smuzhiyun wp-gpios = <&gpio 70 0>; 368*4882a593Smuzhiyun max-frequency = <50000000>; 369*4882a593Smuzhiyun keep-power-in-suspend; 370*4882a593Smuzhiyun wakeup-source; 371*4882a593Smuzhiyun mmc-pwrseq = <&sdhci0_pwrseq>; 372*4882a593Smuzhiyun clk-phase-sd-hs = <63>, <72>; 373*4882a593Smuzhiyun }; 374*4882a593Smuzhiyun 375*4882a593Smuzhiyun - | 376*4882a593Smuzhiyun mmc3: mmc@1c12000 { 377*4882a593Smuzhiyun #address-cells = <1>; 378*4882a593Smuzhiyun #size-cells = <0>; 379*4882a593Smuzhiyun reg = <0x1c12000 0x200>; 380*4882a593Smuzhiyun pinctrl-names = "default"; 381*4882a593Smuzhiyun pinctrl-0 = <&mmc3_pins_a>; 382*4882a593Smuzhiyun vmmc-supply = <®_vmmc3>; 383*4882a593Smuzhiyun bus-width = <4>; 384*4882a593Smuzhiyun non-removable; 385*4882a593Smuzhiyun mmc-pwrseq = <&sdhci0_pwrseq>; 386*4882a593Smuzhiyun 387*4882a593Smuzhiyun brcmf: bcrmf@1 { 388*4882a593Smuzhiyun reg = <1>; 389*4882a593Smuzhiyun compatible = "brcm,bcm43xx-fmac"; 390*4882a593Smuzhiyun interrupt-parent = <&pio>; 391*4882a593Smuzhiyun interrupts = <10 8>; 392*4882a593Smuzhiyun interrupt-names = "host-wake"; 393*4882a593Smuzhiyun }; 394*4882a593Smuzhiyun }; 395