]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
gpio: zynq: Add eio gpio support
authorShubhrajyoti Datta <shubhrajyoti.datta@amd.com>
Tue, 12 May 2026 06:08:49 +0000 (11:38 +0530)
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Wed, 13 May 2026 07:28:43 +0000 (09:28 +0200)
Add support for the EIO GPIO controller found on
xa2ve3288 silicon.

The EIO GPIO block provides access to multiplexed I/O pins exposed
through the EIO interface. Only bank 0 and bank 1 are connected to
external MIO pins, with 26 GPIOs per bank (52 GPIOs total). This
change extends the Zynq GPIO driver to support the EIO GPIO
variant.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
Link: https://patch.msgid.link/20260512060917.2096456-4-shubhrajyoti.datta@amd.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
drivers/gpio/gpio-zynq.c

index 571e366624d2af586bc4daa34fbe0e1738418c4f..8118ae3412c20b41c659075b575ea2b37bfaeba2 100644 (file)
@@ -25,6 +25,7 @@
 #define VERSAL_GPIO_MAX_BANK   4
 #define PMC_GPIO_MAX_BANK      5
 #define VERSAL_UNUSED_BANKS    2
+#define EIO_GPIO_MAX_BANK      2
 
 #define ZYNQ_GPIO_BANK0_NGPIO  32
 #define ZYNQ_GPIO_BANK1_NGPIO  22
@@ -818,6 +819,16 @@ static const struct dev_pm_ops zynq_gpio_dev_pm_ops = {
        RUNTIME_PM_OPS(zynq_gpio_runtime_suspend, zynq_gpio_runtime_resume, NULL)
 };
 
+static const struct zynq_platform_data eio_gpio_def = {
+       .label = "eio_gpio",
+       .ngpio = 52,
+       .max_bank = EIO_GPIO_MAX_BANK,
+       .bank_min[0] = 0,
+       .bank_max[0] = 25, /* 0 to 25 are connected to MIOs (26 pins) */
+       .bank_min[1] = 26,
+       .bank_max[1] = 51, /* Bank 1 are connected to MIOs (26 pins) */
+};
+
 static const struct zynq_platform_data versal_gpio_def = {
        .label = "versal_gpio",
        .quirks = GPIO_QUIRK_VERSAL,
@@ -882,6 +893,7 @@ static const struct of_device_id zynq_gpio_of_match[] = {
        { .compatible = "xlnx,zynqmp-gpio-1.0", .data = &zynqmp_gpio_def },
        { .compatible = "xlnx,versal-gpio-1.0", .data = &versal_gpio_def },
        { .compatible = "xlnx,pmc-gpio-1.0", .data = &pmc_gpio_def },
+       { .compatible = "xlnx,eio-gpio-1.0", .data = &eio_gpio_def },
        { /* end of table */ }
 };
 MODULE_DEVICE_TABLE(of, zynq_gpio_of_match);