Re: [PATCH v5 1/2] dt-bindings: cpufreq: Introduce QCOM CPUFREQ Firmware bindings

From: Stephen Boyd
Date: Thu Jul 12 2018 - 19:50:03 EST


Quoting Taniya Das (2018-07-12 11:05:44)
[..]
> + compatible = "qcom,kryo385";
> + reg = <0x0 0x600>;
> + enable-method = "psci";
> + next-level-cache = <&L2_600>;
> + qcom,freq-domain = <&freq_domain_table1>;
> + L2_600: l2-cache {
> + compatible = "cache";
> + next-level-cache = <&L3_0>;
> + };
> + };
> +
> + CPU7: cpu@700 {
> + device_type = "cpu";
> + compatible = "qcom,kryo385";
> + reg = <0x0 0x700>;
> + enable-method = "psci";
> + next-level-cache = <&L2_700>;
> + qcom,freq-domain = <&freq_domain_table1>;
> + L2_700: l2-cache {
> + compatible = "cache";
> + next-level-cache = <&L3_0>;
> + };
> + };
> + };
> +
> + qcom,cpufreq-hw {
> + compatible = "qcom,cpufreq-hw";
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ranges;
> + freq_domain_table0: freq_table0 {
> + reg = <0 0x17d43000 0 0x1400>;
> + };
> +
> + freq_domain_table1: freq_table1 {
> + reg = <0 0x17d45800 0 0x1400>;
> + };

It seems that we need to map the CPUs in the cpus node to the frequency
domains in the cpufreq-hw node. Wouldn't that be better served via a
#foo-cells and <&phandle foo-cell> property in the CPU node? It's
annoying that the cpufreq-hw node doesn't have a reg property, when it
really should have one that goes over the whole register space (or is
split across the frequency domains so that there are two reg properties
here).