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