xref: /freebsd-src/sys/contrib/device-tree/Bindings/mmc/sdhci-msm.yaml (revision 0e8011faf58b743cc652e3b2ad0f7671227610df)
1d5b0e70fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2d5b0e70fSEmmanuel Vadot%YAML 1.2
3d5b0e70fSEmmanuel Vadot---
48bab661aSEmmanuel Vadot$id: http://devicetree.org/schemas/mmc/sdhci-msm.yaml#
58bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6d5b0e70fSEmmanuel Vadot
7d5b0e70fSEmmanuel Vadottitle: Qualcomm SDHCI controller (sdhci-msm)
8d5b0e70fSEmmanuel Vadot
9d5b0e70fSEmmanuel Vadotmaintainers:
10d5b0e70fSEmmanuel Vadot  - Bhupesh Sharma <bhupesh.sharma@linaro.org>
11d5b0e70fSEmmanuel Vadot
12d5b0e70fSEmmanuel Vadotdescription:
13d5b0e70fSEmmanuel Vadot  Secure Digital Host Controller Interface (SDHCI) present on
14d5b0e70fSEmmanuel Vadot  Qualcomm SOCs supports SD/MMC/SDIO devices.
15d5b0e70fSEmmanuel Vadot
16d5b0e70fSEmmanuel Vadotproperties:
17d5b0e70fSEmmanuel Vadot  compatible:
18d5b0e70fSEmmanuel Vadot    oneOf:
19b97ee269SEmmanuel Vadot      - enum:
20b97ee269SEmmanuel Vadot          - qcom,sdhci-msm-v4
21b97ee269SEmmanuel Vadot        deprecated: true
22d5b0e70fSEmmanuel Vadot      - items:
23d5b0e70fSEmmanuel Vadot          - enum:
24d5b0e70fSEmmanuel Vadot              - qcom,apq8084-sdhci
258d13bc63SEmmanuel Vadot              - qcom,ipq4019-sdhci
268d13bc63SEmmanuel Vadot              - qcom,ipq8074-sdhci
27d5b0e70fSEmmanuel Vadot              - qcom,msm8226-sdhci
28d5b0e70fSEmmanuel Vadot              - qcom,msm8953-sdhci
29d5b0e70fSEmmanuel Vadot              - qcom,msm8974-sdhci
308bab661aSEmmanuel Vadot              - qcom,msm8976-sdhci
31d5b0e70fSEmmanuel Vadot              - qcom,msm8916-sdhci
32d5b0e70fSEmmanuel Vadot              - qcom,msm8992-sdhci
33d5b0e70fSEmmanuel Vadot              - qcom,msm8994-sdhci
34d5b0e70fSEmmanuel Vadot              - qcom,msm8996-sdhci
35b97ee269SEmmanuel Vadot              - qcom,msm8998-sdhci
36b97ee269SEmmanuel Vadot          - const: qcom,sdhci-msm-v4 # for sdcc versions less than 5.0
37b97ee269SEmmanuel Vadot      - items:
38b97ee269SEmmanuel Vadot          - enum:
39fac71e4eSEmmanuel Vadot              - qcom,ipq5018-sdhci
40cb7aa33aSEmmanuel Vadot              - qcom,ipq5332-sdhci
41f126890aSEmmanuel Vadot              - qcom,ipq6018-sdhci
42cb7aa33aSEmmanuel Vadot              - qcom,ipq9574-sdhci
43fac71e4eSEmmanuel Vadot              - qcom,qcm2290-sdhci
44d5b0e70fSEmmanuel Vadot              - qcom,qcs404-sdhci
45f126890aSEmmanuel Vadot              - qcom,qdu1000-sdhci
46d5b0e70fSEmmanuel Vadot              - qcom,sc7180-sdhci
47d5b0e70fSEmmanuel Vadot              - qcom,sc7280-sdhci
48f126890aSEmmanuel Vadot              - qcom,sc8280xp-sdhci
49d5b0e70fSEmmanuel Vadot              - qcom,sdm630-sdhci
507ef62cebSEmmanuel Vadot              - qcom,sdm670-sdhci
51d5b0e70fSEmmanuel Vadot              - qcom,sdm845-sdhci
52d5b0e70fSEmmanuel Vadot              - qcom,sdx55-sdhci
53d5b0e70fSEmmanuel Vadot              - qcom,sdx65-sdhci
54*0e8011faSEmmanuel Vadot              - qcom,sdx75-sdhci
557ef62cebSEmmanuel Vadot              - qcom,sm6115-sdhci
56d5b0e70fSEmmanuel Vadot              - qcom,sm6125-sdhci
57d5b0e70fSEmmanuel Vadot              - qcom,sm6350-sdhci
588bab661aSEmmanuel Vadot              - qcom,sm6375-sdhci
59d5b0e70fSEmmanuel Vadot              - qcom,sm8150-sdhci
60d5b0e70fSEmmanuel Vadot              - qcom,sm8250-sdhci
618bab661aSEmmanuel Vadot              - qcom,sm8350-sdhci
62b97ee269SEmmanuel Vadot              - qcom,sm8450-sdhci
638bab661aSEmmanuel Vadot              - qcom,sm8550-sdhci
6484943d6fSEmmanuel Vadot              - qcom,sm8650-sdhci
65b97ee269SEmmanuel Vadot          - const: qcom,sdhci-msm-v5 # for sdcc version 5.0
66d5b0e70fSEmmanuel Vadot
67d5b0e70fSEmmanuel Vadot  reg:
68d5b0e70fSEmmanuel Vadot    minItems: 1
69b97ee269SEmmanuel Vadot    maxItems: 4
70b97ee269SEmmanuel Vadot
71b97ee269SEmmanuel Vadot  reg-names:
72b97ee269SEmmanuel Vadot    minItems: 1
73b97ee269SEmmanuel Vadot    maxItems: 4
74d5b0e70fSEmmanuel Vadot
75d5b0e70fSEmmanuel Vadot  clocks:
76aa1a8ff2SEmmanuel Vadot    minItems: 2
77d5b0e70fSEmmanuel Vadot    items:
78d5b0e70fSEmmanuel Vadot      - description: Main peripheral bus clock, PCLK/HCLK - AHB Bus clock
79d5b0e70fSEmmanuel Vadot      - description: SDC MMC clock, MCLK
80d5b0e70fSEmmanuel Vadot      - description: TCXO clock
81d5b0e70fSEmmanuel Vadot      - description: clock for Inline Crypto Engine
82d5b0e70fSEmmanuel Vadot      - description: SDCC bus voter clock
83d5b0e70fSEmmanuel Vadot      - description: reference clock for RCLK delay calibration
84d5b0e70fSEmmanuel Vadot      - description: sleep clock for RCLK delay calibration
85d5b0e70fSEmmanuel Vadot
86d5b0e70fSEmmanuel Vadot  clock-names:
87d5b0e70fSEmmanuel Vadot    minItems: 2
88d5b0e70fSEmmanuel Vadot    items:
89d5b0e70fSEmmanuel Vadot      - const: iface
90d5b0e70fSEmmanuel Vadot      - const: core
91d5b0e70fSEmmanuel Vadot      - const: xo
9284943d6fSEmmanuel Vadot      - enum: [ice, bus, cal, sleep]
9384943d6fSEmmanuel Vadot      - enum: [ice, bus, cal, sleep]
9484943d6fSEmmanuel Vadot      - enum: [ice, bus, cal, sleep]
9584943d6fSEmmanuel Vadot      - enum: [ice, bus, cal, sleep]
96d5b0e70fSEmmanuel Vadot
978bab661aSEmmanuel Vadot  dma-coherent: true
988bab661aSEmmanuel Vadot
99d5b0e70fSEmmanuel Vadot  interrupts:
100d5b0e70fSEmmanuel Vadot    maxItems: 2
101d5b0e70fSEmmanuel Vadot
102d5b0e70fSEmmanuel Vadot  interrupt-names:
103d5b0e70fSEmmanuel Vadot    items:
104d5b0e70fSEmmanuel Vadot      - const: hc_irq
105d5b0e70fSEmmanuel Vadot      - const: pwr_irq
106d5b0e70fSEmmanuel Vadot
107d5b0e70fSEmmanuel Vadot  pinctrl-names:
108d5b0e70fSEmmanuel Vadot    minItems: 1
109d5b0e70fSEmmanuel Vadot    items:
110d5b0e70fSEmmanuel Vadot      - const: default
111d5b0e70fSEmmanuel Vadot      - const: sleep
112d5b0e70fSEmmanuel Vadot
113d5b0e70fSEmmanuel Vadot  pinctrl-0:
114d5b0e70fSEmmanuel Vadot    description:
115d5b0e70fSEmmanuel Vadot      Should specify pin control groups used for this controller.
116d5b0e70fSEmmanuel Vadot
1177ef62cebSEmmanuel Vadot  pinctrl-1:
1187ef62cebSEmmanuel Vadot    description:
1197ef62cebSEmmanuel Vadot      Should specify sleep pin control groups used for this controller.
1207ef62cebSEmmanuel Vadot
121b97ee269SEmmanuel Vadot  resets:
122b97ee269SEmmanuel Vadot    maxItems: 1
123b97ee269SEmmanuel Vadot
124d5b0e70fSEmmanuel Vadot  qcom,ddr-config:
125d5b0e70fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
126d5b0e70fSEmmanuel Vadot    description: platform specific settings for DDR_CONFIG reg.
127d5b0e70fSEmmanuel Vadot
128d5b0e70fSEmmanuel Vadot  qcom,dll-config:
129d5b0e70fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
130d5b0e70fSEmmanuel Vadot    description: platform specific settings for DLL_CONFIG reg.
131d5b0e70fSEmmanuel Vadot
132d5b0e70fSEmmanuel Vadot  iommus:
133d5b0e70fSEmmanuel Vadot    minItems: 1
134d5b0e70fSEmmanuel Vadot    maxItems: 8
135d5b0e70fSEmmanuel Vadot    description: |
136d5b0e70fSEmmanuel Vadot      phandle to apps_smmu node with sid mask.
137d5b0e70fSEmmanuel Vadot
138d5b0e70fSEmmanuel Vadot  interconnects:
139cb7aa33aSEmmanuel Vadot    minItems: 1
140d5b0e70fSEmmanuel Vadot    items:
141d5b0e70fSEmmanuel Vadot      - description: data path, sdhc to ddr
142d5b0e70fSEmmanuel Vadot      - description: config path, cpu to sdhc
143d5b0e70fSEmmanuel Vadot
144d5b0e70fSEmmanuel Vadot  interconnect-names:
145cb7aa33aSEmmanuel Vadot    minItems: 1
146d5b0e70fSEmmanuel Vadot    items:
147d5b0e70fSEmmanuel Vadot      - const: sdhc-ddr
148d5b0e70fSEmmanuel Vadot      - const: cpu-sdhc
149d5b0e70fSEmmanuel Vadot
150d5b0e70fSEmmanuel Vadot  power-domains:
151d5b0e70fSEmmanuel Vadot    description: A phandle to sdhci power domain node
152d5b0e70fSEmmanuel Vadot    maxItems: 1
153d5b0e70fSEmmanuel Vadot
154b97ee269SEmmanuel Vadot  operating-points-v2: true
155b97ee269SEmmanuel Vadot
156d5b0e70fSEmmanuel VadotpatternProperties:
157d5b0e70fSEmmanuel Vadot  '^opp-table(-[a-z0-9]+)?$':
158d5b0e70fSEmmanuel Vadot    if:
159d5b0e70fSEmmanuel Vadot      properties:
160d5b0e70fSEmmanuel Vadot        compatible:
161d5b0e70fSEmmanuel Vadot          const: operating-points-v2
162d5b0e70fSEmmanuel Vadot    then:
163d5b0e70fSEmmanuel Vadot      patternProperties:
164d5b0e70fSEmmanuel Vadot        '^opp-?[0-9]+$':
165d5b0e70fSEmmanuel Vadot          required:
166d5b0e70fSEmmanuel Vadot            - required-opps
167d5b0e70fSEmmanuel Vadot
168d5b0e70fSEmmanuel Vadotrequired:
169d5b0e70fSEmmanuel Vadot  - compatible
170d5b0e70fSEmmanuel Vadot  - reg
171d5b0e70fSEmmanuel Vadot  - clocks
172d5b0e70fSEmmanuel Vadot  - clock-names
173d5b0e70fSEmmanuel Vadot  - interrupts
174d5b0e70fSEmmanuel Vadot
175b97ee269SEmmanuel VadotallOf:
1768bab661aSEmmanuel Vadot  - $ref: sdhci-common.yaml#
177b97ee269SEmmanuel Vadot
178b97ee269SEmmanuel Vadot  - if:
179b97ee269SEmmanuel Vadot      properties:
180b97ee269SEmmanuel Vadot        compatible:
181b97ee269SEmmanuel Vadot          contains:
182b97ee269SEmmanuel Vadot            enum:
183b97ee269SEmmanuel Vadot              - qcom,sdhci-msm-v4
184b97ee269SEmmanuel Vadot    then:
185b97ee269SEmmanuel Vadot      properties:
186b97ee269SEmmanuel Vadot        reg:
187b97ee269SEmmanuel Vadot          minItems: 2
188b97ee269SEmmanuel Vadot          items:
189b97ee269SEmmanuel Vadot            - description: Host controller register map
190b97ee269SEmmanuel Vadot            - description: SD Core register map
191b97ee269SEmmanuel Vadot            - description: CQE register map
192b97ee269SEmmanuel Vadot            - description: Inline Crypto Engine register map
193b97ee269SEmmanuel Vadot        reg-names:
194b97ee269SEmmanuel Vadot          minItems: 2
195b97ee269SEmmanuel Vadot          items:
196b97ee269SEmmanuel Vadot            - const: hc
197b97ee269SEmmanuel Vadot            - const: core
198b97ee269SEmmanuel Vadot            - const: cqhci
199b97ee269SEmmanuel Vadot            - const: ice
200b97ee269SEmmanuel Vadot    else:
201b97ee269SEmmanuel Vadot      properties:
202b97ee269SEmmanuel Vadot        reg:
203b97ee269SEmmanuel Vadot          minItems: 1
204b97ee269SEmmanuel Vadot          items:
205b97ee269SEmmanuel Vadot            - description: Host controller register map
206b97ee269SEmmanuel Vadot            - description: CQE register map
207b97ee269SEmmanuel Vadot            - description: Inline Crypto Engine register map
208b97ee269SEmmanuel Vadot        reg-names:
209b97ee269SEmmanuel Vadot          minItems: 1
210b97ee269SEmmanuel Vadot          items:
211b97ee269SEmmanuel Vadot            - const: hc
212b97ee269SEmmanuel Vadot            - const: cqhci
213b97ee269SEmmanuel Vadot            - const: ice
214b97ee269SEmmanuel Vadot
215b97ee269SEmmanuel VadotunevaluatedProperties: false
216d5b0e70fSEmmanuel Vadot
217d5b0e70fSEmmanuel Vadotexamples:
218d5b0e70fSEmmanuel Vadot  - |
219d5b0e70fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
220d5b0e70fSEmmanuel Vadot    #include <dt-bindings/clock/qcom,gcc-sm8250.h>
221d5b0e70fSEmmanuel Vadot    #include <dt-bindings/clock/qcom,rpmh.h>
222aa1a8ff2SEmmanuel Vadot    #include <dt-bindings/power/qcom,rpmhpd.h>
223d5b0e70fSEmmanuel Vadot
224b97ee269SEmmanuel Vadot    sdhc_2: mmc@8804000 {
225d5b0e70fSEmmanuel Vadot      compatible = "qcom,sm8250-sdhci", "qcom,sdhci-msm-v5";
226d5b0e70fSEmmanuel Vadot      reg = <0 0x08804000 0 0x1000>;
227d5b0e70fSEmmanuel Vadot
228d5b0e70fSEmmanuel Vadot      interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
229d5b0e70fSEmmanuel Vadot                   <GIC_SPI 222 IRQ_TYPE_LEVEL_HIGH>;
230d5b0e70fSEmmanuel Vadot      interrupt-names = "hc_irq", "pwr_irq";
231d5b0e70fSEmmanuel Vadot
232d5b0e70fSEmmanuel Vadot      clocks = <&gcc GCC_SDCC2_AHB_CLK>,
233d5b0e70fSEmmanuel Vadot               <&gcc GCC_SDCC2_APPS_CLK>,
234d5b0e70fSEmmanuel Vadot               <&rpmhcc RPMH_CXO_CLK>;
235d5b0e70fSEmmanuel Vadot      clock-names = "iface", "core", "xo";
236d5b0e70fSEmmanuel Vadot      iommus = <&apps_smmu 0x4a0 0x0>;
237d5b0e70fSEmmanuel Vadot      qcom,dll-config = <0x0007642c>;
238d5b0e70fSEmmanuel Vadot      qcom,ddr-config = <0x80040868>;
239aa1a8ff2SEmmanuel Vadot      power-domains = <&rpmhpd RPMHPD_CX>;
240d5b0e70fSEmmanuel Vadot
241d5b0e70fSEmmanuel Vadot      operating-points-v2 = <&sdhc2_opp_table>;
242d5b0e70fSEmmanuel Vadot
243d5b0e70fSEmmanuel Vadot      sdhc2_opp_table: opp-table {
244d5b0e70fSEmmanuel Vadot        compatible = "operating-points-v2";
245d5b0e70fSEmmanuel Vadot
246d5b0e70fSEmmanuel Vadot        opp-19200000 {
247d5b0e70fSEmmanuel Vadot          opp-hz = /bits/ 64 <19200000>;
248d5b0e70fSEmmanuel Vadot          required-opps = <&rpmhpd_opp_min_svs>;
249d5b0e70fSEmmanuel Vadot        };
250d5b0e70fSEmmanuel Vadot
251d5b0e70fSEmmanuel Vadot        opp-50000000 {
252d5b0e70fSEmmanuel Vadot          opp-hz = /bits/ 64 <50000000>;
253d5b0e70fSEmmanuel Vadot          required-opps = <&rpmhpd_opp_low_svs>;
254d5b0e70fSEmmanuel Vadot        };
255d5b0e70fSEmmanuel Vadot
256d5b0e70fSEmmanuel Vadot        opp-100000000 {
257d5b0e70fSEmmanuel Vadot          opp-hz = /bits/ 64 <100000000>;
258d5b0e70fSEmmanuel Vadot          required-opps = <&rpmhpd_opp_svs>;
259d5b0e70fSEmmanuel Vadot        };
260d5b0e70fSEmmanuel Vadot
261d5b0e70fSEmmanuel Vadot        opp-202000000 {
262d5b0e70fSEmmanuel Vadot          opp-hz = /bits/ 64 <202000000>;
263d5b0e70fSEmmanuel Vadot          required-opps = <&rpmhpd_opp_svs_l1>;
264d5b0e70fSEmmanuel Vadot        };
265d5b0e70fSEmmanuel Vadot      };
266d5b0e70fSEmmanuel Vadot    };
267