[PATCH 6/8] dt-bindings: pwm: Add Amlogic Meson PWM binding

Heiner Kallweit hkallweit1 at gmail.com
Mon Jan 23 13:29:27 PST 2023


Add Amlogic Meson PWM binding.
Tested with make targets dt_binding_check and dtbs_check.

Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
---
 .../devicetree/bindings/pwm/pwm-amlogic.yaml  | 61 +++++++++++++++++++
 .../devicetree/bindings/pwm/pwm-meson.txt     | 29 ---------
 2 files changed, 61 insertions(+), 29 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pwm/pwm-amlogic.yaml
 delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-meson.txt

diff --git a/Documentation/devicetree/bindings/pwm/pwm-amlogic.yaml b/Documentation/devicetree/bindings/pwm/pwm-amlogic.yaml
new file mode 100644
index 000000000..443ff4e5b
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/pwm-amlogic.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/pwm-amlogic.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amlogic PWM
+
+maintainers:
+  - Heiner Kallweit <hkallweit1 at gmail.com>
+
+allOf:
+  - $ref: pwm.yaml#
+
+properties:
+  compatible:
+    enum:
+      - amlogic,meson8b-pwm
+      - amlogic,meson-gxbb-pwm
+      - amlogic,meson-gxbb-ao-pwm
+      - amlogic,meson-axg-ee-pwm
+      - amlogic,meson-axg-ao-pwm
+      - amlogic,meson-g12a-ee-pwm
+      - amlogic,meson-g12a-ao-pwm-ab
+      - amlogic,meson-g12a-ao-pwm-cd
+      - amlogic,meson-s4-pwm
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+
+  clock-names:
+    minItems: 1
+    maxItems: 2
+
+  "#pwm-cells":
+    const: 3
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    apb at fe000000 {
+      reg = <0x0 0xfe000000 0x0 0x480000>;
+      #address-cells = <2>;
+      #size-cells = <2>;
+
+      pwm at 8550 {
+        compatible = "amlogic,meson-gxbb-pwm";
+        reg = <0x0 0x08550 0x0 0x10>;
+        clocks = <&xtal>, <&xtal>;
+        clock-names = "clkin0", "clkin1";
+        #pwm-cells = <3>;
+      };
+    };
diff --git a/Documentation/devicetree/bindings/pwm/pwm-meson.txt b/Documentation/devicetree/bindings/pwm/pwm-meson.txt
deleted file mode 100644
index bd02b0a14..000000000
--- a/Documentation/devicetree/bindings/pwm/pwm-meson.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-Amlogic Meson PWM Controller
-============================
-
-Required properties:
-- compatible: Shall contain "amlogic,meson8b-pwm"
-                         or "amlogic,meson-gxbb-pwm"
-                         or "amlogic,meson-gxbb-ao-pwm"
-                         or "amlogic,meson-axg-ee-pwm"
-                         or "amlogic,meson-axg-ao-pwm"
-                         or "amlogic,meson-g12a-ee-pwm"
-                         or "amlogic,meson-g12a-ao-pwm-ab"
-                         or "amlogic,meson-g12a-ao-pwm-cd"
-- #pwm-cells: Should be 3. See pwm.yaml in this directory for a description of
-  the cells format.
-
-Optional properties:
-- clocks: Could contain one or two parents clocks phandle for each of the two
-  PWM channels.
-- clock-names: Could contain at least the "clkin0" and/or "clkin1" names.
-
-Example:
-
-	pwm_ab: pwm at 8550 {
-		compatible = "amlogic,meson-gxbb-pwm";
-		reg = <0x0 0x08550 0x0 0x10>;
-		#pwm-cells = <3>;
-		clocks = <&xtal>, <&xtal>;
-		clock-names = "clkin0", "clkin1";
-	}
-- 
2.39.1





More information about the linux-arm-kernel mailing list