diff mbox series

[14/43] dt-bindings: pwm: Add DT bindings ep93xx PWM

Message ID 20230424123522.18302-15-nikita.shubin@maquefel.me
State Changes Requested
Headers show
Series ep93xx device tree conversion | expand

Commit Message

Nikita Shubin April 24, 2023, 12:34 p.m. UTC
Add YAML bindings for ep93xx SoC.

Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
 .../bindings/pwm/cirrus,ep93xx-pwm.yaml       | 45 +++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pwm/cirrus,ep93xx-pwm.yaml

Comments

Rob Herring April 24, 2023, 4:02 p.m. UTC | #1
On Mon, Apr 24, 2023 at 03:34:30PM +0300, Nikita Shubin wrote:
> Add YAML bindings for ep93xx SoC.
> 
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> ---
>  .../bindings/pwm/cirrus,ep93xx-pwm.yaml       | 45 +++++++++++++++++++
>  1 file changed, 45 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/pwm/cirrus,ep93xx-pwm.yaml
> 
> diff --git a/Documentation/devicetree/bindings/pwm/cirrus,ep93xx-pwm.yaml b/Documentation/devicetree/bindings/pwm/cirrus,ep93xx-pwm.yaml
> new file mode 100644
> index 000000000000..8f67eb152f8b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pwm/cirrus,ep93xx-pwm.yaml
> @@ -0,0 +1,45 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pwm/cirrus,ep93xx-pwm.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Cirrus Logick ep93xx PWM controller
> +
> +maintainers:
> +  - Thierry Reding <thierry.reding@gmail.com>

This is someone that cares about this platform/binding, not who applies 
patches. Same thing elsewhere.

> +
> +properties:
> +  compatible:
> +    enum:
> +      - cirrus,ep9301-pwm
> +  reg:
> +    maxItems: 1
> +
> +  clocks:
> +    items:
> +      - description: SoC PWM clock
> +
> +  clock-names:
> +    items:
> +      - const: pwm_clk

*-names is kind of pointless with only 1 entry. And 'pwm' is redundant 
because names are local to the device. 'clk' is redundant because it's 
all clocks.

> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +  - clock-names
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/cirrus,ep93xx-clock.h>
> +    pwm0: pwm@80910000 {
> +        compatible = "cirrus,ep9301-pwm";
> +        reg = <0x80910000 0x10>;
> +        clocks = <&syscon EP93XX_CLK_PWM>;
> +        clock-names = "pwm_clk";
> +    };
> +
> +...
> -- 
> 2.39.2
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pwm/cirrus,ep93xx-pwm.yaml b/Documentation/devicetree/bindings/pwm/cirrus,ep93xx-pwm.yaml
new file mode 100644
index 000000000000..8f67eb152f8b
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/cirrus,ep93xx-pwm.yaml
@@ -0,0 +1,45 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/cirrus,ep93xx-pwm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cirrus Logick ep93xx PWM controller
+
+maintainers:
+  - Thierry Reding <thierry.reding@gmail.com>
+
+properties:
+  compatible:
+    enum:
+      - cirrus,ep9301-pwm
+  reg:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: SoC PWM clock
+
+  clock-names:
+    items:
+      - const: pwm_clk
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/cirrus,ep93xx-clock.h>
+    pwm0: pwm@80910000 {
+        compatible = "cirrus,ep9301-pwm";
+        reg = <0x80910000 0x10>;
+        clocks = <&syscon EP93XX_CLK_PWM>;
+        clock-names = "pwm_clk";
+    };
+
+...