Commit graph

1572 commits

Author SHA1 Message Date
Nhut Nguyen
cd495936cf drivers: gpio: Add support for RZ/G3S
This adds GPIO driver for Renesas RZ/G3S.

Signed-off-by: Quang Le <quang.le.eb@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Signed-off-by: Binh Nguyen <binh.nguyen.xw@renesas.com>
2024-12-12 11:12:22 +01:00
Yishai Jaffe
9c60bcb19a gpio: shell: use new shell_device_get_binding function
Use shell_device_get_binding() to minimize code.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2024-12-11 07:58:50 +01:00
Junho Lee
f157d50afd drivers: gpio: add RP1 GPIO driver
Add GPIO driver for RP1 peripheral controller on Raspberry Pi 5.

Signed-off-by: Junho Lee <junho@tsnlab.com>
2024-12-06 12:14:37 +01:00
TOKITA Hiroshi
0161dd0938 drivers: gpio: Add support for Awinic AW9523B GPIO controller
Add support for GPIO controller feature of AW9523B.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Co-authored-by: Benjamin Cabé <kartben@gmail.com>
2024-12-05 07:44:58 +01:00
Audun Korneliussen
7fccb646cd drivers: gpio: npm2100: Add driver for npm2100 pmic
Add gpio driver for npm2100 pmic.

Signed-off-by: Audun Korneliussen <audun.korneliussen@nordicsemi.no>
2024-12-04 14:19:53 -05:00
Tim Lin
788bca2ea8 drivers: gpio: it8801: Add I2C-based GPIO device driver
Add I2C-based GPIO device driver. Supports 16-port GPIO divided
into 3 groups.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-12-03 19:56:50 +01:00
Pieter De Gendt
6d178f9cd9 drivers: gpio: Place API into iterable section
Add wrapper DEVICE_API macro to all gpio_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:05:59 +00:00
ee8990e2e0 drivers: add the gpio driver for wch ch32v003
This commit adds the gpio driver for WCH CH32V003.

Signed-off-by: Michael Hope <michaelh@juju.nz>
Signed-off-by: Dhiru Kholia <dhiru.kholia@gmail.com>
2024-11-26 14:41:46 +00:00
TOKITA Hiroshi
88149afff7 soc: raspberrypi: Drop PINCTRL from Kconfig.defconfig
The `Kconfig.defconfig` is not good place for put `select PINCTRL`.
Drop `select PINCTL` from `Kconfig.defconfig` and add it at each
driver's Kconfig.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-25 14:42:01 +01:00
Gerard Marull-Paretas
fa46eec157 drivers: gpio: nrf: use nrf_gpio_pin_retain_enable|disable
Instead of raw register access.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2024-11-25 12:16:17 +01:00
cyliang tw
355d032baa boards: nuvoton: numaker: Drop PINCTRL from board defconfig
To remove CONFIG_PINCTRL from board side for numaker boards.
The Drivers using Pinctrl should be turning Pinctrl on
instead of the responsibility of the board.

Fixes #78619

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-11-20 08:23:58 -05:00
TOKITA Hiroshi
8fe5544948 boards: arduino: uno_r4: remove CONFIG_PINCTRL from defconfig of uno_r4
This PR fixes #78619 for the Arduino UNO R4 Minima/Wifi board.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-20 10:14:41 +00:00
TOKITA Hiroshi
397c48a13e dts: arm: renesas: ra4: Use renesas,ra-pinctrl-pfs driver
Switch the pinctrl driver to renesas,ra-pinctrl-pfs which can be
used with FSP.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-20 10:14:41 +00:00
Raffael Rostagno
834fa11e6b drivers: gpio: esp32: Add input/output enable flags
Flags added allow keeping a pin as input/output by not disabling
the output buffer when configuring it as an input and by not
disabling input enable when configuring it as output. This can
be useful to implement signal diagnosis or for testing purposes.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-11-16 14:57:29 -05:00
McAtee Maxwell
2fe4a37f38 Documentation: Update documenation for Infineon boards
-Update formatting and contents of index.rst for cy8ckit_062s4
	-Update formatting and contents of index.rst for cy8ckit_064s0s2_4343w
	-Update formatting and contents of index.rst for cy8cproto_062_4343w
	-Update formatting and contents of index.rst for cy8cproto_063_ble
	-Update formatting and contents of index.rst for xmc45_relax_kit
	-Update formatting and contents of index.rst for xmc47_relax_kit
	-Change all instances of "PSoC" to "PSOC" for infineon platforms

Signed-off-by: McAtee Maxwell <maxwell.mcatee@infineon.com>
2024-11-14 20:36:38 -06:00
Gerard Marull-Paretas
56c5b1e2da drivers: gpio: nrfx: add support for ports with pad on FAST_ACTIVE1
This patch allows to _safely_ configure GPIO ports that have their pad
on FAST_ACTIVE1 domain.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-01 12:10:12 -05:00
Hao Luo
022c8ee1af drivers: gpio: ambiq: fix port status get error
It's not possible to get pinconfig of specific pin
in ambiq_gpio_port_get_raw function, change to use
OR value of RD and WT registers for one group of gpio.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-10-29 09:34:30 -07:00
Nils Bosbach
94baef654c drivers: gpio: gpio_iproc: fix reg write
The sys_write32 function expects a value as the first parameter and the
memory location where the value should be written as the second parameter.

Signed-off-by: Nils Bosbach <bosbach@ice.rwth-aachen.de>
2024-10-25 14:04:35 +02:00
Hao Luo
8b107ab5f1 drivers: i2c: add bus recovery
Added bus recovery support for ambiq i2c

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-10-22 20:40:29 +02:00
Benedikt Schmidt
acbc14e767 drivers: gpio: implement parallel mode in TLE9104
Implement the parallel mode in the powertrain switch TLE9104.
This allows that OUT1 and OUT2 are controlled together, as well
as OUT3 and OUT4.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-10-17 15:38:45 -04:00
Emilio Benavente
82a192c8a9 boards: nxp: Removing CONFIG_PINCTRL from the boards defconfig
The Drivers using Pinctrl should be turning Pinctrl on
this should not be the responsibility of the board. This
commit removes CONFIG_PINCTRL from the boards side for nxp boards.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-10-15 19:09:45 -04:00
Stoyan Bogdanov
3ca5cf50fe drivers: gpio: Add MAX14916 industrial output
Industrial 8 channel output with advanced diagnostics.
Allowing giagnostic configuration both on per channel or global bases
In SPI communication diagnostic status transmitted on every
READ/WRITE which includes generic status of chip.
Diagnostics includes :
 * Oveload
 * Open Wire
 * Over current
 * Short to VDD
 * Thermal Shutdown
 * VDD Warn
 * Watch Dog Error
 * Communication Error
 * VDD under voltage

Add app.overlay for MAX14916 driver.

Tested with adopted basic/blinky example.

Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
2024-10-08 17:01:44 +02:00
Stoyan Bogdanov
71149fd47a drivers: gpio: Add MAX14906 industrial input/output
MAX14906 in 4 channel I/O with advanced diagnostic.
In SPI communication diagnostic status transmitted on every
READ/WRITE which includes generic status of chip.
Configuration both on global level and on per channel bases.
Diagnostics includes :
 * Thermal overload
 * current limit
 * open wire detection
 * short to VDD
 * Above VDD
 * Safe DEmagnitization fault
 * VDD warning
 * VDD low
 * SPI/CRC Error
 * WDog Error
 * Loss GND

Add app.overlay for MAX14906 driver.

Tested with adopted basic/button and basic/blinky sample.

Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
2024-10-08 17:01:44 +02:00
TOKITA Hiroshi
1400ee713a drivers: gpio: rpi_pico: Fitting for the changes made in pico-sdk 2.0.0
Following the GPIO interface changes in pico-sdk 2.0.0.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-08 06:01:23 -04:00
Yong Cong Sin
52a202309b zephyr: bulk update to DT_NODE_HAS_STATUS_OKAY
Change instances of:

DT_NODE_HAS_STATUS(<node_id>, okay)

to

DT_NODE_HAS_STATUS_OKAY(<node_id>)

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-03 17:06:52 +01:00
TOKITA Hiroshi
5fe5126913 driver: gpio: rt1718s: Create a log module with LOG_MODULE_REGISTER
Since the log module entity is not defined anywhere,
LOG_MODULE_REGISTER should be used here instead of LOG_MODULE_DECLARE.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-30 09:04:58 +02:00
TOKITA Hiroshi
01d3312d07 drivers: gpio: emul: Fixed return type of get_pending_int
`get_pending_int` should return a uint32_t value as defined in
`struct gpio_driver_api`.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-30 09:04:58 +02:00
Sreeram Tatapudi
5c0275df27 drivers: gpio: ifx: Update GPIO driver to use PDL instead of HAL
Update the GPIO driver to use PDL API instead of HAL API to fix the
issue with configuring interrupts on both edges

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-09-26 03:32:13 -04:00
Jeroen Broersen
cf837dd371 drivers: gpio: stm32: keep track of clock enabling per pin
The driver enables the clock of a gpio-port if any of the
pins use the port. This is done by calling pm_device_runtime_get
when a pin is used and pm_device_runtime_put when the pin is not
used anymore.
These calls needs to be balanced. But if a single pin was configured
as GPIO_DISCONNECTED multiple times, every time pm_device_runtime_put
was called.
This caused the clock of the port to be stopped and therefore also
other pins on the same port stopped working.

This commit fixes this by keeping track of which pin on a port
has requested the clock and only call pm_device_runtime_get or
pm_device_runtime_put when the clock-request for the specific pin
changes.

Fixes #77698

Signed-off-by: Jeroen Broersen <jbroersen@interact.nl>
2024-09-23 13:20:23 -05:00
Chew Zeh Yang
62c0fc3e14 drivers: gpio_ambiq: Fixed uninitialized return variable
Fixed uninitialized return value variable issue, which would cause
functions to wrongly return non-zero value despite a successful
execution.

Signed-off-by: Chew Zeh Yang <zeon.chew@ambiq.com>
2024-09-23 10:01:40 +02:00
Chekhov Ma
c93a5de3ae drivers: mcux_igpio: improve pin-gaps handling
Improve handling of "pin-gaps" using "GPIO_DT_RESERVED_RANGES_NGPIOS"
series macro.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-09-20 15:18:49 -05:00
Chekhov Ma
a296705d37 drivers: mcux_rgpio: improve pin-gaps handling
Improve handling of "pin-gaps" using "GPIO_DT_RESERVED_RANGES_NGPIOS"
series macro.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-09-20 15:18:49 -05:00
Keith Short
9d999149e3 drivers: gpio: stm32: Fix compiler warning
The local function ll_gpio_get_pin_pull() is not always referenced.  Add
the __maybe_unused attribute to avoid compiler warnings (which may be
promoted to errors by downstream users).

Signed-off-by: Keith Short <keithshort@google.com>
2024-09-17 14:58:57 -04:00
Mathieu Choplain
263b03feeb drivers: gpio: stm32: add support for STM32WB0
Adds support for the STM32WB0 series in the existing STM32 GPIO driver.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Pisit Sawangvonganan
847a4eaad2 style: drivers: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-11 07:40:35 -04:00
Chekhov Ma
e79507b5e3 drivers: gpio: pca_series: handle byteorder
Add byteorder handling to support big-endian machine.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-09-11 09:38:04 +02:00
Chekhov Ma
d45497e4c8 drivers: gpio: pca_series: add api to get per-port register size
This commit add get per-port reg size api to make it more clear to
understand the design.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-09-11 09:38:04 +02:00
Chekhov Ma
5253eb1692 drivers: gpio: extend pca_series driver to pca953x and pca955x
This commit extends pca_series gpio driver to devices pca9538, pca9539,
pca9554 and pca9555.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-09-11 09:38:04 +02:00
Chekhov Ma
ac2d8993cc drivers: gpio: add pca_series gpio expander driver
There are numbers of drivers for different PCA(L) series chip. They
share similiar register layout and control logic. This driver intends
to unify these drivers for PCA(L)xxxx series i2c gpio expanders.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-09-11 09:38:04 +02:00
Benedikt Schmidt
4b657f7a2c drivers: gpio: implement possible manual reset of PCAL64XXA
Implement an option manual reset of the PCAL64XXA to allow the external
implementation of a retention of the port expander state.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-09-11 09:35:37 +02:00
Benedikt Schmidt
74476c45b0 drivers: gpio: extract method to apply initial state of PCAL64XXA
Extract method which applies the initial state in the driver
for the port expander PCAL64XXA.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-09-11 09:35:37 +02:00
Neil Chen
4af2180731 drivers: gpio_mcux: update gpio_mcux driver for MCXA156
Fix compiler warning issue(unused variable 'config',
uninitialized variable 'int_status')

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-09-10 12:39:18 -04:00
Sylvio Alves
8233b70ece espressif: clean up unused code
Remove all entries that as not being used.
This also update hal to re-enable warning flags
as such as -Wno-unused-variable.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-09-09 13:55:39 -04:00
Hao Luo
b532a3ea7f boards: ambiq: apollo3: add connector dtsi for apollo3 boards
Added connector dtsi files for apollo3_evb and apollo3p_evb,
and ran gpio_basic_api to test, all cases pass

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-08-29 18:06:07 +02:00
Mathieu Choplain
e4a7c0f9ce drivers: intc: stm32: rebrand EXTI API to be hardware-agnostic
This commit rebrands the STM32 EXTI API to a more hardware-agnostic
"GPIO interrupt controller" API, in anticipation of the introduction of
new series lacking the EXTI peripheral. The GPIO and EXTI drivers are
updated to match the rebranded API.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-27 10:50:39 -04:00
Mathieu Choplain
5cd274ce48 drivers: intc: stm32: make stm32_exti_line_t opaque
This commit makes the contents of the stm32_exti_line_t data type opaque to
the EXTI GPIO interrupt controller API users. The GPIO driver is updated
to comply with this API change.

N.B.: while some assertions are removed as part of this commit, they were
broken since forever anyways, so nothing of value is lost.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-27 10:50:39 -04:00
Mathieu Choplain
0551825ca3 drivers: gpio: stm32: move EXTI line port configuration to proper driver
Move the functions that interact with EXTI configuration registers to
select or get the GPIO port that triggers events on a given EXTI line
to the EXTI driver.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-27 10:50:39 -04:00
Mathieu Choplain
d34f5f27bf drivers: gpio: stm32: move EXTI clock initialization to proper driver
Move the EXTI clock initialization from GPIO to EXTI driver.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-27 10:50:39 -04:00
Mathieu Choplain
d0f528e933 drivers: gpio: stm32: modify EXTI configuration functions
Modify all functions in the GPIO driver that interact with the EXTI
so that names, signatures and comments match what they do better.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-27 10:50:39 -04:00
Mathieu Choplain
ea09463b7f drivers: gpio: stm32: use types with correct semantics
Use the `gpio_pin_t` type for all variables that hold a pin number (0..15).

Change all `int` to `uint32_t` instead, as signedness is unwanted.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-27 10:50:39 -04:00