18c2ecf20Sopenharmony_ciQualcomm Technologies, Inc. CPUFREQ Bindings
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciCPUFREQ HW is a hardware engine used by some Qualcomm Technologies, Inc. (QTI)
48c2ecf20Sopenharmony_ciSoCs to manage frequency in hardware. It is capable of controlling frequency
58c2ecf20Sopenharmony_cifor multiple clusters.
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ciProperties:
88c2ecf20Sopenharmony_ci- compatible
98c2ecf20Sopenharmony_ci	Usage:		required
108c2ecf20Sopenharmony_ci	Value type:	<string>
118c2ecf20Sopenharmony_ci	Definition:	must be "qcom,cpufreq-hw" or "qcom,cpufreq-epss".
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci- clocks
148c2ecf20Sopenharmony_ci	Usage:		required
158c2ecf20Sopenharmony_ci	Value type:	<phandle> From common clock binding.
168c2ecf20Sopenharmony_ci	Definition:	clock handle for XO clock and GPLL0 clock.
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci- clock-names
198c2ecf20Sopenharmony_ci	Usage:		required
208c2ecf20Sopenharmony_ci	Value type:	<string> From common clock binding.
218c2ecf20Sopenharmony_ci	Definition:	must be "xo", "alternate".
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci- reg
248c2ecf20Sopenharmony_ci	Usage:		required
258c2ecf20Sopenharmony_ci	Value type:	<prop-encoded-array>
268c2ecf20Sopenharmony_ci	Definition:	Addresses and sizes for the memory of the HW bases in
278c2ecf20Sopenharmony_ci			each frequency domain.
288c2ecf20Sopenharmony_ci- reg-names
298c2ecf20Sopenharmony_ci	Usage:		Optional
308c2ecf20Sopenharmony_ci	Value type:	<string>
318c2ecf20Sopenharmony_ci	Definition:	Frequency domain name i.e.
328c2ecf20Sopenharmony_ci			"freq-domain0", "freq-domain1".
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci- #freq-domain-cells:
358c2ecf20Sopenharmony_ci	Usage:		required.
368c2ecf20Sopenharmony_ci	Definition:	Number of cells in a freqency domain specifier.
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci* Property qcom,freq-domain
398c2ecf20Sopenharmony_ciDevices supporting freq-domain must set their "qcom,freq-domain" property with
408c2ecf20Sopenharmony_ciphandle to a cpufreq_hw followed by the Domain ID(0/1) in the CPU DT node.
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ciExample:
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ciExample 1: Dual-cluster, Quad-core per cluster. CPUs within a cluster switch
468c2ecf20Sopenharmony_ciDCVS state together.
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci/ {
498c2ecf20Sopenharmony_ci	cpus {
508c2ecf20Sopenharmony_ci		#address-cells = <2>;
518c2ecf20Sopenharmony_ci		#size-cells = <0>;
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ci		CPU0: cpu@0 {
548c2ecf20Sopenharmony_ci			device_type = "cpu";
558c2ecf20Sopenharmony_ci			compatible = "qcom,kryo385";
568c2ecf20Sopenharmony_ci			reg = <0x0 0x0>;
578c2ecf20Sopenharmony_ci			enable-method = "psci";
588c2ecf20Sopenharmony_ci			next-level-cache = <&L2_0>;
598c2ecf20Sopenharmony_ci			qcom,freq-domain = <&cpufreq_hw 0>;
608c2ecf20Sopenharmony_ci			L2_0: l2-cache {
618c2ecf20Sopenharmony_ci				compatible = "cache";
628c2ecf20Sopenharmony_ci				next-level-cache = <&L3_0>;
638c2ecf20Sopenharmony_ci				L3_0: l3-cache {
648c2ecf20Sopenharmony_ci				      compatible = "cache";
658c2ecf20Sopenharmony_ci				};
668c2ecf20Sopenharmony_ci			};
678c2ecf20Sopenharmony_ci		};
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ci		CPU1: cpu@100 {
708c2ecf20Sopenharmony_ci			device_type = "cpu";
718c2ecf20Sopenharmony_ci			compatible = "qcom,kryo385";
728c2ecf20Sopenharmony_ci			reg = <0x0 0x100>;
738c2ecf20Sopenharmony_ci			enable-method = "psci";
748c2ecf20Sopenharmony_ci			next-level-cache = <&L2_100>;
758c2ecf20Sopenharmony_ci			qcom,freq-domain = <&cpufreq_hw 0>;
768c2ecf20Sopenharmony_ci			L2_100: l2-cache {
778c2ecf20Sopenharmony_ci				compatible = "cache";
788c2ecf20Sopenharmony_ci				next-level-cache = <&L3_0>;
798c2ecf20Sopenharmony_ci			};
808c2ecf20Sopenharmony_ci		};
818c2ecf20Sopenharmony_ci
828c2ecf20Sopenharmony_ci		CPU2: cpu@200 {
838c2ecf20Sopenharmony_ci			device_type = "cpu";
848c2ecf20Sopenharmony_ci			compatible = "qcom,kryo385";
858c2ecf20Sopenharmony_ci			reg = <0x0 0x200>;
868c2ecf20Sopenharmony_ci			enable-method = "psci";
878c2ecf20Sopenharmony_ci			next-level-cache = <&L2_200>;
888c2ecf20Sopenharmony_ci			qcom,freq-domain = <&cpufreq_hw 0>;
898c2ecf20Sopenharmony_ci			L2_200: l2-cache {
908c2ecf20Sopenharmony_ci				compatible = "cache";
918c2ecf20Sopenharmony_ci				next-level-cache = <&L3_0>;
928c2ecf20Sopenharmony_ci			};
938c2ecf20Sopenharmony_ci		};
948c2ecf20Sopenharmony_ci
958c2ecf20Sopenharmony_ci		CPU3: cpu@300 {
968c2ecf20Sopenharmony_ci			device_type = "cpu";
978c2ecf20Sopenharmony_ci			compatible = "qcom,kryo385";
988c2ecf20Sopenharmony_ci			reg = <0x0 0x300>;
998c2ecf20Sopenharmony_ci			enable-method = "psci";
1008c2ecf20Sopenharmony_ci			next-level-cache = <&L2_300>;
1018c2ecf20Sopenharmony_ci			qcom,freq-domain = <&cpufreq_hw 0>;
1028c2ecf20Sopenharmony_ci			L2_300: l2-cache {
1038c2ecf20Sopenharmony_ci				compatible = "cache";
1048c2ecf20Sopenharmony_ci				next-level-cache = <&L3_0>;
1058c2ecf20Sopenharmony_ci			};
1068c2ecf20Sopenharmony_ci		};
1078c2ecf20Sopenharmony_ci
1088c2ecf20Sopenharmony_ci		CPU4: cpu@400 {
1098c2ecf20Sopenharmony_ci			device_type = "cpu";
1108c2ecf20Sopenharmony_ci			compatible = "qcom,kryo385";
1118c2ecf20Sopenharmony_ci			reg = <0x0 0x400>;
1128c2ecf20Sopenharmony_ci			enable-method = "psci";
1138c2ecf20Sopenharmony_ci			next-level-cache = <&L2_400>;
1148c2ecf20Sopenharmony_ci			qcom,freq-domain = <&cpufreq_hw 1>;
1158c2ecf20Sopenharmony_ci			L2_400: l2-cache {
1168c2ecf20Sopenharmony_ci				compatible = "cache";
1178c2ecf20Sopenharmony_ci				next-level-cache = <&L3_0>;
1188c2ecf20Sopenharmony_ci			};
1198c2ecf20Sopenharmony_ci		};
1208c2ecf20Sopenharmony_ci
1218c2ecf20Sopenharmony_ci		CPU5: cpu@500 {
1228c2ecf20Sopenharmony_ci			device_type = "cpu";
1238c2ecf20Sopenharmony_ci			compatible = "qcom,kryo385";
1248c2ecf20Sopenharmony_ci			reg = <0x0 0x500>;
1258c2ecf20Sopenharmony_ci			enable-method = "psci";
1268c2ecf20Sopenharmony_ci			next-level-cache = <&L2_500>;
1278c2ecf20Sopenharmony_ci			qcom,freq-domain = <&cpufreq_hw 1>;
1288c2ecf20Sopenharmony_ci			L2_500: l2-cache {
1298c2ecf20Sopenharmony_ci				compatible = "cache";
1308c2ecf20Sopenharmony_ci				next-level-cache = <&L3_0>;
1318c2ecf20Sopenharmony_ci			};
1328c2ecf20Sopenharmony_ci		};
1338c2ecf20Sopenharmony_ci
1348c2ecf20Sopenharmony_ci		CPU6: cpu@600 {
1358c2ecf20Sopenharmony_ci			device_type = "cpu";
1368c2ecf20Sopenharmony_ci			compatible = "qcom,kryo385";
1378c2ecf20Sopenharmony_ci			reg = <0x0 0x600>;
1388c2ecf20Sopenharmony_ci			enable-method = "psci";
1398c2ecf20Sopenharmony_ci			next-level-cache = <&L2_600>;
1408c2ecf20Sopenharmony_ci			qcom,freq-domain = <&cpufreq_hw 1>;
1418c2ecf20Sopenharmony_ci			L2_600: l2-cache {
1428c2ecf20Sopenharmony_ci				compatible = "cache";
1438c2ecf20Sopenharmony_ci				next-level-cache = <&L3_0>;
1448c2ecf20Sopenharmony_ci			};
1458c2ecf20Sopenharmony_ci		};
1468c2ecf20Sopenharmony_ci
1478c2ecf20Sopenharmony_ci		CPU7: cpu@700 {
1488c2ecf20Sopenharmony_ci			device_type = "cpu";
1498c2ecf20Sopenharmony_ci			compatible = "qcom,kryo385";
1508c2ecf20Sopenharmony_ci			reg = <0x0 0x700>;
1518c2ecf20Sopenharmony_ci			enable-method = "psci";
1528c2ecf20Sopenharmony_ci			next-level-cache = <&L2_700>;
1538c2ecf20Sopenharmony_ci			qcom,freq-domain = <&cpufreq_hw 1>;
1548c2ecf20Sopenharmony_ci			L2_700: l2-cache {
1558c2ecf20Sopenharmony_ci				compatible = "cache";
1568c2ecf20Sopenharmony_ci				next-level-cache = <&L3_0>;
1578c2ecf20Sopenharmony_ci			};
1588c2ecf20Sopenharmony_ci		};
1598c2ecf20Sopenharmony_ci	};
1608c2ecf20Sopenharmony_ci
1618c2ecf20Sopenharmony_ci soc {
1628c2ecf20Sopenharmony_ci	cpufreq_hw: cpufreq@17d43000 {
1638c2ecf20Sopenharmony_ci		compatible = "qcom,cpufreq-hw";
1648c2ecf20Sopenharmony_ci		reg = <0x17d43000 0x1400>, <0x17d45800 0x1400>;
1658c2ecf20Sopenharmony_ci		reg-names = "freq-domain0", "freq-domain1";
1668c2ecf20Sopenharmony_ci
1678c2ecf20Sopenharmony_ci		clocks = <&rpmhcc RPMH_CXO_CLK>, <&gcc GPLL0>;
1688c2ecf20Sopenharmony_ci		clock-names = "xo", "alternate";
1698c2ecf20Sopenharmony_ci
1708c2ecf20Sopenharmony_ci		#freq-domain-cells = <1>;
1718c2ecf20Sopenharmony_ci	};
1728c2ecf20Sopenharmony_ci}
173