Commit graph

25,525 commits

Author SHA1 Message Date
Furkan Akkiz
560f9d0b50 drivers: hwinfo: Add HWINFO driver for MAX32 MCUs
This commit adds HWINFO driver for MAX32 MCUs.
"z_impl_hwinfo_get_device_id" function is necessary for Zephyr USB
device stack.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2025-02-12 16:05:30 +01:00
Martin Hoff
b8272cc348 drivers: dma: silabs: implementation of chan_filter and chan_release
Implementation of chan_filter and chan_release allows to maintain
synchronization about DMA channel allocation between hal DMA driver and
zephyr DMA driver.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-02-12 16:03:39 +01:00
Jaro Van Landschoot
0085b34e02 drivers: gpio: gpio_stm32: add gpio speed
The driver already read the speed flags (cfr. ospeed) and called
LL_GPIO_SetPinSpeed, but these flags could not be set yet.

Signed-off-by: Jaro Van Landschoot <jaro.vanlandschoot@basalte.be>
2025-02-12 12:31:40 +01:00
Emil Gydesen
571f26cf1a Bluetooth: Rename BLE to Bluetooth (LE) where applicable
The BLE acronym is not an official description of Bluetooth
LE, and the Bluetooth SIG only ever refers to it as Bluetooth
Low Energy or Bluetooth LE, so Zephyr should as well.

This commit does not change any board or vendor specific
documentation, and the term BLE may still be used in those.
It will be up to the vendors to update it if they want,
since many of them are using the term BLE in their
products.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-02-12 12:24:18 +01:00
Ibrahim Abdalkader
e6c5f4d6aa drivers: video: gc2145: Fix output format.
- Fix analog mode register address.
- Fix output format register update.

Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
2025-02-12 12:24:03 +01:00
Abhinav Kulkarni
296f91a02a drivers: wifi: nxp: fix ap status ACS channel shown as 0
Update wifi ap status command to reflect acs channel correctly.

Signed-off-by: Abhinav Kulkarni <abhinav.kulkarni@nxp.com>
2025-02-12 12:23:35 +01:00
Fengming Ye
82bdc15b7e drivers: wifi: nxp: add ACS support for l2
Add ACS support in ap enable ops for embedded supplicant.
Channel set to 0 means ACS mode.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2025-02-12 12:23:35 +01:00
Fengming Ye
710231406e drivers: wifi: nxp: add support for soft AP disabled case
Add correct macro guard for soft AP only code.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2025-02-12 09:40:38 +01:00
Fengming Ye
4ffa27568d wifi: nxp: kconfig: decouple dependency of soft AP
Decouple dependency of CONFIG_NXP_WIFI_SOFTAP_SUPPORT.
Add wifi defconfig to set default kconfig options when soft AP
enabled.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2025-02-12 09:40:38 +01:00
Fengming Ye
f82de1ff09 drivers: wifi: nxp: add soft AP status for some fields
For embedded supplicant soft AP mode, add beacon period, DTIM period
and BTWT support status fields.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2025-02-12 09:40:38 +01:00
Fengming Ye
121c3f0d95 drivers: wifi: nxp: add wifi statistics support
Add support for wifi overrun count, beacon received and beacon missed
count.
Add support for wifi statistics clear.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2025-02-12 09:40:38 +01:00
Francois Ramu
2a5be6856a drivers: flash: stm32h5 flash driver reports the actual flash size
The Max flash size of the stm32H5 serie depends on the mcu device
from 256 to 1024 KB, in two banks.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2025-02-12 09:39:36 +01:00
Dawid Niedzwiecki
c2bcb5b646 drivers: flash: stm32: rename CR lock functions
Rename *write_protection functions to *cr_lock, because it is not
enabling real write protection. It only blocks changing register
by software accidentally.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2025-02-12 07:52:49 +01:00
Tom Hughes
a887fe1607 drivers: sensor: Fix unused function warning
Building with clang warns:

drivers/sensor/st/lis2dw12/lis2dw12.c:194:23: error: unused
function 'sensor_ms2_to_mg' [-Werror,-Wunused-function]
static inline int32_t sensor_ms2_to_mg(const struct sensor_value *ms2)
                      ^

Move the function to include/zephyr/drivers/sensor.h with the other
sensor_ms2_to* functions.

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-02-12 07:52:36 +01:00
Tom Hughes
5bb029893e drivers: ieee802154: Remove unused function
Building with clang warns:

drivers/ieee802154/ieee802154_dw1000.c:277:24: error: unused function
'dwt_reg_read_u16' [-Werror,-Wunused-function]
static inline uint16_t dwt_reg_read_u16(const struct device *dev,
                       ^

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-02-12 07:52:18 +01:00
Andriy Gelman
00c3528515 drivers: dma: dma_xmc4xxx: Add cyclic support
Adds cyclic support, where a multi-block transfer is automatically
reloaded to the first block after the multi-block transfer completes.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2025-02-12 02:26:20 +01:00
Andriy Gelman
51f3422192 drivers: dma: dma_xmc4xxx: Add multi-block support
Adds dma multi-block support xmc4xxx SoCs.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2025-02-12 02:26:20 +01:00
Andriy Gelman
57d77ac03e drivers: dma_xmc4xxx: Fix pending_length in stat when source_data_size > 1
Block_ts stores the number of transfers from DMA source, not the
transferred length in bytes.

Regression from 9c4cd3057d.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2025-02-12 02:26:20 +01:00
Andriy Gelman
ccdf23a941 drivers: dma: xmc4xxx: Add support for enabling fifo_mode_control
Adds fifo_mode_control option.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2025-02-12 02:26:20 +01:00
Tom Hughes
f80f60f477 drivers: modem: Remove unused function
Building with clang warns:

drivers/modem/modem_cmd_handler.c:102:31: error: unused function
'read_rx_allocator' [-Werror,-Wunused-function]
static inline struct net_buf *read_rx_allocator(k_timeout_t timeout,
                              ^

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-02-12 02:25:33 +01:00
Tom Hughes
19ec804ed1 drivers: sensor: Remove unused function
Building with clang warns:

drivers/sensor/st/iis2iclx/iis2iclx.c:68:19: error: unused function
'iis2iclx_reboot' [-Werror,-Wunused-function]
static inline int iis2iclx_reboot(const struct device *dev)
                  ^

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-02-12 02:25:21 +01:00
Tom Hughes
31be869672 drivers: sensor: Fix unused function warning
Building with clang warns:

drivers/sensor/st/lsm9ds0_mfd/lsm9ds0_mfd.c:42:19: error: unused
function 'lsm9ds0_mfd_accel_set_odr_raw' [-Werror,-Wunused-function]
static inline int lsm9ds0_mfd_accel_set_odr_raw(const struct device *dev,
                  ^

lsm9ds0_mfd_accel_set_odr_raw is only used by code that was guarded by
defined(CONFIG_LSM9DS0_MFD_ACCEL_SAMPLING_RATE_RUNTIME) in addition to
!defined(LSM9DS0_MFD_ACCEL_DISABLED).

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-02-12 02:25:10 +01:00
Tom Hughes
d46fa0ba69 drivers: sensor: Remove unused function
Building with clang warns:

drivers/sensor/st/lsm6dso/lsm6dso.c:89:19: error: unused function
'lsm6dso_reboot' [-Werror,-Wunused-function]
static inline int lsm6dso_reboot(const struct device *dev)
                  ^

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-02-12 02:24:57 +01:00
Tom Hughes
ce1bc3353c drivers: sensor: Remove unused function
Building with clang warns:

drivers/sensor/st/lsm6dso16is/lsm6dso16is.c:83:19: error: unused
function 'lsm6dso16is_reboot' [-Werror,-Wunused-function]
static inline int lsm6dso16is_reboot(const struct device *dev)
                  ^

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-02-12 02:24:45 +01:00
Tom Hughes
cc73219748 drivers: flash: spi_nor: Fix unused function warning
Building with clang warns:

drivers/flash/spi_nor.c:306:20: error: unused function
'delay_until_exit_dpd_ok' [-Werror,-Wunused-function]
static inline void delay_until_exit_dpd_ok(const struct device *const dev)
                   ^

delay_until_exit_dpd_ok is only used when ANY_INST_HAS_DPD is defined.

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-02-12 02:24:33 +01:00
Hou Zhiqiang
6a4fdd5189 drivers: pinctrl_imx: add imx91 support
Add pinctrl driver support for MIMX9131.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2025-02-11 22:08:59 +01:00
Hou Zhiqiang
372c9128bf drivers: clock: ccm_rev2: add imx91 support
Add clock driver support for MIMX9131.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2025-02-11 22:08:59 +01:00
Jérôme Pouiller
1544354862 drivers: wifi: Introduce SiWx91x WiFi driver
This driver allow to use Zephyr native IP stack or the IP stack provided
by HAL / WiseConnect.

The WiseConnect implementation may take advantage of the specific
features provided by the 917 (power consumption, speed,
validation...).

Some notable features are not available with this interface:
  - It seems Zephyr does not provide API to offload multicast membership
    management. User should be to directly call WiseConnect APIs
  - Support for ICMP frames is difficult. Note that WiseConnect
    automatically answer to ping request. It is just not possible to
    send ping requests and receive ping responses.
  - Zephyr and WiseConnect both support TLS offloading. However this
    patch does not implement it.
  - Reentrancy in the WiseConnect side is uncertain.

This implementation has been tested with samples/net/wifi/ (which relies
on subsys/net/lib/shell).

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-02-11 22:07:11 +01:00
Jérôme Pouiller
aa6914dc56 drivers: bluetooth: Introduce SiWx91x HCI driver
Driver was tested with a custom application which enabled the BT_SHELL.
Basic functionalities were verified:
 - Scanning
 - Advertising
 - Connecting

Configuration needed for the test:
 - CONFIG_BT=y
 - CONFIG_BT_PERIPHERAL=y
 - CONFIG_BT_CENTRAL=y
 - CONFIG_BT_SHELL=y
 - CONFIG_SHELL=y

Co-authored-by: Tibor Laczko <tibor.laczko@silabs.com>
Signed-off-by: Tibor Laczko <tibor.laczko@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-02-11 22:07:11 +01:00
Jérôme Pouiller
d97479fdc3 drivers: flash: Introduce SiWx91x Flash driver
Add flash driver for Silicon Labs SiWx91x family.

Co-authored-by: Martin Hoff <martin.hoff@silabs.com>
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-02-11 22:07:11 +01:00
Jérôme Pouiller
124c79dd23 drivers: dma: Introduce support for SiWx91x
Implement DMA driver for siwx917 using UDMA peripheral. For now,
Scatter/Gather DMA is not yet supported.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-02-11 22:07:11 +01:00
Jérôme Pouiller
938fb872de drivers: entropy: Introduce SiWx91x entropy driver
Support for random number generator is required for most of the
cryptographic operations, including support for WiFi and TLS.

This driver has been tested with tests/drivers/entropy:

    *** Booting Zephyr OS build v3.7.0-4339-g1ec5ce05f9f8 ***
    Running TESTSUITE entropy_api
    ===================================================================
    START - test_entropy_get_entropy
    random device is 0x8217298, name is rng@45090000
      0x93
      0x3e
      0xf1
      0x68
      0xd4
      0x22
      0xbf
      0x4d
      0xad
     PASS - test_entropy_get_entropy in 0.012 seconds
    ===================================================================
    TESTSUITE entropy_api succeeded

    ------ TESTSUITE SUMMARY START ------

    SUITE PASS - 100.00% [entropy_api]: pass = 1, fail = 0, skip = 0 ...
     - PASS - [entropy_api.test_entropy_get_entropy] duration = 0.01 ...

    ------ TESTSUITE SUMMARY END ------

    ===================================================================
    RunID: d1547c805699201af769cb01331efcce
    PROJECT EXECUTION SUCCESSFUL

Co-authored-by: Tibor Laczko <tibor.laczko@silabs.com>
Signed-off-by: Tibor Laczko <tibor.laczko@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-02-11 22:07:11 +01:00
Jérôme Pouiller
4291a6633f drivers: gpio: Introduce support for SiWx91x
Implement GPIO driver for Siliconlab SiWx917 family.

This driver support high Performance (HP), Ultra Low Power (ULP) and
Ultra Ultra Low Power (UULP) GPIOs.

Co-authored-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-02-11 22:07:11 +01:00
Jérôme Pouiller
d413936fb1 drivers: pinctrl: Introduce support for SiWx91x
This device is included on Silabs SiWx91x series. The current driver is
able to manage "High Power" and "Ultra Low Power" pins.

Co-authored-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-02-11 22:07:11 +01:00
Jérôme Pouiller
ffb1c0de61 drivers: clock: Add dumb clock driver for SiWx91x
This driver is mostly the initial seed for further implementation of a
real clock driver.

It doesn't allow the user to choose the clock source for the various
peripherals. The driver hardcodes some sane values.

Note that for now, the driver snps,designware-i2c does not support
"clocks" attribute. So this patch hardcode the clock configuration in
the init of the clock driver.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-02-11 22:07:11 +01:00
Jérôme Pouiller
88830a3b25 uart: ns16550: Enable clock if defined
Currently, ns16550 allows the user to specify a clock attribute in the
Device Tree. This node is use to retrieve the internal frequency of the
hardware block.

However, ns16550 expects the clock is already initialised and it doesn't
try to enable it. Let's fix that issue.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-02-11 22:07:11 +01:00
Yangbo Lu
3aafce99b3 drivers: ethernet: eth_nxp_imx_netc: support handling pseudo MAC
This is to support handling pseudo MAC during initialization, but not
to support DSA master port. Current driver supports DSA with limitation
that only switch function is available without management via DSA master
port. DSA master port support is TODO work.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-02-11 22:03:48 +01:00
Yangbo Lu
9a7982f801 drivers: ethernet: eth_nxp_imx_netc: support getting phy mode from dts
Added support for getting phy mode from dts.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-02-11 22:03:48 +01:00
Yangbo Lu
7e7eb8cf32 drivers: ethernet: add DSA driver for NXP i.MX NETC
NXP i.MX NETC is a TSN capable Ethernet IP. It may support
ENETC MACs, or/and multiple ports switch.

The ENETC MAC was handled by eth_nxp_imx_netc driver.
This DSA driver is to support NETC switch device.
Current driver supports DSA with limitation that only switch
function is available without management via DSA master port.
DSA master port support is TODO work.

Take i.MX RT1180 NETC hardware as an example.

                +--------+                  +--------+
                | ENETC1 |                  | ENETC0 |
                |        |                  |        |
                | Pseudo |                  |  1G    |
                |  MAC   |                  |  MAC   |
                +--------+                  +--------+
                    | zero copy interface       |
+-------------- +--------+----------------+     |
|               | Pseudo |                |     |
|               |  MAC   |                |     |
|               |        |                |     |
|               | Port 4 |                |     |
|               +--------+                |     |
|           SWITCH       CORE             |     |
+--------+ +--------+ +--------+ +--------+     |
| Port 0 | | Port 1 | | Port 2 | | Port 3 |     |
|        | |        | |        | |        |     |
|  1G    | |  1G    | |  1G    | |  1G    |     |
|  MAC   | |  MAC   | |  MAC   | |  MAC   |     |
+--------+-+--------+-+--------+-+--------+     |
    |          |          |          |          |
NETC External Interfaces (4 switch ports, 1 end-point port)

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-02-11 22:03:48 +01:00
Yangbo Lu
12c2a9b357 drivers: ethernet: eth_nxp_imx_netc_psi: improve log info
Improved log info for MAC initialization and link event.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-02-11 22:03:48 +01:00
Yangbo Lu
83f835a31f drivers: ethernet: move i.MX NETC ethernet driver to subdirectory
Moved i.MX NETC ethernet driver to subdirectory. And DSA driver will be
added.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-02-11 22:03:48 +01:00
Ryan McClelland
653589c558 drivers: i3c: add controller handoff support
Add controller handoff

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-02-11 22:03:32 +01:00
Ryan McClelland
e5ac786ba8 drivers: i3c: shell: record crcaps and crhdly1 in to desc from shell
Record the crcaps and crhdly1 in to the i3c descriptor when calling from
the shell.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-02-11 22:03:32 +01:00
Ryan McClelland
3805ac189a drivers: i3c: shell: add crhdly1 and crcaps to info
Add crhdly1 and crcaps to the info shell command.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-02-11 22:03:32 +01:00
Ryan McClelland
88f5e16edc drivers: i3c: add controller handoff helper
This adds controller handoff according to section 5.1.7.1 of the
I3C specification.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-02-11 22:03:32 +01:00
Ryan McClelland
5f8c302306 drivers: i3c: add controller handoff parameters in to i3c desc
Add the parameters crcaps and crhdly1 in to the i3c device descriptor.
Also, retrieve the values if they are available.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-02-11 22:03:32 +01:00
Ryan McClelland
ad7b4422bc drivers: i3c: shell: add ccc getacccr command
Add the CCC GETACCCR command to the i3c shell.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-02-11 22:03:32 +01:00
Ryan McClelland
982c02d910 drivers: i3c: add ccc getacccr
Add a ccc helper for getacccr

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-02-11 22:03:32 +01:00
Lucien Zhao
0f29766b08 drivers: clock: mcux_lpc_syscon_clock.c: add ctimer5/6/7 support
add ctimer5/6/7 clock get support

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2025-02-11 18:55:53 +01:00
Gerard Marull-Paretas
e9eee4eb23 drivers: can: nrf: disable pin retention if GPD is enabled
When GPD is enabled, the pinctrl driver enables pin retention if the
peripheral is in the FAST_ACTIVE1 domain. This seems to break CAN, so
make sure retention is not active.

Investigations on why this is needed are ongoing, however, this makes
CAN functional again with some minor changes.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-02-11 15:58:10 +01:00