Skip to content

Commit

Permalink
drivers: gpio: xlnx: Add support for versal2 PS/PMC GPIO
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
AlvinPaul26 committed Jan 20, 2025
1 parent eabef50 commit 4c6cfa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_xlnx_ps_bank.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,\
Expand Down

0 comments on commit 4c6cfa8

Please sign in to comment.