linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] gpio: add common dtschema
@ 2020-09-16 16:22 Krzysztof Kozlowski
  2020-09-16 16:22 ` [PATCH 1/8] dt-bindings: gpio: add common schema for GPIO controllers Krzysztof Kozlowski
                   ` (8 more replies)
  0 siblings, 9 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-16 16:22 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Rob Herring, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Manivannan Sadhasivam, Andy Gross, Bjorn Andersson,
	Palmer Dabbelt, Paul Walmsley, Masahiro Yamada, Chris Packham,
	Anson Huang, Sungbo Eo, Stefan Agner, Srinivas Kandagatla,
	Magnus Damm, Geert Uytterhoeven, Yash Shah, Paul Kocialkowski,
	linux-gpio, devicetree, linux-arm-kernel, linux-kernel,
	linux-unisoc, linux-arm-msm, linux-riscv
  Cc: Krzysztof Kozlowski

Hi,

This is independent work of pca953x bindings:
https://lore.kernel.org/lkml/20200916155715.21009-1-krzk@kernel.org/T/#u

The DTS patches can be also applied independently.

Best regards,
Krzysztof


Krzysztof Kozlowski (8):
  dt-bindings: gpio: add common schema for GPIO controllers
  dt-bindings: gpio: include common schema in GPIO controllers
  dt-bindings: gpio: pl061: add missing properties and include common
    schema
  dt-bindings: gpio: fsl-imx-gpio: add i.MX ARMv6 and ARMv7 compatibles
  dt-bindings: gpio: fsl-imx-gpio: add gpio-line-names
  arm64: dts: imx8mq-librem5: correct GPIO hog property
  arm64: dts: imx8mq-librem5: align GPIO hog names with dtschema
  ARM: dts: imx: align GPIO hog names with dtschema

 .../bindings/gpio/brcm,xgs-iproc-gpio.yaml    |   3 +
 .../bindings/gpio/fsl-imx-gpio.yaml           |  17 ++-
 .../devicetree/bindings/gpio/gpio-common.yaml | 126 ++++++++++++++++++
 .../devicetree/bindings/gpio/gpio-mxs.yaml    |   3 +
 .../bindings/gpio/gpio-pca9570.yaml           |   3 +
 .../devicetree/bindings/gpio/gpio-rda.yaml    |   3 +
 .../devicetree/bindings/gpio/gpio-vf610.yaml  |   3 +
 .../devicetree/bindings/gpio/mrvl-gpio.yaml   |   1 +
 .../devicetree/bindings/gpio/pl061-gpio.yaml  |   6 +
 .../bindings/gpio/qcom,wcd934x-gpio.yaml      |   3 +
 .../bindings/gpio/renesas,em-gio.yaml         |   3 +
 .../bindings/gpio/renesas,rcar-gpio.yaml      |   3 +
 .../devicetree/bindings/gpio/sifive,gpio.yaml |   3 +
 .../gpio/socionext,uniphier-gpio.yaml         |   3 +
 .../bindings/gpio/xylon,logicvc-gpio.yaml     |   3 +
 arch/arm/boot/dts/imx51-zii-rdu1.dts          |   2 +-
 arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi       |   8 +-
 arch/arm/boot/dts/imx6ul-ccimx6ulsbcpro.dts   |   2 +-
 .../boot/dts/freescale/imx8mq-librem5.dtsi    |   4 +-
 19 files changed, 190 insertions(+), 9 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-common.yaml

-- 
2.17.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/8] dt-bindings: gpio: add common schema for GPIO controllers
  2020-09-16 16:22 [PATCH 0/8] gpio: add common dtschema Krzysztof Kozlowski
@ 2020-09-16 16:22 ` Krzysztof Kozlowski
  2020-09-16 16:22 ` [PATCH 2/8] dt-bindings: gpio: include common schema in " Krzysztof Kozlowski
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-16 16:22 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Rob Herring, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Manivannan Sadhasivam, Andy Gross, Bjorn Andersson,
	Palmer Dabbelt, Paul Walmsley, Masahiro Yamada, Chris Packham,
	Anson Huang, Sungbo Eo, Stefan Agner, Srinivas Kandagatla,
	Magnus Damm, Geert Uytterhoeven, Yash Shah, Paul Kocialkowski,
	linux-gpio, devicetree, linux-arm-kernel, linux-kernel,
	linux-unisoc, linux-arm-msm, linux-riscv
  Cc: Krzysztof Kozlowski

Convert parts of gpio.txt bindings into common dtschema file for GPIO
controllers.  The schema enforces proper naming of GPIO controller nodes
and GPIO hogs.

The schema should be included by specific GPIO controllers bindings.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 .../devicetree/bindings/gpio/gpio-common.yaml | 126 ++++++++++++++++++
 1 file changed, 126 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-common.yaml

diff --git a/Documentation/devicetree/bindings/gpio/gpio-common.yaml b/Documentation/devicetree/bindings/gpio/gpio-common.yaml
new file mode 100644
index 000000000000..d0974fcac659
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-common.yaml
@@ -0,0 +1,126 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/gpio-common.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Common GPIO controller properties
+
+maintainers:
+  - Krzysztof Kozlowski <krzk@kernel.org>
+  - Linus Walleij <linus.walleij@linaro.org>
+
+properties:
+  nodename:
+    pattern: "^(gpio-controller|gpio)(@[0-9a-f]+|-[0-9a-f]+)?$"
+
+  '#gpio-cells': true
+  gpio-controller: true
+  gpio-ranges: true
+
+  gpio-line-names:
+    description: |
+      Optionally, a GPIO controller may have a "gpio-line-names" property. This
+      is an array of strings defining the names of the GPIO lines going out of
+      the GPIO controller. This name should be the most meaningful producer
+      name for the system, such as a rail name indicating the usage. Package
+      names such as pin name are discouraged: such lines have opaque names
+      (since they are by definition generic purpose) and such names are usually
+      not very helpful.
+
+      For example "MMC-CD", "Red LED Vdd" and "ethernet reset" are reasonable
+      line names as they describe what the line is used for. "GPIO0" is not a
+      good name to give to a GPIO line.
+
+      Placeholders are discouraged: rather use the "" (blank string) if the use
+      of the GPIO line is undefined in your design. The names are assigned
+      starting from line offset 0 from left to right from the passed array. An
+      incomplete array (where the number of passed named are less than ngpios)
+      will still be used up until the last provided valid line index.
+
+  gpio-reserved-ranges:
+    description:
+      Indicates the start and size of the GPIOs that can't be used.
+
+  ngpios:
+    description: |
+      Optionally, a GPIO controller may have a "ngpios" property. This property
+      indicates the number of in-use slots of available slots for GPIOs. The
+      typical example is something like this: the hardware register is 32 bits
+      wide, but only 18 of the bits have a physical counterpart. The driver is
+      generally written so that all 32 bits can be used, but the IP block is
+      reused in a lot of designs, some using all 32 bits, some using 18 and
+      some using 12. In this case, setting "ngpios = <18>;" informs the driver
+      that only the first 18 GPIOs, at local offset 0 .. 17, are in use.
+
+      If these GPIOs do not happen to be the first N GPIOs at offset 0...N-1,
+      an additional set of tuples is needed to specify which GPIOs are
+      unusable, with the gpio-reserved-ranges binding.
+
+patternProperties:
+  "^(hog-[0-9]+|.+-hog(-[0-9]+)?)$":
+    type: object
+    description:
+      The GPIO chip may contain GPIO hog definitions. GPIO hogging is a mechanism
+      providing automatic GPIO request and configuration as part of the
+      gpio-controller's driver probe function.
+      Each GPIO hog definition is represented as a child node of the GPIO controller.
+
+    properties:
+      gpio-hog: true
+      gpios: true
+      input: true
+      output-high: true
+      output-low: true
+      line-name:
+        description:
+          The GPIO label name. If not present the node name is used.
+
+    required:
+      - gpio-hog
+      - gpios
+
+    oneOf:
+      - required:
+          - input
+      - required:
+          - output-high
+      - required:
+          - output-low
+
+    additionalProperties: false
+
+required:
+  - compatible
+  - "#gpio-cells"
+  - gpio-controller
+
+examples:
+  - |
+    gpio-controller@15000000 {
+        compatible = "foo";
+        reg = <0x15000000 0x1000>;
+        gpio-controller;
+        #gpio-cells = <2>;
+        ngpios = <18>;
+        gpio-reserved-ranges = <0 4>, <12 2>;
+        gpio-line-names = "MMC-CD", "MMC-WP", "VDD eth", "RST eth", "LED R",
+                          "LED G", "LED B", "Col A", "Col B", "Col C", "Col D",
+                          "Row A", "Row B", "Row C", "Row D", "NMI button",
+                          "poweroff", "reset";
+    };
+
+  - |
+    gpio-controller@1400 {
+        compatible = "fsl,qe-pario-bank-a", "fsl,qe-pario-bank";
+        reg = <0x1400 0x18>;
+        gpio-controller;
+        #gpio-cells = <2>;
+
+        line-b-hog {
+            gpio-hog;
+            gpios = <6 0>;
+            input;
+            line-name = "foo-bar-gpio";
+        };
+    };
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/8] dt-bindings: gpio: include common schema in GPIO controllers
  2020-09-16 16:22 [PATCH 0/8] gpio: add common dtschema Krzysztof Kozlowski
  2020-09-16 16:22 ` [PATCH 1/8] dt-bindings: gpio: add common schema for GPIO controllers Krzysztof Kozlowski
@ 2020-09-16 16:22 ` Krzysztof Kozlowski
  2020-09-17  6:40   ` Geert Uytterhoeven
  2020-09-17  7:14   ` Krzysztof Kozlowski
  2020-09-16 16:22 ` [PATCH 3/8] dt-bindings: gpio: pl061: add missing properties and include common schema Krzysztof Kozlowski
                   ` (6 subsequent siblings)
  8 siblings, 2 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-16 16:22 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Rob Herring, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Manivannan Sadhasivam, Andy Gross, Bjorn Andersson,
	Palmer Dabbelt, Paul Walmsley, Masahiro Yamada, Chris Packham,
	Anson Huang, Sungbo Eo, Stefan Agner, Srinivas Kandagatla,
	Magnus Damm, Geert Uytterhoeven, Yash Shah, Paul Kocialkowski,
	linux-gpio, devicetree, linux-arm-kernel, linux-kernel,
	linux-unisoc, linux-arm-msm, linux-riscv
  Cc: Krzysztof Kozlowski

Include the common GPIO schema in GPIO controllers to be sure all common
properties are properly validated.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 .../devicetree/bindings/gpio/brcm,xgs-iproc-gpio.yaml          | 3 +++
 Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml       | 3 +++
 Documentation/devicetree/bindings/gpio/gpio-mxs.yaml           | 3 +++
 Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml       | 3 +++
 Documentation/devicetree/bindings/gpio/gpio-rda.yaml           | 3 +++
 Documentation/devicetree/bindings/gpio/gpio-vf610.yaml         | 3 +++
 Documentation/devicetree/bindings/gpio/mrvl-gpio.yaml          | 1 +
 Documentation/devicetree/bindings/gpio/qcom,wcd934x-gpio.yaml  | 3 +++
 Documentation/devicetree/bindings/gpio/renesas,em-gio.yaml     | 3 +++
 Documentation/devicetree/bindings/gpio/renesas,rcar-gpio.yaml  | 3 +++
 Documentation/devicetree/bindings/gpio/sifive,gpio.yaml        | 3 +++
 .../devicetree/bindings/gpio/socionext,uniphier-gpio.yaml      | 3 +++
 Documentation/devicetree/bindings/gpio/xylon,logicvc-gpio.yaml | 3 +++
 13 files changed, 37 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpio/brcm,xgs-iproc-gpio.yaml b/Documentation/devicetree/bindings/gpio/brcm,xgs-iproc-gpio.yaml
index c213cb9ddb9f..1ac69b9c03f9 100644
--- a/Documentation/devicetree/bindings/gpio/brcm,xgs-iproc-gpio.yaml
+++ b/Documentation/devicetree/bindings/gpio/brcm,xgs-iproc-gpio.yaml
@@ -13,6 +13,9 @@ description: |
   This controller is the Chip Common A GPIO present on a number of Broadcom
   switch ASICs with integrated SoCs.
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     const: brcm,iproc-gpio-cca
diff --git a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml
index de0b9b5f6a70..737756e081fb 100644
--- a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml
+++ b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml
@@ -9,6 +9,9 @@ title: Freescale i.MX/MXC GPIO controller
 maintainers:
   - Anson Huang <Anson.Huang@nxp.com>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     oneOf:
diff --git a/Documentation/devicetree/bindings/gpio/gpio-mxs.yaml b/Documentation/devicetree/bindings/gpio/gpio-mxs.yaml
index dfa1133f8c5e..7fc04ab35044 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-mxs.yaml
+++ b/Documentation/devicetree/bindings/gpio/gpio-mxs.yaml
@@ -17,6 +17,9 @@ description: |
   GPIO ports share the same IO space with PIN controller, the GPIO node
   will be represented as sub-nodes of MXS pinctrl node.
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     enum:
diff --git a/Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml b/Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml
index 338c5312a106..69b12041c893 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml
+++ b/Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml
@@ -9,6 +9,9 @@ title: PCA9570 I2C GPO expander
 maintainers:
   - Sungbo Eo <mans0n@gorani.run>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     enum:
diff --git a/Documentation/devicetree/bindings/gpio/gpio-rda.yaml b/Documentation/devicetree/bindings/gpio/gpio-rda.yaml
index 6ece555f074f..d70c99f463c2 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-rda.yaml
+++ b/Documentation/devicetree/bindings/gpio/gpio-rda.yaml
@@ -9,6 +9,9 @@ title: RDA Micro GPIO controller
 maintainers:
   - Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     const: rda,8810pl-gpio
diff --git a/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml b/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
index 6ac5a78ad3da..82f3e4b407d1 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
+++ b/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
@@ -17,6 +17,9 @@ description: |
   Note: Each GPIO port should have an alias correctly numbered in "aliases"
   node.
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     enum:
diff --git a/Documentation/devicetree/bindings/gpio/mrvl-gpio.yaml b/Documentation/devicetree/bindings/gpio/mrvl-gpio.yaml
index 4db3b8a3332c..e2b7d2d133a8 100644
--- a/Documentation/devicetree/bindings/gpio/mrvl-gpio.yaml
+++ b/Documentation/devicetree/bindings/gpio/mrvl-gpio.yaml
@@ -12,6 +12,7 @@ maintainers:
   - Rob Herring <robh+dt@kernel.org>
 
 allOf:
+  - $ref: gpio-common.yaml#
   - if:
       properties:
         compatible:
diff --git a/Documentation/devicetree/bindings/gpio/qcom,wcd934x-gpio.yaml b/Documentation/devicetree/bindings/gpio/qcom,wcd934x-gpio.yaml
index 32a566ec3558..2eee374e8396 100644
--- a/Documentation/devicetree/bindings/gpio/qcom,wcd934x-gpio.yaml
+++ b/Documentation/devicetree/bindings/gpio/qcom,wcd934x-gpio.yaml
@@ -13,6 +13,9 @@ description: |
   Qualcomm Technologies Inc WCD9340/WCD9341 Audio Codec has integrated
   gpio controller to control 5 gpios on the chip.
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     enum:
diff --git a/Documentation/devicetree/bindings/gpio/renesas,em-gio.yaml b/Documentation/devicetree/bindings/gpio/renesas,em-gio.yaml
index 8bdef812c87c..845689807678 100644
--- a/Documentation/devicetree/bindings/gpio/renesas,em-gio.yaml
+++ b/Documentation/devicetree/bindings/gpio/renesas,em-gio.yaml
@@ -9,6 +9,9 @@ title: Renesas EMMA Mobile General Purpose I/O Interface
 maintainers:
   - Magnus Damm <magnus.damm@gmail.com>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     const: renesas,em-gio
diff --git a/Documentation/devicetree/bindings/gpio/renesas,rcar-gpio.yaml b/Documentation/devicetree/bindings/gpio/renesas,rcar-gpio.yaml
index 5026662e4508..c116000d579f 100644
--- a/Documentation/devicetree/bindings/gpio/renesas,rcar-gpio.yaml
+++ b/Documentation/devicetree/bindings/gpio/renesas,rcar-gpio.yaml
@@ -9,6 +9,9 @@ title: Renesas R-Car General-Purpose Input/Output Ports (GPIO)
 maintainers:
   - Geert Uytterhoeven <geert+renesas@glider.be>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     oneOf:
diff --git a/Documentation/devicetree/bindings/gpio/sifive,gpio.yaml b/Documentation/devicetree/bindings/gpio/sifive,gpio.yaml
index a0efd8dc2538..f2d93b40fc7e 100644
--- a/Documentation/devicetree/bindings/gpio/sifive,gpio.yaml
+++ b/Documentation/devicetree/bindings/gpio/sifive,gpio.yaml
@@ -10,6 +10,9 @@ maintainers:
   - Yash Shah <yash.shah@sifive.com>
   - Paul Walmsley <paul.walmsley@sifive.com>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     items:
diff --git a/Documentation/devicetree/bindings/gpio/socionext,uniphier-gpio.yaml b/Documentation/devicetree/bindings/gpio/socionext,uniphier-gpio.yaml
index c58ff9a94f45..94a911e9c313 100644
--- a/Documentation/devicetree/bindings/gpio/socionext,uniphier-gpio.yaml
+++ b/Documentation/devicetree/bindings/gpio/socionext,uniphier-gpio.yaml
@@ -9,6 +9,9 @@ title: UniPhier GPIO controller
 maintainers:
   - Masahiro Yamada <yamada.masahiro@socionext.com>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   $nodename:
     pattern: "^gpio@[0-9a-f]+$"
diff --git a/Documentation/devicetree/bindings/gpio/xylon,logicvc-gpio.yaml b/Documentation/devicetree/bindings/gpio/xylon,logicvc-gpio.yaml
index a36aec27069c..0e4581241b3f 100644
--- a/Documentation/devicetree/bindings/gpio/xylon,logicvc-gpio.yaml
+++ b/Documentation/devicetree/bindings/gpio/xylon,logicvc-gpio.yaml
@@ -23,6 +23,9 @@ description: |
   - EN_VEE (power control) mapped to index 7
   - V_EN (power control) mapped to index 8
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   $nodename:
     pattern: "^gpio@[0-9a-f]+$"
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 3/8] dt-bindings: gpio: pl061: add missing properties and include common schema
  2020-09-16 16:22 [PATCH 0/8] gpio: add common dtschema Krzysztof Kozlowski
  2020-09-16 16:22 ` [PATCH 1/8] dt-bindings: gpio: add common schema for GPIO controllers Krzysztof Kozlowski
  2020-09-16 16:22 ` [PATCH 2/8] dt-bindings: gpio: include common schema in " Krzysztof Kozlowski
@ 2020-09-16 16:22 ` Krzysztof Kozlowski
  2020-09-16 16:22 ` [PATCH 4/8] dt-bindings: gpio: fsl-imx-gpio: add i.MX ARMv6 and ARMv7 compatibles Krzysztof Kozlowski
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-16 16:22 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Rob Herring, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Manivannan Sadhasivam, Andy Gross, Bjorn Andersson,
	Palmer Dabbelt, Paul Walmsley, Masahiro Yamada, Chris Packham,
	Anson Huang, Sungbo Eo, Stefan Agner, Srinivas Kandagatla,
	Magnus Damm, Geert Uytterhoeven, Yash Shah, Paul Kocialkowski,
	linux-gpio, devicetree, linux-arm-kernel, linux-kernel,
	linux-unisoc, linux-arm-msm, linux-riscv
  Cc: Krzysztof Kozlowski

Describe all GPIO controller properties and include the common GPIO
schema to be sure all common properties are properly validated.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 Documentation/devicetree/bindings/gpio/pl061-gpio.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml b/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml
index 313b17229247..6cbf10d8e120 100644
--- a/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml
+++ b/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml
@@ -19,6 +19,9 @@ select:
   required:
     - compatible
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   $nodename:
     pattern: "^gpio@[0-9a-f]+$"
@@ -51,7 +54,10 @@ properties:
 
   gpio-controller: true
 
+  gpio-line-names: true
+
   gpio-ranges:
+    minItems: 1
     maxItems: 8
 
 required:
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 4/8] dt-bindings: gpio: fsl-imx-gpio: add i.MX ARMv6 and ARMv7 compatibles
  2020-09-16 16:22 [PATCH 0/8] gpio: add common dtschema Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2020-09-16 16:22 ` [PATCH 3/8] dt-bindings: gpio: pl061: add missing properties and include common schema Krzysztof Kozlowski
@ 2020-09-16 16:22 ` Krzysztof Kozlowski
  2020-09-16 16:22 ` [PATCH 5/8] dt-bindings: gpio: fsl-imx-gpio: add gpio-line-names Krzysztof Kozlowski
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-16 16:22 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Rob Herring, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Manivannan Sadhasivam, Andy Gross, Bjorn Andersson,
	Palmer Dabbelt, Paul Walmsley, Masahiro Yamada, Chris Packham,
	Anson Huang, Sungbo Eo, Stefan Agner, Srinivas Kandagatla,
	Magnus Damm, Geert Uytterhoeven, Yash Shah, Paul Kocialkowski,
	linux-gpio, devicetree, linux-arm-kernel, linux-kernel,
	linux-unisoc, linux-arm-msm, linux-riscv
  Cc: Krzysztof Kozlowski

Several DTSes with ARMv6 and ARMv7 i.MX SoCs introduce their own
compatibles so add them to fix dtbs_check warnings like:

  arch/arm/boot/dts/imx35-pdk.dt.yaml: gpio@53fa4000:
    compatible: ['fsl,imx35-gpio', 'fsl,imx31-gpio'] is not valid under any of the given schemas

  arch/arm/boot/dts/imx51-babbage.dt.yaml: gpio@73f90000:
    compatible: ['fsl,imx51-gpio', 'fsl,imx35-gpio'] is not valid under any of the given schemas

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 .../devicetree/bindings/gpio/fsl-imx-gpio.yaml       | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml
index 737756e081fb..ad761e2f380a 100644
--- a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml
+++ b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml
@@ -21,8 +21,20 @@ properties:
           - fsl,imx31-gpio
           - fsl,imx35-gpio
           - fsl,imx7d-gpio
+      - items:
+          - const: fsl,imx35-gpio
+          - const: fsl,imx31-gpio
       - items:
           - enum:
+              - fsl,imx50-gpio
+              - fsl,imx51-gpio
+              - fsl,imx53-gpio
+              - fsl,imx6q-gpio
+              - fsl,imx6sl-gpio
+              - fsl,imx6sll-gpio
+              - fsl,imx6sx-gpio
+              - fsl,imx6ul-gpio
+              - fsl,imx7d-gpio
               - fsl,imx8mm-gpio
               - fsl,imx8mn-gpio
               - fsl,imx8mp-gpio
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 5/8] dt-bindings: gpio: fsl-imx-gpio: add gpio-line-names
  2020-09-16 16:22 [PATCH 0/8] gpio: add common dtschema Krzysztof Kozlowski
                   ` (3 preceding siblings ...)
  2020-09-16 16:22 ` [PATCH 4/8] dt-bindings: gpio: fsl-imx-gpio: add i.MX ARMv6 and ARMv7 compatibles Krzysztof Kozlowski
@ 2020-09-16 16:22 ` Krzysztof Kozlowski
  2020-09-16 16:22 ` [PATCH 6/8] arm64: dts: imx8mq-librem5: correct GPIO hog property Krzysztof Kozlowski
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-16 16:22 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Rob Herring, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Manivannan Sadhasivam, Andy Gross, Bjorn Andersson,
	Palmer Dabbelt, Paul Walmsley, Masahiro Yamada, Chris Packham,
	Anson Huang, Sungbo Eo, Stefan Agner, Srinivas Kandagatla,
	Magnus Damm, Geert Uytterhoeven, Yash Shah, Paul Kocialkowski,
	linux-gpio, devicetree, linux-arm-kernel, linux-kernel,
	linux-unisoc, linux-arm-msm, linux-riscv
  Cc: Krzysztof Kozlowski

Describe common "gpio-line-names" property to fix dtbs_check warnings
like:

  arch/arm/boot/dts/imx53-m53menlo.dt.yaml: gpio@53f84000:
    'gpio-line-names' does not match any of the regexes: '^(hog-[0-9]+|.+-hog(-[0-9]+)?)$', 'pinctrl-[0-9]+'

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml
index ad761e2f380a..347f059d347a 100644
--- a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml
+++ b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml
@@ -65,7 +65,7 @@ properties:
     const: 2
 
   gpio-controller: true
-
+  gpio-line-names: true
   gpio-ranges: true
 
   power-domains:
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 6/8] arm64: dts: imx8mq-librem5: correct GPIO hog property
  2020-09-16 16:22 [PATCH 0/8] gpio: add common dtschema Krzysztof Kozlowski
                   ` (4 preceding siblings ...)
  2020-09-16 16:22 ` [PATCH 5/8] dt-bindings: gpio: fsl-imx-gpio: add gpio-line-names Krzysztof Kozlowski
@ 2020-09-16 16:22 ` Krzysztof Kozlowski
  2020-09-16 16:22 ` [PATCH 7/8] arm64: dts: imx8mq-librem5: align GPIO hog names with dtschema Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-16 16:22 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Rob Herring, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Manivannan Sadhasivam, Andy Gross, Bjorn Andersson,
	Palmer Dabbelt, Paul Walmsley, Masahiro Yamada, Chris Packham,
	Anson Huang, Sungbo Eo, Stefan Agner, Srinivas Kandagatla,
	Magnus Damm, Geert Uytterhoeven, Yash Shah, Paul Kocialkowski,
	linux-gpio, devicetree, linux-arm-kernel, linux-kernel,
	linux-unisoc, linux-arm-msm, linux-riscv
  Cc: Krzysztof Kozlowski

Correct the name of property for GPIO specifier in GPIO hog.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
index 56295dd2fa8f..e4dedcb58f76 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
@@ -251,7 +251,7 @@
 
 	pmic-5v {
 		gpio-hog;
-		gpio = <&gpio1 1 GPIO_ACTIVE_HIGH>;
+		gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
 		input;
 	};
 };
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 7/8] arm64: dts: imx8mq-librem5: align GPIO hog names with dtschema
  2020-09-16 16:22 [PATCH 0/8] gpio: add common dtschema Krzysztof Kozlowski
                   ` (5 preceding siblings ...)
  2020-09-16 16:22 ` [PATCH 6/8] arm64: dts: imx8mq-librem5: correct GPIO hog property Krzysztof Kozlowski
@ 2020-09-16 16:22 ` Krzysztof Kozlowski
  2020-09-16 16:22 ` [PATCH 8/8] ARM: dts: imx: " Krzysztof Kozlowski
  2020-09-29 11:56 ` [PATCH 0/8] gpio: add common dtschema Linus Walleij
  8 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-16 16:22 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Rob Herring, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Manivannan Sadhasivam, Andy Gross, Bjorn Andersson,
	Palmer Dabbelt, Paul Walmsley, Masahiro Yamada, Chris Packham,
	Anson Huang, Sungbo Eo, Stefan Agner, Srinivas Kandagatla,
	Magnus Damm, Geert Uytterhoeven, Yash Shah, Paul Kocialkowski,
	linux-gpio, devicetree, linux-arm-kernel, linux-kernel,
	linux-unisoc, linux-arm-msm, linux-riscv
  Cc: Krzysztof Kozlowski

dtschema expects GPIO hogs to end with 'hog' prefix.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
index e4dedcb58f76..6cbcee2fb938 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
@@ -249,7 +249,7 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_pmic_5v>;
 
-	pmic-5v {
+	pmic-5v-hog {
 		gpio-hog;
 		gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
 		input;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 8/8] ARM: dts: imx: align GPIO hog names with dtschema
  2020-09-16 16:22 [PATCH 0/8] gpio: add common dtschema Krzysztof Kozlowski
                   ` (6 preceding siblings ...)
  2020-09-16 16:22 ` [PATCH 7/8] arm64: dts: imx8mq-librem5: align GPIO hog names with dtschema Krzysztof Kozlowski
@ 2020-09-16 16:22 ` Krzysztof Kozlowski
  2020-09-17  7:19   ` Jonathan Neuschäfer
  2020-09-29 11:56 ` [PATCH 0/8] gpio: add common dtschema Linus Walleij
  8 siblings, 1 reply; 16+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-16 16:22 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Rob Herring, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Manivannan Sadhasivam, Andy Gross, Bjorn Andersson,
	Palmer Dabbelt, Paul Walmsley, Masahiro Yamada, Chris Packham,
	Anson Huang, Sungbo Eo, Stefan Agner, Srinivas Kandagatla,
	Magnus Damm, Geert Uytterhoeven, Yash Shah, Paul Kocialkowski,
	linux-gpio, devicetree, linux-arm-kernel, linux-kernel,
	linux-unisoc, linux-arm-msm, linux-riscv
  Cc: Krzysztof Kozlowski

dtschema for GPIO controllers expects GPIO hogs to end with 'hog'
prefix.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 arch/arm/boot/dts/imx51-zii-rdu1.dts        | 2 +-
 arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi     | 8 ++++----
 arch/arm/boot/dts/imx6ul-ccimx6ulsbcpro.dts | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/boot/dts/imx51-zii-rdu1.dts b/arch/arm/boot/dts/imx51-zii-rdu1.dts
index e559ab0c3645..ec8ca3ac2c1c 100644
--- a/arch/arm/boot/dts/imx51-zii-rdu1.dts
+++ b/arch/arm/boot/dts/imx51-zii-rdu1.dts
@@ -451,7 +451,7 @@
 			  "", "", "", "",
 			  "", "", "", "";
 
-	unused-sd3-wp-gpio {
+	unused-sd3-wp-hog {
 		/*
 		 * See pinctrl_esdhc1 below for more details on this
 		 */
diff --git a/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi b/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
index 66b15748e287..c0a76202e16b 100644
--- a/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
@@ -330,28 +330,28 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpio3_hog>;
 
-	usb-emulation {
+	usb-emulation-hog {
 		gpio-hog;
 		gpios = <19 GPIO_ACTIVE_HIGH>;
 		output-low;
 		line-name = "usb-emulation";
 	};
 
-	usb-mode1 {
+	usb-mode1-hog {
 		gpio-hog;
 		gpios = <20 GPIO_ACTIVE_HIGH>;
 		output-high;
 		line-name = "usb-mode1";
 	};
 
-	usb-pwr {
+	usb-pwr-hog {
 		gpio-hog;
 		gpios = <22 GPIO_ACTIVE_LOW>;
 		output-high;
 		line-name = "usb-pwr-ctrl-en-n";
 	};
 
-	usb-mode2 {
+	usb-mode2-hog {
 		gpio-hog;
 		gpios = <23 GPIO_ACTIVE_HIGH>;
 		output-high;
diff --git a/arch/arm/boot/dts/imx6ul-ccimx6ulsbcpro.dts b/arch/arm/boot/dts/imx6ul-ccimx6ulsbcpro.dts
index a0bbec57ddc7..3ec042bfccba 100644
--- a/arch/arm/boot/dts/imx6ul-ccimx6ulsbcpro.dts
+++ b/arch/arm/boot/dts/imx6ul-ccimx6ulsbcpro.dts
@@ -110,7 +110,7 @@
 };
 
 &gpio5 {
-	emmc-usd-mux {
+	emmc-usd-mux-hog {
 		gpio-hog;
 		gpios = <1 GPIO_ACTIVE_LOW>;
 		output-high;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/8] dt-bindings: gpio: include common schema in GPIO controllers
  2020-09-16 16:22 ` [PATCH 2/8] dt-bindings: gpio: include common schema in " Krzysztof Kozlowski
@ 2020-09-17  6:40   ` Geert Uytterhoeven
  2020-09-17  6:58     ` Krzysztof Kozlowski
  2020-09-17  7:14   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 16+ messages in thread
From: Geert Uytterhoeven @ 2020-09-17  6:40 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Manivannan Sadhasivam, Andy Gross, Bjorn Andersson,
	Palmer Dabbelt, Paul Walmsley, Masahiro Yamada, Chris Packham,
	Anson Huang, Sungbo Eo, Stefan Agner, Srinivas Kandagatla,
	Magnus Damm, Geert Uytterhoeven, Yash Shah, Paul Kocialkowski,
	open list:GPIO SUBSYSTEM,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux ARM, Linux Kernel Mailing List, linux-unisoc,
	linux-arm-msm, linux-riscv

Hi Krzysztof,

On Wed, Sep 16, 2020 at 6:23 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> Include the common GPIO schema in GPIO controllers to be sure all common
> properties are properly validated.
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

Thanks for your patch!

> ---
>  .../devicetree/bindings/gpio/brcm,xgs-iproc-gpio.yaml          | 3 +++
>  Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml       | 3 +++
>  Documentation/devicetree/bindings/gpio/gpio-mxs.yaml           | 3 +++
>  Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml       | 3 +++
>  Documentation/devicetree/bindings/gpio/gpio-rda.yaml           | 3 +++
>  Documentation/devicetree/bindings/gpio/gpio-vf610.yaml         | 3 +++
>  Documentation/devicetree/bindings/gpio/mrvl-gpio.yaml          | 1 +
>  Documentation/devicetree/bindings/gpio/qcom,wcd934x-gpio.yaml  | 3 +++
>  Documentation/devicetree/bindings/gpio/renesas,em-gio.yaml     | 3 +++
>  Documentation/devicetree/bindings/gpio/renesas,rcar-gpio.yaml  | 3 +++
>  Documentation/devicetree/bindings/gpio/sifive,gpio.yaml        | 3 +++
>  .../devicetree/bindings/gpio/socionext,uniphier-gpio.yaml      | 3 +++
>  Documentation/devicetree/bindings/gpio/xylon,logicvc-gpio.yaml | 3 +++
>  13 files changed, 37 insertions(+)

There are more binding files describing GPIO controllers outside the
Documentation/devicetree/bindings/gpio/ subdirectory, cfr.
'git grep gpio-controller:.true -- "Doc*yaml"'

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/8] dt-bindings: gpio: include common schema in GPIO controllers
  2020-09-17  6:40   ` Geert Uytterhoeven
@ 2020-09-17  6:58     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-17  6:58 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Manivannan Sadhasivam, Andy Gross, Bjorn Andersson,
	Palmer Dabbelt, Paul Walmsley, Masahiro Yamada, Chris Packham,
	Anson Huang, Sungbo Eo, Stefan Agner, Srinivas Kandagatla,
	Magnus Damm, Geert Uytterhoeven, Yash Shah, Paul Kocialkowski,
	open list:GPIO SUBSYSTEM,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux ARM, Linux Kernel Mailing List, linux-unisoc,
	linux-arm-msm, linux-riscv

On Thu, 17 Sep 2020 at 08:40, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Krzysztof,
>
> On Wed, Sep 16, 2020 at 6:23 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> > Include the common GPIO schema in GPIO controllers to be sure all common
> > properties are properly validated.
> >
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
>
> Thanks for your patch!
>
> > ---
> >  .../devicetree/bindings/gpio/brcm,xgs-iproc-gpio.yaml          | 3 +++
> >  Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml       | 3 +++
> >  Documentation/devicetree/bindings/gpio/gpio-mxs.yaml           | 3 +++
> >  Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml       | 3 +++
> >  Documentation/devicetree/bindings/gpio/gpio-rda.yaml           | 3 +++
> >  Documentation/devicetree/bindings/gpio/gpio-vf610.yaml         | 3 +++
> >  Documentation/devicetree/bindings/gpio/mrvl-gpio.yaml          | 1 +
> >  Documentation/devicetree/bindings/gpio/qcom,wcd934x-gpio.yaml  | 3 +++
> >  Documentation/devicetree/bindings/gpio/renesas,em-gio.yaml     | 3 +++
> >  Documentation/devicetree/bindings/gpio/renesas,rcar-gpio.yaml  | 3 +++
> >  Documentation/devicetree/bindings/gpio/sifive,gpio.yaml        | 3 +++
> >  .../devicetree/bindings/gpio/socionext,uniphier-gpio.yaml      | 3 +++
> >  Documentation/devicetree/bindings/gpio/xylon,logicvc-gpio.yaml | 3 +++
> >  13 files changed, 37 insertions(+)
>
> There are more binding files describing GPIO controllers outside the
> Documentation/devicetree/bindings/gpio/ subdirectory, cfr.
> 'git grep gpio-controller:.true -- "Doc*yaml"'

Oh, indeed. Thanks for spotting these. I will check them and send a follow up.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/8] dt-bindings: gpio: include common schema in GPIO controllers
  2020-09-16 16:22 ` [PATCH 2/8] dt-bindings: gpio: include common schema in " Krzysztof Kozlowski
  2020-09-17  6:40   ` Geert Uytterhoeven
@ 2020-09-17  7:14   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-17  7:14 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Rob Herring, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Manivannan Sadhasivam, Andy Gross, Bjorn Andersson,
	Palmer Dabbelt, Paul Walmsley, Masahiro Yamada, Chris Packham,
	Anson Huang, Sungbo Eo, Stefan Agner, Srinivas Kandagatla,
	Magnus Damm, Geert Uytterhoeven, Yash Shah, Paul Kocialkowski,
	linux-gpio, devicetree, linux-arm-kernel, linux-kernel,
	linux-unisoc, linux-arm-msm, linux-riscv

On Wed, Sep 16, 2020 at 06:22:44PM +0200, Krzysztof Kozlowski wrote:
> Include the common GPIO schema in GPIO controllers to be sure all common
> properties are properly validated.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  .../devicetree/bindings/gpio/brcm,xgs-iproc-gpio.yaml          | 3 +++
>  Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml       | 3 +++
>  Documentation/devicetree/bindings/gpio/gpio-mxs.yaml           | 3 +++
>  Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml       | 3 +++
>  Documentation/devicetree/bindings/gpio/gpio-rda.yaml           | 3 +++
>  Documentation/devicetree/bindings/gpio/gpio-vf610.yaml         | 3 +++
>  Documentation/devicetree/bindings/gpio/mrvl-gpio.yaml          | 1 +
>  Documentation/devicetree/bindings/gpio/qcom,wcd934x-gpio.yaml  | 3 +++
>  Documentation/devicetree/bindings/gpio/renesas,em-gio.yaml     | 3 +++
>  Documentation/devicetree/bindings/gpio/renesas,rcar-gpio.yaml  | 3 +++
>  Documentation/devicetree/bindings/gpio/sifive,gpio.yaml        | 3 +++
>  .../devicetree/bindings/gpio/socionext,uniphier-gpio.yaml      | 3 +++
>  Documentation/devicetree/bindings/gpio/xylon,logicvc-gpio.yaml | 3 +++
>  13 files changed, 37 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/gpio/brcm,xgs-iproc-gpio.yaml b/Documentation/devicetree/bindings/gpio/brcm,xgs-iproc-gpio.yaml
> index c213cb9ddb9f..1ac69b9c03f9 100644
> --- a/Documentation/devicetree/bindings/gpio/brcm,xgs-iproc-gpio.yaml
> +++ b/Documentation/devicetree/bindings/gpio/brcm,xgs-iproc-gpio.yaml
> @@ -13,6 +13,9 @@ description: |
>    This controller is the Chip Common A GPIO present on a number of Broadcom
>    switch ASICs with integrated SoCs.
>  
> +allOf:
> +  - $ref: gpio-common.yaml#
> +
>  properties:
>    compatible:
>      const: brcm,iproc-gpio-cca
> diff --git a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml
> index de0b9b5f6a70..737756e081fb 100644
> --- a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml
> +++ b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml
> @@ -9,6 +9,9 @@ title: Freescale i.MX/MXC GPIO controller
>  maintainers:
>    - Anson Huang <Anson.Huang@nxp.com>
>  
> +allOf:
> +  - $ref: gpio-common.yaml#
> +
>  properties:
>    compatible:
>      oneOf:
> diff --git a/Documentation/devicetree/bindings/gpio/gpio-mxs.yaml b/Documentation/devicetree/bindings/gpio/gpio-mxs.yaml
> index dfa1133f8c5e..7fc04ab35044 100644
> --- a/Documentation/devicetree/bindings/gpio/gpio-mxs.yaml
> +++ b/Documentation/devicetree/bindings/gpio/gpio-mxs.yaml
> @@ -17,6 +17,9 @@ description: |
>    GPIO ports share the same IO space with PIN controller, the GPIO node
>    will be represented as sub-nodes of MXS pinctrl node.
>  
> +allOf:
> +  - $ref: gpio-common.yaml#
> +

I found something to fix - this one should go under patternProperties,
not here.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 8/8] ARM: dts: imx: align GPIO hog names with dtschema
  2020-09-16 16:22 ` [PATCH 8/8] ARM: dts: imx: " Krzysztof Kozlowski
@ 2020-09-17  7:19   ` Jonathan Neuschäfer
  2020-09-17  7:26     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 16+ messages in thread
From: Jonathan Neuschäfer @ 2020-09-17  7:19 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Manivannan Sadhasivam, Andy Gross, Bjorn Andersson,
	Palmer Dabbelt, Paul Walmsley, Masahiro Yamada, Chris Packham,
	Anson Huang, Sungbo Eo, Stefan Agner, Srinivas Kandagatla,
	Magnus Damm, Geert Uytterhoeven, Yash Shah, Paul Kocialkowski,
	linux-gpio, devicetree, linux-arm-kernel, linux-kernel,
	linux-unisoc, linux-arm-msm, linux-riscv

[-- Attachment #1: Type: text/plain, Size: 227 bytes --]

On Wed, Sep 16, 2020 at 06:22:50PM +0200, Krzysztof Kozlowski wrote:
> dtschema for GPIO controllers expects GPIO hogs to end with 'hog'
> prefix.

Nit: It's a suffix if it's at the end.


Thanks,
Jonathan Neuschäfer

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 8/8] ARM: dts: imx: align GPIO hog names with dtschema
  2020-09-17  7:19   ` Jonathan Neuschäfer
@ 2020-09-17  7:26     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-17  7:26 UTC (permalink / raw)
  To: Jonathan Neuschäfer
  Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Manivannan Sadhasivam, Andy Gross, Bjorn Andersson,
	Palmer Dabbelt, Paul Walmsley, Masahiro Yamada, Chris Packham,
	Anson Huang, Sungbo Eo, Stefan Agner, Srinivas Kandagatla,
	Magnus Damm, Geert Uytterhoeven, Yash Shah, Paul Kocialkowski,
	linux-gpio, devicetree, linux-arm-kernel, linux-kernel,
	linux-unisoc, linux-arm-msm, linux-riscv

On Thu, 17 Sep 2020 at 09:20, Jonathan Neuschäfer <j.neuschaefer@gmx.net> wrote:
>
> On Wed, Sep 16, 2020 at 06:22:50PM +0200, Krzysztof Kozlowski wrote:
> > dtschema for GPIO controllers expects GPIO hogs to end with 'hog'
> > prefix.
>
> Nit: It's a suffix if it's at the end.

Right, I'll fix the message. Thanks for spotting this.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 0/8] gpio: add common dtschema
  2020-09-16 16:22 [PATCH 0/8] gpio: add common dtschema Krzysztof Kozlowski
                   ` (7 preceding siblings ...)
  2020-09-16 16:22 ` [PATCH 8/8] ARM: dts: imx: " Krzysztof Kozlowski
@ 2020-09-29 11:56 ` Linus Walleij
  2020-09-29 12:38   ` Krzysztof Kozlowski
  8 siblings, 1 reply; 16+ messages in thread
From: Linus Walleij @ 2020-09-29 11:56 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Bartosz Golaszewski, Rob Herring, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Manivannan Sadhasivam, Andy Gross, Bjorn Andersson,
	Palmer Dabbelt, Paul Walmsley, Masahiro Yamada, Chris Packham,
	Anson Huang, Sungbo Eo, Stefan Agner, Srinivas Kandagatla,
	Magnus Damm, Geert Uytterhoeven, Yash Shah, Paul Kocialkowski,
	open list:GPIO SUBSYSTEM,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux ARM, linux-kernel, linux-unisoc, MSM, linux-riscv

On Wed, Sep 16, 2020 at 6:23 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:

> This is independent work of pca953x bindings:
> https://lore.kernel.org/lkml/20200916155715.21009-1-krzk@kernel.org/T/#u
>
> The DTS patches can be also applied independently.

I'm a big fan of this patch series and hope for a v2 soon
so I can apply them.

If you do not foresee any conflicts in the DTS files I can
apply also these, else you can apply them in the i.MX DTS
tree (wherever that is) or I can provide an immutable
branch, whichever you like!

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 0/8] gpio: add common dtschema
  2020-09-29 11:56 ` [PATCH 0/8] gpio: add common dtschema Linus Walleij
@ 2020-09-29 12:38   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-29 12:38 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Bartosz Golaszewski, Rob Herring, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Manivannan Sadhasivam, Andy Gross, Bjorn Andersson,
	Palmer Dabbelt, Paul Walmsley, Masahiro Yamada, Chris Packham,
	Anson Huang, Sungbo Eo, Stefan Agner, Srinivas Kandagatla,
	Magnus Damm, Geert Uytterhoeven, Yash Shah, Paul Kocialkowski,
	open list:GPIO SUBSYSTEM,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux ARM, linux-kernel, linux-unisoc, MSM, linux-riscv

On Tue, Sep 29, 2020 at 01:56:42PM +0200, Linus Walleij wrote:
> On Wed, Sep 16, 2020 at 6:23 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> 
> > This is independent work of pca953x bindings:
> > https://lore.kernel.org/lkml/20200916155715.21009-1-krzk@kernel.org/T/#u
> >
> > The DTS patches can be also applied independently.
> 
> I'm a big fan of this patch series and hope for a v2 soon
> so I can apply them.

I sent the dt-bindings part of it already to dtschema and it was
applied.  It's missing the description of properties due to licensing
but at least it brings the hog nodes validation.

> 
> If you do not foresee any conflicts in the DTS files I can
> apply also these, else you can apply them in the i.MX DTS
> tree (wherever that is) or I can provide an immutable
> branch, whichever you like!

Thanks! I resent already the DTS in separate patchset and most of them
went in.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-09-29 12:38 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16 16:22 [PATCH 0/8] gpio: add common dtschema Krzysztof Kozlowski
2020-09-16 16:22 ` [PATCH 1/8] dt-bindings: gpio: add common schema for GPIO controllers Krzysztof Kozlowski
2020-09-16 16:22 ` [PATCH 2/8] dt-bindings: gpio: include common schema in " Krzysztof Kozlowski
2020-09-17  6:40   ` Geert Uytterhoeven
2020-09-17  6:58     ` Krzysztof Kozlowski
2020-09-17  7:14   ` Krzysztof Kozlowski
2020-09-16 16:22 ` [PATCH 3/8] dt-bindings: gpio: pl061: add missing properties and include common schema Krzysztof Kozlowski
2020-09-16 16:22 ` [PATCH 4/8] dt-bindings: gpio: fsl-imx-gpio: add i.MX ARMv6 and ARMv7 compatibles Krzysztof Kozlowski
2020-09-16 16:22 ` [PATCH 5/8] dt-bindings: gpio: fsl-imx-gpio: add gpio-line-names Krzysztof Kozlowski
2020-09-16 16:22 ` [PATCH 6/8] arm64: dts: imx8mq-librem5: correct GPIO hog property Krzysztof Kozlowski
2020-09-16 16:22 ` [PATCH 7/8] arm64: dts: imx8mq-librem5: align GPIO hog names with dtschema Krzysztof Kozlowski
2020-09-16 16:22 ` [PATCH 8/8] ARM: dts: imx: " Krzysztof Kozlowski
2020-09-17  7:19   ` Jonathan Neuschäfer
2020-09-17  7:26     ` Krzysztof Kozlowski
2020-09-29 11:56 ` [PATCH 0/8] gpio: add common dtschema Linus Walleij
2020-09-29 12:38   ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).