Skip to contentSkip to conversation

gpio: add common dtschema

PATCH Superseded Krzysztof Kozlowski 4 participants 16 messages Sep 16, 2020 – Sep 29, 2020

Subsystems (10)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover gpio: add common dtschema

Hi,

This is independent work of pca953x bindings:
https://lore.kernel.org/lkml/[email protected]/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
Signature · 7 lines
2.17.1


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
#1 lore raw

PATCH 1/8 dt-bindings: gpio: add common schema for GPIO controllers

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.

---
 .../devicetree/bindings/gpio/gpio-common.yaml | 126 ++++++++++++++++++
 1 file changed, 126 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-common.yaml
Documentation/devicetree/bindings/gpio/gpio-common.yaml new file +126 -0
new file mode 100644
index 000000000000..d0974fcac659
@@ -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 <[email protected]>
+  - Linus Walleij <[email protected]>
+
+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";
+        };
+    };
Signature · 7 lines
2.17.1


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
#2 lore raw

PATCH 2/8 dt-bindings: gpio: include common schema in GPIO controllers

In reply to Krzysztof Kozlowski

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

---
 .../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(+)
Documentation/devicetree/bindings/gpio/brcm,xgs-iproc-gpio.yaml +3 -0
index c213cb9ddb9f..1ac69b9c03f9 100644
@@ -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
Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml +3 -0
index de0b9b5f6a70..737756e081fb 100644
@@ -9,6 +9,9 @@ title: Freescale i.MX/MXC GPIO controller
 maintainers:
   - Anson Huang <[email protected]>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     oneOf:
Documentation/devicetree/bindings/gpio/gpio-mxs.yaml +3 -0
index dfa1133f8c5e..7fc04ab35044 100644
@@ -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:
Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml +3 -0
index 338c5312a106..69b12041c893 100644
@@ -9,6 +9,9 @@ title: PCA9570 I2C GPO expander
 maintainers:
   - Sungbo Eo <[email protected]>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     enum:
Documentation/devicetree/bindings/gpio/gpio-rda.yaml +3 -0
index 6ece555f074f..d70c99f463c2 100644
@@ -9,6 +9,9 @@ title: RDA Micro GPIO controller
 maintainers:
   - Manivannan Sadhasivam <[email protected]>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     const: rda,8810pl-gpio
Documentation/devicetree/bindings/gpio/gpio-vf610.yaml +3 -0
index 6ac5a78ad3da..82f3e4b407d1 100644
@@ -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:
Documentation/devicetree/bindings/gpio/mrvl-gpio.yaml +1 -0
index 4db3b8a3332c..e2b7d2d133a8 100644
@@ -12,6 +12,7 @@ maintainers:
   - Rob Herring <[email protected]>
 
 allOf:
+  - $ref: gpio-common.yaml#
   - if:
       properties:
         compatible:
Documentation/devicetree/bindings/gpio/qcom,wcd934x-gpio.yaml +3 -0
index 32a566ec3558..2eee374e8396 100644
@@ -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:
Documentation/devicetree/bindings/gpio/renesas,em-gio.yaml +3 -0
index 8bdef812c87c..845689807678 100644
@@ -9,6 +9,9 @@ title: Renesas EMMA Mobile General Purpose I/O Interface
 maintainers:
   - Magnus Damm <[email protected]>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     const: renesas,em-gio
Documentation/devicetree/bindings/gpio/renesas,rcar-gpio.yaml +3 -0
index 5026662e4508..c116000d579f 100644
@@ -9,6 +9,9 @@ title: Renesas R-Car General-Purpose Input/Output Ports (GPIO)
 maintainers:
   - Geert Uytterhoeven <[email protected]>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     oneOf:
Documentation/devicetree/bindings/gpio/sifive,gpio.yaml +3 -0
index a0efd8dc2538..f2d93b40fc7e 100644
@@ -10,6 +10,9 @@ maintainers:
   - Yash Shah <[email protected]>
   - Paul Walmsley <[email protected]>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     items:
Documentation/devicetree/bindings/gpio/socionext,uniphier-gpio.yaml +3 -0
index c58ff9a94f45..94a911e9c313 100644
@@ -9,6 +9,9 @@ title: UniPhier GPIO controller
 maintainers:
   - Masahiro Yamada <[email protected]>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   $nodename:
     pattern: "^gpio@[0-9a-f]+$"
Documentation/devicetree/bindings/gpio/xylon,logicvc-gpio.yaml +3 -0
index a36aec27069c..0e4581241b3f 100644
@@ -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]+$"
Signature · 7 lines
2.17.1


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
#6 lore raw

PATCH 3/8 dt-bindings: gpio: pl061: add missing properties and include common schema

In reply to Krzysztof Kozlowski

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

---
 Documentation/devicetree/bindings/gpio/pl061-gpio.yaml | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/gpio/pl061-gpio.yaml +6 -0
index 313b17229247..6cbf10d8e120 100644
@@ -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:
Signature · 7 lines
2.17.1


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
#7 lore raw

PATCH 4/8 dt-bindings: gpio: fsl-imx-gpio: add i.MX ARMv6 and ARMv7 compatibles

In reply to 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

---
 .../devicetree/bindings/gpio/fsl-imx-gpio.yaml       | 12 ++++++++++++
 1 file changed, 12 insertions(+)
Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml +12 -0
index 737756e081fb..ad761e2f380a 100644
@@ -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
Signature · 7 lines
2.17.1


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
#8 lore raw

PATCH 5/8 dt-bindings: gpio: fsl-imx-gpio: add gpio-line-names

In reply to 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]+'
---
 Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml +1 -1
index ad761e2f380a..347f059d347a 100644
@@ -65,7 +65,7 @@ properties:
     const: 2
 
   gpio-controller: true
-
+  gpio-line-names: true
   gpio-ranges: true
 
   power-domains:
Signature · 7 lines
2.17.1


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
#9 lore raw

PATCH 6/8 arm64: dts: imx8mq-librem5: correct GPIO hog property

In reply to Krzysztof Kozlowski

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

---
 arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi +1 -1
index 56295dd2fa8f..e4dedcb58f76 100644
@@ -251,7 +251,7 @@
 
 	pmic-5v {
 		gpio-hog;
-		gpio = <&gpio1 1 GPIO_ACTIVE_HIGH>;
+		gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
 		input;
 	};
 };
Signature · 7 lines
2.17.1


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
#10 lore raw

PATCH 7/8 arm64: dts: imx8mq-librem5: align GPIO hog names with dtschema

In reply to Krzysztof Kozlowski

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

---
 arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi +1 -1
index e4dedcb58f76..6cbcee2fb938 100644
@@ -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;
Signature · 7 lines
2.17.1


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
#11 lore raw

PATCH 8/8 ARM: dts: imx: align GPIO hog names with dtschema

In reply to Krzysztof Kozlowski

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

---
 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(-)
arch/arm/boot/dts/imx51-zii-rdu1.dts +1 -1
index e559ab0c3645..ec8ca3ac2c1c 100644
@@ -451,7 +451,7 @@
 			  "", "", "", "",
 			  "", "", "", "";
 
-	unused-sd3-wp-gpio {
+	unused-sd3-wp-hog {
 		/*
 		 * See pinctrl_esdhc1 below for more details on this
 		 */
arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi +4 -4
index 66b15748e287..c0a76202e16b 100644
@@ -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;
arch/arm/boot/dts/imx6ul-ccimx6ulsbcpro.dts +1 -1
index a0bbec57ddc7..3ec042bfccba 100644
@@ -110,7 +110,7 @@
 };
 
 &gpio5 {
-	emmc-usd-mux {
+	emmc-usd-mux-hog {
 		gpio-hog;
 		gpios = <1 GPIO_ACTIVE_LOW>;
 		output-high;
Signature · 7 lines
2.17.1


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
#3 lore raw

Re: [PATCH 2/8] dt-bindings: gpio: include common schema in GPIO controllers

In reply to Krzysztof Kozlowski

Hi Krzysztof,

Quoted 4 lines · Krzysztof Kozlowski

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

Thanks for your patch!

Quoted 7 lines
---
 .../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 +++
Quoted 8 lines
 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

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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
#4 lore raw

Re: [PATCH 2/8] dt-bindings: gpio: include common schema in GPIO controllers

Quoted 27 lines · Geert Uytterhoeven

Hi Krzysztof,

Quoted 4 lines · Krzysztof Kozlowski

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

Thanks for your patch!

Quoted 7 lines
---
 .../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 +++
Quoted 8 lines
 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(+)
Quoted 3 lines

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

#5 lore raw

Re: [PATCH 2/8] dt-bindings: gpio: include common schema in GPIO controllers

In reply to Krzysztof Kozlowski
Quoted 53 lines · Krzysztof Kozlowski

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

---
 .../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(+)
Documentation/devicetree/bindings/gpio/brcm,xgs-iproc-gpio.yaml +3 -0
index c213cb9ddb9f..1ac69b9c03f9 100644
@@ -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
Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml +3 -0
index de0b9b5f6a70..737756e081fb 100644
@@ -9,6 +9,9 @@ title: Freescale i.MX/MXC GPIO controller
 maintainers:
   - Anson Huang <[email protected]>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     oneOf:
Documentation/devicetree/bindings/gpio/gpio-mxs.yaml +0 -0
index dfa1133f8c5e..7fc04ab35044 100644

Documentation/devicetree/bindings/gpio/gpio-mxs.yaml description: | · line 22

Quoted 6 lines
Documentation/devicetree/bindings/gpio/gpio-mxs.yaml +3 -0
@@ -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

#12 lore raw

Re: [PATCH 8/8] ARM: dts: imx: align GPIO hog names with dtschema

In reply to Krzysztof Kozlowski
Quoted 2 lines · Krzysztof Kozlowski

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

#13 lore raw

Re: [PATCH 8/8] ARM: dts: imx: align GPIO hog names with dtschema

Quoted 6 lines · Jonathan Neuschäfer
Quoted 2 lines · Krzysztof Kozlowski

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

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

#14 lore raw
In reply to Krzysztof Kozlowski
Quoted 4 lines · Krzysztof Kozlowski

This is independent work of pca953x bindings:
https://lore.kernel.org/lkml/[email protected]/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

#15 lore raw
Quoted 9 lines · Linus Walleij
Quoted 4 lines · Krzysztof Kozlowski

This is independent work of pca953x bindings:
https://lore.kernel.org/lkml/[email protected]/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.

Quoted 5 lines

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