13aee3eecSNeil Armstrong# SPDX-License-Identifier: GPL-2.0 23aee3eecSNeil Armstrong%YAML 1.2 33aee3eecSNeil Armstrong--- 43aee3eecSNeil Armstrong$id: http://devicetree.org/schemas/mmc/mmc-controller-common.yaml# 53aee3eecSNeil Armstrong$schema: http://devicetree.org/meta-schemas/core.yaml# 63aee3eecSNeil Armstrong 73aee3eecSNeil Armstrongtitle: MMC Controller & Slots Common Properties 83aee3eecSNeil Armstrong 93aee3eecSNeil Armstrongmaintainers: 103aee3eecSNeil Armstrong - Ulf Hansson <ulf.hansson@linaro.org> 113aee3eecSNeil Armstrong 12*b55a9f72SNeil Armstrongdescription: 133aee3eecSNeil Armstrong These properties are common to multiple MMC host controllers and the 143aee3eecSNeil Armstrong possible slots or ports for multi-slot controllers. 153aee3eecSNeil Armstrong 163aee3eecSNeil Armstrongproperties: 173aee3eecSNeil Armstrong "#address-cells": 183aee3eecSNeil Armstrong const: 1 19*b55a9f72SNeil Armstrong description: 203aee3eecSNeil Armstrong The cell is the SDIO function number if a function subnode is used. 213aee3eecSNeil Armstrong 223aee3eecSNeil Armstrong "#size-cells": 233aee3eecSNeil Armstrong const: 0 243aee3eecSNeil Armstrong 253aee3eecSNeil Armstrong # Card Detection. 263aee3eecSNeil Armstrong # If none of these properties are supplied, the host native card 273aee3eecSNeil Armstrong # detect will be used. Only one of them should be provided. 283aee3eecSNeil Armstrong 293aee3eecSNeil Armstrong broken-cd: 303aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 313aee3eecSNeil Armstrong description: 323aee3eecSNeil Armstrong There is no card detection available; polling must be used. 333aee3eecSNeil Armstrong 343aee3eecSNeil Armstrong cd-gpios: 353aee3eecSNeil Armstrong maxItems: 1 363aee3eecSNeil Armstrong description: 373aee3eecSNeil Armstrong The card detection will be done using the GPIO provided. 383aee3eecSNeil Armstrong 393aee3eecSNeil Armstrong non-removable: 403aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 413aee3eecSNeil Armstrong description: 423aee3eecSNeil Armstrong Non-removable slot (like eMMC); assume always present. 433aee3eecSNeil Armstrong 443aee3eecSNeil Armstrong # *NOTE* on CD and WP polarity. To use common for all SD/MMC host 453aee3eecSNeil Armstrong # controllers line polarity properties, we have to fix the meaning 463aee3eecSNeil Armstrong # of the "normal" and "inverted" line levels. We choose to follow 473aee3eecSNeil Armstrong # the SDHCI standard, which specifies both those lines as "active 483aee3eecSNeil Armstrong # low." Therefore, using the "cd-inverted" property means, that the 493aee3eecSNeil Armstrong # CD line is active high, i.e. it is high, when a card is 503aee3eecSNeil Armstrong # inserted. Similar logic applies to the "wp-inverted" property. 513aee3eecSNeil Armstrong # 523aee3eecSNeil Armstrong # CD and WP lines can be implemented on the hardware in one of two 533aee3eecSNeil Armstrong # ways: as GPIOs, specified in cd-gpios and wp-gpios properties, or 543aee3eecSNeil Armstrong # as dedicated pins. Polarity of dedicated pins can be specified, 553aee3eecSNeil Armstrong # using *-inverted properties. GPIO polarity can also be specified 563aee3eecSNeil Armstrong # using the GPIO_ACTIVE_LOW flag. This creates an ambiguity in the 573aee3eecSNeil Armstrong # latter case. We choose to use the XOR logic for GPIO CD and WP 583aee3eecSNeil Armstrong # lines. This means, the two properties are "superimposed," for 593aee3eecSNeil Armstrong # example leaving the GPIO_ACTIVE_LOW flag clear and specifying the 603aee3eecSNeil Armstrong # respective *-inverted property property results in a 613aee3eecSNeil Armstrong # double-inversion and actually means the "normal" line polarity is 623aee3eecSNeil Armstrong # in effect. 633aee3eecSNeil Armstrong wp-inverted: 643aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 653aee3eecSNeil Armstrong description: 663aee3eecSNeil Armstrong The Write Protect line polarity is inverted. 673aee3eecSNeil Armstrong 683aee3eecSNeil Armstrong cd-inverted: 693aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 703aee3eecSNeil Armstrong description: 713aee3eecSNeil Armstrong The CD line polarity is inverted. 723aee3eecSNeil Armstrong 733aee3eecSNeil Armstrong # Other properties 743aee3eecSNeil Armstrong 753aee3eecSNeil Armstrong bus-width: 763aee3eecSNeil Armstrong description: 773aee3eecSNeil Armstrong Number of data lines. 783aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/uint32 793aee3eecSNeil Armstrong enum: [1, 4, 8] 803aee3eecSNeil Armstrong default: 1 813aee3eecSNeil Armstrong 823aee3eecSNeil Armstrong max-frequency: 833aee3eecSNeil Armstrong description: | 843aee3eecSNeil Armstrong Maximum operating frequency of the bus: 853aee3eecSNeil Armstrong - for eMMC, the maximum supported frequency is 200MHz, 863aee3eecSNeil Armstrong - for SD/SDIO cards the SDR104 mode has a max supported 873aee3eecSNeil Armstrong frequency of 208MHz, 883aee3eecSNeil Armstrong - some mmc host controllers do support a max frequency upto 893aee3eecSNeil Armstrong 384MHz. 903aee3eecSNeil Armstrong So, lets keep the maximum supported value here. 913aee3eecSNeil Armstrong 923aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/uint32 933aee3eecSNeil Armstrong minimum: 400000 943aee3eecSNeil Armstrong maximum: 384000000 953aee3eecSNeil Armstrong 963aee3eecSNeil Armstrong disable-wp: 973aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 983aee3eecSNeil Armstrong description: 993aee3eecSNeil Armstrong When set, no physical write-protect line is present. This 1003aee3eecSNeil Armstrong property should only be specified when the controller has a 1013aee3eecSNeil Armstrong dedicated write-protect detection logic. If a GPIO is always used 1023aee3eecSNeil Armstrong for the write-protect detection logic, it is sufficient to not 1033aee3eecSNeil Armstrong specify the wp-gpios property in the absence of a write-protect 1043aee3eecSNeil Armstrong line. Not used in combination with eMMC or SDIO. 1053aee3eecSNeil Armstrong 1063aee3eecSNeil Armstrong wp-gpios: 1073aee3eecSNeil Armstrong maxItems: 1 1083aee3eecSNeil Armstrong description: 1093aee3eecSNeil Armstrong GPIO to use for the write-protect detection. 1103aee3eecSNeil Armstrong 1113aee3eecSNeil Armstrong cd-debounce-delay-ms: 1123aee3eecSNeil Armstrong description: 1133aee3eecSNeil Armstrong Set delay time before detecting card after card insert 1143aee3eecSNeil Armstrong interrupt. 1153aee3eecSNeil Armstrong 1163aee3eecSNeil Armstrong no-1-8-v: 1173aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 1183aee3eecSNeil Armstrong description: 1193aee3eecSNeil Armstrong When specified, denotes that 1.8V card voltage is not supported 1203aee3eecSNeil Armstrong on this system, even if the controller claims it. 1213aee3eecSNeil Armstrong 1223aee3eecSNeil Armstrong cap-sd-highspeed: 1233aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 1243aee3eecSNeil Armstrong description: 1253aee3eecSNeil Armstrong SD high-speed timing is supported. 1263aee3eecSNeil Armstrong 1273aee3eecSNeil Armstrong cap-mmc-highspeed: 1283aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 1293aee3eecSNeil Armstrong description: 1303aee3eecSNeil Armstrong MMC high-speed timing is supported. 1313aee3eecSNeil Armstrong 1323aee3eecSNeil Armstrong sd-uhs-sdr12: 1333aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 1343aee3eecSNeil Armstrong description: 1353aee3eecSNeil Armstrong SD UHS SDR12 speed is supported. 1363aee3eecSNeil Armstrong 1373aee3eecSNeil Armstrong sd-uhs-sdr25: 1383aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 1393aee3eecSNeil Armstrong description: 1403aee3eecSNeil Armstrong SD UHS SDR25 speed is supported. 1413aee3eecSNeil Armstrong 1423aee3eecSNeil Armstrong sd-uhs-sdr50: 1433aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 1443aee3eecSNeil Armstrong description: 1453aee3eecSNeil Armstrong SD UHS SDR50 speed is supported. 1463aee3eecSNeil Armstrong 1473aee3eecSNeil Armstrong sd-uhs-sdr104: 1483aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 1493aee3eecSNeil Armstrong description: 1503aee3eecSNeil Armstrong SD UHS SDR104 speed is supported. 1513aee3eecSNeil Armstrong 1523aee3eecSNeil Armstrong sd-uhs-ddr50: 1533aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 1543aee3eecSNeil Armstrong description: 1553aee3eecSNeil Armstrong SD UHS DDR50 speed is supported. 1563aee3eecSNeil Armstrong 1573aee3eecSNeil Armstrong cap-power-off-card: 1583aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 1593aee3eecSNeil Armstrong description: 1603aee3eecSNeil Armstrong Powering off the card is safe. 1613aee3eecSNeil Armstrong 1623aee3eecSNeil Armstrong cap-mmc-hw-reset: 1633aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 1643aee3eecSNeil Armstrong description: 1653aee3eecSNeil Armstrong eMMC hardware reset is supported 1663aee3eecSNeil Armstrong 1673aee3eecSNeil Armstrong cap-sdio-irq: 1683aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 1693aee3eecSNeil Armstrong description: 1703aee3eecSNeil Armstrong enable SDIO IRQ signalling on this interface 1713aee3eecSNeil Armstrong 1723aee3eecSNeil Armstrong full-pwr-cycle: 1733aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 1743aee3eecSNeil Armstrong description: 1753aee3eecSNeil Armstrong Full power cycle of the card is supported. 1763aee3eecSNeil Armstrong 1773aee3eecSNeil Armstrong full-pwr-cycle-in-suspend: 1783aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 1793aee3eecSNeil Armstrong description: 1803aee3eecSNeil Armstrong Full power cycle of the card in suspend is supported. 1813aee3eecSNeil Armstrong 1823aee3eecSNeil Armstrong mmc-ddr-1_2v: 1833aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 1843aee3eecSNeil Armstrong description: 1853aee3eecSNeil Armstrong eMMC high-speed DDR mode (1.2V I/O) is supported. 1863aee3eecSNeil Armstrong 1873aee3eecSNeil Armstrong mmc-ddr-1_8v: 1883aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 1893aee3eecSNeil Armstrong description: 1903aee3eecSNeil Armstrong eMMC high-speed DDR mode (1.8V I/O) is supported. 1913aee3eecSNeil Armstrong 1923aee3eecSNeil Armstrong mmc-ddr-3_3v: 1933aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 1943aee3eecSNeil Armstrong description: 1953aee3eecSNeil Armstrong eMMC high-speed DDR mode (3.3V I/O) is supported. 1963aee3eecSNeil Armstrong 1973aee3eecSNeil Armstrong mmc-hs200-1_2v: 1983aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 1993aee3eecSNeil Armstrong description: 2003aee3eecSNeil Armstrong eMMC HS200 mode (1.2V I/O) is supported. 2013aee3eecSNeil Armstrong 2023aee3eecSNeil Armstrong mmc-hs200-1_8v: 2033aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 2043aee3eecSNeil Armstrong description: 2053aee3eecSNeil Armstrong eMMC HS200 mode (1.8V I/O) is supported. 2063aee3eecSNeil Armstrong 2073aee3eecSNeil Armstrong mmc-hs400-1_2v: 2083aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 2093aee3eecSNeil Armstrong description: 2103aee3eecSNeil Armstrong eMMC HS400 mode (1.2V I/O) is supported. 2113aee3eecSNeil Armstrong 2123aee3eecSNeil Armstrong mmc-hs400-1_8v: 2133aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 2143aee3eecSNeil Armstrong description: 2153aee3eecSNeil Armstrong eMMC HS400 mode (1.8V I/O) is supported. 2163aee3eecSNeil Armstrong 2173aee3eecSNeil Armstrong mmc-hs400-enhanced-strobe: 2183aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 2193aee3eecSNeil Armstrong description: 2203aee3eecSNeil Armstrong eMMC HS400 enhanced strobe mode is supported 2213aee3eecSNeil Armstrong 2223aee3eecSNeil Armstrong no-mmc-hs400: 2233aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 2243aee3eecSNeil Armstrong description: 2253aee3eecSNeil Armstrong All eMMC HS400 modes are not supported. 2263aee3eecSNeil Armstrong 2273aee3eecSNeil Armstrong dsr: 2283aee3eecSNeil Armstrong description: 2293aee3eecSNeil Armstrong Value the card Driver Stage Register (DSR) should be programmed 2303aee3eecSNeil Armstrong with. 2313aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/uint32 2323aee3eecSNeil Armstrong minimum: 0 2333aee3eecSNeil Armstrong maximum: 0xffff 2343aee3eecSNeil Armstrong 2353aee3eecSNeil Armstrong no-sdio: 2363aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 2373aee3eecSNeil Armstrong description: 2383aee3eecSNeil Armstrong Controller is limited to send SDIO commands during 2393aee3eecSNeil Armstrong initialization. 2403aee3eecSNeil Armstrong 2413aee3eecSNeil Armstrong no-sd: 2423aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 2433aee3eecSNeil Armstrong description: 2443aee3eecSNeil Armstrong Controller is limited to send SD commands during initialization. 2453aee3eecSNeil Armstrong 2463aee3eecSNeil Armstrong no-mmc: 2473aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 2483aee3eecSNeil Armstrong description: 2493aee3eecSNeil Armstrong Controller is limited to send MMC commands during 2503aee3eecSNeil Armstrong initialization. 2513aee3eecSNeil Armstrong 2523aee3eecSNeil Armstrong fixed-emmc-driver-type: 2533aee3eecSNeil Armstrong description: 2543aee3eecSNeil Armstrong For non-removable eMMC, enforce this driver type. The value is 2553aee3eecSNeil Armstrong the driver type as specified in the eMMC specification (table 2563aee3eecSNeil Armstrong 206 in spec version 5.1) 2573aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/uint32 2583aee3eecSNeil Armstrong minimum: 0 2593aee3eecSNeil Armstrong maximum: 4 2603aee3eecSNeil Armstrong 2613aee3eecSNeil Armstrong post-power-on-delay-ms: 2623aee3eecSNeil Armstrong description: 2633aee3eecSNeil Armstrong It was invented for MMC pwrseq-simple which could be referred to 2643aee3eecSNeil Armstrong mmc-pwrseq-simple.yaml. But now it\'s reused as a tunable delay 2653aee3eecSNeil Armstrong waiting for I/O signalling and card power supply to be stable, 2663aee3eecSNeil Armstrong regardless of whether pwrseq-simple is used. Default to 10ms if 2673aee3eecSNeil Armstrong no available. 2683aee3eecSNeil Armstrong default: 10 2693aee3eecSNeil Armstrong 2703aee3eecSNeil Armstrong supports-cqe: 2713aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 2723aee3eecSNeil Armstrong description: 2733aee3eecSNeil Armstrong The presence of this property indicates that the corresponding 2743aee3eecSNeil Armstrong MMC host controller supports HW command queue feature. 2753aee3eecSNeil Armstrong 2763aee3eecSNeil Armstrong disable-cqe-dcmd: 2773aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 2783aee3eecSNeil Armstrong description: 2793aee3eecSNeil Armstrong The presence of this property indicates that the MMC 2803aee3eecSNeil Armstrong controller\'s command queue engine (CQE) does not support direct 2813aee3eecSNeil Armstrong commands (DCMDs). 2823aee3eecSNeil Armstrong 2833aee3eecSNeil Armstrong keep-power-in-suspend: 2843aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 2853aee3eecSNeil Armstrong description: 2863aee3eecSNeil Armstrong SDIO only. Preserves card power during a suspend/resume cycle. 2873aee3eecSNeil Armstrong 2883aee3eecSNeil Armstrong wakeup-source: 2893aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/flag 2903aee3eecSNeil Armstrong description: 2913aee3eecSNeil Armstrong SDIO only. Enables wake up of host system on SDIO IRQ assertion. 2923aee3eecSNeil Armstrong 2933aee3eecSNeil Armstrong vmmc-supply: 2943aee3eecSNeil Armstrong description: 2953aee3eecSNeil Armstrong Supply for the card power 2963aee3eecSNeil Armstrong 2973aee3eecSNeil Armstrong vqmmc-supply: 2983aee3eecSNeil Armstrong description: 2993aee3eecSNeil Armstrong Supply for the bus IO line power, such as a level shifter. 3003aee3eecSNeil Armstrong If the level shifter is controlled by a GPIO line, this shall 3013aee3eecSNeil Armstrong be modeled as a "regulator-fixed" with a GPIO line for 3023aee3eecSNeil Armstrong switching the level shifter on/off. 3033aee3eecSNeil Armstrong 3043aee3eecSNeil Armstrong mmc-pwrseq: 3053aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/phandle 3063aee3eecSNeil Armstrong description: 3073aee3eecSNeil Armstrong System-on-Chip designs may specify a specific MMC power 3083aee3eecSNeil Armstrong sequence. To successfully detect an (e)MMC/SD/SDIO card, that 3093aee3eecSNeil Armstrong power sequence must be maintained while initializing the card. 3103aee3eecSNeil Armstrong 3113aee3eecSNeil ArmstrongpatternProperties: 3123aee3eecSNeil Armstrong "^.*@[0-9]+$": 3133aee3eecSNeil Armstrong type: object 3143aee3eecSNeil Armstrong description: | 3153aee3eecSNeil Armstrong On embedded systems the cards connected to a host may need 3163aee3eecSNeil Armstrong additional properties. These can be specified in subnodes to the 3173aee3eecSNeil Armstrong host controller node. The subnodes are identified by the 3183aee3eecSNeil Armstrong standard \'reg\' property. Which information exactly can be 3193aee3eecSNeil Armstrong specified depends on the bindings for the SDIO function driver 3203aee3eecSNeil Armstrong for the subnode, as specified by the compatible string. 3213aee3eecSNeil Armstrong 3223aee3eecSNeil Armstrong properties: 3233aee3eecSNeil Armstrong compatible: 324*b55a9f72SNeil Armstrong description: 3253aee3eecSNeil Armstrong Name of SDIO function following generic names recommended 3263aee3eecSNeil Armstrong practice 3273aee3eecSNeil Armstrong 3283aee3eecSNeil Armstrong reg: 3293aee3eecSNeil Armstrong items: 3303aee3eecSNeil Armstrong - minimum: 0 3313aee3eecSNeil Armstrong maximum: 7 3323aee3eecSNeil Armstrong description: 3333aee3eecSNeil Armstrong Must contain the SDIO function number of the function this 3343aee3eecSNeil Armstrong subnode describes. A value of 0 denotes the memory SD 3353aee3eecSNeil Armstrong function, values from 1 to 7 denote the SDIO functions. 3363aee3eecSNeil Armstrong 3373aee3eecSNeil Armstrong required: 3383aee3eecSNeil Armstrong - reg 3393aee3eecSNeil Armstrong 3403aee3eecSNeil Armstrong "^clk-phase-(legacy|sd-hs|mmc-(hs|hs[24]00|ddr52)|uhs-(sdr(12|25|50|104)|ddr50))$": 3413aee3eecSNeil Armstrong $ref: /schemas/types.yaml#/definitions/uint32-array 3423aee3eecSNeil Armstrong 3433aee3eecSNeil Armstrong minItems: 2 3443aee3eecSNeil Armstrong maxItems: 2 3453aee3eecSNeil Armstrong items: 3463aee3eecSNeil Armstrong minimum: 0 3473aee3eecSNeil Armstrong maximum: 359 3483aee3eecSNeil Armstrong description: 3493aee3eecSNeil Armstrong Set the clock (phase) delays which are to be configured in the 3503aee3eecSNeil Armstrong controller while switching to particular speed mode. These values 3513aee3eecSNeil Armstrong are in pair of degrees. 3523aee3eecSNeil Armstrong 3533aee3eecSNeil Armstrongdependencies: 3543aee3eecSNeil Armstrong cd-debounce-delay-ms: [ cd-gpios ] 3553aee3eecSNeil Armstrong fixed-emmc-driver-type: [ non-removable ] 3563aee3eecSNeil Armstrong 3573aee3eecSNeil ArmstrongadditionalProperties: true 358