diff mbox series

[v2,1/4] dt-bindings: gpio: convert rk3328-grf-gpio.txt to YAML

Message ID 20210505134028.13431-2-jbx6244@gmail.com (mailing list archive)
State New, archived
Headers show
Series convert grf.txt to YAML | expand

Commit Message

Johan Jonker May 5, 2021, 1:40 p.m. UTC
Current dts files with RK3328 GRF 'gpio' nodes are manually verified.
In order to automate this process rk3328-grf-gpio.txt has to be
converted to YAML.

Rename 'grf-gpio' nodename to 'gpio'.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
 .../bindings/gpio/rockchip,rk3328-grf-gpio.txt     | 32 --------------
 .../bindings/gpio/rockchip,rk3328-grf-gpio.yaml    | 51 ++++++++++++++++++++++
 2 files changed, 51 insertions(+), 32 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/gpio/rockchip,rk3328-grf-gpio.txt
 create mode 100644 Documentation/devicetree/bindings/gpio/rockchip,rk3328-grf-gpio.yaml

Comments

Rob Herring (Arm) May 7, 2021, 8:48 p.m. UTC | #1
On Wed, 05 May 2021 15:40:25 +0200, Johan Jonker wrote:
> Current dts files with RK3328 GRF 'gpio' nodes are manually verified.
> In order to automate this process rk3328-grf-gpio.txt has to be
> converted to YAML.
> 
> Rename 'grf-gpio' nodename to 'gpio'.
> 
> Signed-off-by: Johan Jonker <jbx6244@gmail.com>
> ---
>  .../bindings/gpio/rockchip,rk3328-grf-gpio.txt     | 32 --------------
>  .../bindings/gpio/rockchip,rk3328-grf-gpio.yaml    | 51 ++++++++++++++++++++++
>  2 files changed, 51 insertions(+), 32 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/gpio/rockchip,rk3328-grf-gpio.txt
>  create mode 100644 Documentation/devicetree/bindings/gpio/rockchip,rk3328-grf-gpio.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Heiko Stuebner May 7, 2021, 8:59 p.m. UTC | #2
Hi Bartosz,

Am Mittwoch, 5. Mai 2021, 15:40:25 CEST schrieb Johan Jonker:
> Current dts files with RK3328 GRF 'gpio' nodes are manually verified.
> In order to automate this process rk3328-grf-gpio.txt has to be
> converted to YAML.
> 
> Rename 'grf-gpio' nodename to 'gpio'.
> 
> Signed-off-by: Johan Jonker <jbx6244@gmail.com>

just to not step on any toes, do you plan to apply this patch1 later on?
Patches 2-4 are in my domain so I'll get them after -rc1, but in theory
the gpio binding should go through the gpio tree.

Heiko
Rob Herring (Arm) May 7, 2021, 9:02 p.m. UTC | #3
On Fri, May 07, 2021 at 10:59:09PM +0200, Heiko Stuebner wrote:
> Hi Bartosz,
> 
> Am Mittwoch, 5. Mai 2021, 15:40:25 CEST schrieb Johan Jonker:
> > Current dts files with RK3328 GRF 'gpio' nodes are manually verified.
> > In order to automate this process rk3328-grf-gpio.txt has to be
> > converted to YAML.
> > 
> > Rename 'grf-gpio' nodename to 'gpio'.
> > 
> > Signed-off-by: Johan Jonker <jbx6244@gmail.com>
> 
> just to not step on any toes, do you plan to apply this patch1 later on?
> Patches 2-4 are in my domain so I'll get them after -rc1, but in theory
> the gpio binding should go through the gpio tree.

Different trees will break the schema checks because the grf schema 
refers to the gpio schema.

Rob
Heiko Stuebner May 7, 2021, 9:06 p.m. UTC | #4
Am Freitag, 7. Mai 2021, 23:02:39 CEST schrieb Rob Herring:
> On Fri, May 07, 2021 at 10:59:09PM +0200, Heiko Stuebner wrote:
> > Hi Bartosz,
> > 
> > Am Mittwoch, 5. Mai 2021, 15:40:25 CEST schrieb Johan Jonker:
> > > Current dts files with RK3328 GRF 'gpio' nodes are manually verified.
> > > In order to automate this process rk3328-grf-gpio.txt has to be
> > > converted to YAML.
> > > 
> > > Rename 'grf-gpio' nodename to 'gpio'.
> > > 
> > > Signed-off-by: Johan Jonker <jbx6244@gmail.com>
> > 
> > just to not step on any toes, do you plan to apply this patch1 later on?
> > Patches 2-4 are in my domain so I'll get them after -rc1, but in theory
> > the gpio binding should go through the gpio tree.
> 
> Different trees will break the schema checks because the grf schema 
> refers to the gpio schema.

Ah, thanks for the heads up.
I guess we need to agree on one then.

Bartosz, gpio tree or the rockchip tree for patches 1+2? ;-)


Heiko
Linus Walleij May 7, 2021, 9:26 p.m. UTC | #5
On Wed, May 5, 2021 at 3:40 PM Johan Jonker <jbx6244@gmail.com> wrote:

> Current dts files with RK3328 GRF 'gpio' nodes are manually verified.
> In order to automate this process rk3328-grf-gpio.txt has to be
> converted to YAML.
>
> Rename 'grf-gpio' nodename to 'gpio'.
>
> Signed-off-by: Johan Jonker <jbx6244@gmail.com>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/gpio/rockchip,rk3328-grf-gpio.txt b/Documentation/devicetree/bindings/gpio/rockchip,rk3328-grf-gpio.txt
deleted file mode 100644
index f9231df17..000000000
--- a/Documentation/devicetree/bindings/gpio/rockchip,rk3328-grf-gpio.txt
+++ /dev/null
@@ -1,32 +0,0 @@ 
-Rockchip RK3328 GRF (General Register Files) GPIO controller.
-
-In Rockchip RK3328, the output only GPIO_MUTE pin, originally for codec mute
-control, can also be used for general purpose. It is manipulated by the
-GRF_SOC_CON10 register in GRF. Aside from the GPIO_MUTE pin, the HDMI pins can
-also be set in the same way.
-
-Currently this GPIO controller only supports the mute pin. If needed in the
-future, the HDMI pins support can also be added.
-
-Required properties:
-- compatible: Should contain "rockchip,rk3328-grf-gpio".
-- gpio-controller: Marks the device node as a gpio controller.
-- #gpio-cells: Should be 2. The first cell is the pin number and
-  the second cell is used to specify the gpio polarity:
-    0 = Active high,
-    1 = Active low.
-
-Example:
-
-	grf: syscon@ff100000 {
-		compatible = "rockchip,rk3328-grf", "syscon", "simple-mfd";
-
-		grf_gpio: grf-gpio {
-			compatible = "rockchip,rk3328-grf-gpio";
-			gpio-controller;
-			#gpio-cells = <2>;
-		};
-	};
-
-Note: The grf_gpio node should be declared as the child of the GRF (General
-Register File) node. The GPIO_MUTE pin is referred to as <&grf_gpio 0>.
diff --git a/Documentation/devicetree/bindings/gpio/rockchip,rk3328-grf-gpio.yaml b/Documentation/devicetree/bindings/gpio/rockchip,rk3328-grf-gpio.yaml
new file mode 100644
index 000000000..ea169f6fb
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/rockchip,rk3328-grf-gpio.yaml
@@ -0,0 +1,51 @@ 
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/rockchip,rk3328-grf-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Rockchip RK3328 General Register Files GPIO controller
+
+description:
+  The Rockchip RK3328 General Register File (GRF) outputs only the
+  GPIO_MUTE pin, originally for codec mute control, but it can also be used
+  for general purpose. It is manipulated by the GRF_SOC_CON10 register.
+  If needed in the future support for the HDMI pins can also be added.
+  The GPIO node should be declared as the child of the GRF node.
+
+  The GPIO_MUTE pin is referred to in the format
+
+  <&grf_gpio 0 GPIO_ACTIVE_LOW>
+
+  The first cell is the pin number and
+  the second cell is used to specify the GPIO polarity
+    0 = Active high
+    1 = Active low
+
+maintainers:
+  - Heiko Stuebner <heiko@sntech.de>
+
+properties:
+  compatible:
+    const: rockchip,rk3328-grf-gpio
+
+  gpio-controller: true
+
+  "#gpio-cells":
+    const: 2
+
+required:
+  - compatible
+  - gpio-controller
+  - "#gpio-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    grf_gpio: gpio {
+      compatible = "rockchip,rk3328-grf-gpio";
+      gpio-controller;
+      #gpio-cells = <2>;
+    };
+