All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] AXP221/AXP223/AXP809 GPIO support
@ 2022-06-21  3:42 Samuel Holland
  2022-06-21  3:42 ` [PATCH v2 1/4] dt-bindings: gpio: Add AXP221/AXP223/AXP809 compatibles Samuel Holland
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Samuel Holland @ 2022-06-21  3:42 UTC (permalink / raw)
  To: Chen-Yu Tsai, Lee Jones, Linus Walleij, linux-gpio
  Cc: devicetree, Krzysztof Kozlowski, Rob Herring, Samuel Holland,
	Bartosz Golaszewski, linux-kernel

This series hooks up the GPIO controller found in some older X-Powers
PMICs. The main motivation is converting the U-Boot driver over to use
devicetree, but Linux might as well gain support for the hardware too.

Changes in v2:
 - Combine multiple "const"s in the binding into an "enum"

Samuel Holland (4):
  dt-bindings: gpio: Add AXP221/AXP223/AXP809 compatibles
  mfd: axp20x: Add AXP221/AXP223/AXP809 GPIO cells
  pinctrl: axp209: Support the AXP221/AXP223/AXP809 variant
  ARM: dts: axp22x/axp809: Add GPIO controller nodes

 .../bindings/gpio/x-powers,axp209-gpio.yaml   |  6 ++++++
 arch/arm/boot/dts/axp22x.dtsi                 | 18 ++++++++++++++++++
 arch/arm/boot/dts/axp809.dtsi                 | 19 +++++++++++++++++++
 drivers/mfd/axp20x.c                          |  9 +++++++++
 drivers/pinctrl/pinctrl-axp209.c              | 14 +++++++++++---
 5 files changed, 63 insertions(+), 3 deletions(-)

-- 
2.35.1


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

* [PATCH v2 1/4] dt-bindings: gpio: Add AXP221/AXP223/AXP809 compatibles
  2022-06-21  3:42 [PATCH v2 0/4] AXP221/AXP223/AXP809 GPIO support Samuel Holland
@ 2022-06-21  3:42 ` Samuel Holland
  2022-06-24 15:44   ` Krzysztof Kozlowski
                     ` (2 more replies)
  2022-06-21  3:42 ` [PATCH v2 2/4] mfd: axp20x: Add AXP221/AXP223/AXP809 GPIO cells Samuel Holland
                   ` (2 subsequent siblings)
  3 siblings, 3 replies; 17+ messages in thread
From: Samuel Holland @ 2022-06-21  3:42 UTC (permalink / raw)
  To: Chen-Yu Tsai, Lee Jones, Linus Walleij, linux-gpio
  Cc: devicetree, Krzysztof Kozlowski, Rob Herring, Samuel Holland,
	Bartosz Golaszewski, linux-kernel

These PMICs each have 2 GPIOs with the same register layout as AXP813,
but without an ADC function.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---

Changes in v2:
 - Combine multiple "const"s in the binding into an "enum"

 .../devicetree/bindings/gpio/x-powers,axp209-gpio.yaml      | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpio/x-powers,axp209-gpio.yaml b/Documentation/devicetree/bindings/gpio/x-powers,axp209-gpio.yaml
index 0f628b088cec..14486aee97b4 100644
--- a/Documentation/devicetree/bindings/gpio/x-powers,axp209-gpio.yaml
+++ b/Documentation/devicetree/bindings/gpio/x-powers,axp209-gpio.yaml
@@ -19,7 +19,13 @@ properties:
     oneOf:
       - enum:
           - x-powers,axp209-gpio
+          - x-powers,axp221-gpio
           - x-powers,axp813-gpio
+      - items:
+          - enum:
+              - x-powers,axp223-gpio
+              - x-powers,axp809-gpio
+          - const: x-powers,axp221-gpio
       - items:
           - const: x-powers,axp803-gpio
           - const: x-powers,axp813-gpio
-- 
2.35.1


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

* [PATCH v2 2/4] mfd: axp20x: Add AXP221/AXP223/AXP809 GPIO cells
  2022-06-21  3:42 [PATCH v2 0/4] AXP221/AXP223/AXP809 GPIO support Samuel Holland
  2022-06-21  3:42 ` [PATCH v2 1/4] dt-bindings: gpio: Add AXP221/AXP223/AXP809 compatibles Samuel Holland
@ 2022-06-21  3:42 ` Samuel Holland
  2022-06-26 12:59   ` Chen-Yu Tsai
  2022-06-28 14:03   ` Linus Walleij
  2022-06-21  3:42 ` [PATCH v2 3/4] pinctrl: axp209: Support the AXP221/AXP223/AXP809 variant Samuel Holland
  2022-06-21  3:42 ` [PATCH v2 4/4] ARM: dts: axp22x/axp809: Add GPIO controller nodes Samuel Holland
  3 siblings, 2 replies; 17+ messages in thread
From: Samuel Holland @ 2022-06-21  3:42 UTC (permalink / raw)
  To: Chen-Yu Tsai, Lee Jones, Linus Walleij, linux-gpio
  Cc: devicetree, Krzysztof Kozlowski, Rob Herring, Samuel Holland,
	Bartosz Golaszewski, linux-kernel

These PMICs all contain a compatible GPIO controller.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---

(no changes since v1)

 drivers/mfd/axp20x.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
index 8161a5dc68e8..88a212a8168c 100644
--- a/drivers/mfd/axp20x.c
+++ b/drivers/mfd/axp20x.c
@@ -619,6 +619,9 @@ static const struct mfd_cell axp20x_cells[] = {
 
 static const struct mfd_cell axp221_cells[] = {
 	{
+		.name		= "axp20x-gpio",
+		.of_compatible	= "x-powers,axp221-gpio",
+	}, {
 		.name		= "axp221-pek",
 		.num_resources	= ARRAY_SIZE(axp22x_pek_resources),
 		.resources	= axp22x_pek_resources,
@@ -645,6 +648,9 @@ static const struct mfd_cell axp221_cells[] = {
 
 static const struct mfd_cell axp223_cells[] = {
 	{
+		.name		= "axp20x-gpio",
+		.of_compatible	= "x-powers,axp221-gpio",
+	}, {
 		.name		= "axp221-pek",
 		.num_resources	= ARRAY_SIZE(axp22x_pek_resources),
 		.resources	= axp22x_pek_resources,
@@ -785,6 +791,9 @@ static const struct mfd_cell axp806_cells[] = {
 
 static const struct mfd_cell axp809_cells[] = {
 	{
+		.name		= "axp20x-gpio",
+		.of_compatible	= "x-powers,axp221-gpio",
+	}, {
 		.name		= "axp221-pek",
 		.num_resources	= ARRAY_SIZE(axp809_pek_resources),
 		.resources	= axp809_pek_resources,
-- 
2.35.1


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

* [PATCH v2 3/4] pinctrl: axp209: Support the AXP221/AXP223/AXP809 variant
  2022-06-21  3:42 [PATCH v2 0/4] AXP221/AXP223/AXP809 GPIO support Samuel Holland
  2022-06-21  3:42 ` [PATCH v2 1/4] dt-bindings: gpio: Add AXP221/AXP223/AXP809 compatibles Samuel Holland
  2022-06-21  3:42 ` [PATCH v2 2/4] mfd: axp20x: Add AXP221/AXP223/AXP809 GPIO cells Samuel Holland
@ 2022-06-21  3:42 ` Samuel Holland
  2022-06-26 12:54   ` Chen-Yu Tsai
  2022-06-30 12:06   ` Linus Walleij
  2022-06-21  3:42 ` [PATCH v2 4/4] ARM: dts: axp22x/axp809: Add GPIO controller nodes Samuel Holland
  3 siblings, 2 replies; 17+ messages in thread
From: Samuel Holland @ 2022-06-21  3:42 UTC (permalink / raw)
  To: Chen-Yu Tsai, Lee Jones, Linus Walleij, linux-gpio
  Cc: devicetree, Krzysztof Kozlowski, Rob Herring, Samuel Holland,
	Bartosz Golaszewski, linux-kernel

These PMICs each have 2 GPIOs with the same register layout as AXP813,
but without an ADC function. They all fall back to the AXP221 compatible
string, so only that one needs to be listed in the driver.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---

(no changes since v1)

 drivers/pinctrl/pinctrl-axp209.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-axp209.c b/drivers/pinctrl/pinctrl-axp209.c
index 207cbae3a7bf..7ab20ac15391 100644
--- a/drivers/pinctrl/pinctrl-axp209.c
+++ b/drivers/pinctrl/pinctrl-axp209.c
@@ -73,7 +73,7 @@ static const struct pinctrl_pin_desc axp209_pins[] = {
 	PINCTRL_PIN(2, "GPIO2"),
 };
 
-static const struct pinctrl_pin_desc axp813_pins[] = {
+static const struct pinctrl_pin_desc axp22x_pins[] = {
 	PINCTRL_PIN(0, "GPIO0"),
 	PINCTRL_PIN(1, "GPIO1"),
 };
@@ -87,9 +87,16 @@ static const struct axp20x_pctrl_desc axp20x_data = {
 	.adc_mux = AXP20X_MUX_ADC,
 };
 
+static const struct axp20x_pctrl_desc axp22x_data = {
+	.pins	= axp22x_pins,
+	.npins	= ARRAY_SIZE(axp22x_pins),
+	.ldo_mask = BIT(0) | BIT(1),
+	.gpio_status_offset = 0,
+};
+
 static const struct axp20x_pctrl_desc axp813_data = {
-	.pins	= axp813_pins,
-	.npins	= ARRAY_SIZE(axp813_pins),
+	.pins	= axp22x_pins,
+	.npins	= ARRAY_SIZE(axp22x_pins),
 	.ldo_mask = BIT(0) | BIT(1),
 	.adc_mask = BIT(0),
 	.gpio_status_offset = 0,
@@ -388,6 +395,7 @@ static int axp20x_build_funcs_groups(struct platform_device *pdev)
 
 static const struct of_device_id axp20x_pctl_match[] = {
 	{ .compatible = "x-powers,axp209-gpio", .data = &axp20x_data, },
+	{ .compatible = "x-powers,axp221-gpio", .data = &axp22x_data, },
 	{ .compatible = "x-powers,axp813-gpio", .data = &axp813_data, },
 	{ }
 };
-- 
2.35.1


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

* [PATCH v2 4/4] ARM: dts: axp22x/axp809: Add GPIO controller nodes
  2022-06-21  3:42 [PATCH v2 0/4] AXP221/AXP223/AXP809 GPIO support Samuel Holland
                   ` (2 preceding siblings ...)
  2022-06-21  3:42 ` [PATCH v2 3/4] pinctrl: axp209: Support the AXP221/AXP223/AXP809 variant Samuel Holland
@ 2022-06-21  3:42 ` Samuel Holland
  2022-06-26 13:03   ` Chen-Yu Tsai
  3 siblings, 1 reply; 17+ messages in thread
From: Samuel Holland @ 2022-06-21  3:42 UTC (permalink / raw)
  To: Chen-Yu Tsai, Lee Jones, Linus Walleij, linux-gpio
  Cc: devicetree, Krzysztof Kozlowski, Rob Herring, Samuel Holland,
	Bartosz Golaszewski, linux-kernel

These PMICs all contain a GPIO controller. Now that the binding is
documented, wire up the controller in the device tree.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---

(no changes since v1)

 arch/arm/boot/dts/axp22x.dtsi | 18 ++++++++++++++++++
 arch/arm/boot/dts/axp809.dtsi | 19 +++++++++++++++++++
 2 files changed, 37 insertions(+)

diff --git a/arch/arm/boot/dts/axp22x.dtsi b/arch/arm/boot/dts/axp22x.dtsi
index a020c12b2884..5c233c84be92 100644
--- a/arch/arm/boot/dts/axp22x.dtsi
+++ b/arch/arm/boot/dts/axp22x.dtsi
@@ -67,6 +67,24 @@ battery_power_supply: battery-power {
 		status = "disabled";
 	};
 
+	axp_gpio: gpio {
+		compatible = "x-powers,axp221-gpio";
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		/omit-if-no-ref/
+		gpio0_ldo: gpio0-ldo-pin {
+			pins = "GPIO0";
+			function = "ldo";
+		};
+
+		/omit-if-no-ref/
+		gpio1_ldo: gpio1-ldo-pin {
+			pins = "GPIO1";
+			function = "ldo";
+		};
+	};
+
 	regulators {
 		/* Default work frequency for buck regulators */
 		x-powers,dcdc-freq = <3000>;
diff --git a/arch/arm/boot/dts/axp809.dtsi b/arch/arm/boot/dts/axp809.dtsi
index ab8e5f2d9246..da92b105f3b0 100644
--- a/arch/arm/boot/dts/axp809.dtsi
+++ b/arch/arm/boot/dts/axp809.dtsi
@@ -50,4 +50,23 @@ &axp809 {
 	compatible = "x-powers,axp809";
 	interrupt-controller;
 	#interrupt-cells = <1>;
+
+	axp_gpio: gpio {
+		compatible = "x-powers,axp809-gpio",
+			     "x-powers,axp221-gpio";
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		/omit-if-no-ref/
+		gpio0_ldo: gpio0-ldo-pin {
+			pins = "GPIO0";
+			function = "ldo";
+		};
+
+		/omit-if-no-ref/
+		gpio1_ldo: gpio1-ldo-pin {
+			pins = "GPIO1";
+			function = "ldo";
+		};
+	};
 };
-- 
2.35.1


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

* Re: [PATCH v2 1/4] dt-bindings: gpio: Add AXP221/AXP223/AXP809 compatibles
  2022-06-21  3:42 ` [PATCH v2 1/4] dt-bindings: gpio: Add AXP221/AXP223/AXP809 compatibles Samuel Holland
@ 2022-06-24 15:44   ` Krzysztof Kozlowski
  2022-06-26 12:56   ` Chen-Yu Tsai
  2022-06-30 12:05   ` Linus Walleij
  2 siblings, 0 replies; 17+ messages in thread
From: Krzysztof Kozlowski @ 2022-06-24 15:44 UTC (permalink / raw)
  To: Samuel Holland, Chen-Yu Tsai, Lee Jones, Linus Walleij, linux-gpio
  Cc: devicetree, Krzysztof Kozlowski, Rob Herring,
	Bartosz Golaszewski, linux-kernel

On 21/06/2022 05:42, Samuel Holland wrote:
> These PMICs each have 2 GPIOs with the same register layout as AXP813,
> but without an ADC function.
> 
> Signed-off-by: Samuel Holland <samuel@sholland.org>
> ---
> 
> Changes in v2:
>  - Combine multiple "const"s in the binding into an "enum"
> 
>  .../devicetree/bindings/gpio/x-powers,axp209-gpio.yaml      | 6 ++++++
>  1 file changed, 6 insertions(+)


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof

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

* Re: [PATCH v2 3/4] pinctrl: axp209: Support the AXP221/AXP223/AXP809 variant
  2022-06-21  3:42 ` [PATCH v2 3/4] pinctrl: axp209: Support the AXP221/AXP223/AXP809 variant Samuel Holland
@ 2022-06-26 12:54   ` Chen-Yu Tsai
  2022-06-30 12:06   ` Linus Walleij
  1 sibling, 0 replies; 17+ messages in thread
From: Chen-Yu Tsai @ 2022-06-26 12:54 UTC (permalink / raw)
  To: Samuel Holland
  Cc: Lee Jones, Linus Walleij, open list:GPIO SUBSYSTEM, devicetree,
	Krzysztof Kozlowski, Rob Herring, Bartosz Golaszewski,
	linux-kernel

On Tue, Jun 21, 2022 at 11:42 AM Samuel Holland <samuel@sholland.org> wrote:
>
> These PMICs each have 2 GPIOs with the same register layout as AXP813,
> but without an ADC function. They all fall back to the AXP221 compatible
> string, so only that one needs to be listed in the driver.
>
> Signed-off-by: Samuel Holland <samuel@sholland.org>

Reviewed-by: Chen-Yu Tsai <wens@csie.org>

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

* Re: [PATCH v2 1/4] dt-bindings: gpio: Add AXP221/AXP223/AXP809 compatibles
  2022-06-21  3:42 ` [PATCH v2 1/4] dt-bindings: gpio: Add AXP221/AXP223/AXP809 compatibles Samuel Holland
  2022-06-24 15:44   ` Krzysztof Kozlowski
@ 2022-06-26 12:56   ` Chen-Yu Tsai
  2022-06-30 12:05   ` Linus Walleij
  2 siblings, 0 replies; 17+ messages in thread
From: Chen-Yu Tsai @ 2022-06-26 12:56 UTC (permalink / raw)
  To: Samuel Holland
  Cc: Lee Jones, Linus Walleij, open list:GPIO SUBSYSTEM, devicetree,
	Krzysztof Kozlowski, Rob Herring, Bartosz Golaszewski,
	linux-kernel

On Tue, Jun 21, 2022 at 11:42 AM Samuel Holland <samuel@sholland.org> wrote:
>
> These PMICs each have 2 GPIOs with the same register layout as AXP813,
> but without an ADC function.
>
> Signed-off-by: Samuel Holland <samuel@sholland.org>

Reviewed-by: Chen-Yu Tsai <wens@csie.org>

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

* Re: [PATCH v2 2/4] mfd: axp20x: Add AXP221/AXP223/AXP809 GPIO cells
  2022-06-21  3:42 ` [PATCH v2 2/4] mfd: axp20x: Add AXP221/AXP223/AXP809 GPIO cells Samuel Holland
@ 2022-06-26 12:59   ` Chen-Yu Tsai
  2022-06-28 14:03   ` Linus Walleij
  1 sibling, 0 replies; 17+ messages in thread
From: Chen-Yu Tsai @ 2022-06-26 12:59 UTC (permalink / raw)
  To: Samuel Holland
  Cc: Lee Jones, Linus Walleij, open list:GPIO SUBSYSTEM, devicetree,
	Krzysztof Kozlowski, Rob Herring, Bartosz Golaszewski,
	linux-kernel

On Tue, Jun 21, 2022 at 11:42 AM Samuel Holland <samuel@sholland.org> wrote:
>
> These PMICs all contain a compatible GPIO controller.
>
> Signed-off-by: Samuel Holland <samuel@sholland.org>

Reviewed-by: Chen-Yu Tsai <wens@csie.org>

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

* Re: [PATCH v2 4/4] ARM: dts: axp22x/axp809: Add GPIO controller nodes
  2022-06-21  3:42 ` [PATCH v2 4/4] ARM: dts: axp22x/axp809: Add GPIO controller nodes Samuel Holland
@ 2022-06-26 13:03   ` Chen-Yu Tsai
  2022-09-16  4:16     ` Samuel Holland
  0 siblings, 1 reply; 17+ messages in thread
From: Chen-Yu Tsai @ 2022-06-26 13:03 UTC (permalink / raw)
  To: Samuel Holland
  Cc: Lee Jones, Linus Walleij, open list:GPIO SUBSYSTEM, devicetree,
	Krzysztof Kozlowski, Rob Herring, Bartosz Golaszewski,
	linux-kernel

On Tue, Jun 21, 2022 at 11:42 AM Samuel Holland <samuel@sholland.org> wrote:
>
> These PMICs all contain a GPIO controller. Now that the binding is
> documented, wire up the controller in the device tree.
>
> Signed-off-by: Samuel Holland <samuel@sholland.org>
> ---
>
> (no changes since v1)
>
>  arch/arm/boot/dts/axp22x.dtsi | 18 ++++++++++++++++++
>  arch/arm/boot/dts/axp809.dtsi | 19 +++++++++++++++++++
>  2 files changed, 37 insertions(+)
>
> diff --git a/arch/arm/boot/dts/axp22x.dtsi b/arch/arm/boot/dts/axp22x.dtsi
> index a020c12b2884..5c233c84be92 100644
> --- a/arch/arm/boot/dts/axp22x.dtsi
> +++ b/arch/arm/boot/dts/axp22x.dtsi
> @@ -67,6 +67,24 @@ battery_power_supply: battery-power {
>                 status = "disabled";
>         };
>
> +       axp_gpio: gpio {
> +               compatible = "x-powers,axp221-gpio";
> +               gpio-controller;
> +               #gpio-cells = <2>;
> +
> +               /omit-if-no-ref/
> +               gpio0_ldo: gpio0-ldo-pin {
> +                       pins = "GPIO0";
> +                       function = "ldo";
> +               };
> +
> +               /omit-if-no-ref/
> +               gpio1_ldo: gpio1-ldo-pin {
> +                       pins = "GPIO1";
> +                       function = "ldo";
> +               };
> +       };
> +

We have

    reg_ldo_io0: ldo-io0 {
            pinctrl-names = "default";
            pinctrl-0 = <&gpio0_ldo>;
            /* Disable by default to avoid conflicts with GPIO */
            ...
    }

in axp81x.dtsi . Should we add it here and for axp803.dtsi as well?

Otherwise,

Reviewed-by: Chen-Yu Tsai <wens@csie.org>

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

* Re: [PATCH v2 2/4] mfd: axp20x: Add AXP221/AXP223/AXP809 GPIO cells
  2022-06-21  3:42 ` [PATCH v2 2/4] mfd: axp20x: Add AXP221/AXP223/AXP809 GPIO cells Samuel Holland
  2022-06-26 12:59   ` Chen-Yu Tsai
@ 2022-06-28 14:03   ` Linus Walleij
  2022-06-29  2:26     ` Samuel Holland
  1 sibling, 1 reply; 17+ messages in thread
From: Linus Walleij @ 2022-06-28 14:03 UTC (permalink / raw)
  To: Samuel Holland, Lee Jones
  Cc: Chen-Yu Tsai, linux-gpio, devicetree, Krzysztof Kozlowski,
	Rob Herring, Bartosz Golaszewski, linux-kernel

On Tue, Jun 21, 2022 at 5:42 AM Samuel Holland <samuel@sholland.org> wrote:

> These PMICs all contain a compatible GPIO controller.
>
> Signed-off-by: Samuel Holland <samuel@sholland.org>

If I can get Lee's ACK on this patch I suppose I can apply patches
1-3 to the pin control tree?

Yours,
Linus Walleij

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

* Re: [PATCH v2 2/4] mfd: axp20x: Add AXP221/AXP223/AXP809 GPIO cells
  2022-06-28 14:03   ` Linus Walleij
@ 2022-06-29  2:26     ` Samuel Holland
  2022-06-29  9:19       ` Lee Jones
  0 siblings, 1 reply; 17+ messages in thread
From: Samuel Holland @ 2022-06-29  2:26 UTC (permalink / raw)
  To: Linus Walleij, Lee Jones
  Cc: Chen-Yu Tsai, linux-gpio, devicetree, Krzysztof Kozlowski,
	Rob Herring, Bartosz Golaszewski, linux-kernel

On 6/28/22 9:03 AM, Linus Walleij wrote:
> On Tue, Jun 21, 2022 at 5:42 AM Samuel Holland <samuel@sholland.org> wrote:
> 
>> These PMICs all contain a compatible GPIO controller.
>>
>> Signed-off-by: Samuel Holland <samuel@sholland.org>
> 
> If I can get Lee's ACK on this patch I suppose I can apply patches
> 1-3 to the pin control tree?

Looks like he already applied v1 of this patch (which was identical):

https://lore.kernel.org/lkml/YrnZof9lwsIQCqu7@google.com/

Regards,
Samuel

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

* Re: [PATCH v2 2/4] mfd: axp20x: Add AXP221/AXP223/AXP809 GPIO cells
  2022-06-29  2:26     ` Samuel Holland
@ 2022-06-29  9:19       ` Lee Jones
  2022-06-30 12:03         ` Linus Walleij
  0 siblings, 1 reply; 17+ messages in thread
From: Lee Jones @ 2022-06-29  9:19 UTC (permalink / raw)
  To: Samuel Holland
  Cc: Linus Walleij, Chen-Yu Tsai, linux-gpio, devicetree,
	Krzysztof Kozlowski, Rob Herring, Bartosz Golaszewski,
	linux-kernel

On Tue, 28 Jun 2022, Samuel Holland wrote:

> On 6/28/22 9:03 AM, Linus Walleij wrote:
> > On Tue, Jun 21, 2022 at 5:42 AM Samuel Holland <samuel@sholland.org> wrote:
> > 
> >> These PMICs all contain a compatible GPIO controller.
> >>
> >> Signed-off-by: Samuel Holland <samuel@sholland.org>
> > 
> > If I can get Lee's ACK on this patch I suppose I can apply patches
> > 1-3 to the pin control tree?
> 
> Looks like he already applied v1 of this patch (which was identical):
> 
> https://lore.kernel.org/lkml/YrnZof9lwsIQCqu7@google.com/

Right, you don't need this one Linus.

Please take the others.

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

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

* Re: [PATCH v2 2/4] mfd: axp20x: Add AXP221/AXP223/AXP809 GPIO cells
  2022-06-29  9:19       ` Lee Jones
@ 2022-06-30 12:03         ` Linus Walleij
  0 siblings, 0 replies; 17+ messages in thread
From: Linus Walleij @ 2022-06-30 12:03 UTC (permalink / raw)
  To: Lee Jones
  Cc: Samuel Holland, Chen-Yu Tsai, linux-gpio, devicetree,
	Krzysztof Kozlowski, Rob Herring, Bartosz Golaszewski,
	linux-kernel

On Wed, Jun 29, 2022 at 11:19 AM Lee Jones <lee.jones@linaro.org> wrote:
> On Tue, 28 Jun 2022, Samuel Holland wrote:
>
> > On 6/28/22 9:03 AM, Linus Walleij wrote:
> > > On Tue, Jun 21, 2022 at 5:42 AM Samuel Holland <samuel@sholland.org> wrote:
> > >
> > >> These PMICs all contain a compatible GPIO controller.
> > >>
> > >> Signed-off-by: Samuel Holland <samuel@sholland.org>
> > >
> > > If I can get Lee's ACK on this patch I suppose I can apply patches
> > > 1-3 to the pin control tree?
> >
> > Looks like he already applied v1 of this patch (which was identical):
> >
> > https://lore.kernel.org/lkml/YrnZof9lwsIQCqu7@google.com/
>
> Right, you don't need this one Linus.
>
> Please take the others.

True! No compile-time dependence.

I'll queue the others.

Yours,
Linus Walleij

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

* Re: [PATCH v2 1/4] dt-bindings: gpio: Add AXP221/AXP223/AXP809 compatibles
  2022-06-21  3:42 ` [PATCH v2 1/4] dt-bindings: gpio: Add AXP221/AXP223/AXP809 compatibles Samuel Holland
  2022-06-24 15:44   ` Krzysztof Kozlowski
  2022-06-26 12:56   ` Chen-Yu Tsai
@ 2022-06-30 12:05   ` Linus Walleij
  2 siblings, 0 replies; 17+ messages in thread
From: Linus Walleij @ 2022-06-30 12:05 UTC (permalink / raw)
  To: Samuel Holland
  Cc: Chen-Yu Tsai, Lee Jones, linux-gpio, devicetree,
	Krzysztof Kozlowski, Rob Herring, Bartosz Golaszewski,
	linux-kernel

On Tue, Jun 21, 2022 at 5:42 AM Samuel Holland <samuel@sholland.org> wrote:

> These PMICs each have 2 GPIOs with the same register layout as AXP813,
> but without an ADC function.
>
> Signed-off-by: Samuel Holland <samuel@sholland.org>

Patch applied to the pinctrl tree.

OK the binding is in *gpio* but the driver is in pinctrl so has to go
with the other patch in my tree.

Yours,
Linus Walleij

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

* Re: [PATCH v2 3/4] pinctrl: axp209: Support the AXP221/AXP223/AXP809 variant
  2022-06-21  3:42 ` [PATCH v2 3/4] pinctrl: axp209: Support the AXP221/AXP223/AXP809 variant Samuel Holland
  2022-06-26 12:54   ` Chen-Yu Tsai
@ 2022-06-30 12:06   ` Linus Walleij
  1 sibling, 0 replies; 17+ messages in thread
From: Linus Walleij @ 2022-06-30 12:06 UTC (permalink / raw)
  To: Samuel Holland
  Cc: Chen-Yu Tsai, Lee Jones, linux-gpio, devicetree,
	Krzysztof Kozlowski, Rob Herring, Bartosz Golaszewski,
	linux-kernel

On Tue, Jun 21, 2022 at 5:42 AM Samuel Holland <samuel@sholland.org> wrote:

> These PMICs each have 2 GPIOs with the same register layout as AXP813,
> but without an ADC function. They all fall back to the AXP221 compatible
> string, so only that one needs to be listed in the driver.
>
> Signed-off-by: Samuel Holland <samuel@sholland.org>

Patch applied to the pinctrl tree!

Yours,
Linus Walleij

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

* Re: [PATCH v2 4/4] ARM: dts: axp22x/axp809: Add GPIO controller nodes
  2022-06-26 13:03   ` Chen-Yu Tsai
@ 2022-09-16  4:16     ` Samuel Holland
  0 siblings, 0 replies; 17+ messages in thread
From: Samuel Holland @ 2022-09-16  4:16 UTC (permalink / raw)
  To: wens
  Cc: Lee Jones, Linus Walleij, open list:GPIO SUBSYSTEM, devicetree,
	Krzysztof Kozlowski, Rob Herring, Bartosz Golaszewski,
	linux-kernel, Jernej Skrabec, linux-sunxi

On 6/26/22 08:03, Chen-Yu Tsai wrote:
> On Tue, Jun 21, 2022 at 11:42 AM Samuel Holland <samuel@sholland.org> wrote:
>>
>> These PMICs all contain a GPIO controller. Now that the binding is
>> documented, wire up the controller in the device tree.
>>
>> Signed-off-by: Samuel Holland <samuel@sholland.org>
>> ---
>>
>> (no changes since v1)
>>
>>  arch/arm/boot/dts/axp22x.dtsi | 18 ++++++++++++++++++
>>  arch/arm/boot/dts/axp809.dtsi | 19 +++++++++++++++++++
>>  2 files changed, 37 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/axp22x.dtsi b/arch/arm/boot/dts/axp22x.dtsi
>> index a020c12b2884..5c233c84be92 100644
>> --- a/arch/arm/boot/dts/axp22x.dtsi
>> +++ b/arch/arm/boot/dts/axp22x.dtsi
>> @@ -67,6 +67,24 @@ battery_power_supply: battery-power {
>>                 status = "disabled";
>>         };
>>
>> +       axp_gpio: gpio {
>> +               compatible = "x-powers,axp221-gpio";
>> +               gpio-controller;
>> +               #gpio-cells = <2>;
>> +
>> +               /omit-if-no-ref/
>> +               gpio0_ldo: gpio0-ldo-pin {
>> +                       pins = "GPIO0";
>> +                       function = "ldo";
>> +               };
>> +
>> +               /omit-if-no-ref/
>> +               gpio1_ldo: gpio1-ldo-pin {
>> +                       pins = "GPIO1";
>> +                       function = "ldo";
>> +               };
>> +       };
>> +
> 
> We have
> 
>     reg_ldo_io0: ldo-io0 {
>             pinctrl-names = "default";
>             pinctrl-0 = <&gpio0_ldo>;
>             /* Disable by default to avoid conflicts with GPIO */
>             ...
>     }
> 
> in axp81x.dtsi . Should we add it here and for axp803.dtsi as well?

Actually, I don't think these pinctrl nodes should exist at all. The
regulator already sets the pinmux, because that is the only way to turn
the regulator on/off. So I think we should leave it alone here.

Regards,
Samuel

> Otherwise,
> 
> Reviewed-by: Chen-Yu Tsai <wens@csie.org>


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

end of thread, other threads:[~2022-09-16  4:16 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-21  3:42 [PATCH v2 0/4] AXP221/AXP223/AXP809 GPIO support Samuel Holland
2022-06-21  3:42 ` [PATCH v2 1/4] dt-bindings: gpio: Add AXP221/AXP223/AXP809 compatibles Samuel Holland
2022-06-24 15:44   ` Krzysztof Kozlowski
2022-06-26 12:56   ` Chen-Yu Tsai
2022-06-30 12:05   ` Linus Walleij
2022-06-21  3:42 ` [PATCH v2 2/4] mfd: axp20x: Add AXP221/AXP223/AXP809 GPIO cells Samuel Holland
2022-06-26 12:59   ` Chen-Yu Tsai
2022-06-28 14:03   ` Linus Walleij
2022-06-29  2:26     ` Samuel Holland
2022-06-29  9:19       ` Lee Jones
2022-06-30 12:03         ` Linus Walleij
2022-06-21  3:42 ` [PATCH v2 3/4] pinctrl: axp209: Support the AXP221/AXP223/AXP809 variant Samuel Holland
2022-06-26 12:54   ` Chen-Yu Tsai
2022-06-30 12:06   ` Linus Walleij
2022-06-21  3:42 ` [PATCH v2 4/4] ARM: dts: axp22x/axp809: Add GPIO controller nodes Samuel Holland
2022-06-26 13:03   ` Chen-Yu Tsai
2022-09-16  4:16     ` Samuel Holland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.