summaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>2019-09-18 12:10:31 +0530
committerMichal Simek <michal.simek@xilinx.com>2019-10-24 13:37:01 +0200
commit98927daada2f0cdaadbb68144e7a4985dcc62926 (patch)
tree246e3cc462605e1b3a38a4d010a72befe7d448a1 /drivers/gpio
parent982485214f64e02f0eee8dfde05cf4e05aedfb97 (diff)
downloadu-boot-98927daada2f0cdaadbb68144e7a4985dcc62926.tar.gz
u-boot-98927daada2f0cdaadbb68144e7a4985dcc62926.tar.bz2
u-boot-98927daada2f0cdaadbb68144e7a4985dcc62926.zip
gpio: zynq: Add gpio driver support for PMC gpio
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>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/zynq_gpio.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpio/zynq_gpio.c b/drivers/gpio/zynq_gpio.c
index 9febf34896..fe3b2c3b1a 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 },
{ }
};