1c66ec88fSEmmanuel VadotMarvell Xenon SDHCI Controller device tree bindings 2c66ec88fSEmmanuel VadotThis file documents differences between the core mmc properties 3c66ec88fSEmmanuel Vadotdescribed by mmc.txt and the properties used by the Xenon implementation. 4c66ec88fSEmmanuel Vadot 5c66ec88fSEmmanuel VadotMultiple SDHCs might be put into a single Xenon IP, to save size and cost. 6c66ec88fSEmmanuel VadotEach SDHC is independent and owns independent resources, such as register sets, 7c66ec88fSEmmanuel Vadotclock and PHY. 8c66ec88fSEmmanuel VadotEach SDHC should have an independent device tree node. 9c66ec88fSEmmanuel Vadot 10c66ec88fSEmmanuel VadotRequired Properties: 11c66ec88fSEmmanuel Vadot- compatible: should be one of the following 12c66ec88fSEmmanuel Vadot - "marvell,armada-3700-sdhci": For controllers on Armada-3700 SoC. 13c66ec88fSEmmanuel Vadot Must provide a second register area and marvell,pad-type. 14c66ec88fSEmmanuel Vadot - "marvell,armada-ap806-sdhci": For controllers on Armada AP806. 15*5def4c47SEmmanuel Vadot - "marvell,armada-ap807-sdhci": For controllers on Armada AP807. 16c66ec88fSEmmanuel Vadot - "marvell,armada-cp110-sdhci": For controllers on Armada CP110. 17c66ec88fSEmmanuel Vadot 18c66ec88fSEmmanuel Vadot- clocks: 19c66ec88fSEmmanuel Vadot Array of clocks required for SDHC. 20c66ec88fSEmmanuel Vadot Require at least input clock for Xenon IP core. For Armada AP806 and 21c66ec88fSEmmanuel Vadot CP110, the AXI clock is also mandatory. 22c66ec88fSEmmanuel Vadot 23c66ec88fSEmmanuel Vadot- clock-names: 24c66ec88fSEmmanuel Vadot Array of names corresponding to clocks property. 25c66ec88fSEmmanuel Vadot The input clock for Xenon IP core should be named as "core". 26c66ec88fSEmmanuel Vadot The input clock for the AXI bus must be named as "axi". 27c66ec88fSEmmanuel Vadot 28c66ec88fSEmmanuel Vadot- reg: 29c66ec88fSEmmanuel Vadot * For "marvell,armada-3700-sdhci", two register areas. 30c66ec88fSEmmanuel Vadot The first one for Xenon IP register. The second one for the Armada 3700 SoC 31c66ec88fSEmmanuel Vadot PHY PAD Voltage Control register. 32c66ec88fSEmmanuel Vadot Please follow the examples with compatible "marvell,armada-3700-sdhci" 33c66ec88fSEmmanuel Vadot in below. 34c66ec88fSEmmanuel Vadot Please also check property marvell,pad-type in below. 35c66ec88fSEmmanuel Vadot 36c66ec88fSEmmanuel Vadot * For other compatible strings, one register area for Xenon IP. 37c66ec88fSEmmanuel Vadot 38c66ec88fSEmmanuel VadotOptional Properties: 39c66ec88fSEmmanuel Vadot- marvell,xenon-sdhc-id: 40c66ec88fSEmmanuel Vadot Indicate the corresponding bit index of current SDHC in 41c66ec88fSEmmanuel Vadot SDHC System Operation Control Register Bit[7:0]. 42c66ec88fSEmmanuel Vadot Set/clear the corresponding bit to enable/disable current SDHC. 43c66ec88fSEmmanuel Vadot If Xenon IP contains only one SDHC, this property is optional. 44c66ec88fSEmmanuel Vadot 45c66ec88fSEmmanuel Vadot- marvell,xenon-phy-type: 46c66ec88fSEmmanuel Vadot Xenon support multiple types of PHYs. 47c66ec88fSEmmanuel Vadot To select eMMC 5.1 PHY, set: 48c66ec88fSEmmanuel Vadot marvell,xenon-phy-type = "emmc 5.1 phy" 49c66ec88fSEmmanuel Vadot eMMC 5.1 PHY is the default choice if this property is not provided. 50c66ec88fSEmmanuel Vadot To select eMMC 5.0 PHY, set: 51c66ec88fSEmmanuel Vadot marvell,xenon-phy-type = "emmc 5.0 phy" 52c66ec88fSEmmanuel Vadot 53c66ec88fSEmmanuel Vadot All those types of PHYs can support eMMC, SD and SDIO. 54c66ec88fSEmmanuel Vadot Please note that this property only presents the type of PHY. 55c66ec88fSEmmanuel Vadot It doesn't stand for the entire SDHC type or property. 56c66ec88fSEmmanuel Vadot For example, "emmc 5.1 phy" doesn't mean that this Xenon SDHC only 57c66ec88fSEmmanuel Vadot supports eMMC 5.1. 58c66ec88fSEmmanuel Vadot 59c66ec88fSEmmanuel Vadot- marvell,xenon-phy-znr: 60c66ec88fSEmmanuel Vadot Set PHY ZNR value. 61c66ec88fSEmmanuel Vadot Only available for eMMC PHY. 62c66ec88fSEmmanuel Vadot Valid range = [0:0x1F]. 63c66ec88fSEmmanuel Vadot ZNR is set as 0xF by default if this property is not provided. 64c66ec88fSEmmanuel Vadot 65c66ec88fSEmmanuel Vadot- marvell,xenon-phy-zpr: 66c66ec88fSEmmanuel Vadot Set PHY ZPR value. 67c66ec88fSEmmanuel Vadot Only available for eMMC PHY. 68c66ec88fSEmmanuel Vadot Valid range = [0:0x1F]. 69c66ec88fSEmmanuel Vadot ZPR is set as 0xF by default if this property is not provided. 70c66ec88fSEmmanuel Vadot 71c66ec88fSEmmanuel Vadot- marvell,xenon-phy-nr-success-tun: 72c66ec88fSEmmanuel Vadot Set the number of required consecutive successful sampling points 73c66ec88fSEmmanuel Vadot used to identify a valid sampling window, in tuning process. 74c66ec88fSEmmanuel Vadot Valid range = [1:7]. 75c66ec88fSEmmanuel Vadot Set as 0x4 by default if this property is not provided. 76c66ec88fSEmmanuel Vadot 77c66ec88fSEmmanuel Vadot- marvell,xenon-phy-tun-step-divider: 78c66ec88fSEmmanuel Vadot Set the divider for calculating TUN_STEP. 79c66ec88fSEmmanuel Vadot Set as 64 by default if this property is not provided. 80c66ec88fSEmmanuel Vadot 81c66ec88fSEmmanuel Vadot- marvell,xenon-phy-slow-mode: 82c66ec88fSEmmanuel Vadot If this property is selected, transfers will bypass PHY. 83c66ec88fSEmmanuel Vadot Only available when bus frequency lower than 55MHz in SDR mode. 84c66ec88fSEmmanuel Vadot Disabled by default. Please only try this property if timing issues 85c66ec88fSEmmanuel Vadot always occur with PHY enabled in eMMC HS SDR, SD SDR12, SD SDR25, 86c66ec88fSEmmanuel Vadot SD Default Speed and HS mode and eMMC legacy speed mode. 87c66ec88fSEmmanuel Vadot 88c66ec88fSEmmanuel Vadot- marvell,xenon-tun-count: 89c66ec88fSEmmanuel Vadot Xenon SDHC SoC usually doesn't provide re-tuning counter in 90c66ec88fSEmmanuel Vadot Capabilities Register 3 Bit[11:8]. 91c66ec88fSEmmanuel Vadot This property provides the re-tuning counter. 92c66ec88fSEmmanuel Vadot If this property is not set, default re-tuning counter will 93c66ec88fSEmmanuel Vadot be set as 0x9 in driver. 94c66ec88fSEmmanuel Vadot 95c66ec88fSEmmanuel Vadot- marvell,pad-type: 96c66ec88fSEmmanuel Vadot Type of Armada 3700 SoC PHY PAD Voltage Controller register. 97c66ec88fSEmmanuel Vadot Only valid when "marvell,armada-3700-sdhci" is selected. 98c66ec88fSEmmanuel Vadot Two types: "sd" and "fixed-1-8v". 99c66ec88fSEmmanuel Vadot If "sd" is selected, SoC PHY PAD is set as 3.3V at the beginning and is 100c66ec88fSEmmanuel Vadot switched to 1.8V when later in higher speed mode. 101c66ec88fSEmmanuel Vadot If "fixed-1-8v" is selected, SoC PHY PAD is fixed 1.8V, such as for eMMC. 102c66ec88fSEmmanuel Vadot Please follow the examples with compatible "marvell,armada-3700-sdhci" 103c66ec88fSEmmanuel Vadot in below. 104c66ec88fSEmmanuel Vadot 105c66ec88fSEmmanuel VadotExample: 106c66ec88fSEmmanuel Vadot- For eMMC: 107c66ec88fSEmmanuel Vadot 108c66ec88fSEmmanuel Vadot sdhci@aa0000 { 109c66ec88fSEmmanuel Vadot compatible = "marvell,armada-ap806-sdhci"; 110c66ec88fSEmmanuel Vadot reg = <0xaa0000 0x1000>; 111c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH> 112c66ec88fSEmmanuel Vadot clocks = <&emmc_clk>,<&axi_clk>; 113c66ec88fSEmmanuel Vadot clock-names = "core", "axi"; 114c66ec88fSEmmanuel Vadot bus-width = <4>; 115c66ec88fSEmmanuel Vadot marvell,xenon-phy-slow-mode; 116c66ec88fSEmmanuel Vadot marvell,xenon-tun-count = <11>; 117c66ec88fSEmmanuel Vadot non-removable; 118c66ec88fSEmmanuel Vadot no-sd; 119c66ec88fSEmmanuel Vadot no-sdio; 120c66ec88fSEmmanuel Vadot 121c66ec88fSEmmanuel Vadot /* Vmmc and Vqmmc are both fixed */ 122c66ec88fSEmmanuel Vadot }; 123c66ec88fSEmmanuel Vadot 124c66ec88fSEmmanuel Vadot- For SD/SDIO: 125c66ec88fSEmmanuel Vadot 126c66ec88fSEmmanuel Vadot sdhci@ab0000 { 127c66ec88fSEmmanuel Vadot compatible = "marvell,armada-cp110-sdhci"; 128c66ec88fSEmmanuel Vadot reg = <0xab0000 0x1000>; 129c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH> 130c66ec88fSEmmanuel Vadot vqmmc-supply = <&sd_vqmmc_regulator>; 131c66ec88fSEmmanuel Vadot vmmc-supply = <&sd_vmmc_regulator>; 132c66ec88fSEmmanuel Vadot clocks = <&sdclk>, <&axi_clk>; 133c66ec88fSEmmanuel Vadot clock-names = "core", "axi"; 134c66ec88fSEmmanuel Vadot bus-width = <4>; 135c66ec88fSEmmanuel Vadot marvell,xenon-tun-count = <9>; 136c66ec88fSEmmanuel Vadot }; 137c66ec88fSEmmanuel Vadot 138c66ec88fSEmmanuel Vadot- For eMMC with compatible "marvell,armada-3700-sdhci": 139c66ec88fSEmmanuel Vadot 140c66ec88fSEmmanuel Vadot sdhci@aa0000 { 141c66ec88fSEmmanuel Vadot compatible = "marvell,armada-3700-sdhci"; 142c66ec88fSEmmanuel Vadot reg = <0xaa0000 0x1000>, 143c66ec88fSEmmanuel Vadot <phy_addr 0x4>; 144c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH> 145c66ec88fSEmmanuel Vadot clocks = <&emmcclk>; 146c66ec88fSEmmanuel Vadot clock-names = "core"; 147c66ec88fSEmmanuel Vadot bus-width = <8>; 148c66ec88fSEmmanuel Vadot mmc-ddr-1_8v; 149c66ec88fSEmmanuel Vadot mmc-hs400-1_8v; 150c66ec88fSEmmanuel Vadot non-removable; 151c66ec88fSEmmanuel Vadot no-sd; 152c66ec88fSEmmanuel Vadot no-sdio; 153c66ec88fSEmmanuel Vadot 154c66ec88fSEmmanuel Vadot /* Vmmc and Vqmmc are both fixed */ 155c66ec88fSEmmanuel Vadot 156c66ec88fSEmmanuel Vadot marvell,pad-type = "fixed-1-8v"; 157c66ec88fSEmmanuel Vadot }; 158c66ec88fSEmmanuel Vadot 159c66ec88fSEmmanuel Vadot- For SD/SDIO with compatible "marvell,armada-3700-sdhci": 160c66ec88fSEmmanuel Vadot 161c66ec88fSEmmanuel Vadot sdhci@ab0000 { 162c66ec88fSEmmanuel Vadot compatible = "marvell,armada-3700-sdhci"; 163c66ec88fSEmmanuel Vadot reg = <0xab0000 0x1000>, 164c66ec88fSEmmanuel Vadot <phy_addr 0x4>; 165c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH> 166c66ec88fSEmmanuel Vadot vqmmc-supply = <&sd_regulator>; 167c66ec88fSEmmanuel Vadot /* Vmmc is fixed */ 168c66ec88fSEmmanuel Vadot clocks = <&sdclk>; 169c66ec88fSEmmanuel Vadot clock-names = "core"; 170c66ec88fSEmmanuel Vadot bus-width = <4>; 171c66ec88fSEmmanuel Vadot 172c66ec88fSEmmanuel Vadot marvell,pad-type = "sd"; 173c66ec88fSEmmanuel Vadot }; 174