* [PATCH v1 0/2] riscv: add GPIO support for the LicheePi4A
@ 2024-09-20 9:05 bigunclemax
2024-09-20 9:05 ` [PATCH v1 1/2] gpio: dw: Add ngpios DT-property support bigunclemax
2024-09-20 9:05 ` [PATCH v1 2/2] configs: th1520_lpi4a: Enable CMD_GPIO, DM_GPIO and DWAPB_GPIO driver bigunclemax
0 siblings, 2 replies; 5+ messages in thread
From: bigunclemax @ 2024-09-20 9:05 UTC (permalink / raw)
Cc: bigunclemax, Wei Fu, Yixun Lan, Tom Rini, Ilias Apalodimas,
Sughosh Ganu, Simon Glass, u-boot
From: Maksim Kiselev <bigunclemax@gmail.com>
This series adds GPIO support for the LicheePi4A board.
It's based on Alibaba TH1520 SoC that has DesignWare APB GPIO controller.
Best regards,
Maksim
Maksim Kiselev (2):
gpio: dw: Add ngpios DT-property support
configs: th1520_lpi4a: Enable CMD_GPIO, DM_GPIO and DWAPB_GPIO driver
configs/th1520_lpi4a_defconfig | 4 +++-
drivers/gpio/dwapb_gpio.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
--
2.45.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v1 1/2] gpio: dw: Add ngpios DT-property support
2024-09-20 9:05 [PATCH v1 0/2] riscv: add GPIO support for the LicheePi4A bigunclemax
@ 2024-09-20 9:05 ` bigunclemax
2024-09-24 3:23 ` Leo Liang
2024-09-20 9:05 ` [PATCH v1 2/2] configs: th1520_lpi4a: Enable CMD_GPIO, DM_GPIO and DWAPB_GPIO driver bigunclemax
1 sibling, 1 reply; 5+ messages in thread
From: bigunclemax @ 2024-09-20 9:05 UTC (permalink / raw)
Cc: bigunclemax, Wei Fu, Yixun Lan, Tom Rini, Simon Glass,
Ilias Apalodimas, Sughosh Ganu, u-boot
From: Maksim Kiselev <bigunclemax@gmail.com>
Starting with Linux commit 7569486d79ae ("gpio: dwapb: Add ngpios
DT-property support") the "snps,nr-gpios" property was marked
as deprecated.
And since all newly added dw-apb-gpio nodes are described using generic
"ngpios" property, it's time to add support for it.
Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
---
drivers/gpio/dwapb_gpio.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpio/dwapb_gpio.c b/drivers/gpio/dwapb_gpio.c
index 7a6eae9ba1..04639a4cb6 100644
--- a/drivers/gpio/dwapb_gpio.c
+++ b/drivers/gpio/dwapb_gpio.c
@@ -177,7 +177,9 @@ static int gpio_dwapb_bind(struct udevice *dev)
plat->base = (void *)base;
plat->bank = bank;
- plat->pins = ofnode_read_u32_default(node, "snps,nr-gpios", 0);
+
+ if (ofnode_read_u32(node, "ngpios", &plat->pins))
+ plat->pins = ofnode_read_u32_default(node, "snps,nr-gpios", 0);
if (ofnode_read_string_index(node, "bank-name", 0,
&plat->name)) {
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v1 1/2] gpio: dw: Add ngpios DT-property support
2024-09-20 9:05 ` [PATCH v1 1/2] gpio: dw: Add ngpios DT-property support bigunclemax
@ 2024-09-24 3:23 ` Leo Liang
0 siblings, 0 replies; 5+ messages in thread
From: Leo Liang @ 2024-09-24 3:23 UTC (permalink / raw)
To: bigunclemax
Cc: Wei Fu, Yixun Lan, Tom Rini, Simon Glass, Ilias Apalodimas,
Sughosh Ganu, u-boot
On Fri, Sep 20, 2024 at 12:05:23PM +0300, bigunclemax@gmail.com wrote:
> From: Maksim Kiselev <bigunclemax@gmail.com>
>
> Starting with Linux commit 7569486d79ae ("gpio: dwapb: Add ngpios
> DT-property support") the "snps,nr-gpios" property was marked
> as deprecated.
>
> And since all newly added dw-apb-gpio nodes are described using generic
> "ngpios" property, it's time to add support for it.
>
> Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
> ---
> drivers/gpio/dwapb_gpio.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v1 2/2] configs: th1520_lpi4a: Enable CMD_GPIO, DM_GPIO and DWAPB_GPIO driver
2024-09-20 9:05 [PATCH v1 0/2] riscv: add GPIO support for the LicheePi4A bigunclemax
2024-09-20 9:05 ` [PATCH v1 1/2] gpio: dw: Add ngpios DT-property support bigunclemax
@ 2024-09-20 9:05 ` bigunclemax
2024-09-24 3:25 ` Leo Liang
1 sibling, 1 reply; 5+ messages in thread
From: bigunclemax @ 2024-09-20 9:05 UTC (permalink / raw)
Cc: bigunclemax, Wei Fu, Yixun Lan, Tom Rini, Simon Glass,
Sughosh Ganu, Ilias Apalodimas, u-boot
From: Maksim Kiselev <bigunclemax@gmail.com>
Enable GPIO command and DWAPB_GPIO driver for LicheePi4A board.
Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
---
configs/th1520_lpi4a_defconfig | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/configs/th1520_lpi4a_defconfig b/configs/th1520_lpi4a_defconfig
index db80e33870..bcb22730be 100644
--- a/configs/th1520_lpi4a_defconfig
+++ b/configs/th1520_lpi4a_defconfig
@@ -4,6 +4,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x3000
CONFIG_NR_DRAM_BANKS=1
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80200000
+CONFIG_DM_GPIO=y
CONFIG_DEFAULT_DEVICE_TREE="th1520-lichee-pi-4a"
CONFIG_SYS_LOAD_ADDR=0x80200000
# CONFIG_SMP is not set
@@ -49,6 +50,7 @@ CONFIG_CMD_BOOTMENU=y
# CONFIG_CMD_LZMADEC is not set
# CONFIG_CMD_UNLZ4 is not set
# CONFIG_CMD_UNZIP is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_LOADB is not set
# CONFIG_CMD_LOADS is not set
# CONFIG_CMD_ITEST is not set
@@ -60,7 +62,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_VERSION_VARIABLE=y
# CONFIG_NET is not set
# CONFIG_BLOCK_CACHE is not set
-# CONFIG_GPIO is not set
+CONFIG_DWAPB_GPIO=y
# CONFIG_I2C is not set
# CONFIG_INPUT is not set
# CONFIG_DM_MMC is not set
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1 2/2] configs: th1520_lpi4a: Enable CMD_GPIO, DM_GPIO and DWAPB_GPIO driver
2024-09-20 9:05 ` [PATCH v1 2/2] configs: th1520_lpi4a: Enable CMD_GPIO, DM_GPIO and DWAPB_GPIO driver bigunclemax
@ 2024-09-24 3:25 ` Leo Liang
0 siblings, 0 replies; 5+ messages in thread
From: Leo Liang @ 2024-09-24 3:25 UTC (permalink / raw)
To: bigunclemax
Cc: Wei Fu, Yixun Lan, Tom Rini, Simon Glass, Sughosh Ganu,
Ilias Apalodimas, u-boot
On Fri, Sep 20, 2024 at 12:05:24PM +0300, bigunclemax@gmail.com wrote:
> From: Maksim Kiselev <bigunclemax@gmail.com>
>
> Enable GPIO command and DWAPB_GPIO driver for LicheePi4A board.
>
> Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
> ---
> configs/th1520_lpi4a_defconfig | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-09-24 3:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-20 9:05 [PATCH v1 0/2] riscv: add GPIO support for the LicheePi4A bigunclemax
2024-09-20 9:05 ` [PATCH v1 1/2] gpio: dw: Add ngpios DT-property support bigunclemax
2024-09-24 3:23 ` Leo Liang
2024-09-20 9:05 ` [PATCH v1 2/2] configs: th1520_lpi4a: Enable CMD_GPIO, DM_GPIO and DWAPB_GPIO driver bigunclemax
2024-09-24 3:25 ` Leo Liang
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.