Commit graph

80246 commits

Author SHA1 Message Date
Carlo Caione
6160383ec7 riscv: Rename RISCV_MTVEC_VECTORED_MODE to RISCV_VECTORED_MODE
Before adding support for the CLIC vectored mode, rename
CONFIG_RISCV_MTVEC_VECTORED_MODE to CONFIG_RISCV_VECTORED_MODE to be
more generic and eventually include also the CLIC vectored mode.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-06-17 07:48:52 -04:00
Eduardo Montoya
574a533cb6 net: openthread: allow to configure CSL debugging
Add new `IEEE802154_CSL_DEBUG` Kconfig option that, when enabled,
prevents the radio to sleep after a delayed reception is finished.

This allows to debug CSL timing issues due to accuracy drifts in
communications between receiver and transmitter.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2023-06-17 07:48:25 -04:00
Morten Priess
3cecb92e53 Bluetooth: controller: Fix CIS peripheral conditional offset_min
When config BT_CTLR_PERIPHERAL_ISO_EARLY_CIG_START is enabled, the
minimum accepted offset value in the CIS_REQ is the minimum defined by
the spec.
Add define CIS_MIN_OFFSET_MIN with value 500 us, as defined in the Core
spec. The previously used value of 400 us was incorrect.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2023-06-17 07:48:01 -04:00
Henrik Eriksen
070122f55b bluetooth: tester: Added support for testing Hearing Access Service (HAS).
- Initialisation of Hearing Access Service.
- Adding/removing presets.
- Changing preset properties.
- Changing preset name.

Signed-off-by: Henrik Eriksen <heri@demant.com>
2023-06-17 07:47:21 -04:00
Bjarki Arge Andreasen
22152915ab drivers/gsm_ppp: Update existing modules to use PPP L2
This commit replaces the workarounds spread around the
drivers and subsystems with the updated PPP L2
interface.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-06-17 07:46:21 -04:00
Bjarki Arge Andreasen
df88664864 subsys/net/ppp: Make NET L2 PPP use net_if properly
Currently, the L2 PPP subsystem is not using the network
interface subsystem appropriately. Here are the issues:

1. net_if_up hidden away internally in net L2 PPP
2. net_if_down not used at all...
3. net_if_carrier_on / off is not used, a workaround is
   used instead, which results in duplicated code
4. L2 PPP does not listen for network events, instead
   it needs the workaround callbacks from drivers.
5. The carrier_on workaround is delegated to a complex
   and broken sys work queue item.

This commit fixes all above issues. net_if_up/down and
net_if_carrier_on/off now work as expected. workaround
for carrier_on/off has been removed.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-06-17 07:46:21 -04:00
Aleksandr Khromykh
29895d8275 Bluetooth: Mesh: refactor mesh to use both tinycrypt and psa based crypto
A mesh key type has been added to be able to choose the different
key representation for different security libraries.
The type as well as some functionality related to Mesh key
management has been added as a public API.
If tynicrypt is chosen then keys have representation
as 16 bytes array. If mbedTLS with PSA is used then keys are
the PSA key id. Raw value is not kept within BLE Mesh stack
for mbedTLS. Keys are imported into the security library
and key ids are gotten back. This refactoring has been done
for the network(including all derivated keys), application,
device, and session keys.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-06-17 07:46:03 -04:00
Dino Li
252d68ff9f arch/riscv: add support for detecting null pointer exception using PMP
This change uses a PMP slot to implement null pointer detection.

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2023-06-17 07:45:30 -04:00
Evgeniy Paltsev
b64cfe9832 ARC: MWDT: rework GNU helper tools usage
As of today MWDT toolchain in case of Zephyr may use few
tools from GNU toolchain - GNU compiler for DTS preprocessing
and objcopy for section renaming.

Currently we were trying to find any GNU compiler & objcopy
which start to cause compatibility issues for new targets -
i.e. not every objcopy knows new ARC targets.

Let's use ARC GNU tools from Zephyr SDK as we still usually
require it when building with MWDT for other tools like DTC
(device tree compiler)

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2023-06-17 07:44:31 -04:00
Zhang Lixu
2378d45604 CODEOWNERS: Add code owners for Sensing Subsystem
Add lixuzha, ghu0510, qianruh for the Sensor Subsystem.

Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
2023-06-17 07:43:25 -04:00
Zhang Lixu
b2c7432042 MAINTAINERS: Add maintainer and collaborator for Sensing Subsystem
Add lixuzha, ghu0510, qianruh as maintainer and collaborators for
the Sensing Subsystem.

Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
2023-06-17 07:43:25 -04:00
Guangfu Hu
518cfe02a3 samples: sensing: add a simple sensing subsystem app
Add a simple sensing subsystem application.

Signed-off-by: Guangfu Hu <guangfu.hu@intel.com>
2023-06-17 07:43:25 -04:00
Guangfu Hu
335278d60a sensing: initial sensor list and enumerate each sensor
Implement sensing_init():
	1) create sensors from device tree
	2) sequence sensors following node dependency ordering rule generated by
	   Zephyr DTS
	3) initial each sensor, includes:
		a) creating sensor connection between reporter and client,
		b) calling sensor init callback,
		c) setting sensor state
Implement sensing_open_sensor():
	1) malloc connection from reporter to application
	2) bind connection
Implement sensing_close_sensr():
	1) unbind connection
	2) free connection from reporter to application
Implement sensing_set_config():
	1) call set_interval
	2) cann set_sensitivity
Implement sensing_get_config():
	1) call get_interval
	2) call get_sensitivity

Signed-off-by: Guangfu Hu <guangfu.hu@intel.com>
2023-06-17 07:43:25 -04:00
Zhang Lixu
25ca09ea01 sensing: phy_3d_sensor: add phy_3d_sensor skeleton
Add the sensor phy_3d_sensor skeleton in Sensing Subsystem.

Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
2023-06-17 07:43:25 -04:00
Zhang Lixu
685160b4bf sensing: add Sensing Subsystem skeleton
Add Sensing Subsystem skeleton.

Signed-off-by: Guangfu Hu <guangfu.hu@intel.com>
Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
2023-06-17 07:43:25 -04:00
Hebo Hu
703ad12188 doc: Add documents for Sensing Subsystem
Add documents for sensing subsystem.

Signed-off-by: Hebo Hu <hebo.hu@intel.com>
2023-06-17 07:43:25 -04:00
Hebo Hu
96e49ed9e7 sensing: Adding Sensing Subsystem API
This API introduced a new sensing subsystem, which is a high level
sensor framework inside the OS user space service layer.
It's a framework focus on sensor fusion, clients arbitration, sampling,
timing, scheduling and sensor based power management.

It's key concepts including physical sensor and virtual sensor objects,
and a scheduling framework reflects sensor objects' reporting relationship.
Physical sensors not depends on any other sensor objects for input, and
will directly interact with existing zephyr sensor device drivers.
Virtual sensors rely on other sensor objects (physical or virtual) as
report inputs.

The sensing subsystem relies on existing zephyr sensor device APIs or V2
zephyr sensor device APIs (#44098).

So it can leverage current existing zephyr sensor device drivers (100+).
And it's configurable, so, for some low cost IoT devices, may not need an
advanced sensor framework, but just need access some simple sensor
devices,can not configure and build this sensor subsystem, but just use
the exiting zephyr sensor device APIs to save memory resources.

Since the sensing subsystem is separated from device driver layer or
kernel space and could support various customizations and sensor
algorithms in user space with virtual sensor concepts. The existing
sensor device driver can focus on low layer device side works, can keep
simple as much as possible, just provide device HW abstraction and
operations etc. This is very good for system stability.

The sensing subsystem is decoupled with any sensor expose/transfer
protocols, the target is to support various up-layer frameworks and
Applications with different sensor expose/transfer protocols,
such as CHRE, HID sensors Applications, MQTT sensor Applications
according different products requirements. Or even support multiple
Applications with different up-layer sensor protocols at the same time
with it's multiple clients support design. For example can support CHRE
and other normal zephyr sensor application (can use HID etc) at
the same time.

Signed-off-by: Hebo Hu <hebo.hu@intel.com>
Signed-off-by: Guangfu Hu <guangfu.hu@intel.com>
2023-06-17 07:43:25 -04:00
Emil Gydesen
118a68518a Bluetooth: Shell: bt connect-name should only attempt connectable
The auto-connect by name did not verify that the found device
was connectable before attempting to connect.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-06-17 07:38:40 -04:00
Jordan Yates
607efa8edd Bluetooth: hci: spi: don't block on IRQ line
Don't wait for the IRQ line to be de-asserted in `bt_spi_send`. As this
function can be called by the RX processing thread, the previous
behaviour could cause deadlocks under heavy load:
 * SPI RX thread starts blocking on `bt_buf_get_evt` due to load
 * BT controller generates another event, asserting the IRQ line
 * RX processing thread calls `bt_spi_send` in reponse to event
 * RX processing thread blocks forever on the removed condition

There is no need to attempt to rate-limit how often `bt_spi_send` is
called to allow the RX thread to run. If the bus is so congested that
there is no remaining capacity, prioritising RX over TX is not going to
improve the situation.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-06-17 07:37:59 -04:00
Pavel Vasilyev
c301ed07ca Bluetooth: Mesh: Regenerate private beacon even when disabled
Even if PRB state is disabled, PRB can still be sent over GATT if Proxy
Privacy parameter is enabled. In such case PRB won't be regenerated.
To keep the privacy of the network, PRB should be regenerated when sent
over GATT regardless of PRB state.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-06-17 07:37:20 -04:00
Pavel Vasilyev
dfb8bcaf38 Bluetooth: Mesh: Fix Proxy Privacy parameter support
According to section 6.7, upon connection Proxy Server shall determine
value of Proxy Privacy parameter (sections 6.5 and 7.2.2.2.6). Depending
on that, it will either send Secure Network Beacon or Private Beacon to
Proxy Client, but never both.

Proxy Privacy parameter is determined by GATT Proxy, Node Identity
states and their private counterparts (section 7.2.2.2.6). Since
non-private and private states are mutually exclusive, it is enough to
only check either Private GATT Proxy state or Private Node Identity
state of any known subnet for which the state is currenty enabled.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-06-17 07:37:20 -04:00
Pavel Vasilyev
c952cf4818 Bluetooth: Mesh: Fix binding between proxy related states
Fix binding between GATT Proxy, Node Identity and their private
counterpart states according to sections 4.2.45.1 and 4.2.46.1
accordingly. When non-private state is enabled, the private counterpart
is disabled. The reverse binding prohibits change of non-private state.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-06-17 07:37:20 -04:00
Pavel Vasilyev
2d13329eca Bluetooth: Mesh: Store Private GATT Proxy state persistently
State should be stored persistently.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-06-17 07:37:20 -04:00
Jonathan Rico
931a089e2c Bluetooth: host: invalidate the RPA when starting legacy adv
This fixes the failure to use a resolvable private address in this
scenario.

1. call `bt_le_oob_get_local`, will generate and mark RPA as valid
2. start connectable adv w/ IDENTITY bit
3. start connectable adv w/o IDENTITY
4. RPA is not set (in `bt_id_set_private_addr`) because RPA
   is still marked as valid

When EXT_ADV is enabled and the controller supports it, a different code
path is taken that doesn't have this issue.

Unconditionally invalidating the RPA when starting advertising works around
this issue.

Fixes #56326

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-06-17 07:36:58 -04:00
Alberto Escolar Piedras
8444343511 usb: device: class: rndis: Fix for 64bit platforms
Instead of assuming pointers are 32bits wide,
cast them to the appropriate pointer arithmetic type.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-06-17 07:36:36 -04:00
Marc Desvaux
d5123bfe21 tests: drivers: i2c: i2c_target_api add nucleo_f207zg
Adds necessary overlay nucleo_f207zg in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-06-17 07:35:43 -04:00
Marc Desvaux
7d4a928e5b boards: arm: nucleo_f207zg: add i2c2
Adds i2c2 on nucleo_f207zg to use the i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-06-17 07:35:43 -04:00
Marc Desvaux
c3690a7d62 tests: drivers: i2c: i2c_target_api add nucleo_f207zg
Adds nucleo_f207zg in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-06-17 07:35:43 -04:00
Alberto Escolar Piedras
7bad2b3ad1 manifest: Update nRF HW models to latest
The nRF HW models have been updated to include the following
fixes and improvements.

* PPI: add support for nrf_ppi_group_enable
* BLECrypt: Widen search for crypto library
* Makefile: Switch to gnu11 from c11 due to HAL
* NVMC: Minor fixes in command line options descriptions

Which enable more 15.4 functionality with the nrf driver

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-06-17 07:34:43 -04:00
Khor Swee Aun
d7141c96f4 codeowners: Add code owner for INTEL FPGA Nios V/g
Add code owner for INTEL FPGA Nios V/g dts, SoC and board.

Signed-off-by: Khor Swee Aun <swee.aun.khor@intel.com>
2023-06-17 07:34:05 -04:00
Khor Swee Aun
d4df89ab8f boards: riscv: Add INTEL Nios V/g General Processor board
Add board support for INTEL Nios V/g General Processor.

Signed-off-by: Khor Swee Aun <swee.aun.khor@intel.com>
2023-06-17 07:34:05 -04:00
Khor Swee Aun
ad6bf7f456 dts: riscv: Add dts support for INTEL Nios V/g
Add basic dts support for INTEL Nios V/g General Purpose Processor.

Signed-off-by: Khor Swee Aun <swee.aun.khor@intel.com>
2023-06-17 07:34:05 -04:00
Khor Swee Aun
5bf2260e90 soc: riscv: riscv-privileged: INTEL Nios V/g support
Add support for INTEL FPGA Nios V/g RISC-V based Processors.
Also amended SOC_NIOSV_M to use ATOMIC_OPERATIONS_BUILTIN.

Signed-off-by: Khor Swee Aun <swee.aun.khor@intel.com>
2023-06-17 07:34:05 -04:00
Donatien Garnier
cf0350e021 Bluetooth: Host: Re-order LE L2CAP connection accept procedure
Currently, when an incoming dynamic LE L2CAP connection is requested by
a peer, the connected() callback provided by the user is raised
*before* a L2CAP_LE_CREDIT_BASED_CONNECTION_RSP is sent back to the
peer.
In some cases the user will start sending data in the connected()
callback which would be received too early by the peer.
This commit fixes this behavior by making sure the connected() callback
is raised only after the connection response has been sent to the peer.

Signed-off-by: Donatien Garnier <donatien.garnier@blecon.net>
2023-06-17 07:33:11 -04:00
Donatien Garnier
477dd86b78 Bluetooth: Host: Add sending L2CAP data from connection callback test
Add BabbleSim test to make sure data can be sent immediately upon
connection from the L2CAP channel connection callback

Signed-off-by: Donatien Garnier <donatien.garnier@blecon.net>
2023-06-17 07:33:11 -04:00
Daniel Leung
2ba7855ddf modules: mipi-syst: support minimal C library
This allows the MIPI Sys-T library to be built with minimal C
library. This is due to lack of support for wchar in our
minimal C library. This simply tells the library to skip any
wchar support.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-06-17 07:31:26 -04:00
Jaska Uimonen
339b00de11 soc: xtensa: intel_adsp: fix memory bank shutdown
Amount of memory banks should vary depending on platform, otherwise
power down sequence might result in ipc timeout as the memory used by
the ipc itself is shutdown.

Lift the needed defines from sram.c to adsp_memory.h and shorten the
names to avoid collision with sof code. No functional change to sram.c.

Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
2023-06-17 07:31:11 -04:00
Flavio Ceolin
5dfaf23f47 xtensa: intel_adsp: lnl: Fix dspcs struct
This is struct is used to access to contiguous registers for each core
and lnl has 5.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-06-17 07:30:21 -04:00
Keith Packard
a476e87073 samples/cmsis_rtos_v2/timer_synchronization: Set malloc arena size to zero
This test fails when using picolibc with the default malloc arena
value. Fix this by explicitly setting the malloc arena size to zero, as
when using the minimal C library.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-06-17 07:28:42 -04:00
Keith Packard
5dd87e7db3 samples/userspace: Set common malloc arena size to zero for syscall_perf
The default malloc arena when using picolibc is too large for the
hifive1_revb target.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-06-17 07:28:42 -04:00
Keith Packard
2a30acc823 samples/tfm_integration: Remove 'noreturn' attribute from main
This conflicts with what the compiler expects for the definition of 'main'
when -ffreestanding is not used.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-06-17 07:28:42 -04:00
Daniel Leung
ad826f3d69 x86: x86_64 can only support max 4 CPUs
With all the stacks and TSS (etc), the x86_64 arch code can only
support maximum of 4 CPUs at the moment. So add a build assert
if more CPUs are specified via CONFIG_MP_MAX_NUM_CPUS, also
overwrite the range value for CONFIG_MP_MAX_NUM_CPUS.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-06-17 07:28:10 -04:00
Florian Grandel
5bd42b9b2c MAINTAINERS: add IEEE 802.15.4 driver collaborators
Added cfriedt and fgrandel as collaborators for IEEE 802.15.4 driver
maintenance as suggested by cfried in
https://github.com/zephyrproject-rtos/zephyr/pull/59133#pullrequestreview-1473704118

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-06-17 07:16:32 -04:00
Florian Grandel
b224a099fd net: l2: ieee802154: standardize RSSI value
The RSSI value in net_pkt (net_pkt_cb_ieee802154.rssi) was used
inconsistently across drivers. Some drivers did cast a signed dBm value
directly to net_pkt's unsigned byte value. Others were assigning the
negative value of the signed dBm value and again others were offsetting
and stretching the signed dBm value linearly onto the full unsigned byte
range.

This change standardizes net_pkt's rssi attribute to represent RSSI on
the RX path as an unsigned integer ranging from 0 (–174 dBm) to 254 (80
dBm) and lets 255 represent an "unknown RSSI" (IEEE 802.15.4-2020,
section 6.16.2.8). On the TX path the rssi attribute will always be
zero. Out-of-range values will be truncated to max/min values.

The change also introduces conversion functions to and from signed dBm
values and introduces these consistently to all existing call sites. The
"unknown RSSI" value is represented as INT16_MIN in this case.

In some cases drivers had to be changed to calculate dBm values from
internal hardware specific representations.

The conversion functions are fully covered by unit tests.

Fixes: #58494

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-06-17 07:16:32 -04:00
Anas Nashif
79d610a893 doc: release: remove old version from index
Remove old releases from documentation index.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-16 13:29:34 -04:00
Anas Nashif
e1b69a5487 release: bump main to v3.4.99
Update main development branch to version v3.4.99.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-16 13:29:34 -04:00
Anas Nashif
356c8cbe63 release: Zephyr 3.4.0 release
Make this the final release.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-16 12:12:40 -04:00
Anas Nashif
7ce8b5598c doc: update LTS2 version in docs
LTS is now 2.7.5.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-16 12:12:40 -04:00
Anas Nashif
aa8c6aa067 doc: remove releases before 2.7 from index
Remove all old releases from the index.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-16 12:12:40 -04:00
Anas Nashif
ee72dfa5e2 doc: add 3.4.0 to the index of releases
Add the new release to the doc index.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-16 12:12:40 -04:00