Commit graph zephyr/drivers/pinctrl
Author SHA1 Message Date
Raffael Rostagno
bf1e600e0c drivers: pinctrl: esp32: Add sleep hold flag
Add sleep hold flag to allow setting groups of pins to
automatically hold pad value during low power states (light/deep sleep).

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2026-03-24 09:05:47 -04:00
Łukasz Kędziora
eaa564115e drivers: pinctrl: Add Synaptics pinctrl driver
This adds the pinctrl driver for Synaptics SR100-series SoCs.

Signed-off-by: Łukasz Kędziora <lkedziora@antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
Signed-off-by: Andreas Weissel <andreas.weissel@synaptics.com>
2026-03-23 10:40:33 -04:00
Hau Ho
7d9db31923 drivers: pinctrl: Support pinctrl driver for RX14T SoC
Modify driver code to adapt with RX14T SoC

Signed-off-by: Hau Ho <hau.ho.xc@bp.renesas.com>
2026-03-23 10:16:41 +01:00
Mathieu Choplain
3e9e139565 drivers: pinctrl: stm32: move iosync configuration to common code
Perform iosync configuration in the common stm32_gpioport_configure_pin()
function instead of doing it from the pinctrl driver. This simplifies the
pinctrl driver and also opens the door to iosync configuration using the
GPIO API (via vendor-specific extensions) in the future.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-03-20 09:57:51 -05:00
Laurentiu Mihalcea
1654a34817 drivers: pinctrl: Kconfig.imx: fix missing dependency for PINCTRL_IMX_SCMI
Currently, PINCTRL_IMX_SCMI depends on the SCMI stack being enabled and
the existence of the pinctrl protocol node. This, by itself, is not enough
since this condition can be met by any vendor wanting to use the pinctrl
protocol. Thus, the IMX SCMI pinctrl driver will end up being selected for
other vendors as well, which is not correct.

Fix this by adding a dependency on the IMX-specific pinctrl child being
present. By doing this, the driver will remain auto-selected.

Fixes #105673.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2026-03-20 20:43:36 +09:00
Sylvio Alves
2a33d87497 drivers: pinctrl: add esp32c5 support
Extend the ESP32 pin control driver to support ESP32-C5.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-03-19 14:53:05 -05:00
Pisit Sawangvonganan
04b3c3b319 drivers: pinctrl: stm32: fix typo
Fix a typo in `pinctrl_configure_pins` where the variable `pin_cgf`
was used instead of `pin_cfg`. Update all references accordingly.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-03-19 11:33:35 +00:00
William Markezana
c25890aa2b drivers: pinctrl: bflb: add BL70XL support to shared BL60x/BL70x driver
Extend the shared pinctrl driver for BL70XL:
- Use 4 UART signal routing slots (vs 8 on BL60x/BL70x)
- Add XTAL32K pin muxing disable for GPIO30/31
- Handle key scan drive function (disable IE)
- Replace magic numbers with register field defines
- Add BL70XL to pinctrl CMakeLists.txt (reuses bl60x_70x driver)

Signed-off-by: William Markezana <william.markezana@gmail.com>
2026-03-18 17:40:26 -05:00
Holt Sun
3336e37ad5 drivers: clock_control: mcux_sim: decode clock cell via DECODE macros
Replace raw clock_ip_name_t cast with a structured decode of the
encoded `id` clock cell introduced by the KINETIS_SIM_CLOCK() macros.

The sub_system pointer carries a 32-bit encoded value. Extract it via
(uint32_t)(uintptr_t)sub_system and use the KINETIS_SIM_CLOCK_DECODE_*()
macros to retrieve gate_offset, gate_bit and clock_name. This avoids
relying on a C bitfield struct overlay (implementation-defined bit
ordering) or undefined pointer casting behaviour.

Also add mcux_sim_validate_gate_offset() which checks that the decoded
gate register offset is word-aligned and within the SIM register region
size declared in DT, returning -EINVAL if not. This prevents a malformed
clock specifier from accidentally enabling or disabling an unintended
peripheral gate.

Remove the LOG_ERR call and the entire logging module infrastructure
(LOG_LEVEL define, log.h include, LOG_MODULE_REGISTER) since no log
calls remain in the file. This also eliminates the GNU statement
expression extension warning triggered by LOG_ERR macro expansion
under -Wpedantic.

The NXP_KINETIS_SIM_NODE macro is moved to the top of the file so it
can be shared by both the validation helper and the clkout_source /
clkout_divider property accessors.

Fix pinctrl_nxp_port.c to pass the encoded `id` cell (name) as the
clock subsystem instead of constructing CLK_GATE_DEFINE() directly
from the explicit offset/bits DT cells. The old approach bypassed
the new encoding and caused PORT clocks to not be enabled, resulting
in UART pins not being muxed and no serial output.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2026-03-16 09:02:51 +01:00
Mathieu Choplain
0a05ae91f5 drivers: pinctrl: stm32: cleanup IOsync configuration
Now that obtaining the GPIO port device object is always done, the IOsync
configuration logic can be cleaned up. Notably, we can perform it while
still holding the PM Device Runtime reference to avoid an unnecessary
clock_disable and clock_enable.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-03-13 14:27:30 -07:00
Mathieu Choplain
7dc5e73f39 drivers: gpio|pinctrl: stm32: perform pin configuration in common module
The `gpio_stm32_configure()` function is used by both the GPIO and PINCTRL
drivers to configure I/O pins. Move it to the GPIO port manager module's
code so it can be shared properly and update both drivers accordingly.

With this change, the GPIO and PINCTRL drivers are completely decoupled.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-03-13 14:27:30 -07:00
Mathieu Choplain
7e18141046 drivers: gpio|pinctrl: stm32: introduce common module for device mgmt
On STM32 hardware, the GPIO port's MMIO interface is used for two purposes
which have their own separate Zephyr API: controlling the state of digital
I/O pins directly (GPIO API) and configuring I/O pins for a specific usage
(PINCTRL API). Historically, this was handled by having the PINCTRL driver
call inside the GPIO driver which works but creates a dependency loop.

Introduce a new `GPIO port manager` module in SoC-specific common code that
takes over various from the existing GPIO/PINCTRL drivers: GPIO port device
instantiation and `GPIO port index -> device` mapping respectively.

Modify the GPIO and PINCTRL drivers to make use of this GPIO port manager
module - a first step in decoupling both drivers from each other.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-03-13 14:27:30 -07:00
Sylvio Alves
c64a74e711 espressif: adapt to hal_espressif IDF master sync
Adapt all Espressif SoC and driver code to the updated
hal_espressif module synced with IDF master branch.

Main changes:
- clock control: delegate peripheral clock gating to HAL
  layer using new clock/reset APIs
- SPI/GDMA: adapt to restructured DMA HAL with new channel
  allocation and configuration interfaces
- ethernet: add RMII clock configuration and PHY management
- GPIO: simplify using direct HAL function calls
- flash: adapt to updated SPI flash HAL interfaces
- linker scripts: update IRAM/DRAM mappings for new HAL
  object files
- DTS: fix ESP32-S2 PSRAM dcache1 address to match actual
  MMU mapping region (0x3f800000 DRAM1 instead of 0x3f500000
  DPORT which lacks 8-bit access capability)
- west.yml: update hal_espressif revision

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-03-13 11:38:18 +01:00
Duy Dang
925d652d10 driver: pinctrl: Add support R-Car V4H SoC
Add pin definition for R-Car V4H SoC.

Signed-off-by: Duy Dang <duy.dang.yw@renesas.com>
2026-03-10 14:15:49 -05:00
Yuzhuo Liu
e5c0f9698f drivers: pinctrl: add rtl8752h pinctrl driver
Add rtl8752h series in bee pinctrl driver.

Signed-off-by: Yuzhuo Liu <yuzhuo_liu@realsil.com.cn>
2026-03-09 15:03:48 -05:00
Tien Nguyen
4558034d7f driver: flash: Initial flash support for Renesas RZ/A2M
Initial flash support for Renesas RZ/A2M

Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
2026-03-06 09:54:31 +01:00
Khoa Tran
1c67a64bff drivers: pinctrl: Add support for Renesas RA0 SoCs
Add pinctrl driver support for Renesas RA0 SoCs

Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2026-03-02 10:48:45 +01:00
Michal Smola
f5c65899dc drivers: nxp: Allow usage of clocks without subsystem name
Several NXP drivers require clock control subsystem name definition in
Devicetree. It prevents usage of clock control without subsystem such
as fixed-clock. fixed-clock can be used for early SoC enablement when
complete clock controller is not available or not required.
Allow optional usage of clock control without subsystem by using 0 as
subsystem name if the name is not defined in devicetree. Add the option
for port, i2c, spi and serial drivers.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2026-02-23 16:59:01 +00:00
Mathieu Choplain
a32d97033f drivers: pinctrl: stm32: move F1-specific SWJ-CFG to SoC-specific init
A special SYS_INIT() callback with hardcoded PRE_KERNEL_1 level 0 priority
inside the STM32 pinctrl driver was configuring the SWD-JTAG ports on
STM32F1 series.

Since this is the only series which requires such configuration, move this
code to the SoC-specific init hook instead (which has almost the same
priority as PRE_KERNEL_1 level 0 - it runs just slightly earlier).

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-02-19 10:05:55 -06:00
Yuzhuo Liu
b1e409e01f drivers: pinctrl: add realtek bee pinctrl driver
Add realtek bee pinctrl driver.

Signed-off-by: Yuzhuo Liu <yuzhuo_liu@realsil.com.cn>
2026-02-17 15:22:38 +00:00
Silesh C V
f6314e9a43 drivers: pinctrl: add alif pinctrl driver
Add pin control driver for Alif SoCs. The driver manages
pin muxing (alternate function selection) and pad configuration
for Alif SoCs.

Signed-off-by: Silesh C V <silesh@alifsemi.com>
2026-02-17 10:31:21 +01:00
Holt Sun
578f9fd972 drivers: pinctrl: mci_io_mux: correct CTIMER macro name
Fix inconsistent macro name from IOMUX_GET_SCTIMER_IN_CLR_ENABLE
to IOMUX_GET_CTIMER_CLR_ENABLE to align with the actual CTimer
functionality and related macro naming convention.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2026-02-09 09:37:39 +01:00
Muhammad Waleed Badar
00eaa50369 drivers: pinctrl: add bcm2711 pinctrl driver
The BCM2711 GPIO controller provides 58 GPIO pins (0-57) that can be
configured for various functions including GPIO input/output and
alternate functions for peripherals like SPI, I2C, UART, PWM, etc.

Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
2026-02-06 08:52:07 -06:00
Hau Ho
7769a09ab5 drivers: pinctrl: Support pinctrl driver for RX140 SoC
Modify driver code to adapt with RX140 SoC

Signed-off-by: Hau Ho <hau.ho.xc@bp.renesas.com>
2026-02-06 11:09:14 +01:00
Darcy Lu
b0b5dc7ff6 drivers: pinctrl: add pinctrl driver for RTS5817
Add pin controller driver for RTS5817

Signed-off-by: Darcy Lu <darcy_lu@realsil.com.cn>
2026-02-04 13:49:21 +01:00
Scott Worley
99ce899c22 drivers: pinctrl: microchip: mec: One PINCTRL driver for all MEC parts
GPIO hardware in Microchip MEC parts is the same except for the MUX
field (number of alternate functions). We modify the old XEC PINCTRL
driver to work on all MEC parts and also be independent of HAL and
CMSIS register structures. During development we found a DT issue
with DT_ENUM_IDX_OR always inserting the default value. Worked around
by converting slew rate and drive strength to YAML integer type and
created defines for the values in the dt-bindings header.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2026-01-07 07:50:18 +01:00
Dat Nguyen Duy
377922dfcf drivers: add initial support for NXP S32K566
Initial support for NXP S32K566 M7 & R52: Clock,
Pin control, GPIO and Uart

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2025-12-23 15:18:17 +01:00
Sreeram Tatapudi
0a06f5b91a dts: bindings: Drop cat1 from the infineon binding files
Drop cat1 from the binding files to enable reuse by other
category devices as well.

Fixes #99174

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2025-12-17 13:58:09 -05:00
zjian zhang
d21b2aa15d drivers: pinctrl: add amebadplus pin controller driver
add amebadplus pin controller driver

Signed-off-by: zjian zhang <zjian_zhang@realsil.com.cn>
2025-12-15 17:06:38 +00:00
Sreeram Tatapudi
5ecf248ba3 drivers: infineon: Drop cat1 from the files names
Drop cat1 from the file names to enable reuse by other
category devices as well

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2025-12-07 21:19:38 -05:00
Mohamed Azhar
3c79fb39a0 drivers: pinctrl: microchip: update pinctrl driver for Port G1
Updates G1 pinctrl driver

Signed-off-by: Mohamed Azhar <mohamed.azhar@microchip.com>
2025-12-04 05:24:51 -05:00
Haoran Jiang
6d4900d0b9 drivers: pinctrl: sf32lb: Preserve the SR/IS definition for each register
Only modify the definitions that need to be changed in the pinmux register;
SR/IS will retain their default values after reset.

Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>
2025-12-03 11:44:28 +01:00
Josuah Demangeon
30950b888d style: drivers: sort Kconfig and CMake includes
Use the "zephyr-keep-sorted-start/stop" comment to have CI check
the alphabetical order of includes, to help reducing the chance
of conflicts while contributing drivers.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-11-17 13:48:03 -05: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
Bjarki Arge Andreasen
0a8888d000 drivers: pinctrl: nrf: simplify pin retention
GPIO pad power domain management is not neccesary if the quirky
cross domain feature is handled at the application level. Replace it
with directly setting/clearing pin retention, as hardware will force
power domains on automatically.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-10-23 18:06:30 +02:00
David Jewsbury
ac94ca7894 drivers: pinctrl: nrf: add support for MSPI
Support for new MSPI peripheral where there is no PSEL
so pins are setup through CTRLSEL.

Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2025-10-23 18:00:13 +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
Lucien Zhao
80c32929a1 driver: pinctrl: adapt for mcxe31x series
- add binding files: nxp,mcxe31x-siul2-pinctrl.yaml
- Enable PINCTRL_NXP_SIUL2 when nxp,mcxe31x-siul2-pinctrl is ok

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2025-10-22 18:35:01 +03: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
Karsten Koenig
85363f9e53 drivers: pinctrl_nrf: Add coresight tpiu pins
Pinctrl needs to set the needed drive and direction of the pins. Also
this later allows automatically setting the clock bit for the traceclk
pin.

Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
2025-10-08 10:09:02 +02:00
Michał Stasiak
ccef0cf132 drivers: pinctrl: nrf: use HAL defines
Replaced MDK symbols with defines from HAL.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-10-03 21:07:13 -04:00
Hou Zhiqiang
a3e9b59139 drivers: pinctrl_imx: add mimx9111 support
Add pinctrl driver support for MIMX9111.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Jiafei Pan <jiafei.pan@nxp.com>
2025-10-03 12:51:13 +03:00
Andrzej Głąbek
ca79733388 drivers: pinctrl_nrf: Add support for SPIM CSN pin function
Certain SPIM instances in nRF52/53/54L/54H Series provide hardware
control of the CSN (chip select) line. Although the standard SPI
drivers do not use this feature, it should be possible to configure
this line through pinctrl in case some special driver needs this.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2025-10-01 14:37:46 +03:00
Mohamed Azhar
6241d249a9 drivers: pinctrl: microchip: update pinctrl driver for Port G1 IP
Update pinctrl driver for Microchip Port G1 Peripheral IPs

Signed-off-by: Mohamed Azhar <mohamed.azhar@microchip.com>
2025-09-23 09:41:05 +01:00
Gerard Marull-Paretas
2d50a4176b drivers: pinctrl: sf32lb52x: initial driver
Initial driver for SF32LB52X SoCs.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2025-09-19 16:34:15 +02:00
Ren Chen
20c8f6b5f7 drivers: pinctrl: it8xxx2: add support for alternate function 5
This commit introduces alternate function 5 setting for it8xxx2 SoC.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2025-09-19 08:35:10 -04:00
Manuel Argüelles
0f0cad00d4 drivers: pinctrl: nxp: drop soc name from siul2 driver
The SIUL2 pin control 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
Raffael Rostagno
9d257c362f drivers: pinctrl: esp32h2: Add support
Add pinctrl support for ESP32-H2.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-08-26 22:07:36 +02:00
Krzysztof Chruściński
4b374ec7f5 drivers: pinctrl: Allow keeping pinctrl sleep state
When PM or PM_DEVICE is enabled pinctrl sleep state is using for
device suspension. However, there are cases where power management is
not used but we still want to be able to put pins to sleep state, e.g.
device deinit.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-08-22 12:35:42 +02:00
Tanguy Raufflet
6325b73739 drivers: pinctrl: stm32: add gpioz pinctrl support for STM32MP2
The STM32MP2 series needs gpioz pinctrl support to be able to use
the GPIOZ pins.

Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
2025-08-21 18:41:59 +02:00