From d12686269ffb2cfcd25d698a21cb46bd32a267bc Mon Sep 17 00:00:00 2001 From: Paul Alvin Date: Mon, 20 Jan 2025 05:40:10 +0000 Subject: [PATCH] drivers: gpio: xlnx: Add support for versal2 PS/PMC GPIO Add driver support for Versal Gen 2 PS/PMC GPIO controller by updating the logic of bank index calculation. This logic depends on "register" DT property to identify bank index instead of depending on node instance ID as Versal Gen 2 GPIO banks are not in sequential order as Zynqmp. - Versal Gen 2 PS GPIO: Banks(0,3,4) - Zynqmp PS GPIO: Banks(0,1,2,3,4,5) Signed-off-by: Paul Alvin --- drivers/gpio/gpio_xlnx_ps_bank.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio_xlnx_ps_bank.c b/drivers/gpio/gpio_xlnx_ps_bank.c index c06479c8f53..8f62dc95da2 100644 --- a/drivers/gpio/gpio_xlnx_ps_bank.c +++ b/drivers/gpio/gpio_xlnx_ps_bank.c @@ -454,7 +454,7 @@ static const struct gpio_xlnx_ps_bank_dev_cfg gpio_xlnx_ps_bank##idx##_cfg = {\ .common = {\ .port_pin_mask = GPIO_PORT_PIN_MASK_FROM_DT_INST(idx),\ },\ - .bank_index = idx,\ + .bank_index = DT_INST_REG_ADDR(idx),\ };\ static struct gpio_xlnx_ps_bank_dev_data gpio_xlnx_ps_bank##idx##_data = {\ .base = 0,\