diff mbox series

[v2,03/14] dt-bindings: pwm: Convert BCM7038 PWM binding to YAML

Message ID 20211206182616.2089677-4-f.fainelli@gmail.com
State Superseded
Headers show
Series Broadcom DT bindings updates to YAML | expand

Commit Message

Florian Fainelli Dec. 6, 2021, 6:26 p.m. UTC
Convert the Broadcom STB BCM7038 PWM Device Tree binding to YAML to help
with validation.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 .../bindings/pwm/brcm,bcm7038-pwm.txt         | 20 ---------
 .../bindings/pwm/brcm,bcm7038-pwm.yaml        | 43 +++++++++++++++++++
 2 files changed, 43 insertions(+), 20 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/pwm/brcm,bcm7038-pwm.txt
 create mode 100644 Documentation/devicetree/bindings/pwm/brcm,bcm7038-pwm.yaml

Comments

Uwe Kleine-König Dec. 7, 2021, 7:59 a.m. UTC | #1
Hello,

On Mon, Dec 06, 2021 at 10:26:05AM -0800, Florian Fainelli wrote:
> Convert the Broadcom STB BCM7038 PWM Device Tree binding to YAML to help
> with validation.
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

I assume you intend to take these patches all together via the bcm tree?

Best regards
Uwe
Florian Fainelli Dec. 7, 2021, 6:27 p.m. UTC | #2
On 12/6/21 11:59 PM, Uwe Kleine-König wrote:
> Hello,
> 
> On Mon, Dec 06, 2021 at 10:26:05AM -0800, Florian Fainelli wrote:
>> Convert the Broadcom STB BCM7038 PWM Device Tree binding to YAML to help
>> with validation.
>>
>> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> 
> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> I assume you intend to take these patches all together via the bcm tree?

Yes, or having Rob pick them up, either way is fine.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pwm/brcm,bcm7038-pwm.txt b/Documentation/devicetree/bindings/pwm/brcm,bcm7038-pwm.txt
deleted file mode 100644
index 0e662d7f6bd1..000000000000
--- a/Documentation/devicetree/bindings/pwm/brcm,bcm7038-pwm.txt
+++ /dev/null
@@ -1,20 +0,0 @@ 
-Broadcom BCM7038 PWM controller (BCM7xxx Set Top Box PWM controller)
-
-Required properties:
-
-- compatible: must be "brcm,bcm7038-pwm"
-- reg: physical base address and length for this controller
-- #pwm-cells: should be 2. See pwm.yaml in this directory for a description
-  of the cells format
-- clocks: a phandle to the reference clock for this block which is fed through
-  its internal variable clock frequency generator
-
-
-Example:
-
-	pwm: pwm@f0408000 {
-		compatible = "brcm,bcm7038-pwm";
-		reg = <0xf0408000 0x28>;
-		#pwm-cells = <2>;
-		clocks = <&upg_fixed>;
-	};
diff --git a/Documentation/devicetree/bindings/pwm/brcm,bcm7038-pwm.yaml b/Documentation/devicetree/bindings/pwm/brcm,bcm7038-pwm.yaml
new file mode 100644
index 000000000000..4080e098f746
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/brcm,bcm7038-pwm.yaml
@@ -0,0 +1,43 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/brcm,bcm7038-pwm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom BCM7038 PWM controller (BCM7xxx Set Top Box PWM controller)
+
+maintainers:
+  - Florian Fainelli <f.fainelli@gmail.com>
+
+allOf:
+  - $ref: pwm.yaml#
+
+properties:
+  compatible:
+    const: brcm,bcm7038-pwm
+
+  reg:
+    maxItems: 1
+
+  "#pwm-cells":
+    const: 2
+
+  clocks:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - "#pwm-cells"
+  - clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    pwm: pwm@f0408000 {
+       compatible = "brcm,bcm7038-pwm";
+       reg = <0xf0408000 0x28>;
+       #pwm-cells = <2>;
+       clocks = <&upg_fixed>;
+    };