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/cpufreq/qcom-cpufreq-nvmem.yaml# 5c9ccf3a3SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c9ccf3a3SEmmanuel Vadot 78bab661aSEmmanuel Vadottitle: Qualcomm Technologies, Inc. NVMEM CPUFreq 8c9ccf3a3SEmmanuel Vadot 9c9ccf3a3SEmmanuel Vadotmaintainers: 10c9ccf3a3SEmmanuel Vadot - Ilia Lin <ilia.lin@kernel.org> 11c9ccf3a3SEmmanuel Vadot 12c9ccf3a3SEmmanuel Vadotdescription: | 13c9ccf3a3SEmmanuel Vadot In certain Qualcomm Technologies, Inc. SoCs such as QCS404, The CPU supply 14c9ccf3a3SEmmanuel Vadot voltage is dynamically configured by Core Power Reduction (CPR) depending on 15c9ccf3a3SEmmanuel Vadot current CPU frequency and efuse values. 16c9ccf3a3SEmmanuel Vadot CPR provides a power domain with multiple levels that are selected depending 17c9ccf3a3SEmmanuel Vadot on the CPU OPP in use. The CPUFreq driver sets the CPR power domain level 18c9ccf3a3SEmmanuel Vadot according to the required OPPs defined in the CPU OPP tables. 19c9ccf3a3SEmmanuel Vadot 20cb7aa33aSEmmanuel Vadot For old implementation efuses are parsed to select the correct opp table and 21cb7aa33aSEmmanuel Vadot voltage and CPR is not supported/used. 22cb7aa33aSEmmanuel Vadot 23c9ccf3a3SEmmanuel Vadotselect: 24c9ccf3a3SEmmanuel Vadot properties: 25c9ccf3a3SEmmanuel Vadot compatible: 26c9ccf3a3SEmmanuel Vadot contains: 27c9ccf3a3SEmmanuel Vadot enum: 28b97ee269SEmmanuel Vadot - qcom,apq8064 29b97ee269SEmmanuel Vadot - qcom,apq8096 30*84943d6fSEmmanuel Vadot - qcom,ipq5332 31*84943d6fSEmmanuel Vadot - qcom,ipq6018 32b97ee269SEmmanuel Vadot - qcom,ipq8064 33f126890aSEmmanuel Vadot - qcom,ipq8074 34*84943d6fSEmmanuel Vadot - qcom,ipq9574 35*84943d6fSEmmanuel Vadot - qcom,msm8909 36b97ee269SEmmanuel Vadot - qcom,msm8939 37b97ee269SEmmanuel Vadot - qcom,msm8960 38b97ee269SEmmanuel Vadot - qcom,msm8974 39b97ee269SEmmanuel Vadot - qcom,msm8996 40c9ccf3a3SEmmanuel Vadot - qcom,qcs404 41c9ccf3a3SEmmanuel Vadot required: 42c9ccf3a3SEmmanuel Vadot - compatible 43c9ccf3a3SEmmanuel Vadot 44cb7aa33aSEmmanuel VadotpatternProperties: 45cb7aa33aSEmmanuel Vadot '^opp-table(-[a-z0-9]+)?$': 46cb7aa33aSEmmanuel Vadot allOf: 47cb7aa33aSEmmanuel Vadot - if: 48cb7aa33aSEmmanuel Vadot properties: 49cb7aa33aSEmmanuel Vadot compatible: 50*84943d6fSEmmanuel Vadot enum: 51*84943d6fSEmmanuel Vadot - operating-points-v2-krait-cpu 52*84943d6fSEmmanuel Vadot - operating-points-v2-kryo-cpu 53cb7aa33aSEmmanuel Vadot then: 54cb7aa33aSEmmanuel Vadot $ref: /schemas/opp/opp-v2-kryo-cpu.yaml# 55cb7aa33aSEmmanuel Vadot 56cb7aa33aSEmmanuel Vadot - if: 57cb7aa33aSEmmanuel Vadot properties: 58cb7aa33aSEmmanuel Vadot compatible: 59cb7aa33aSEmmanuel Vadot const: operating-points-v2-qcom-level 60cb7aa33aSEmmanuel Vadot then: 61cb7aa33aSEmmanuel Vadot $ref: /schemas/opp/opp-v2-qcom-level.yaml# 62cb7aa33aSEmmanuel Vadot 63cb7aa33aSEmmanuel Vadot unevaluatedProperties: false 64cb7aa33aSEmmanuel Vadot 65cb7aa33aSEmmanuel VadotallOf: 66cb7aa33aSEmmanuel Vadot - if: 67cb7aa33aSEmmanuel Vadot properties: 68cb7aa33aSEmmanuel Vadot compatible: 69cb7aa33aSEmmanuel Vadot contains: 70cb7aa33aSEmmanuel Vadot enum: 71cb7aa33aSEmmanuel Vadot - qcom,qcs404 72cb7aa33aSEmmanuel Vadot 73cb7aa33aSEmmanuel Vadot then: 74c9ccf3a3SEmmanuel Vadot properties: 75c9ccf3a3SEmmanuel Vadot cpus: 76c9ccf3a3SEmmanuel Vadot type: object 77c9ccf3a3SEmmanuel Vadot 78c9ccf3a3SEmmanuel Vadot patternProperties: 798bab661aSEmmanuel Vadot '^cpu@[0-9a-f]+$': 80c9ccf3a3SEmmanuel Vadot type: object 81c9ccf3a3SEmmanuel Vadot 82c9ccf3a3SEmmanuel Vadot properties: 83c9ccf3a3SEmmanuel Vadot power-domains: 84c9ccf3a3SEmmanuel Vadot maxItems: 1 85c9ccf3a3SEmmanuel Vadot 86c9ccf3a3SEmmanuel Vadot power-domain-names: 87c9ccf3a3SEmmanuel Vadot items: 88c9ccf3a3SEmmanuel Vadot - const: cpr 89c9ccf3a3SEmmanuel Vadot 90c9ccf3a3SEmmanuel Vadot required: 91c9ccf3a3SEmmanuel Vadot - power-domains 92c9ccf3a3SEmmanuel Vadot - power-domain-names 93c9ccf3a3SEmmanuel Vadot 94c9ccf3a3SEmmanuel Vadot patternProperties: 95c9ccf3a3SEmmanuel Vadot '^opp-table(-[a-z0-9]+)?$': 96c9ccf3a3SEmmanuel Vadot if: 97c9ccf3a3SEmmanuel Vadot properties: 98c9ccf3a3SEmmanuel Vadot compatible: 99c9ccf3a3SEmmanuel Vadot const: operating-points-v2-kryo-cpu 100c9ccf3a3SEmmanuel Vadot then: 101c9ccf3a3SEmmanuel Vadot patternProperties: 102c9ccf3a3SEmmanuel Vadot '^opp-?[0-9]+$': 103c9ccf3a3SEmmanuel Vadot required: 104c9ccf3a3SEmmanuel Vadot - required-opps 105c9ccf3a3SEmmanuel Vadot 106c9ccf3a3SEmmanuel VadotadditionalProperties: true 107c9ccf3a3SEmmanuel Vadot 108c9ccf3a3SEmmanuel Vadotexamples: 109c9ccf3a3SEmmanuel Vadot - | 110c9ccf3a3SEmmanuel Vadot / { 111b97ee269SEmmanuel Vadot model = "Qualcomm Technologies, Inc. QCS404 EVB 1000"; 112b97ee269SEmmanuel Vadot compatible = "qcom,qcs404-evb-1000", "qcom,qcs404-evb", "qcom,qcs404"; 113c9ccf3a3SEmmanuel Vadot #address-cells = <2>; 114c9ccf3a3SEmmanuel Vadot #size-cells = <2>; 115c9ccf3a3SEmmanuel Vadot 116c9ccf3a3SEmmanuel Vadot cpus { 117c9ccf3a3SEmmanuel Vadot #address-cells = <1>; 118c9ccf3a3SEmmanuel Vadot #size-cells = <0>; 119c9ccf3a3SEmmanuel Vadot 120c9ccf3a3SEmmanuel Vadot CPU0: cpu@100 { 121c9ccf3a3SEmmanuel Vadot device_type = "cpu"; 122c9ccf3a3SEmmanuel Vadot compatible = "arm,cortex-a53"; 123c9ccf3a3SEmmanuel Vadot reg = <0x100>; 124c9ccf3a3SEmmanuel Vadot enable-method = "psci"; 125c9ccf3a3SEmmanuel Vadot cpu-idle-states = <&CPU_SLEEP_0>; 126c9ccf3a3SEmmanuel Vadot next-level-cache = <&L2_0>; 127c9ccf3a3SEmmanuel Vadot #cooling-cells = <2>; 128c9ccf3a3SEmmanuel Vadot clocks = <&apcs_glb>; 129c9ccf3a3SEmmanuel Vadot operating-points-v2 = <&cpu_opp_table>; 130c9ccf3a3SEmmanuel Vadot power-domains = <&cpr>; 131c9ccf3a3SEmmanuel Vadot power-domain-names = "cpr"; 132c9ccf3a3SEmmanuel Vadot }; 133c9ccf3a3SEmmanuel Vadot 134c9ccf3a3SEmmanuel Vadot CPU1: cpu@101 { 135c9ccf3a3SEmmanuel Vadot device_type = "cpu"; 136c9ccf3a3SEmmanuel Vadot compatible = "arm,cortex-a53"; 137c9ccf3a3SEmmanuel Vadot reg = <0x101>; 138c9ccf3a3SEmmanuel Vadot enable-method = "psci"; 139c9ccf3a3SEmmanuel Vadot cpu-idle-states = <&CPU_SLEEP_0>; 140c9ccf3a3SEmmanuel Vadot next-level-cache = <&L2_0>; 141c9ccf3a3SEmmanuel Vadot #cooling-cells = <2>; 142c9ccf3a3SEmmanuel Vadot clocks = <&apcs_glb>; 143c9ccf3a3SEmmanuel Vadot operating-points-v2 = <&cpu_opp_table>; 144c9ccf3a3SEmmanuel Vadot power-domains = <&cpr>; 145c9ccf3a3SEmmanuel Vadot power-domain-names = "cpr"; 146c9ccf3a3SEmmanuel Vadot }; 147c9ccf3a3SEmmanuel Vadot 148c9ccf3a3SEmmanuel Vadot CPU2: cpu@102 { 149c9ccf3a3SEmmanuel Vadot device_type = "cpu"; 150c9ccf3a3SEmmanuel Vadot compatible = "arm,cortex-a53"; 151c9ccf3a3SEmmanuel Vadot reg = <0x102>; 152c9ccf3a3SEmmanuel Vadot enable-method = "psci"; 153c9ccf3a3SEmmanuel Vadot cpu-idle-states = <&CPU_SLEEP_0>; 154c9ccf3a3SEmmanuel Vadot next-level-cache = <&L2_0>; 155c9ccf3a3SEmmanuel Vadot #cooling-cells = <2>; 156c9ccf3a3SEmmanuel Vadot clocks = <&apcs_glb>; 157c9ccf3a3SEmmanuel Vadot operating-points-v2 = <&cpu_opp_table>; 158c9ccf3a3SEmmanuel Vadot power-domains = <&cpr>; 159c9ccf3a3SEmmanuel Vadot power-domain-names = "cpr"; 160c9ccf3a3SEmmanuel Vadot }; 161c9ccf3a3SEmmanuel Vadot 162c9ccf3a3SEmmanuel Vadot CPU3: cpu@103 { 163c9ccf3a3SEmmanuel Vadot device_type = "cpu"; 164c9ccf3a3SEmmanuel Vadot compatible = "arm,cortex-a53"; 165c9ccf3a3SEmmanuel Vadot reg = <0x103>; 166c9ccf3a3SEmmanuel Vadot enable-method = "psci"; 167c9ccf3a3SEmmanuel Vadot cpu-idle-states = <&CPU_SLEEP_0>; 168c9ccf3a3SEmmanuel Vadot next-level-cache = <&L2_0>; 169c9ccf3a3SEmmanuel Vadot #cooling-cells = <2>; 170c9ccf3a3SEmmanuel Vadot clocks = <&apcs_glb>; 171c9ccf3a3SEmmanuel Vadot operating-points-v2 = <&cpu_opp_table>; 172c9ccf3a3SEmmanuel Vadot power-domains = <&cpr>; 173c9ccf3a3SEmmanuel Vadot power-domain-names = "cpr"; 174c9ccf3a3SEmmanuel Vadot }; 175c9ccf3a3SEmmanuel Vadot }; 176c9ccf3a3SEmmanuel Vadot 177c9ccf3a3SEmmanuel Vadot cpu_opp_table: opp-table-cpu { 178c9ccf3a3SEmmanuel Vadot compatible = "operating-points-v2-kryo-cpu"; 179c9ccf3a3SEmmanuel Vadot opp-shared; 180c9ccf3a3SEmmanuel Vadot 181c9ccf3a3SEmmanuel Vadot opp-1094400000 { 182c9ccf3a3SEmmanuel Vadot opp-hz = /bits/ 64 <1094400000>; 183c9ccf3a3SEmmanuel Vadot required-opps = <&cpr_opp1>; 184c9ccf3a3SEmmanuel Vadot }; 185c9ccf3a3SEmmanuel Vadot opp-1248000000 { 186c9ccf3a3SEmmanuel Vadot opp-hz = /bits/ 64 <1248000000>; 187c9ccf3a3SEmmanuel Vadot required-opps = <&cpr_opp2>; 188c9ccf3a3SEmmanuel Vadot }; 189c9ccf3a3SEmmanuel Vadot opp-1401600000 { 190c9ccf3a3SEmmanuel Vadot opp-hz = /bits/ 64 <1401600000>; 191c9ccf3a3SEmmanuel Vadot required-opps = <&cpr_opp3>; 192c9ccf3a3SEmmanuel Vadot }; 193c9ccf3a3SEmmanuel Vadot }; 194c9ccf3a3SEmmanuel Vadot 195c9ccf3a3SEmmanuel Vadot cpr_opp_table: opp-table-cpr { 196c9ccf3a3SEmmanuel Vadot compatible = "operating-points-v2-qcom-level"; 197c9ccf3a3SEmmanuel Vadot 198c9ccf3a3SEmmanuel Vadot cpr_opp1: opp1 { 199c9ccf3a3SEmmanuel Vadot opp-level = <1>; 200c9ccf3a3SEmmanuel Vadot qcom,opp-fuse-level = <1>; 201c9ccf3a3SEmmanuel Vadot }; 202c9ccf3a3SEmmanuel Vadot cpr_opp2: opp2 { 203c9ccf3a3SEmmanuel Vadot opp-level = <2>; 204c9ccf3a3SEmmanuel Vadot qcom,opp-fuse-level = <2>; 205c9ccf3a3SEmmanuel Vadot }; 206c9ccf3a3SEmmanuel Vadot cpr_opp3: opp3 { 207c9ccf3a3SEmmanuel Vadot opp-level = <3>; 208c9ccf3a3SEmmanuel Vadot qcom,opp-fuse-level = <3>; 209c9ccf3a3SEmmanuel Vadot }; 210c9ccf3a3SEmmanuel Vadot }; 211c9ccf3a3SEmmanuel Vadot }; 212