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