Some STM32 SAI nodes may expose a shared kernel clock for both sub-blocks,
while others may provide different kernel clocks for sub-block A and
sub-block B.
These changes allow the driver to handle SAI nodes with different kernel
clock layouts. Nodes with sai_ker_ck use a shared kernel clock for both
sub-blocks, while nodes with sai_a_ker_ck and sai_b_ker_ck use
separate kernel clocks for each sub-block.
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
Modified the Microchip XEC eSPI TAF V2 driver adding support for
MEC174x/5x/165x. We agree with code quality tool analysis the eSPI
TAF register structure is too larger and not maintainable. The driver
now uses Zephyr's system memory mapped register access routines.
quality check tools find the structure too large.
Signed-off-by: Manimaran A <manimaran.a@microchip.com>
CK48 is now moved to separate mode.
It is shared by RNG and USB peripherals. This avoids
collision and also allows checking in RNG driver.
Signed-off-by: Adam BERLINGER <adam.berlinger@st.com>
Convert the BCM2711 auxiliary UART devicetree description to use the
generic NS16550 binding and driver.
Replace the SoC-specific compatible with the new BCM283x auxiliary UART
compatible, add the generic "ns16550" compatible, set the required
reg-shift and clock-frequency properties, and remove the dedicated
binding in favor of including the generic ns16550 binding.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
Apply the same pattern used for RP2350's core-supply-regulator to
RP2040: disable vreg by default in rp2040.dtsi and require boards to opt
in explicitly with status = "okay", rather than inheriting an always-on
default.
Every RP2040 board already set regulator-always-on and
regulator-allowed-modes = <REGULATOR_RPI_PICO_MODE_NORMAL> on this node
identically, since it supplies the core logic currently executing the
code and must never be disabled or switched to high-impedance mode. Move
these two properties into the shared vreg node definition in rp2040.dtsi
instead of duplicating them across all 33 boards, leaving each board
override to just enable the node.
Assisted-by: Claude:claude-sonnet5-(1m)
Signed-off-by: Andrew Fantino <fantino@qti.qualcomm.com>
The core-supply-regulator (vreg) node was enabled unconditionally in
the shared rp2350.dtsi, so every board inherited the "okay" status.
However, the core-supply-regulator hardware is shared between both cores
on the RP2350. If enabled unconditionally, it is ambiguous which CPU
initializes the core-supply-regulator in an AMP configuration.
Disable vreg by default in the rp2350.dtsi and have each board that
requires it set its status.
Assisted-by: Claude:claude-sonnet5-(1m)
Signed-off-by: Andrew Fantino <fantino@qti.qualcomm.com>
Add child nodes to the Wi-Fi ROM regions representing the default
entry points for LMAC and UMAC processors when no ROM patch is
applied. Reference these from the WICR node so the firmware patch
addresses are derivable from devicetree.
Signed-off-by: Dhanoo Surasarang <dhanoo.surasarang@nordicsemi.no>
Having a standard name for this property means we can provide additional
macro helpers to write the boilerplate that comes with hwspinlock drivers.
Signed-off-by: Pierrick Guillaume <pguillaume@fymyte.com>
Add modem driver for Nordic nRF91 series running the
Serial Modem application v2.0.0 or later. This includes the nRF91M1 module.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
The ADXL367 has two independent interrupt output pins, INT1 and INT2.
Add an int2-gpios property so a board that routes only INT2 to the host
can describe the connected pin. When only int1-gpios is present the
existing behavior is preserved; if both are defined, INT1 is prioritized.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Enable the drivers.pwm.pwm_flexio test case for frdm_mcxa577 using
FlexIO0 D14 (P2_6) as the PWM output channel.
Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
Enable the full-speed USB device controller on STM32L1:
- Assert PLL VCO = 96 MHz at build time (USB clock = VCO / 2).
- Skip the runtime 48 MHz clock check; the clock is deterministic.
- Drive the DP pull-up via SYSCFG_PMC USB_PU (no disconnect GPIO).
- Add the usb controller node and a nop USB PHY in devicetree.
Signed-off-by: Florian Moesch <florian.moesch@draeger.com>
The provided `ranges` property was performing using an identity mapping,
so it's wiser to replace it with an empty `ranges;` instead.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The PSoC6 flash controller (psoc6_01/02/03/04) declared two enabled
soc-nv-flash children: the main code flash (flash0 @0x10000000) and a
work flash (flash1 @0x14000000). The Infineon flash driver is
single-instance and derives its target from SOC_NV_FLASH_CHILD_NODE(0),
which expands DT_INST_FOREACH_CHILD_STATUS_OKAY over every enabled
soc-nv-flash child. With two enabled children the macro concatenates
both node identifiers and the driver fails to build (invalid token
pasting on the second node's properties).
The work flash has no Zephyr flash-driver consumer, so keep it disabled
by default. This restores a single enabled soc-nv-flash child under the
controller and lets boards that need the work flash enable it explicitly
alongside the required driver support.
Assisted-by: AI (GitHub Copilot)
Signed-off-by: Bill Waters <bill.waters@infineon.com>
Add support for uc8253 e-paper display driver. This chip shares most
registers layout with uc8151, hence the extension of the uc81xx driver
to also support the uc82xx without changing the filename.
Tested with Waveshare sku22698 e-paper HAT connected to Nucleo f446re
via SPI.
Signed-off-by: Grabowski Łukasz <lukasz.grabowski@pcosa.com.pl>
The VREFBUF output voltage is factory-calibrated by ST. On series such
as STM32H5 or STM32U5, the VREFBUF loads trimming data automatically
when changing voltage scale. However, on series such as STM32WB, the
software is responsible for loading the correct trimming data from OTP.
Implement reading of trimming data from OTP and manual application of
the proper trimming data by software, gated behind a new Kconfig option
for the driver, CONFIG_REGULATOR_STM32_SOFTWARE_TRIM, enabled by default
on series without automatic loading by hardware (these series' DTSI are
updated to provide the `nvmem-cells` property which gates the option).
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add NVMEM cells corresponding to VREFBUF trimming values in the DTSI for
STM32WB series to enable consumption through the NVMEM API.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
make the part that is needed for the esp32 to
change the offsets for the mac and base registers
more generic and use the devicetree for it.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Add an I2C driver for the Analog Devices ADXL313 3-axis accelerometer
with classic sensor API support for range and ODR configuration.
Use i2c_reg_update_byte_dt for register read-modify-write, reconfigure
range/ODR in standby, and add build_all coverage plus a release-notes
entry.
Signed-off-by: Leo Li <leo.li@rakwireless.com>
Describe the EMAC PTP reference clock as a second clock on the
esp32p4 Ethernet node so it can be enabled and queried through
the clock control driver.
The rate is resolved from the PTP reference clock source, so
Ethernet PTP support does not need to assume a fixed frequency.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Add disabled-by-default ana_cmpr nodes for the SoCs that have this
peripheral: two units on ESP32-P4 (sharing GPIO_PAD_COMP_INTR_SOURCE)
and one unit each on ESP32-C5 (GPIO_EXT_SOURCE) and ESP32-H2
(GPIO_INTR_SOURCE, shared with the GPIO peripheral's own interrupt).
Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
Add the devicetree binding for Espressif's analog comparator
(ana_cmpr), present on the ESP32-P4, ESP32-C5, and ESP32-H2 SoCs.
It compares a fixed analog source GPIO pad against either an
internal (VDD-divider) or external GPIO reference voltage, and
reports the crossing as edge events via the generic comparator API.
Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
Convert the RV3028 driver from an RTC-only driver into a
multi-function device driver.
The RV3028 provides multiple functional blocks including RTC,
EEPROM, RAM and timestamp functionality. Split the existing
driver into an MFD parent and RTC child driver to allow the
additional features to be supported through their respective
Zephyr subsystems.
The existing RTC functionality remains unchanged.
Signed-off-by: Janez Ugovsek <janez@ugovsek.info>
Add a MUX controller backend for the Analog Devices ADGM3121 DPDT MEMS
switch (DC-24GHz). The four switches are modeled as a single control line
whose state is a 4-bit switch bitmask (bit i = SW(i+1), 1 = closed):
mux_control_set() drives all four at once, mux_control_disconnect() opens
them all, and mux_state_get() reads the mask back. Both SPI (adi,adgm3121)
and parallel GPIO (adi,adgm3121-gpio) control modes are supported.
Co-authored-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Add a generic GPIO-backed mux controller: the selected state value is
binary-encoded LSB-first across the GPIO lines listed in the mux-gpios
property (bit N -> mux-gpios[N]). Useful for board-level analog/digital
muxes that are simply wired to MCU GPIOs.
Single-channel by design, so the binding pins #mux-control-cells = 0
and #mux-state-cells = 1. The driver plugs into the existing mux
subsystem (set / get_state ops) and reuses CONFIG_MUX_INIT_PRIORITY, so
consumers reference it through the generic mux-controls / mux-states
model.
Co-authored-by: Felix Wang <fei.wang_3@nxp.com>
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The mux subsystem redefines the "nxp,inputmux" binding as a mux
controller (#mux-control-cells / #mux-state-cells). The SCTimer PWM
capture path still programmed the INPUTMUX directly through the
fsl_inputmux HAL using two parallel "input-channels" /
"inputmux-connections" arrays, so on SoCs that expose the mux
controller node the two models conflicted. Move SCTimer capture onto
the generic mux model:
- nxp,lpc55S3x: add the INPUTMUX mux controller node (disabled by
default) so capture consumers can reference it; enabled per board.
- nxp,sctimer-pwm.yaml: drop the input-channels / inputmux-connections
arrays and include mux-consumer.yaml; the capture routing is now a
single "mux-states" phandle-array carrying <&inputmuxN index
connection>.
- pwm_mcux_sctimer: drop the direct fsl_inputmux HAL calls and apply
the routing through mux_state_apply(), guarded by device_is_ready().
The mux controllers init at priority 40, before PWM at 50, so they
are ready at SCTimer init time.
- Migrate the lpcxpresso55s36 pwm_loopback overlay to the mux-states
syntax and enable the INPUTMUX node.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
The mux subsystem redefines the "nxp,inputmux" binding as a mux
controller (#mux-control-cells / #mux-state-cells), which collided with
the EQDC driver's use of the same compatible through a
"specifier-space: inputmux" phandle-array. Reconcile the two by moving
the EQDC PHASEA/PHASEB input routing onto the generic mux model:
- nxp,mcxa156 / nxp,mcxa344 / nxp,mcxaxx6: switch the inputmux node
from #inputmux-cells to #mux-control-cells / #mux-state-cells so it
validates against the new binding (nxp,mcxa153 was already done).
- nxp,mcux-eqdc.yaml: drop the local inputmux-connections property and
include mux-consumer.yaml; routing is now described with "mux-states".
- eqdc_mcux: drop the direct fsl_inputmux HAL calls and apply the
routing through mux_state_apply(), guarded by device_is_ready(). The
mux controllers init at priority 40, before the sensor at 90, so they
are ready at EQDC init time.
- Migrate the frdm_mcxa153/156/266/344/346/366 QDEC sample overlays to
the mux-states syntax.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Add a controller-agnostic ztest suite that configures a route with
mux_control_set() / mux_state_apply() and verifies it by reading the
state back with mux_state_get().
Per-controller wiring lives in board overlays and Kconfig, so the same
suite exercises different backends:
- mimxrt1050_evk (XBAR): real SEL-register read-back.
- frdm_mcxe247 (TRGMUX): TRGCFG read-back. The SoC dtsi describes no
trgmux node, so the board overlay adds one.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
The mux subsystem redefines the "nxp,inputmux" binding as a mux
controller (#mux-control-cells / #mux-state-cells), which collided with
the previous ctimer PWM-capture use of the same compatible through a
"specifier-space: inputmux" phandle-array. Reconcile the two by moving
ctimer PWM capture onto the generic mux model:
- nxp,mcxa153: switch the inputmux node from #inputmux-cells to
#mux-control-cells / #mux-state-cells.
- nxp,ctimer-pwm.yaml: drop the local inputmux-connections property and
include mux-consumer.yaml; routing is now described with "mux-states".
- pwm_mcux_ctimer: drop the direct fsl_inputmux HAL calls and apply the
routing through mux_state_apply() guarded by device_is_ready(). The
route is applied when capture is configured, where all devices are
ready. Update the test overlay to the mux-states syntax.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Drop the direct MCUX_XBARA HAL coupling in the QDEC driver in
favour of the new generic mux subsystem: the driver now selects
CONFIG_MUX, defines mux states from a "mux-states" devicetree
property and applies them at init time via mux_state_apply(),
which makes it agnostic to the underlying mux hardware.
Update the nxp,mcux-qdec binding to include mux-consumer.yaml,
augment the i.MX RT10xx XBAR nodes with CCM clock phandles plus
the new #mux-control-cells / #mux-state-cells declarations, and
migrate the MIMXRT1050-EVK QDEC overlay to the mux-states syntax.
Add the matching XBAR clock support to the i.MX CCM clock driver
(IMX_CCM_XBAR1_CLK / IMX_CCM_XBAR2_CLK gate/ungate, guarded by
CONFIG_MUX_NXP_XBAR) so the XBAR controllers referenced by those
nodes can be clocked.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Drop the direct INPUTMUX_AttachSignal() coupling in the QDC driver
in favour of the new generic mux subsystem: the driver now selects
CONFIG_MUX, defines mux states from a "mux-states" devicetree
property, and applies them at init time via mux_state_apply().
This makes the driver mux-hardware-agnostic.
Update the nxp,mcux-qdc binding to use mux-consumer.yaml, expose
the inputmux0 node on the MCXNx4x family DTSI, and migrate the
FRDM-MCXN947 / MCXN5xx-EVK QDC overlays to the new mux-states
syntax.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Add a mux controller driver for the NXP MCUX XBAR (Crossbar
Switch) peripheral, supporting both 16-bit and 32-bit SEL register
layouts via DEVICE_MMIO. Update the nxp,mcux-xbar binding to also
declare the mux-controller interface (#mux-control-cells and
documenting the legacy xbar-maps property for as-yet-unmigrated
consumers (e.g. qdec_mcux).
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Add a mux controller driver for the NXP TRGMUX peripheral, used to
multiplex trigger signals between on-chip peripherals. The
controller exposes two address cells (trgmux instance / output id)
and supports register-level lock so that an applied routing can be
frozen for the lifetime of the system.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Add a mux controller driver for the NXP INPUTMUX peripheral.
Wraps the HAL INPUTMUX_AttachSignal() routine to route a
peripheral input signal onto a destination channel through the
unified mux_state_apply() API.
Co-Authored-By: Declan Snyder <declan.snyder@nxp.com>
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Introduce a new generic multiplexer (MUX) controller subsystem
modeled on the Linux mux framework. Provides a unified API for
software- and hardware-level signal routers via mux_control_set()
and mux_state_apply(), with userspace syscall handlers and common
devicetree bindings (mux-controller / mux-consumer) for downstream
consumers.
Co-Authored-By: Felix Wang <fei.wang_3@nxp.com>
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add UART driver support for the CH5xx.
This enables the hello_world and the drivers/uart/echo_bot samples.
Signed-off-by: Elie Carrot <elie.carrot@smile.fr>
Add a pin controller driver for the WCH CH570 SoC.
Implements `pinctrl_configure_pins` to enable GPIO initialization and
alternate function configuration.
Update hal_wch revision in west.yml and hal_ch32fun.h to sync with
changes merged in zephyrproject-rtos/hal_wch#6
Signed-off-by: Elie Carrot <elie.carrot@smile.fr>
This commit introduces the following changes:
- Add device tree definitions for the Qingke V3C cpu
- Add device tree definitions for the CH570 SoC
- Add bindings for UART, GPIO and pin control
Signed-off-by: Elie Carrot <elie.carrot@smile.fr>
Rework the esp32 pcnt driver to expose every counting unit of a
single device. The read-and-decode api threads the unit index
through sensor_chan_spec.chan_idx so sensor_read returns an
encoded buffer that the driver's decoder unpacks per unit. The
legacy sensor_channel_get path is kept on unit 0 for backward
compatibility.
The new sensor_chan_pcnt_esp32_unit(n) helper (in a public
header) packs the unit index into the legacy sensor_channel
field so sensor_attr_set and sensor_trigger_set can target a
specific unit. A new sensor_attr_pcnt_esp32_reset attribute
clears the hardware counter.
Dt binding gains counts-per-revolution (enables degrees output
on sensor_chan_rotation), high-limit and low-limit watchpoints
(counter auto-resets on reach and raises the trigger), and
zero-cross-event. Filter is documented in apb cycles with the
correct 1023 clamp.
Threshold trigger demultiplexes per unit in the isr and fixes
the old behaviour that silently re-allocated the isr on every
trigger_set. Interrupt alloc moves to init.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The driver supports up to nine SMBus controllers and implements the
standard SMBus protocols, except for Block Process Call.
It also supports an optional FIFO mode that uses the controller's
dedicated 32-byte FIFOs to reduce the interval between transferred
bytes and improve clock stretching during SMBus transactions.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Boards that gate the nRF70 VBAT/BUCKVBAT/AFEVBAT rail themselves had no
way to describe it, so the rail could not be raised and settled before
BUCKEN was asserted as the datasheet requires.
Include power.yaml in the nRF70 binding so the nodes accept the standard
supply-gpios and vin-supply properties, and add supply-power-up-delay-ms
for the settling time. Its 6 ms default is the minimum stated in the
nRF7002 datasheet, section 14.3.5, supply sequencing requirements. The
SPI bindings already inherited both properties through spi-device.yaml
while the QSPI ones did not, so in practice only QSPI gains them.
rpu_pwron() raises the supply and waits before touching BUCKEN, and
rpu_pwroff() releases it once IOVDD and BUCKEN are down. The two
properties are handled independently rather than as an either/or, so a
board with a shared regulator feeding a per-device load switch works:
power.yaml requires the regulator to be requested before the supply GPIO
goes active and the GPIO to go inactive before the regulator is
released, which is the order implemented here.
The supply spec and the regulator device are declared unconditionally,
using GPIO_DT_SPEC_GET_OR() and DEVICE_DT_GET_OR_NULL() so both are
present but empty when the properties are absent. That lets the call
sites use IS_ENABLED() instead of #ifdef, so every configuration
compiles the code and build errors are caught without adding twister
combinations. A vin-supply phandle to a node that is not okay yields
NULL, so rpu_gpio_config() checks device_is_ready(vin_supply) alongside
the GPIO ports.
If rpu_pwron() fails, rpu_init() only removes the GPIOs, which leaves a
switched rail undriven rather than off. It now releases the supply
first: the GPIO is driven inactive, and the regulator is released only
when this driver holds a reference on it, tracked in vin_supply_enabled.
regulator_is_enabled() cannot answer that question, as it is also true
when another consumer enabled a shared regulator.
Three Kconfig symbols are derived from the devicetree, one per property,
and NRF70_SUPPLY combines the two supply ones so the settling delay sits
behind a single condition. NRF70_VIN_SUPPLY and NRF70_IOVDD_REGULATOR
select REGULATOR, since the driver calls regulator_enable() and
regulator_disable(). Without that select such a configuration failed to
link with undefined references to those symbols. The iovdd-regulator
path has had this gap since 57baf7cf72 ("modules: nrf_wifi: Allow using
a regulator for IOVDD"); no in-tree board uses it, which is why it went
unnoticed.
Tested on an out-of-tree nRF5340 + nRF7002 board with
samples/net/wifi/shell in three configurations: the supply on a GPIO
only, behind a regulator-fixed node only, and both at once with the
regulator feeding the switch. All three power the RPU up and return
results from wifi scan.
Signed-off-by: Buster Bøgild Nielsen <busterbbn@gmail.com>
Add support for the Texas Instruments ADS7828 12-bit and ADS7830
8-bit 8-channel I2C ADCs. The two parts share one command byte and
channel permutation and differ only in resolution, so one source file
covers both. ADS7828-Q1 reuses the ADS7828 compatible.
Signed-off-by: JaeHwan Jin <jaehwan.jin@rakwireless.com>
With the SysTick minimum timeout now derived from the cycle rate, the
32 kHz Bee SoCs get a ~1-cycle floor automatically, well under the
32-cycle tick, so the hand-set zephyr,min-timeout-cycles override is no
longer needed. Removing it also lets the driver program sub-tick LOAD
values, which drains the small per-ISR cycle surplus and avoids the
dticks=2 double-fire that a 32-cycle floor produced.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Move tsi0 DTS from nxp_mcxn94x_common.dtsi to nxp_mcxnx4x_common.dtsi.
Both MCXN94x and MCXN54x variants can use it.
Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
Switch max32657evkit and max32658evkit boards from fixed-partitions to
zephyr,mapped-partition.
Enable USE_DT_CODE_PARTITION for these boards to avoid manually
calculating flash load offset.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>