18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 28c2ecf20Sopenharmony_ci%YAML 1.2 38c2ecf20Sopenharmony_ci--- 48c2ecf20Sopenharmony_ci$id: "http://devicetree.org/schemas/mmc/arasan,sdhci.yaml#" 58c2ecf20Sopenharmony_ci$schema: "http://devicetree.org/meta-schemas/core.yaml#" 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_cititle: Device Tree Bindings for the Arasan SDHCI Controller 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_cimaintainers: 108c2ecf20Sopenharmony_ci - Adrian Hunter <adrian.hunter@intel.com> 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ciallOf: 138c2ecf20Sopenharmony_ci - $ref: "mmc-controller.yaml#" 148c2ecf20Sopenharmony_ci - if: 158c2ecf20Sopenharmony_ci properties: 168c2ecf20Sopenharmony_ci compatible: 178c2ecf20Sopenharmony_ci contains: 188c2ecf20Sopenharmony_ci const: arasan,sdhci-5.1 198c2ecf20Sopenharmony_ci then: 208c2ecf20Sopenharmony_ci required: 218c2ecf20Sopenharmony_ci - phys 228c2ecf20Sopenharmony_ci - phy-names 238c2ecf20Sopenharmony_ci - if: 248c2ecf20Sopenharmony_ci properties: 258c2ecf20Sopenharmony_ci compatible: 268c2ecf20Sopenharmony_ci contains: 278c2ecf20Sopenharmony_ci enum: 288c2ecf20Sopenharmony_ci - xlnx,zynqmp-8.9a 298c2ecf20Sopenharmony_ci - xlnx,versal-8.9a 308c2ecf20Sopenharmony_ci then: 318c2ecf20Sopenharmony_ci properties: 328c2ecf20Sopenharmony_ci clock-output-names: 338c2ecf20Sopenharmony_ci oneOf: 348c2ecf20Sopenharmony_ci - items: 358c2ecf20Sopenharmony_ci - const: clk_out_sd0 368c2ecf20Sopenharmony_ci - const: clk_in_sd0 378c2ecf20Sopenharmony_ci - items: 388c2ecf20Sopenharmony_ci - const: clk_out_sd1 398c2ecf20Sopenharmony_ci - const: clk_in_sd1 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ciproperties: 428c2ecf20Sopenharmony_ci compatible: 438c2ecf20Sopenharmony_ci oneOf: 448c2ecf20Sopenharmony_ci - const: arasan,sdhci-8.9a # generic Arasan SDHCI 8.9a PHY 458c2ecf20Sopenharmony_ci - const: arasan,sdhci-4.9a # generic Arasan SDHCI 4.9a PHY 468c2ecf20Sopenharmony_ci - const: arasan,sdhci-5.1 # generic Arasan SDHCI 5.1 PHY 478c2ecf20Sopenharmony_ci - items: 488c2ecf20Sopenharmony_ci - const: rockchip,rk3399-sdhci-5.1 # rk3399 eMMC PHY 498c2ecf20Sopenharmony_ci - const: arasan,sdhci-5.1 508c2ecf20Sopenharmony_ci description: 518c2ecf20Sopenharmony_ci For this device it is strongly suggested to include 528c2ecf20Sopenharmony_ci arasan,soc-ctl-syscon. 538c2ecf20Sopenharmony_ci - items: 548c2ecf20Sopenharmony_ci - const: xlnx,zynqmp-8.9a # ZynqMP SDHCI 8.9a PHY 558c2ecf20Sopenharmony_ci - const: arasan,sdhci-8.9a 568c2ecf20Sopenharmony_ci description: 578c2ecf20Sopenharmony_ci For this device it is strongly suggested to include 588c2ecf20Sopenharmony_ci clock-output-names and '#clock-cells'. 598c2ecf20Sopenharmony_ci - items: 608c2ecf20Sopenharmony_ci - const: xlnx,versal-8.9a # Versal SDHCI 8.9a PHY 618c2ecf20Sopenharmony_ci - const: arasan,sdhci-8.9a 628c2ecf20Sopenharmony_ci description: 638c2ecf20Sopenharmony_ci For this device it is strongly suggested to include 648c2ecf20Sopenharmony_ci clock-output-names and '#clock-cells'. 658c2ecf20Sopenharmony_ci - items: 668c2ecf20Sopenharmony_ci - const: intel,lgm-sdhci-5.1-emmc # Intel LGM eMMC PHY 678c2ecf20Sopenharmony_ci - const: arasan,sdhci-5.1 688c2ecf20Sopenharmony_ci description: 698c2ecf20Sopenharmony_ci For this device it is strongly suggested to include 708c2ecf20Sopenharmony_ci arasan,soc-ctl-syscon. 718c2ecf20Sopenharmony_ci - items: 728c2ecf20Sopenharmony_ci - const: intel,lgm-sdhci-5.1-sdxc # Intel LGM SDXC PHY 738c2ecf20Sopenharmony_ci - const: arasan,sdhci-5.1 748c2ecf20Sopenharmony_ci description: 758c2ecf20Sopenharmony_ci For this device it is strongly suggested to include 768c2ecf20Sopenharmony_ci arasan,soc-ctl-syscon. 778c2ecf20Sopenharmony_ci - items: 788c2ecf20Sopenharmony_ci - const: intel,keembay-sdhci-5.1-emmc # Intel Keem Bay eMMC PHY 798c2ecf20Sopenharmony_ci - const: arasan,sdhci-5.1 808c2ecf20Sopenharmony_ci description: 818c2ecf20Sopenharmony_ci For this device it is strongly suggested to include 828c2ecf20Sopenharmony_ci arasan,soc-ctl-syscon. 838c2ecf20Sopenharmony_ci - const: intel,keembay-sdhci-5.1-sd # Intel Keem Bay SD controller 848c2ecf20Sopenharmony_ci description: 858c2ecf20Sopenharmony_ci For this device it is strongly suggested to include 868c2ecf20Sopenharmony_ci arasan,soc-ctl-syscon. 878c2ecf20Sopenharmony_ci - const: intel,keembay-sdhci-5.1-sdio # Intel Keem Bay SDIO controller 888c2ecf20Sopenharmony_ci description: 898c2ecf20Sopenharmony_ci For this device it is strongly suggested to include 908c2ecf20Sopenharmony_ci arasan,soc-ctl-syscon. 918c2ecf20Sopenharmony_ci 928c2ecf20Sopenharmony_ci reg: 938c2ecf20Sopenharmony_ci maxItems: 1 948c2ecf20Sopenharmony_ci 958c2ecf20Sopenharmony_ci clocks: 968c2ecf20Sopenharmony_ci minItems: 2 978c2ecf20Sopenharmony_ci maxItems: 3 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_ci clock-names: 1008c2ecf20Sopenharmony_ci minItems: 2 1018c2ecf20Sopenharmony_ci items: 1028c2ecf20Sopenharmony_ci - const: clk_xin 1038c2ecf20Sopenharmony_ci - const: clk_ahb 1048c2ecf20Sopenharmony_ci - const: gate 1058c2ecf20Sopenharmony_ci 1068c2ecf20Sopenharmony_ci interrupts: 1078c2ecf20Sopenharmony_ci maxItems: 1 1088c2ecf20Sopenharmony_ci 1098c2ecf20Sopenharmony_ci phys: 1108c2ecf20Sopenharmony_ci maxItems: 1 1118c2ecf20Sopenharmony_ci 1128c2ecf20Sopenharmony_ci phy-names: 1138c2ecf20Sopenharmony_ci const: phy_arasan 1148c2ecf20Sopenharmony_ci 1158c2ecf20Sopenharmony_ci arasan,soc-ctl-syscon: 1168c2ecf20Sopenharmony_ci $ref: /schemas/types.yaml#/definitions/phandle 1178c2ecf20Sopenharmony_ci description: 1188c2ecf20Sopenharmony_ci A phandle to a syscon device (see ../mfd/syscon.txt) used to access 1198c2ecf20Sopenharmony_ci core corecfg registers. Offsets of registers in this syscon are 1208c2ecf20Sopenharmony_ci determined based on the main compatible string for the device. 1218c2ecf20Sopenharmony_ci 1228c2ecf20Sopenharmony_ci clock-output-names: 1238c2ecf20Sopenharmony_ci minItems: 1 1248c2ecf20Sopenharmony_ci maxItems: 2 1258c2ecf20Sopenharmony_ci description: 1268c2ecf20Sopenharmony_ci Name of the card clock which will be exposed by this device. 1278c2ecf20Sopenharmony_ci 1288c2ecf20Sopenharmony_ci '#clock-cells': 1298c2ecf20Sopenharmony_ci enum: [0, 1] 1308c2ecf20Sopenharmony_ci description: 1318c2ecf20Sopenharmony_ci With this property in place we will export one or two clocks 1328c2ecf20Sopenharmony_ci representing the Card Clock. These clocks are expected to be 1338c2ecf20Sopenharmony_ci consumed by our PHY. 1348c2ecf20Sopenharmony_ci 1358c2ecf20Sopenharmony_ci xlnx,fails-without-test-cd: 1368c2ecf20Sopenharmony_ci $ref: /schemas/types.yaml#/definitions/flag 1378c2ecf20Sopenharmony_ci description: 1388c2ecf20Sopenharmony_ci When present, the controller doesn't work when the CD line is not 1398c2ecf20Sopenharmony_ci connected properly, and the line is not connected properly. 1408c2ecf20Sopenharmony_ci Test mode can be used to force the controller to function. 1418c2ecf20Sopenharmony_ci 1428c2ecf20Sopenharmony_ci xlnx,int-clock-stable-broken: 1438c2ecf20Sopenharmony_ci $ref: /schemas/types.yaml#/definitions/flag 1448c2ecf20Sopenharmony_ci description: 1458c2ecf20Sopenharmony_ci When present, the controller always reports that the internal clock 1468c2ecf20Sopenharmony_ci is stable even when it is not. 1478c2ecf20Sopenharmony_ci 1488c2ecf20Sopenharmony_ci xlnx,mio-bank: 1498c2ecf20Sopenharmony_ci $ref: /schemas/types.yaml#/definitions/uint32 1508c2ecf20Sopenharmony_ci enum: [0, 2] 1518c2ecf20Sopenharmony_ci default: 0 1528c2ecf20Sopenharmony_ci description: 1538c2ecf20Sopenharmony_ci The MIO bank number in which the command and data lines are configured. 1548c2ecf20Sopenharmony_ci 1558c2ecf20Sopenharmony_cidependencies: 1568c2ecf20Sopenharmony_ci clock-output-names: [ '#clock-cells' ] 1578c2ecf20Sopenharmony_ci '#clock-cells': [ clock-output-names ] 1588c2ecf20Sopenharmony_ci 1598c2ecf20Sopenharmony_cirequired: 1608c2ecf20Sopenharmony_ci - compatible 1618c2ecf20Sopenharmony_ci - reg 1628c2ecf20Sopenharmony_ci - interrupts 1638c2ecf20Sopenharmony_ci - clocks 1648c2ecf20Sopenharmony_ci - clock-names 1658c2ecf20Sopenharmony_ci 1668c2ecf20Sopenharmony_ciunevaluatedProperties: false 1678c2ecf20Sopenharmony_ci 1688c2ecf20Sopenharmony_ciexamples: 1698c2ecf20Sopenharmony_ci - | 1708c2ecf20Sopenharmony_ci mmc@e0100000 { 1718c2ecf20Sopenharmony_ci compatible = "arasan,sdhci-8.9a"; 1728c2ecf20Sopenharmony_ci reg = <0xe0100000 0x1000>; 1738c2ecf20Sopenharmony_ci clock-names = "clk_xin", "clk_ahb"; 1748c2ecf20Sopenharmony_ci clocks = <&clkc 21>, <&clkc 32>; 1758c2ecf20Sopenharmony_ci interrupt-parent = <&gic>; 1768c2ecf20Sopenharmony_ci interrupts = <0 24 4>; 1778c2ecf20Sopenharmony_ci }; 1788c2ecf20Sopenharmony_ci 1798c2ecf20Sopenharmony_ci - | 1808c2ecf20Sopenharmony_ci mmc@e2800000 { 1818c2ecf20Sopenharmony_ci compatible = "arasan,sdhci-5.1"; 1828c2ecf20Sopenharmony_ci reg = <0xe2800000 0x1000>; 1838c2ecf20Sopenharmony_ci clock-names = "clk_xin", "clk_ahb"; 1848c2ecf20Sopenharmony_ci clocks = <&cru 8>, <&cru 18>; 1858c2ecf20Sopenharmony_ci interrupt-parent = <&gic>; 1868c2ecf20Sopenharmony_ci interrupts = <0 24 4>; 1878c2ecf20Sopenharmony_ci phys = <&emmc_phy>; 1888c2ecf20Sopenharmony_ci phy-names = "phy_arasan"; 1898c2ecf20Sopenharmony_ci }; 1908c2ecf20Sopenharmony_ci 1918c2ecf20Sopenharmony_ci - | 1928c2ecf20Sopenharmony_ci #include <dt-bindings/clock/rk3399-cru.h> 1938c2ecf20Sopenharmony_ci #include <dt-bindings/interrupt-controller/arm-gic.h> 1948c2ecf20Sopenharmony_ci #include <dt-bindings/interrupt-controller/irq.h> 1958c2ecf20Sopenharmony_ci mmc@fe330000 { 1968c2ecf20Sopenharmony_ci compatible = "rockchip,rk3399-sdhci-5.1", "arasan,sdhci-5.1"; 1978c2ecf20Sopenharmony_ci reg = <0xfe330000 0x10000>; 1988c2ecf20Sopenharmony_ci interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; 1998c2ecf20Sopenharmony_ci clocks = <&cru SCLK_EMMC>, <&cru ACLK_EMMC>; 2008c2ecf20Sopenharmony_ci clock-names = "clk_xin", "clk_ahb"; 2018c2ecf20Sopenharmony_ci arasan,soc-ctl-syscon = <&grf>; 2028c2ecf20Sopenharmony_ci assigned-clocks = <&cru SCLK_EMMC>; 2038c2ecf20Sopenharmony_ci assigned-clock-rates = <200000000>; 2048c2ecf20Sopenharmony_ci clock-output-names = "emmc_cardclock"; 2058c2ecf20Sopenharmony_ci phys = <&emmc_phy>; 2068c2ecf20Sopenharmony_ci phy-names = "phy_arasan"; 2078c2ecf20Sopenharmony_ci #clock-cells = <0>; 2088c2ecf20Sopenharmony_ci }; 2098c2ecf20Sopenharmony_ci 2108c2ecf20Sopenharmony_ci - | 2118c2ecf20Sopenharmony_ci mmc@ff160000 { 2128c2ecf20Sopenharmony_ci compatible = "xlnx,zynqmp-8.9a", "arasan,sdhci-8.9a"; 2138c2ecf20Sopenharmony_ci interrupt-parent = <&gic>; 2148c2ecf20Sopenharmony_ci interrupts = <0 48 4>; 2158c2ecf20Sopenharmony_ci reg = <0xff160000 0x1000>; 2168c2ecf20Sopenharmony_ci clocks = <&clk200>, <&clk200>; 2178c2ecf20Sopenharmony_ci clock-names = "clk_xin", "clk_ahb"; 2188c2ecf20Sopenharmony_ci clock-output-names = "clk_out_sd0", "clk_in_sd0"; 2198c2ecf20Sopenharmony_ci #clock-cells = <1>; 2208c2ecf20Sopenharmony_ci clk-phase-sd-hs = <63>, <72>; 2218c2ecf20Sopenharmony_ci }; 2228c2ecf20Sopenharmony_ci 2238c2ecf20Sopenharmony_ci - | 2248c2ecf20Sopenharmony_ci mmc@f1040000 { 2258c2ecf20Sopenharmony_ci compatible = "xlnx,versal-8.9a", "arasan,sdhci-8.9a"; 2268c2ecf20Sopenharmony_ci interrupt-parent = <&gic>; 2278c2ecf20Sopenharmony_ci interrupts = <0 126 4>; 2288c2ecf20Sopenharmony_ci reg = <0xf1040000 0x10000>; 2298c2ecf20Sopenharmony_ci clocks = <&clk200>, <&clk200>; 2308c2ecf20Sopenharmony_ci clock-names = "clk_xin", "clk_ahb"; 2318c2ecf20Sopenharmony_ci clock-output-names = "clk_out_sd0", "clk_in_sd0"; 2328c2ecf20Sopenharmony_ci #clock-cells = <1>; 2338c2ecf20Sopenharmony_ci clk-phase-sd-hs = <132>, <60>; 2348c2ecf20Sopenharmony_ci }; 2358c2ecf20Sopenharmony_ci 2368c2ecf20Sopenharmony_ci - | 2378c2ecf20Sopenharmony_ci #define LGM_CLK_EMMC5 2388c2ecf20Sopenharmony_ci #define LGM_CLK_NGI 2398c2ecf20Sopenharmony_ci #define LGM_GCLK_EMMC 2408c2ecf20Sopenharmony_ci mmc@ec700000 { 2418c2ecf20Sopenharmony_ci compatible = "intel,lgm-sdhci-5.1-emmc", "arasan,sdhci-5.1"; 2428c2ecf20Sopenharmony_ci reg = <0xec700000 0x300>; 2438c2ecf20Sopenharmony_ci interrupt-parent = <&ioapic1>; 2448c2ecf20Sopenharmony_ci interrupts = <44 1>; 2458c2ecf20Sopenharmony_ci clocks = <&cgu0 LGM_CLK_EMMC5>, <&cgu0 LGM_CLK_NGI>, 2468c2ecf20Sopenharmony_ci <&cgu0 LGM_GCLK_EMMC>; 2478c2ecf20Sopenharmony_ci clock-names = "clk_xin", "clk_ahb", "gate"; 2488c2ecf20Sopenharmony_ci clock-output-names = "emmc_cardclock"; 2498c2ecf20Sopenharmony_ci #clock-cells = <0>; 2508c2ecf20Sopenharmony_ci phys = <&emmc_phy>; 2518c2ecf20Sopenharmony_ci phy-names = "phy_arasan"; 2528c2ecf20Sopenharmony_ci arasan,soc-ctl-syscon = <&sysconf>; 2538c2ecf20Sopenharmony_ci }; 2548c2ecf20Sopenharmony_ci 2558c2ecf20Sopenharmony_ci - | 2568c2ecf20Sopenharmony_ci #define LGM_CLK_SDIO 2578c2ecf20Sopenharmony_ci #define LGM_GCLK_SDXC 2588c2ecf20Sopenharmony_ci mmc@ec600000 { 2598c2ecf20Sopenharmony_ci compatible = "intel,lgm-sdhci-5.1-sdxc", "arasan,sdhci-5.1"; 2608c2ecf20Sopenharmony_ci reg = <0xec600000 0x300>; 2618c2ecf20Sopenharmony_ci interrupt-parent = <&ioapic1>; 2628c2ecf20Sopenharmony_ci interrupts = <43 1>; 2638c2ecf20Sopenharmony_ci clocks = <&cgu0 LGM_CLK_SDIO>, <&cgu0 LGM_CLK_NGI>, 2648c2ecf20Sopenharmony_ci <&cgu0 LGM_GCLK_SDXC>; 2658c2ecf20Sopenharmony_ci clock-names = "clk_xin", "clk_ahb", "gate"; 2668c2ecf20Sopenharmony_ci clock-output-names = "sdxc_cardclock"; 2678c2ecf20Sopenharmony_ci #clock-cells = <0>; 2688c2ecf20Sopenharmony_ci phys = <&sdxc_phy>; 2698c2ecf20Sopenharmony_ci phy-names = "phy_arasan"; 2708c2ecf20Sopenharmony_ci arasan,soc-ctl-syscon = <&sysconf>; 2718c2ecf20Sopenharmony_ci }; 2728c2ecf20Sopenharmony_ci 2738c2ecf20Sopenharmony_ci - | 2748c2ecf20Sopenharmony_ci #define KEEM_BAY_PSS_AUX_EMMC 2758c2ecf20Sopenharmony_ci #define KEEM_BAY_PSS_EMMC 2768c2ecf20Sopenharmony_ci mmc@33000000 { 2778c2ecf20Sopenharmony_ci compatible = "intel,keembay-sdhci-5.1-emmc", "arasan,sdhci-5.1"; 2788c2ecf20Sopenharmony_ci interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; 2798c2ecf20Sopenharmony_ci reg = <0x33000000 0x300>; 2808c2ecf20Sopenharmony_ci clock-names = "clk_xin", "clk_ahb"; 2818c2ecf20Sopenharmony_ci clocks = <&scmi_clk KEEM_BAY_PSS_AUX_EMMC>, 2828c2ecf20Sopenharmony_ci <&scmi_clk KEEM_BAY_PSS_EMMC>; 2838c2ecf20Sopenharmony_ci phys = <&emmc_phy>; 2848c2ecf20Sopenharmony_ci phy-names = "phy_arasan"; 2858c2ecf20Sopenharmony_ci assigned-clocks = <&scmi_clk KEEM_BAY_PSS_AUX_EMMC>; 2868c2ecf20Sopenharmony_ci assigned-clock-rates = <200000000>; 2878c2ecf20Sopenharmony_ci clock-output-names = "emmc_cardclock"; 2888c2ecf20Sopenharmony_ci #clock-cells = <0>; 2898c2ecf20Sopenharmony_ci arasan,soc-ctl-syscon = <&mmc_phy_syscon>; 2908c2ecf20Sopenharmony_ci }; 2918c2ecf20Sopenharmony_ci 2928c2ecf20Sopenharmony_ci - | 2938c2ecf20Sopenharmony_ci #define KEEM_BAY_PSS_AUX_SD0 2948c2ecf20Sopenharmony_ci #define KEEM_BAY_PSS_SD0 2958c2ecf20Sopenharmony_ci mmc@31000000 { 2968c2ecf20Sopenharmony_ci compatible = "intel,keembay-sdhci-5.1-sd"; 2978c2ecf20Sopenharmony_ci interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; 2988c2ecf20Sopenharmony_ci reg = <0x31000000 0x300>; 2998c2ecf20Sopenharmony_ci clock-names = "clk_xin", "clk_ahb"; 3008c2ecf20Sopenharmony_ci clocks = <&scmi_clk KEEM_BAY_PSS_AUX_SD0>, 3018c2ecf20Sopenharmony_ci <&scmi_clk KEEM_BAY_PSS_SD0>; 3028c2ecf20Sopenharmony_ci arasan,soc-ctl-syscon = <&sd0_phy_syscon>; 3038c2ecf20Sopenharmony_ci }; 304