diff options
| author | Huy Bui <[email protected]> | 2025-10-27 17:35:38 +0100 |
|---|---|---|
| committer | Marek Vasut <[email protected]> | 2025-11-06 20:09:58 +0100 |
| commit | 7ee86cab7b87b9b1dbaab3ff713554075ff7b51f (patch) | |
| tree | d90fb555e5e8629604cbbf2cae25fda90a93f9fb | |
| parent | d81ffc337d58e541cb2b31404e9c4797acbe89ad (diff) | |
gpio: renesas: Add R-Car Gen5 support
Add support for the GPIO controller block in the R-Car Gen5 SoC family.
The GPIO controller has a General Input Enable Register (INEN), whose
reset state is to have all input disabled. The GPIO controller also has
updated offsets for its control registers. U-Boot uses three registers,
INDT, POSNEG, INEN, which have updated offsets, those are handled by the
driver.
Signed-off-by: Huy Bui <[email protected]>
Signed-off-by: Hai Pham <[email protected]>
Signed-off-by: Marek Vasut <[email protected]>
[Marek: - Access Gen5 specific registers via driver data offsets,
- Update commit message]
| -rw-r--r-- | drivers/gpio/gpio-rcar.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c index f4eaf6f9c2d..c1ad20177f7 100644 --- a/drivers/gpio/gpio-rcar.c +++ b/drivers/gpio/gpio-rcar.c @@ -22,6 +22,10 @@ #define GPIO_POSNEG_G2 0x20 /* Positive/Negative Logic Select Register */ #define GPIO_INEN_G4 0x50 /* General Input Enable Register */ +#define GPIO_INDT_G5 0x1c /* General Input Register */ +#define GPIO_POSNEG_G5 0x90 /* Positive/Negative Logic Select Register */ +#define GPIO_INEN_G5 0x18 /* General Input Enable Register */ + #define RCAR_MAX_GPIO_PER_BANK 32 #define RCAR_GPIO_HAS_INEN BIT(0) @@ -184,6 +188,13 @@ static const struct rcar_gpio_data rcar_gpio_gen3_data = { .inen_offset = GPIO_INEN_G4, }; +static const struct rcar_gpio_data rcar_gpio_gen5_data = { + .quirks = RCAR_GPIO_HAS_INEN, + .indt_offset = GPIO_INDT_G5, + .posneg_offset = GPIO_POSNEG_G5, + .inen_offset = GPIO_INEN_G5, +}; + static const struct udevice_id rcar_gpio_ids[] = { { .compatible = "renesas,gpio-r8a7795", .data = (ulong)&rcar_gpio_gen2_data }, { .compatible = "renesas,gpio-r8a7796", .data = (ulong)&rcar_gpio_gen2_data }, @@ -195,6 +206,7 @@ static const struct udevice_id rcar_gpio_ids[] = { { .compatible = "renesas,rcar-gen2-gpio", .data = (ulong)&rcar_gpio_gen2_data }, { .compatible = "renesas,rcar-gen3-gpio", .data = (ulong)&rcar_gpio_gen2_data }, { .compatible = "renesas,rcar-gen4-gpio", .data = (ulong)&rcar_gpio_gen3_data }, + { .compatible = "renesas,rcar-gen5-gpio", .data = (ulong)&rcar_gpio_gen5_data }, { /* sentinel */ } }; |
