1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4cb7aa33aSEmmanuel Vadot$id: http://devicetree.org/schemas/mmc/arasan,sdhci.yaml# 5cb7aa33aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 78bab661aSEmmanuel Vadottitle: Arasan SDHCI Controller 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10c66ec88fSEmmanuel Vadot - Adrian Hunter <adrian.hunter@intel.com> 11c66ec88fSEmmanuel Vadot 12c66ec88fSEmmanuel VadotallOf: 13cb7aa33aSEmmanuel Vadot - $ref: mmc-controller.yaml# 14c66ec88fSEmmanuel Vadot - if: 15c66ec88fSEmmanuel Vadot properties: 16c66ec88fSEmmanuel Vadot compatible: 17c66ec88fSEmmanuel Vadot contains: 18c66ec88fSEmmanuel Vadot const: arasan,sdhci-5.1 19c66ec88fSEmmanuel Vadot then: 20c66ec88fSEmmanuel Vadot required: 21c66ec88fSEmmanuel Vadot - phys 22c66ec88fSEmmanuel Vadot - phy-names 23c66ec88fSEmmanuel Vadot - if: 24c66ec88fSEmmanuel Vadot properties: 25c66ec88fSEmmanuel Vadot compatible: 26c66ec88fSEmmanuel Vadot contains: 27c66ec88fSEmmanuel Vadot enum: 28c66ec88fSEmmanuel Vadot - xlnx,zynqmp-8.9a 29c66ec88fSEmmanuel Vadot - xlnx,versal-8.9a 30fac71e4eSEmmanuel Vadot - xlnx,versal-net-emmc 31c66ec88fSEmmanuel Vadot then: 32c66ec88fSEmmanuel Vadot properties: 33c66ec88fSEmmanuel Vadot clock-output-names: 34c66ec88fSEmmanuel Vadot oneOf: 35c66ec88fSEmmanuel Vadot - items: 36c66ec88fSEmmanuel Vadot - const: clk_out_sd0 37c66ec88fSEmmanuel Vadot - const: clk_in_sd0 38c66ec88fSEmmanuel Vadot - items: 39c66ec88fSEmmanuel Vadot - const: clk_out_sd1 40c66ec88fSEmmanuel Vadot - const: clk_in_sd1 41c66ec88fSEmmanuel Vadot 42c66ec88fSEmmanuel Vadotproperties: 43c66ec88fSEmmanuel Vadot compatible: 44c66ec88fSEmmanuel Vadot oneOf: 45c66ec88fSEmmanuel Vadot - const: arasan,sdhci-8.9a # generic Arasan SDHCI 8.9a PHY 46c66ec88fSEmmanuel Vadot - const: arasan,sdhci-4.9a # generic Arasan SDHCI 4.9a PHY 47c66ec88fSEmmanuel Vadot - const: arasan,sdhci-5.1 # generic Arasan SDHCI 5.1 PHY 48c66ec88fSEmmanuel Vadot - items: 49c66ec88fSEmmanuel Vadot - const: rockchip,rk3399-sdhci-5.1 # rk3399 eMMC PHY 50c66ec88fSEmmanuel Vadot - const: arasan,sdhci-5.1 51c66ec88fSEmmanuel Vadot description: 52c66ec88fSEmmanuel Vadot For this device it is strongly suggested to include 53c66ec88fSEmmanuel Vadot arasan,soc-ctl-syscon. 54c66ec88fSEmmanuel Vadot - items: 55c66ec88fSEmmanuel Vadot - const: xlnx,zynqmp-8.9a # ZynqMP SDHCI 8.9a PHY 56c66ec88fSEmmanuel Vadot - const: arasan,sdhci-8.9a 57c66ec88fSEmmanuel Vadot description: 58c66ec88fSEmmanuel Vadot For this device it is strongly suggested to include 59c66ec88fSEmmanuel Vadot clock-output-names and '#clock-cells'. 60c66ec88fSEmmanuel Vadot - items: 61c66ec88fSEmmanuel Vadot - const: xlnx,versal-8.9a # Versal SDHCI 8.9a PHY 62c66ec88fSEmmanuel Vadot - const: arasan,sdhci-8.9a 63c66ec88fSEmmanuel Vadot description: 64c66ec88fSEmmanuel Vadot For this device it is strongly suggested to include 65c66ec88fSEmmanuel Vadot clock-output-names and '#clock-cells'. 66fac71e4eSEmmanuel Vadot - const: xlnx,versal-net-emmc # Versal Net eMMC PHY 67fac71e4eSEmmanuel Vadot description: 68fac71e4eSEmmanuel Vadot For this device it is strongly suggested to include 69fac71e4eSEmmanuel Vadot clock-output-names and '#clock-cells'. 70c66ec88fSEmmanuel Vadot - items: 71c66ec88fSEmmanuel Vadot - const: intel,lgm-sdhci-5.1-emmc # Intel LGM eMMC PHY 72c66ec88fSEmmanuel Vadot - const: arasan,sdhci-5.1 73c66ec88fSEmmanuel Vadot description: 74c66ec88fSEmmanuel Vadot For this device it is strongly suggested to include 75c66ec88fSEmmanuel Vadot arasan,soc-ctl-syscon. 76c66ec88fSEmmanuel Vadot - items: 77c66ec88fSEmmanuel Vadot - const: intel,lgm-sdhci-5.1-sdxc # Intel LGM SDXC PHY 78c66ec88fSEmmanuel Vadot - const: arasan,sdhci-5.1 79c66ec88fSEmmanuel Vadot description: 80c66ec88fSEmmanuel Vadot For this device it is strongly suggested to include 81c66ec88fSEmmanuel Vadot arasan,soc-ctl-syscon. 82c66ec88fSEmmanuel Vadot - items: 83c66ec88fSEmmanuel Vadot - const: intel,keembay-sdhci-5.1-emmc # Intel Keem Bay eMMC PHY 84c66ec88fSEmmanuel Vadot - const: arasan,sdhci-5.1 85c66ec88fSEmmanuel Vadot description: 86c66ec88fSEmmanuel Vadot For this device it is strongly suggested to include 87c66ec88fSEmmanuel Vadot arasan,soc-ctl-syscon. 88c66ec88fSEmmanuel Vadot - const: intel,keembay-sdhci-5.1-sd # Intel Keem Bay SD controller 89c66ec88fSEmmanuel Vadot description: 90c66ec88fSEmmanuel Vadot For this device it is strongly suggested to include 91c66ec88fSEmmanuel Vadot arasan,soc-ctl-syscon. 92c66ec88fSEmmanuel Vadot - const: intel,keembay-sdhci-5.1-sdio # Intel Keem Bay SDIO controller 93c66ec88fSEmmanuel Vadot description: 94c66ec88fSEmmanuel Vadot For this device it is strongly suggested to include 95c66ec88fSEmmanuel Vadot arasan,soc-ctl-syscon. 96c66ec88fSEmmanuel Vadot 97c66ec88fSEmmanuel Vadot reg: 98c66ec88fSEmmanuel Vadot maxItems: 1 99c66ec88fSEmmanuel Vadot 100c66ec88fSEmmanuel Vadot clocks: 101c66ec88fSEmmanuel Vadot minItems: 2 102c66ec88fSEmmanuel Vadot maxItems: 3 103c66ec88fSEmmanuel Vadot 104c66ec88fSEmmanuel Vadot clock-names: 105c66ec88fSEmmanuel Vadot minItems: 2 106c66ec88fSEmmanuel Vadot items: 107c66ec88fSEmmanuel Vadot - const: clk_xin 108c66ec88fSEmmanuel Vadot - const: clk_ahb 109c66ec88fSEmmanuel Vadot - const: gate 110c66ec88fSEmmanuel Vadot 111c66ec88fSEmmanuel Vadot interrupts: 112c66ec88fSEmmanuel Vadot maxItems: 1 113c66ec88fSEmmanuel Vadot 114c66ec88fSEmmanuel Vadot phys: 115c66ec88fSEmmanuel Vadot maxItems: 1 116c66ec88fSEmmanuel Vadot 117c66ec88fSEmmanuel Vadot phy-names: 118c66ec88fSEmmanuel Vadot const: phy_arasan 119c66ec88fSEmmanuel Vadot 120e67e8565SEmmanuel Vadot resets: 121e67e8565SEmmanuel Vadot maxItems: 1 122e67e8565SEmmanuel Vadot 123c66ec88fSEmmanuel Vadot arasan,soc-ctl-syscon: 124c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 125c66ec88fSEmmanuel Vadot description: 126c66ec88fSEmmanuel Vadot A phandle to a syscon device (see ../mfd/syscon.txt) used to access 127c66ec88fSEmmanuel Vadot core corecfg registers. Offsets of registers in this syscon are 128c66ec88fSEmmanuel Vadot determined based on the main compatible string for the device. 129c66ec88fSEmmanuel Vadot 130c66ec88fSEmmanuel Vadot clock-output-names: 131c66ec88fSEmmanuel Vadot minItems: 1 132c66ec88fSEmmanuel Vadot maxItems: 2 133c66ec88fSEmmanuel Vadot description: 134c66ec88fSEmmanuel Vadot Name of the card clock which will be exposed by this device. 135c66ec88fSEmmanuel Vadot 136c66ec88fSEmmanuel Vadot '#clock-cells': 137c66ec88fSEmmanuel Vadot enum: [0, 1] 138c66ec88fSEmmanuel Vadot description: 139c66ec88fSEmmanuel Vadot With this property in place we will export one or two clocks 140c66ec88fSEmmanuel Vadot representing the Card Clock. These clocks are expected to be 141c66ec88fSEmmanuel Vadot consumed by our PHY. 142c66ec88fSEmmanuel Vadot 143c66ec88fSEmmanuel Vadot xlnx,fails-without-test-cd: 144c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 145c66ec88fSEmmanuel Vadot description: 146c66ec88fSEmmanuel Vadot When present, the controller doesn't work when the CD line is not 147c66ec88fSEmmanuel Vadot connected properly, and the line is not connected properly. 148c66ec88fSEmmanuel Vadot Test mode can be used to force the controller to function. 149c66ec88fSEmmanuel Vadot 150c66ec88fSEmmanuel Vadot xlnx,int-clock-stable-broken: 151c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 152c66ec88fSEmmanuel Vadot description: 153c66ec88fSEmmanuel Vadot When present, the controller always reports that the internal clock 154c66ec88fSEmmanuel Vadot is stable even when it is not. 155c66ec88fSEmmanuel Vadot 156c66ec88fSEmmanuel Vadot xlnx,mio-bank: 157c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 1585def4c47SEmmanuel Vadot enum: [0, 1, 2] 159c66ec88fSEmmanuel Vadot default: 0 160c66ec88fSEmmanuel Vadot description: 161c66ec88fSEmmanuel Vadot The MIO bank number in which the command and data lines are configured. 162c66ec88fSEmmanuel Vadot 163aa1a8ff2SEmmanuel Vadot iommus: 164aa1a8ff2SEmmanuel Vadot maxItems: 1 165aa1a8ff2SEmmanuel Vadot 166aa1a8ff2SEmmanuel Vadot power-domains: 167aa1a8ff2SEmmanuel Vadot maxItems: 1 168aa1a8ff2SEmmanuel Vadot 169c66ec88fSEmmanuel Vadotdependencies: 170c66ec88fSEmmanuel Vadot '#clock-cells': [ clock-output-names ] 171c66ec88fSEmmanuel Vadot 172c66ec88fSEmmanuel Vadotrequired: 173c66ec88fSEmmanuel Vadot - compatible 174c66ec88fSEmmanuel Vadot - reg 175c66ec88fSEmmanuel Vadot - interrupts 176c66ec88fSEmmanuel Vadot - clocks 177c66ec88fSEmmanuel Vadot - clock-names 178c66ec88fSEmmanuel Vadot 179c66ec88fSEmmanuel VadotunevaluatedProperties: false 180c66ec88fSEmmanuel Vadot 181c66ec88fSEmmanuel Vadotexamples: 182c66ec88fSEmmanuel Vadot - | 183c66ec88fSEmmanuel Vadot mmc@e0100000 { 184c66ec88fSEmmanuel Vadot compatible = "arasan,sdhci-8.9a"; 185c66ec88fSEmmanuel Vadot reg = <0xe0100000 0x1000>; 186c66ec88fSEmmanuel Vadot clock-names = "clk_xin", "clk_ahb"; 187c66ec88fSEmmanuel Vadot clocks = <&clkc 21>, <&clkc 32>; 188c66ec88fSEmmanuel Vadot interrupt-parent = <&gic>; 189c66ec88fSEmmanuel Vadot interrupts = <0 24 4>; 190c66ec88fSEmmanuel Vadot }; 191c66ec88fSEmmanuel Vadot 192c66ec88fSEmmanuel Vadot - | 193c66ec88fSEmmanuel Vadot mmc@e2800000 { 194c66ec88fSEmmanuel Vadot compatible = "arasan,sdhci-5.1"; 195c66ec88fSEmmanuel Vadot reg = <0xe2800000 0x1000>; 196c66ec88fSEmmanuel Vadot clock-names = "clk_xin", "clk_ahb"; 197c66ec88fSEmmanuel Vadot clocks = <&cru 8>, <&cru 18>; 198c66ec88fSEmmanuel Vadot interrupt-parent = <&gic>; 199c66ec88fSEmmanuel Vadot interrupts = <0 24 4>; 200c66ec88fSEmmanuel Vadot phys = <&emmc_phy>; 201c66ec88fSEmmanuel Vadot phy-names = "phy_arasan"; 202c66ec88fSEmmanuel Vadot }; 203c66ec88fSEmmanuel Vadot 204c66ec88fSEmmanuel Vadot - | 205c66ec88fSEmmanuel Vadot #include <dt-bindings/clock/rk3399-cru.h> 206c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 207c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 208c66ec88fSEmmanuel Vadot mmc@fe330000 { 209c66ec88fSEmmanuel Vadot compatible = "rockchip,rk3399-sdhci-5.1", "arasan,sdhci-5.1"; 210c66ec88fSEmmanuel Vadot reg = <0xfe330000 0x10000>; 211c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; 212c66ec88fSEmmanuel Vadot clocks = <&cru SCLK_EMMC>, <&cru ACLK_EMMC>; 213c66ec88fSEmmanuel Vadot clock-names = "clk_xin", "clk_ahb"; 214c66ec88fSEmmanuel Vadot arasan,soc-ctl-syscon = <&grf>; 215c66ec88fSEmmanuel Vadot assigned-clocks = <&cru SCLK_EMMC>; 216c66ec88fSEmmanuel Vadot assigned-clock-rates = <200000000>; 217c66ec88fSEmmanuel Vadot clock-output-names = "emmc_cardclock"; 218c66ec88fSEmmanuel Vadot phys = <&emmc_phy>; 219c66ec88fSEmmanuel Vadot phy-names = "phy_arasan"; 220c66ec88fSEmmanuel Vadot #clock-cells = <0>; 221c66ec88fSEmmanuel Vadot }; 222c66ec88fSEmmanuel Vadot 223c66ec88fSEmmanuel Vadot - | 224c66ec88fSEmmanuel Vadot mmc@ff160000 { 225c66ec88fSEmmanuel Vadot compatible = "xlnx,zynqmp-8.9a", "arasan,sdhci-8.9a"; 226c66ec88fSEmmanuel Vadot interrupt-parent = <&gic>; 227c66ec88fSEmmanuel Vadot interrupts = <0 48 4>; 228c66ec88fSEmmanuel Vadot reg = <0xff160000 0x1000>; 229*8d13bc63SEmmanuel Vadot clocks = <&clk200>, <&clk200>, <&clk1200>; 230*8d13bc63SEmmanuel Vadot clock-names = "clk_xin", "clk_ahb", "gate"; 231c66ec88fSEmmanuel Vadot clock-output-names = "clk_out_sd0", "clk_in_sd0"; 232c66ec88fSEmmanuel Vadot #clock-cells = <1>; 233c66ec88fSEmmanuel Vadot clk-phase-sd-hs = <63>, <72>; 234c66ec88fSEmmanuel Vadot }; 235c66ec88fSEmmanuel Vadot 236c66ec88fSEmmanuel Vadot - | 237c66ec88fSEmmanuel Vadot mmc@f1040000 { 238c66ec88fSEmmanuel Vadot compatible = "xlnx,versal-8.9a", "arasan,sdhci-8.9a"; 239c66ec88fSEmmanuel Vadot interrupt-parent = <&gic>; 240c66ec88fSEmmanuel Vadot interrupts = <0 126 4>; 241c66ec88fSEmmanuel Vadot reg = <0xf1040000 0x10000>; 242*8d13bc63SEmmanuel Vadot clocks = <&clk200>, <&clk200>, <&clk1200>; 243*8d13bc63SEmmanuel Vadot clock-names = "clk_xin", "clk_ahb", "gate"; 244c66ec88fSEmmanuel Vadot clock-output-names = "clk_out_sd0", "clk_in_sd0"; 245c66ec88fSEmmanuel Vadot #clock-cells = <1>; 246c66ec88fSEmmanuel Vadot clk-phase-sd-hs = <132>, <60>; 247c66ec88fSEmmanuel Vadot }; 248c66ec88fSEmmanuel Vadot 249c66ec88fSEmmanuel Vadot - | 250c66ec88fSEmmanuel Vadot #define LGM_CLK_EMMC5 251c66ec88fSEmmanuel Vadot #define LGM_CLK_NGI 252c66ec88fSEmmanuel Vadot #define LGM_GCLK_EMMC 253c66ec88fSEmmanuel Vadot mmc@ec700000 { 254c66ec88fSEmmanuel Vadot compatible = "intel,lgm-sdhci-5.1-emmc", "arasan,sdhci-5.1"; 255c66ec88fSEmmanuel Vadot reg = <0xec700000 0x300>; 256c66ec88fSEmmanuel Vadot interrupt-parent = <&ioapic1>; 257c66ec88fSEmmanuel Vadot interrupts = <44 1>; 258c66ec88fSEmmanuel Vadot clocks = <&cgu0 LGM_CLK_EMMC5>, <&cgu0 LGM_CLK_NGI>, 259c66ec88fSEmmanuel Vadot <&cgu0 LGM_GCLK_EMMC>; 260c66ec88fSEmmanuel Vadot clock-names = "clk_xin", "clk_ahb", "gate"; 261c66ec88fSEmmanuel Vadot clock-output-names = "emmc_cardclock"; 262c66ec88fSEmmanuel Vadot #clock-cells = <0>; 263c66ec88fSEmmanuel Vadot phys = <&emmc_phy>; 264c66ec88fSEmmanuel Vadot phy-names = "phy_arasan"; 265c66ec88fSEmmanuel Vadot arasan,soc-ctl-syscon = <&sysconf>; 266c66ec88fSEmmanuel Vadot }; 267c66ec88fSEmmanuel Vadot 268c66ec88fSEmmanuel Vadot - | 269c66ec88fSEmmanuel Vadot #define LGM_CLK_SDIO 270c66ec88fSEmmanuel Vadot #define LGM_GCLK_SDXC 271c66ec88fSEmmanuel Vadot mmc@ec600000 { 272c66ec88fSEmmanuel Vadot compatible = "intel,lgm-sdhci-5.1-sdxc", "arasan,sdhci-5.1"; 273c66ec88fSEmmanuel Vadot reg = <0xec600000 0x300>; 274c66ec88fSEmmanuel Vadot interrupt-parent = <&ioapic1>; 275c66ec88fSEmmanuel Vadot interrupts = <43 1>; 276c66ec88fSEmmanuel Vadot clocks = <&cgu0 LGM_CLK_SDIO>, <&cgu0 LGM_CLK_NGI>, 277c66ec88fSEmmanuel Vadot <&cgu0 LGM_GCLK_SDXC>; 278c66ec88fSEmmanuel Vadot clock-names = "clk_xin", "clk_ahb", "gate"; 279c66ec88fSEmmanuel Vadot clock-output-names = "sdxc_cardclock"; 280c66ec88fSEmmanuel Vadot #clock-cells = <0>; 281c66ec88fSEmmanuel Vadot phys = <&sdxc_phy>; 282c66ec88fSEmmanuel Vadot phy-names = "phy_arasan"; 283c66ec88fSEmmanuel Vadot arasan,soc-ctl-syscon = <&sysconf>; 284c66ec88fSEmmanuel Vadot }; 285c66ec88fSEmmanuel Vadot 286c66ec88fSEmmanuel Vadot - | 287c66ec88fSEmmanuel Vadot #define KEEM_BAY_PSS_AUX_EMMC 288c66ec88fSEmmanuel Vadot #define KEEM_BAY_PSS_EMMC 289c66ec88fSEmmanuel Vadot mmc@33000000 { 290c66ec88fSEmmanuel Vadot compatible = "intel,keembay-sdhci-5.1-emmc", "arasan,sdhci-5.1"; 291c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; 292c66ec88fSEmmanuel Vadot reg = <0x33000000 0x300>; 293c66ec88fSEmmanuel Vadot clock-names = "clk_xin", "clk_ahb"; 294c66ec88fSEmmanuel Vadot clocks = <&scmi_clk KEEM_BAY_PSS_AUX_EMMC>, 295c66ec88fSEmmanuel Vadot <&scmi_clk KEEM_BAY_PSS_EMMC>; 296c66ec88fSEmmanuel Vadot phys = <&emmc_phy>; 297c66ec88fSEmmanuel Vadot phy-names = "phy_arasan"; 298c66ec88fSEmmanuel Vadot assigned-clocks = <&scmi_clk KEEM_BAY_PSS_AUX_EMMC>; 299c66ec88fSEmmanuel Vadot assigned-clock-rates = <200000000>; 300c66ec88fSEmmanuel Vadot clock-output-names = "emmc_cardclock"; 301c66ec88fSEmmanuel Vadot #clock-cells = <0>; 302c66ec88fSEmmanuel Vadot arasan,soc-ctl-syscon = <&mmc_phy_syscon>; 303c66ec88fSEmmanuel Vadot }; 304c66ec88fSEmmanuel Vadot 305c66ec88fSEmmanuel Vadot - | 306c66ec88fSEmmanuel Vadot #define KEEM_BAY_PSS_AUX_SD0 307c66ec88fSEmmanuel Vadot #define KEEM_BAY_PSS_SD0 308c66ec88fSEmmanuel Vadot mmc@31000000 { 309c66ec88fSEmmanuel Vadot compatible = "intel,keembay-sdhci-5.1-sd"; 310c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; 311c66ec88fSEmmanuel Vadot reg = <0x31000000 0x300>; 312c66ec88fSEmmanuel Vadot clock-names = "clk_xin", "clk_ahb"; 313c66ec88fSEmmanuel Vadot clocks = <&scmi_clk KEEM_BAY_PSS_AUX_SD0>, 314c66ec88fSEmmanuel Vadot <&scmi_clk KEEM_BAY_PSS_SD0>; 315c66ec88fSEmmanuel Vadot arasan,soc-ctl-syscon = <&sd0_phy_syscon>; 316c66ec88fSEmmanuel Vadot }; 317