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