Commit graph

1,662 commits

Author SHA1 Message Date
Chekhov Ma
f4522490b9 driver: gpio: pca_series: fix pca6416 test issue
There are multiple issues in this driver:
1. gpio_pca_series_part_cfg_pca6416 is not using correct macros
2. gpio_pca_series_interrupt_handler_standard not updating input when
   no interrupt configured

Fixing these issues.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2025-10-31 10:23:23 -04:00
Anas Nashif
303af992e5 style: fix 'if (' usage in cmake files
Replace with 'if(' and 'else(' per the cmake style guidelines.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-29 11:44:13 +02:00
Marco Widmer
e2fcd640b7 drivers: gpio: pca953x: add pull-up/pull-down support
Some variants of the PCA953x family support pull-up / pull-down
resistors through registers 0x43 and 0x44 (mostly the TCAL9538 variant).
We already support input latching and interrupt masking (which is also
only present on a few variants), so let's also add support for pull-up
and pull-down resistors.

The feature can be enabled with the has-pud property in the device tree.

Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
2025-10-24 13:27:49 -04:00
Guillaume Gautier
124448582f drivers: stm32: replace READ_REG HAL macro by stm32_reg_read
For all STM32 drivers and SoC, replace the READ_REG macro and the
LL_xxx_ReadReg functions (defined in the STM32 HAL) by
stm32_reg_read defined in Zephyr.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-10-24 08:58:25 -07:00
Guillaume Gautier
2a52a2b7ff drivers: stm32: replace WRITE_REG HAL macro by stm32_reg_write
For all STM32 drivers and SoC, replace the WRITE_REG macro and the
LL_xxx_WriteReg functions (defined in the STM32 HAL) by
stm32_reg_write defined in Zephyr.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-10-24 08:58:25 -07:00
TOKITA Hiroshi
2cce5ed488 drivers: gpio: aw9523b: Fix the condition for changing Push-pull
The condition for setting the GPOMD bit when `port0_push_pull`
is enabled was reversed.
Fix this problem.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-10-24 08:57:29 -07:00
Michael Klammt
0876b5a2de drivers: gpio: fix SN74HC595 reset GPIO prop name
The reset GPIO for the SN74HC595 driver was not working anymore since
c407fbc. That commit made it optional among other changes but
accidently removed the s from reset_gpios property name causing the
driver not being able to retrieve the specified reset-gpios property
from the devicetree anymore. Add the missing s back to fix this.

Signed-off-by: Michael Klammt <michael.klammt@automatic-research.de>
2025-10-24 11:42:42 +02:00
Jason Yu
ce3a3da9dd drivers: gpio: gpio_mcux: Fix port index mismatch issue
When GPIO works with IOPCTL, the PIO instance offset in IOPCTL
can't be calculated easily. It should be recorded in DTS based on
SOC integration.
When IOPCTL is used, add PIO reigster address in DTS, gpio_mcux
driver will configure the PIO register based on this address.

Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
2025-10-24 11:34:53 +02:00
Jason Yu
69f797c6d2 drivers: gpio: gpio_mcux: Improve IRQ control macro usage
Add more direct macro GPIO_IRQ_CTRL to control different
IRQ implementation.

Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
2025-10-24 11:34:53 +02:00
Jason Yu
2e64d67fad drivers: gpio: gpio_mcux: Fix bug that cannot set IOPCTL drive strength
The macro FSL_FEATURE_PORT_HAS_DRIVE_STRENGTH should only be used
for PORT but not IOPCTL.

Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
2025-10-24 11:34:53 +02:00
Sai Santhosh Malae
9f53d7e270 drivers: gpio: silabs-siwx91x: Refactor config structures
Drop usage of `pcfg` and `pdata` in favor of unified `cfg`
for common configuration and `port_cfg`, `port_data` for
port-specific configurations.

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-10-24 11:32:20 +02:00
Sai Santhosh Malae
77f5ddadec drivers: gpio: silabs-siwx91x: clang format corrections
Apply clang format corrections

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-10-24 11:32:20 +02:00
Sai Santhosh Malae
0ad01eee42 drivers: gpio: silabs-siwx91x: Device runtime PM
This commit enables the pm device runtime support
for the siwx91x gpio driver.

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-10-24 11:32:20 +02:00
Sai Santhosh Malae
da94b1afbf drivers: gpio: silabs-siwx91x: Differentiate port count
Add the port_count field to the configuration structure
and allocate different sizes for the ports array based
on whether the node is HP or ULP.

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-10-24 11:32:20 +02:00
Bjarki Arge Andreasen
e092eae90a drivers: gpio: remove pad group integration
Replace the pad group integration with directly setting/clearing
pin retention for output pins if required, since the pad group
integration is redundant if the quirky cross domain feature is
managed by the application.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-10-23 18:06:30 +02:00
Qingsong Gou
039389187f drivers: clock_control: fix sf32lb clock_control typo
fix a sf3232lb_clock_is_ready_dt typo

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
2025-10-23 17:53:25 +02:00
Aksel Skauge Mellbye
cf1fbbcf83 soc: silabs: Move Kconfig symbol for clock/device init to HAL
Kconfig symbols for selecting HAL content should be part of the
HAL module integration, not defined in the SoC tree.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-10-22 09:03:15 +02:00
Stoyan Bogdanov
31abf236b4 drivers: gpio: cc23x0: Add power management to GPIO
Add PM support to cc23x0 GPIO driver.

Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
2025-10-20 11:35:41 -04:00
McAtee Maxwell
69c64929b3 drivers: add ifx pinctrl driver updates for kit_pse84_eval
- add drive-strength capability for kit_pse84_eval

Signed-off-by: McAtee Maxwell <maxwell.mcatee@infineon.com>
2025-10-10 12:59:33 -04:00
Anisetti Avinash Krishna
709f453673 drivers: gpio: Enable support for latest GINF method
Enable support for latest GINF method which requires 3 paramters
for each GPIO group and enables gpio support for intel_ptl_h
platform.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2025-10-07 22:59:32 -04:00
Daniel Schultz
15d2990b24 drivers: gpio: Add driver for Aesc Silicon
Add basic support for the Aesc Silicon GPIO controller.

This IP core has internal tri-states and therefore a read,
write and direction registers. Additionally, it has advanced
monitoring capabilities for interrupt generation; low or
high leve and rising or falling edge.

Interrupt support will be added later when ElemRV supports
interrupt in Zephyr.

Signed-off-by: Daniel Schultz <dnltz@aesc-silicon.de>
2025-10-06 20:03:28 +03:00
Quang Le
50eb0fb847 drivers: gpio: renesas: Fix fail case pin_get_config
Add condition to check whether the pin is set as output before
reading the output high or low for gpio driver of Renesas RZ

Signed-off-by: Quang Le <quang.le.eb@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2025-10-03 12:51:33 +03:00
Lin Yu-Cheng
5bca3095ac gpio: rts5912: implement power management
support gpio wake up function.
change init stage from POST_KERNEL to PRE_KERNEL_1
because uart wrap init need to use the gpio functions.

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-10-02 11:47:32 +03:00
Johan Hedberg
ca1ee72236 drivers: Fix deprecated SPI_DT_SPEC_INST_GET usage
This macro doesn't accept a delay parameter anymore (well, it does, but
it's deprecated and will trigger build warnings). Just remove it from the
places that were still passing it.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-10-01 17:20:41 +03:00
Declan Snyder
570b445a61 drivers: Convert to use SPI macro without delay parameters
Convert all drivers and other consumers to use SPI macros without the
delay parameters.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-10-01 14:39:36 +03:00
Miika Karanki
1856a03fc7 drivers: gpio: shell: fix asan reported oob error
ASAN reports error with native_sim after "gpio info <TAB>":
   runtime error: index 1 out of bounds for type 'gpio_ctrl [1]'

So, although the dev pointer was not used, don't even read it
from out-of-bounds of gpio_list.

Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
2025-09-30 21:59:05 +02:00
Gerard Marull-Paretas
290ae4ba5b drivers: gpio: sf32lb: add initial driver
Add initial driver for SF32LB.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2025-09-23 17:50:16 -04:00
Chekhov Ma
1ea2c63081 drivers: gpio: retire pca6416a driver
pca6416a driver can be replaced by pca_series driver, which covers a
larger number of devices.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2025-09-23 12:04:12 -04:00
Chekhov Ma
deb699b68a drivers: gpio: pca_series: select i2c when enabled
On certain platforms I2C is not enabled by default, causing build error.
Change pca_series driver to select I2C.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2025-09-23 12:04:12 -04:00
Chekhov Ma
f1056fc045 drivers: gpio: pca_series: add drive_strength config
Enables pca_series driver to set drive strength for part no with
PCA_HAS_LATCH capability.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2025-09-23 12:04:12 -04:00
Chekhov Ma
604d127809 drivers: gpio: pca_series: imporve reset function
The reset function is originally designed to have no return value. If
the GPIO toggle fails, there's no indication for failure until I2C
transaction fails. Account for this by adding return value to the reset
function.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2025-09-23 12:04:12 -04:00
Chekhov Ma
6c62afd21f drivers: gpio: pca_series: add support for pcal953x and pcal64xx
add support for pca9538, pcal9539.

Add support for pcal6408 and pcal6416, which is originally supported
by pcal64xxa driver. These device has the same register layout as
pcal9538 and pcal9539 respectively, which means they can be seamlessly
supported by pca_series driver.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2025-09-23 12:04:12 -04:00
Khaoula Bidani
e803a10b91 drivers: gpio: stm32: Fix gpio_pin_get_config
This commit updates the function to only set output-related flags
(GPIO_OUTPUT_INIT_HIGH, GPIO_OUTPUT_INIT_LOW) when the pin
is actually configured as output. For input pins, only GPIO_INPUT and
other relevant flags are set.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-09-17 16:32:39 +02:00
Manuel Argüelles
936876b545 drivers: intc: nxp: drop soc name from siul2 eirq driver
The SIUL2 external interrupt driver is a native implementation usable
across all NXP SoCs with SIUL2 IP. Remove the "S32" prefix to allow
clean reuse by other families.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2025-09-17 10:07:31 +02:00
Manuel Argüelles
5a0e0c924d drivers: gpio: nxp: drop soc name from siul2 driver
The SIUL2 GPIO driver is a native implementation usable across all
NXP SoCs with SIUL2 IP. Remove the "S32" prefix to allow clean
reuse by other families.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2025-09-17 10:07:31 +02:00
Paulo Santos
1e7e1dbb6d drivers: gpio_gecko: update driver to use signal-only output.
Enable the pin configuration as single-ended pull-up output, allowing for
a currentless, signal-only output.

Signed-off-by: Paulo Santos <pauloroberto.santos@edge.ufal.br>
2025-09-16 16:07:59 -04:00
Camille BAUD
b640228691 drivers: gpio: Add BL60x and BL70x GPIO driver
Adds the gpio driver for BL602, 604, 702, 704, 706

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-09-14 17:02:11 +02:00
Mohamed Azhar
17b97851ff drivers: gpio: microchip: add gpio driver for Port G1 IP
Add gpio driver for Microchip Port G1 Peripheral IPs

Signed-off-by: Mohamed Azhar <mohamed.azhar@microchip.com>
2025-09-13 18:13:33 -04:00
Sanjay Vallimanalan
35c485b6ec drivers: gpio: Add GPIO Fast Wake support
The fast wake feature in the MSPM0 GPIO peripheral allows the GPIO module
to stay in a low-power state and detect interrupt events on the device pins
without requiring a high-speed clock. This allows the device to support
fast wakeup from low-power modes, such as STOP and STANDBY, on any GPIO
pin.

Signed-off-by: Sanjay Vallimanalan <sanjay@linumiz.com>
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2025-09-10 18:37:11 +02:00
Camille BAUD
02d51a7059 drivers: gpio: Add BL61x GPIO driver
Adds the gpio driver for BL616 and 618

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-09-06 10:35:17 +02:00
Aksel Skauge Mellbye
aec461634f drivers: gpio: silabs: Support EM4 wakeup interrupts
EM4 wakeup interrupts are dedicated interrupts tied to specific
pins that enable wakeup from EM4 through reset. Add support
for using these interrupts instead of the regular interrupts when
the GPIO_INT_TRIG_WAKE flag is set.

Since it's not possible to tell what pin is associated with what
EM4WU interrupt at runtime, the driver must store a mapping table
sourced from device tree.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-09-02 11:10:33 +02:00
Khoa Nguyen
a02be914ca drivers: gpio: Add select PINCTRL for renesas_ra_ioport
Add select PINCTRL for renesas_ra_ioport

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2025-08-27 05:15:28 +02:00
Raffael Rostagno
270307f61d drivers: gpio: esp32h2: Add support
Add gpio support for ESP32-H2.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-08-26 22:07:36 +02:00
Neil Chen
183542baff driver: gpio: update gpio_mcux.c driver
GPIO interrupts do not work on MCXA, MCXA has ICR register but feature
FSL_FEATURE_GPIO_HAS_INTERRUPT_CHANNEL_SELECT value is 0, can't only use
this feature to support ICR. So adjust feature judgment.

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2025-08-22 06:53:12 +02:00
Tanguy Raufflet
bec960356c drivers: gpio: stm32: add gpioz support for the STM32MP2
Add support for GPIOZ in the STM32 GPIO driver.

Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
2025-08-21 18:41:59 +02:00
Jonas Berg
41a0060338 Drivers: GPIO: Allow AW9523 to be used without interrupts
There will be an compilation error if there is no interrupt GPIO defined
in the device tree file, as parts of the config and data structs
have #if that depends on the presence of interrupt GPIO.

Use the same #if constructs also on the functions that use those
structs.

Signed-off-by: Jonas Berg <jonas.s.t.berg@gmail.com>
2025-08-20 02:16:57 +02:00
Pete Dietl
c407fbcfc9 [drivers]: gpios: SN74HC595: Extend to allow for chained shift registers
The current driver has a few limitations:
1. The `ngpios` DT property is fixed at eight.
   Since the SN74HC595 and kin are designed to be
   easily daisychain-able, the upper bound on `ngpios`
   should be limited only by the maximum number of pins
   that Zephyr supports per GPIO port, which is 32.
2. In the case of having no control over the shift register's
   reset input, the device tree node should accept a default
   value to shift into the register(s) during init.
3. There seems to be an assumption that the serial clock
   and load clock are tied together. While this is often the
   case, the device tree node should be more flexible in
   allowing the specification of a separate load clock GPIO pin.
4. The device tree node should also be able to accept a GPIO pin
   to drive the enable input pin of the shift register(s).

This commit addresses all of these issues.

Signed-off-by: Pete Dietl <petedietl@gmail.com>
2025-08-19 09:13:12 +02:00
S Mohamed Fiaz
be0a0f1a1e drivers: gpio: silabs: gpio driver enhancements for EFR series 2 devices
Added changes to gpio driver and Kconfig
for EFR series 2 devices.

Signed-off-by: S Mohamed Fiaz <fiaz.mohamed@silabs.com>
2025-08-18 13:07:23 +02:00
Declan Snyder
5ae654eeef modules: hal_nxp: Removed unused HAS_MCUX_* configs
Remove the configs that are not actually used for anything anymore or
never were, or that are redundant with other configs, and don't have any
code changes outside of Kconfig to remove.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-08-15 10:10:32 +03:00
Declan Snyder
5f742ac862 modules: nxp: imx: Remove HAS_IMX_* configs
Remove all these legacy configs which are not necessary.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-08-15 10:10:32 +03:00