diff mbox series

[1/3] dt-bindings: cpufreq: sama7g5-cpufreq: add dt bindings documentation

Message ID 1609842147-8161-2-git-send-email-claudiu.beznea@microchip.com (mailing list archive)
State New, archived
Delegated to: viresh kumar
Headers show
Series cpufreq: sama7g5: add support for sama7g5 | expand

Commit Message

Claudiu Beznea Jan. 5, 2021, 10:22 a.m. UTC
Add DT bindings documentation for SAMA7G5 CPUFreq driver.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 .../bindings/cpufreq/cpufreq-sama7g5.yaml          | 80 ++++++++++++++++++++++
 1 file changed, 80 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/cpufreq/cpufreq-sama7g5.yaml

Comments

Rob Herring Jan. 5, 2021, 5:04 p.m. UTC | #1
On Tue, 05 Jan 2021 12:22:25 +0200, Claudiu Beznea wrote:
> Add DT bindings documentation for SAMA7G5 CPUFreq driver.
> 
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> ---
>  .../bindings/cpufreq/cpufreq-sama7g5.yaml          | 80 ++++++++++++++++++++++
>  1 file changed, 80 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/cpufreq/cpufreq-sama7g5.yaml
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/cpufreq/cpufreq-sama7g5.yaml: properties:cpu-supply: '$ref' is not one of ['description', 'deprecated']
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/cpufreq/cpufreq-sama7g5.yaml: ignoring, error in schema: properties: cpu-supply
warning: no schema found in file: ./Documentation/devicetree/bindings/cpufreq/cpufreq-sama7g5.yaml

See https://patchwork.ozlabs.org/patch/1422407

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-sama7g5.yaml b/Documentation/devicetree/bindings/cpufreq/cpufreq-sama7g5.yaml
new file mode 100644
index 000000000000..e8185a614035
--- /dev/null
+++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-sama7g5.yaml
@@ -0,0 +1,80 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/cpufreq/cpufreq-sama7g5.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: SAMA7G5's CPUFreq device tree bindings
+
+maintainers:
+  - Claudiu Beznea <claudiu.beznea@microchip.com>
+
+properties:
+  clocks:
+    items:
+      - description: The clock feeding the CPU
+      - description: The clock sharing the PLL and prescaller with CPU clock
+
+  clock-names:
+    items:
+      - const: cpu
+      - const: mck
+
+  operating-points-v2:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      Phandle to OPP table
+
+  cpu-supply:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      Phandle to CPU's voltage regulator
+
+required:
+  - clocks
+  - clock-names
+  - operating-points-v2
+  - cpu-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/at91.h>
+    cpu_opp_table: opp-table {
+            compatible = "operating-points-v2";
+
+            opp-600000000 {
+                    opp-hz = /bits/ 64 <600000000>;
+                    opp-microvolt = <1125000 1050000 1225000>;
+                    clock-latency-ns = <50000>;
+            };
+
+            opp-800000000 {
+                    opp-hz = /bits/ 64 <800000000>;
+                    opp-microvolt = <1175000 1125000 1225000>;
+                    clock-latency-ns = <50000>;
+            };
+
+            opp-1000000000 {
+                    opp-hz = /bits/ 64 <1000000000>;
+                    opp-microvolt = <1275000 1225000 1300000>;
+                    clock-latency-ns = <50000>;
+            };
+    };
+
+  - |
+    cpus {
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            cpu0: cpu@0 {
+                    device_type = "cpu";
+                    compatible = "arm,cortex-a7";
+                    reg = <0x0>;
+                    clocks = <&pmc PMC_TYPE_CORE PMC_CPU>, <&pmc PMC_TYPE_CORE PMC_MCK>;
+                    clock-names = "cpu", "mck";
+                    operating-points-v2 = <&cpu_opp_table>;
+                    cpu-supply = <&vddcpu>;
+            };
+    };