Commit graph

61403 commits

Author SHA1 Message Date
Daniel Leung
a6e35c6ab0 samples: logging/dictionary: set UART backend to do dictionary
This enables CONFIG_LOG_BACKEND_UART_OUTPUT_DICTIONARY so that
the UART backend is in dictionary logging mode.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-03-10 13:48:08 -05:00
Fabio Baltieri
cfa0205c6f arm: cortex-m: add an option to trap unaligned access
Cortex-M mainline cores have an option to generate a fault on word and
halfword unaligned access [1], this patch adds a Kconfig option for
enabling the feature.

[1] https://developer.arm.com/documentation/dui0552/a/cortex-m3-peripherals/system-control-block/configuration-and-control-register

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-03-10 13:47:41 -05:00
Henrik Brix Andersen
d4023b3c1b drivers: gpio: move non-standard dts flags to be soc specific
Reserve the upper 8 bits of gpio_dt_flags_t for SoC specific flags and
move the non-standard, hardware-specific GPIO devicetree flags (IO
voltage level, drive strength, debounce filter) from the generic
dt-bindings/gpio/gpio.h header to SoC specific dt-bindings headers.

Some of the SoC specific dt-bindings flags take up more bits than
necessary in order to retain backwards compatibility with the deprecated
GPIO flags. The width of these fields can be reduced/optimized once the
deprecated flags are removed.

Remove hardcoded use of GPIO_INT_DEBOUNCE in GPIO client drivers. This
flag can now be set in the devicetree for boards/SoCs with debounce
filter support. The SoC specific debounce flags have had the _INT part
of their name removed since these flag must be passed to
gpio_pin_configure(), not gpio_pin_interrupt_configure().

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-10 13:46:34 -05:00
Gerard Marull-Paretas
a87c811ec9 arch: x86: use DEVICE_DT_GET_ONE
Improve code by using DEVICE_DT_GET_ONE instead of device_get_binding,
since the intel_vt_d device instance can be obtained at compile time.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-10 13:45:59 -05:00
Piotr Pryga
ce0ad0e30a Bluetooth: Controller: df: Do not send IQ rep for PDU without CTE
Check if the CTE was discovered by Radio peripheral should be
done with use of CTEPRESENT event. Samples count should not
be used for that purpose. If samples count is a value different
than zero for PDUs that don't have CTE, unwanted IQ samples
report will be generated. CTEPRESENT event is set only in case the
CTEInfo filed was correctly parsed by Radio peripheral during
PDU reception.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-03-10 13:45:41 -05:00
Bernd Weiberg
fd8702474d drivers: fixed return code bug in eth_stm32_hal_set_config()
The function eth_stm32_hal_set_config() located in
drivers/ethernet/eth_stm32_hal.c always returns -ENOTSUP,
even if everything is fine. This commit fixes the return statement
so that the real result (ret) will be returned.

Signed-off-by: Bernd Weiberg <bernd.weiberg@siemens.com>
2022-03-10 13:44:48 -05:00
Pavel Vasilyev
f1d5066032 Bluetooth: Mesh: Don't replace destination of segmented message
Don't replace destination of segmented message when acknowledgement is
received from a friend node, otherwise, when segments are retransmitted,
the destination will be used and the friend node will treat it as a new
segmented message.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-03-10 13:44:05 -05:00
Henrik Brix Andersen
0dbbf3b61b dts: arm: nxp: kinetis: add zephyr,memory-region for lower SRAM
Add zephyr,memory-region compatibles for the lower SRAM on NXP Kinetis
SoCs.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-10 12:37:42 -06:00
Francois Ramu
57c8c0cce5 samples: drivers: DAC testcase running on more stm32 boards
It includes the samples/drivers/dac application for
existing nucleo and disco target boards.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-03-10 13:30:06 -05:00
Francois Ramu
ee07c8eef7 tests: drivers: DAC testcase running on more stm32 nucleo boards
It includes the testcase for existing nucleo target boards.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-03-10 13:30:06 -05:00
Francois Ramu
637c659694 boards: stm32 adding dac features on nucleo boards nucleo_f746zg
It enables he DAC peripheral on the nucleo_f746zg target
boards from STMicroelectronics

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-03-10 13:30:06 -05:00
Francois Ramu
613e705f37 boards: stm32 adding dac features on the disco kit stm32l475
It enables he DAC peripheral on the disco_l475_iot1 target
boards from STMicroelectronics

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-03-10 13:30:06 -05:00
Francois Ramu
ae13f45c27 boards: stm32 adding dac features on nucleo boards nucleo_g474re
It enables he DAC peripheral on the nucleo_g474re target
boards from STMicroelectronics

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-03-10 13:30:06 -05:00
Francois Ramu
0c4e22c7d6 boards: stm32 adding dac features on nucleo boards nucleo_h743zi
It enables he DAC peripheral on the nucleo_h743zi target
boards from STMicroelectronics

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-03-10 13:30:06 -05:00
Francois Ramu
0a9062dba6 boards: stm32 adding dac features on nucleo boards nucleo_wl55jc
It enables he DAC peripheral on the nucleo_wl55jc,
target boards from STMicroelectronics

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-03-10 13:30:06 -05:00
Enjia Mai
919b014509 twister: passing the build dir to device serial pty
Passing the zephyr build directory to the script run by
--device-serial-pty, it makes the feature of the device serial
pty more flexible.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-03-10 13:29:06 -05:00
Erwan Gouriou
f36a6abf9c samples/boards/stm32: stm32_ble: Add bt_disable/bt_enable sequence
Demonstrate bt_disable/bt_enable.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-03-10 13:28:41 -05:00
Erwan Gouriou
3a041ca5c8 drivers/bluetooth: stm32wb: Allow sequential C2 start
Set up a c2_reset procedure in order to allow sequential
open/close/open calls and keep c2_reset done at init (required
for flash access).
Move reinit out of the reset procedure, so flash could be
accessed after bt_disable().

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-03-10 13:28:41 -05:00
Erwan Gouriou
925c84a75b samples/boards/stm32: stm32_ble: Use bt_disable to reset the BLE stack
Application is now supposed to explicitly shut down the ble stack
before shutdown.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-03-10 13:28:41 -05:00
Erwan Gouriou
ed6cc6dce3 soc/arm/st_stm32: stm32wb: Remove stack reset from shutdown
BLE stack reset should now be done in hci close function.
Remove from shutdown procedure.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-03-10 13:28:41 -05:00
Erwan Gouriou
045c986314 drivers/bluetooth/hci: stm32wb: Implement close api
Add treatment for close api.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-03-10 13:28:41 -05:00
Erwan Gouriou
49b15c8306 drivers/bluetooth/hci: stm32wb: Move RX thread creation to open
In order to enable RX thread abortion on close, move creation
to from init to open.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-03-10 13:28:41 -05:00
Erwan Gouriou
a099c79234 subsys/bluetooth/host: hci_core: Add a bt_disable command
Add a bt_disable function. This will abort existing threads and
close the HCI transport.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-03-10 13:28:41 -05:00
Erwan Gouriou
b3c5a028f5 include/drivers/bluetooth: hci_driver: Add close function
Add a close api function to bt_hci_driver structure.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-03-10 13:28:41 -05:00
Francois Ramu
71f20d8b3e tests: drivers: pwm for stm32l073 and stm32f091 nucleo boards
The overlay are defined to run the tests/drivers pwm_api
on the nucleo_l073rz,nucleo_f091rc.
Note than pwm pb10 is for DTS definition purpose

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-03-10 13:25:54 -05:00
Francois Ramu
2620c53771 samples: pwm for stm32l073 and stm32f091 nucleo boards
The overlay are defined to run the samples application with PWM
feature on the nucleo_l073rz,nucleo_f091rc, nucleo_g474re

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-03-10 13:25:54 -05:00
Francois Ramu
08e3ce0ebc boards: arm: stm32l073, stm32f091 stm32g474 nucleo board has pwm feature
This adds the pwm feature to the nucleo_f091rc and nucleo_l073rz
and change the pin for nucleo_g474re from STMicroelectronics.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-03-10 13:25:54 -05:00
Jose Alberto Meza
ee1653985d drivers: espi: xec: mec172x: Handle eSPI peripheral channel error
Handle eSPI periperal channel error to avoid continous interrupt
beyond the bus error.

Whenever an eSPI access causes an internal bus error,
PC_BUS_ERROR bit is set, it remains set until cleared by written
with an 1.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2022-03-10 13:25:13 -05:00
Benedikt Schmidt
ccd7ae2445 net: if: add default selection of first up interface
Add the default selection of the first interface which is up.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2022-03-10 13:24:03 -05:00
Andries Kruithof
0927b89540 Bluetooth: tests: Fixup conf to make sure new LLCP is selected
Selecting the new LLCP is a 'choice' in Kconfig, so setting
CONFIG_BT_Ll_SW_LLCP_LEGACY to 'n' does not select the new LLCP
Instead CONFIG_BT_LL_SW_LLCP needs to be set explicitly to 'y'

Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
2022-03-10 13:17:50 -05:00
Herman Berget
3fb7f24f1d Bluetooth: Host: Add missing BT_ATT_OPs to att_op_get_type()
BT_ATT_OP_READ_MULT_VL_REQ, BT_ATT_OP_READ_MULT_VL_RSP, and
BT_ATT_OP_NOTIFY_MULT were missing.

Because of this, multiple variable length reads did not time out.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2022-03-10 13:16:56 -05:00
Aleksandr Khromykh
660fa1b5ce tests: Bluetooth: Mesh: add heartbeat publication to bsim test
Extend the existing bsim Heartbeat test
to check the publication callback functionality.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2022-03-10 13:16:40 -05:00
Aleksandr Khromykh
8c9e8da82f Bluetooth: Mesh: add heartbeat publication callback
Heartbeat publication sent callback can be used
as a watch mechanism to determine whether
the mesh stack is still capable of sending messages or not.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2022-03-10 13:16:40 -05:00
Chen Peng1
8c069c365d cmake: save eh_frame section in output with CONFIG_EXCEPTIONS.
.eh_frame section should not be removed directly in the
hex format and bin format output, it should be based on
whether we need exception handler feature.

Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
2022-03-10 13:13:03 -05:00
Flavio Ceolin
ac079fcba6 kernel: init: Simplify early rand get
There is an API to get an specific number of random bytes. There is
no need to re-implement this logic here.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-03-10 12:45:58 -05:00
Kai Vehmanen
ec7451b485 soc/intel_adsp: add support for Intel Jasper Lake
Add a variant of Intel cAVS2.0 used in Jasper Lake based
products.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-03-10 09:26:41 -06:00
Damian Krolik
a505148d2f scripts: enforce module name uniqueness
Although CMake scripts already support duplicated module
names, if two modules with the same name provide different
Kconfig files, then both files will be loaded leading to
potential conflicts.

Modify zephyr_module.py to enforce that all modules are
uniquely named so that it is possbile to override some of
the built-in modules using ZEPHYR_EXTRA_MODULES variable.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2022-03-10 09:47:58 -05:00
Tomislav Milkovic
7f365f46b8 drivers: clock_control: clock_stm32_ll_h7: Fix PLL3 PQR output init
Due to typo in macro name, PLL3P, PLL3Q and PLL3R outputs
are never enabled

Signed-off-by: Tomislav Milkovic <tomislav.milkovic95@gmail.com>
2022-03-10 09:44:52 -05:00
Herman Berget
0e5d438ee2 Bluetooth: Host: Add test for issue #42306
Checks that only CONFIG_BT_EATT_MAX EATT bearers get connected.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2022-03-10 13:26:46 +01:00
Herman Berget
6a23439b20 Bluetooth: Host: Fix check for number of ATT bearers
Fixes #42306

Attach bt_att_chan objects to bt_att when creating them so that the
check in att_chan_new() works. Use the flag ATT_CONNECTED to signal that
a channel is connected instead of attaching it.

The flag ATT_DISCONNECTED was not set anywhere and is replaced by
ATT_CONNECTED.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2022-03-10 13:26:46 +01:00
Herman Berget
5afa815e88 Bluetooth: Host: Remove unused function att_chan_is_connected()
gcc does not warn on unused static inline functions.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2022-03-10 13:26:46 +01:00
Dominik Ermel
8db0e5a42e kernel: Reduce strncpy in z_impl_k_thread_name_set by null char
No point to copy terminating NULL character to just overwrite it in
next line.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-03-10 10:12:48 +01:00
Enjia Mai
2b1bccde07 tests: testsuite: add emulating send IPI in X2APIC mode
We emulate the interrupt by sending the IPI to core itself by
the local APIC for x86 platfrom.

But in X2APIC mode, this no longer works. So we emulate the
interrupt the by writing the IA32_X2APIC_SELF_IPI MSR to send
IPI to the core itself via LOAPIC also. According to SDM vol.3
chapter 10.12.11.

Fixes #42108

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-03-09 14:55:26 -05:00
Tom Burdick
ad2799ed15 drivers: dma: nios2: const device driver config
Moves the nios2 msgdma driver device config struct to the device data
struct for mutable data. The config struct is expected to be const.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-03-09 14:13:02 -05:00
Tom Burdick
82449f6749 drivers: i2c: nios2: const driver config
Moves the nios2 msgdma driver device config struct to the device data
struct for mutable data. The config struct is expected to be const.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-03-09 14:13:02 -05:00
Enjia Mai
8300ffd302 samples: fix the metairq_dispatch sample sporadically failed on ehl_crb
The metairq sample sometimes failed due to stuck because it has a
potential race when recording the latencies. The previous solution
checks whether the stats.mirq greater than MAX_EVENT. But stats.mirq
might also have a race here. So we change to check the msg sequence,
its correctness ensured by the kernel's message queue.

And also remove the spinlock in previous fix because tests only use
1 CPU, no need to add this. It also improves the fix for #40889,
to prevent test failed sporadically on acrn_ehl_crb and ehl_crb.

Fix #42874.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-03-09 14:09:12 -05:00
Joakim Andersson
84d15bbe90 doc: tfm: Improve documentation of non-secure firmware image
Explain when the TF-M nonsecure firmware image is used.
Use non-secure consistently instead of nonsecure or ns.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-03-09 14:03:52 -05:00
Joakim Andersson
3191191943 doc: tfm: Document size report commands for TF-M and BL2 images
Add documentation with example commands for getting the RAM and ROM
reports for the secure firmware image (TF-M) and mcuboot (BL2).

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-03-09 14:03:52 -05:00
Joakim Andersson
6a2e297231 doc: Fix whitespace alignment in example report
Fix whitespace alignment in example report.
This shows up unaligned in the published documentation.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-03-09 14:03:52 -05:00
Joakim Andersson
5ee41d8b4e scripts: size_report: Add support for TF-M and BL2 image size reports
Add support for TF-M and BL2 image size reports.
This adds the following targets when TF-M or BL2 is enabled:
tfm_rom_report, tfm_ram_report, tfm_footprint
bl2_rom_report, bl2_ram_report, bl2_footprint

Example:
west build -t tfm_rom_report

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-03-09 14:03:52 -05:00