Hi
Convert the OMAP GPIO Device Tree binding documentation to json-schema.
The GPIO hogs node names defined to end with a 'hog' suffix.
All existing GPIO Hogs fixed to follow above naming convention
before changing the binding to avoid dtbs_check warnings.
Changes in v2:
- Patch 5 fixed "wrong indentation" warning
v1: https://lore.kernel.org/patchwork/cover/1434566/
Grygorii Strashko (5):
ARM: dts: am335x: align GPIO hog names with dt-schema
ARM: dts: am437x: align gpio hog names with dt-schema
ARM: dts: omap3: align gpio hog names with dt-schema
ARM: dts: omap5-board-common: align gpio hog names with dt-schema
dt-bindings: gpio: omap: Convert to json-schema
.../devicetree/bindings/gpio/gpio-omap.txt | 45 --------
.../bindings/gpio/ti,omap-gpio.yaml | 108 ++++++++++++++++++
.../boot/dts/am335x-boneblack-wireless.dts | 2 +-
arch/arm/boot/dts/am335x-boneblue.dts | 2 +-
.../boot/dts/am335x-bonegreen-wireless.dts | 4 +-
arch/arm/boot/dts/am335x-icev2.dts | 4 +-
arch/arm/boot/dts/am335x-shc.dts | 8 +-
arch/arm/boot/dts/am437x-gp-evm.dts | 4 +-
arch/arm/boot/dts/am43x-epos-evm.dts | 2 +-
.../boot/dts/omap3-evm-processor-common.dtsi | 2 +-
arch/arm/boot/dts/omap3-gta04a5.dts | 2 +-
arch/arm/boot/dts/omap5-board-common.dtsi | 2 +-
12 files changed, 124 insertions(+), 61 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-omap.txt
create mode 100644 Documentation/devicetree/bindings/gpio/ti,omap-gpio.yaml
--
2.17.1
The GPIO Hog dt-schema node naming convention expect GPIO hogs node names
to end with a 'hog' suffix.
Signed-off-by: Grygorii Strashko <[email protected]>
---
arch/arm/boot/dts/am335x-boneblack-wireless.dts | 2 +-
arch/arm/boot/dts/am335x-boneblue.dts | 2 +-
arch/arm/boot/dts/am335x-bonegreen-wireless.dts | 4 ++--
arch/arm/boot/dts/am335x-icev2.dts | 4 ++--
arch/arm/boot/dts/am335x-shc.dts | 8 ++++----
5 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/arch/arm/boot/dts/am335x-boneblack-wireless.dts b/arch/arm/boot/dts/am335x-boneblack-wireless.dts
index 86cad9912906..80116646a3fe 100644
--- a/arch/arm/boot/dts/am335x-boneblack-wireless.dts
+++ b/arch/arm/boot/dts/am335x-boneblack-wireless.dts
@@ -101,7 +101,7 @@
};
&gpio3 {
- ls_buf_en {
+ ls-buf-en-hog {
gpio-hog;
gpios = <10 GPIO_ACTIVE_HIGH>;
output-high;
diff --git a/arch/arm/boot/dts/am335x-boneblue.dts b/arch/arm/boot/dts/am335x-boneblue.dts
index 69acaf4ea0f3..0afcc2ee0b63 100644
--- a/arch/arm/boot/dts/am335x-boneblue.dts
+++ b/arch/arm/boot/dts/am335x-boneblue.dts
@@ -436,7 +436,7 @@
};
&gpio3 {
- ls_buf_en {
+ ls-buf-en-hog {
gpio-hog;
gpios = <10 GPIO_ACTIVE_HIGH>;
output-high;
diff --git a/arch/arm/boot/dts/am335x-bonegreen-wireless.dts b/arch/arm/boot/dts/am335x-bonegreen-wireless.dts
index 7615327d906a..74db0fc39397 100644
--- a/arch/arm/boot/dts/am335x-bonegreen-wireless.dts
+++ b/arch/arm/boot/dts/am335x-bonegreen-wireless.dts
@@ -101,7 +101,7 @@
};
&gpio1 {
- ls_buf_en {
+ ls-buf-en-hog {
gpio-hog;
gpios = <29 GPIO_ACTIVE_HIGH>;
output-high;
@@ -118,7 +118,7 @@
/* an external pulldown on U21 pin 4. */
&gpio3 {
- bt_aud_in {
+ bt-aud-in-hog {
gpio-hog;
gpios = <16 GPIO_ACTIVE_HIGH>;
output-low;
diff --git a/arch/arm/boot/dts/am335x-icev2.dts b/arch/arm/boot/dts/am335x-icev2.dts
index e923d065304d..5e598ac96dcc 100644
--- a/arch/arm/boot/dts/am335x-icev2.dts
+++ b/arch/arm/boot/dts/am335x-icev2.dts
@@ -458,14 +458,14 @@
};
&gpio3 {
- p4 {
+ pr1-mii-ctl-hog {
gpio-hog;
gpios = <4 GPIO_ACTIVE_HIGH>;
output-high;
line-name = "PR1_MII_CTRL";
};
- p10 {
+ mux-mii-hog {
gpio-hog;
gpios = <10 GPIO_ACTIVE_HIGH>;
/* ETH1 mux: Low for MII-PRU, high for RMII-CPSW */
diff --git a/arch/arm/boot/dts/am335x-shc.dts b/arch/arm/boot/dts/am335x-shc.dts
index 1eaa26533466..2bfe60d32783 100644
--- a/arch/arm/boot/dts/am335x-shc.dts
+++ b/arch/arm/boot/dts/am335x-shc.dts
@@ -140,14 +140,14 @@
};
&gpio1 {
- hmtc_rst {
+ hmtc-rst-hog {
gpio-hog;
gpios = <24 GPIO_ACTIVE_LOW>;
output-high;
line-name = "homematic_reset";
};
- hmtc_prog {
+ hmtc-prog-hog {
gpio-hog;
gpios = <27 GPIO_ACTIVE_LOW>;
output-high;
@@ -156,14 +156,14 @@
};
&gpio3 {
- zgb_rst {
+ zgb-rst-hog {
gpio-hog;
gpios = <18 GPIO_ACTIVE_LOW>;
output-low;
line-name = "zigbee_reset";
};
- zgb_boot {
+ zgb-boot-hog {
gpio-hog;
gpios = <19 GPIO_ACTIVE_HIGH>;
output-high;
--
2.17.1
The GPIO Hog dt-schema node naming convention expect GPIO hogs node names
to end with a 'hog' suffix.
Signed-off-by: Grygorii Strashko <[email protected]>
---
arch/arm/boot/dts/am437x-gp-evm.dts | 4 ++--
arch/arm/boot/dts/am43x-epos-evm.dts | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/boot/dts/am437x-gp-evm.dts b/arch/arm/boot/dts/am437x-gp-evm.dts
index 033b984ff637..e2677682b540 100644
--- a/arch/arm/boot/dts/am437x-gp-evm.dts
+++ b/arch/arm/boot/dts/am437x-gp-evm.dts
@@ -786,7 +786,7 @@
pinctrl-0 = <&gpio0_pins>;
status = "okay";
- p23 {
+ sel-emmc-nand-hog {
gpio-hog;
gpios = <23 GPIO_ACTIVE_HIGH>;
/* SelEMMCorNAND selects between eMMC and NAND:
@@ -822,7 +822,7 @@
pinctrl-0 = <&display_mux_pins>;
status = "okay";
- p8 {
+ sel-lcd-hdmi-hog {
/*
* SelLCDorHDMI selects between display and audio paths:
* Low: HDMI display with audio via HDMI
diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts b/arch/arm/boot/dts/am43x-epos-evm.dts
index f517d1e843cf..d717d5ada812 100644
--- a/arch/arm/boot/dts/am43x-epos-evm.dts
+++ b/arch/arm/boot/dts/am43x-epos-evm.dts
@@ -725,7 +725,7 @@
pinctrl-0 = <&display_mux_pins>;
status = "okay";
- p1 {
+ sel-lcd-hdmi-hog {
/*
* SelLCDorHDMI selects between display and audio paths:
* Low: HDMI display with audio via HDMI
--
2.17.1
The GPIO Hog dt-schema node naming convention expect GPIO hogs node names
to end with a 'hog' suffix.
Signed-off-by: Grygorii Strashko <[email protected]>
---
arch/arm/boot/dts/omap3-evm-processor-common.dtsi | 2 +-
arch/arm/boot/dts/omap3-gta04a5.dts | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/omap3-evm-processor-common.dtsi b/arch/arm/boot/dts/omap3-evm-processor-common.dtsi
index b4109f48ec18..e6ba30a21166 100644
--- a/arch/arm/boot/dts/omap3-evm-processor-common.dtsi
+++ b/arch/arm/boot/dts/omap3-evm-processor-common.dtsi
@@ -195,7 +195,7 @@
* for bus switch SN74CB3Q3384A, level-shifter SN74AVC16T245DGGR, and 1.8V.
*/
&gpio2 {
- en_usb2_port {
+ en-usb2-port-hog {
gpio-hog;
gpios = <29 GPIO_ACTIVE_HIGH>; /* gpio_61 */
output-low;
diff --git a/arch/arm/boot/dts/omap3-gta04a5.dts b/arch/arm/boot/dts/omap3-gta04a5.dts
index fd84bbf3b9cc..9ce8d81250aa 100644
--- a/arch/arm/boot/dts/omap3-gta04a5.dts
+++ b/arch/arm/boot/dts/omap3-gta04a5.dts
@@ -37,7 +37,7 @@
};
&gpio5 {
- irda_en {
+ irda-en-hog {
gpio-hog;
gpios = <(175-160) GPIO_ACTIVE_HIGH>;
output-high; /* activate gpio_175 to disable IrDA receiver */
--
2.17.1
Convert the OMAP GPIO Device Tree binding documentation to json-schema.
The GPIO hogs node names defined to end with a 'hog' suffix.
Signed-off-by: Grygorii Strashko <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
---
.../devicetree/bindings/gpio/gpio-omap.txt | 45 --------
.../bindings/gpio/ti,omap-gpio.yaml | 108 ++++++++++++++++++
2 files changed, 108 insertions(+), 45 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-omap.txt
create mode 100644 Documentation/devicetree/bindings/gpio/ti,omap-gpio.yaml
diff --git a/Documentation/devicetree/bindings/gpio/gpio-omap.txt b/Documentation/devicetree/bindings/gpio/gpio-omap.txt
deleted file mode 100644
index e57b2cb28f6c..000000000000
--- a/Documentation/devicetree/bindings/gpio/gpio-omap.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-OMAP GPIO controller bindings
-
-Required properties:
-- compatible:
- - "ti,omap2-gpio" for OMAP2 controllers
- - "ti,omap3-gpio" for OMAP3 controllers
- - "ti,omap4-gpio" for OMAP4 controllers
-- reg : Physical base address of the controller and length of memory mapped
- region.
-- gpio-controller : Marks the device node as a GPIO controller.
-- #gpio-cells : Should be two.
- - first cell is the pin number
- - second cell is used to specify optional parameters (unused)
-- interrupt-controller: Mark the device node as an interrupt controller.
-- #interrupt-cells : Should be 2.
- The first cell is the GPIO number.
- The second cell is used to specify flags:
- bits[3:0] trigger type and level flags:
- 1 = low-to-high edge triggered.
- 2 = high-to-low edge triggered.
- 4 = active high level-sensitive.
- 8 = active low level-sensitive.
-- interrupts : The interrupt the controller is rising as output when an
- interrupt occures
-
-OMAP specific properties:
-- ti,hwmods: Name of the hwmod associated to the GPIO:
- "gpio<X>", <X> being the 1-based instance number
- from the HW spec.
-- ti,gpio-always-on: Indicates if a GPIO bank is always powered and
- so will never lose its logic state.
-
-
-Example:
-
-gpio0: gpio@44e07000 {
- compatible = "ti,omap4-gpio";
- reg = <0x44e07000 0x1000>;
- ti,hwmods = "gpio1";
- gpio-controller;
- #gpio-cells = <2>;
- interrupt-controller;
- #interrupt-cells = <2>;
- interrupts = <96>;
-};
diff --git a/Documentation/devicetree/bindings/gpio/ti,omap-gpio.yaml b/Documentation/devicetree/bindings/gpio/ti,omap-gpio.yaml
new file mode 100644
index 000000000000..7087e4a5013f
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/ti,omap-gpio.yaml
@@ -0,0 +1,108 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/ti,omap-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: OMAP GPIO controller bindings
+
+maintainers:
+ - Grygorii Strashko <[email protected]>
+
+description: |
+ The general-purpose interface combines general-purpose input/output (GPIO) banks.
+ Each GPIO banks provides up to 32 dedicated general-purpose pins with input
+ and output capabilities; interrupt generation in active mode and wake-up
+ request generation in idle mode upon the detection of external events.
+
+properties:
+ compatible:
+ oneOf:
+ - enum:
+ - ti,omap2-gpio
+ - ti,omap3-gpio
+ - ti,omap4-gpio
+ - items:
+ - const: ti,am4372-gpio
+ - const: ti,omap4-gpio
+
+ reg:
+ maxItems: 1
+
+ gpio-controller: true
+
+ '#gpio-cells':
+ const: 2
+
+ interrupt-controller: true
+
+ '#interrupt-cells':
+ const: 2
+
+ interrupts:
+ maxItems: 1
+
+ gpio-ranges: true
+
+ gpio-line-names:
+ minItems: 1
+ maxItems: 32
+
+ ti,gpio-always-on:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description:
+ Indicates if a GPIO bank is always powered and will never lose its logic state.
+
+ ti,hwmods:
+ $ref: /schemas/types.yaml#/definitions/string
+ deprecated: true
+ description:
+ Name of the hwmod associated with the GPIO. Needed on some legacy OMAP
+ SoCs which have not been converted to the ti,sysc interconnect hierarachy.
+
+ ti,no-reset-on-init:
+ $ref: /schemas/types.yaml#/definitions/flag
+ deprecated: true
+ description:
+ Do not reset on init. Used with ti,hwmods on some legacy OMAP SoCs which
+ have not been converted to the ti,sysc interconnect hierarachy.
+
+patternProperties:
+ "^(.+-hog(-[0-9]+)?)$":
+ type: object
+
+ required:
+ - gpio-hog
+
+required:
+ - compatible
+ - reg
+ - gpio-controller
+ - "#gpio-cells"
+ - interrupt-controller
+ - "#interrupt-cells"
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ gpio0: gpio@0 {
+ compatible = "ti,omap4-gpio";
+ reg = <0x0 0x1000>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupts = <96>;
+ ti,gpio-always-on;
+
+ ls-buf-en-hog {
+ gpio-hog;
+ gpios = <10 GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "LS_BUF_EN";
+ };
+ };
--
2.17.1
The GPIO Hog dt-schema node naming convention expect GPIO hogs node names
to end with a 'hog' suffix.
Signed-off-by: Grygorii Strashko <[email protected]>
---
arch/arm/boot/dts/omap5-board-common.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/omap5-board-common.dtsi b/arch/arm/boot/dts/omap5-board-common.dtsi
index d8f13626cfd1..45435bb88c89 100644
--- a/arch/arm/boot/dts/omap5-board-common.dtsi
+++ b/arch/arm/boot/dts/omap5-board-common.dtsi
@@ -149,7 +149,7 @@
&gpio8 {
/* TI trees use GPIO instead of msecure, see also muxing */
- p234 {
+ msecure-hog {
gpio-hog;
gpios = <10 GPIO_ACTIVE_HIGH>;
output-high;
--
2.17.1
Hi Tony, Linus, Bartosz,
On 25/05/2021 20:58, Grygorii Strashko wrote:
> Hi
>
> Convert the OMAP GPIO Device Tree binding documentation to json-schema.
> The GPIO hogs node names defined to end with a 'hog' suffix.
>
> All existing GPIO Hogs fixed to follow above naming convention
> before changing the binding to avoid dtbs_check warnings.
There is one note. The DT bindings change, without DTS changes, will
cause dtbs_check warnings, so all these patches better to be merged through one tree.
>
> Changes in v2:
> - Patch 5 fixed "wrong indentation" warning
>
> v1: https://lore.kernel.org/patchwork/cover/1434566/
>
> Grygorii Strashko (5):
> ARM: dts: am335x: align GPIO hog names with dt-schema
> ARM: dts: am437x: align gpio hog names with dt-schema
> ARM: dts: omap3: align gpio hog names with dt-schema
> ARM: dts: omap5-board-common: align gpio hog names with dt-schema
> dt-bindings: gpio: omap: Convert to json-schema
>
> .../devicetree/bindings/gpio/gpio-omap.txt | 45 --------
> .../bindings/gpio/ti,omap-gpio.yaml | 108 ++++++++++++++++++
> .../boot/dts/am335x-boneblack-wireless.dts | 2 +-
> arch/arm/boot/dts/am335x-boneblue.dts | 2 +-
> .../boot/dts/am335x-bonegreen-wireless.dts | 4 +-
> arch/arm/boot/dts/am335x-icev2.dts | 4 +-
> arch/arm/boot/dts/am335x-shc.dts | 8 +-
> arch/arm/boot/dts/am437x-gp-evm.dts | 4 +-
> arch/arm/boot/dts/am43x-epos-evm.dts | 2 +-
> .../boot/dts/omap3-evm-processor-common.dtsi | 2 +-
> arch/arm/boot/dts/omap3-gta04a5.dts | 2 +-
> arch/arm/boot/dts/omap5-board-common.dtsi | 2 +-
> 12 files changed, 124 insertions(+), 61 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-omap.txt
> create mode 100644 Documentation/devicetree/bindings/gpio/ti,omap-gpio.yaml
>
--
Best regards,
grygorii
On Tue, May 25, 2021 at 7:59 PM Grygorii Strashko
<[email protected]> wrote:
>
> Convert the OMAP GPIO Device Tree binding documentation to json-schema.
> The GPIO hogs node names defined to end with a 'hog' suffix.
>
> Signed-off-by: Grygorii Strashko <[email protected]>
> Reviewed-by: Rob Herring <[email protected]>
> ---
Applied, thanks!
Bart
* Grygorii Strashko <[email protected]> [210526 10:06]:
> Hi Tony, Linus, Bartosz,
>
> On 25/05/2021 20:58, Grygorii Strashko wrote:
> > Hi
> >
> > Convert the OMAP GPIO Device Tree binding documentation to json-schema.
> > The GPIO hogs node names defined to end with a 'hog' suffix.
> >
> > All existing GPIO Hogs fixed to follow above naming convention
> > before changing the binding to avoid dtbs_check warnings.
>
> There is one note. The DT bindings change, without DTS changes, will
> cause dtbs_check warnings, so all these patches better to be merged through one tree.
So with the binding changes applied, I'm applying the dts changes
to omap-for-v5.14/dt thanks.
Regards,
Tony