13ddfa03dSChris Packham# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 23ddfa03dSChris Packham%YAML 1.2 33ddfa03dSChris Packham--- 43ddfa03dSChris Packham$id: http://devicetree.org/schemas/mmc/marvell,xenon-sdhci.yaml# 53ddfa03dSChris Packham$schema: http://devicetree.org/meta-schemas/core.yaml# 63ddfa03dSChris Packham 73ddfa03dSChris Packhamtitle: Marvell Xenon SDHCI Controller 83ddfa03dSChris Packham 93ddfa03dSChris Packhamdescription: | 103ddfa03dSChris Packham This file documents differences between the core MMC properties described by 113ddfa03dSChris Packham mmc-controller.yaml and the properties used by the Xenon implementation. 123ddfa03dSChris Packham 133ddfa03dSChris Packham Multiple SDHCs might be put into a single Xenon IP, to save size and cost. 143ddfa03dSChris Packham Each SDHC is independent and owns independent resources, such as register 153ddfa03dSChris Packham sets, clock and PHY. 163ddfa03dSChris Packham 173ddfa03dSChris Packham Each SDHC should have an independent device tree node. 183ddfa03dSChris Packham 193ddfa03dSChris Packhammaintainers: 203ddfa03dSChris Packham - Ulf Hansson <ulf.hansson@linaro.org> 213ddfa03dSChris Packham 223ddfa03dSChris Packhamproperties: 233ddfa03dSChris Packham compatible: 243ddfa03dSChris Packham oneOf: 253ddfa03dSChris Packham - enum: 263ddfa03dSChris Packham - marvell,armada-cp110-sdhci 273ddfa03dSChris Packham - marvell,armada-ap806-sdhci 283ddfa03dSChris Packham 293ddfa03dSChris Packham - items: 30*d5862720SElad Nachman - enum: 31*d5862720SElad Nachman - marvell,armada-ap807-sdhci 32*d5862720SElad Nachman - marvell,ac5-sdhci 333ddfa03dSChris Packham - const: marvell,armada-ap806-sdhci 343ddfa03dSChris Packham 353ddfa03dSChris Packham - items: 363ddfa03dSChris Packham - const: marvell,armada-3700-sdhci 373ddfa03dSChris Packham - const: marvell,sdhci-xenon 383ddfa03dSChris Packham 393ddfa03dSChris Packham reg: 403ddfa03dSChris Packham minItems: 1 413ddfa03dSChris Packham maxItems: 2 423ddfa03dSChris Packham description: | 433ddfa03dSChris Packham For "marvell,armada-3700-sdhci", two register areas. The first one 443ddfa03dSChris Packham for Xenon IP register. The second one for the Armada 3700 SoC PHY PAD 453ddfa03dSChris Packham Voltage Control register. Please follow the examples with compatible 463ddfa03dSChris Packham "marvell,armada-3700-sdhci" in below. 473ddfa03dSChris Packham Please also check property marvell,pad-type in below. 483ddfa03dSChris Packham 493ddfa03dSChris Packham For other compatible strings, one register area for Xenon IP. 503ddfa03dSChris Packham 513ddfa03dSChris Packham clocks: 523ddfa03dSChris Packham minItems: 1 533ddfa03dSChris Packham maxItems: 2 543ddfa03dSChris Packham 553ddfa03dSChris Packham clock-names: 563ddfa03dSChris Packham minItems: 1 573ddfa03dSChris Packham items: 583ddfa03dSChris Packham - const: core 593ddfa03dSChris Packham - const: axi 603ddfa03dSChris Packham 6147926041SRob Herring interrupts: 6247926041SRob Herring maxItems: 1 6347926041SRob Herring 643ddfa03dSChris Packham marvell,xenon-sdhc-id: 653ddfa03dSChris Packham $ref: /schemas/types.yaml#/definitions/uint32 663ddfa03dSChris Packham minimum: 0 673ddfa03dSChris Packham maximum: 7 683ddfa03dSChris Packham description: | 693ddfa03dSChris Packham Indicate the corresponding bit index of current SDHC in SDHC System 703ddfa03dSChris Packham Operation Control Register Bit[7:0]. Set/clear the corresponding bit to 713ddfa03dSChris Packham enable/disable current SDHC. 723ddfa03dSChris Packham 733ddfa03dSChris Packham marvell,xenon-phy-type: 743ddfa03dSChris Packham $ref: /schemas/types.yaml#/definitions/string 753ddfa03dSChris Packham enum: 7645698208SRob Herring - emmc 5.1 phy 7745698208SRob Herring - emmc 5.0 phy 783ddfa03dSChris Packham description: | 793ddfa03dSChris Packham Xenon support multiple types of PHYs. To select eMMC 5.1 PHY, set: 803ddfa03dSChris Packham marvell,xenon-phy-type = "emmc 5.1 phy" eMMC 5.1 PHY is the default 813ddfa03dSChris Packham choice if this property is not provided. To select eMMC 5.0 PHY, set: 823ddfa03dSChris Packham marvell,xenon-phy-type = "emmc 5.0 phy" 833ddfa03dSChris Packham 843ddfa03dSChris Packham All those types of PHYs can support eMMC, SD and SDIO. Please note that 853ddfa03dSChris Packham this property only presents the type of PHY. It doesn't stand for the 863ddfa03dSChris Packham entire SDHC type or property. For example, "emmc 5.1 phy" doesn't mean 873ddfa03dSChris Packham that this Xenon SDHC only supports eMMC 5.1. 883ddfa03dSChris Packham 893ddfa03dSChris Packham marvell,xenon-phy-znr: 903ddfa03dSChris Packham $ref: /schemas/types.yaml#/definitions/uint32 913ddfa03dSChris Packham minimum: 0 923ddfa03dSChris Packham maximum: 0x1f 933ddfa03dSChris Packham default: 0xf 943ddfa03dSChris Packham description: | 953ddfa03dSChris Packham Set PHY ZNR value. 963ddfa03dSChris Packham Only available for eMMC PHY. 973ddfa03dSChris Packham 983ddfa03dSChris Packham marvell,xenon-phy-zpr: 993ddfa03dSChris Packham $ref: /schemas/types.yaml#/definitions/uint32 1003ddfa03dSChris Packham minimum: 0 1013ddfa03dSChris Packham maximum: 0x1f 1023ddfa03dSChris Packham default: 0xf 1033ddfa03dSChris Packham description: | 1043ddfa03dSChris Packham Set PHY ZPR value. 1053ddfa03dSChris Packham Only available for eMMC PHY. 1063ddfa03dSChris Packham 1073ddfa03dSChris Packham marvell,xenon-phy-nr-success-tun: 1083ddfa03dSChris Packham $ref: /schemas/types.yaml#/definitions/uint32 1093ddfa03dSChris Packham minimum: 1 1103ddfa03dSChris Packham maximum: 7 1113ddfa03dSChris Packham default: 0x4 1123ddfa03dSChris Packham description: | 1133ddfa03dSChris Packham Set the number of required consecutive successful sampling points 1143ddfa03dSChris Packham used to identify a valid sampling window, in tuning process. 1153ddfa03dSChris Packham 1163ddfa03dSChris Packham marvell,xenon-phy-tun-step-divider: 1173ddfa03dSChris Packham $ref: /schemas/types.yaml#/definitions/uint32 1183ddfa03dSChris Packham default: 64 1193ddfa03dSChris Packham description: | 1203ddfa03dSChris Packham Set the divider for calculating TUN_STEP. 1213ddfa03dSChris Packham 1223ddfa03dSChris Packham marvell,xenon-phy-slow-mode: 1233ddfa03dSChris Packham type: boolean 1243ddfa03dSChris Packham description: | 1253ddfa03dSChris Packham If this property is selected, transfers will bypass PHY. 1263ddfa03dSChris Packham Only available when bus frequency lower than 55MHz in SDR mode. 1273ddfa03dSChris Packham Disabled by default. Please only try this property if timing issues 1283ddfa03dSChris Packham always occur with PHY enabled in eMMC HS SDR, SD SDR12, SD SDR25, 1293ddfa03dSChris Packham SD Default Speed and HS mode and eMMC legacy speed mode. 1303ddfa03dSChris Packham 1313ddfa03dSChris Packham marvell,xenon-tun-count: 1323ddfa03dSChris Packham $ref: /schemas/types.yaml#/definitions/uint32 1333ddfa03dSChris Packham default: 0x9 1343ddfa03dSChris Packham description: | 1353ddfa03dSChris Packham Xenon SDHC SoC usually doesn't provide re-tuning counter in 1363ddfa03dSChris Packham Capabilities Register 3 Bit[11:8]. 1373ddfa03dSChris Packham This property provides the re-tuning counter. 1383ddfa03dSChris Packham 1393ddfa03dSChris PackhamallOf: 1403ddfa03dSChris Packham - $ref: mmc-controller.yaml# 1413ddfa03dSChris Packham - if: 1423ddfa03dSChris Packham properties: 1433ddfa03dSChris Packham compatible: 1443ddfa03dSChris Packham contains: 1453ddfa03dSChris Packham const: marvell,armada-3700-sdhci 1463ddfa03dSChris Packham 1473ddfa03dSChris Packham then: 1483ddfa03dSChris Packham properties: 1493ddfa03dSChris Packham reg: 1503ddfa03dSChris Packham items: 1513ddfa03dSChris Packham - description: Xenon IP registers 1523ddfa03dSChris Packham - description: Armada 3700 SoC PHY PAD Voltage Control register 1533ddfa03dSChris Packham 1543ddfa03dSChris Packham marvell,pad-type: 1553ddfa03dSChris Packham $ref: /schemas/types.yaml#/definitions/string 1563ddfa03dSChris Packham enum: 1573ddfa03dSChris Packham - sd 1583ddfa03dSChris Packham - fixed-1-8v 1593ddfa03dSChris Packham description: | 1603ddfa03dSChris Packham Type of Armada 3700 SoC PHY PAD Voltage Controller register. 1613ddfa03dSChris Packham If "sd" is selected, SoC PHY PAD is set as 3.3V at the beginning 1623ddfa03dSChris Packham and is switched to 1.8V when later in higher speed mode. 1633ddfa03dSChris Packham If "fixed-1-8v" is selected, SoC PHY PAD is fixed 1.8V, such as for 1643ddfa03dSChris Packham eMMC. 1653ddfa03dSChris Packham Please follow the examples with compatible 1663ddfa03dSChris Packham "marvell,armada-3700-sdhci" in below. 1673ddfa03dSChris Packham 1683ddfa03dSChris Packham required: 1693ddfa03dSChris Packham - marvell,pad-type 1703ddfa03dSChris Packham 1713ddfa03dSChris Packham - if: 1723ddfa03dSChris Packham properties: 1733ddfa03dSChris Packham compatible: 1743ddfa03dSChris Packham contains: 1753ddfa03dSChris Packham enum: 1763ddfa03dSChris Packham - marvell,armada-cp110-sdhci 1773ddfa03dSChris Packham - marvell,armada-ap807-sdhci 1783ddfa03dSChris Packham - marvell,armada-ap806-sdhci 1793ddfa03dSChris Packham 1803ddfa03dSChris Packham then: 1813ddfa03dSChris Packham properties: 1823ddfa03dSChris Packham clocks: 1833ddfa03dSChris Packham minItems: 2 1843ddfa03dSChris Packham 1853ddfa03dSChris Packham clock-names: 1863ddfa03dSChris Packham items: 1873ddfa03dSChris Packham - const: core 1883ddfa03dSChris Packham - const: axi 1893ddfa03dSChris Packham 1903ddfa03dSChris Packham 1913ddfa03dSChris Packhamrequired: 1923ddfa03dSChris Packham - compatible 1933ddfa03dSChris Packham - reg 1943ddfa03dSChris Packham - clocks 1953ddfa03dSChris Packham - clock-names 1963ddfa03dSChris Packham 1973ddfa03dSChris PackhamunevaluatedProperties: false 1983ddfa03dSChris Packham 1993ddfa03dSChris Packhamexamples: 2003ddfa03dSChris Packham - | 2013ddfa03dSChris Packham // For eMMC 2023ddfa03dSChris Packham #include <dt-bindings/interrupt-controller/arm-gic.h> 2033ddfa03dSChris Packham #include <dt-bindings/interrupt-controller/irq.h> 2043ddfa03dSChris Packham 2053ddfa03dSChris Packham mmc@aa0000 { 2063ddfa03dSChris Packham compatible = "marvell,armada-ap807-sdhci", "marvell,armada-ap806-sdhci"; 2073ddfa03dSChris Packham reg = <0xaa0000 0x1000>; 2083ddfa03dSChris Packham interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; 2093ddfa03dSChris Packham clocks = <&emmc_clk 0>, <&axi_clk 0>; 2103ddfa03dSChris Packham clock-names = "core", "axi"; 2113ddfa03dSChris Packham bus-width = <4>; 2123ddfa03dSChris Packham marvell,xenon-phy-slow-mode; 2133ddfa03dSChris Packham marvell,xenon-tun-count = <11>; 2143ddfa03dSChris Packham non-removable; 2153ddfa03dSChris Packham no-sd; 2163ddfa03dSChris Packham no-sdio; 2173ddfa03dSChris Packham 2183ddfa03dSChris Packham /* Vmmc and Vqmmc are both fixed */ 2193ddfa03dSChris Packham }; 2203ddfa03dSChris Packham 2213ddfa03dSChris Packham - | 2223ddfa03dSChris Packham // For SD/SDIO 2233ddfa03dSChris Packham #include <dt-bindings/interrupt-controller/arm-gic.h> 2243ddfa03dSChris Packham #include <dt-bindings/interrupt-controller/irq.h> 2253ddfa03dSChris Packham 2263ddfa03dSChris Packham mmc@ab0000 { 2273ddfa03dSChris Packham compatible = "marvell,armada-cp110-sdhci"; 2283ddfa03dSChris Packham reg = <0xab0000 0x1000>; 2293ddfa03dSChris Packham interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>; 2303ddfa03dSChris Packham vqmmc-supply = <&sd_vqmmc_regulator>; 2313ddfa03dSChris Packham vmmc-supply = <&sd_vmmc_regulator>; 2323ddfa03dSChris Packham clocks = <&sdclk 0>, <&axi_clk 0>; 2333ddfa03dSChris Packham clock-names = "core", "axi"; 2343ddfa03dSChris Packham bus-width = <4>; 2353ddfa03dSChris Packham marvell,xenon-tun-count = <9>; 2363ddfa03dSChris Packham }; 2373ddfa03dSChris Packham 2383ddfa03dSChris Packham - | 2393ddfa03dSChris Packham // For eMMC with compatible "marvell,armada-3700-sdhci": 2403ddfa03dSChris Packham #include <dt-bindings/interrupt-controller/arm-gic.h> 2413ddfa03dSChris Packham #include <dt-bindings/interrupt-controller/irq.h> 2423ddfa03dSChris Packham 2433ddfa03dSChris Packham mmc@aa0000 { 2443ddfa03dSChris Packham compatible = "marvell,armada-3700-sdhci", "marvell,sdhci-xenon"; 2453ddfa03dSChris Packham reg = <0xaa0000 0x1000>, 2463ddfa03dSChris Packham <0x17808 0x4>; 2473ddfa03dSChris Packham interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; 2483ddfa03dSChris Packham clocks = <&emmcclk 0>; 2493ddfa03dSChris Packham clock-names = "core"; 2503ddfa03dSChris Packham bus-width = <8>; 2513ddfa03dSChris Packham mmc-ddr-1_8v; 2523ddfa03dSChris Packham mmc-hs400-1_8v; 2533ddfa03dSChris Packham non-removable; 2543ddfa03dSChris Packham no-sd; 2553ddfa03dSChris Packham no-sdio; 2563ddfa03dSChris Packham 2573ddfa03dSChris Packham /* Vmmc and Vqmmc are both fixed */ 2583ddfa03dSChris Packham 2593ddfa03dSChris Packham marvell,pad-type = "fixed-1-8v"; 2603ddfa03dSChris Packham }; 2613ddfa03dSChris Packham 2623ddfa03dSChris Packham - | 2633ddfa03dSChris Packham // For SD/SDIO with compatible "marvell,armada-3700-sdhci": 2643ddfa03dSChris Packham #include <dt-bindings/interrupt-controller/arm-gic.h> 2653ddfa03dSChris Packham #include <dt-bindings/interrupt-controller/irq.h> 2663ddfa03dSChris Packham 2673ddfa03dSChris Packham mmc@ab0000 { 2683ddfa03dSChris Packham compatible = "marvell,armada-3700-sdhci", "marvell,sdhci-xenon"; 2693ddfa03dSChris Packham reg = <0xab0000 0x1000>, 2703ddfa03dSChris Packham <0x17808 0x4>; 2713ddfa03dSChris Packham interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>; 2723ddfa03dSChris Packham vqmmc-supply = <&sd_regulator>; 2733ddfa03dSChris Packham /* Vmmc is fixed */ 2743ddfa03dSChris Packham clocks = <&sdclk 0>; 2753ddfa03dSChris Packham clock-names = "core"; 2763ddfa03dSChris Packham bus-width = <4>; 2773ddfa03dSChris Packham 2783ddfa03dSChris Packham marvell,pad-type = "sd"; 2793ddfa03dSChris Packham }; 280