* [U-Boot] [PATCH 0/3] gpio: zynq: Add support for Versal
@ 2019-10-14 9:05 Michal Simek
2019-10-14 9:05 ` [U-Boot] [PATCH 1/3] gpio: zynq: Add gpio driver " Michal Simek
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Michal Simek @ 2019-10-14 9:05 UTC (permalink / raw)
To: u-boot
Hi,
this patchset is updating existing zynq driver with adding two layout. One
for Versal gpio and another one on PMC gpio which is using different
layout. And also enabling gpio command for versal.
Thanks,
Michal
Ashok Reddy Soma (1):
gpio: zynq: Add gpio driver support for Versal
Michal Simek (1):
arm64: versal: Enable GPIO command for Versal
Shubhrajyoti Datta (1):
gpio: zynq: Add gpio driver support for PMC gpio
configs/xilinx_versal_virt_defconfig | 1 +
drivers/gpio/Kconfig | 2 +-
drivers/gpio/zynq_gpio.c | 34 ++++++++++++++++++++++++++++
3 files changed, 36 insertions(+), 1 deletion(-)
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH 1/3] gpio: zynq: Add gpio driver support for Versal
2019-10-14 9:05 [U-Boot] [PATCH 0/3] gpio: zynq: Add support for Versal Michal Simek
@ 2019-10-14 9:05 ` Michal Simek
2019-10-14 9:05 ` [U-Boot] [PATCH 2/3] gpio: zynq: Add gpio driver support for PMC gpio Michal Simek
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Michal Simek @ 2019-10-14 9:05 UTC (permalink / raw)
To: u-boot
From: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
This patch adds support for gpio driver for versal platform
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
drivers/gpio/Kconfig | 2 +-
drivers/gpio/zynq_gpio.c | 15 +++++++++++++++
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index f2dabb554fa9..7abde0da8f82 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -294,7 +294,7 @@ config MVEBU_GPIO
config ZYNQ_GPIO
bool "Zynq GPIO driver"
- depends on DM_GPIO && (ARCH_ZYNQ || ARCH_ZYNQMP)
+ depends on DM_GPIO && (ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL)
default y
help
Supports GPIO access on Zynq SoC.
diff --git a/drivers/gpio/zynq_gpio.c b/drivers/gpio/zynq_gpio.c
index a760c5bdda68..9febf34896b0 100644
--- a/drivers/gpio/zynq_gpio.c
+++ b/drivers/gpio/zynq_gpio.c
@@ -114,6 +114,19 @@ struct zynq_platform_data {
u32 bank_max[ZYNQMP_GPIO_MAX_BANK];
};
+#define VERSAL_GPIO_NR_GPIOS 58
+#define VERSAL_GPIO_MAX_BANK 4
+
+static const struct zynq_platform_data versal_gpio_def = {
+ .label = "versal_gpio",
+ .ngpio = VERSAL_GPIO_NR_GPIOS,
+ .max_bank = VERSAL_GPIO_MAX_BANK,
+ .bank_min[0] = 0,
+ .bank_max[0] = 25,
+ .bank_min[3] = 26,
+ .bank_max[3] = 57,
+};
+
static const struct zynq_platform_data zynqmp_gpio_def = {
.label = "zynqmp_gpio",
.ngpio = ZYNQMP_GPIO_NR_GPIOS,
@@ -329,6 +342,8 @@ static const struct udevice_id zynq_gpio_ids[] = {
.data = (ulong)&zynq_gpio_def},
{ .compatible = "xlnx,zynqmp-gpio-1.0",
.data = (ulong)&zynqmp_gpio_def},
+ { .compatible = "xlnx,versal-gpio-1.0",
+ .data = (ulong)&versal_gpio_def},
{ }
};
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH 2/3] gpio: zynq: Add gpio driver support for PMC gpio
2019-10-14 9:05 [U-Boot] [PATCH 0/3] gpio: zynq: Add support for Versal Michal Simek
2019-10-14 9:05 ` [U-Boot] [PATCH 1/3] gpio: zynq: Add gpio driver " Michal Simek
@ 2019-10-14 9:05 ` Michal Simek
2019-10-14 9:05 ` [U-Boot] [PATCH 3/3] arm64: versal: Enable GPIO command for Versal Michal Simek
2019-10-24 11:17 ` [U-Boot] [PATCH 0/3] gpio: zynq: Add support " Michal Simek
3 siblings, 0 replies; 5+ messages in thread
From: Michal Simek @ 2019-10-14 9:05 UTC (permalink / raw)
To: u-boot
From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
This patch adds support for gpio driver for pmc gpio.
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
drivers/gpio/zynq_gpio.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/gpio/zynq_gpio.c b/drivers/gpio/zynq_gpio.c
index 9febf34896b0..fe3b2c3b1aa8 100644
--- a/drivers/gpio/zynq_gpio.c
+++ b/drivers/gpio/zynq_gpio.c
@@ -93,6 +93,9 @@
/* GPIO upper 16 bit mask */
#define ZYNQ_GPIO_UPPER_MASK 0xFFFF0000
+#define PMC_GPIO_NR_GPIOS 116
+#define PMC_GPIO_MAX_BANK 5
+
struct zynq_gpio_platdata {
phys_addr_t base;
const struct zynq_platform_data *p_data;
@@ -127,6 +130,20 @@ static const struct zynq_platform_data versal_gpio_def = {
.bank_max[3] = 57,
};
+static const struct zynq_platform_data pmc_gpio_def = {
+ .label = "pmc_gpio",
+ .ngpio = PMC_GPIO_NR_GPIOS,
+ .max_bank = PMC_GPIO_MAX_BANK,
+ .bank_min[0] = 0,
+ .bank_max[0] = 25,
+ .bank_min[1] = 26,
+ .bank_max[1] = 51,
+ .bank_min[3] = 52,
+ .bank_max[3] = 83,
+ .bank_min[4] = 84,
+ .bank_max[4] = 115,
+};
+
static const struct zynq_platform_data zynqmp_gpio_def = {
.label = "zynqmp_gpio",
.ngpio = ZYNQMP_GPIO_NR_GPIOS,
@@ -344,6 +361,8 @@ static const struct udevice_id zynq_gpio_ids[] = {
.data = (ulong)&zynqmp_gpio_def},
{ .compatible = "xlnx,versal-gpio-1.0",
.data = (ulong)&versal_gpio_def},
+ { .compatible = "xlnx,pmc-gpio-1.0",
+ .data = (ulong)&pmc_gpio_def },
{ }
};
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH 3/3] arm64: versal: Enable GPIO command for Versal
2019-10-14 9:05 [U-Boot] [PATCH 0/3] gpio: zynq: Add support for Versal Michal Simek
2019-10-14 9:05 ` [U-Boot] [PATCH 1/3] gpio: zynq: Add gpio driver " Michal Simek
2019-10-14 9:05 ` [U-Boot] [PATCH 2/3] gpio: zynq: Add gpio driver support for PMC gpio Michal Simek
@ 2019-10-14 9:05 ` Michal Simek
2019-10-24 11:17 ` [U-Boot] [PATCH 0/3] gpio: zynq: Add support " Michal Simek
3 siblings, 0 replies; 5+ messages in thread
From: Michal Simek @ 2019-10-14 9:05 UTC (permalink / raw)
To: u-boot
Enable GPIO command for Xilinx Versal platform. Driver is updated that's
why it can be used directly. Driver is enabled by default through Kconfig.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
configs/xilinx_versal_virt_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/configs/xilinx_versal_virt_defconfig b/configs/xilinx_versal_virt_defconfig
index 3ff23a2b2b62..f5ce8a0a1e88 100644
--- a/configs/xilinx_versal_virt_defconfig
+++ b/configs/xilinx_versal_virt_defconfig
@@ -19,6 +19,7 @@ CONFIG_CMD_MEMTEST=y
CONFIG_SYS_ALT_MEMTEST=y
CONFIG_CMD_DM=y
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
CONFIG_CMD_SF=y
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH 0/3] gpio: zynq: Add support for Versal
2019-10-14 9:05 [U-Boot] [PATCH 0/3] gpio: zynq: Add support for Versal Michal Simek
` (2 preceding siblings ...)
2019-10-14 9:05 ` [U-Boot] [PATCH 3/3] arm64: versal: Enable GPIO command for Versal Michal Simek
@ 2019-10-24 11:17 ` Michal Simek
3 siblings, 0 replies; 5+ messages in thread
From: Michal Simek @ 2019-10-24 11:17 UTC (permalink / raw)
To: u-boot
po 14. 10. 2019 v 11:05 odesÃlatel Michal Simek
<michal.simek@xilinx.com> napsal:
>
> Hi,
>
> this patchset is updating existing zynq driver with adding two layout. One
> for Versal gpio and another one on PMC gpio which is using different
> layout. And also enabling gpio command for versal.
>
> Thanks,
> Michal
>
>
> Ashok Reddy Soma (1):
> gpio: zynq: Add gpio driver support for Versal
>
> Michal Simek (1):
> arm64: versal: Enable GPIO command for Versal
>
> Shubhrajyoti Datta (1):
> gpio: zynq: Add gpio driver support for PMC gpio
>
> configs/xilinx_versal_virt_defconfig | 1 +
> drivers/gpio/Kconfig | 2 +-
> drivers/gpio/zynq_gpio.c | 34 ++++++++++++++++++++++++++++
> 3 files changed, 36 insertions(+), 1 deletion(-)
>
> --
> 2.17.1
>
Applied.
M
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-10-24 11:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-14 9:05 [U-Boot] [PATCH 0/3] gpio: zynq: Add support for Versal Michal Simek
2019-10-14 9:05 ` [U-Boot] [PATCH 1/3] gpio: zynq: Add gpio driver " Michal Simek
2019-10-14 9:05 ` [U-Boot] [PATCH 2/3] gpio: zynq: Add gpio driver support for PMC gpio Michal Simek
2019-10-14 9:05 ` [U-Boot] [PATCH 3/3] arm64: versal: Enable GPIO command for Versal Michal Simek
2019-10-24 11:17 ` [U-Boot] [PATCH 0/3] gpio: zynq: Add support " Michal Simek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox