Commit 0bdd95ce authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge tag 'cpufreq-arm-updates-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm

Pull cpufreq/ARM updates for 6.4 from Viresh Kumar:

"- Add opp and bandwidth support to tegra194 cpufreq driver (Sumit
   Gupta).

 - Use of_property_present() for testing DT property presence (Rob
   Herring).

 - Remove MODULE_LICENSE in non-modules (Nick Alcock).

 - Add SM7225 to cpufreq-dt-platdev blocklist (Luca Weiss).

 - Optimizations and fixes for qcom-cpufreq-hw driver (Krzysztof
   Kozlowski, Konrad Dybcio, and Bjorn Andersson).

 - DT binding updates for qcom-cpufreq-hw driver (Konrad Dybcio and
   Bartosz Golaszewski).

 - Updates and fixes for mediatek driver (Jia-Wei Chang and
   AngeloGioacchino Del Regno)."
parents 44295af5 f41e1442
Loading
Loading
Loading
Loading
+116 −3
Original line number Diff line number Diff line
@@ -20,12 +20,20 @@ properties:
    oneOf:
      - description: v1 of CPUFREQ HW
        items:
          - enum:
              - qcom,qcm2290-cpufreq-hw
              - qcom,sc7180-cpufreq-hw
              - qcom,sdm845-cpufreq-hw
              - qcom,sm6115-cpufreq-hw
              - qcom,sm6350-cpufreq-hw
              - qcom,sm8150-cpufreq-hw
          - const: qcom,cpufreq-hw

      - description: v2 of CPUFREQ HW (EPSS)
        items:
          - enum:
              - qcom,qdu1000-cpufreq-epss
              - qcom,sa8775p-cpufreq-epss
              - qcom,sc7280-cpufreq-epss
              - qcom,sc8280xp-cpufreq-epss
              - qcom,sm6375-cpufreq-epss
@@ -36,14 +44,14 @@ properties:
          - const: qcom,cpufreq-epss

  reg:
    minItems: 2
    minItems: 1
    items:
      - description: Frequency domain 0 register region
      - description: Frequency domain 1 register region
      - description: Frequency domain 2 register region

  reg-names:
    minItems: 2
    minItems: 1
    items:
      - const: freq-domain0
      - const: freq-domain1
@@ -85,6 +93,111 @@ required:

additionalProperties: false

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,qcm2290-cpufreq-hw
    then:
      properties:
        reg:
          minItems: 1
          maxItems: 1

        reg-names:
          minItems: 1
          maxItems: 1

        interrupts:
          minItems: 1
          maxItems: 1

        interrupt-names:
          minItems: 1

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,qdu1000-cpufreq-epss
              - qcom,sc7180-cpufreq-hw
              - qcom,sc8280xp-cpufreq-epss
              - qcom,sdm845-cpufreq-hw
              - qcom,sm6115-cpufreq-hw
              - qcom,sm6350-cpufreq-hw
              - qcom,sm6375-cpufreq-epss
    then:
      properties:
        reg:
          minItems: 2
          maxItems: 2

        reg-names:
          minItems: 2
          maxItems: 2

        interrupts:
          minItems: 2
          maxItems: 2

        interrupt-names:
          minItems: 2

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,sc7280-cpufreq-epss
              - qcom,sm8250-cpufreq-epss
              - qcom,sm8350-cpufreq-epss
              - qcom,sm8450-cpufreq-epss
              - qcom,sm8550-cpufreq-epss
    then:
      properties:
        reg:
          minItems: 3
          maxItems: 3

        reg-names:
          minItems: 3
          maxItems: 3

        interrupts:
          minItems: 3
          maxItems: 3

        interrupt-names:
          minItems: 3

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,sm8150-cpufreq-hw
    then:
      properties:
        reg:
          minItems: 3
          maxItems: 3

        reg-names:
          minItems: 3
          maxItems: 3

        # On some SoCs the Prime core shares the LMH irq with Big cores
        interrupts:
          minItems: 2
          maxItems: 2

        interrupt-names:
          minItems: 2


examples:
  - |
    #include <dt-bindings/clock/qcom,gcc-sdm845.h>
@@ -235,7 +348,7 @@ examples:
      #size-cells = <1>;

      cpufreq@17d43000 {
        compatible = "qcom,cpufreq-hw";
        compatible = "qcom,sdm845-cpufreq-hw", "qcom,cpufreq-hw";
        reg = <0x17d43000 0x1400>, <0x17d45800 0x1400>;
        reg-names = "freq-domain0", "freq-domain1";

+2 −1
Original line number Diff line number Diff line
@@ -152,6 +152,7 @@ static const struct of_device_id blocklist[] __initconst = {
	{ .compatible = "qcom,sm6115", },
	{ .compatible = "qcom,sm6350", },
	{ .compatible = "qcom,sm6375", },
	{ .compatible = "qcom,sm7225", },
	{ .compatible = "qcom,sm8150", },
	{ .compatible = "qcom,sm8250", },
	{ .compatible = "qcom,sm8350", },
@@ -179,7 +180,7 @@ static bool __init cpu0_node_has_opp_v2_prop(void)
	struct device_node *np = of_cpu_device_node_get(0);
	bool ret = false;

	if (of_get_property(np, "operating-points-v2", NULL))
	if (of_property_present(np, "operating-points-v2"))
		ret = true;

	of_node_put(np);
+0 −1
Original line number Diff line number Diff line
@@ -372,4 +372,3 @@ int cpufreq_table_validate_and_sort(struct cpufreq_policy *policy)

MODULE_AUTHOR("Dominik Brodowski <linux@brodo.de>");
MODULE_DESCRIPTION("CPUfreq frequency table helpers");
MODULE_LICENSE("GPL");
+1 −1
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ static int imx_cpufreq_dt_probe(struct platform_device *pdev)

	cpu_dev = get_cpu_device(0);

	if (!of_find_property(cpu_dev->of_node, "cpu-supply", NULL))
	if (!of_property_present(cpu_dev->of_node, "cpu-supply"))
		return -ENODEV;

	if (of_machine_is_compatible("fsl,imx7ulp")) {
+2 −2
Original line number Diff line number Diff line
@@ -222,7 +222,7 @@ static int imx6q_opp_check_speed_grading(struct device *dev)
	u32 val;
	int ret;

	if (of_find_property(dev->of_node, "nvmem-cells", NULL)) {
	if (of_property_present(dev->of_node, "nvmem-cells")) {
		ret = nvmem_cell_read_u32(dev, "speed_grade", &val);
		if (ret)
			return ret;
@@ -279,7 +279,7 @@ static int imx6ul_opp_check_speed_grading(struct device *dev)
	u32 val;
	int ret = 0;

	if (of_find_property(dev->of_node, "nvmem-cells", NULL)) {
	if (of_property_present(dev->of_node, "nvmem-cells")) {
		ret = nvmem_cell_read_u32(dev, "speed_grade", &val);
		if (ret)
			return ret;
Loading