Commit Graph

89100 Commits

Author SHA1 Message Date
TOKITA Hiroshi 2c3943355d boards: arm: adafruit_kb2040: Added clock support in docs
Added clock in supported hardware features

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-12-20 11:14:24 +01:00
TOKITA Hiroshi cca5e3c0a4 boards: arm: rpi_pico: Added clock support in documentation
Added clock in supported hardware features

Signed-off-by: Andrei-Edward Popa <andrei.popa105@yahoo.com>
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-12-20 11:14:24 +01:00
TOKITA Hiroshi 00d1cecedd driver: spi: spi_rpi_pico_pio: Change to use clock controller
Since clock_control has been introduced, use it to obtain the frequency.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-12-20 11:14:24 +01:00
TOKITA Hiroshi a34210d669 drivers: counter: rpi_pico: Turn on clock and reset device on init
Turning on clock via clock controller and
resetting PIO device via reset controller on initializing.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-12-20 11:14:24 +01:00
TOKITA Hiroshi 8891f734ec drivers: usb: rpi_pico: Turn on clock on initializing
Turning on clock via clock controller on initializing.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-12-20 11:14:24 +01:00
TOKITA Hiroshi 4e36854148 drivers: misc: pio_rpi_pico: Turn on clock and reset device on init
Turning on clock via clock controller and
resetting PIO device via reset controller on initializing.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-12-20 11:14:24 +01:00
TOKITA Hiroshi 90976db5a3 drivers: adc: rpi_pico: Turn on clock and reset device on init
Turning on clock via clock controller and
resetting ADC device via reset controller on initializing.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-12-20 11:14:24 +01:00
TOKITA Hiroshi 6ad894eb99 drivers: pwm: rpi_pico: Reset device on init
Resetting PWM device via reset controller on initializing.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-12-20 11:14:24 +01:00
TOKITA Hiroshi e905483bd0 driver: pwm: rpi_pico: Change to use clock controller
Since clock_control has been introduced, use it to obtain the frequency.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-12-20 11:14:24 +01:00
TOKITA Hiroshi 57641875c3 drivers: spi: pl022: Reset device on initializing
Reset the device on initializing via reset controller.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-12-20 11:14:24 +01:00
Andrei-Edward Popa c448866042 drivers: spi: Changed how to get clock frequency for PL022
Changed how to get clock frequency for PL022

Signed-off-by: Andrei-Edward Popa <andrei.popa105@yahoo.com>
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-12-20 11:14:24 +01:00
Andrei-Edward Popa 0f41a2da1c drivers: serial: Removed all function calls from Raspberry Pi Pico SDK
Removed all function calls from Raspberry Pi Pico SDK
Added functions for setting uart baudrate and format

Signed-off-by: Andrei-Edward Popa <andrei.popa105@yahoo.com>
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-12-20 11:14:24 +01:00
Andrei-Edward Popa 5f927cfc3b drivers: watchdog: Changed how to get xtal frequency for Raspberry Pi Pico
Changed how to get xtal frequency for Raspberry Pi Pico

Signed-off-by: Andrei-Edward Popa <andrei.popa105@yahoo.com>
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-12-20 11:14:24 +01:00
TOKITA Hiroshi 99a9b995d3 drivers: clock_control: rpi_pico: Configure GPOUT/GPIN pins
Configure GPOUT/GPIN pin for external clock in/out via GPIO.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-12-20 11:14:24 +01:00
Andrei-Edward Popa ea1cafbee7 drivers: clock_control: Added clock driver for Raspberry Pi Pico
Added clock driver for Raspberry Pi Pico platform

Signed-off-by: Andrei-Edward Popa <andrei.popa105@yahoo.com>
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-12-20 11:14:24 +01:00
Robert Lubos 0bc8de8444 tests: net: socket: tls: Disable vmu_rt1170 platform
Due to unresolved bug (see #61129 for details) building TLS tests fails
on vmu_rt1170 platform. Therefore disable this platform for this test
suite.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-12-20 11:10:57 +01:00
Robert Lubos a416553dba tests: net: socket: tls: Add more tests covering socket behaviors
A first batch of tests for TLS sockets, covering expected socket
behaviors:
  * Verify that blocking/non-blocking tx/rx work as expected
  * Verify that timeouts on tx/rx are calculated properly
  * Verify proper behaviors when interacting with a socket from
    different threads (close/shutodown/send).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-12-20 11:10:57 +01:00
Robert Lubos be4400e80d tests: net: socket: tls: Add helper for TLS connection establishment
Move the code responsible for TLS connection establishment to a helper
function, as it'll be needed as well in other test cases.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-12-20 11:10:57 +01:00
Robert Lubos 833d565c36 tests: net: socket: tls: Remove unnecessary delay from test cases
SO_TYPE and SO_PROTOCOL test cases does not really establish connection,
so teardown delay at the end is not needed.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-12-20 11:10:57 +01:00
Robert Lubos 9aba4e8f3d net: sockets: tls: Read the actual error on interrupted wait
In case a waiting TLS socket reports an error in the underlying poll
call, try to read the actual error from the socket, instead of blindly
returning -EIO in all cases.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-12-20 11:10:57 +01:00
Johan Hedberg d8cc04f596 doc: migration-guide-3.6: Add a note about system heap size changes
Add a note about the new K_MEM_POOL_HEAP_SIZE define and the mechanism
for specifying custom system heap size requirements.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-12-20 11:01:42 +01:00
Johan Hedberg 12b5adf3e8 manifest: Update libmetal revision to support system heap changes
This is needed so that module uses K_HEAP_MEM_POOL_SIZE for determining
the availablility of the k_malloc family of functions.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-12-20 11:01:42 +01:00
Johan Hedberg 3bd364d392 manifest: Update espressif revision to support system heap changes
This is needed so that module uses K_HEAP_MEM_POOL_SIZE for determining
the availablility of the k_malloc family of functions.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-12-20 11:01:42 +01:00
Johan Hedberg 7bb16c779b posix: mqueue: Remove custom default for HEAP_MEM_POOL_SIZE
Use the new HEAP_MEM_POOL_ADD_SIZE_ prefix to construct a minimum
requirement for posix message queue usage. This way we can remove the
"special case" default values from the HEAP_MEM_POOL_SIZE Kconfig
definition.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-12-20 11:01:42 +01:00
Johan Hedberg ec23622b07 soc: xtensa: Use HEAP_MEM_POOL_ADD_SIZE KConfig options
Kconfig options with a HEAP_MEM_POOL_ADD_SIZE_ prefix should be used to
set the minimum required system heap size. This helps prevent
applications from creating a non-working image by trying to set a too
small value.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-12-20 11:01:42 +01:00
Johan Hedberg 95b1d586b9 soc: arm: Use HEAP_MEM_POOL_ADD_SIZE KConfig options
Kconfig options with a HEAP_MEM_POOL_ADD_SIZE_ prefix should be used to
set the minimum required system heap size. This helps prevent
applications from creating a non-working image by trying to set a too
small value.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-12-20 11:01:42 +01:00
Johan Hedberg c6c1d462a0 boards: xtensa: Use HEAP_MEM_POOL_ADD_SIZE KConfig options
Kconfig options with a HEAP_MEM_POOL_ADD_SIZE_ prefix should be used to
set the minimum required system heap size. This helps prevent
applications from creating a non-working image by trying to set a too
small value.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-12-20 11:01:42 +01:00
Johan Hedberg 1afc0a16c5 boards: riscv: Use HEAP_MEM_POOL_ADD_SIZE KConfig options
Kconfig options with a HEAP_MEM_POOL_ADD_SIZE_ prefix should be used to
set the minimum required system heap size. This helps prevent
applications from creating a non-working image by trying to set a too
small value.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-12-20 11:01:42 +01:00
Johan Hedberg 1fb4cbbb48 boards: posix: Use HEAP_MEM_POOL_ADD_SIZE KConfig options
Kconfig options with a HEAP_MEM_POOL_ADD_SIZE_ prefix should be used to
set the minimum required system heap size. This helps prevent
applications from creating a non-working image by trying to set a too
small value.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-12-20 11:01:42 +01:00
Johan Hedberg 2b83dd72d8 boards: arm64: Use HEAP_MEM_POOL_ADD_SIZE KConfig options
Kconfig options with a HEAP_MEM_POOL_ADD_SIZE_ prefix should be used to
set the minimum required system heap size. This helps prevent
applications from creating a non-working image by trying to set a too
small value.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-12-20 11:01:42 +01:00
Johan Hedberg 9bc1a2fca2 boards: arm: Use HEAP_MEM_POOL_ADD_SIZE KConfig options
Kconfig options with a HEAP_MEM_POOL_ADD_SIZE_ prefix should be used to
set the minimum required system heap size. This helps prevent
applications from creating a non-working image by trying to set a too
small value.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-12-20 11:01:42 +01:00
Johan Hedberg 0594d29f4e lib: acpi: Introduce HEAP_MEM_POOL_ADD_SIZE_ACPI option
All x86 boards have so far set a custom heap memory pool size because of
their dependency on ACPI. It makes more sense to introduce a new
ACPI-specific option, utilizing the recently added
HEAP_MEM_POOL_ADD_SIZE_ Kconfig option prefix, and adjust the default
value as necessary for each board.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-12-20 11:01:42 +01:00
Johan Hedberg 35854391c8 scripts: compliance: Add HEAP_MEM_POOL_ADD_SIZE_ to undef whitelist
The HEAP_MEM_POOL_ADD_SIZE_ is used as a prefix for matching specific
Kconfig option names, i.e. it's not a real option in itself.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-12-20 11:01:42 +01:00
Johan Hedberg 3fbf12487c kernel: Introduce a way to specify minimum system heap size
There are several subsystems and boards which require a relatively large
system heap (used by k_malloc()) to function properly. This became even
more notable with the recent introduction of the ACPICA library, which
causes ACPI-using boards to require a system heap of up to several
megabytes in size.

Until now, subsystems and boards have tried to solve this by having
Kconfig overlays which modify the default value of HEAP_MEM_POOL_SIZE.
This works ok, except when applications start explicitly setting values
in their prj.conf files:

$ git grep CONFIG_HEAP_MEM_POOL_SIZE= tests samples|wc -l
     157

The vast majority of values set by current sample or test applications
is much too small for subsystems like ACPI, which results in the
application not being able to run on such boards.

To solve this situation, we introduce support for subsystems to specify
their own custom system heap size requirement. Subsystems do
this by defining Kconfig options with the prefix HEAP_MEM_POOL_ADD_SIZE_.
The final value of the system heap is the sum of the custom
minimum requirements, or the value existing HEAP_MEM_POOL_SIZE option,
whichever is greater.

We also introduce a new HEAP_MEM_POOL_IGNORE_MIN Kconfig option which
applications can use to force a lower value than what subsystems have
specficied, however this behavior is disabled by default.

Whenever the minimum is greater than the requested value a CMake warning
will be issued in the build output.

This patch ends up modifying several places outside of kernel code,
since the presence of the system heap is no longer detected using a
non-zero CONFIG_HEAP_MEM_POOL_SIZE value, rather it's now detected using
a new K_HEAP_MEM_POOL_SIZE value that's evaluated at build.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-12-20 11:01:42 +01:00
Francois Ramu 6e678e3bae drivers: usb stm32H5 and stm32U5 have an independent power supply
The stm32H5 mcu has an independent USB supply to be enabled
at init with LL_PWR_EnableVDDUSB function like the stm32U5 serie.
Both series have PWR_USBSCR_USB33SV bit in their USBSCR POWER reg.
and other series all have PWR_CR2_USV bit in their CR2 POWER reg.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-12-19 22:53:26 +00:00
Mario Paja 98336b2811 Revert "net: gptp: Fix announce message len"
This reverts commit 6b644dff67.

Reason: breaks Peer-to-Peer gPTP connection. A better solution should be
found to handle the optional TLV on the announce message (chapter 10.5.1
IEEE 802.1AS-2011)

Signed-off-by: Mario Paja <mario.paja@zal.aero>
2023-12-19 22:51:52 +00:00
Lucas Denefle a5e5c1d00a drivers: cellular: add ldenefle to copyright
Add Lucas Denefle to copyright of the cellular API.

Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
2023-12-19 22:51:17 +00:00
Jordan Yates 60a9f33f37 drivers: flash: spi_nor: boot into DPD
Boot into the deep power down state when `SPI_NOR_IDLE_IN_DPD` is not
enabled. DPD is the correct hardware state for the `SUSPENDED` software
state. Without this change, it takes a cycle of
`SUSPENDED->ACTIVE->SUSPENDED` to get to the low power state.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-12-19 16:53:27 +01:00
Jordan Yates f82c2f9b14 doc: _extensions: support `build-dir-fmt` option
Support `zephyr-app-commands` being provided with a `build-dir-fmt`,
option, which assumes that `west config build.dir-fmt` has been run
previously.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-12-19 16:53:12 +01:00
Aleksandr Khromykh ac4cfe9880 Bluetooth: Mesh: remove 20ms tx delay in adv bearer
The recommendation to have 20ms is fair for two
consecutive messages over a single bearer. When mesh
sends two messages it can be interpreted as two
bearers working in parallel. No need to keep
an artificial 20ms delay for that. Delay was
removed and all related bsim tests were fixed.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-12-19 16:20:36 +01:00
Aleksandr Khromykh 8d51a1dac5 tests: Bluetooth: Mesh: relax beacon test time conditions
Some beacon tests have strict time conditions and depend
on randomization interval that doesn't guarantee test pass.
This change fixes strict conditions.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-12-19 16:20:36 +01:00
Dmitrii Golovanov fbe95e4a73 tests: unit: Fix Power-of-Two test build issue
Fix linker error for the PoT test build with code coverage.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2023-12-19 10:03:47 -05:00
Nikolay Agishev 04601aedad ARCMWDT: Add headers for POSIX compatibility
Add ENODATA errno code, wich is not presented in ARCMWDT headers
Add PATH_MAX define

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2023-12-19 08:53:51 -06:00
Dmitrii Golovanov 947c9dc1b4 twister: coverage: Fix LCOV full path prefixes
In some cases genhtml incorrectly built reports from LCOV
coverage data using full path for some of the source files
and relative paths for other files.
This fix adds `--prefix` parameter to shorten paths explicitly
relative to the ZEPHYR_BASE directory.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2023-12-19 08:52:20 -06:00
Yong Cong Sin a1042c4079 tests: kernel: timer_behavior: exclude renode instead of boards
We just need to exclude renode simulation and not the physical
boards, let's do just that.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-12-19 07:33:39 -05:00
Yong Cong Sin 9d314ff86d twister: implement `simulation_exclude` filter
This gives us the flexibility to exclude certain platforms'
simulator that's known to fail from running in Twister, but
allows real hardware to be tested.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-12-19 07:33:39 -05:00
Yong Cong Sin 1b16d3d3ec twister: fix a minor typo
Should be 'related' instead of 'realted'.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-12-19 07:33:39 -05:00
Yong Cong Sin 2bd0c8c552 twister: change schema of `platform_type` to follow `type`
The `platform_type` was created to filter `type` so they
should have the same schema.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-12-19 07:33:39 -05:00
Piotr Kosycarz a3acc425a9 scripts: twister: coverage: deal with multiple function definitions
Keep definitions instead of abort report creation.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2023-12-19 07:17:01 -05:00
Manuel Aebischer 5b9a0e5456 drivers: usb_dc_rpi_pico: handling of data toggle after endpoint setup
The previous behaviour led to an issue where we already expected data1
on the first transfer instead of data0. The DesignWare USB DC actually
implements the same behaviour. Also, the next_pid flag has to be reset
on setting up the endpoint.
Fixes #66283.

Signed-off-by: Manuel Aebischer <manuel.aebischer@netmodule.com>
2023-12-19 12:45:52 +01:00