From 40ff446e10e87cbf3e55e157109c97f3f25bc578 Mon Sep 17 00:00:00 2001 From: Thao Luong Date: Thu, 20 Mar 2025 21:21:00 +0700 Subject: [PATCH] drivers: gpio: add support for RA8P1 RA8P1 has 14 ports (from 0 to d) and 32 external irq while current driver support 12 ports (0 to b) and 16 external irq. This add addtional support for remain ports and external irq to be able to work with RA8P1. Fix the lack condition GPIO_RA_IOPORT for GPIO_RA_HAS_VBTICTLR config Signed-off-by: Thao Luong Signed-off-by: Khoa Nguyen --- drivers/gpio/Kconfig.renesas_ra_ioport | 4 ++ drivers/gpio/gpio_renesas_ra_ioport.c | 4 +- dts/bindings/gpio/renesas,ra-gpio-ioport.yaml | 64 +++++++++++++++++++ 3 files changed, 71 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/Kconfig.renesas_ra_ioport b/drivers/gpio/Kconfig.renesas_ra_ioport index 257475b4f60..0aff2565c5a 100644 --- a/drivers/gpio/Kconfig.renesas_ra_ioport +++ b/drivers/gpio/Kconfig.renesas_ra_ioport @@ -8,7 +8,11 @@ config GPIO_RA_IOPORT help Enable the Renesas RA GPIO IO port driver. +if GPIO_RA_IOPORT + config GPIO_RA_HAS_VBTICTLR bool "Support VBATT input control" help Enable for Renesas RA which support VBATT input control. + +endif # GPIO_RA_IOPORT diff --git a/drivers/gpio/gpio_renesas_ra_ioport.c b/drivers/gpio/gpio_renesas_ra_ioport.c index 68d5334c675..6e3f7df05a8 100644 --- a/drivers/gpio/gpio_renesas_ra_ioport.c +++ b/drivers/gpio/gpio_renesas_ra_ioport.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Renesas Electronics Corporation + * Copyright (c) 2024-2025 Renesas Electronics Corporation * * SPDX-License-Identifier: Apache-2.0 */ @@ -359,3 +359,5 @@ GPIO_DEVICE_INIT_RA_IF_OKAY(8); GPIO_DEVICE_INIT_RA_IF_OKAY(9); GPIO_DEVICE_INIT_RA_IF_OKAY(a); GPIO_DEVICE_INIT_RA_IF_OKAY(b); +GPIO_DEVICE_INIT_RA_IF_OKAY(c); +GPIO_DEVICE_INIT_RA_IF_OKAY(d); diff --git a/dts/bindings/gpio/renesas,ra-gpio-ioport.yaml b/dts/bindings/gpio/renesas,ra-gpio-ioport.yaml index 1524a426686..c5f23ef3d1c 100644 --- a/dts/bindings/gpio/renesas,ra-gpio-ioport.yaml +++ b/dts/bindings/gpio/renesas,ra-gpio-ioport.yaml @@ -91,6 +91,70 @@ properties: type: array description: Pins allow to assign port-irq15 + port-irq16-pins: + type: array + description: Pins allow to assign port-irq16 + + port-irq17-pins: + type: array + description: Pins allow to assign port-irq17 + + port-irq18-pins: + type: array + description: Pins allow to assign port-irq18 + + port-irq19-pins: + type: array + description: Pins allow to assign port-irq19 + + port-irq20-pins: + type: array + description: Pins allow to assign port-irq20 + + port-irq21-pins: + type: array + description: Pins allow to assign port-irq21 + + port-irq22-pins: + type: array + description: Pins allow to assign port-irq22 + + port-irq23-pins: + type: array + description: Pins allow to assign port-irq23 + + port-irq24-pins: + type: array + description: Pins allow to assign port-irq24 + + port-irq25-pins: + type: array + description: Pins allow to assign port-irq25 + + port-irq26-pins: + type: array + description: Pins allow to assign port-irq26 + + port-irq27-pins: + type: array + description: Pins allow to assign port-irq27 + + port-irq28-pins: + type: array + description: Pins allow to assign port-irq28 + + port-irq29-pins: + type: array + description: Pins allow to assign port-irq29 + + port-irq30-pins: + type: array + description: Pins allow to assign port-irq30 + + port-irq31-pins: + type: array + description: Pins allow to assign port-irq31 + "#gpio-cells": const: 2