All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] sunxi: gpio: add missing compatible strings
@ 2017-06-29 10:10 Andre Przywara
  2017-06-29 10:26 ` Icenowy Zheng
  0 siblings, 1 reply; 4+ messages in thread
From: Andre Przywara @ 2017-06-29 10:10 UTC (permalink / raw)
  To: u-boot

The sunxi GPIO driver is missing some compatible strings for recent
SoCs. While most of the sunxi GPIO code seems to not rely on this (and
so works anyway), the sunxi_name_to_gpio() function does and fails at
the moment (for instance when resolving the MMC CD pin name).
Add the compatible strings for the A64, H5 and V3s, which were missing
from the list. This now covers all pinctrl nodes in our own DTs.
Strictly speaking the V3s has only ports B, C, E, F and G, but I think
the other SoCs have gaps in there as well and for the pin number
computation this does not matter.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 drivers/gpio/sunxi_gpio.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c
index b47cc66..d20a7e7 100644
--- a/drivers/gpio/sunxi_gpio.c
+++ b/drivers/gpio/sunxi_gpio.c
@@ -353,12 +353,16 @@ static const struct udevice_id sunxi_gpio_ids[] = {
 	ID("allwinner,sun8i-a83t-pinctrl",	a_all),
 	ID("allwinner,sun8i-h3-pinctrl",	a_all),
 	ID("allwinner,sun8i-r40-pinctrl",	a_all),
+	ID("allwinner,sun8i-v3s-pinctrl",	a_all),
 	ID("allwinner,sun9i-a80-pinctrl",	a_all),
+	ID("allwinner,sun50i-a64-pinctrl",	a_all),
+	ID("allwinner,sun50i-h5-pinctrl",	a_all),
 	ID("allwinner,sun6i-a31-r-pinctrl",	l_2),
 	ID("allwinner,sun8i-a23-r-pinctrl",	l_1),
 	ID("allwinner,sun8i-a83t-r-pinctrl",	l_1),
 	ID("allwinner,sun8i-h3-r-pinctrl",	l_1),
 	ID("allwinner,sun9i-a80-r-pinctrl",	l_3),
+	ID("allwinner,sun50i-a64-r-pinctrl",	l_1),
 	{ }
 };
 
-- 
2.9.0

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

* [U-Boot] [PATCH] sunxi: gpio: add missing compatible strings
  2017-06-29 10:10 [U-Boot] [PATCH] sunxi: gpio: add missing compatible strings Andre Przywara
@ 2017-06-29 10:26 ` Icenowy Zheng
  2017-08-11 11:16   ` Jagan Teki
  0 siblings, 1 reply; 4+ messages in thread
From: Icenowy Zheng @ 2017-06-29 10:26 UTC (permalink / raw)
  To: u-boot



于 2017年6月29日 GMT+08:00 下午6:10:31, Andre Przywara <andre.przywara@arm.com> 写到:
>The sunxi GPIO driver is missing some compatible strings for recent
>SoCs. While most of the sunxi GPIO code seems to not rely on this (and
>so works anyway), the sunxi_name_to_gpio() function does and fails at
>the moment (for instance when resolving the MMC CD pin name).
>Add the compatible strings for the A64, H5 and V3s, which were missing
>from the list. This now covers all pinctrl nodes in our own DTs.
>Strictly speaking the V3s has only ports B, C, E, F and G, but I think
>the other SoCs have gaps in there as well and for the pin number

Yes, the current U-Boot driver doesn't care gaps at all, and I remember
A64 has also no A bank.

>computation this does not matter.
>
>Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>---
> drivers/gpio/sunxi_gpio.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
>diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c
>index b47cc66..d20a7e7 100644
>--- a/drivers/gpio/sunxi_gpio.c
>+++ b/drivers/gpio/sunxi_gpio.c
>@@ -353,12 +353,16 @@ static const struct udevice_id sunxi_gpio_ids[] =
>{
> 	ID("allwinner,sun8i-a83t-pinctrl",	a_all),
> 	ID("allwinner,sun8i-h3-pinctrl",	a_all),
> 	ID("allwinner,sun8i-r40-pinctrl",	a_all),
>+	ID("allwinner,sun8i-v3s-pinctrl",	a_all),
> 	ID("allwinner,sun9i-a80-pinctrl",	a_all),
>+	ID("allwinner,sun50i-a64-pinctrl",	a_all),
>+	ID("allwinner,sun50i-h5-pinctrl",	a_all),
> 	ID("allwinner,sun6i-a31-r-pinctrl",	l_2),
> 	ID("allwinner,sun8i-a23-r-pinctrl",	l_1),
> 	ID("allwinner,sun8i-a83t-r-pinctrl",	l_1),
> 	ID("allwinner,sun8i-h3-r-pinctrl",	l_1),
> 	ID("allwinner,sun9i-a80-r-pinctrl",	l_3),
>+	ID("allwinner,sun50i-a64-r-pinctrl",	l_1),
> 	{ }
> };
> 

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

* [U-Boot] [PATCH] sunxi: gpio: add missing compatible strings
  2017-06-29 10:26 ` Icenowy Zheng
@ 2017-08-11 11:16   ` Jagan Teki
  2017-09-18 21:01     ` André Przywara
  0 siblings, 1 reply; 4+ messages in thread
From: Jagan Teki @ 2017-08-11 11:16 UTC (permalink / raw)
  To: u-boot

On Thu, Jun 29, 2017 at 3:56 PM, Icenowy Zheng <icenowy@aosc.io> wrote:
>
>
> 于 2017年6月29日 GMT+08:00 下午6:10:31, Andre Przywara <andre.przywara@arm.com> 写到:
>>The sunxi GPIO driver is missing some compatible strings for recent
>>SoCs. While most of the sunxi GPIO code seems to not rely on this (and
>>so works anyway), the sunxi_name_to_gpio() function does and fails at
>>the moment (for instance when resolving the MMC CD pin name).
>>Add the compatible strings for the A64, H5 and V3s, which were missing
>>from the list. This now covers all pinctrl nodes in our own DTs.
>>Strictly speaking the V3s has only ports B, C, E, F and G, but I think
>>the other SoCs have gaps in there as well and for the pin number
>
> Yes, the current U-Boot driver doesn't care gaps at all, and I remember
> A64 has also no A bank.

then better have this change only when it required to do so.

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

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

* [U-Boot] [PATCH] sunxi: gpio: add missing compatible strings
  2017-08-11 11:16   ` Jagan Teki
@ 2017-09-18 21:01     ` André Przywara
  0 siblings, 0 replies; 4+ messages in thread
From: André Przywara @ 2017-09-18 21:01 UTC (permalink / raw)
  To: u-boot

On 11/08/17 12:16, Jagan Teki wrote:

Hi,

> On Thu, Jun 29, 2017 at 3:56 PM, Icenowy Zheng <icenowy@aosc.io> wrote:
>>
>>
>> 于 2017年6月29日 GMT+08:00 下午6:10:31, Andre Przywara <andre.przywara@arm.com> 写到:
>>> The sunxi GPIO driver is missing some compatible strings for recent
>>> SoCs. While most of the sunxi GPIO code seems to not rely on this (and
>>> so works anyway), the sunxi_name_to_gpio() function does and fails at
>>> the moment (for instance when resolving the MMC CD pin name).
>>> Add the compatible strings for the A64, H5 and V3s, which were missing
>> >from the list. This now covers all pinctrl nodes in our own DTs.
>>> Strictly speaking the V3s has only ports B, C, E, F and G, but I think
>>> the other SoCs have gaps in there as well and for the pin number
>>
>> Yes, the current U-Boot driver doesn't care gaps at all, and I remember
>> A64 has also no A bank.
> 
> then better have this change only when it required to do so.

Huh? I think there is a misunderstanding here:
My last sentence was pointing out that the description in this file is a
bit sloppy, since the naming "a_all" suggests all banks are there.
However what it actually means is that it starts counting from bank A
and uses consecutive registers - in contrast to the "-r-pinctrl" types.
And my understanding is that Icenowy just confirmed that.

And we need this change since we want (and can!) support the other
pinctrl devices as well - as mentioned in my commit message.

At the moment we fail to resolve the MMC CD pin name on the A64 and H5,
and this patch fixes that.

So are there objections to taking this patch? Am I missing something here?

Cheers,
Andre.

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

end of thread, other threads:[~2017-09-18 21:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-29 10:10 [U-Boot] [PATCH] sunxi: gpio: add missing compatible strings Andre Przywara
2017-06-29 10:26 ` Icenowy Zheng
2017-08-11 11:16   ` Jagan Teki
2017-09-18 21:01     ` André Przywara

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.