1c9ccf3a3SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2c9ccf3a3SEmmanuel Vadot%YAML 1.2 3c9ccf3a3SEmmanuel Vadot--- 4c9ccf3a3SEmmanuel Vadot$id: http://devicetree.org/schemas/ufs/qcom,ufs.yaml# 5c9ccf3a3SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c9ccf3a3SEmmanuel Vadot 7c9ccf3a3SEmmanuel Vadottitle: Qualcomm Universal Flash Storage (UFS) Controller 8c9ccf3a3SEmmanuel Vadot 9c9ccf3a3SEmmanuel Vadotmaintainers: 10c9ccf3a3SEmmanuel Vadot - Bjorn Andersson <bjorn.andersson@linaro.org> 11c9ccf3a3SEmmanuel Vadot - Andy Gross <agross@kernel.org> 12c9ccf3a3SEmmanuel Vadot 13c9ccf3a3SEmmanuel Vadot# Select only our matches, not all jedec,ufs-2.0 14c9ccf3a3SEmmanuel Vadotselect: 15c9ccf3a3SEmmanuel Vadot properties: 16c9ccf3a3SEmmanuel Vadot compatible: 17c9ccf3a3SEmmanuel Vadot contains: 18c9ccf3a3SEmmanuel Vadot const: qcom,ufshc 19c9ccf3a3SEmmanuel Vadot required: 20c9ccf3a3SEmmanuel Vadot - compatible 21c9ccf3a3SEmmanuel Vadot 22c9ccf3a3SEmmanuel Vadotproperties: 23c9ccf3a3SEmmanuel Vadot compatible: 24c9ccf3a3SEmmanuel Vadot items: 25c9ccf3a3SEmmanuel Vadot - enum: 26c9ccf3a3SEmmanuel Vadot - qcom,msm8994-ufshc 27c9ccf3a3SEmmanuel Vadot - qcom,msm8996-ufshc 28c9ccf3a3SEmmanuel Vadot - qcom,msm8998-ufshc 29f126890aSEmmanuel Vadot - qcom,sa8775p-ufshc 30b97ee269SEmmanuel Vadot - qcom,sc8280xp-ufshc 31c9ccf3a3SEmmanuel Vadot - qcom,sdm845-ufshc 32aa1a8ff2SEmmanuel Vadot - qcom,sm6115-ufshc 33c9ccf3a3SEmmanuel Vadot - qcom,sm6350-ufshc 34c9ccf3a3SEmmanuel Vadot - qcom,sm8150-ufshc 35c9ccf3a3SEmmanuel Vadot - qcom,sm8250-ufshc 36c9ccf3a3SEmmanuel Vadot - qcom,sm8350-ufshc 37c9ccf3a3SEmmanuel Vadot - qcom,sm8450-ufshc 38cb7aa33aSEmmanuel Vadot - qcom,sm8550-ufshc 39*84943d6fSEmmanuel Vadot - qcom,sm8650-ufshc 40c9ccf3a3SEmmanuel Vadot - const: qcom,ufshc 41c9ccf3a3SEmmanuel Vadot - const: jedec,ufs-2.0 42c9ccf3a3SEmmanuel Vadot 43c9ccf3a3SEmmanuel Vadot clocks: 44c9ccf3a3SEmmanuel Vadot minItems: 8 45c9ccf3a3SEmmanuel Vadot maxItems: 11 46c9ccf3a3SEmmanuel Vadot 47c9ccf3a3SEmmanuel Vadot clock-names: 48c9ccf3a3SEmmanuel Vadot minItems: 8 49c9ccf3a3SEmmanuel Vadot maxItems: 11 50c9ccf3a3SEmmanuel Vadot 51cb7aa33aSEmmanuel Vadot dma-coherent: true 52cb7aa33aSEmmanuel Vadot 53c9ccf3a3SEmmanuel Vadot interconnects: 54c9ccf3a3SEmmanuel Vadot minItems: 2 55c9ccf3a3SEmmanuel Vadot maxItems: 2 56c9ccf3a3SEmmanuel Vadot 57c9ccf3a3SEmmanuel Vadot interconnect-names: 58c9ccf3a3SEmmanuel Vadot items: 59c9ccf3a3SEmmanuel Vadot - const: ufs-ddr 60c9ccf3a3SEmmanuel Vadot - const: cpu-ufs 61c9ccf3a3SEmmanuel Vadot 62c9ccf3a3SEmmanuel Vadot iommus: 63c9ccf3a3SEmmanuel Vadot minItems: 1 64c9ccf3a3SEmmanuel Vadot maxItems: 2 65c9ccf3a3SEmmanuel Vadot 66c9ccf3a3SEmmanuel Vadot phys: 67c9ccf3a3SEmmanuel Vadot maxItems: 1 68c9ccf3a3SEmmanuel Vadot 69c9ccf3a3SEmmanuel Vadot phy-names: 70c9ccf3a3SEmmanuel Vadot items: 71c9ccf3a3SEmmanuel Vadot - const: ufsphy 72c9ccf3a3SEmmanuel Vadot 73c9ccf3a3SEmmanuel Vadot power-domains: 74c9ccf3a3SEmmanuel Vadot maxItems: 1 75c9ccf3a3SEmmanuel Vadot 76f126890aSEmmanuel Vadot qcom,ice: 77f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 78f126890aSEmmanuel Vadot description: phandle to the Inline Crypto Engine node 79f126890aSEmmanuel Vadot 80c9ccf3a3SEmmanuel Vadot reg: 81c9ccf3a3SEmmanuel Vadot minItems: 1 82c9ccf3a3SEmmanuel Vadot maxItems: 2 83c9ccf3a3SEmmanuel Vadot 84aa1a8ff2SEmmanuel Vadot reg-names: 85aa1a8ff2SEmmanuel Vadot items: 86aa1a8ff2SEmmanuel Vadot - const: std 87aa1a8ff2SEmmanuel Vadot - const: ice 88aa1a8ff2SEmmanuel Vadot 89cb7aa33aSEmmanuel Vadot required-opps: 90cb7aa33aSEmmanuel Vadot maxItems: 1 91cb7aa33aSEmmanuel Vadot 92c9ccf3a3SEmmanuel Vadot resets: 93c9ccf3a3SEmmanuel Vadot maxItems: 1 94c9ccf3a3SEmmanuel Vadot 95c9ccf3a3SEmmanuel Vadot '#reset-cells': 96c9ccf3a3SEmmanuel Vadot const: 1 97c9ccf3a3SEmmanuel Vadot 98c9ccf3a3SEmmanuel Vadot reset-names: 99c9ccf3a3SEmmanuel Vadot items: 100c9ccf3a3SEmmanuel Vadot - const: rst 101c9ccf3a3SEmmanuel Vadot 102c9ccf3a3SEmmanuel Vadot reset-gpios: 103c9ccf3a3SEmmanuel Vadot maxItems: 1 104c9ccf3a3SEmmanuel Vadot description: 105c9ccf3a3SEmmanuel Vadot GPIO connected to the RESET pin of the UFS memory device. 106c9ccf3a3SEmmanuel Vadot 107c9ccf3a3SEmmanuel Vadotrequired: 108c9ccf3a3SEmmanuel Vadot - compatible 109c9ccf3a3SEmmanuel Vadot - reg 110c9ccf3a3SEmmanuel Vadot 111c9ccf3a3SEmmanuel VadotallOf: 112c9ccf3a3SEmmanuel Vadot - $ref: ufs-common.yaml 113c9ccf3a3SEmmanuel Vadot 114c9ccf3a3SEmmanuel Vadot - if: 115c9ccf3a3SEmmanuel Vadot properties: 116c9ccf3a3SEmmanuel Vadot compatible: 117c9ccf3a3SEmmanuel Vadot contains: 118c9ccf3a3SEmmanuel Vadot enum: 119c9ccf3a3SEmmanuel Vadot - qcom,msm8998-ufshc 120f126890aSEmmanuel Vadot - qcom,sa8775p-ufshc 121b97ee269SEmmanuel Vadot - qcom,sc8280xp-ufshc 122c9ccf3a3SEmmanuel Vadot - qcom,sm8250-ufshc 123c9ccf3a3SEmmanuel Vadot - qcom,sm8350-ufshc 124c9ccf3a3SEmmanuel Vadot - qcom,sm8450-ufshc 125cb7aa33aSEmmanuel Vadot - qcom,sm8550-ufshc 126*84943d6fSEmmanuel Vadot - qcom,sm8650-ufshc 127c9ccf3a3SEmmanuel Vadot then: 128c9ccf3a3SEmmanuel Vadot properties: 129c9ccf3a3SEmmanuel Vadot clocks: 130c9ccf3a3SEmmanuel Vadot minItems: 8 131c9ccf3a3SEmmanuel Vadot maxItems: 8 132c9ccf3a3SEmmanuel Vadot clock-names: 133c9ccf3a3SEmmanuel Vadot items: 134c9ccf3a3SEmmanuel Vadot - const: core_clk 135c9ccf3a3SEmmanuel Vadot - const: bus_aggr_clk 136c9ccf3a3SEmmanuel Vadot - const: iface_clk 137c9ccf3a3SEmmanuel Vadot - const: core_clk_unipro 138c9ccf3a3SEmmanuel Vadot - const: ref_clk 139c9ccf3a3SEmmanuel Vadot - const: tx_lane0_sync_clk 140c9ccf3a3SEmmanuel Vadot - const: rx_lane0_sync_clk 141c9ccf3a3SEmmanuel Vadot - const: rx_lane1_sync_clk 142c9ccf3a3SEmmanuel Vadot reg: 143c9ccf3a3SEmmanuel Vadot minItems: 1 144c9ccf3a3SEmmanuel Vadot maxItems: 1 145aa1a8ff2SEmmanuel Vadot reg-names: 146aa1a8ff2SEmmanuel Vadot maxItems: 1 147c9ccf3a3SEmmanuel Vadot 148c9ccf3a3SEmmanuel Vadot - if: 149c9ccf3a3SEmmanuel Vadot properties: 150c9ccf3a3SEmmanuel Vadot compatible: 151c9ccf3a3SEmmanuel Vadot contains: 152c9ccf3a3SEmmanuel Vadot enum: 153c9ccf3a3SEmmanuel Vadot - qcom,sdm845-ufshc 154c9ccf3a3SEmmanuel Vadot - qcom,sm6350-ufshc 155c9ccf3a3SEmmanuel Vadot - qcom,sm8150-ufshc 156c9ccf3a3SEmmanuel Vadot then: 157c9ccf3a3SEmmanuel Vadot properties: 158c9ccf3a3SEmmanuel Vadot clocks: 159c9ccf3a3SEmmanuel Vadot minItems: 9 160c9ccf3a3SEmmanuel Vadot maxItems: 9 161c9ccf3a3SEmmanuel Vadot clock-names: 162c9ccf3a3SEmmanuel Vadot items: 163c9ccf3a3SEmmanuel Vadot - const: core_clk 164c9ccf3a3SEmmanuel Vadot - const: bus_aggr_clk 165c9ccf3a3SEmmanuel Vadot - const: iface_clk 166c9ccf3a3SEmmanuel Vadot - const: core_clk_unipro 167c9ccf3a3SEmmanuel Vadot - const: ref_clk 168c9ccf3a3SEmmanuel Vadot - const: tx_lane0_sync_clk 169c9ccf3a3SEmmanuel Vadot - const: rx_lane0_sync_clk 170c9ccf3a3SEmmanuel Vadot - const: rx_lane1_sync_clk 171c9ccf3a3SEmmanuel Vadot - const: ice_core_clk 172c9ccf3a3SEmmanuel Vadot reg: 173c9ccf3a3SEmmanuel Vadot minItems: 2 174c9ccf3a3SEmmanuel Vadot maxItems: 2 175aa1a8ff2SEmmanuel Vadot reg-names: 176aa1a8ff2SEmmanuel Vadot minItems: 2 177aa1a8ff2SEmmanuel Vadot required: 178aa1a8ff2SEmmanuel Vadot - reg-names 179c9ccf3a3SEmmanuel Vadot 180c9ccf3a3SEmmanuel Vadot - if: 181c9ccf3a3SEmmanuel Vadot properties: 182c9ccf3a3SEmmanuel Vadot compatible: 183c9ccf3a3SEmmanuel Vadot contains: 184c9ccf3a3SEmmanuel Vadot enum: 185c9ccf3a3SEmmanuel Vadot - qcom,msm8996-ufshc 186c9ccf3a3SEmmanuel Vadot then: 187c9ccf3a3SEmmanuel Vadot properties: 188c9ccf3a3SEmmanuel Vadot clocks: 189c9ccf3a3SEmmanuel Vadot minItems: 11 190c9ccf3a3SEmmanuel Vadot maxItems: 11 191c9ccf3a3SEmmanuel Vadot clock-names: 192c9ccf3a3SEmmanuel Vadot items: 193c9ccf3a3SEmmanuel Vadot - const: core_clk_src 194c9ccf3a3SEmmanuel Vadot - const: core_clk 195c9ccf3a3SEmmanuel Vadot - const: bus_clk 196c9ccf3a3SEmmanuel Vadot - const: bus_aggr_clk 197c9ccf3a3SEmmanuel Vadot - const: iface_clk 198c9ccf3a3SEmmanuel Vadot - const: core_clk_unipro_src 199c9ccf3a3SEmmanuel Vadot - const: core_clk_unipro 200c9ccf3a3SEmmanuel Vadot - const: core_clk_ice 201c9ccf3a3SEmmanuel Vadot - const: ref_clk 202c9ccf3a3SEmmanuel Vadot - const: tx_lane0_sync_clk 203c9ccf3a3SEmmanuel Vadot - const: rx_lane0_sync_clk 204c9ccf3a3SEmmanuel Vadot reg: 205c9ccf3a3SEmmanuel Vadot minItems: 1 206c9ccf3a3SEmmanuel Vadot maxItems: 1 207aa1a8ff2SEmmanuel Vadot reg-names: 208aa1a8ff2SEmmanuel Vadot maxItems: 1 209aa1a8ff2SEmmanuel Vadot 210aa1a8ff2SEmmanuel Vadot - if: 211aa1a8ff2SEmmanuel Vadot properties: 212aa1a8ff2SEmmanuel Vadot compatible: 213aa1a8ff2SEmmanuel Vadot contains: 214aa1a8ff2SEmmanuel Vadot enum: 215aa1a8ff2SEmmanuel Vadot - qcom,sm6115-ufshc 216aa1a8ff2SEmmanuel Vadot then: 217aa1a8ff2SEmmanuel Vadot properties: 218aa1a8ff2SEmmanuel Vadot clocks: 219aa1a8ff2SEmmanuel Vadot minItems: 8 220aa1a8ff2SEmmanuel Vadot maxItems: 8 221aa1a8ff2SEmmanuel Vadot clock-names: 222aa1a8ff2SEmmanuel Vadot items: 223aa1a8ff2SEmmanuel Vadot - const: core_clk 224aa1a8ff2SEmmanuel Vadot - const: bus_aggr_clk 225aa1a8ff2SEmmanuel Vadot - const: iface_clk 226aa1a8ff2SEmmanuel Vadot - const: core_clk_unipro 227aa1a8ff2SEmmanuel Vadot - const: ref_clk 228aa1a8ff2SEmmanuel Vadot - const: tx_lane0_sync_clk 229aa1a8ff2SEmmanuel Vadot - const: rx_lane0_sync_clk 230aa1a8ff2SEmmanuel Vadot - const: ice_core_clk 231aa1a8ff2SEmmanuel Vadot reg: 232aa1a8ff2SEmmanuel Vadot minItems: 2 233aa1a8ff2SEmmanuel Vadot maxItems: 2 234aa1a8ff2SEmmanuel Vadot reg-names: 235aa1a8ff2SEmmanuel Vadot minItems: 2 236aa1a8ff2SEmmanuel Vadot required: 237aa1a8ff2SEmmanuel Vadot - reg-names 238c9ccf3a3SEmmanuel Vadot 239c9ccf3a3SEmmanuel Vadot # TODO: define clock bindings for qcom,msm8994-ufshc 240c9ccf3a3SEmmanuel Vadot 241f126890aSEmmanuel Vadot - if: 242f126890aSEmmanuel Vadot required: 243f126890aSEmmanuel Vadot - qcom,ice 244f126890aSEmmanuel Vadot then: 245f126890aSEmmanuel Vadot properties: 246f126890aSEmmanuel Vadot reg: 247f126890aSEmmanuel Vadot maxItems: 1 248f126890aSEmmanuel Vadot clocks: 249f126890aSEmmanuel Vadot minItems: 8 250f126890aSEmmanuel Vadot maxItems: 8 251f126890aSEmmanuel Vadot else: 252f126890aSEmmanuel Vadot properties: 253f126890aSEmmanuel Vadot reg: 254f126890aSEmmanuel Vadot minItems: 1 255f126890aSEmmanuel Vadot maxItems: 2 256f126890aSEmmanuel Vadot clocks: 257f126890aSEmmanuel Vadot minItems: 8 258f126890aSEmmanuel Vadot maxItems: 11 259f126890aSEmmanuel Vadot 260c9ccf3a3SEmmanuel VadotunevaluatedProperties: false 261c9ccf3a3SEmmanuel Vadot 262c9ccf3a3SEmmanuel Vadotexamples: 263c9ccf3a3SEmmanuel Vadot - | 264c9ccf3a3SEmmanuel Vadot #include <dt-bindings/clock/qcom,gcc-sm8450.h> 265c9ccf3a3SEmmanuel Vadot #include <dt-bindings/clock/qcom,rpmh.h> 266c9ccf3a3SEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 267c9ccf3a3SEmmanuel Vadot #include <dt-bindings/interconnect/qcom,sm8450.h> 268c9ccf3a3SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 269c9ccf3a3SEmmanuel Vadot 270c9ccf3a3SEmmanuel Vadot soc { 271c9ccf3a3SEmmanuel Vadot #address-cells = <2>; 272c9ccf3a3SEmmanuel Vadot #size-cells = <2>; 273c9ccf3a3SEmmanuel Vadot 274c9ccf3a3SEmmanuel Vadot ufs@1d84000 { 275c9ccf3a3SEmmanuel Vadot compatible = "qcom,sm8450-ufshc", "qcom,ufshc", 276c9ccf3a3SEmmanuel Vadot "jedec,ufs-2.0"; 277c9ccf3a3SEmmanuel Vadot reg = <0 0x01d84000 0 0x3000>; 278c9ccf3a3SEmmanuel Vadot interrupts = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>; 279c9ccf3a3SEmmanuel Vadot phys = <&ufs_mem_phy_lanes>; 280c9ccf3a3SEmmanuel Vadot phy-names = "ufsphy"; 281c9ccf3a3SEmmanuel Vadot lanes-per-direction = <2>; 282c9ccf3a3SEmmanuel Vadot #reset-cells = <1>; 283c9ccf3a3SEmmanuel Vadot resets = <&gcc GCC_UFS_PHY_BCR>; 284c9ccf3a3SEmmanuel Vadot reset-names = "rst"; 285c9ccf3a3SEmmanuel Vadot reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>; 286c9ccf3a3SEmmanuel Vadot 287c9ccf3a3SEmmanuel Vadot vcc-supply = <&vreg_l7b_2p5>; 288c9ccf3a3SEmmanuel Vadot vcc-max-microamp = <1100000>; 289c9ccf3a3SEmmanuel Vadot vccq-supply = <&vreg_l9b_1p2>; 290c9ccf3a3SEmmanuel Vadot vccq-max-microamp = <1200000>; 291c9ccf3a3SEmmanuel Vadot 292c9ccf3a3SEmmanuel Vadot power-domains = <&gcc UFS_PHY_GDSC>; 293c9ccf3a3SEmmanuel Vadot iommus = <&apps_smmu 0xe0 0x0>; 294c9ccf3a3SEmmanuel Vadot interconnects = <&aggre1_noc MASTER_UFS_MEM &mc_virt SLAVE_EBI1>, 295c9ccf3a3SEmmanuel Vadot <&gem_noc MASTER_APPSS_PROC &config_noc SLAVE_UFS_MEM_CFG>; 296c9ccf3a3SEmmanuel Vadot interconnect-names = "ufs-ddr", "cpu-ufs"; 297c9ccf3a3SEmmanuel Vadot 298c9ccf3a3SEmmanuel Vadot clock-names = "core_clk", 299c9ccf3a3SEmmanuel Vadot "bus_aggr_clk", 300c9ccf3a3SEmmanuel Vadot "iface_clk", 301c9ccf3a3SEmmanuel Vadot "core_clk_unipro", 302c9ccf3a3SEmmanuel Vadot "ref_clk", 303c9ccf3a3SEmmanuel Vadot "tx_lane0_sync_clk", 304c9ccf3a3SEmmanuel Vadot "rx_lane0_sync_clk", 305c9ccf3a3SEmmanuel Vadot "rx_lane1_sync_clk"; 306c9ccf3a3SEmmanuel Vadot clocks = <&gcc GCC_UFS_PHY_AXI_CLK>, 307c9ccf3a3SEmmanuel Vadot <&gcc GCC_AGGRE_UFS_PHY_AXI_CLK>, 308c9ccf3a3SEmmanuel Vadot <&gcc GCC_UFS_PHY_AHB_CLK>, 309c9ccf3a3SEmmanuel Vadot <&gcc GCC_UFS_PHY_UNIPRO_CORE_CLK>, 310c9ccf3a3SEmmanuel Vadot <&rpmhcc RPMH_CXO_CLK>, 311c9ccf3a3SEmmanuel Vadot <&gcc GCC_UFS_PHY_TX_SYMBOL_0_CLK>, 312c9ccf3a3SEmmanuel Vadot <&gcc GCC_UFS_PHY_RX_SYMBOL_0_CLK>, 313c9ccf3a3SEmmanuel Vadot <&gcc GCC_UFS_PHY_RX_SYMBOL_1_CLK>; 314c9ccf3a3SEmmanuel Vadot freq-table-hz = <75000000 300000000>, 315c9ccf3a3SEmmanuel Vadot <0 0>, 316c9ccf3a3SEmmanuel Vadot <0 0>, 317c9ccf3a3SEmmanuel Vadot <75000000 300000000>, 318c9ccf3a3SEmmanuel Vadot <75000000 300000000>, 319c9ccf3a3SEmmanuel Vadot <0 0>, 320c9ccf3a3SEmmanuel Vadot <0 0>, 321c9ccf3a3SEmmanuel Vadot <0 0>; 322aa1a8ff2SEmmanuel Vadot qcom,ice = <&ice>; 323c9ccf3a3SEmmanuel Vadot }; 324c9ccf3a3SEmmanuel Vadot }; 325