Skip to contentSkip to conversation

dt-bindings: gpio: Convert X-Powers AXP209 GPIO binding to a schema

PATCH RESEND Applied Maxime Ripard 6 participants 18 messages Sep 24, 2021 – Oct 20, 2021

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND v2 1/3 dt-bindings: gpio: Convert X-Powers AXP209 GPIO binding to a schema

The X-Powers AXP PMICs feature a GPIO Controller supported by Linux thanks to its device tree binding.

Now that we have the DT validation in place, let's convert the device tree bindings for that driver over to a YAML schema.

---

Changes from v1:
- Removed the example and moved it in the mfd schema

---
 .../devicetree/bindings/gpio/gpio-axp209.txt  | 75 -------------------
 .../bindings/gpio/x-powers,axp209-gpio.yaml   | 55 ++++++++++++++
 2 files changed, 55 insertions(+), 75 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-axp209.txt
 create mode 100644 Documentation/devicetree/bindings/gpio/x-powers,axp209-gpio.yaml
Documentation/devicetree/bindings/gpio/gpio-axp209.txt deleted +0 -75
deleted file mode 100644
index fc42b2caa06d..000000000000
@@ -1,75 +0,0 @@
-AXP209 GPIO & pinctrl controller
-
-This driver follows the usual GPIO bindings found in
-Documentation/devicetree/bindings/gpio/gpio.txt
-
-This driver follows the usual pinctrl bindings found in
-Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
-
-This driver employs the per-pin muxing pattern.
-
-Required properties:
-- compatible: Should be one of:
-	- "x-powers,axp209-gpio"
-	- "x-powers,axp813-gpio"
-- #gpio-cells: Should be two. The first cell is the pin number and the
-  second is the GPIO flags.
-- gpio-controller: Marks the device node as a GPIO controller.
-
-This node must be a subnode of the axp20x PMIC, documented in
-Documentation/devicetree/bindings/mfd/axp20x.txt
-
-Example:
-
-axp209: pmic@34 {
-	compatible = "x-powers,axp209";
-	reg = <0x34>;
-	interrupt-parent = <&nmi_intc>;
-	interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-	interrupt-controller;
-	#interrupt-cells = <1>;
-
-	axp_gpio: gpio {
-		compatible = "x-powers,axp209-gpio";
-		gpio-controller;
-		#gpio-cells = <2>;
-	};
-};
-
-The GPIOs can be muxed to other functions and therefore, must be a subnode of
-axp_gpio.
-
-Example:
-
-&axp_gpio {
-	gpio0_adc: gpio0-adc {
-		pins = "GPIO0";
-		function = "adc";
-	};
-};
-
-&example_node {
-	pinctrl-names = "default";
-	pinctrl-0 = <&gpio0_adc>;
-};
-
-GPIOs and their functions
--------------------------
-
-Each GPIO is independent from the other (i.e. GPIO0 in gpio_in function does
-not force GPIO1 and GPIO2 to be in gpio_in function as well).
-
-axp209
-------
-GPIO	|	Functions
-------------------------
-GPIO0	|	gpio_in, gpio_out, ldo, adc
-GPIO1	|	gpio_in, gpio_out, ldo, adc
-GPIO2	|	gpio_in, gpio_out
-
-axp813
-------
-GPIO	|	Functions
-------------------------
-GPIO0	|	gpio_in, gpio_out, ldo, adc
-GPIO1	|	gpio_in, gpio_out, ldo
Documentation/devicetree/bindings/gpio/x-powers,axp209-gpio.yaml new file +55 -0

55 lines not on this page · raw message

Signature · 1 line
2.31.1
#1 lore raw

PATCH RESEND v2 2/3 dt-bindings: mfd: Convert X-Powers AXP binding to a schema

The X-Powers AXP PMICs are supported by Linux thanks to its device tree binding.

Now that we have the DT validation in place, let's convert the device tree bindings for that driver over to a YAML schema.

Cc Chen-Yu Tsai <[email protected]>
Cc Lee Jones <[email protected]>

---

Changes from v1:
- Add GPIO example
- Remove the limitation on regulator-ramp-delay

---
 .../i2c/allwinner,sun6i-a31-p2wi.yaml         |   2 +-
 .../devicetree/bindings/mfd/axp20x.txt        | 273 ------------
 .../bindings/mfd/x-powers,axp152.yaml         | 400 ++++++++++++++++++
 3 files changed, 401 insertions(+), 274 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mfd/axp20x.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
Documentation/devicetree/bindings/i2c/allwinner,sun6i-a31-p2wi.yaml +1 -1
index 6097e8ac46c1..1b03810d4b4d 100644
@@ -55,7 +55,7 @@ examples:
         #size-cells = <0>;
 
         axp221: pmic@68 {
-            compatible = "x-powers,axp221";
+            /* compatible = "x-powers,axp221"; */
             reg = <0x68>;
         };
     };
Documentation/devicetree/bindings/mfd/axp20x.txt deleted +0 -273

273 lines not on this page · raw message

Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml new file +400 -0

400 lines not on this page · raw message

Signature · 1 line
2.31.1
Acked-by on v2 2/3
#2 lore raw

Re: [RESEND v2 2/3] dt-bindings: mfd: Convert X-Powers AXP binding to a schema

Quoted 10 lines · Maxime Ripard

The X-Powers AXP PMICs are supported by Linux thanks to its device tree binding.

Now that we have the DT validation in place, let's convert the device tree bindings for that driver over to a YAML schema.

Cc Chen-Yu Tsai <[email protected]>
Cc Lee Jones <[email protected]>
maintainer Reviewed-by on v2 2/3
#3 lore raw

Re: [RESEND v2 2/3] dt-bindings: mfd: Convert X-Powers AXP binding to a schema

In reply to Maxime Ripard
Quoted 15 lines · Maxime Ripard

The X-Powers AXP PMICs are supported by Linux thanks to its device tree binding.

Now that we have the DT validation in place, let's convert the device tree bindings for that driver over to a YAML schema.

Cc Chen-Yu Tsai <[email protected]>
Cc Lee Jones <[email protected]>

---

Changes from v1:
- Add GPIO example
- Remove the limitation on regulator-ramp-delay

Quoted 8 lines
---
 .../i2c/allwinner,sun6i-a31-p2wi.yaml         |   2 +-
 .../devicetree/bindings/mfd/axp20x.txt        | 273 ------------
 .../bindings/mfd/x-powers,axp152.yaml         | 400 ++++++++++++++++++
 3 files changed, 401 insertions(+), 274 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mfd/axp20x.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
Applied
#4 lore raw

Re: [RESEND v2 2/3] dt-bindings: mfd: Convert X-Powers AXP binding to a schema

In reply to Maxime Ripard
Quoted 15 lines · Maxime Ripard

The X-Powers AXP PMICs are supported by Linux thanks to its device tree binding.

Now that we have the DT validation in place, let's convert the device tree bindings for that driver over to a YAML schema.

Cc Chen-Yu Tsai <[email protected]>
Cc Lee Jones <[email protected]>

---

Changes from v1:
- Add GPIO example
- Remove the limitation on regulator-ramp-delay

Quoted 7 lines
---
 .../i2c/allwinner,sun6i-a31-p2wi.yaml         |   2 +-
 .../devicetree/bindings/mfd/axp20x.txt        | 273 ------------
 .../bindings/mfd/x-powers,axp152.yaml         | 400 ++++++++++++++++++
 3 files changed, 401 insertions(+), 274 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mfd/axp20x.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml

Applied, thanks.

Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
#5 lore raw

PATCH RESEND v2 3/3 dt-bindings: mfd: Convert X-Powers AC100 binding to a schema

In reply to Maxime Ripard

The X-Powers AC100 hybrid devices are supported by Linux thanks to its device tree binding.

Now that we have the DT validation in place, let's convert the device tree bindings for that driver over to a YAML schema.

---

Changes from v1:
- Added maximum number of clocks properties

---
 .../devicetree/bindings/mfd/ac100.txt         |  50 --------
 .../bindings/mfd/x-powers,ac100.yaml          | 116 ++++++++++++++++++
 2 files changed, 116 insertions(+), 50 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mfd/ac100.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/x-powers,ac100.yaml
Documentation/devicetree/bindings/mfd/ac100.txt deleted +0 -50
deleted file mode 100644
index dff219f07493..000000000000
@@ -1,50 +0,0 @@
-X-Powers AC100 Codec/RTC IC Device Tree bindings
-
-AC100 is a audio codec and RTC subsystem combo IC. The 2 parts are
-separated, including power supplies and interrupt lines, but share
-a common register address space and host interface.
-
-Required properties:
-- compatible: "x-powers,ac100"
-- reg: The I2C slave address or RSB hardware address for the chip
-- sub-nodes:
-  - codec
-    - compatible:		"x-powers,ac100-codec"
-    - interrupts:		SoC NMI / GPIO interrupt connected to the
-    				IRQ_AUDIO pin
-    - #clock-cells:		Shall be 0
-    - clock-output-names:	"4M_adda"
-
-    - see clock/clock-bindings.txt for common clock bindings
-
-  - rtc
-    - compatible:		"x-powers,ac100-rtc"
-    - clocks:			A phandle to the codec's "4M_adda" clock
-    - #clock-cells:		Shall be 1
-    - clock-output-names:	"cko1_rtc", "cko2_rtc", "cko3_rtc"
-
-    - see clock/clock-bindings.txt for common clock bindings
-
-Example:
-
-ac100: codec@e89 {
-	compatible = "x-powers,ac100";
-	reg = <0xe89>;
-
-	ac100_codec: codec {
-		compatible = "x-powers,ac100-codec";
-		interrupt-parent = <&r_pio>;
-		interrupts = <0 9 IRQ_TYPE_LEVEL_LOW>; /* PL9 */
-		#clock-cells = <0>;
-		clock-output-names = "4M_adda";
-	};
-
-	ac100_rtc: rtc {
-		compatible = "x-powers,ac100-rtc";
-		interrupt-parent = <&nmi_intc>;
-		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-		clocks = <&ac100_codec>;
-		#clock-cells = <1>;
-		clock-output-names = "cko1_rtc", "cko2_rtc", "cko3_rtc";
-	};
-};
Documentation/devicetree/bindings/mfd/x-powers,ac100.yaml new file +116 -0

116 lines not on this page · raw message

Signature · 1 line
2.31.1
Acked-by on v2 3/3
#6 lore raw

Re: [RESEND v2 3/3] dt-bindings: mfd: Convert X-Powers AC100 binding to a schema

Quoted 11 lines · Maxime Ripard

The X-Powers AC100 hybrid devices are supported by Linux thanks to its device tree binding.

Now that we have the DT validation in place, let's convert the device tree bindings for that driver over to a YAML schema.

Applied
#7 lore raw

Re: [RESEND v2 3/3] dt-bindings: mfd: Convert X-Powers AC100 binding to a schema

In reply to Maxime Ripard
Quoted 13 lines · Maxime Ripard

The X-Powers AC100 hybrid devices are supported by Linux thanks to its device tree binding.

Now that we have the DT validation in place, let's convert the device tree bindings for that driver over to a YAML schema.

---

Quoted 8 lines

Changes from v1:
- Added maximum number of clocks properties

---
 .../devicetree/bindings/mfd/ac100.txt         |  50 --------
 .../bindings/mfd/x-powers,ac100.yaml          | 116 ++++++++++++++++++
 2 files changed, 116 insertions(+), 50 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mfd/ac100.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/x-powers,ac100.yaml

Applied, thanks.

Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
Acked-by on v2 1/3
#8 lore raw
In reply to Maxime Ripard
Quoted 7 lines · Maxime Ripard

The X-Powers AXP PMICs feature a GPIO Controller supported by Linux thanks to its device tree binding.

Now that we have the DT validation in place, let's convert the device tree bindings for that driver over to a YAML schema.

Quoted 6 lines
#9 lore raw
In reply to Maxime Ripard
Quoted 16 lines · Maxime Ripard

The X-Powers AXP PMICs feature a GPIO Controller supported by Linux thanks to its device tree binding.

Now that we have the DT validation in place, let's convert the device tree bindings for that driver over to a YAML schema.

---

Quoted 8 lines

Changes from v1:
- Removed the example and moved it in the mfd schema

---
 .../devicetree/bindings/gpio/gpio-axp209.txt  | 75 -------------------
 .../bindings/gpio/x-powers,axp209-gpio.yaml   | 55 ++++++++++++++
 2 files changed, 55 insertions(+), 75 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-axp209.txt
 create mode 100644 Documentation/devicetree/bindings/gpio/x-powers,axp209-gpio.yaml

This one not being applied with the rest of the series is also breaking linux-next.

b4 am -P_ -sl -o - [email protected] | git am

#10 lore raw
Quoted 26 lines · Rob Herring
Quoted 16 lines · Maxime Ripard

The X-Powers AXP PMICs feature a GPIO Controller supported by Linux thanks to its device tree binding.

Now that we have the DT validation in place, let's convert the device tree bindings for that driver over to a YAML schema.

---

Quoted 8 lines

Changes from v1:
- Removed the example and moved it in the mfd schema

---
 .../devicetree/bindings/gpio/gpio-axp209.txt  | 75 -------------------
 .../bindings/gpio/x-powers,axp209-gpio.yaml   | 55 ++++++++++++++
 2 files changed, 55 insertions(+), 75 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-axp209.txt
 create mode 100644 Documentation/devicetree/bindings/gpio/x-powers,axp209-gpio.yaml
Quoted 4 lines

This one not being applied with the rest of the series is also breaking linux-next.

b4 am -P_ -sl -o - [email protected] | git am

Thanks for the link.

Seeing as there are no *real* dependencies, it would be better for Linus to take the patch (if he's okay with it of course).

Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
#11 lore raw
Quoted 32 lines · Lee Jones
Quoted 29 lines · Rob Herring
Quoted 16 lines · Maxime Ripard

The X-Powers AXP PMICs feature a GPIO Controller supported by Linux thanks to its device tree binding.

Now that we have the DT validation in place, let's convert the device tree bindings for that driver over to a YAML schema.

---

Quoted 8 lines

Changes from v1:
- Removed the example and moved it in the mfd schema

---
 .../devicetree/bindings/gpio/gpio-axp209.txt  | 75 -------------------
 .../bindings/gpio/x-powers,axp209-gpio.yaml   | 55 ++++++++++++++
 2 files changed, 55 insertions(+), 75 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-axp209.txt
 create mode 100644 Documentation/devicetree/bindings/gpio/x-powers,axp209-gpio.yaml

This one not being applied with the rest of the series is also breaking linux-next.

Quoted 6 lines
Quoted 1 line

b4 am -P_ -sl -o - [email protected] | git am

Thanks for the link.

Seeing as there are no *real* dependencies, it would be better for Linus to take the patch (if he's okay with it of course).

Only that 'make dt_binding_check' is broken for anyone using your branch (and linux-next ATM). It's as real as a broken build due to a missing header. If you don't think this is a problem, then don't apply MFD binding patches.

Rob

#12 lore raw
Quoted 37 lines · Rob Herring
Quoted 36 lines · Lee Jones
Quoted 26 lines · Rob Herring
Quoted 16 lines · Maxime Ripard

The X-Powers AXP PMICs feature a GPIO Controller supported by Linux thanks to its device tree binding.

Now that we have the DT validation in place, let's convert the device tree bindings for that driver over to a YAML schema.

---

Quoted 8 lines

Changes from v1:
- Removed the example and moved it in the mfd schema

---
 .../devicetree/bindings/gpio/gpio-axp209.txt  | 75 -------------------
 .../bindings/gpio/x-powers,axp209-gpio.yaml   | 55 ++++++++++++++
 2 files changed, 55 insertions(+), 75 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-axp209.txt
 create mode 100644 Documentation/devicetree/bindings/gpio/x-powers,axp209-gpio.yaml
Quoted 4 lines

This one not being applied with the rest of the series is also breaking linux-next.

b4 am -P_ -sl -o - [email protected] | git am

Thanks for the link.

Quoted 7 lines
Quoted 2 lines

Seeing as there are no *real* dependencies, it would be better for Linus to take the patch (if he's okay with it of course).

Only that 'make dt_binding_check' is broken for anyone using your branch (and linux-next ATM). It's as real as a broken build due to a missing header. If you don't think this is a problem, then don't apply MFD binding patches.

Ah, I missed Bartosz Ack up there.

Happy to apply it.

Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
#13 lore raw
Quoted 42 lines · Lee Jones
Quoted 40 lines · Rob Herring
Quoted 38 lines · Lee Jones
Quoted 26 lines · Rob Herring
Quoted 16 lines · Maxime Ripard

The X-Powers AXP PMICs feature a GPIO Controller supported by Linux thanks to its device tree binding.

Now that we have the DT validation in place, let's convert the device tree bindings for that driver over to a YAML schema.

---

Quoted 8 lines

Changes from v1:
- Removed the example and moved it in the mfd schema

---
 .../devicetree/bindings/gpio/gpio-axp209.txt  | 75 -------------------
 .../bindings/gpio/x-powers,axp209-gpio.yaml   | 55 ++++++++++++++
 2 files changed, 55 insertions(+), 75 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-axp209.txt
 create mode 100644 Documentation/devicetree/bindings/gpio/x-powers,axp209-gpio.yaml
Quoted 4 lines

This one not being applied with the rest of the series is also breaking linux-next.

b4 am -P_ -sl -o - [email protected] | git am

Thanks for the link.

Seeing as there are no *real* dependencies, it would be better for Linus to take the patch (if he's okay with it of course).

Quoted 8 lines
Quoted 4 lines

Only that 'make dt_binding_check' is broken for anyone using your branch (and linux-next ATM). It's as real as a broken build due to a missing header. If you don't think this is a problem, then don't apply MFD binding patches.

Ah, I missed Bartosz Ack up there.

Happy to apply it.

Linus, Bartosz, do you require a PR?

Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
#14 lore raw
Quoted 8 lines · Lee Jones
Quoted 5 lines · Lee Jones

On Tue, 12 Oct 2021, Rob Herring wrote:

Ah, I missed Bartosz Ack up there.

Happy to apply it.

Linus, Bartosz, do you require a PR?

I'm a bit out of the loop so let Bartosz answer this but generally not, as long as your tree builds clean we are happy!

Yours,
Linus Walleij

Applied
#15 lore raw
In reply to Maxime Ripard
Quoted 15 lines · Maxime Ripard

The X-Powers AXP PMICs feature a GPIO Controller supported by Linux thanks to its device tree binding.

Now that we have the DT validation in place, let's convert the device tree bindings for that driver over to a YAML schema.

---

Quoted 8 lines

Changes from v1:
- Removed the example and moved it in the mfd schema

---
 .../devicetree/bindings/gpio/gpio-axp209.txt  | 75 -------------------
 .../bindings/gpio/x-powers,axp209-gpio.yaml   | 55 ++++++++++++++
 2 files changed, 55 insertions(+), 75 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-axp209.txt
 create mode 100644 Documentation/devicetree/bindings/gpio/x-powers,axp209-gpio.yaml

Applied, thanks.

Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
#16 lore raw
Quoted 27 lines · Lee Jones
Quoted 15 lines · Maxime Ripard

The X-Powers AXP PMICs feature a GPIO Controller supported by Linux thanks to its device tree binding.

Now that we have the DT validation in place, let's convert the device tree bindings for that driver over to a YAML schema.

---

Quoted 8 lines

Changes from v1:
- Removed the example and moved it in the mfd schema

---
 .../devicetree/bindings/gpio/gpio-axp209.txt  | 75 -------------------
 .../bindings/gpio/x-powers,axp209-gpio.yaml   | 55 ++++++++++++++
 2 files changed, 55 insertions(+), 75 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-axp209.txt
 create mode 100644 Documentation/devicetree/bindings/gpio/x-powers,axp209-gpio.yaml
Quoted 1 line

Applied, thanks.

Pushed out? Still failing in linux-next.

Rob

#17 lore raw
Quoted 28 lines · Rob Herring
Quoted 27 lines · Lee Jones
Quoted 23 lines · Maxime Ripard

The X-Powers AXP PMICs feature a GPIO Controller supported by Linux thanks to its device tree binding.

Now that we have the DT validation in place, let's convert the device tree bindings for that driver over to a YAML schema.

---

Changes from v1:
- Removed the example and moved it in the mfd schema

---
 .../devicetree/bindings/gpio/gpio-axp209.txt  | 75 -------------------
 .../bindings/gpio/x-powers,axp209-gpio.yaml   | 55 ++++++++++++++
 2 files changed, 55 insertions(+), 75 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-axp209.txt
 create mode 100644 Documentation/devicetree/bindings/gpio/x-powers,axp209-gpio.yaml
Quoted 3 lines
Quoted 1 line

Applied, thanks.

Pushed out? Still failing in linux-next.

No, but I did a push ~10mins ago, so will be in -next on the morrow.

Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog