From: Sergiu Moga <sergiu.moga@microchip.com>
To: <claudiu.beznea@microchip.com>, <thierry.reding@gmail.com>,
<u.kleine-koenig@pengutronix.de>, <lee.jones@linaro.org>,
<robh+dt@kernel.org>, <krzysztof.kozlowski@canonical.com>,
<nicolas.ferre@microchip.com>, <alexandre.belloni@bootlin.com>
Cc: <linux-arm-kernel@lists.infradead.org>,
<linux-pwm@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
Sergiu Moga <sergiu.moga@microchip.com>
Subject: [PATCH 1/2] dt-bindings: pwm: convert atmel pwm to json-schema
Date: Mon, 7 Mar 2022 15:03:06 +0200 [thread overview]
Message-ID: <20220307130307.106102-2-sergiu.moga@microchip.com> (raw)
In-Reply-To: <20220307130307.106102-1-sergiu.moga@microchip.com>
Convert PWM binding for Atmel/Microchip SoCs to Device Tree Schema
format.
Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
---
.../devicetree/bindings/pwm/atmel-pwm.txt | 35 -----------
.../devicetree/bindings/pwm/atmel-pwm.yaml | 62 +++++++++++++++++++
2 files changed, 62 insertions(+), 35 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.txt
create mode 100644 Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
diff --git a/Documentation/devicetree/bindings/pwm/atmel-pwm.txt b/Documentation/devicetree/bindings/pwm/atmel-pwm.txt
deleted file mode 100644
index fbb5325be1f0..000000000000
--- a/Documentation/devicetree/bindings/pwm/atmel-pwm.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-Atmel PWM controller
-
-Required properties:
- - compatible: should be one of:
- - "atmel,at91sam9rl-pwm"
- - "atmel,sama5d3-pwm"
- - "atmel,sama5d2-pwm"
- - "microchip,sam9x60-pwm"
- - reg: physical base address and length of the controller's registers
- - #pwm-cells: Should be 3. See pwm.yaml in this directory for a
- description of the cells format.
-
-Example:
-
- pwm0: pwm@f8034000 {
- compatible = "atmel,at91sam9rl-pwm";
- reg = <0xf8034000 0x400>;
- #pwm-cells = <3>;
- };
-
- pwmleds {
- compatible = "pwm-leds";
-
- d1 {
- label = "d1";
- pwms = <&pwm0 3 5000 0>
- max-brightness = <255>;
- };
-
- d2 {
- label = "d2";
- pwms = <&pwm0 1 5000 1>
- max-brightness = <255>;
- };
- };
diff --git a/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml b/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
new file mode 100644
index 000000000000..f5378a2226bd
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/atmel-pwm.yaml
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/atmel-pwm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Atmel PWM controller
+
+maintainers:
+ - Claudiu Beznea <claudiu.beznea@microchip.com>
+
+properties:
+ compatible:
+ enum:
+ - atmel,at91sam9rl-pwm
+ - atmel,sama5d3-pwm
+ - atmel,sama5d2-pwm
+ - microchip,sam9x60-pwm
+
+ reg:
+ description: |
+ Physical base address and length of the controller's
+ registers
+ maxItems: 1
+
+ "#pwm-cells":
+ description: |
+ Should be 3. See pwm.yaml in this directory for a
+ description of the cells format.
+ const: 3
+
+required:
+ - compatible
+ - reg
+ - "#pwm-cells"
+
+additionalProperties: true
+
+examples:
+ - |
+ pwm0: pwm@f8034000 {
+ compatible = "atmel,at91sam9rl-pwm";
+ reg = <0xf8034000 0x400>;
+ #pwm-cells = <3>;
+ };
+
+ pwmleds {
+ compatible = "pwm-leds";
+
+ led-1 {
+ label = "led-1";
+ pwms = <&pwm0 3 5000 0>;
+ max-brightness = <255>;
+ };
+
+ led-2 {
+ label = "led-2";
+ pwms = <&pwm0 1 5000 1>;
+ max-brightness = <255>;
+ };
+ };
--
2.25.1
next prev parent reply other threads:[~2022-03-07 13:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-07 13:03 [PATCH 0/2] " Sergiu Moga
2022-03-07 13:03 ` Sergiu Moga [this message]
2022-03-07 13:22 ` [PATCH 1/2] " Krzysztof Kozlowski
2022-03-07 14:05 ` Sergiu.Moga
2022-03-07 13:03 ` [PATCH 2/2] dt-bindings: pwm: at91: Add SAMA7G5 compatible strings list Sergiu Moga
2022-03-07 13:24 ` Krzysztof Kozlowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220307130307.106102-2-sergiu.moga@microchip.com \
--to=sergiu.moga@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@microchip.com \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski@canonical.com \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=robh+dt@kernel.org \
--cc=thierry.reding@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®