Commit graph

95280 commits

Author SHA1 Message Date
Pieter De Gendt
294939a31e cmake: Set C compile features early for modules
If modules require C compiler features, these need to be set before
calling add_subdirectory.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-05-13 14:23:20 +02:00
Noah Pendleton
265da0df86 buildsystem: Add an option to compress debug sections
Compressing debug sections can reduce the output
ELF file size substantially.

Signed-off-by: Noah Pendleton <noah.pendleton@gmail.com>
2024-05-13 14:23:12 +02:00
Arkadiusz Cholewinski
60aeb4e6bc CI: Fix coverage reporting
The fix applies to parse_testplan function.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
2024-05-13 14:23:00 +02:00
Marcin Niestroj
3111261940 drivers: nsos: fcntl: prefer Zephyr-specific macros over libc
Definitions of fcntl flags are different between native libc and Zephyr. In
order to correctly map those values to the host, include Zephyr's fcntl.h
header, instead of the one bundled with libc.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-05-13 14:22:46 +02:00
Jordan Yates
557418ace6 tests: flash_simulator: reboot: added
Add a test for the flash simulator preserving memory across a
`sys_reboot` through the use of memory regions.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-13 14:22:37 +02:00
Jordan Yates
4bdc61132c tests: flash_simulator: move to subfolder
Move the implementation test to a subfolder so an additional test can be
added.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-13 14:22:37 +02:00
Jordan Yates
2bb2dd6e82 tests: flash_simulator: fix devicetree indentation
Fix the mix of spaces and tabs in the `nucleo_f411re.overlay` file.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-13 14:22:37 +02:00
Jiafei Pan
153255f15b board: mimx93_evk_a55: disable gpio expander by default
This commit is to fix some GPIO test case build issue:
https://github.com/zephyrproject-rtos/zephyr/issues/72619

In fact, the issue is introduce by expander GPIO PR:
https://github.com/zephyrproject-rtos/zephyr/pull/69330
It is used to add GPIO expander support,  in this PR, dts node layout is:
lpi2c {
	MFD driver {
		gpio driver {
		}
	}
}
The initial idea is to disable all these node by default in order to keep
a minimal default image, but expander GPIO PR only disabled lpi2c and MFD
driver node, but enabled gpio driver node, so gpio driver will report
building error as it depends on expander and i2c which are disabled, so
this fix is to disable gpio node.  If we want to use expander gpio, we
need to enable i2c, expander and gpio nodes simultaneously.

Some GPIO test cases have been enabled on i.mx93 EVK board by enabling
onchip GPIO controller in the overlay, for example:
tests/drivers/gpio/gpio_basic_api/boards/imx93_evk_mimx9352_a55.overlay

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-05-13 14:22:30 +02:00
Jordan Yates
4c4f0bce58 manifest: update quicklogic HAL
Update quicklogic HAL to fix compilation errors when C++ support is
enabled.

Fixes #72604.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-13 14:22:21 +02:00
Johann Fischer
b501278237 drivers: udc_dwc2: handle interrupt IEPINT before the RXFLVL
During a control read transfer host is able to start status stage as
soon as it receives last data packet. The time between last data packet
and status stage can be approximately 1 us at High-Speed and 8 us at
Full-Speed (exact timing depends on host but it is mostly constrained by
bus turnaround time).

With sufficient interrupt latency it is therefore possible that both
IEPINT (raised at end of Data Stage) and RXFLVL (raised at Status Stage)
would be set when dwc2 interrupt handler reads GINTSTS register. When
device is operating at High-Speed, the latency introduced by UART logger
backend is enough to trigger this condition. If the RXFLVL is handled
before IEPINT the stack will trigger "Cannot determine the next stage"
error.

Handle IEPINT before RXFLVL to make the handler immune to increased
interrupt latencies.

Co-authored-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-13 11:46:39 +01:00
Piotr Dymacz
36d8583589 boards: st: nucleo_wba55cg: add 'zephyr,bt-c2h-uart'
Include 'zephyr,bt-c2h-uart' in 'chosen' node to make it possible to use
HCI raw mode over UART. This was tested on real board with 'hci_uart'
sample, with Linux machine as a host (kernel 6.8, BlueZ 5.75).

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2024-05-13 11:39:24 +02:00
Dmitrii Golovanov
4d85967e09 twister: Set default coverage platform only when needed
Set options.coverage_platform only when running coverage.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-05-13 11:39:16 +02:00
Tim Lin
d371a89c3f ITE: soc: Add the variant of it82002bw
Add the variant of it82002bw

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-05-13 11:39:10 +02:00
Tim Lin
682a4c936a ITE: soc: Add the variant of it81302dx
Add the variant of it81302dx

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-05-13 11:39:10 +02:00
Tim Lin
f89934451f ITE: soc: Add the variant of it81202dx
Add the variant of it81202dx

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-05-13 11:39:10 +02:00
Tim Lin
dc44966f02 ITE: soc: Kconfig: Cleanup it8xxx2 Kconfig
The ILM_MAX_SIZE of different chip variants can be declared in the
Kconfig of the respective variant.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-05-13 11:39:10 +02:00
Krzysztof Chruściński
e7235f80cc dts: bindings: serial: nrf-uart: current-speed shall be required
Adding required flag to the current-speed as without this driver
does not compile.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-05-13 11:39:03 +02:00
Pieter De Gendt
ff58bd0204 tests: misc: iterable_sections: Add CMake linker test case
Add a test with CONFIG_CMAKE_LINKER_GENERATOR enabled.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-05-13 10:41:47 +02:00
Jędrzej Ciupis
6b048fdf71 boards: nordic: nrf54h20dk: enable 802.15.4 IPC by default
Enable hardware necessary for 802.15.4 IPC on nRF54H20 DK by default.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2024-05-13 10:21:08 +02:00
Jędrzej Ciupis
ba1102c97d modules: hal_nordic: add missing glue for nRF54H20
Add missing #ifdef in nrfx_glue for nRF54H20.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2024-05-13 10:21:08 +02:00
Jędrzej Ciupis
b457645423 drivers: ieee802154: nrf5: fix default value for nRF54H20
The default value of IEEE802154_NRF5_DELAY_TRX_ACC Kconfig option is
based on a symbol that is undefined for nRF54H20. It evaluates as empty,
which leads to compilation errors with very cryptic logs.

This commit assures that a sane value for IEEE802154_NRF5_DELAY_TRX_ACC
is selected at all times, avoiding the compilation errors.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2024-05-13 10:21:08 +02:00
Jędrzej Ciupis
7a8c16c937 boards: nordic: nrf54h20pdk: add ieee802154 radio to chosen
This commit adds the ieee802154 node to chosen for nRF54H20 PDK and
enables it.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2024-05-13 10:21:08 +02:00
Jędrzej Ciupis
5df6f99c40 dts: common: nordic: add ieee802154 node to nrf54h20 cpuapp
This commit adds an ieee802154 node to the list of nRF54H20 application
core's peripherals. While it does not translate directly into a physical
RADIO peripheral, it represents the capability to use the ieee802154
radio indirectly through cpurad.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2024-05-13 10:21:08 +02:00
Pieter De Gendt
db1a4a61be samples: net: sockets: coap_server: Support CMAKE_LINKER_GENERATOR
Add support for the CMake linker generator.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-05-13 09:46:44 +02:00
Pieter De Gendt
7b6e9dc4b8 cmake: linker_script: Fix cmake linker for some networking
Iterable sections for CoAP services and network management events
were missing.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-05-13 09:46:44 +02:00
Pieter De Gendt
e791e7637f tests: kernel: device: Add CMAKE_LINKER_GENERATOR test case
Add a test case entry with CONFIG_CMAKE_LINKER_GENERATOR enabled.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-05-13 09:46:13 +02:00
Pieter De Gendt
509d8f8aae cmake: linker_script: Support deferred init with CMAKE_LINKER_GENERATOR
The section for deferred devices was missing when
CONFIG_CMAKE_LINKER_GENERATOR is enabled.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-05-13 09:46:13 +02:00
Helmut Lord
e59db1ab80 boards: RAK4631: enable DCDC
Enables the DCDC converters by default for the RAK4631

Signed-off-by: Helmut Lord <kellyhlord@gmail.com>
2024-05-13 09:45:58 +02:00
Wojciech Sipak
e4a6686691 boards: use unique names
The pretty names specified in the YAML files of each board are not unique.

Signed-off-by: Wojciech Sipak <wsipak@antmicro.com>
2024-05-13 09:45:41 +02:00
Abderrahmane Jarmouni
e92efc4a03 boards: st: nucleo_f103rb: fix doc
STM32 RTC driver does not support F1x series for now.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 09:45:17 +02:00
Abderrahmane Jarmouni
4682e10e2a drivers: rtc: stm32: subsecond not supported by F2x
subsecond counting is not supported by STM32F2x SoC series.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 09:45:17 +02:00
Abderrahmane Jarmouni
83b5d65d57 drivers: rtc: stm32: make it clean again
Make driver clean again.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 09:45:17 +02:00
Abderrahmane Jarmouni
30c471ca1d tests: drivers: rtc_api: test_alarm: add alarm id in logs
Add alarm ID in debug & error logs.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 09:45:17 +02:00
Abderrahmane Jarmouni
16ea3a4f79 tests: drivers: rtc: rtc_api: support STM32 boards
Add RTC config for a large selection of STM32 boards.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 09:45:17 +02:00
Abderrahmane Jarmouni
d4c0fda714 boards: st: configure STM32 RTC
Configure STM32 RTC for a large selction of boards.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 09:45:17 +02:00
Abderrahmane Jarmouni
b1f878f7a5 drivers: rtc: stm32: fix clk enable call
On STM32WBAX series, there is no bit in BCDR register to enable RTC.
Enabling RTC is done directly via the RCC APB register bit.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 09:45:17 +02:00
Abderrahmane Jarmouni
c085177af5 drivers: rtc_stm32: add support for alarms A & B
Add support for STM32 RTC Alarms A & B for all series except F1X.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 09:45:17 +02:00
Abderrahmane Jarmouni
ac00136dfd dts: arm: st: stm32-rtc: add alrm-exti-line property
Add alrm-exti-line to STM32 RTC node of concerned series.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 09:45:17 +02:00
Abderrahmane Jarmouni
e2bd33bf6c dts: bindings: rtc: stm32-rtc: add alrm-exti-line property
Gives number of the Extended Interrupts and Event Controller (EXTI)
interrupt line connected to the RTC Alarm event.
Used on all series, except WBAX & U5X, where RTC Alarm interrupt is
routed directly to Nested Vectored Interrupt Controller (NVIC) and to
Power Control (PWR) wake-up pins.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 09:45:17 +02:00
Abderrahmane Jarmouni
0c4548c13b dts: arm: st: stm32-rtc: add alarms-count property
Add alarms-count to STM32 RTC node of all series except F1X.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 09:45:17 +02:00
Abderrahmane Jarmouni
2da205527f dts: bindings: rtc: stm32-rtc: add alarms-count property
Add alarms-count property to STM32 RTC binding

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 09:45:17 +02:00
Robert Lubos
8d221a91d0 tests: net: ipv6: Fix RA test
Due to recent changes, as simple k_yield() is not enough on some
platforms (nRF platforms for example), as the entropy subsystem is now
used because of PE, which may block, causing context switch before
entire RA message is processed.

Fix this by adding small delay before checking if RA was processed
properly.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-13 09:37:32 +02:00
Grzegorz Swiderski
70edbd1cf5 soc: nordic: Add system for validating DT headers against MDK
Hardware-specific properties should stay in sync with the definitions
provided by MDK. Existing measures for this include:

  * The `validate_base_addresses.c` file included in every build;
  * The `nordic-nrf-ficr-nrf54h20.h` header generated from SVD.

If there's information that cannot be extracted from SVD, it may have to
be validated against C types. Add `validate_binding_headers.c` for this
purpose, which automagically includes all `dt-bindings` headers included
by DTS in a given build.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-05-13 10:36:37 +03:00
Grzegorz Swiderski
22fd74914a cmake: modules: dts: Expose DTS_INCLUDE_FILES
This was previously used as a variable internal to the module, but it
can be used in other places in the build system, which may want a list
of DT-specific includes. Therefore, document it as an output variable.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-05-13 10:36:37 +03:00
Grzegorz Swiderski
97a83ef8a7 dt-bindings: misc: Add nRF54H20 Domain IDs and Owner IDs
Move the Domain IDs from `nrf54h20.dtsi` into its own header file.
Additionally, include another header with Owner IDs.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-05-13 10:36:37 +03:00
Grzegorz Swiderski
beb4d5690a dt-bindings: adc: Fix BIT_MASK redefined warning
Include `dt-util.h` instead of providing a separate macro definition.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-05-13 10:36:37 +03:00
Jerzy Kasenberg
961959fc5f drivers: serial: Smartbond: add support DTR line wakeup
This change allows to use DTR line driven from external serial port
that when active (low) will prevent UART device from going to sleep.
It will also wake up platform when DTR line becomes active.

DTR line is often activated in serial port connected to host computer
when operating system opens serial device like COMx for Windows
or /dev/ttyACMx /dev/ttyUSBx for Linux based systems.

DTR line (specified in device tree) will be used by WAKEUP and PDC
controllers (via GPIO driver) to handle DTR line changes.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-05-12 17:03:17 -04:00
Jerzy Kasenberg
f10b77364a drivers: serial: Smartbond: add support RX line wakeup
This change allows to wake up UART from sleep mode when
low level on inactive UART is detected during platform sleep.

Timeout can be specified for each UART separately in device tree.
If one of the UARTs is selected as console sleep timeout is taken
from Kconfig same way other platform configure same functionality
using CONFIG_UART_CONSOLE_INPUT_EXPIRED_TIMEOUT

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-05-12 17:03:17 -04:00
Andrzej Kaczmarek
e24c6ce721 drivers: serial: smartbond: Add PM for UART
This is initial version that implements device power
management support when configured in Kconfig files.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2024-05-12 17:03:17 -04:00
Jerzy Kasenberg
095bfba1d7 drivers: serial: Smartbond: Flow control for uart2 and uart3
UART2 and UART3 (unlink UART) do support hardware flow control.
This simply add necessary flag that is already handled in the code.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-05-12 17:03:17 -04:00