Commit graph

110426 commits

Author SHA1 Message Date
Wilfried Chauveau
c0139fad06 drivers: gpio: mmio32: update gpio_mmio32 to behave like other divers
The current implementation requires SoCs/Boards to manualy instantiate
the preripherals and initilize them.

The change lets Zephyr rely on the device tree setup to instantiate &
initialize the relevant gpio peripheral.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2025-02-14 10:42:02 +01:00
Kacper Brzostowski
eb4c8fc319 boards: weact: Add support for WeAct STM32H5 Core Board
Low cost STM32H5 series development board with bare minimum to run the MCU

Signed-off-by: Kacper Brzostowski <kapibrv97@gmail.com>
2025-02-14 10:41:51 +01:00
Kacper Brzostowski
d6fdbb8953 dts: st: h5: addSTM32H562xG SoC support
Added STM32H562xG dts file

Signed-off-by: Kacper Brzostowski <kapibrv97@gmail.com>
2025-02-14 10:41:51 +01:00
Titouan Christophe
baa41f43af boards: stm32h7s78-dk: add support for OTGFS (USB port 2)
Add OTGFS peripheral to the stm32h7rs soc series, and enable it on the
Discovery board STM32H7S78-DK, where it is wired to USB Type-C port 2.

Signed-off-by: Titouan Christophe <moiandme@gmail.com>
2025-02-14 10:41:43 +01:00
Grygorii Strashko
e549bc702a drivers: xen: gnttab: process gnttabs in reverse order
The Xen extends domain grant tables every time domain requests gnttab
basing on gnttab idx. If idx > xen_current_max_gnttab_idx the Xen extends
grant table so that idx <= xen_current_max_gnttab_idx. The growing grant
tables on every hypercall is a bit costly operation and it also results in
the bunch of log messages:

(XEN) xen-source/xen/common/grant_table.c:1909:d0v0 Expanding d0 \
  grant table from 1 to 2 frames

This patch changes gnttab processing from gnttab max_idx to low_idx, so the
first hypercall has the largest index, ensuring that the grant table will
grow only once. It also reduces number of log messages.

Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
2025-02-14 10:41:33 +01:00
Dmytro Firsov
71b9ec2c2c drivers: xen: gnttab: remove redundant GNTTABOP_setup_table call
Initially this driver was a port from mini-os. Michal Orzel
(@orzelmichal) pointed that it contains incorrect grant table
initialization sequence and redundant calls. Driver mapped grant table
frames via loop of XENMEM_add_to_physmap calls and then tried to do the
same but via GNTTABOP_setup_table operation. After completion of latter
it did not even use provided frames list. This did not cause any major
issues, since XENMEM_add_to_physmap correctly map gnttab frames that
were used.

Remove redundant GNTTABOP_setup_table call from grant table driver to
clean up its initialization sequence.

Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
2025-02-14 10:41:33 +01:00
Dmytro Firsov
cd31a41328 drivers: xen: gnttab: limit number of grant frames via config
Xen allocates a region that should be used as a place for grant table
mapping and passes it via the device tree. By design, this region may
be quite large (up to 4096+ frames/pages), but the number of frames is
usually limited by the max_grant_frames domain parameter (usually 32 or
64).

Linux maps these frames on demand and when reaches mentioned limit
it just stops expanding. At the same time, previous implementation of
Zephyr gnttab driver calculated the number of grant frames by dividing
whole region by page size and tried to map it during init. If the
region specified in the device tree was larger than the
max_grant_frames set by Xen, it would fail on ASSERT, since Xen would
return an error.

To address these issues CONFIG_NR_GRANT_FRAMES was introduced. It
allows to limit size of grant table and map only required number of
pages. Additionally, a check for max_grant_frames Xen limit was
introduced to initialization - if this value will be less than
CONFIG_NR_GRANT_FRAMES, k_panic() will be called.

Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
2025-02-14 10:41:33 +01:00
Dmytro Firsov
0e21b25245 drivers: xen: gnttab: prevent double-free for grant refs
Grant references are allocated via simple O(1) allocator - idx of first
free gref is always stored in the "0" list entry (e.g. list[0] == "A").
Next free gref (e.g. B) will be stored inside list entry with the index
of previous (list[A] == B) and so on. This allows to find free gref
instantly if available. However, current implementation allows a user
to perform a double-free of some taken grefs since it doesn't store any
information about entries being currently claimed. This may cause
gref_list to break.

Add GNTTAB_GREF_USED value and mark all taken grefs with it to prevent
double free in put_grant_entry().

These changes also required updates for allocator and semaphore init
sequences, since we can not use put_free_entry() during driver
initialization anymore.

Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
2025-02-14 10:41:33 +01:00
Dmytro Firsov
63ea48cacc include: xen: add gnttab_query_size struct to public headers
Xen public headers were imported into Zephyr source tree and only used
structs were added (not copied as is). Mow, for refactoring and
improving gnttab driver we need to augment grant table public header
with one more struct. It will be used for reading actual number of
available Xen grant frames.

Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
2025-02-14 10:41:33 +01:00
Dmytro Firsov
3f92a8bbdd drivers: xen: gnttab: use correct struct for grant frames unmapping
Previously the driver's 'gnttab_unmap_refs()' signature used incorrect
struct - the same one that is used for mapping. Since 'host_addr'
membber, that is used to point to required frame is first in both
structures it somehow worked.

Fix mistake and use 'struct gnttab_unmap_grant_ref' for grant frames
unmapping hypercalls.

Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
2025-02-14 10:41:33 +01:00
Lubos Koudelka
64e48014cd samples: boards: Add MCO support for nucleo_wba55cg
Added overlay and modified sample.yaml to support the nucleo_wba55cg
board in the MCO example. Due to GPIO conflict, UART print out is not
functional.

Signed-off-by: Lubos Koudelka <lubos.koudelka@st.com>
2025-02-14 10:41:18 +01:00
Lubos Koudelka
21e4084917 dts: arm: st: wba: Add MCO1 peripheral to STM32WBA device tree
Added MCO1 peripheral definition to the STM32WBA device tree to enable
MCO functionality.

Signed-off-by: Lubos Koudelka <lubos.koudelka@st.com>
2025-02-14 10:41:18 +01:00
Lubos Koudelka
099970e130 dt-bindings: clock: Add MCO register definition for STM32WBA
Added MCO register definition to support MCO functionality in the STM32WBA
series. This update also includes the addition of MCO_PRE_DIV and MCO_SEL
defines.

Signed-off-by: Lubos Koudelka <lubos.koudelka@st.com>
2025-02-14 10:41:18 +01:00
Camille BAUD
ee37a94aa8 sensor: xbr818: struct sensor... to DEVICE_API
This makes static const struct sensor_driver_api into DEVICE_API(sensor

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-02-14 08:45:13 +01:00
Alberto Escolar Piedras
2f2a91a8db samples/*/*shell: filter test with shell harness on bsim targets
The shell harness expects the UART can be routed to stdin/out on POSIX
arch based targets, but this is not the case for the bsim targets (at
least not yet, and not using the native_posix UART configuration option)

This causes these tests to fail timing out in CI => let's filter these
platforms by now.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-02-14 08:45:04 +01:00
Mubin Sayyed
16d5d5e480 west_commands: runners: Fix parameters passed to xsdb
Existing logic is passing elf file as parameter only when fsbl
or bit file parameter is present. This is incorrect, elf file should
be always passed irrespective of other parameters.

Signed-off-by: Mubin Sayyed <mubin.sayyed@amd.com>
2025-02-14 08:44:54 +01:00
The Nguyen
c684fea123 boards: renesas: add support for USBFS port on Renesas RA boards
Add USB support on USBFS port on these boards:
- RA8: ek_ra8m1, ek_ra8d1, mck_ra8t1
- RA6: ek_ra6m1, ek_ra6m2, ek_ra6m3, ek_ra6m4, ek_ra6m5
- RA4: ek_ra4m2, ek_ra4m3, voice_ra4e1

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-02-14 08:44:39 +01:00
The Nguyen
b513a8db34 dts: arm: renesas: add phys-clock for usbhs node
Add phys-clock to usbhs node in case internal phys-clock-src is used

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-02-14 08:44:39 +01:00
The Nguyen
164847f3a6 dts: arm: renesas: add UDC support for USBFS module
Add device node of usbfs on Renesas RA SoC

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-02-14 08:44:39 +01:00
The Nguyen
227f2c4fb4 drivers: udc: add UDC support for USBFS on Renesas RA family
First commit to add support for USBFS module on Renesas RA
- Remove renesas,ra-usb binding
- Add 2 new binding for Renesas RA USBFS and USBHS
- Remove unused interrupts of USBHS

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-02-14 08:44:39 +01:00
The Nguyen
0fc95b8927 dts: arm: renesas: add uclk clock node for ra2a1
Add missing clock node of uclk on Renesas RA2A1 SoC

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-02-14 08:44:39 +01:00
The Nguyen
4b4f8999d1 manifest: update rev of hal_renesas to support USBFS module
Update revision of hal_renesas module to add support of UDC on
Renesas RA USBFS module

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-02-14 08:44:39 +01:00
Xinyu Hong
b1fe93e047 drivers: wifi: nxp: Fix wrong current PHY TX rate
For embedded supplicant case, fix current PHY TX rate is 0
always after STAUT connects to Ex-AP

Signed-off-by: Xinyu Hong <xinyu.hong@nxp.com>
2025-02-14 06:57:17 +01:00
Lucien Zhao
ef348187ae soc: nxp: imxrt: imxrt118x: change trdc permission getting strategy
When TRDC permission fails to be obtained, it does not recycle to
access ELE core to prevent blocking problems. The current practice
only generates a log warning alarm.

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2025-02-14 06:56:55 +01:00
Andrew Featherstone
06be6ebf3a drivers: gpio_rpi_pico: Add gpio_get_config API
Implement the `gpio_get_config`

N.b. adding this API results in a new test failure in
`test_gpio_config_trigger`. This suggests that there is some kind of
dependency between this and the now-enabled `pin_get_config` test cases.
Note that this adds a read-only API, it is unlikely to be the cause of
the failure.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2025-02-14 03:19:59 +01:00
Andrew Featherstone
c1b69710a1 drivers: gpio_rpi_pico: Add gpio_port_get_direction API
THe driver didn't implement this API, so add it.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2025-02-14 03:19:59 +01:00
Andrew Featherstone
91c4c4363e drivers: gpio_rpi_pico: Add gpio_get_pending_int API
Implement `gpio_get_pending_int`.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2025-02-14 03:19:59 +01:00
Andrew Featherstone
608e6a30b1 drivers: gpio_rpi_pico: Disable inputs when not in use
Reorder gpio_rpi_configure to disable input buffers when not in use.
gpio_rpi_get_config can then determine whether a pin is configured as an
input without requiring additional state variables, as well as reducing
input leakage current.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2025-02-14 03:19:59 +01:00
Andrew Featherstone
27c41b42c1 drivers: gpio_rpi_pico: Support GPIO_DISCONNECTED flag
Out of reset the pads are input enabled, output disabled. Disconnect the
pad's input and output buffers, as well as any pullups. This can reduce
input leakage current.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2025-02-14 03:19:59 +01:00
Pierrick Curt
104fa969c6 samples: sensor: accel_trig: add sample tap detection feature.
Add the tap detection trigger to the existing example.
For this example it uses lis2dw12 accelerometer to detect a double
tap. This feature can be enabled with CONFIG_SAMPLE_TAP_DETECTION option.

Signed-off-by: Pierrick Curt <pierrickcurt@gmail.com>
2025-02-14 03:15:54 +01:00
Utsav Munendra
66c43a8f77 tests: portability: cmsis: Add tests for CMSIS-RTOSv2 static cb
Every CMSIS-RTOSv2 now supports static allocation
control blocks. Add tests for this.

Signed-off-by: Utsav Munendra <utsavm@meta.com>
2025-02-14 03:13:35 +01:00
Utsav Munendra
137c7cb149 tests: portability: cmsis: Run clang-format on CMSIS-RTOSv2 tests
clang-format -i tests/subsys/portability/cmsis_rtos_v2/src/*.c

Signed-off-by: Utsav Munendra <utsavm@meta.com>
2025-02-14 03:13:35 +01:00
Utsav Munendra
10c6b34800 portability: cmsis: Support static CMSIS-RTOSv2 control blocks
Do not use memory slabs for the control blocks when
the application provides the memory for it. This
implements manual user-defined allocation memory
management support in CMSIS-RTOSv2 API.

Signed-off-by: Utsav Munendra <utsavm@meta.com>
2025-02-14 03:13:35 +01:00
Utsav Munendra
ed2e557d4c portability: cmsis: CMSIS-RTOSv2 thread port to track dynamic cb
No functionality change, in preparation for allowing
threads with user provided stack and control block.

Signed-off-by: Utsav Munendra <utsavm@meta.com>
2025-02-14 03:13:35 +01:00
Utsav Munendra
11eb0ce4db portability: cmsis: Rename cmsis wrapper types
Namespace this types with `cmsis_rtos` instead of `cv2`

Signed-off-by: Utsav Munendra <utsavm@meta.com>
2025-02-14 03:13:35 +01:00
Utsav Munendra
13ef44200e portability: cmsis: Move cmsis wrapper types to public header
This enables the cmsis wrapper types to be declared
statically and then passed along to CMSIS-RTOSv2 APIs,
enabling static allocation of RTOS control blocks
in the subsequent commits.

Signed-off-by: Utsav Munendra <utsavm@meta.com>
2025-02-14 03:13:35 +01:00
Utsav Munendra
6d490e9cf0 portability: cmsis: Run clang-format on CMSIS-RTOSv2
clang-format -i subsys/portability/cmsis_rtos_v2/*.h
clang-format -i subsys/portability/cmsis_rtos_v2/*.c

Signed-off-by: Utsav Munendra <utsavm@meta.com>
2025-02-14 03:13:35 +01:00
George Stefan
827a725f9f west.yml: update hal_nxp to support new features on MCXW71
- add MCXW71 NBU combo BLE LL and IEEE 802.15.4 PHY firmware blob
- fix elemu driver: undef BIT if already defined
- add mcux-secure-subsystem middleware
- add ieee_802.15.4 middleware

Signed-off-by: George Stefan <george.stefan@nxp.com>
2025-02-14 03:08:48 +01:00
Andrei Menzopol
b6e136f274 doc: frdm_mcxw71: update documentation
Update documentation for dynamic NBU.
Add openthread application building examples.

Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
2025-02-14 03:08:48 +01:00
Andrei Menzopol
17cc683c4e samples: echo_client echo_server: update tests
Group openthread tests under the same case and add frdm_mcxw71.

Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
2025-02-14 03:08:48 +01:00
Andrei Menzopol
e6be77bc1d samples: echo_client echo_server: add frdm_mcxw7 board overlays
Add frdm_mcxw7 board conf and overlay files for echo_client and
echo_server sample applications.

Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
2025-02-14 03:08:48 +01:00
Andrei Menzopol
50de97fedb soc: nxp: mcxw: update conditions to account for ieee driver
Add ram section for ieee driver.
Use config for ieee driver.

Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
2025-02-14 03:08:48 +01:00
Andrei Menzopol
e9cdc6e776 dts: nxp: add ieee and trng bindings and nodes
Add ieee802154 and trng bindings and nodes

Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
2025-02-14 03:08:48 +01:00
Andrei Menzopol
f7167ed606 drivers: ieee802154: add mcxw ieee802154 driver
Add mcxw ieee802154 driver
Fix compliance errors for added files.
Update function names to snake_case style.

Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
2025-02-14 03:08:48 +01:00
Andrei Menzopol
b897d2a1e3 drivers: entropy: add nxp ele trng
Add NXP ELE TRNG driver

Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
2025-02-14 03:08:48 +01:00
Benjamin Cabé
8d253b78a1 tests: show thread_metric Kconfig menu first
Put the thread_metric Kconfig menu first in the Kconfig "homepage", like
other samples and tests typically do as this makes it easier to quickly
get to the relevant options in menuconfig.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-02-14 03:04:35 +01:00
Shan Pen
6584862897 doc: fixes minor typo in ../sensor/triggers.rst
not sure "micro controller" is a typo.
Happy to update it if needed,
or feel free to close this. Thanks for your work!

Signed-off-by: Shan Pen <bricle031@gmail.com>
2025-02-14 03:04:11 +01:00
Marcin Lyda
f370d38363 drivers: rtc: Add Maxim DS1337 RTC driver
This PR adds support for Maxim Integrated
DS1337 RTC chip.

Supported functionalities:
* Alarm interrupt (both alarms trigger INTA pin)
* Time setting/reading
* Both alarms setting/reading
* SQW frequency configuration

Tested on nRF52833-DK using rtc_api test set.

Signed-off-by: Marcin Lyda <elektromarcin@gmail.com>
2025-02-14 03:03:56 +01:00
Yangbo Lu
2d72d7df7b boards: nxp: mimxrt1180_evk: enable NETC PSI0 for M7
Enabled NETC PSI0 for M7 via common board dtsi.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-02-14 03:03:38 +01:00
Yangbo Lu
c348e03bb2 boards: nxp: mimxrt1180_evk: convert to use hyperram and flash for M7
Converted to use hyperram and flash for M7.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-02-14 03:03:38 +01:00