Commit graph

70148 commits

Author SHA1 Message Date
Yves Vandervennet bf93255d03 boards: nxp: Update NXP board cmake files for the flash loader flag
This commit updates the board cmake files for the following
NXP boards:
 - mimxrt1060_evk and mimxrt1060_evkb
 - mimxrt1050_evk_qspi

The change adds the loader information for these boards

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2022-09-21 09:33:42 -05:00
Yves Vandervennet 9a4272853e west: jlink: adding optional flash loader flag required for some boards
With revision 7.70d, Segger changed the command line interface of the
jlink client, requiring some flash specific information, such as
the base address and the type of memory, e.g. QSPI.

This commit adds an optional argument to the West jlink runner,
'--loader' which passes the information to the jlink client.
This change is backward compatible with versions of jlink older
than v7.70d which introduces the CLI change.

Fixes: #50327

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2022-09-21 09:33:42 -05:00
Andrey Borisovich 892682dac6 soc: intel_adsp_ace1x: fix for IPC implementation
In commit c75e6cfcb9
("soc: intel_adsp_ace1x: Added IPC/IDC implementation")
definition for INTEL_ADSP_IPC_DONE was modified for ace1x platforms.
This change was not correct as the new definition was also used to
program the IDA register.

Co-authored-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2022-09-21 14:08:38 +00:00
Gerson Fernando Budke ab25a27bfe doc: release: 3.2: Add notes about Atmel
Add 3.2.0 release notes for Atmel.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-09-21 15:29:59 +02:00
Jamie McCrae c607599068 drivers: counter: Update counter_set_channel_alarm documentation
Adds the -EBUSY return code to the documentation of the
counter_set_channel_alarm function which is returned when an alarm
is already active.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-09-21 15:29:43 +02:00
Daniel DeGrasse 36014b828e boards: arm: mimxrt595_evk: Correct flash size
Correct flash size on RT595 EVK to match the JEDEC binding requirements,
which expect the flash part size to be in bits. Update FLASH_SIZE
Kconfig to ensure build system gets size in MB

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-09-21 15:22:36 +02:00
Daniel DeGrasse 8e897c0fe1 boards: arm: mimxrt685_evk: Correct flash size
Correct flash size on RT685 EVK to match the JEDEC binding requirements,
which expect the flash part size to be in bits. Update FLASH_SIZE
Kconfig to ensure build system gets size in MB

Fixes #50394

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-09-21 15:22:36 +02:00
Daniel DeGrasse 6064da8690 scripts: kconfig: update size functions to convert bits to bytes
Update size functions within kconfig helpers to support converting
values stored in kilobits, mebibits, or gibibits to kilobytes,
mebibytes, and gibibytes via use of different size arguments.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-09-21 15:22:36 +02:00
Jaxson Han f11e6d9c23 drivers: gicv3: Refine the rdist matching function
Introduce a function to do the matching job. Add the config for some
platforms to match the mpdir with aff0 only.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2022-09-21 15:21:29 +02:00
Jaxson Han 2866e2a4cc drivers: gicv3: Introduce aff0 matching config for rdist
Some platforms only use aff0 to match mpdir and GICR.aff. Introduce
GIC_V3_RDIST_MATCHING_AFF0_ONLY to set the matching method only using
aff0. With this config enabled, the matching function will find the
target redistributor by comparing the aff0 only.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2022-09-21 15:21:29 +02:00
Vinayak Kariappa Chettimada d53d9fb6bf Bluetooth: Controller: Add error log for Advertising enable/disable
Add error message logging for Advertising enable/disable at
RPA timeout when the resolvable address is updated.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-21 13:04:00 +00:00
Vinayak Kariappa Chettimada 6c40427931 Bluetooth: Host: Fix resolvable address update with Ext Adv enabled
Fix resolvable address update after RPA timeout with
Extended Advertising support enabled. As Extended
Advertising HCI Commands are being used to start legacy
advertising, incorrectly the local random address was being
used instead of using the random address populated in the
Extended Advertising set. BT_DEV_RPA_VALID is not cleared
when Extended Advertising HCI commands are used, hence the
local random address is not updated and the incorrect use
of it did not make any change to the advertising when
disabled and enabled at RPA timeout.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-21 13:04:00 +00:00
Tomasz Moń 0d4aa49766 drivers: usb_dc_nrfx: Do not uninit endpoints on detach
Sometimes it is desired for the USB device to detach and reattach itself
to the host. USB device controller driver interface supports detach with
usb_dc_detach() function. Subsequently the device can be reattached to
the bus by calling usb_dc_attach().

USB device stack sets the control transfer callbacks in usb_enable().
Nordic usb_dc_detach() implementation inadvertedly overwrote registered
callbacks with zeroes by clearing endpoint configuration structure. This
lead to a NULL pointer dereference during enumeration after device has
reattached inself to the host.

Preserve the callbacks by removing the eps_ctx_uninit() function.
Endpoints runtime data is initialized in usb_dc_attach() so this should
pose no problems.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2022-09-21 12:56:39 +02:00
Stephanos Ioannidis 81de0276fc doc: languages: c: Add formatted output section
This commit adds "Formatted Output" section to the "C Language Support"
documentation that describes the C library-specific formatted output
support details.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-09-21 12:37:04 +02:00
Vinayak Kariappa Chettimada 87b39c5975 Bluetooth: Controller: Fix repeated skip in ticker resolve collision
Enforce next_is_older only when current has equal force as
with the next ticker.

Added Kconfig to disable priority feature in ticker that is
currently not used by Zephyr Bluetooth Low Energy
Controller.

The priority feature if enabled then a custom ULL is needed
by vendors to avoid repeated skipping of overlapping events
as next_has_priority check uses lazy value that would be
always lazy_next > lazy_current as currently skipped event
becomes the next event with lazy value incremented by 1.

Regression in commit 3a9173afe1 ("bluetooth: controller:
Revised ticker for improved conflict resolution") due to
Zephyr Controller does not implement any vendor specific
priority logic.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-21 12:28:44 +02:00
Enjia Mai 24f989cd90 drivers: ioapic: fix the cast for the offset
The cast for the offset variable will make incorrect register
access when it is over 0x80. Change the char cast to unsigned
char to fix it.

Fixes #49803.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-09-21 12:28:30 +02:00
Mariusz Skamra 933a987d75 Bluetooth: audio: Fix possible memory violation
This fixes possible memory violation by using the index outside of an
instance array by tbs_client_common_call_control.
This basically fixes the get_inst_by_index function to return NULL if
the index is invalid. The function calls have been guarded to catch the
returned NULL.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-09-21 12:25:44 +02:00
Erwan Gouriou 25fe4ef969 doc: release note 3.2: Update shield section
Update release note 3.2 with new shields.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-09-21 09:48:44 +00:00
Erwan Gouriou 82be048286 doc: release note 3.2: Update for STM32
Update V3.2.0 release notes with STM32 entries

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-09-21 09:48:44 +00:00
Carlo Caione 7b065e2138 doc: release-notes: Add ARM64 and IPC release notes
For Zephyr v3.2.0

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-09-21 11:20:48 +02:00
Daniel DeGrasse 80dbac16d4 doc: releases: update disk release notes for 3.2
Update release notes with changes to disk subsystem since 3.1 release.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-09-21 11:20:28 +02:00
Daniel DeGrasse ff1f7a0f59 doc: releases: update SDHC release notes for 3.2
Update SDHC release notes with changes since 3.1 release

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-09-21 11:19:44 +02:00
Nicolas Pitre c76d8c88c0 riscv: smp: fix secondary cpus' initial stack
Z_THREAD_STACK_BUFFER() must not be used here. This is meant for stacks
defined with K_THREAD_STACK_ARRAY_DEFINE() whereas in this case we are
given a stack created with K_KERNEL_STACK_ARRAY_DEFINE().

If CONFIG_USERSPACE=y then K_THREAD_STACK_RESERVED gets defined with
a bigger value than K_KERNEL_STACK_RESERVED. Then Z_THREAD_STACK_BUFFER()
returns a pointer that is more advanced than expected, resulting in a
stack pointer outside its actual stack area and therefore memory
corruption ensues.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2022-09-21 09:01:58 +00:00
Jiafei Pan d486bd3cfe lib: libc: newlib: make sure retargetable locking is enabled in toolchain
Add build assert to make sure _RETARGETABLE_LOCKING is enabled in
toolchain, When _RETARGETABLE_LOCKING is enabled, "_LOCK_T" is "__lock"
pointer type, otherwise "_LOCK_T" is "int" type, so there will be the
following compile warnings when toolchain doesn't enable
_RETARGETABLE_LOCKING:

zephyr/lib/libc/newlib/libc-hooks.c:416:13: warning: cast to pointer from
integer of different size [-Wint-to-pointer-cast]
  416 |  k_sem_take((struct k_sem *)lock, K_FOREVER);
      |             ^
zephyr/lib/libc/newlib/libc-hooks.c: In function '__retarget_lock_acquire
_recursive':
zephyr/lib/libc/newlib/libc-hooks.c:423:15: warning: cast to pointer from
integer of different size [-Wint-to-pointer-cast]
  423 |  k_mutex_lock((struct k_mutex *)lock, K_FOREVER);
      |               ^
...

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2022-09-21 08:59:24 +00:00
Krishna T 97ee180c72 wifi: shell: Fix network switching issue
When switching from a secure network to open network, the previous
parameters are not reset which causes the open connection to fail.

Remove the unnecessary "static" storage and reset to zero for params.

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
2022-09-21 08:58:37 +00:00
Francois Ramu d53d5c1e42 dts: arm: st: L0, L1, L4 Fix internal temperature value incorrect.
Fix the incorrect temperature sensor (Die temp), the default value of
the vref-mv is 3.3V.
Actually, the vref is a board value rather than a soc one

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-21 08:57:58 +00:00
Francois Ramu 4c36f3aeaf drivers: adc: stm32 driver enabling adc for the stm32U5
The ADC of the stm32U5 should also waits for the ready Flag
before enabling the peripheral, then wait for the ready Flag
set.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-21 08:57:58 +00:00
Henrico Brom bde8c6d24f net: lwm2m: Fixed missing _CONFIG prefix
Fixed missing '_CONFIG' prefix when enabling
LWM2M_FIRMWARE_UPDATE_OBJ_SUPPORT_MULTIPLE and
CONFIG_LWM2M_FIRMWARE_UPDATE_OBJ_INSTANCE_COUNT through prj.conf

Signed-off-by: Henrico Brom <henrico.brom@vention.nl>
2022-09-21 08:56:58 +00:00
Jamie McCrae 521c787e6f net: shell: Fix stray tab in "net mem" output
Fixes a stray tab in the net mem shell output which makes the TX DATA
line indented.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2022-09-21 08:54:25 +00:00
Vinayak Kariappa Chettimada fca96cfe33 Bluetooth: Controller: Reduce cntr_cnt_get() calls in ticker
Reduce the number of times cntr_cnt_get() is called in
ticker implementation as call to this function halts the
CPU inorder to access the RTC count in the 32KHz clock
domain.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-21 08:53:03 +00:00
Henrik Brix Andersen 707fa6a1f6 tests: drivers: can: api: skip RTR tests if not supported
Skip the Remote Transmission Request (RTR) frame tests if the CAN
controller driver does not support RTR filters.

Fixes: #50218

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-21 08:50:47 +00:00
Henrik Brix Andersen 5ec7acca86 drivers: can: rcar: remote transmission request filters are not supported
The receive path for the Renesas R-Car CAN controller supports two RX
FIFOs, which are currently configured for standard 11-bit CAN ID data
frames in FIFO0, and extended 29-bit CAN ID data frames in FIFO1.

As this leaves no room for matching remote transmission request (RTR)
frames, have the driver return -ENOTSUP instead of silently accepting RTR
filters.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-21 08:50:47 +00:00
Henrik Brix Andersen 6352773c4b drivers: can: document retval for unsupported filter types
Some CAN controllers do not support all filter combinations (standard
11-bit ID filters, extended 29-bit filter, data frame filters, remote
transmission request).

Document the expected return value (-ENOTSUP) for unsupported filter
types/combinations.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-21 08:50:47 +00:00
Jamie McCrae 771668cf91 net: arp: Replace pending packet pointer with fifo
This fixes a bug with ARP and multiple outgoing packets with an IP
that needs to be resolved, causing the first packet to go out and
all others to be dropped after the timeout by having a FIFO of
pending packets instead of a single packet.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2022-09-21 08:49:32 +00:00
Karl Ylvisaker 360c999fbd boards: thingy53: Add a bme688 sensor to i2c1
Add a missing BME688 sensor to the Thingy:53's Devicetree files.

Signed-off-by: Karl Ylvisaker <karl.ylvisaker@nordicsemi.no>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-09-21 08:40:54 +00:00
Fabio Baltieri 6030b85f71 MAINTAINERS: add an entry for hal_wurthelektronik
Adding mah-eiSmart as maintainer for hal_wurthelektronik.

Link: https://github.com/zephyrproject-rtos/zephyr/issues/47021#issue-1288372024
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-20 21:47:30 +00:00
Fabio Baltieri 58b96bd0de MAINTAINERS: add an entry for hal_renesas
Adding andrzej-kaczmarek as maintainer for hal_renesas.

Link: https://github.com/zephyrproject-rtos/zephyr/issues/46721#issuecomment-1167014811
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-20 21:47:30 +00:00
Fabio Baltieri 11baf56948 doc: release: 3.2: add a bunch of placeholders
Add few subsystem and driver placeholder for the maintainers to add
their notes. Hopefully it would help reducing merge conflicts on release
notes PRs.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-20 17:01:06 +00:00
Torsten Rasmussen 65f45507a5 west: fix warning on user args in run_common
When using west runners with multi domains we want to warn users when
they user runner args on multi domain builds.

Therefore fix the `>1` to the correct `>0` which ensures the warning
is printed in all expected cases.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-09-20 16:58:09 +02:00
Filip Kokosinski f7251073c4 MAINTAINERS: update RISC-V arch maintainers
This commit updates maintainers in the RISC-V architecture area.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2022-09-20 09:42:52 -04:00
Jamie McCrae 50738819f4 mgmt: mcumgr: Move wrongly placed header file
Moves a .h file added outside of the zephyr include folder to be
within the zephyr include folder.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-09-20 15:01:47 +02:00
Erwan Gouriou e1cb0845b4 drivers: gpio: stm32: Apply GPIOG specific code to U5 series
In STM32U5 as well it is required to enable VDD before use.
Difference is that U5 enables this under PWR_SVMCR_IO2SV flag.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-09-20 10:00:02 +00:00
Erwan Gouriou 83f0ba7d1a west.yml: hal_stm32: Fix STM32U5 LL PWR API
Point to hal_stm32 fix for `LL_PWR_EnableVddIO2` naming issue in U5 LL API.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-09-20 10:00:02 +00:00
Andrzej Puzdrowski c9d0965ee3 boards/arm/thingy53_nrf5340: Add mcuboot's gpio aliases
Added aliases for the button and LED gpio pin which might be used
by the MCUboot.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-09-20 11:36:54 +02:00
Vinayak Kariappa Chettimada 69fb2dced0 Bluetooth: Controller: Fix TICKER_LOW_LAT Ext. Scan assert check
Fix Extended Scanning assertion check when using Ticker
Low Latency Implementation where the failure to schedule
a ticker timeout is returned inline compared to deferred
failure in the operation callback.

Auxiliary PDU is received using a single-shot ticker
timeout with ticks_slot reservation. This single-shot
ticker is allowed to fail if it is overlapping another
event.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-20 09:10:40 +00:00
Henri Xavier 1a276d0ac6 ring_buffer: Introduce RING_BUF_ITEM_SIZEOF
Currently, to compute the 'item' size in a ring buffer, we have
`SIZE32_OF`.

Several issues with this:
- `SIZE32_OF` only works on variables, not types, due to an extra
 parenthesis pair. Indeed, `sizeof((int))` is not valid C, whereas
 `sizeof((my_var))` is.
- `SIZE32_OF` is not a proper public API
- `SIZE32_OF` rounds down if the argument size is not a multiple
 of 4 bytes.

Thus, we introduce a proper `RING_BUF_ITEM_SIZEOF`, fixing the
aforementioned issues.

Signed-off-by: Henri Xavier <datacomos@huawei.com>
2022-09-20 09:08:14 +00:00
Andrew Hedin 4507608d71 shell: Improve kernel stacks alignment
Use Kconfig value to determine name field width.
Pad stack size to 4 characters.

Signed-off-by: Andrew Hedin <andrew.hedin@lairdconnect.com>
2022-09-20 09:05:00 +00:00
Nikolay Agishev df7beca2eb compiler: arcmwdt: Add ccac version checking
After recent changes Zephyr became incompatible with old
MWDT versions (older than 2022.06).
Version checking may help to avoid build errors
related this incompatibility.

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2022-09-20 09:02:38 +00:00
Pavel Vasilyev ef7f5226cf Bluetooth: Mesh: Fix description in BT_MESH_ADV_BUF_COUNT option
Fix description in BT_MESH_ADV_BUF_COUNT option.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-09-20 08:43:32 +00:00
Aleksander Wasaznik 7e11b98125 Bluetooth: Host: Add "assert non-null" to bt_conn_ref
Clearly `conn` must be non-null since it's dereferenced without checks.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2022-09-20 08:22:28 +00:00