|
| 1 | +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) |
| 2 | + |
| 3 | +%YAML 1.2 |
| 4 | +--- |
| 5 | +$id: "http://devicetree.org/schemas/mmc/sdhci-msm.yaml#" |
| 6 | +$schema: "http://devicetree.org/meta-schemas/core.yaml#" |
| 7 | + |
| 8 | +title: Qualcomm SDHCI controller (sdhci-msm) |
| 9 | + |
| 10 | +maintainers: |
| 11 | + - Bhupesh Sharma <bhupesh.sharma@linaro.org> |
| 12 | + |
| 13 | +description: |
| 14 | + Secure Digital Host Controller Interface (SDHCI) present on |
| 15 | + Qualcomm SOCs supports SD/MMC/SDIO devices. |
| 16 | + |
| 17 | +properties: |
| 18 | + compatible: |
| 19 | + oneOf: |
| 20 | + - items: |
| 21 | + - enum: |
| 22 | + - qcom,apq8084-sdhci |
| 23 | + - qcom,msm8226-sdhci |
| 24 | + - qcom,msm8953-sdhci |
| 25 | + - qcom,msm8974-sdhci |
| 26 | + - qcom,msm8916-sdhci |
| 27 | + - qcom,msm8992-sdhci |
| 28 | + - qcom,msm8994-sdhci |
| 29 | + - qcom,msm8996-sdhci |
| 30 | + - qcom,qcs404-sdhci |
| 31 | + - qcom,sc7180-sdhci |
| 32 | + - qcom,sc7280-sdhci |
| 33 | + - qcom,sdm630-sdhci |
| 34 | + - qcom,sdm845-sdhci |
| 35 | + - qcom,sdx55-sdhci |
| 36 | + - qcom,sm6125-sdhci |
| 37 | + - qcom,sm6350-sdhci |
| 38 | + - qcom,sm8250-sdhci |
| 39 | + - enum: |
| 40 | + - qcom,sdhci-msm-v4 # for sdcc versions less than 5.0 |
| 41 | + - qcom,sdhci-msm-v5 # for sdcc version 5.0 |
| 42 | + - items: |
| 43 | + - const: qcom,sdhci-msm-v4 # Deprecated (only for backward compatibility) |
| 44 | + # for sdcc versions less than 5.0 |
| 45 | + |
| 46 | + reg: |
| 47 | + minItems: 1 |
| 48 | + items: |
| 49 | + - description: Host controller register map |
| 50 | + - description: SD Core register map |
| 51 | + - description: CQE register map |
| 52 | + - description: Inline Crypto Engine register map |
| 53 | + |
| 54 | + clocks: |
| 55 | + minItems: 3 |
| 56 | + items: |
| 57 | + - description: Main peripheral bus clock, PCLK/HCLK - AHB Bus clock |
| 58 | + - description: SDC MMC clock, MCLK |
| 59 | + - description: TCXO clock |
| 60 | + - description: clock for Inline Crypto Engine |
| 61 | + - description: SDCC bus voter clock |
| 62 | + - description: reference clock for RCLK delay calibration |
| 63 | + - description: sleep clock for RCLK delay calibration |
| 64 | + |
| 65 | + clock-names: |
| 66 | + minItems: 2 |
| 67 | + items: |
| 68 | + - const: iface |
| 69 | + - const: core |
| 70 | + - const: xo |
| 71 | + - const: ice |
| 72 | + - const: bus |
| 73 | + - const: cal |
| 74 | + - const: sleep |
| 75 | + |
| 76 | + interrupts: |
| 77 | + maxItems: 2 |
| 78 | + |
| 79 | + interrupt-names: |
| 80 | + items: |
| 81 | + - const: hc_irq |
| 82 | + - const: pwr_irq |
| 83 | + |
| 84 | + pinctrl-names: |
| 85 | + minItems: 1 |
| 86 | + items: |
| 87 | + - const: default |
| 88 | + - const: sleep |
| 89 | + |
| 90 | + pinctrl-0: |
| 91 | + description: |
| 92 | + Should specify pin control groups used for this controller. |
| 93 | + |
| 94 | + qcom,ddr-config: |
| 95 | + $ref: /schemas/types.yaml#/definitions/uint32 |
| 96 | + description: platform specific settings for DDR_CONFIG reg. |
| 97 | + |
| 98 | + qcom,dll-config: |
| 99 | + $ref: /schemas/types.yaml#/definitions/uint32 |
| 100 | + description: platform specific settings for DLL_CONFIG reg. |
| 101 | + |
| 102 | + iommus: |
| 103 | + minItems: 1 |
| 104 | + maxItems: 8 |
| 105 | + description: | |
| 106 | + phandle to apps_smmu node with sid mask. |
| 107 | +
|
| 108 | + interconnects: |
| 109 | + items: |
| 110 | + - description: data path, sdhc to ddr |
| 111 | + - description: config path, cpu to sdhc |
| 112 | + |
| 113 | + interconnect-names: |
| 114 | + items: |
| 115 | + - const: sdhc-ddr |
| 116 | + - const: cpu-sdhc |
| 117 | + |
| 118 | + power-domains: |
| 119 | + description: A phandle to sdhci power domain node |
| 120 | + maxItems: 1 |
| 121 | + |
| 122 | +patternProperties: |
| 123 | + '^opp-table(-[a-z0-9]+)?$': |
| 124 | + if: |
| 125 | + properties: |
| 126 | + compatible: |
| 127 | + const: operating-points-v2 |
| 128 | + then: |
| 129 | + patternProperties: |
| 130 | + '^opp-?[0-9]+$': |
| 131 | + required: |
| 132 | + - required-opps |
| 133 | + |
| 134 | +required: |
| 135 | + - compatible |
| 136 | + - reg |
| 137 | + - clocks |
| 138 | + - clock-names |
| 139 | + - interrupts |
| 140 | + |
| 141 | +additionalProperties: true |
| 142 | + |
| 143 | +examples: |
| 144 | + - | |
| 145 | + #include <dt-bindings/interrupt-controller/arm-gic.h> |
| 146 | + #include <dt-bindings/clock/qcom,gcc-sm8250.h> |
| 147 | + #include <dt-bindings/clock/qcom,rpmh.h> |
| 148 | + #include <dt-bindings/power/qcom-rpmpd.h> |
| 149 | +
|
| 150 | + sdhc_2: sdhci@8804000 { |
| 151 | + compatible = "qcom,sm8250-sdhci", "qcom,sdhci-msm-v5"; |
| 152 | + reg = <0 0x08804000 0 0x1000>; |
| 153 | +
|
| 154 | + interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>, |
| 155 | + <GIC_SPI 222 IRQ_TYPE_LEVEL_HIGH>; |
| 156 | + interrupt-names = "hc_irq", "pwr_irq"; |
| 157 | +
|
| 158 | + clocks = <&gcc GCC_SDCC2_AHB_CLK>, |
| 159 | + <&gcc GCC_SDCC2_APPS_CLK>, |
| 160 | + <&rpmhcc RPMH_CXO_CLK>; |
| 161 | + clock-names = "iface", "core", "xo"; |
| 162 | + iommus = <&apps_smmu 0x4a0 0x0>; |
| 163 | + qcom,dll-config = <0x0007642c>; |
| 164 | + qcom,ddr-config = <0x80040868>; |
| 165 | + power-domains = <&rpmhpd SM8250_CX>; |
| 166 | +
|
| 167 | + operating-points-v2 = <&sdhc2_opp_table>; |
| 168 | +
|
| 169 | + sdhc2_opp_table: opp-table { |
| 170 | + compatible = "operating-points-v2"; |
| 171 | +
|
| 172 | + opp-19200000 { |
| 173 | + opp-hz = /bits/ 64 <19200000>; |
| 174 | + required-opps = <&rpmhpd_opp_min_svs>; |
| 175 | + }; |
| 176 | +
|
| 177 | + opp-50000000 { |
| 178 | + opp-hz = /bits/ 64 <50000000>; |
| 179 | + required-opps = <&rpmhpd_opp_low_svs>; |
| 180 | + }; |
| 181 | +
|
| 182 | + opp-100000000 { |
| 183 | + opp-hz = /bits/ 64 <100000000>; |
| 184 | + required-opps = <&rpmhpd_opp_svs>; |
| 185 | + }; |
| 186 | +
|
| 187 | + opp-202000000 { |
| 188 | + opp-hz = /bits/ 64 <202000000>; |
| 189 | + required-opps = <&rpmhpd_opp_svs_l1>; |
| 190 | + }; |
| 191 | + }; |
| 192 | + }; |
0 commit comments