xref: /freebsd/sys/contrib/device-tree/Bindings/mmc/arasan,sdhci.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotDevice Tree Bindings for the Arasan SDHCI Controller
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel Vadot  The bindings follow the mmc[1], clock[2], interrupt[3] and phy[4] bindings.
4*c66ec88fSEmmanuel Vadot  Only deviations are documented here.
5*c66ec88fSEmmanuel Vadot
6*c66ec88fSEmmanuel Vadot  [1] Documentation/devicetree/bindings/mmc/mmc.txt
7*c66ec88fSEmmanuel Vadot  [2] Documentation/devicetree/bindings/clock/clock-bindings.txt
8*c66ec88fSEmmanuel Vadot  [3] Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
9*c66ec88fSEmmanuel Vadot  [4] Documentation/devicetree/bindings/phy/phy-bindings.txt
10*c66ec88fSEmmanuel Vadot
11*c66ec88fSEmmanuel VadotRequired Properties:
12*c66ec88fSEmmanuel Vadot  - compatible: Compatibility string.  One of:
13*c66ec88fSEmmanuel Vadot    - "arasan,sdhci-8.9a": generic Arasan SDHCI 8.9a PHY
14*c66ec88fSEmmanuel Vadot    - "arasan,sdhci-4.9a": generic Arasan SDHCI 4.9a PHY
15*c66ec88fSEmmanuel Vadot    - "arasan,sdhci-5.1": generic Arasan SDHCI 5.1 PHY
16*c66ec88fSEmmanuel Vadot    - "rockchip,rk3399-sdhci-5.1", "arasan,sdhci-5.1": rk3399 eMMC PHY
17*c66ec88fSEmmanuel Vadot      For this device it is strongly suggested to include arasan,soc-ctl-syscon.
18*c66ec88fSEmmanuel Vadot    - "xlnx,zynqmp-8.9a": ZynqMP SDHCI 8.9a PHY
19*c66ec88fSEmmanuel Vadot      For this device it is strongly suggested to include clock-output-names and
20*c66ec88fSEmmanuel Vadot      #clock-cells.
21*c66ec88fSEmmanuel Vadot    - "xlnx,versal-8.9a": Versal SDHCI 8.9a PHY
22*c66ec88fSEmmanuel Vadot      For this device it is strongly suggested to include clock-output-names and
23*c66ec88fSEmmanuel Vadot      #clock-cells.
24*c66ec88fSEmmanuel Vadot    - "ti,am654-sdhci-5.1", "arasan,sdhci-5.1": TI AM654 MMC PHY
25*c66ec88fSEmmanuel Vadot	Note: This binding has been deprecated and moved to [5].
26*c66ec88fSEmmanuel Vadot    - "intel,lgm-sdhci-5.1-emmc", "arasan,sdhci-5.1": Intel LGM eMMC PHY
27*c66ec88fSEmmanuel Vadot      For this device it is strongly suggested to include arasan,soc-ctl-syscon.
28*c66ec88fSEmmanuel Vadot    - "intel,lgm-sdhci-5.1-sdxc", "arasan,sdhci-5.1": Intel LGM SDXC PHY
29*c66ec88fSEmmanuel Vadot      For this device it is strongly suggested to include arasan,soc-ctl-syscon.
30*c66ec88fSEmmanuel Vadot    - "intel,keembay-sdhci-5.1-emmc", "arasan,sdhci-5.1": Intel Keem Bay eMMC
31*c66ec88fSEmmanuel Vadot      For this device it is strongly suggested to include arasan,soc-ctl-syscon.
32*c66ec88fSEmmanuel Vadot    - "intel,keembay-sdhci-5.1-sd": Intel Keem Bay SD controller
33*c66ec88fSEmmanuel Vadot      For this device it is strongly suggested to include arasan,soc-ctl-syscon.
34*c66ec88fSEmmanuel Vadot    - "intel,keembay-sdhci-5.1-sdio": Intel Keem Bay SDIO controller
35*c66ec88fSEmmanuel Vadot      For this device it is strongly suggested to include arasan,soc-ctl-syscon.
36*c66ec88fSEmmanuel Vadot
37*c66ec88fSEmmanuel Vadot  [5] Documentation/devicetree/bindings/mmc/sdhci-am654.txt
38*c66ec88fSEmmanuel Vadot
39*c66ec88fSEmmanuel Vadot  - reg: From mmc bindings: Register location and length.
40*c66ec88fSEmmanuel Vadot  - clocks: From clock bindings: Handles to clock inputs.
41*c66ec88fSEmmanuel Vadot  - clock-names: From clock bindings: Tuple including "clk_xin" and "clk_ahb"
42*c66ec88fSEmmanuel Vadot  - interrupts: Interrupt specifier
43*c66ec88fSEmmanuel Vadot
44*c66ec88fSEmmanuel VadotRequired Properties for "arasan,sdhci-5.1":
45*c66ec88fSEmmanuel Vadot  - phys: From PHY bindings: Phandle for the Generic PHY for arasan.
46*c66ec88fSEmmanuel Vadot  - phy-names:  MUST be "phy_arasan".
47*c66ec88fSEmmanuel Vadot
48*c66ec88fSEmmanuel VadotOptional Properties:
49*c66ec88fSEmmanuel Vadot  - arasan,soc-ctl-syscon: A phandle to a syscon device (see ../mfd/syscon.txt)
50*c66ec88fSEmmanuel Vadot    used to access core corecfg registers.  Offsets of registers in this
51*c66ec88fSEmmanuel Vadot    syscon are determined based on the main compatible string for the device.
52*c66ec88fSEmmanuel Vadot  - clock-output-names: If specified, this will be the name of the card clock
53*c66ec88fSEmmanuel Vadot    which will be exposed by this device.  Required if #clock-cells is
54*c66ec88fSEmmanuel Vadot    specified.
55*c66ec88fSEmmanuel Vadot  - #clock-cells: If specified this should be the value <0> or <1>. With this
56*c66ec88fSEmmanuel Vadot    property in place we will export one or two clocks representing the Card
57*c66ec88fSEmmanuel Vadot    Clock. These clocks are expected to be consumed by our PHY.
58*c66ec88fSEmmanuel Vadot  - xlnx,fails-without-test-cd: when present, the controller doesn't work when
59*c66ec88fSEmmanuel Vadot    the CD line is not connected properly, and the line is not connected
60*c66ec88fSEmmanuel Vadot    properly. Test mode can be used to force the controller to function.
61*c66ec88fSEmmanuel Vadot  - xlnx,int-clock-stable-broken: when present, the controller always reports
62*c66ec88fSEmmanuel Vadot    that the internal clock is stable even when it is not.
63*c66ec88fSEmmanuel Vadot
64*c66ec88fSEmmanuel Vadot  - xlnx,mio-bank: When specified, this will indicate the MIO bank number in
65*c66ec88fSEmmanuel Vadot    which the command and data lines are configured. If not specified, driver
66*c66ec88fSEmmanuel Vadot    will assume this as 0.
67*c66ec88fSEmmanuel Vadot
68*c66ec88fSEmmanuel VadotExample:
69*c66ec88fSEmmanuel Vadot	sdhci@e0100000 {
70*c66ec88fSEmmanuel Vadot		compatible = "arasan,sdhci-8.9a";
71*c66ec88fSEmmanuel Vadot		reg = <0xe0100000 0x1000>;
72*c66ec88fSEmmanuel Vadot		clock-names = "clk_xin", "clk_ahb";
73*c66ec88fSEmmanuel Vadot		clocks = <&clkc 21>, <&clkc 32>;
74*c66ec88fSEmmanuel Vadot		interrupt-parent = <&gic>;
75*c66ec88fSEmmanuel Vadot		interrupts = <0 24 4>;
76*c66ec88fSEmmanuel Vadot	} ;
77*c66ec88fSEmmanuel Vadot
78*c66ec88fSEmmanuel Vadot	sdhci@e2800000 {
79*c66ec88fSEmmanuel Vadot		compatible = "arasan,sdhci-5.1";
80*c66ec88fSEmmanuel Vadot		reg = <0xe2800000 0x1000>;
81*c66ec88fSEmmanuel Vadot		clock-names = "clk_xin", "clk_ahb";
82*c66ec88fSEmmanuel Vadot		clocks = <&cru 8>, <&cru 18>;
83*c66ec88fSEmmanuel Vadot		interrupt-parent = <&gic>;
84*c66ec88fSEmmanuel Vadot		interrupts = <0 24 4>;
85*c66ec88fSEmmanuel Vadot		phys = <&emmc_phy>;
86*c66ec88fSEmmanuel Vadot		phy-names = "phy_arasan";
87*c66ec88fSEmmanuel Vadot	} ;
88*c66ec88fSEmmanuel Vadot
89*c66ec88fSEmmanuel Vadot	sdhci: sdhci@fe330000 {
90*c66ec88fSEmmanuel Vadot		compatible = "rockchip,rk3399-sdhci-5.1", "arasan,sdhci-5.1";
91*c66ec88fSEmmanuel Vadot		reg = <0x0 0xfe330000 0x0 0x10000>;
92*c66ec88fSEmmanuel Vadot		interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
93*c66ec88fSEmmanuel Vadot		clocks = <&cru SCLK_EMMC>, <&cru ACLK_EMMC>;
94*c66ec88fSEmmanuel Vadot		clock-names = "clk_xin", "clk_ahb";
95*c66ec88fSEmmanuel Vadot		arasan,soc-ctl-syscon = <&grf>;
96*c66ec88fSEmmanuel Vadot		assigned-clocks = <&cru SCLK_EMMC>;
97*c66ec88fSEmmanuel Vadot		assigned-clock-rates = <200000000>;
98*c66ec88fSEmmanuel Vadot		clock-output-names = "emmc_cardclock";
99*c66ec88fSEmmanuel Vadot		phys = <&emmc_phy>;
100*c66ec88fSEmmanuel Vadot		phy-names = "phy_arasan";
101*c66ec88fSEmmanuel Vadot		#clock-cells = <0>;
102*c66ec88fSEmmanuel Vadot	};
103*c66ec88fSEmmanuel Vadot
104*c66ec88fSEmmanuel Vadot	sdhci: mmc@ff160000 {
105*c66ec88fSEmmanuel Vadot		compatible = "xlnx,zynqmp-8.9a", "arasan,sdhci-8.9a";
106*c66ec88fSEmmanuel Vadot		interrupt-parent = <&gic>;
107*c66ec88fSEmmanuel Vadot		interrupts = <0 48 4>;
108*c66ec88fSEmmanuel Vadot		reg = <0x0 0xff160000 0x0 0x1000>;
109*c66ec88fSEmmanuel Vadot		clocks = <&clk200>, <&clk200>;
110*c66ec88fSEmmanuel Vadot		clock-names = "clk_xin", "clk_ahb";
111*c66ec88fSEmmanuel Vadot		clock-output-names = "clk_out_sd0", "clk_in_sd0";
112*c66ec88fSEmmanuel Vadot		#clock-cells = <1>;
113*c66ec88fSEmmanuel Vadot		clk-phase-sd-hs = <63>, <72>;
114*c66ec88fSEmmanuel Vadot	};
115*c66ec88fSEmmanuel Vadot
116*c66ec88fSEmmanuel Vadot	sdhci: mmc@f1040000 {
117*c66ec88fSEmmanuel Vadot		compatible = "xlnx,versal-8.9a", "arasan,sdhci-8.9a";
118*c66ec88fSEmmanuel Vadot		interrupt-parent = <&gic>;
119*c66ec88fSEmmanuel Vadot		interrupts = <0 126 4>;
120*c66ec88fSEmmanuel Vadot		reg = <0x0 0xf1040000 0x0 0x10000>;
121*c66ec88fSEmmanuel Vadot		clocks = <&clk200>, <&clk200>;
122*c66ec88fSEmmanuel Vadot		clock-names = "clk_xin", "clk_ahb";
123*c66ec88fSEmmanuel Vadot		clock-output-names = "clk_out_sd0", "clk_in_sd0";
124*c66ec88fSEmmanuel Vadot		#clock-cells = <1>;
125*c66ec88fSEmmanuel Vadot		clk-phase-sd-hs = <132>, <60>;
126*c66ec88fSEmmanuel Vadot	};
127*c66ec88fSEmmanuel Vadot
128*c66ec88fSEmmanuel Vadot	emmc: sdhci@ec700000 {
129*c66ec88fSEmmanuel Vadot		compatible = "intel,lgm-sdhci-5.1-emmc", "arasan,sdhci-5.1";
130*c66ec88fSEmmanuel Vadot		reg = <0xec700000 0x300>;
131*c66ec88fSEmmanuel Vadot		interrupt-parent = <&ioapic1>;
132*c66ec88fSEmmanuel Vadot		interrupts = <44 1>;
133*c66ec88fSEmmanuel Vadot		clocks = <&cgu0 LGM_CLK_EMMC5>, <&cgu0 LGM_CLK_NGI>,
134*c66ec88fSEmmanuel Vadot			 <&cgu0 LGM_GCLK_EMMC>;
135*c66ec88fSEmmanuel Vadot		clock-names = "clk_xin", "clk_ahb", "gate";
136*c66ec88fSEmmanuel Vadot		clock-output-names = "emmc_cardclock";
137*c66ec88fSEmmanuel Vadot		#clock-cells = <0>;
138*c66ec88fSEmmanuel Vadot		phys = <&emmc_phy>;
139*c66ec88fSEmmanuel Vadot		phy-names = "phy_arasan";
140*c66ec88fSEmmanuel Vadot		arasan,soc-ctl-syscon = <&sysconf>;
141*c66ec88fSEmmanuel Vadot	};
142*c66ec88fSEmmanuel Vadot
143*c66ec88fSEmmanuel Vadot	sdxc: sdhci@ec600000 {
144*c66ec88fSEmmanuel Vadot		compatible = "arasan,sdhci-5.1", "intel,lgm-sdhci-5.1-sdxc";
145*c66ec88fSEmmanuel Vadot		reg = <0xec600000 0x300>;
146*c66ec88fSEmmanuel Vadot		interrupt-parent = <&ioapic1>;
147*c66ec88fSEmmanuel Vadot		interrupts = <43 1>;
148*c66ec88fSEmmanuel Vadot		clocks = <&cgu0 LGM_CLK_SDIO>, <&cgu0 LGM_CLK_NGI>,
149*c66ec88fSEmmanuel Vadot			 <&cgu0 LGM_GCLK_SDXC>;
150*c66ec88fSEmmanuel Vadot		clock-names = "clk_xin", "clk_ahb", "gate";
151*c66ec88fSEmmanuel Vadot		clock-output-names = "sdxc_cardclock";
152*c66ec88fSEmmanuel Vadot		#clock-cells = <0>;
153*c66ec88fSEmmanuel Vadot		phys = <&sdxc_phy>;
154*c66ec88fSEmmanuel Vadot		phy-names = "phy_arasan";
155*c66ec88fSEmmanuel Vadot		arasan,soc-ctl-syscon = <&sysconf>;
156*c66ec88fSEmmanuel Vadot	};
157*c66ec88fSEmmanuel Vadot
158*c66ec88fSEmmanuel Vadot	mmc: mmc@33000000 {
159*c66ec88fSEmmanuel Vadot		compatible = "intel,keembay-sdhci-5.1-emmc", "arasan,sdhci-5.1";
160*c66ec88fSEmmanuel Vadot		interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
161*c66ec88fSEmmanuel Vadot		reg = <0x0 0x33000000 0x0 0x300>;
162*c66ec88fSEmmanuel Vadot		clock-names = "clk_xin", "clk_ahb";
163*c66ec88fSEmmanuel Vadot		clocks = <&scmi_clk KEEM_BAY_PSS_AUX_EMMC>,
164*c66ec88fSEmmanuel Vadot			 <&scmi_clk KEEM_BAY_PSS_EMMC>;
165*c66ec88fSEmmanuel Vadot		phys = <&emmc_phy>;
166*c66ec88fSEmmanuel Vadot		phy-names = "phy_arasan";
167*c66ec88fSEmmanuel Vadot		assigned-clocks = <&scmi_clk KEEM_BAY_PSS_AUX_EMMC>;
168*c66ec88fSEmmanuel Vadot		assigned-clock-rates = <200000000>;
169*c66ec88fSEmmanuel Vadot		clock-output-names = "emmc_cardclock";
170*c66ec88fSEmmanuel Vadot		#clock-cells = <0>;
171*c66ec88fSEmmanuel Vadot		arasan,soc-ctl-syscon = <&mmc_phy_syscon>;
172*c66ec88fSEmmanuel Vadot	};
173*c66ec88fSEmmanuel Vadot
174*c66ec88fSEmmanuel Vadot	sd0: mmc@31000000 {
175*c66ec88fSEmmanuel Vadot		compatible = "intel,keembay-sdhci-5.1-sd";
176*c66ec88fSEmmanuel Vadot		interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
177*c66ec88fSEmmanuel Vadot		reg = <0x0 0x31000000 0x0 0x300>;
178*c66ec88fSEmmanuel Vadot		clock-names = "clk_xin", "clk_ahb";
179*c66ec88fSEmmanuel Vadot		clocks = <&scmi_clk KEEM_BAY_PSS_AUX_SD0>,
180*c66ec88fSEmmanuel Vadot			 <&scmi_clk KEEM_BAY_PSS_SD0>;
181*c66ec88fSEmmanuel Vadot		arasan,soc-ctl-syscon = <&sd0_phy_syscon>;
182*c66ec88fSEmmanuel Vadot	};
183*c66ec88fSEmmanuel Vadot
184*c66ec88fSEmmanuel Vadot	sd1: mmc@32000000 {
185*c66ec88fSEmmanuel Vadot		compatible = "intel,keembay-sdhci-5.1-sdio";
186*c66ec88fSEmmanuel Vadot		interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
187*c66ec88fSEmmanuel Vadot		reg = <0x0 0x32000000 0x0 0x300>;
188*c66ec88fSEmmanuel Vadot		clock-names = "clk_xin", "clk_ahb";
189*c66ec88fSEmmanuel Vadot		clocks = <&scmi_clk KEEM_BAY_PSS_AUX_SD1>,
190*c66ec88fSEmmanuel Vadot			 <&scmi_clk KEEM_BAY_PSS_SD1>;
191*c66ec88fSEmmanuel Vadot		arasan,soc-ctl-syscon = <&sd1_phy_syscon>;
192*c66ec88fSEmmanuel Vadot	};
193