Commit graph

97305 commits

Author SHA1 Message Date
Krystian Dolatowski
317abcc589 sensor: fix fallthrough on sample_channel_get on AQI
fixed fallthrough on getting channel AQI value from ENS160

Signed-off-by: Krystian Dolatowski <kryqpl1@gmail.com>
2024-06-12 18:16:29 -04:00
Benjamin Cabé
c44b777221 drivers: display: make driver API structs const
Save precious RAM by making sure driver API structs are declared as
const

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-12 17:16:17 -05:00
Henrik Brix Andersen
6a29c79d4e drivers: usb: native posix: add option for enabling high speed support
Add Kconfig option for enabling high speed USB support for the native posix
USB controller driver.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-06-12 17:15:58 -05:00
Andries Kruithof
a435dd3ee0 Bluetooth: Audio: CAP broadcast reception start bugfix
When validating the parameters for broadcast reception start some
return statements were missing, they have been added, as well as
proper initialisation of a variable

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-06-12 18:15:38 -04:00
Torsten Rasmussen
0d51cb08c4 cmake: remove dead 'soc_legacy' folder handling
During HWMv2 migration, non-ported SoCs were placed in a 'soc_legacy'
folder and sourced from there instead of 'soc' folder.

Remove the no-longer needed soc_legacy folder.

CMake oot SoCs in old hardware model are sourced from
'<soc-root>/soc/<arch>/<soc-path>' which has always been the case, also
before HWMv2.

Remove the 'osource "soc/soc_legacy/...' generation in Kconfig, because
the source is relative to Zephyr base.
All SoCs in Zephyr repository has been ported to the new hardware model
and therefore there is no need for this line.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-06-12 17:15:28 -05:00
Luis Ubieda
ae833cd04f MAINTAINERS: Add ubieda to RTIO
Add self as a RTIO collaborator.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-06-12 18:15:12 -04:00
Emil Gydesen
4c31e4b337 Bluetooth: BAP: Fix missing len increment when merging non-LC3 data
If we are merging subgroup and BIS codec configuration data
for a codec other than LC3, then we just append them, but
did not properly update the length.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-12 17:15:00 -05:00
Rubin Gerritsen
2712b32941 Bluetooth: Document that bt_disable() doesn't touch callbacks
A naive implementation would look like

```c
void bt_init()
{
  bt_le_conn_cb_register();
  bt_enable();
}
```

When the app later adds the possibility to enable and disable
Bluetooth, it may happen that the application developer calls
`bt_init()` instead of `bt_enable()`. This results in invalid
behavior. This kind of bug is currently a bit harder to debug
as the callback register APIs do not reject registering a
callback twice.

Improving the API documentation is the first step towards making
this a bit more user friendly.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-12 17:13:13 -05:00
Jaroslaw Stelter
6070e693ab intel_adsp: Fix data cache flush before D3
Fix sys_cache_data_flush_range() calls during D3 entrance.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-12 17:12:41 -05:00
Anas Nashif
a1ee7f9d41 intel_adsp: kconfig: remove duplicate line
duplicate line in kconfig.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-12 17:12:41 -05:00
Anas Nashif
db6bbb90ee intel_adsp: ace30: use correct toolchain
xcc-clang is deprecated, use xt-clang.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-12 17:12:41 -05:00
Fin Maaß
bed5d8f6f8 riscv: linker: try to use name of register
get the address of a memory mapped
jedec,spi-nor flash by name and as a fallback
use the second register.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-06-12 17:12:23 -05:00
Fin Maaß
77bdc31bc9 tests: devicetree: add tests for DT_REG_HAS_NAME
Add tests for
DT_REG_HAS_NAME,
DT_REG_ADDR_BY_NAME_OR,
DT_REG_SIZE_BY_NAME_OR,
DT_INST_REG_HAS_NAME,
DT_INST_REG_SIZE_BY_NAME_OR and
DT_INST_REG_ADDR_BY_NAME_OR.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-06-12 17:12:23 -05:00
Fin Maaß
fb8b30d8d0 dts: devicetree.h: add DT_REG_HAS_NAME
Add DT_REG_HAS_NAME,
DT_REG_ADDR_BY_NAME_OR,
DT_REG_SIZE_BY_NAME_OR,
DT_INST_REG_HAS_NAME,
DT_INST_REG_SIZE_BY_NAME_OR and
DT_INST_REG_ADDR_BY_NAME_OR.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-06-12 17:12:23 -05:00
Adrien MARTIN
88760196c6 dt-bindings: pinctrl: pinctrl_gecko: fix misleading GECKO_FUN_MSK mask val
In the 32-bit bitfield pinctrl, the bits from b31 to b24 are representing
the PIN function. The correct mask value then must be 0xFFu.

Signed-off-by: Adrien MARTIN <adrienmar@kickmaker.net>
2024-06-12 17:11:26 -05:00
Jérémy LOCHE - MAKEEN Energy
2e9c30aed3 sample: openamp_rsc_table: enable colibri_imx7d
Enable openamp sample for Toradex Colibri IMX7D.
Tested with LTS BSP 6.6.0 on kernel 6.1.83.

Signed-off-by: Jérémy LOCHE - MAKEEN Energy <jlh@makeenenergy.com>
2024-06-12 17:11:04 -05:00
Jérémy LOCHE - MAKEEN Energy
75d65821ce arch: arm: add rom_start_relocation prompts
Add a prompt to ROMSTART_RELOCATION_ROM configs to allow
projects config file selection.
This simplifies the usage in samples/app for board porting.

Signed-off-by: Jérémy LOCHE - MAKEEN Energy <jlh@makeenenergy.com>
2024-06-12 17:11:04 -05:00
Jérémy LOCHE - MAKEEN Energy
3e3fc86bad nxp: imx7d: add .ressource_table definitions
Add RPMSG/OpenAMP ressource table definition for the
IMX7d SOC.

Signed-off-by: Jérémy LOCHE - MAKEEN Energy <jlh@makeenenergy.com>
2024-06-12 17:11:04 -05:00
Dong Wang
521a5ca958 soc: intel_ish: Make ISH support APIC timer with TSC time source.
This commit enables ISH boards to use APIC timer with TSC time source as
their system timer by replacing CONFIG_HPET with CONFIG_APIC_TIMER_TSC.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2024-06-12 17:10:25 -05:00
Tim Lovett
216a1d95ed boards: seeed: Add xiao_rp2040 board
Adds xiao_rp2040 board built off rpi_pico
Currently only uf2 flash supported

Signed-off-by: Tim Lovett <timo614@gmail.com>
2024-06-12 17:10:04 -05:00
Hou Zhiqiang
fd584b4727 snippets: add ram-console snippet support
The ram-console snippet disabled UART console and enabled the
RAM console with the option link the RAM console buffer to a
dedicate section in a new added memory-region.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-06-12 17:09:24 -05:00
Hou Zhiqiang
1cd37f21f3 drivers: ram_console: add option to link console buffer to given section
Currently, the ram_console buffer is defined as a global var, its
address is determined during the building and may be changed when
code update. This is not a problem if the ram_console is just used
in debug purpose.

While in the heterogeneous SoCs, there can be multiple MPU Cores
and several MCU cores, it can run multiple OS/bare-metal instances
on these cores, but the UART ports may be not enough, so the
ram_console can be leveraged. To make it easy to use, it's better
make the console buffer fixed and predefined.

This patch adds a option to link the console buffer to a given
section, through the "zephyr,memory-region" device tree node, then
the address can be known from the device tree node and easy to
check from other cores running Linux/U-Boot.

To use this option, the chosen property 'zephyr,ram-console' must
be added, the following is a example:

	chosen {
		zephyr,ram-console = &ram_console;
	};

	ram_console: memory@93d00000 {
		compatible = "zephyr,memory-region";
		reg = <0x93d00000 DT_SIZE_K(4)>;
		zephyr,memory-region = "RAM_CONSOLE";
	};

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-06-12 17:09:24 -05:00
Hou Zhiqiang
209568eabe driver: ram_console: leave one byte from the defined buffer size
Leave one byte from the CONFIG_RAM_CONSOLE_BUFFER_SIZE to ensure
the NULL-termination.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-06-12 17:09:24 -05:00
Hou Zhiqiang
c1765ff690 soc: imx9: a55: create region and section from the zephyr,memory-region
It has been added in the arm64 common linker script, so also update
the one of mimx9 SoCs.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-06-12 17:09:24 -05:00
Hou Zhiqiang
abf90d4ad7 arm64: linker: create region and section from zephyr,memory-region
In arm64 linker script, create a memory region and section for each
device tree node with compatible string "zephyr,memory-region".

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-06-12 17:09:24 -05:00
Emil Gydesen
be307f8ad9 Bluetooth: Audio: Change lang to 3-byte value from uint32_t
The 3-byte value suits the assigned number much better,
and also allows for less memory copies when getting and
setting the values.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-12 12:54:16 -04:00
Emil Gydesen
f08bc644a1 Bluetooth: Audio: Rename stream_lang to lang
Remove the "stream" part of the value and functions to
better fit with the name in the assigned numbers document.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-12 12:54:16 -04:00
Nikolay Agishev
57af793bb4 ARC: nSIM: Add RMX100 platform
This PR adds support for new Synopsys nSIM RMX100 platform.
New platform based on RISC-V ISA instead of classic ARC.

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2024-06-12 12:54:03 -04:00
Nikolay Agishev
ea7a876cff ARC: nSIM: Make reorganization of board and SoC structure
Change source tree organization for Synopsys nSIM platform.
Classical ARC architectures arc_v2 arc_v3 moved to arc_classic
SoC and boards family.
nSIM SoCs were separated regarding series: EM, HS, SEM, VPX2.
This PR sould be seeing as the preparation for
addition new nSIM platform based on the RISC-V architecture.

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2024-06-12 12:54:03 -04:00
Francois Ramu
b04cd038ca samples: drivers: spi_flash includes the dma for stm32 xspi node
The stm32 xspi node is another possible multi-spi for connecting
with gpDMA channels for Rx and Tx, same request.
Channels 4 and 5 are preferred for AHB periph to/from ext. Mem.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-12 12:53:41 -04:00
Francois Ramu
ac48369731 drivers: flash: stm32 xspi driver with DMA support
Add the commands to read and write to/from the xSPI with gpDMA
On the stm32h5 device, the one request for xspi instance

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-12 12:53:41 -04:00
Francois Ramu
be55b2c263 drivers: flash: stm32 xspi flash driver with clock domain
Configure the xspi clocks domain by the clock domain
as defined by the DTS
Up to 3 possible clock confg : xspix, xspi_ker, xspi_mgr

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-12 12:53:41 -04:00
Javad Rahimipetroudi
1662c0ac8f boards: arm: stm32wb5mm_dk: update test runner yaml file
this patch adds support for vl53l0x and ism330dhcx
sensors in test runner yaml file

Signed-off-by: Javad Rahimipetroudi <javad.rahimipetroudi@mind.be>
2024-06-12 18:53:05 +02:00
Javad Rahimipetroudi
bfdd05161a docs: stm32wb5mm_dk: update supported features table
Update the supported features for stm32wbmm_dk and
add support for I2C bus.

Signed-off-by: Javad Rahimipetroudi <javad.rahimipetroudi@mind.be>
2024-06-12 18:53:05 +02:00
Javad Rahimipetroudi
2eb5513f3e board: arm: stm32wb5mm_dk: add ism330dhcx sensor
This patch add device tree node for ism330dhcx
3D accelerometer and 3D gyroscope sensor.

Signed-off-by: Javad Rahimipetroudi <javad.rahimipetroudi@mind.be>
2024-06-12 18:53:05 +02:00
Javad Rahimipetroudi
57509b8eb5 boards: arm: stm32wb5mm_dk:add support for vl53l0x
This patch add VL53L0CXV0DH node in the device tree
for STM32WB5MM_DK board.

Signed-off-by: Javad Rahimipetroudi <javad.rahimipetroudi@mind.be>
2024-06-12 18:53:05 +02:00
Chun-Chieh Li
55a988ef44 lib: smf: fix ctx->executing in smf_execute_all_entry_actions
Fix ctx->executing is not updated in smf_execute_all_entry_actions()

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-06-12 12:52:46 -04:00
Chun-Chieh Li
eae0900122 lib: smf: add NULL check in smf_execute_all_exit_actions
Like in smf_execute_all_entry_actions(), add NULL check
in smf_execute_all_exit_actions().

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-06-12 12:52:46 -04:00
Aksel Skauge Mellbye
09a6849a1b doc: boards: silabs: Document board naming scheme
Update Sphinx documentation to explain how Silicon Labs boards
are named in Zephyr, now that all boards are consistently
named.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-06-12 12:52:28 -04:00
Aksel Skauge Mellbye
45e49aaca2 boards: silabs: Consistently name starter kits
Rename all Silicon Labs starter kits to always use the official kit name
as board target name. Previous kit names used various naming schemes,
including putting part of the SoC name in the board name. With HWMv2,
SoC names (if needed) should go in the SoC board qualifier.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-06-12 12:52:28 -04:00
Aksel Skauge Mellbye
fee86aecaa boards: silabs: Consistently name radio boards
Rename all Silicon Labs radio boards to always use the official kit name of
the kit containing only the radio board as board target name. Disentangle
boards using Series 1 and Series 2 SoCs that have almost nothing in common
in terms of devicetree content, but still occupied the same directory.

As part of the initial HWMv2 port, all radio boards were merged into a
single target efr32_radio, using the SoC as a board qualifier to target
specific boards. This was unfortunate, as the SoC name is not sufficient
to identify a specific board -- the same SoC may be used on multiple
different boards. This commit reinstates every radio board as an individual
board target.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-06-12 12:52:28 -04:00
Aksel Skauge Mellbye
bc6c363bc9 boards: silabs: Consistently name dev kits
Rename all Silicon Labs dev kits to always use the official kit name
as board target name. Previous kit names used various naming schemes,
including putting part of the SoC name in the board name. With HWMv2,
SoC names (if needed) should go in the SoC board qualifier.

Use HWMv2 revisions for the two variants of SLTB010A.

Split the xG27 Dev Kit from the EFR32BG22 Thunderboard. This attempt
at deduplication is confusing due to the very different kit names
and use of different ICs (BG22 vs BG27), and was not continued with
the xG24 Dev Kit, meaning that it wasn't consistent.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-06-12 12:52:28 -04:00
Aksel Skauge Mellbye
7df94e4128 boards: silabs: Create subcategories for different board types
Introduce three subcategories for Silabs boards: dev_kits, radio_boards
and starter_kits. The dev_kits category contains small form-factor
standalone boards branded as "Dev Kit" or "Thunderboard". The
radio_boards category contains radio boards to be used with a wireless
mainboard, and the starter_kits category contains larger form-factor
standalone boards branded as "Starter Kit".

Structure the Sphinx documentation the same way as the directory tree.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-06-12 12:52:28 -04:00
Aksel Skauge Mellbye
d35eac2326 drivers: spi: gecko: Respect frequency configuration
This commit adds support for configuring SPI frequency per transaction.
The "clock-frequency" devicetree property is used as the default
frequency unless the peripheral being communicated with has a lower
"max-spi-frequency" (passed to the driver as spi_config::frequency).

An error is returned if the requested frequency is higher than the
hardware can support. This limit is half the peripheral clock (PCLK on
Series 2, HFPERCLK on Series 0/1) for SPI in controller mode.

Previously, the driver hard-coded 1 MHz operation. For backwards
compatibility, default to 1 MHz if the "clock-frequency" property is not
set in devicetree.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-06-12 18:52:17 +02:00
Aksel Skauge Mellbye
5513657e10 drivers: spi: gecko: Add support for devices with a single USART
This commit adds support for devices such as EFR32xG24 in the SPI
driver, as these devices only have a single USART peripheral.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-06-12 18:52:17 +02:00
Jonathan Rico
9b3f41de55 Bluetooth: host: don't pull data if no view bufs
View buffers are now also a limited resource. Acquire them before
attempting to pull data. `CONFIG_BT_CONN_FRAG_COUNT` should be tuned on
a per-application basis to avoid this.

A possible optimization, that was present before, is to not create a
frag when the original buffer fits the controller's HCI size.

I prefer deferring this optimization to a future patchset.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-06-12 18:51:34 +02:00
Jonathan Rico
5a7ef422bb Bluetooth: host: use __maybe_unused for convenience variables
In order to suppress compiler warnings w/o using void/ifdef.

Suggested in #72854

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-06-12 18:51:34 +02:00
Jonathan Rico
b6cdf10310 Bluetooth: L2CAP: remove seg_pool
We can get rid of the view pool for SDU segments :)
We have to make the code slightly more complex :'(

The basic idea is always giving the original SDU buffer to `conn.c` for it
to pull ACL fragments from.

In order to do this, we need to add the PDU headers just-in-time.
`bt_l2cap_send_pdu()` does not add them before putting the PDU on the queue
anymore. They are added by `l2cap_data_pull()` right before the data leaves
`l2cap.c` for `conn.c`.

We also have to inform `conn.c` "out of band" of the real L2CAP PDU size so
it doesn't fragment across segment boundaries. This oob is the new `length`
parameter to the `.pull()` method.

This is the added complexity mentioned above.

Since SDU segmentation concerns only LE-L2CAP, ISO and Classic L2CAP don't
need this extra logic.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-06-12 18:51:34 +02:00
Jonathan Rico
28be8909a6 Bluetooth: host: remove TX thread
We don't need the TX thread anymore.

Generalizing the pull-based architecture (ie. `tx_processor`) to HCI
commands makes it possible to run the whole TX path from the the system
workqueue, or any workqueue really.

There is an edge-case, where we call `bt_hci_cmd_send_sync()` from the
syswq, stalling the system. The proposed mitigation is to attempt to drain
the command queue from within `bt_hci_cmd_send_sync()`.

My spidey sense tingles however, and it would be better to just remove the
capability of calling this fn from the syswq. But doing this requires
refactoring a bunch of synchronous procedures in the stack (e.g. stack
init, connection establishment, address setting etc), dragging in more
work. I will do it, but in a later patch.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-06-12 18:51:34 +02:00
Jonathan Rico
48d1cffb4d Bluetooth: L2CAP: remove CONFIG_BT_L2CAP_RESCHED_MS
We don't need it thanks to the new TX architecture.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-06-12 18:51:34 +02:00