Skip to contentSkip to conversation

dt-bindings: gpio: Create a trivial GPIO schema

PATCH Applied Rob Herring (Arm) 3 participants 3 messages Jul 14, 2025 – Jul 18, 2025

Subsystems (7)
lore
Share & tools
lore

Rob Herring (Arm)

author maintainer
#0 lore raw

PATCH v2 1/1 dt-bindings: gpio: Create a trivial GPIO schema

Many simple GPIO controllers without interrupt capability have the same schema other than their compatible value. Combine all these bindings into a single schema. The criteria to be included here is must use 2 cells, have no interrupt capability, have 0 or 1 "reg" entries, and have no other resources (like clocks).

Note that "ngpios" is now allowed in some cases it wasn't before and constraints on it have been dropped.

---
We could also do this for ones with interrupts, but that seems a bit more varied.

v2:
- Add Cirrus EP7209
- Update references and MAINTAINERS

---
 .../devicetree/bindings/gpio/fcs,fxl6408.yaml |  59 ----------
 .../bindings/gpio/gateworks,pld-gpio.txt      |  19 ---
 .../bindings/gpio/gpio-clps711x.txt           |  28 -----
 .../devicetree/bindings/gpio/gpio-lp3943.txt  |  37 ------
 .../bindings/gpio/gpio-max77620.txt           |  25 ----
 .../devicetree/bindings/gpio/gpio-moxtet.txt  |  18 ---
 .../devicetree/bindings/gpio/gpio-palmas.txt  |  27 -----
 .../bindings/gpio/gpio-pca9570.yaml           |  56 ---------
 .../bindings/gpio/gpio-tpic2810.yaml          |  51 --------
 .../devicetree/bindings/gpio/gpio-ts4800.txt  |  20 ----
 .../devicetree/bindings/gpio/gpio-ts4900.txt  |  30 -----
 .../devicetree/bindings/gpio/gpio-xgene.txt   |  22 ----
 .../bindings/gpio/ibm,ppc4xx-gpio.txt         |  24 ----
 .../bindings/gpio/loongson,ls1x-gpio.yaml     |  49 --------
 .../bindings/gpio/nintendo,hollywood-gpio.txt |  26 -----
 .../gpio/rockchip,rk3328-grf-gpio.yaml        |  50 --------
 .../bindings/gpio/snps,creg-gpio.txt          |  21 ----
 .../devicetree/bindings/gpio/ti,7416374.yaml  |  56 ---------
 .../bindings/gpio/trivial-gpio.yaml           | 110 ++++++++++++++++++
 .../devicetree/bindings/mfd/lp3943.txt        |   2 +-
 .../bindings/powerpc/nintendo/wii.txt         |   4 -
 .../devicetree/bindings/soc/rockchip/grf.yaml |   8 +-
 MAINTAINERS                                   |   3 -
 23 files changed, 116 insertions(+), 629 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/gpio/fcs,fxl6408.yaml
 delete mode 100644 Documentation/devicetree/bindings/gpio/gateworks,pld-gpio.txt
 delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-clps711x.txt
 delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-lp3943.txt
 delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-max77620.txt
 delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-moxtet.txt
 delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-palmas.txt
 delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml
 delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-tpic2810.yaml
 delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-ts4800.txt
 delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-ts4900.txt
 delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-xgene.txt
 delete mode 100644 Documentation/devicetree/bindings/gpio/ibm,ppc4xx-gpio.txt
 delete mode 100644 Documentation/devicetree/bindings/gpio/loongson,ls1x-gpio.yaml
 delete mode 100644 Documentation/devicetree/bindings/gpio/nintendo,hollywood-gpio.txt
 delete mode 100644 Documentation/devicetree/bindings/gpio/rockchip,rk3328-grf-gpio.yaml
 delete mode 100644 Documentation/devicetree/bindings/gpio/snps,creg-gpio.txt
 delete mode 100644 Documentation/devicetree/bindings/gpio/ti,7416374.yaml
 create mode 100644 Documentation/devicetree/bindings/gpio/trivial-gpio.yaml
Documentation/devicetree/bindings/gpio/fcs,fxl6408.yaml deleted +0 -59
deleted file mode 100644
index b74fa81e7d05..000000000000
@@ -1,59 +0,0 @@
-# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
-%YAML 1.2
----
-$id: http://devicetree.org/schemas/gpio/fcs,fxl6408.yaml#
-$schema: http://devicetree.org/meta-schemas/core.yaml#
-
-title: Fairchild FXL6408 I2C GPIO Expander
-
-maintainers:
-  - Emanuele Ghidoli <[email protected]>
-
-properties:
-  compatible:
-    enum:
-      - fcs,fxl6408
-
-  reg:
-    maxItems: 1
-
-  "#gpio-cells":
-    const: 2
-
-  gpio-controller: true
-
-  gpio-line-names:
-    minItems: 1
-    maxItems: 8
-
-patternProperties:
-  "^(hog-[0-9]+|.+-hog(-[0-9]+)?)$":
-    type: object
-    required:
-      - gpio-hog
-
-required:
-  - compatible
-  - reg
-  - gpio-controller
-  - "#gpio-cells"
-
-additionalProperties: false
-
-examples:
-  - |
-    i2c {
-        #address-cells = <1>;
-        #size-cells = <0>;
-
-        gpio_expander_43: gpio-expander@43 {
-            compatible = "fcs,fxl6408";
-            reg = <0x43>;
-            gpio-controller;
-            #gpio-cells = <2>;
-            gpio-line-names = "Wi-Fi_W_DISABLE", "Wi-Fi_WKUP_WLAN",
-                              "PWR_EN_+V3.3_WiFi_N", "PCIe_REF_CLK_EN",
-                              "USB_RESET_N", "USB_BYPASS_N", "Wi-Fi_PDn",
-                              "Wi-Fi_WKUP_BT";
-        };
-    };
Documentation/devicetree/bindings/gpio/gateworks,pld-gpio.txt deleted +0 -19
deleted file mode 100644
index d543fd1b8b23..000000000000
@@ -1,19 +0,0 @@
-Gateworks PLD GPIO controller bindings
-
-The GPIO controller should be a child node on an I2C bus.
-
-Required properties:
-- compatible: Should be "gateworks,pld-gpio"
-- reg: I2C slave address
-- gpio-controller: Marks the device node as a GPIO controller.
-- #gpio-cells: Should be <2>. The first cell is the gpio number and
-  the second cell is used to specify optional parameters.
-
-Example:
-
-pld@56 {
-	compatible = "gateworks,pld-gpio";
-	reg = <0x56>;
-	gpio-controller;
-	#gpio-cells = <2>;
-};
Documentation/devicetree/bindings/gpio/gpio-clps711x.txt deleted +0 -28
deleted file mode 100644
index 0a304ad29d81..000000000000
@@ -1,28 +0,0 @@
-Cirrus Logic CLPS711X GPIO controller
-
-Required properties:
-- compatible: Should be "cirrus,ep7209-gpio"
-- reg: Physical base GPIO controller registers location and length.
-  There should be two registers, first is DATA register, the second
-  is DIRECTION.
-- gpio-controller: Marks the device node as a gpio controller.
-- #gpio-cells: Should be two. The first cell is the pin number and
-  the second cell is used to specify the gpio polarity:
-    0 = active high
-    1 = active low
-
-Note: Each GPIO port should have an alias correctly numbered in "aliases"
-node.
-
-Example:
-
-aliases {
-	gpio0 = &porta;
-};
-
-porta: gpio@80000000 {
-	compatible = "cirrus,ep7312-gpio","cirrus,ep7209-gpio";
-	reg = <0x80000000 0x1>, <0x80000040 0x1>;
-	gpio-controller;
-	#gpio-cells = <2>;
-};
Documentation/devicetree/bindings/gpio/gpio-lp3943.txt deleted +0 -37
deleted file mode 100644
index 80fcb7d70e13..000000000000
@@ -1,37 +0,0 @@
-TI/National Semiconductor LP3943 GPIO controller
-
-Required properties:
-  - compatible: "ti,lp3943-gpio"
-  - gpio-controller: Marks the device node as a GPIO controller.
-  - #gpio-cells: Should be 2. See gpio.txt in this directory for a
-                 description of the cells format.
-
-Example:
-Simple LED controls with LP3943 GPIO controller
-
-&i2c4 {
-	lp3943@60 {
-		compatible = "ti,lp3943";
-		reg = <0x60>;
-
-		gpioex: gpio {
-			compatible = "ti,lp3943-gpio";
-			gpio-controller;
-			#gpio-cells = <2>;
-		};
-	};
-};
-
-leds {
-	compatible = "gpio-leds";
-	indicator1 {
-		label = "indi1";
-		gpios = <&gpioex 9 GPIO_ACTIVE_LOW>;
-	};
-
-	indicator2 {
-		label = "indi2";
-		gpios = <&gpioex 10 GPIO_ACTIVE_LOW>;
-		default-state = "off";
-	};
-};
Documentation/devicetree/bindings/gpio/gpio-max77620.txt deleted +0 -25
deleted file mode 100644
index 410e716fd3d2..000000000000
@@ -1,25 +0,0 @@
-GPIO driver for MAX77620 Power management IC from Maxim Semiconductor.
-
-Device has 8 GPIO pins which can be configured as GPIO as well as the
-special IO functions.
-
-Required properties:
--------------------
-- gpio-controller : 	Marks the device node as a gpio controller.
-- #gpio-cells : 	Should be two.  The first cell is the pin number and
-			the second cell is used to specify the gpio polarity:
-				0 = active high
-				1 = active low
-For more details, please refer generic GPIO DT binding document
-<devicetree/bindings/gpio/gpio.txt>.
-
-Example:
---------
-#include <dt-bindings/mfd/max77620.h>
-...
-max77620@3c {
-	compatible = "maxim,max77620";
-
-	gpio-controller;
-	#gpio-cells = <2>;
-};
Documentation/devicetree/bindings/gpio/gpio-moxtet.txt deleted +0 -18
deleted file mode 100644
index 410759de9f09..000000000000
@@ -1,18 +0,0 @@
-Turris Mox Moxtet GPIO expander via Moxtet bus
-
-Required properties:
- - compatible		: Should be "cznic,moxtet-gpio".
- - gpio-controller	: Marks the device node as a GPIO controller.
- - #gpio-cells		: Should be two. For consumer use see gpio.txt.
-
-Other properties are required for a Moxtet bus device, please refer to
-Documentation/devicetree/bindings/bus/moxtet.txt.
-
-Example:
-
-	moxtet_sfp: gpio@0 {
-		compatible = "cznic,moxtet-gpio";
-		gpio-controller;
-		#gpio-cells = <2>;
-		reg = <0>;
-	}
Documentation/devicetree/bindings/gpio/gpio-palmas.txt deleted +0 -27
deleted file mode 100644
index 08b5b52a3ae0..000000000000
@@ -1,27 +0,0 @@
-Palmas GPIO controller bindings
-
-Required properties:
-- compatible:
-  - "ti,palams-gpio" for palma series of the GPIO controller
-  - "ti,tps80036-gpio" for Palma series device TPS80036.
-  - "ti,tps65913-gpio" for palma series device TPS65913.
-  - "ti,tps65914-gpio" for palma series device TPS65914.
-- #gpio-cells : Should be two.
-  - first cell is the gpio pin number
-  - second cell is used to specify the gpio polarity:
-      0 = active high
-      1 = active low
-- gpio-controller : Marks the device node as a GPIO controller.
-
-Note: This gpio node will be sub node of palmas node.
-
-Example:
-	palmas: tps65913@58 {
-		:::::::::::
-		palmas_gpio: palmas_gpio {
-			compatible = "ti,palmas-gpio";
-			gpio-controller;
-			#gpio-cells = <2>;
-		};
-		:::::::::::
-	};
Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml deleted +0 -56

56 lines not on this page · raw message

Documentation/devicetree/bindings/gpio/gpio-tpic2810.yaml deleted +0 -51

51 lines not on this page · raw message

Documentation/devicetree/bindings/gpio/gpio-ts4800.txt deleted +0 -20
deleted file mode 100644
index 92ea9c8f6399..000000000000
@@ -1,20 +0,0 @@
-* TS-4800 FPGA's GPIO controller bindings
-
-Required properties:
-- compatible: Must be "technologic,ts4800-gpio".
-- #gpio-cells: Should be two. The first cell is the pin number.
-- reg: Physical base address of the controller and length
-       of memory mapped region.
-
-Optional property:
-- ngpios: See "gpio.txt"
-
-Example:
-
-gpio1: gpio {
-	compatible = "technologic,ts4800-gpio";
-	reg = <0x10020 0x6>;
-	ngpios = <8>;
-	gpio-controller;
-	#gpio-cells = <2>;
-};
Documentation/devicetree/bindings/gpio/gpio-ts4900.txt deleted +0 -30
deleted file mode 100644
index 3f8e71b1ab2a..000000000000
@@ -1,30 +0,0 @@
-* Technologic Systems I2C-FPGA's GPIO controller bindings
-
-This bindings describes the GPIO controller for Technologic's FPGA core.
-TS-4900's FPGA encodes the GPIO state on 3 bits, whereas the TS-7970's FPGA
-uses 2 bits: it doesn't use a dedicated input bit.
-
-Required properties:
-- compatible: Should be one of the following
-		"technologic,ts4900-gpio"
-		"technologic,ts7970-gpio"
-- reg: Physical base address of the controller and length
-       of memory mapped region.
-- #gpio-cells: Should be two. The first cell is the pin number.
-- gpio-controller: Marks the device node as a gpio controller.
-
-Optional property:
-- ngpios: Number of GPIOs this controller is instantiated with,
-  the default is 32. See gpio.txt for more details.
-
-Example:
-
-&i2c2 {
-	gpio8: gpio@28 {
-		compatible = "technologic,ts4900-gpio";
-		reg = <0x28>;
-		#gpio-cells = <2>;
-		gpio-controller;
-		ngpios = <32>;
-	};
-};
Documentation/devicetree/bindings/gpio/gpio-xgene.txt deleted +0 -22
deleted file mode 100644
index 86dbb05e7758..000000000000
@@ -1,22 +0,0 @@
-APM X-Gene SoC GPIO controller bindings
-
-This is a gpio controller that is part of the flash controller.
-This gpio controller controls a total of 48 gpios.
-
-Required properties:
-- compatible: "apm,xgene-gpio" for X-Gene GPIO controller
-- reg: Physical base address and size of the controller's registers
-- #gpio-cells: Should be two.
-	- first cell is the pin number
-	- second cell is used to specify the gpio polarity:
-		0 = active high
-		1 = active low
-- gpio-controller: Marks the device node as a GPIO controller.
-
-Example:
-	gpio0: gpio0@1701c000 {
-		compatible = "apm,xgene-gpio";
-		reg = <0x0 0x1701c000 0x0 0x40>;
-		gpio-controller;
-		#gpio-cells = <2>;
-	};
Documentation/devicetree/bindings/gpio/ibm,ppc4xx-gpio.txt deleted +0 -24
deleted file mode 100644
index d58b3958f3ea..000000000000
@@ -1,24 +0,0 @@
-* IBM/AMCC/APM GPIO Controller for PowerPC 4XX series and compatible SoCs
-
-All GPIOs are pin-shared with other functions. DCRs control whether a
-particular pin that has GPIO capabilities acts as a GPIO or is used for
-another purpose. GPIO outputs are separately programmable to emulate
-an open-drain driver.
-
-Required properties:
-	- compatible: must be "ibm,ppc4xx-gpio"
-	- reg: address and length of the register set for the device
-	- #gpio-cells: must be set to 2. The first cell is the pin number
-		and the second cell is used to specify the gpio polarity:
-		0 = active high
-		1 = active low
-	- gpio-controller: marks the device node as a gpio controller.
-
-Example:
-
-GPIO0: gpio@ef600b00 {
-	compatible = "ibm,ppc4xx-gpio";
-	reg = <0xef600b00 0x00000048>;
-	#gpio-cells = <2>;
-	gpio-controller;
-};
Documentation/devicetree/bindings/gpio/loongson,ls1x-gpio.yaml deleted +0 -49

49 lines not on this page · raw message

Documentation/devicetree/bindings/gpio/nintendo,hollywood-gpio.txt deleted +0 -26
deleted file mode 100644
index df63da46309c..000000000000
@@ -1,26 +0,0 @@
-Nintendo Wii (Hollywood) GPIO controller
-
-Required properties:
-- compatible: "nintendo,hollywood-gpio"
-- reg: Physical base address and length of the controller's registers.
-- gpio-controller: Marks the device node as a GPIO controller.
-- #gpio-cells: Should be <2>. The first cell is the pin number and the
-  second cell is used to specify optional parameters:
-   - bit 0 specifies polarity (0 for normal, 1 for inverted).
-
-Optional properties:
-- ngpios: see Documentation/devicetree/bindings/gpio/gpio.txt
-- interrupt-controller: Marks the device node as an interrupt controller.
-- #interrupt-cells: Should be two.
-- interrupts: Interrupt specifier for the controller's Broadway (PowerPC)
-  interrupt.
-
-Example:
-
-	GPIO: gpio@d8000c0 {
-		#gpio-cells = <2>;
-		compatible = "nintendo,hollywood-gpio";
-		reg = <0x0d8000c0 0x40>;
-		gpio-controller;
-		ngpios = <24>;
-	}
Documentation/devicetree/bindings/gpio/rockchip,rk3328-grf-gpio.yaml deleted +0 -50

50 lines not on this page · raw message

Documentation/devicetree/bindings/gpio/snps,creg-gpio.txt deleted +0 -21
deleted file mode 100644
index 1b30812b015b..000000000000
@@ -1,21 +0,0 @@
-Synopsys GPIO via CREG (Control REGisters) driver
-
-Required properties:
-- compatible : "snps,creg-gpio-hsdk" or "snps,creg-gpio-axs10x".
-- reg : Exactly one register range with length 0x4.
-- #gpio-cells : Since the generic GPIO binding is used, the
-  amount of cells must be specified as 2. The first cell is the
-  pin number, the second cell is used to specify optional parameters:
-  See "gpio-specifier" in .../devicetree/bindings/gpio/gpio.txt.
-- gpio-controller : Marks the device node as a GPIO controller.
-- ngpios: Number of GPIO pins.
-
-Example:
-
-gpio: gpio@f00014b0 {
-	compatible = "snps,creg-gpio-hsdk";
-	reg = <0xf00014b0 0x4>;
-	gpio-controller;
-	#gpio-cells = <2>;
-	ngpios = <2>;
-};
Documentation/devicetree/bindings/gpio/ti,7416374.yaml deleted +0 -56

56 lines not on this page · raw message

Documentation/devicetree/bindings/gpio/trivial-gpio.yaml new file +110 -0

110 lines not on this page · raw message

Documentation/devicetree/bindings/mfd/lp3943.txt +1 -1
index e8591d6b11b4..ca5324ed0df4 100644
@@ -7,7 +7,7 @@ Required properties:
 LP3943 consists of two sub-devices, lp3943-gpio and lp3943-pwm.
 
 For the LP3943 GPIO properties please refer to:
-Documentation/devicetree/bindings/gpio/gpio-lp3943.txt
+Documentation/devicetree/bindings/gpio/trivial-gpio.yaml
 
 For the LP3943 PWM properties please refer to:
 Documentation/devicetree/bindings/pwm/pwm-lp3943.txt
Documentation/devicetree/bindings/powerpc/nintendo/wii.txt +0 -4
index 6f69a9dfe198..df060a0d7d4a 100644
@@ -139,10 +139,6 @@ Nintendo Wii device tree
   - interrupt-controller
   - interrupts : should contain the cascade interrupt of the "flipper" pic
 
-1.l) The General Purpose I/O (GPIO) controller node
-
-  see Documentation/devicetree/bindings/gpio/nintendo,hollywood-gpio.txt
-
 1.m) The control node
 
   Represents the control interface used to setup several miscellaneous
Documentation/devicetree/bindings/soc/rockchip/grf.yaml +5 -3
index ccdcc889ba8e..1ab0b092e2a5 100644
@@ -179,10 +179,12 @@ allOf:
       properties:
         gpio:
           type: object
+          properties:
+            compatible:
+              contains:
+                const: rockchip,rk3328-grf-gpio
 
-          $ref: /schemas/gpio/rockchip,rk3328-grf-gpio.yaml#
-
-          unevaluatedProperties: false
+          additionalProperties: true
 
         power-controller:
           type: object
MAINTAINERS +0 -3
index 35f692c81df8..099405ced395 100644
@@ -2574,7 +2574,6 @@ F:	Documentation/ABI/testing/sysfs-firmware-turris-mox-rwtm
 F:	Documentation/devicetree/bindings/bus/moxtet.txt
 F:	Documentation/devicetree/bindings/firmware/cznic,turris-mox-rwtm.txt
 F:	Documentation/devicetree/bindings/firmware/cznic,turris-omnia-mcu.yaml
-F:	Documentation/devicetree/bindings/gpio/gpio-moxtet.txt
 F:	Documentation/devicetree/bindings/interrupt-controller/marvell,mpic.yaml
 F:	Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
 F:	Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.txt
@@ -24197,7 +24196,6 @@ F:	drivers/reset/reset-axs10x.c
 SYNOPSYS CREG GPIO DRIVER
 M:	Eugeniy Paltsev <[email protected]>
 S:	Maintained
-F:	Documentation/devicetree/bindings/gpio/snps,creg-gpio.txt
 F:	drivers/gpio/gpio-creg-snps.c
 
 SYNOPSYS DESIGNWARE 8250 UART DRIVER
@@ -27495,7 +27493,6 @@ XRA1403 GPIO EXPANDER
 M:	Nandor Han <[email protected]>
 L:	[email protected]
 S:	Maintained
-F:	Documentation/devicetree/bindings/gpio/gpio-xra1403.txt
 F:	drivers/gpio/gpio-xra1403.c
 
 XTENSA XTFPGA PLATFORM SUPPORT
Signature · 1 line
2.47.2
Reviewed-by on v2 1/1
#1 lore raw
Quoted 9 lines · Rob Herring (Arm)

Many simple GPIO controllers without interrupt capability have the same schema other than their compatible value. Combine all these bindings into a single schema. The criteria to be included here is must use 2 cells, have no interrupt capability, have 0 or 1 "reg" entries, and have no other resources (like clocks).

Note that "ngpios" is now allowed in some cases it wasn't before and constraints on it have been dropped.

Quoted 6 lines

---
We could also do this for ones with interrupts, but that seems a bit more varied.

v2:

Best regards,
Krzysztof

#2 lore raw
In reply to Rob Herring (Arm)

From: Bartosz Golaszewski <[email protected]>

Quoted 10 lines · Rob Herring (Arm)

Many simple GPIO controllers without interrupt capability have the same schema other than their compatible value. Combine all these bindings into a single schema. The criteria to be included here is must use 2 cells, have no interrupt capability, have 0 or 1 "reg" entries, and have no other resources (like clocks).

Note that "ngpios" is now allowed in some cases it wasn't before and constraints on it have been dropped.

[...]

Applied, thanks!

[1/1] dt-bindings: gpio: Create a trivial GPIO schema

      https://git.kernel.org/brgl/linux/c/2ace85b5bbd065a4e037970154854dc2b41d7b31

Best regards,

Signature · 1 line
Bartosz Golaszewski <[email protected]>