Compare commits

..

472 Commits

Author SHA1 Message Date
Fabio Baltieri
4256cd41df release: Zephyr 3.2.0
Set version to v3.2.0.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-09-30 13:06:22 -05:00
Fabio Baltieri
896935066b doc: conf: add release version 3.2.0
Add release version 3.2.0 to the documentation version list.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-30 11:31:32 -05:00
Fabio Baltieri
3224a50e03 doc: release: remove "Working Draft" from 3.2 release notes title
Drop the "Working Draft" note from the 3.2 release note document title.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-30 11:31:32 -05:00
Fabio Baltieri
d8c5f8f33c doc: release: add a bunch of missing "."
Add few missing "." to list entries, the ones that looks like sentences
anyway.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-30 11:31:32 -05:00
Fabio Baltieri
3344f16dd5 doc: release: drop empty sections
Drop empty sections from the 3.2 release notes file.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-30 11:31:32 -05:00
Fabio Baltieri
37605482d7 doc: release: various cleanups for 3.2
Various manual cleanups for the 3.2 release notes: spelling, wrong
bindings, tags...

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-30 11:31:32 -05:00
Fabio Baltieri
a8590d8f1b doc: release: drop few non relevant entries from the issue list
Drop issues related to backports and other ones that do not seem
relevant to the release.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-30 11:31:32 -05:00
Fabio Baltieri
1f876ae04c doc: releases: known issues for v3.2.0
Add the list of open issues after the last triage:

wget https://builds.zephyrproject.io/zephyr/bug-snapshot/zephyr-bugs-2022-09-30.pickle.xz
unxz zephyr-bugs-2022-09-30.pickle.xz
./scripts/dump_bugs_pickle.py zephyr-bugs-2022-09-30.pickle

Manually fixed few doc generation warnings.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-30 11:31:32 -05:00
Fabio Baltieri
a1a35b47cf doc: releases: resolved issues for v3.2.0
Adding the list of closed bugs since v3.1.0:

./scripts/release/list_issues.py -o zephyrproject-rtos -r zephyr -s
  2022-06-05 -f issues.txt

And some manual fixup to make doxygen happy.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-30 11:31:32 -05:00
Erwan Gouriou
dcf4201d35 boards: stm32h735g_disco: Provide a working openocd configuration
Openocd configuration for this board was broken. Fix it.
Tested on both SDK 0.15.0 and SDK 0.15.1-RC1.
Debug is also functional

Fixes #50306

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-09-30 10:36:11 -05:00
Adrian Bonislawski
6cb0967231 codeowners: add code owner for dma intel_adsp
Add code owner for dma intel_adsp

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-09-30 15:18:20 +00:00
Adrian Bonislawski
e5e7ee88a3 dma: gpdma: fix channel config
This will use DW_CFGH_DST instead of DW_CFGH_DST_PER
to correctly setup cfg_hi. This is critical for ALH transfer.

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-09-30 15:18:20 +00:00
Adrian Bonislawski
9bb0b6dba2 dma: gpdma: fix llp config
This will setup llp config properly with dma_slot

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-09-30 15:18:20 +00:00
Adrian Bonislawski
feffb245fa dma: hda: fix buffer address for hda link
This will set correct buf address for hda link in&out

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-09-30 15:18:20 +00:00
Adrian Bonislawski
7eeeff5ce9 dma: hda: trigger link commit at dma_start
This will trigger link commit immediately after start
to fix hda start flow.
Applies to link out only.

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-09-30 15:18:20 +00:00
Adrian Bonislawski
8c90c40c0e dma: hda: add suspend api for hda link
For HDA link suspend is exactly the same as stop
but the same api is used also to control gpdma with unique suspend

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-09-30 15:18:20 +00:00
Jamie McCrae
53ab862d45 manifest: Update trusted-firmware-m repository version
Updates TF-M to fix an issue to now force generation of version 4
DWARF files to prevent issues with pyelftools.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-09-30 15:07:03 +00:00
Andrzej Puzdrowski
f59188f989 doc/release-note-3.2: storage changelog
Summary on storage updates for 3.2 release.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-09-30 14:46:17 +00:00
Fabio Baltieri
63ead2bf67 doc: release: add overview section
Add (back) an overview section to the release notes, mentioning few
improvements in this release.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-30 16:05:41 +02:00
Andrzej Puzdrowski
4462f6b4b6 doc/release-note-3.2: DFU subsystem changelog
Added summary on the DFU subsystem changes.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-09-30 13:55:18 +00:00
Jakub Rzeszutko
02355bc2fc doc: release-notes-3.2: release notes for shell
Add release notes for the shell subsystem.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2022-09-30 13:54:52 +00:00
Stephanos Ioannidis
175cc385c4 lib: picolibc: Use smaller default heap size
The picolibc heap size configuration (`CONFIG_PICOLIBC_HEAP_SIZE`) is
used to set the statically allocated malloc heap size when userspace is
enabled.

The current default heap size of 1048576 bytes (MMU) and 65536 bytes
(MPU) is too large for most platforms that Zephyr supports and may
result in the picolibc tests being filtered out due to the increased
memory footprint of the compiled image (i.e. SRAM overflow).

This commit updates the default picolibc heap size to a more reasonable
16384 bytes for MMU platforms and 1024 bytes for MPU platforms.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-30 13:52:24 +00:00
Dominik Ermel
bde86849fc doc/release: Add note on deprecated FLASH_MAP_ macros
Note on replacement of FLASH_MAP_ macros with FIXED_PARTITION_
macros.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-30 07:44:49 -05:00
Dominik Ermel
54db76b4cd storage/flash_map: Deprecate FLASH_AREA_ macros
FLASH_AREA_ macros and usage of label property to identify
fixed-partitions, for purpose of usage with flash map API,
has been deprecated and now FIXED_PARTITION_ macros
should be used with DTS node labels.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-30 07:44:49 -05:00
Daniel DeGrasse
3110aa3a93 dts: arm: nxp: use dt nodelabels for dma assignments on RT11xx
Update RT11xx SOC DTSI files to use DT nodelabels on RT11xx SOCs,
instead of reencoding the base address of each peripheral in the M7
and M4 DTSI files.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-09-30 09:45:56 +00:00
Christopher Friedt
019a6ecae3 tests: kernel: mutex: test for lock timeout race
Say threadA holds a mutex and threadB tries
to lock it with a timeout, a race would occur
if threadA unlock that mutex after threadB
got unpended by sys_clock and before it gets
scheduled and calls k_spin_lock.

This patch supplies the test that can be used
to reproduce the problem and the fix that was
provided in #48056

Fixes #48056

Signed-off-by: Christopher Friedt <cfriedt@fb.com>
2022-09-30 09:45:37 +00:00
Stephanos Ioannidis
884d747fa3 templates: nomination: Fix outdated "GitHub Permission Level" link
This commit updates the outdated "GitHub Permission Level" link.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-09-30 09:43:17 +00:00
Stephanos Ioannidis
ac22b4e860 templates: nomination: Clarify its purpose
This commit updates the "Contributor Nomination" template to make its
purpose clear and straight forward -- that this template is for
requesting the Triage permission level.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-09-30 09:43:17 +00:00
Andrei Emeltchenko
2e56f955db trivial: Remove empty files
Remove empty files.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-09-30 09:41:55 +00:00
Andries Kruithof
5530ea0bd0 Bluetooth: controller: ensure memory access is aligned
The memory used for Tx buffers and procedure context must
be aligned on a word boundary, otherwise it is possible
to get unaligned memory access

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2022-09-30 11:12:19 +02:00
Andrei Emeltchenko
1d879b93c5 trivial: tests: Remove empty file
Remove empty file.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-09-29 13:41:18 -05:00
Andrzej Głąbek
a30a65215d tests: kernel: timer_behavior: Fix building on targets with small SRAM
In the default configuration of the test, with 10000 timer samples,
the `periodic_data` array is too big to fit in SRAM on many targets.
Use lower counts of samples for those, depending on their SRAM size,
leaving at least 8 kB for other variables, buffers, stacks etc.
Exclude the test for targets with less than 16 kB.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-09-29 13:36:00 -05:00
Kumar Gala
72637ac746 MAINTAINERS: DTS maintainer updates
* Split dts infrastructure and bindings
* Add Kumar back as a maintainer for both, and Marti just for
  the infrastructure side.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-09-29 19:22:04 +02:00
Derek Snell
2d8857f278 doc: boards: update JLink details for NXP i.MX RT boards
Improved docs for using JLink debug probes

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2022-09-29 10:52:16 -05:00
Jay Shoen
b4734d5397 kernel: kheap: fix k_heap_aligned_alloc handling of K_FOREVER
k_heap_aligned_alloc was not handling K_FOREVER timeout
correctly due to unsigned return value. Added explicit
K_FOREVER handling of end time.

Fixes #50611.

Signed-off-by: Jay Shoen <jay.shoen@perceive.io>
2022-09-29 10:39:12 -05:00
Aleksander Wasaznik
c90b4a4e52 Bluetooth: Shell: Fix GATT exchange mtu assertion fail
This change fixes a bug where the second use of shell command `gatt
exchange-mtu` would trigger an assertion failure in the stack. The BT
API `bt_gatt_exchange_mtu` asserts `params->func != NULL`.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2022-09-29 17:34:33 +02:00
Jose Alberto Meza
dafdef83b4 samples: drivers: espi: Re-enable eSPI SAF for MEC152x board
Add missing device tree entry for SAF HW block.
Re-enable driver for MEC152x board.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2022-09-29 14:59:32 +00:00
Vinayak Kariappa Chettimada
48c21fab93 Bluetooth: Controller: Fix radio_tmr_start_us to be soft realtime
Fix radio_tmr_start_us to be soft realtime, if the requested
start in microseconds is in the past, setup the next
earliest expiry. This is to prevent radio not being started
and not let the LLL hanging. When setup to receive auxiliary
PDU in LLL scheduling, is_aux_sched is set and if radio does
not start and the window is requested to be pre-empted, then
it is blocked from being preempted due to the is_aux_sched
flag remaining to be set. This stalls the scanning
infinitely until explicit scan disable.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-29 16:42:36 +02:00
Vinayak Kariappa Chettimada
8b586ee5a4 Bluetooth: Controller: Fix missing is_aux_sched flag being reset
Fix missing is_aux_sched flag being reset before resuming to
scan for new advertising PDU in the same scan window after
having received an earlier primary channel PDU and auxiliary
channel PDU using LLL scheduling.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-29 16:42:36 +02:00
Vinayak Kariappa Chettimada
0eec434472 Bluetooth: Controller: Fix receiving spurious PDU in active scanning
Fix receiving spurious overlapping ADV_IND and SCAN_IND PDU
when LLL state expects to receive SCAN_RSP PDU. Explicitly
check that these PDUs are not processed when in active
scanning and waiting for SCAN_RSP PDUs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-29 16:42:36 +02:00
Vinayak Kariappa Chettimada
1de70b575a Bluetooth: Controller: Fix node rx leak on extended scanning stop
If scan is being disabled, rx could already be enqueued
before coming to ull_scan_aux_rx_flush. Check if node rx is
not the last in the list of received PDUs then add it to the
list, else do not add it to the list to avoid duplicate
report generation, release and probable infinite loop
processing of the list. It is possible that node rx has not
be already added in case of last PDU in the chain, under
this case when scan is being stopped add it to the list
before auxiliary context is flushed.

Add the node rx to aux context list of node rx if not
already added when coming to ull_scan_aux_rx_flush. This is
handling a race condition wherein the last PDU in chain is
received and at the same time scan is being disabled.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-29 16:42:36 +02:00
Vinayak Kariappa Chettimada
ba6cbc57e1 Bluetooth: Controller: Fix scan aux leak on periodic sync terminate
Fix scan aux context leak on Periodic Sync Terminate. On
Periodic Sync Terminate the `is_stop` flag is set to prevent
the ULL from assigning an aux context to the sync context,
but the acquired aux context was neither assigned to sync
context nor was being released back to the aux context pool.
Fixed by releasing the aux context if not assigned to the
sync context when `is_stop` flag is set.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-29 16:42:36 +02:00
Hu Zhenyu
1a6098f5db doc: Modify the it8xxx2_evb overview document
1. Remove the obsoleted board
2. Add HW rework of the new it8xxx2_evb
3. Add Wiring of the new it8xxx2_evb
4. Update the Ubuntu flash guide

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
2022-09-29 14:37:55 +00:00
Dino Li
db50a7aca7 drivers: gpio: it8xxx2: add support for GPIO_DISCONNECTED flag
This change was made to support the flag.
fixes: #50681

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2022-09-29 14:33:53 +00:00
Andrzej Puzdrowski
9830c8f405 manifest: mcuboot update
Version witch fixed BOOT_WATCHDOG_FEED default value.

fixes #50754

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-09-29 14:27:11 +00:00
Johann Fischer
de700211ff doc: release-notes-3.2: add release notes for MODBUS support
Add release notes for MODBUS support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-09-29 14:18:59 +00:00
Johann Fischer
d11816af87 doc: release-notes-3.2: add release notes for display controller driver
Add release notes for display controller driver.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-09-29 14:18:59 +00:00
Johann Fischer
9dceb41894 doc: release-notes-3.2: add release notes for USB support
Add release notes for USB support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-09-29 14:18:59 +00:00
Krzysztof Chruscinski
7dc87c6bf1 doc: releases: Updates for counter, clock and logging
Updated release notes with changes in the counter, clock control and
logging.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-09-29 08:55:03 -05:00
Filip Kokosinski
6b36e2f4d5 doc: release-notes: add RISC-V release notes for v3.2.0
This commit adds RISC-V release notes for Zephyr v3.2.0.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2022-09-29 08:48:50 -05:00
Krzysztof Chruscinski
9a3d762ee2 doc: logging: Update section about log processing
'Controlling the logging' section was not clear enough. Updating it
to clarify that logging processing in deferred mode is by default
handled implicitly.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-09-29 08:26:54 -05:00
Erwan Gouriou
2f1c3784fd boards: nucleo_f103rb: Fix openocd configuration
With latest version of openocd delivered in Zephyr SDK 0.15.0,
a new configuration is required to flash and debug this board:
"reset_config connect_assert_srst" allows to flash the board
The new "init" function allows to run debug.

Fixes #50590 for this specific board

Note that other boards might be also impacted by this new version
of openocd but a revert of zephyrproject-rtos/openocd@98d9f11 allows
to get back to the previous status.
A new Zephyr SDK release (V0.15.1) will be available with a revert of
this commit. Unfortunately this has no impact on nucleo_f103rb. Hence
this change.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-09-29 12:26:42 +00:00
Andrzej Głąbek
2aa0642cce doc: release-notes-3.2: Add notes for ADC, I2S, PWM, and Nordic HAL
Add entries for ADC, I2S, and PWM drivers and for Nordic HAL.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-09-29 11:45:11 +00:00
Stephanos Ioannidis
a041f5ce10 doc: toolchains: Update custom toolchain CMake reference file names
This commit updates the CMake reference file names for custom
toolchains.

The contents of `cmake/generic_toolchain.cmake` and
`cmake/target_toolchain.cmake` were moved
`cmake/modules/FindHostTools.cmake` and
`cmake/modules/FindTargetTools.cmake`, respectively.

Refer to the commit 8d2998d4f9 and
7131d02fa4 for more details.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
cf400c6c63 doc: flash_debug: Update OpenOCD and pyOCD links
This commit updates the outdated links for OpenOCD and pyOCD.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
4cf129e13b doc: peripherals: i2c: Fix incorrect hyperlink references
This commit fixes incorrect external hyperlink references.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
e536541f4f doc: virtualization: Update outdated link to ivshmem
This commit updates the outdated link to the QEMU ivshmem
documentation.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
2352f7470b doc: peripherals: tcpc: Fix incorrect hyperlink references
This commit fixes incorrect external hyperlink references.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
d85900d0f7 doc: west: Update outdated link to SPDX specification
This commit updates the outdated link to the SPDX specification.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
9f5ad65446 doc: tools: coccinelle: Update documentation link
This commit updates the oudated link to the Cocinelle documentation.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
14d3c7338e doc: kconfig: Update outdated links to Kconfig documentation
This commit updates the outdated links to the Kconfig documentation in
the Linux kernel repository with those from the official documentation.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
97efbec18b doc: test: Update link to Sparse documentation
Update the Sparse documentation to refer to the official Sparse
documentation instead of some random link, which no longeer works.

It also fixes an incorrect inline literal usage.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
dc66be5d7d doc: bluetooth: autopts: Fix internal linking
Links/references to the pages internal to the documentation should
use `:ref:`.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
14539ed2e8 doc: documentation: Fix incorrect doc/Makefile reference
This commit fixes the incorrect reference to the `doc/Makefile` and
updates the text to better integrate the reference.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
4811575616 doc: documentation: Fix internal linking description
This commit fixes incorrect depiction of the internal link with custom
text usage.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
a811d3889b doc: documentation: Update outdated file paths
This commit updates the documentation guidelines to reflect the
refactored documentation paths.

It also corrects the unnecessary escapes of the backticks.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
b6d312a7ac boards: arc: Update outdated links
This commit updates the outdated ARC board links.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
06ecea6b8f boards: altera_max10: Update outdated link
This commit updates the outdated Quartus download link.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
9912804d3c boards: esp32: Update outdated links
This commit updates the outdated/redirected links.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
43635f7b62 boards: beaglev_starlight_jh7100: Update outdated links
This commit updates the outdated BeagleV-related links. These pages
seem to be no longer available on the Seeed wiki.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
235342252c boards: mcp2515: Update outdated link
This commit updates the outdated link for the "DFRobot CAN BUS Shield
V2.0 schematic."

The repository containing this file has been renamed to
"DFRobot/DFRobot_MCP2515".

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
2a0e55c9e5 boards: link_board_eth: Update outdated link
This commit updates the outdated link for "link board ETH Website" with
that of the "reel board," which contains the information on the "link
board ETH."

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
31e6351dc3 boards: v2m_musca_s1: Update outdated links
This commit updates all outdated links in the v2m_musca_s1 board
documentation.

Some links updated here were not completely broken (redirects worked),
but they did not redirect to the correct page in the documentation, so
they were also updated to point to the correct page.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
6f5d563699 boards: v2m_musca_b1: Update outdated links
This commit updates all outdated links in the v2m_musca_b1 board
documentation.

Some links updated here were not completely broken (redirects worked),
but they did not redirect to the correct page in the documentation, so
they were also updated to point to the correct page.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
c6ed9d72ef boards: v2m_beetle: Update outdated links
This commit updates the outdated links to the Beetle board and
CMSIS-DAP websites.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
cd887a9a90 boards: stm32f072b_disco: Update outdated link
This commit updates the oudated link to the "SK Pang CAN breakout
board" (with MCP2561FD transceiver) product page.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
fc497336c1 boards: stm32f072_eval: Remove outdated links
The STM32F072-EVAL board is now obsolete and the related documents are
no longer available on the official website.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
d4633054cb boards: serpente: Update outdated links
The "Serpente" documentation base URL changed.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
5b830b4747 boards: rm1xx_dvk: Update outdated link
This commit updates the outdated link to MCP23S08 datasheet.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
70d203d2a3 boards: ronoth_lodev: Update outdated links
This commit removes the invalid links to "STMicro STM32L073RZ" in the
board documentation.

It also updates an outdated link to the "AcSIP S76S Product Information
Brief".

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
6aa6f4a37b boards: msp_exp432p401r_launchxl: Remove outdated links
This commit removes all links in the board documentation that are no
longer available.

The MSP432 series is now obsolete and TI seems to have intentionally
removed these links.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
25faa0c114 boards: mps2_an521: Update outdated links
This commit updates all outdated links in the mps2_an521 board
documentation.

Some links updated here were not completely broken (redirects worked),
but they did not redirect to the correct page in the documentation, so
they were also updated to point to the correct page.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
6eca267eb3 boards: mm_swiftio: Update outdated link
This commit updates the outdated SwiftIO API reference link.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
ce004aa5ff boards: gd32: Update outdated links
This commit updates the outdated links for the GD32 boards.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
25fb729b8c boards: efr32mg_sltb004a: Update outdated schematic link
This commit updates the outdated schematic link for the board.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
7f3c5bf6ab boards: efr32_radio: Update outdated links
This commit updates the outdated schematic and product links for the
efr32_radio boards.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
744ab510bd boards: efm32pg_stk3402a: Update outdated schematic link
This commit updates the outdated schematic link for the board.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
c2f82b5026 boards: efm32hg_slstk3400a: Update outdated schematic link
This commit updates the outdated schematic link for the board.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
c8cdf82b6a boards: dragino_lsn50: Update outdated link
This commit updates the outdated link to the Dragino LSN50 product
information page.

Note that the link to the wiki is provided in the linked page.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
fb630b6848 boards: blackpill: Fix incorrect hyperlink references
This commit fixes incorrect external hyperlink references in the
Blackpill board documentation.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
f7d992a824 boards: bl5340_dvk: Update outdated link
This commit updates the outdated link for MX25R6435FZNIL0 datasheet.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
104fb4fcb5 boards: arduino_nicla_sense_me: Update outdated links
This commit updates the outdated links for the full pinout PDF.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
69c8d663fe boards: arduino_nano_33_ble: Update outdated links
This commit updates the outdated links for the Arduino product pages.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
165cf8ddb5 samples: display: cfb_custom_font: Fix stale sample reference
The `cfb_custom_font` sample has been relocated from `samples/display`
to `samples/subsys/display`.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
4a35002adb samples: shields: x_nucleo_iks01a2: Fix outdated pinmux file reference
This commit removes the outdated reference to the board pinmux file and
updates the documentation point to point to the relevant Arduino
connector-related devicetree files.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
a0d335042a samples: ft800: Update outdated links
Apparently the URLs for these old products have been moved to under
"old2020" without any redirects ...

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
016fc8c22f samples: grove_display: Update outdated link
The "Grove Base Shield" seems to be no longer listed in the Seeed
website, so its link is replaced with that of the "Base Shield V2",
which is the successor of the "Grove Base Shield."

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
579de846b2 samples: led_lpd8806: Remove outdated link
The "RGB LED strips: an overview" link no longer works and there is no
direct replacement, so there is no point in listing this document in
the references anymore.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
50cced58d2 samples: counter: maxim_ds3231: Fix outdated link
This commit fixes the outdated link to the "Chronodot" product page.

It seems "macetech" no longer lists the older versions of this product
with DS3231, so the link has been replaced with the one from Adafruit.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
e04e9f3958 samples: sensor: th02: Fix outdated link to TH02 datasheet
This commit replaces the outdated link to the TH02 sensor datasheet
with the link to the Si7005 datasheet (the original part name of TH02
is Si7005).

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
ad39da73bb samples: bluetooth: unicast_audio_server: Fix incorrect link
The sample is named `unicast_audio_server`, not `audio_unicast_server`.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
3d80f937fb samples: sensor: ds18b20: Fix incorrect link
This commit fixes the incorrect link to the DS18B20 sensor product
page.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
25062a51c0 samples: sensor: bme280: Fix incorrect link
This commit fixes the incorrect link to the BME250 sensor product page.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
fab0f2afda samples: tfm_integration: Fix TF-M documentation link
Update the link for the TrustedFirmware-M documentation to point to the
official user guide.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
909abaf367 samples: openthread: coprocessor: Fix outdated link
This commit replaces the outdated link to the Tridonic net4more Border
Router product page, which now reports 404, with a link to its
datasheet (it seems like this product is no longer available).

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
6950aa94f7 samples: st_ble_demo: Fix incorrect app link
This commit fixes the incorrect app link and removes other unreferenced
links.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
8a7eb68c0f doc: security: Fix outdated link
This commit updates the outdated link to "OWASP Top Ten Project".

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
45a8ace1f3 doc: Use inline literals
Use inline literals where applicable -- especially for the words that
contain `@`; otherwise, Sphinx will think it is an email address.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Flavio Ceolin
ffc442b7c9 doc: releases: Entropy notes for v3.2
Add release notes for upcoming release.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-09-29 12:19:35 +02:00
Flavio Ceolin
5b54ad7118 doc: releases: crypto notes for v3.2
Add release notes for the upcoming release.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-09-29 12:19:12 +02:00
Ahmed Moheb
a341792ca0 tests: bluetooth: host: Remove unused definitions and inclusions
Clean up sources by removing unused definitions and inclusions.

Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
2022-09-29 10:17:38 +00:00
Jonathan Rico
5f8e657a22 Bluetooth: att: limit EATT MTU to max buffer size
If a device sends an MTU that is bigger than our maximum tx buffer size,
that could cause assertion failures down the line.

This PR limits it to the maximum we support (CONFIG_BT_L2CAP_TX_MTU).

The issue has been observed with a gatt discovery procedure, but is likely
present in other places in att.c.

To reproduce it, we need two zephyr shell devices, with one having a larger
MTU than the other:
- connect
- do data length update to the bigger MTU
- set security to 2, EATT channels get connected
- launch a gatt discovery from the device with the larger MTU
- observe kernel panic on the other device when it attempts to add too much
memory to a net buf.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2022-09-29 10:16:57 +00:00
Daniel Leung
e869cff96c soc: intel_adsp/ace: unmask all host IPC functionality
On ACE, there is another layer of interrupt masking where
this masks, in addition to the DesignWare controllers.
So we need to un-mask during IPC init or else we are not
going to get any host IPCs.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-29 10:15:53 +00:00
Daniel Leung
4bbd3c7ef5 interrupt_controller: intc_dw_ace_v1x: fix multi-level IRQs
Zephyr encodes multi-level interrupts in a certain way, and
the driver is not utilizing the encoding correctly. So fix
it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-29 10:15:53 +00:00
Joakim Andersson
cc74b3b977 Bluetooth: host: Log SC LTK in pairing procedure without bonding
Log the LE Secure Connection (SC) LTK in a pairing procedure without
bonding when CONFIG_BT_LOG_SNIFFER_INFO is enabled.

Fixes: #50691

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-09-29 10:15:08 +00:00
Derek Snell
569ef4ce30 doc: boards: NXP serial port features documented
Updated docs for NXP boards using the nxp_lpc_usart, for supported
serial port features.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2022-09-29 10:11:51 +00:00
Flavio Ceolin
9c4bf1d477 doc: releases: PM notes for v3.2
Add release notes for upcoming release.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-09-29 08:59:44 +00:00
Jordan Yates
58b65082c2 samples: lora: remove platform_allow
The twister docs specify that `platform_allow` should only be used
if applications can only possibly run on the specified platforms. This
is not the case for these applications, which should be able to run on
any board with LoRa support.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-09-29 08:59:03 +00:00
Jordan Yates
21ba1e9af0 boards: list lora support in yaml
List lora support in the board yaml file. This was already done for one
board (rm1xx_dvk). Boards were discovered by searching for `lora =` in
devicetree files.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-09-29 08:59:03 +00:00
Jordan Yates
3cf42040ae samples: lorawan: verify region compilation
Issue #49960 showed that individual regions can fail to compile when
enabled. As requested in #50626, validate that each region compiles in
CI.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-09-29 08:59:03 +00:00
Andrzej Puzdrowski
1c953834d6 doc/release-note-3.2: settings changelog
Updated summary of the settings subsystem changes for
the 3.2 release.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-09-28 17:39:30 -05:00
Thad House
f37db90541 drivers: Correct tx and rx error counts in mcan
TX and RX error counts are swapped in the mcan driver.

Signed-off-by: Thad House <thadhouse@fb.com>
2022-09-28 20:34:36 +00:00
Yuval Peress
7adacb707a docs: testsuite and emul 3.2 release notes
Add release notes for both the emulation and test suite subsystems

Signed-off-by: Yuval Peress <peress@google.com>
2022-09-28 20:33:52 +00:00
Fabio Baltieri
292fde17de doc: release-notes: add notes for LoRa, LoRaWAN and LED
Add release notes for LoRa, LoRaWAN and LED, got these from Manivannan
on Discord.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Co-authored-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2022-09-28 19:31:44 +00:00
Fabio Baltieri
f178e3e1a5 doc: release-notes: fix indentation for mcuboot
MCUBoot entries have an extra indentation that should not have been
there, drop it.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-28 19:30:45 +00:00
Yonatan Schachter
e477d70694 boards: rpi_pico: Added default pin mapping to docs
Added the default pin mapping to the documentation.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2022-09-28 14:09:46 -05:00
Yonatan Schachter
ddba0f3c30 boards: rpi_pico: Fix doc typos and grammar
Fix a few typos and grammar mistakes in the rpi_pico documentation.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2022-09-28 14:09:46 -05:00
Yonatan Schachter
df7bace10f doc: boards: rpi_pico: Fix DTS compatible for UART and GPIO
Fixes the DTS compatibles for UART and GPIO, which used rpi
instead of raspberrypi.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2022-09-28 14:09:46 -05:00
Yonatan Schachter
3887f452fc release: Added v3.2 release notes for the Raspberry Pi Pico
Added changes made to the rpi_pico board RP2040 SoC to the release
notes.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2022-09-28 14:09:46 -05:00
Jamie McCrae
1ec395d4bc doc: release: 3.2: Add updated MCUMGR release notes
Adds release notes for MCUMGR from other contributors.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-09-28 13:57:46 -05:00
Gerard Marull-Paretas
550f918b01 device: remove duplicate Z_DEVICE_STATE_DEFINE macro definition
The macro is defined twice in the same header file.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-28 13:54:10 -05:00
Gerard Marull-Paretas
4bd68112c3 device: use IF_ENABLED to initialize PM field
IF_ENABLED(CONFIG_FOO, (x)) is equivalent to COND_CODE_1(CONFIG_FOO,
(x), ()).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-28 17:39:36 +00:00
Andrzej Puzdrowski
f0234236f6 doc/release-note-3.2: File System changelog
Added note on FS updates for 3.2 release.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-09-28 10:54:58 -05:00
Manivannan Sadhasivam
0512d21fee west.yml: Update loramac-node module
Update the Zephyr's fork of loramac-node repository to include the fix for
async reception on Semtech SX127x modules. The commit is cherry-picked from
upstream repo.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2022-09-28 10:22:43 -05:00
Andrzej Puzdrowski
c529150322 doc/release-note-3.2: MCUboot changelog
Added summary of MCUboot changes for 3.2 release

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Signed-off-by: Francesco Domenico Servidio <francesco.servidio@nordicsemi.no>
2022-09-28 14:42:52 +00:00
Andrzej Puzdrowski
699b2becb1 doc/release-note-3.2: Flash driver changelog
Updated summary of Flash drivers changes for
the 3.2 release

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-09-28 14:29:31 +00:00
Jose Alberto Meza
28f9ead4dc doc: release-notes: 3.2: bits for eSPI
This adds a few bits about the eSPI driver updates flash over
eSPI support and platform-specific virtual wires support.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2022-09-28 14:25:05 +00:00
Stephanos Ioannidis
74e6f70a63 doc: mailboxes: Remove memory block-related details
The commit c844bd87b3 removed the support
for passing a memory block (allocated in a memory pool) as message
data, but did not update the relevant documentation.

This commit removes any references to the memory block support, which
was removed in the v2.5.0 release, in the mailbox API documentation.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-28 14:24:34 +00:00
Stephanos Ioannidis
5eed8328ab doc: memory-domain: Remove stale reference to k_mem_pool
This commit replaces the stale reference to `k_mem_pool` with `k_heap`.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-28 14:24:34 +00:00
Stephanos Ioannidis
b8643cb429 twister: size_calc: Remove stale k_mem_pool_area reference
This commit removes the stale reference to `k_mem_pool_area` for the
memory pool API, which was removed in the v2.5.0 release.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-28 14:24:34 +00:00
Stephanos Ioannidis
c5a4bb9daf kernel: Remove stale references to memory pool API
This commit removes all stale references in the kernel header to the
memory pool API, which was removed in the v2.5.0 release.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-28 14:24:34 +00:00
Stephanos Ioannidis
69f3b86fa3 tests: benchmarks: app_kernel: Remove k_mem_pool declaration
This commit removes the stale `k_mem_pool` declaration for the memory
pool API, which was removed in the v2.5.0 release.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-28 14:24:34 +00:00
Stephanos Ioannidis
ed13880f1d linker: Remove k_mem_pool section
This commit removes the `k_mem_pool` section for the memory pool API,
which was removed in the v2.5.0 release.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-28 14:24:34 +00:00
Martí Bolívar
316950ef1a doc: releases: DT notes for v3.2
Add release notes for the upcoming release.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-09-28 14:22:44 +00:00
Martí Bolívar
73fb091580 dts: bindings: fix stm32 UART base include file
Include files should not have compatible properties set. These do not
represent real hardware and should therefore not appear to do so, e.g.
by appearing in the bindings index as if they were a real hardware
peripheral.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-09-28 14:22:44 +00:00
Hu Zhenyu
8c4d464afb doc: mec172xevb_assy6906: Add how to enable the PCA9555
Describes the Connectors/Jumpers of testing the PCA9555 on I2C1

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
2022-09-28 14:08:09 +00:00
Adrian Bonislawski
62b01ff061 drivers: dai: ssp: fix mdivr register for ACE platform
Set correct offsets for CAVS&ACE

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-09-28 14:07:19 +00:00
Chris Friedt
0217c3952a posix: conditionally compile perror pthread_common and nanosleep
Previously, these files were compiled unconditionally.

Partial fix for #50654

Signed-off-by: Chris Friedt <cfriedt@fb.com>
2022-09-28 14:06:55 +00:00
Emil Gydesen
715478fe8e Bluetooth: Shell: Add log of error code from bt_audio_stream_qos
Print the error code from calling bt_audio_stream_qos if it fails.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-09-28 14:06:06 +00:00
Herman Berget
a5ce3da6ab Bluetooth: Tests: Fix uninitialized value in eatt_notif test
The chan_opt field was not set, and on some platforms it ended up with
an invalid value. Explicitly set the field on all GATT parameter structs
and make the discovery params static.

Fixes #50520

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2022-09-28 13:12:08 +02:00
Nicolas Pitre
9ac6779b2d riscv: smp: update the qemu_riscv32/64 configs
No usermode nor stackguard CI tests are performed if CONFIG_RISCV_PMP
is not set.

In turn, this requires a larger privileged stack on RV64 just like
the non SMP case.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2022-09-28 07:53:56 +00:00
Nicolas Pitre
91e8a17be4 tests/semaphore: fix "cpu test took too long" assertion failure
The SMP config for RISC-V on QEMU triggers this:

|START - test_sem_queue_mutual_exclusion
|
|Assertion failed at
| WEST_TOPDIR/zephyr/subsys/testsuite/ztest/src/ztest_new.c:155:
| cpu_hold: (dt < 3000 is false)
|1cpu test took too long (4090 ms)
|ERROR: cannot fail in test 'after()', bailing

Looping 10000 times is maybe a bit excessive.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2022-09-28 07:53:56 +00:00
Nicolas Pitre
1f362a81f1 riscv: fix crash resulting from touching the initial stack's guard area
The interrupt stack is used as the system stack during kernel
initialization while IRQs are not yet enabled. The sp register is
set to z_interrupt_stacks + CONFIG_ISR_STACK_SIZE.

CONFIG_ISR_STACK_SIZE only represents the desired usable stack size.
This does not take into account the added guard area. Result is a stack
whose pointer is much closer to the trigger zone than expected when
CONFIG_PMP_STACK_GUARD=y, and the SMP configuration in particular pushes
it over the edge during many CI test cases.

Worse: during early init we're not quite ready to handle exceptions
yet and complete havoc ensues with no meaningful debugging output.

Make sure the early assembly code locates the actual top of the stack
by generating a constant with its true size.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2022-09-28 07:53:56 +00:00
Nicolas Pitre
a7b5d606c7 riscv: PMP-based stack guard is incompatible with stack sentinel
The software-based stack sentinel writes to the very bottom of the
stack area triggering the PMP stack protection. Obviously they can't
be used together.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2022-09-28 07:53:56 +00:00
Nicolas Pitre
4a733694ca riscv: pmp: fix stackguard when used on SMP
The IRQ stack in particular is different on each CPU, and so is its
stack guard PMP entry value. This creates 2 issues:

- The assertion ensuring the last global PMP address is the same
  for each CPU does fail;

- That last global PMP address can't be relied upon to create a
  single-slot per-thread TOR mapping.

Fix both issues by not remembering the actual address for the last
global entry but a dummy address instead that is guaranteed not to
match any opportunistic single-slot TOR mapping.

While at it, lock that IRQ stack guard PMP entry.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2022-09-28 07:53:56 +00:00
Evgeniy Paltsev
8ef27d6904 doc: add ARC release-notes for 3.2
Add ARC architecture and boards release notes

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2022-09-28 07:53:08 +00:00
Sylvio Alves
82bd341018 drivers: gpio: esp32: fix error when using input only pins
Input pins in ESP32 (34 to 39) have no pull-up / pull-down internally.
Current behavior is that gpio driver fails when "disabling it", which
should not happen. It need to fail only when enabling this feature.

Fixes #50615

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-09-28 07:52:29 +00:00
Øyvind Rønningstad
b96453f653 doc: manifest.rst: Describe using 'revision: HEAD~0' in manifests
Describe that using 'HEAD~0' as the revision in manifest files will
cause west to not touch that project.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2022-09-27 19:30:01 -07:00
Fabio Baltieri
d43e4e9ca4 scripts: dump_bugs_pickle: strip bug titles
Strip trailing and leading whitespaces from but titles so that they can
be used directly in the release notes.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-27 16:51:45 -05:00
Fabio Baltieri
47ae66d828 scripts: release: strip title names
Make sure listed titles have no trailing/leading space (they often do
and right now they have to be cleaned manually before going into the
release notes file).

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-27 16:51:45 -05:00
Fabio Baltieri
daff79b957 scripts: release: set per_page=100 for issue requests
GitHub issue API allows a max of 100 entries per page (up to a default
of 30). Use it for list_issues, makes the script runs a lot faster.

Api documentation:
  https://docs.github.com/en/rest/issues/issues
  https://docs.github.com/en/rest/pulls/pulls

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-27 16:51:45 -05:00
Carles Cufi
c4cc1621a5 doc: relnotes: Add notes about build system
Add a section about the build system and infrastructure to highlight
both sysbuild and west blobs.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-09-27 14:56:42 +00:00
Daniel DeGrasse
e476fcb81a doc: releases: update release notes for SD subsystem for 3.2 release
Update release notes for SD subsystem with changes since 3.1 release.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-09-27 09:51:55 -05:00
Dominik Ermel
16cdb40df7 mgmt/mcumgr: Remove mcumgr_util.h header
The header provides declarations for no longer used/existing
functions.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-27 16:39:22 +02:00
Chris Friedt
4344c79b33 doc: release: add updates for hal_ti
Note: some changes were not captured in v3.0 or v3.1
release notes, so this is a cumulative update.

Signed-off-by: Chris Friedt <cfriedt@fb.com>
2022-09-27 09:35:15 -05:00
Sylvio Alves
3e016d5ba5 docs: release-notes: add ESP32 release notes
Adds release notes for 3.2 relelase.
Updates ESP32 drivers and hal_espressif info.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-09-27 14:25:48 +00:00
GUITTER Pierrick
2ef94ec479 drivers: gsm_ppp: fix modem_cmd_handler_tx_lock
Remove modem_cmd_handler_tx_lock lock when CONFIG_GSM_MUX
is disabled, as modem_cmd_handler_tx_unlock is under the same
conditions.

Signed-off-by: GUITTER Pierrick <pguitter@silicom.fr>
2022-09-27 14:12:57 +00:00
Gerard Marull-Paretas
3e35110f22 doc: fix embedding of Kconfig links in rst
Kconfig links were not processed correctly in Doxygen content rendered
by breathe. Also remove obsolete @option{} (no longer used).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-27 07:18:15 -05:00
Dino Li
68d08980af it8xxx2: intc: make sure IER disabling to take effect.
Add fake read to synchronize interrupt enable register (IER)
of SOC before enabling global interrupt.

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2022-09-27 10:05:09 +00:00
Jan Peters
a80fa5163b drivers: serial: uart_mcux_lpuart: fix IRQ-driven API with ASYNC_API
this allows usage of the interrupt-driven API when CONFIG_UART_ASYNC_API
is enabled.

Signed-off-by: Jan Peters <peters@kt-elektronik.de>
2022-09-27 10:04:10 +00:00
Erik Brockhoff
183370277b Bluetooth: controller: fixing slot reservation for connection setup
With introduction of refactored LLCP was also introduced an error
re. calculation of initial slot reservation in connection setups.

Due to this error a bigger slot was reserved, leading to failure due to
connection overlaps in multiple.sh test.
Also the removal of this 'overhead' in slot reservations calls for
bigger time-allowance for l2pcap_stress test.

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
2022-09-27 10:02:07 +00:00
Emil Gydesen
3d7af0f272 samples: Bluetooth: unicast audio server stop sending on stopped
When the stopped callback is called, then the CIS is disconnected.
This should stop the sending of data from the server.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-09-27 09:16:21 +00:00
Emil Gydesen
186181687b Bluetooth: Audio: Remove unicast client set state
The unicast client should never need to set the state of the
endpoints directly, without an notification from the server.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-09-27 09:16:21 +00:00
Emil Gydesen
a59bc35235 Bluetooth: Audio: Ensure that ASEs don't get idled when CIS is connected
Ensure that the CIS for an ASE, if any, is disconnected before we
go into the idle state.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-09-27 09:16:21 +00:00
Emil Gydesen
874c45241e Bluetooth: Audio: Remove caching ASE on release
Remove the support for caching ASEs on release.

This is mainly due to the 2-stage design in Zephyr: We
have the bt_audio_stream and the bt_audio_ep, where the
the latter represents an ASE in most cases.

However, once the endpoint goes into the codec configured
state, then a stream must be bound to it. This would be fine
(although a stream is technically not established at this point),
except that a stream is also, for unicast, specified for a
specific ACL. Once the ACL disconnects, the stream technically
becomes invalid, and if the stream is invalid, so is the endpoint.

Based on that, there's no reason (or even option) to keep the
endpoint in a codec configured state, as it would not
have a valid stream associated with it.

If we want to support an ASE going into the codec
configured state on ASE release (or ACL disconnect),
the relationsship between ASEs and streams needs to
be redefined.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-09-27 09:16:21 +00:00
Flavio Ceolin
4ddf7da412 doc: release-notes: Security notes
Security related security notes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-09-27 09:14:45 +00:00
Dominik Chat
4a5b7f9282 boards: Fix thingy:53 assert with gpio=n
Problem:
When GPIO=n the regulator is turned off,
but assert expects regulator init priorty.

Fix:
Add if defined to check if regulator is turned
on in order to check init priority.

Signed-off-by: Dominik Chat <dominik.chat@nordicsemi.no>
2022-09-27 11:09:15 +02:00
Anas Nashif
489e8eb02c tests: timer_behavior: nsim_em is now marked as simulator
remove nsim_em from exclude list, it is now being excluded as a
simulator.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-09-26 16:49:58 +00:00
Anas Nashif
39d78faa42 boards: arc/nsim: all nsim variants are simualtors
Needed for proper filtering based on type in twister.
Sometimes we do not want to run a test in a simulator.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-09-26 16:49:58 +00:00
Anas Nashif
be3479cdc9 boards: frdm_k64f: remove as default platform
With the amount of coverage we are getting through qemu and other
simulators on ARM and other architectures, no need to have a
`build-only` board running in CI.

This was here for legacy reasons and due to the fact it was the first
board to be supported by zephyr.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-09-26 16:49:58 +00:00
Anas Nashif
6a6a63d5fe tests: arch/timing: cleanup test configuraton
No need for two scenarios just to add a kconfig that works for all
platforms (smp and non-smp).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-09-26 16:49:58 +00:00
Krishna T
d2b196978f net: l2: wifi: Fix channel length check
To allow 5GHz (and 6GHz) channels, use 3 digits check.

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
2022-09-26 18:41:40 +02:00
Juha Heiskanen
b559bd818c net: lwm2m: Fix LwM2M pause and resume
Fixed unstable thread state read for detetect engine thread
state.
Fixed engine missing socket conrext add.
lwm2m resume now do update also from network error state

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2022-09-26 15:17:37 +00:00
Jonathan Rico
1051607c7c Bluetooth: l2cap: prevent deadlock on chan timeout
When getting a channel timeout, l2cap_chan_destroy is called from the
rtx_work work item.

In that function we attempted to cancel the current work item, and sync on
it being cancelled. The kernel API says that this will block until the work
item completes execution, hence a deadlock.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2022-09-26 15:13:13 +00:00
Torsten Rasmussen
4ced8de50c cmake: propagate endianess to CMake CMAKE_<lang>_BYTE_ORDER setting
Fixes: #45270

Zephyr Kconfig defines the settings BIG_ENDIAN.
Propagate this setting to the corresponding CMAKE_C_BYTE_ORDER and
CMAKE_CXX_BYTE_ORDER variables.

This also ensures that the CMake function 'is_big_endian()' reports the
correct endianess.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-09-26 15:09:38 +00:00
Fabio Baltieri
a2ba6cd0ee doc: api: update overview page
Update the API overview page, guessing based on gitk v3.1.0..main on the
various API headers.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-26 09:53:05 -05:00
Emil Gydesen
11956f55c1 MAINTAINERS: Move asbjornsabo to audio collaborator
Asbjorn will not be very involved with Zephyr
development, so moving him from maintainer to
collaborator.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-09-26 09:48:49 -05:00
Emil Gydesen
a47f8297fe CODEOWNERS: Remove asbjornsabo from BT Codeowners
Asbjorn will not be as involved with Zephyr
development anymore, so removing him as a codeowner.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-09-26 09:48:49 -05:00
Peter Tönz
387d84e452 includes: prevent warnings (Z_CBPRINTF_ARG_SIZE shadows variables)
We compile with the gcc compiler flags -Werror and -Wshadow. So
the mentioned macro rasies a warning (and with the flags the
warning becoms to an error). It uses the same variable names
as on of its caller. Add an addidional underscore to the
affected variables to prevent this warning.

Signed-off-by: Peter Tönz <peter.tonz@husqvarnagroup.com>
2022-09-26 09:43:28 -05:00
Vinayak Kariappa Chettimada
9b30a91e9b tests: Bluetooth: Upload Launch Studio Project and ICS
Uploaded the Bluetooth Launch Studio generated projects and
ICS files. These files can be imported into Bluetooth users
Launch Studio, with their Bluetooth SIG account, and
generate the test plans.

This file provide detailed information in Launch Studio of
the supported Core features, Host Services and Profiles,
and Audio services.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-26 13:21:08 +02:00
Vinayak Kariappa Chettimada
744e5f4da4 Bluetooth: Controller: Fix ticks_slot_id_previous reset on ticker yield
Fix implementation to not reset the ticks_slot_id_previous
when ticker yields its reserved slot, only reset if ticker
was stopped.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-26 13:20:28 +02:00
Vinayak Kariappa Chettimada
245b1e0330 Bluetooth: Controller: Fix ticker worker check ticks_slot_previous
Fix ticker worker from checking the ticks_slot_id_previous,
only ticks_slot_previous be checked as previous slot id
would be assigned to TICKER_NULL if the ticker was stopped.
The ticks_slot_previous value should be used to check that
a slot is reserved even if the ticker has been stopped.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-26 13:20:28 +02:00
Ahmed Moheb
fab9c5a140 tests: bluetooth: host: Add UT for bt_keys_get_addr()
Unit test project for bt_keys_get_addr().
This part of subsys/bluetooth/host/buf.c unit testing

Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
2022-09-26 13:05:47 +02:00
Ahmed Moheb
fd888df41d tests: bluetooth: host: Add mocks for keys.c
Add required mocks to be able to compile and test /bluetooth/host/keys.c

Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
2022-09-26 13:05:47 +02:00
Juha Heiskanen
8364715998 net: lwm2m: Fix LwM2M resume from Update registration state
If LwM2M engine was paused at ENGINE_UPDATE_SENT it was not
able to resume lwm2m engine properly. There was also missing
RD client Pending message free which could also affect a issue.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2022-09-26 10:55:03 +00:00
Juha Heiskanen
c9c8c467b5 net: lwm2m: LwM2M rd client Update registration Timeout fix
RD client was not closing socket socket when Update registration
timeout. It fail new connection open. There is added a flag for
detect a case when Registration state need to be re-open a socket
for new connection.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2022-09-26 10:55:03 +00:00
Anas Nashif
215159c6ff tests: mem_blocks: remove board configs using dma logging
This is no longer needed and currently generating a fault with this
backend. Using the ztest delay fixes the issue and produces the complete
console output.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-09-26 10:53:43 +00:00
Anas Nashif
db75a82b24 intel_adsp: when using ztest, add delay between tests
console can't handle the amount of data coming from many tests, so
introduce a delay beween testcases.

Use ZTEST_TEST_DELAY_MS to delay test execution.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-09-26 10:53:43 +00:00
Anas Nashif
268fff57a8 ztest: add a delay between tests through CONFIG_ZTEST_TEST_DELAY_MS
Some testsuites dump lots of output very fast where some systems are not
able to capture the complete output from the tests. Add a slight delay
between each test in the suite.

New kconfig CONFIG_ZTEST_TEST_DELAY_MS is added to ztest.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-09-26 10:53:43 +00:00
Gerard Marull-Paretas
1b98db232e doc: release-notes: inform about stm32 pin changes
pinctrl: some pin definitions did not contain the "_c" suffix, used
by pins with analog switch on certain H7 devices

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-26 09:56:31 +00:00
Gerard Marull-Paretas
30485e6a58 manifest: update hal_stm32
Includes some fixes with pinctrl files (pins with analog switch found in
H7 series).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-26 09:56:31 +00:00
Jordan Yates
e35d95b88e modules: loramac-node: fix CN470 linking
Update the source files compiled when `CONFIG_LORAMAC_REGION_CN470` is
enabled to link. Despite the naming, a `RegionBaseUS.c` function
(`RegionBaseUSVerifyFrequencyGroup`) is used by all four of the CN470
band implementations.

Validated by compiling `samples/subsys/lorawan/class_a` with
`CONFIG_LORAMAC_REGION_CN470` instead of `CONFIG_LORAMAC_REGION_IN865`.

Fixes #49960.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-09-26 09:38:49 +00:00
Vinayak Kariappa Chettimada
e348fe494a Bluetooth: Controller: Warn LLCP Legacy implementation as DEPRECATED
Add in Kconfig, select DEPRECATED, to warn at build time
that the LLCP legacy implementation is deprecated and the
refactored LLCP enabled by BT_LL_SW_LLCP Kconfig option be
used instead (which is the default now).

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-26 11:07:17 +02:00
Jonathan Rico
109c47639e Bluetooth: l2cap: remove ambiguous naming
`l2cap_tx_meta_data` is also a function-like macro.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2022-09-26 11:05:04 +02:00
Jonathan Rico
77e1a9dcad Bluetooth: host: l2cap: add alloc_seg callback
This callback allows use-cases where the SDU is much larger than the l2cap
MPS. The stack will then try to allocate using this callback if specified,
and fall-back on using the buffer's pool (previous behavior).

This way one can define two buffer pools, one with a very large buffer
size, and one with a buffer size >= MPS, and the stack will allocate from
that instead.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2022-09-26 11:05:04 +02:00
Jonathan Rico
8e207fefad Bluetooth: host: l2cap: workaround SDU deadlock
See the code comments.

SDUs might enter a state where they will be blocked forever, as a
workaround, we nudge them when another SDU has been sent.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2022-09-26 11:05:04 +02:00
Jonathan Rico
3c1ca93fe8 Bluetooth: host: l2cap: don't send too much credits
There was an edge-case where we were sending back too much credits, add a
check so we can't do that anymore.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2022-09-26 11:05:04 +02:00
Jonathan Rico
1c8fe67a52 Bluetooth: host: l2cap: release segment in all cases
See code comment

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2022-09-26 11:05:04 +02:00
Jonathan Rico
7a6872d837 Bluetooth: host: add l2cap stress-test
This test reproduces more-or-less #34600.

It has a central that connects to multiple peripherals, opens one l2cap CoC
channel per connection, and transmits a few SDUs largely exceeding the MPS
of the channel.

In this commit, the test doesn't pass, but when it passes (after the
subsequent commits), error and warning messages are expected from the
stack, as this is not the happy path.

We can later debate on whether these particular error messages should be
downgraded to debug.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2022-09-26 11:05:04 +02:00
Zhao Shuai
b15e64569c tests: lib: add a tag to uniquely identify mem_blocks test
To identify mem_blocks test uniquely.

Signed-off-by: Zhao Shuai <shuai1x.zhao@intel.com>
2022-09-26 08:11:13 +00:00
Dominik Ermel
882fe8f951 samples/smp_svr: Remove double inclusion of fs_mgmt.h
Cleanup.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-26 08:08:06 +00:00
Jose Alberto Meza
bccc4e62f2 drivers: adc: xec: Handle incomplete ADC channel conversions
Report an error when the ADC # channels conversion is not
complete.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2022-09-26 08:07:37 +00:00
Marcin Niestroj
1b0d97574a wifi: esp32: remove unused ESP32_WIFI_{SSID,PSK}
Those Kconfig options are no longer used after ESP32 WiFi driver was
converted to Zephyr WiFi mgmt and the removal of platform specific
`samples/boards/esp32/wifi`.

Fixes: d524015f82 ("samples: boards: remove esp32 wifi sample code")

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-09-26 08:05:58 +00:00
Marcin Niestroj
35ba982d84 wifi: esp32: make ethernet carrier on after ESP32_WIFI_EVENT_STA_START
Driver is not ready to handle NET_REQUEST_WIFI_CONNECT wifi_mgmt events
before ESP32_WIFI_EVENT_STA_START event is received. Revert back to setting
NET_IF_NO_AUTO_START flag for interface and call net_eth_carrier_on() after
ESP32_WIFI_EVENT_STA_START event is received. This makes it possible for an
application to wait for network interface to be ready, e.g. with:

  while (!net_if_is_up(iface)) {
     k_sleep(K_MSEC(100));
  }

before making a connect request with:

  net_mgmt(NET_REQUEST_WIFI_CONNECT, iface ...).

Fixes: 7d9edc8bf0 ("wifi: esp32: add support to wifi api mgmt")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-09-26 07:58:09 +00:00
Daniel DeGrasse
5a89ec2b40 dts: arm: nxp_imx7d_m4: Fix order of iMX 7d M4 pinmux for GPIO
Fix ordering of IOMUXC pinctrl selections for gpio pinmux setting.
This will allow the gpio_configure call to correctly set
mux settings for this SOC.

Fixes #50502

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-09-26 07:56:25 +00:00
Tom Burdick
9c0bf4b071 kernel: Obtain current cpu inside of locks for thread usage
Obtaining the CPU outside of the spin locks on SMP would
result in an assert failing on __ASSERT(!z_smp_mobile())
which makes sense as the current cpu may change.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-09-26 07:55:33 +00:00
Mahesh Mahadevan
948b2ab089 boards: nxp: Fix various broken links
Fix the links on boards with SoC's from NXP

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-09-26 07:55:23 +00:00
Stephanos Ioannidis
f503847d14 doc: Do not use Sphinx 5.2.0.post0
Sphinx 5.2.0.post0 release has a known compatibility issue with the
`sphinx_rtd_theme` (see the issue readthedocs/sphinx_rtd_theme#1343).

Revert this commit once this compatibility issue is resolved.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-09-25 10:37:32 +02:00
Fabio Baltieri
24984de7b2 release: Zephyr 3.2.0-rc3
Set version to v3.2.0-rc3.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-09-23 14:40:54 -05:00
Gerard Marull-Paretas
41566e2502 doc: add support for linkcheck
This patch adds support for the `linkcheck` Sphinx builder, so that we
can easily check for broken links in the documentation.

It can be run like this:

ninja linkcheck

Or, using the Makefile shim:

make linkcheck

All Zephyr Github issues links are ignored, since we have lots of these
URLs and they quickly hit GH rate limit. They have small chance to be
incorrect, so we should be ok.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-23 17:28:47 +00:00
Gerard Marull-Paretas
f9ccac29cd doc: delete dead JIRA links
Zephyr JIRA instance is no longer available. Make JIRA links literals.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-23 17:28:47 +00:00
Henrik Brix Andersen
6d08944ac1 drivers: can: mcp2515: abort transfers before entering configuration mode
Abort any pending transmissions before entering configuration mode and
notify the senders.

Poll for mode change completion instead of assuming mode changes take
immediate effect. This is needed for successfully entering configuration
mode with recently aborted transmissions.

Fixes: #50545

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-23 17:25:01 +00:00
Henrik Brix Andersen
f239c3d0e9 drivers: can: stm32: abort transfers after entering init mode
Abort any pending transmissions after entering init mode and notify the
senders.

Fixes: #50545

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-23 17:25:01 +00:00
Henrik Brix Andersen
6cf34d0d33 drivers: can: mcan: notify of aborted transmission on can_stop()
Notify of any aborted transmission when entering init mode via can_stop().

Fixes: #50545

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-23 17:25:01 +00:00
Henrik Brix Andersen
b8eb11de3b drivers: can: mcux: flexcan: abort transfers before entering freeze mode
Abort any pending transmissions before entering freeze mode and notify the
senders.

Fixes: #50545

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-23 17:25:01 +00:00
Henrik Brix Andersen
94d4638ccc drivers: can: sja1000: notify of aborted transmission on can_stop()
Notify of any aborted transmission when entering reset mode via can_stop().

Fixes: #50545

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-23 17:25:01 +00:00
Henrik Brix Andersen
9ca4b34035 drivers: can: calling can_stop() shall abort any pending transmissions
Update the documentation for can_stop() to mention that it shall abort any
pending CAN frame transmissions.

Fixes: #50545

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-23 17:25:01 +00:00
Henrik Brix Andersen
a99a55eefb drivers: can: npl: assume can_send() always provides callback
Given the recent change to the CAN controller can_send() API wrapper,
assume that a callback is always provided at the driver level.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-23 17:25:01 +00:00
Henrik Brix Andersen
50d77ab854 drivers: can: mcan: assume can_send() always provides callback
Given the recent change to the CAN controller can_send() API wrapper,
assume that a callback is always provided at the driver level.

This saves approximately 500 bytes of SRAM on the lpcxpressso55s16 board
when running in default configuration.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-23 17:25:01 +00:00
Henrik Brix Andersen
d3427d991a drivers: can: rcar: assume can_send() always provides callback
Given the recent change to the CAN controller can_send() API wrapper,
assume that a callback is always provided at the driver level.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-23 17:25:01 +00:00
Henrik Brix Andersen
10cd28a61a drivers: can: loopback: assume can_send() always provides callback
Given the recent change to the CAN controller can_send() API wrapper,
assume that a callback is always provided at the driver level.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-23 17:25:01 +00:00
Henrik Brix Andersen
4165186d13 drivers: can: stm32: assume can_send() always provides callback
Given the recent change to the CAN controller can_send() API wrapper,
assume that a callback is always provided at the driver level.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-23 17:25:01 +00:00
Henrik Brix Andersen
78d6ba5ce3 drivers: can: mcp2515: assume can_send() always provides callback
Given the recent change to the CAN controller can_send() API wrapper,
assume that a callback is always provided at the driver level.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-23 17:25:01 +00:00
Henrik Brix Andersen
eb06e6aed0 drivers: can: sja1000: assume can_send() always provides callback
Given the recent change to the CAN controller can_send() API wrapper,
assume that a callback is always provided at the driver level.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-23 17:25:01 +00:00
Henrik Brix Andersen
fcf7c6e6d1 drivers: can: mcux: flexcan: assume can_send() always provides callback
Given the recent change to the CAN controller can_send() API wrapper,
assume that a callback is always provided at the driver level.

This saves approximately 500 bytes of SRAM on the frdm_k64f board, while on
the mimxrt1024_evk board the saving is approximately 2.5 kbytes of SRAM,
both when running in default configuration.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-23 17:25:01 +00:00
Henrik Brix Andersen
d6fc3f6596 drivers: can: provide default callback to can_send() if NULL
Provide a default, internal callback to CAN controller drivers
implementation of can_send() if no callback was provided by the caller.

This allows for simplifying the CAN driver implementations of can_send() as
these no longer need special handling for callback/no callback operation.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-23 17:25:01 +00:00
Mahesh Mahadevan
97feeb48d4 boards: frdm: Fix links to OpenSDA DAPLink firmware
Fix the links on frdmK22f, frdmk82f, frdmkl25z, frdmkw41z

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-09-23 15:41:39 +00:00
Torsten Rasmussen
fd9e5429a3 cmake: detect sysroot for cross-compile toolchains
Fixes: #49587

Try to detect sysroot for cross-compile toolchain if not specified by
the user with `-DSYSROOT_DIR=<path>`.

First, the C compiler is asked if it knows its sysroot, some C compilers
are able to return the sysroot, as an example:
> $ arm-none-eabi-gcc -print-sysroot
> <path>/bin/../arm-none-eabi
> $

but majority of gcc-based C compilers seems to return empty string:
> $ arm-zephyr-eabi-gcc --print-sysroot
> $

in such cases, the cross-compiler target CMake file will try to discover
the sysroot by searching for libc.a, starting one level up from the
compiler location.

If no sysroot candidate is found, a warning will be printed to the user.
If a single sysroot candidate is found, this candidate will be selected.
If multiply sysroot candidates are found, a warning is printed, and the
first candiate in the list is selected. User may select another
candidate with `-DSYSROOT_DIR=<use-this>`.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-09-23 16:37:44 +02:00
Gerard Marull-Paretas
c825d42fe3 doc: remove redundant copyright page
Copyright page does not contain any useful or updated information. Every
Sphinx page is already copyrighted with the message:

> (c) Copyright 2015-2022 Zephyr Project members and individual
  contributors.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-23 13:53:43 +00:00
Vinayak Kariappa Chettimada
88705be89b Bluetooth: Controller: Fix BIS max PDU size used in calc of sub_interval
Fix BIS max PDU size used in calc of sub_interval, use the
minimum of supported maximum BIS PDU size and the requested
SDU size. This will avoid wasted air time between subevents
when SDU size is less than maximum supported PDU size, where
only 150 us tIFS is mandatory between subevents.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-23 12:47:17 +00:00
Stephanos Ioannidis
7249fbe584 tests: cpp: cxx: Add more driver headers
This commit updates the C++ test to include the recently introduced
device headers to ensure that they are C++-compatible.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-23 14:30:39 +02:00
Stephanos Ioannidis
8212140522 drivers: emul: Remove redundant parentheses in macros
This commit removes redundant parentheses in the macro definitions to
fix the `-Wparentheses` warning:

  warning: unnecessary parentheses in declaration of
  '...' [-Wparentheses]

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-23 14:30:39 +02:00
Stephanos Ioannidis
e74c391313 drivers: sdhc: Fix C++ compilation
Fix invalid references to the nonexistent `_cplusplus` definition.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-23 14:30:39 +02:00
Fabio Baltieri
b1715156dd samples: usb: dfu: exclude lpcxpresso55s69_cpu0
Exclude lpcxpresso55s69_cpu0 from the USB DFU tests, this triggers a
build assert due to unsupported flash write block size (512 bytes,
mcuboot supports 8 to 32).

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-23 11:31:52 +00:00
Anders Storrø
3cbb8315fc Bluetooth: Mesh: Shell: Fix cfgCli appkey arg conv
Rectifies incorrect conversion of appkey string in config client
appkey add command.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2022-09-23 13:13:59 +02:00
Francois Ramu
dca9c2b165 drivers: adc: stm32f3 adc driver set common clock to HCLK
Set the synchronous clock mode to HCLK/1 (DIV1) or HCLK/2 (DIV2)
Both are valid common clock setting values.
The HCLK/1 (DIV1) is possible only if the ahb-prescaler = <1>
in the RCC_CFGR (see DTS).

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-23 10:47:23 +00:00
Francois Ramu
a0a124c5da dts: arm: stm32f303 vref characteristics is 3V
The vref has to be set to 3000mV.
It is the voltage to find on the stm32F3.
is fixed by the platform to be lower or equal to VDDA.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-23 10:47:23 +00:00
Carles Cufi
aa405076db doc: relnotes: Add Bluetooth release notes for 3.2.0
Populate the Bluetooth release notes and clean up the existing ones.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-09-23 12:40:52 +02:00
Stephanos Ioannidis
384ff96b25 Revert "tests: kernel: interrupt: Disable on ARM64 QEMU targets"
This reverts the commit 7d8a119213
because GCC is now configured to not emit ldp/stp Qn instructions for
consecutive 32-byte loads and stores, and the nested interrupt handling
failure due to the missing emulation of these instructions no longer
occurs.

For more details, refer to the GitHub issue #49491 and #49806.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-09-23 12:10:25 +02:00
Stephanos Ioannidis
2689590e67 arch: arm64: Disable ldp/stp Qn for consecutive 32-byte loads/stores
GCC may generate ldp/stp instructions with the Advanced SIMD Qn
registers for consecutive 32-byte loads and stores.

This commit disables this GCC behaviour because saving and restoring
the Advanced SIMD context is very expensive, and it is preferable to
keep it turned off by not emitting these instructions for better
context switching performance.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-09-23 12:10:25 +02:00
Wojciech Slenska
a4264f3e86 drivers: w1: added casting
This casting is needed in c++ to avoid compilation error.

Signed-off-by: Wojciech Slenska <wsl@trackunit.com>
2022-09-23 12:09:21 +02:00
William MARTIN
8bbe016f46 drivers: Fix BMI270 initialization
On power on reset, after disable advanced power safe mode,
you need to wait a delay before write again in the device.
The missing wait produce random initialization failure.
See §4.4 of the datasheet "bst-bmi270-ds000.pdf"

Signed-off-by: William MARTIN <william.martin@power-lan.com>
2022-09-23 12:08:24 +02:00
Tomasz Moń
8c7eba346a driver: usb_dc_sam_usbhs: Restore EP0 after detach
SAM V71 Xplained Ultra failed to re-enumerate on the bus after device
detach-attach sequence. The device was recognized by the host, but it
was not responding to control transfers, i.e. it was not acknowledging
SETUP data. Make device acknowledge SETUP data by reconfiguring EP0
when necessary.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2022-09-23 11:52:18 +02:00
Tomasz Moń
37705bc554 driver: usb_dc_sam_usbhs: Actually set detach bit
Device physically detaches when the DETACH bit is set. Fix the
assignment to actually set the bit instead of clearing it.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2022-09-23 11:52:18 +02:00
Vinayak Kariappa Chettimada
b867f0e8a6 Bluetooth: Controller: Fix T_MAFS between broadcasting roles
When calculating the offsets between primary advertising
PDU, auxiliary PDU, Periodic Advertising PDU, and BIS PDU,
the values used as anchor points for starting the periodic
interval for auxiliary, periodic and BIG events, should be
ensured to have the minimum auxiliary frame spacing T_MAFS
between the PDUs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-23 11:51:52 +02:00
Vinayak Kariappa Chettimada
1bbe209a30 Bluetooth: Controller: Fix auxiliary scan stop assertion check
Use a local variable to assert check on auxiliary context's
release.
Add missing volatile qualifier to the parent field of the
auxiliary scan context.
Under race condition a released aux context can be allocated
for reception of chain PDU of a periodic sync role, hence
fix the assertion check to consider that the released
context can be allocated to other roles.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-23 08:11:39 +00:00
Fabio Baltieri
6d67a81e19 doc: release-notes: update the whole Boards & SoC section
Update the whole section based on what was in boards/*/* for v3.1.0 and
main. Sort the lists and remove the empty sections.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-23 08:09:09 +00:00
Fabio Baltieri
340ecef59b doc: release-notes: add a note about tests & samples
Mention the ztest api conversion and new tests expectations.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-23 08:09:09 +00:00
Fabio Baltieri
cd283adfd6 doc: release-notes: add notes for few session with no maintainers
Add few release notes from changes in sections that do not list an
explicit maintainer, taken from:

git log v3.1.0..main drivers/interrupt_controller
git log v3.1.0..main drivers/memc
git log v3.1.0..main drivers/power_domain

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-23 08:09:09 +00:00
Fabio Baltieri
bba44e7fd3 doc: release-notes: mention civetweb module removal
Add a line to mention the removed civeteweb module and code.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-23 08:09:09 +00:00
Vinayak Kariappa Chettimada
16e0e6607c Bluetooth: Controller: Increase BIS PDU access address receive timeout
Increase the BIS PDU access address receive timeout, use the
+/- 2 us jitter for each subevent.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-23 09:57:06 +02:00
Ming Shao
2cea5850e2 twisterlib: re-add the logic to drain the serial leftover
This logic was added before but seems to be missed during the
twister refactoring.

Some tests can cause serial leftover logs buffered somewhere.
Such leftover can interfere with the next test case because the
serial log monitoring thread is started before a board is flashed.
And the monitoring thread can be fooled by such leftover logs and
make incorrect judgement of the test result.

A simple ser.flush() is not enough to eliminate such leftovers.
So add explicit readline() to drain such logs which ensures a clean
serial context for the case that follows.

An example from reel board captured with this patch:

leftover log of previous test: b'.287 seconds\r\n'
leftover log of previous test: b' - SKIP - [...test_coredump_backend]...
leftover log of previous test: b'\r\n'
leftover log of previous test: b'------ TESTSUITE SUMMARY END ------\r\n'
leftover log of previous test: b'\r\n'
leftover log of previous test: b'=====================================...
leftover log of previous test: b'RunID: 4e93757ad...53dcab9f0f5c6\r\n'
leftover log of previous test: b'PROJECT EXECUTION SUCCESSFUL\r\n

Signed-off-by: Ming Shao <ming.shao@intel.com>
2022-09-22 15:15:55 -05:00
Erwan Gouriou
5e756c195a doc: release-notes 3.2: STM32: Fix note on SDMMC driver update
STM32 SDMMC: DMA is actually available only for DMA-V1 compatible
devices.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-09-22 20:06:41 +00:00
Chris Friedt
8a262651af doc: release: 3.2: Add POSIX changes
Add POSIX changes to release notes for Zephyr v3.2.

Signed-off-by: Chris Friedt <cfriedt@fb.com>
2022-09-22 11:43:39 -05:00
Meng xianglin
7f37facddf tests: mem_protect: sys_sem: move a test case to new ztest API
move test case test_sem_take_timeout_fails() to new ztest API

Signed-off-by: Meng xianglin <xianglinx.meng@intel.com>
2022-09-22 16:42:51 +00:00
Mahesh Mahadevan
6c6d0aa85e doc: Add NXP items to 3.2 release notes
Add NXP items to 3.2 release notes

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-09-22 11:39:12 -05:00
Robert Lubos
2e901a841d doc: release-notes: Add 3.2.0 release notes for networking
Add Zephyr 3.2.0 release notes for the networking area.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-09-22 18:06:52 +02:00
Vinayak Kariappa Chettimada
24efea7ba1 Bluetooth: Controller: Fix infinite loop receiving ISO Data
Fix inifinite loop in ll_rx_get() when both ISO Broadcast
and ISO Receive features are enabled in a build. Missing
conditional compile prevented the ack_last index that
maintains a relation between number of packets complete and
the received data packets was unassigned.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-22 18:05:36 +02:00
Piotr Pryga
047b756e64 Bluetooth: df: Add ntf of insufficient resources for IQ samples
According to Bluetooth 5.3 Vol 4, Part E section 7.7.65.21 the
Controller should send an IQ report with Packet_Status set to 0xFF
and Sample_Count to 0x0, to inform Host that it is not able to
store IQ samples for all received Constant Tone Extensions and has
failed to sample at least once.

This commit adds handling of such situation for direction finding
in connectionless mode in lower link layer. It includes:
- lack of node_rx_iq_report to store IQ samples,
- lack of free node_rx to report received advertising data (generates
  an advertising data report with indication "incomplete, no more to
  come" and cancels reception of chained PDUs,
- cancellation of chained PDUs reception due to other scheduling
  reasons.
In all of these situations CTE reception must be enabled and number of
received CTEs is smaller than requested by Host.

If there is not sufficient number of node_rx_iq_report nodes and
report was generated, the CTE will not be samples in a given
periodic advertising synchronization event. The CTE will be
sampled again in next event if there are node_rx_iq_report available.

End user applications may check periodic advertising sync event
counter when use of the reports to be sure about sync event
the received report is connected with.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-09-22 18:04:00 +02:00
Dominik Ermel
e4d0bf0e64 mgmt/mcumgr: Fix image erase returning improper error code on error
The img_mgmt_erase could return MGMT_ERR_EOK even when
img_mgmt_impl_erase_slot failed.

Fixes #50522

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-22 15:32:04 +00:00
Erwan Gouriou
ce1377c5ee boards: stm32: Update doc for STM32U5/L5 boards
Update documentation for STM32U5 and STM32L5 based boards:
- Zepĥyr SDK openocd can be used instead of openocd ST fork.
- All these boards use a STLinkV3 instead of V2.
- Update (or provide when missing) instructions for building and
flashing TFM applications.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-09-22 10:23:58 -05:00
Gerhard Jörges
1e87837f2a drivers: spi: pl022: fix dropping RX bytes
If the thread that submits data over spi is interrupted by a higher
priority thread while pushing data to the tx fifo the hardware pushes
data to spi and frees up space in the fifo. In this case more than
8 Bytes are written to the tx fifo and bytes in the rx fifo get lost
before they are collected in the rx while loop.
To avoid this, the tx loop is exited after a maximum of 8 bytes and the
rx loop will run until it collected all bytes from the rx fifo.

Signed-off-by: Gerhard Jörges <joerges@metratec.com>
2022-09-22 17:16:45 +02:00
Torsten Rasmussen
af4a87af8e cmake: support relocating of a board folder
Fixes: #49116

During development of out-of-tree boards and applications it is not
uncommon to refactor / restructure code.

To allow developers more freedom, let's check that board's defconfig
still exists during a CMake re-run.
If the defconfig no longer exists, either because it's been moved or
deleted, then warn the user and set BOARD_DIR to NOTFOUND.

The NOTFOUND will request CMake to search for the new location in all
board roots. If the board has not been found, as example it's deleted,
then the existing error is printed later.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-09-22 17:14:20 +02:00
Marc Herbert
3ebb18b882 cmake: fix utterly cryptic error handling in the -DSPARSE=y build
Fixes commit 7a85ff7683 ("add sparse support")

The sparse build needs (at least) two things:
1. sparse to be in the PATH
2. the environment variable REAL_CC to be defined and to match the
   value expected by CMake

Fix error messages when either condition is wrong.

- New error message when 1. is not satisfied:
```
CMake Error at zephyr/cmake/compiler/gcc/target.cmake:12 (find_program):
  Could not find CMAKE_C_COMPILER using the following names: cgcc
```

- Previous error "message" when 1. is not satisfied:
```
CMake Error at zephyr/cmake/compiler/gcc/target.cmake:17 (message):
  C compiler
  ZSDK/xtensa-intel_s1000_zephyr-elf/bin/xtensa-intel_s1000_zephyr-elf-gcc
  not found - Please check your toolchain installation
```
Note the "not found" cross-compiler actually exists!

- New error message when 2. is not satisfied:
```
Kconfig header saved to 'ws/build-tgl/zephyr/include/generated/autoconf.h'
-- Found sparse: /home/user/sparse/cgcc
CMake Error at ws/zephyr/cmake/compiler/gcc/target.cmake:25 (message):
  The only way to override its 'cc' default when cross-compiling with
  sparse is unfortunately an environment variable.  So you _must_ set
  REAL_CC at both configuration time and build time to:
  $ZSDK/xtensa-intel_s1000_zephyr-elf/bin/xtensa-intel_s1000_zephyr-elf-gcc

```

- Previous error "message" when 2. is not satisfied:
```
modules/hal/xtensa/include/xtensa/config/core.h:54:10:
    error:unable to open 'core-isa.h'`
```

Also: stop using the same name REAL_CC for both the internal CMake
variable and the external sparse parameter; they're two different
things so name them differently. Environment variable messes are
complicated enough.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-09-22 15:12:22 +00:00
Jamie McCrae
10f9d576f4 doc: release: 3.2: Add MCUMGR changes
Adds MCUMGR changes to the release notes.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-09-22 10:09:22 -05:00
Francois Ramu
6507afd07e drivers: adc: driver for stm32wl configure sampling
This Commit makes the adc configuration correct
for using the adc with 12b conversion on the stm32wl.
TriggerSource must be set to SW.
The ADC clock must be disabled by clock gating during CPU1 sleep/stop.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-22 15:06:20 +00:00
Ming Shao
0e1eba523e reel_board: remove the hw_reset which blocks flashing
The hw reset type is blocking the flash of reel_board.
It seems removing it can fix the issue.

Signed-off-by: Ming Shao <ming.shao@intel.com>
2022-09-22 15:02:53 +00:00
Tim Lin
3474ba919f ITE: drivers/i2c: FIFO2 can be selected to support channel of B or C
FIFO2 can be selected to support channel of B or C by dtsi.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-09-22 14:58:42 +00:00
Tim Lin
c30ec3ba4d ITE: drivers/i2c: Rename the parameter in data struct
Rename the parameter in data struct to avoid confusion.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-09-22 14:58:42 +00:00
Tim Lin
de1fc0ca89 ITE: drivers/i2c: Fix the bug of msgs in I2C transfer
1. To explicitly set the MSG_START flag on the first message.
2. Remove redundant declare.
3. Using data->msgs->flags is the correct address instead of
   msgs->flags.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-09-22 14:58:42 +00:00
Henrik Brix Andersen
a92e68b626 doc: release-notes: minor fixup to the CAN release notes for v3.2.0
Add a couple of minor fixups to the CAN related release notes for Zephyr
v3.2.0 (fixed typo and removed duplicate entry).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-22 09:30:09 -05:00
Stephanos Ioannidis
357b2231de doc: release-notes: Add C++ subsystem release notes for 3.2
This commit adds the C++ subsystem release notes for the Zephyr 3.2
release.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-22 09:22:53 -05:00
Enjia Mai
77986382df tests: framework: fix code coverage report on zephyr-sdk-0.15
The GCC/GCOV version over 12 has slight format change of the gcno
and gcda. Make some adaption in the gcov dump function to fix the
code coverage report.

Mainly two places change:
1. Added the checksum in the struct gcov_info. This fix the crash
in qemu_x86, and mps2_an385 when run with --coverage.

2. Adjust the GCOV_TAG_FUNCTION_LENGTH accroding to gcov-io.h. It's
length unit is caculated by bytes now.

Fixes #50255.
Fixes #50257.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-09-22 14:14:39 +00:00
Gerard Marull-Paretas
fa308ca191 doc: release-notes: fix syntax issues
This patch fixes a couple of syntax issues that lead to incorrectly
rendered content:

- Bad list indentation
- Missing blank line between list item and sub-item.

Also made 'label' a literal.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-22 13:54:45 +00:00
Vinayak Kariappa Chettimada
30823c6f56 Bluetooth: Controller: Fix stream index use in Broadcast ISO Tx
Fix incorrect use of stream handle instead of connection
handle to enqueue Tx ISO Data, and use stream index to get
stream instance.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-22 15:53:35 +02:00
Stephanos Ioannidis
e52b621d6c doc: release-notes: Add C library release notes for 3.2
This commit adds the C library release notes for the Zephyr 3.2
release.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-22 15:46:49 +02:00
Fabio Baltieri
96fc137654 twister: treat imgtool image exceeded as flash overflow
Twister detects FLASH overflow and skips tests that trigger that
condition by default, but sometimes images are just on the flash size
limit and then overflows at a later stage when imgtool adds a trailer,
which gets detected as a build fail and fails the run.

This detects the imgtool flash overflow together with the normal build
ones, causing the build to be skipped on imgtool flash overflow as well.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-22 12:41:25 +00:00
Gerard Marull-Paretas
7e6e4579c2 doc: release-notes: add details on pinctrl/pinmux changes
Inform about pinmux deprecation and add relevant changes in the pinctrl
area.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-22 10:55:44 +00:00
HaiLong Yang
ea59b0ce79 doc: release: 3.2: add GigaDevice changes
More GigaDevice support added, include drivers, boards, etc.
Also, some known issue has been fixed.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2022-09-22 10:54:27 +00:00
Kevin Townsend
5af0fbc2e3 doc: release-notes: Add Aarch32 release notes
Adds Aarch32 release notes for Zephyr 3.2.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2022-09-22 10:08:10 +02:00
Kevin Townsend
d180be37a1 doc: release-notes: Add TF-M release notes
Adds release notes for Zephyr 3.2 related to TF-M.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2022-09-22 10:07:53 +02:00
Pavel Vasilyev
e4921cc84d Bluetooth: Mesh: Trigger GATT update when subnet is added
When the node is part of only one subnet, it starts Network ID
advertisements with infinite timeout. It is not an issue when using
legacy advertising and extended advertising with shared set for local
messages and GATT because any message will stop advertisements. However,
when a separate adv set is used for GATT advertisements,
`struct bt_le_ext_adv_cb.start` callback won't be called, but the
implementation relies on that callback to switch to a next subnet.
Calling `bt_mesh_adv_gatt_update()` stop GATT advertisement so that the
implementation can switch to the next subnet.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-09-22 10:03:39 +02:00
Pavel Vasilyev
20a3a83c9f Bluetooth: Mesh: Fix node identity interleave multiple subnets
Reduce advertising duration to `max_timeout` when advertising node
identity for multiple subnets. This will let the node to interleave
subnets for NODE_ID_TIMEOUT.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-09-22 10:03:39 +02:00
Pavel Vasilyev
326786efd6 Bluetooth: Mesh: Avoid indefinite timeout when duration less than zero
`struct bt_le_ext_adv_start_param.timeout` resolution is in 10ms. When
duration is less than 10ms, division will be evaluated to zero, which
will result in indefinite timeout. Set timeout to 10ms to avoid
indefinite timeout. The advertisement will end earlier anyway after the
event is finished.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-09-22 10:03:39 +02:00
Daniel Leung
55c4e06b35 doc: release-notes/3.2: add bits on serial/UART drivers
This mentions changes on serial and UART drivers.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-21 15:16:55 -05:00
Daniel Leung
e285034579 doc: release-notes/3.2: add bits on PECI drivers
This adds bits about PECI drivers:

* Devicetree binding changes for the ITE it8xxx2 driver.
* New driver for Nuvoton NPCX.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-21 15:16:55 -05:00
Daniel Leung
ce4e3206fb doc: release-notes/3.2: about new PCIE shell subcommands
This mentions the new PCIE shell commands.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-21 15:16:55 -05:00
Daniel Leung
8242739aa5 doc: release-notes/3.2: about new API on MM drivers
This adds the bits about new API in the memory management drivers.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-21 15:16:55 -05:00
Daniel Leung
9bd51614ff doc: release-notes/3.2: add a few bits on IPM
This adds a few bits on changes about IPM.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-21 15:16:55 -05:00
Daniel Leung
a72b44fd11 doc: release-notes/3.2: add bits on Xtensa
This adds a few bits about changes on Xtensa.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-21 15:16:55 -05:00
Daniel Leung
6f141a92ab doc: release-notes/3.2: add bits related to I3C
This adds a few bits about the new I3C controller API,
a new controller driver, and about extending an existing
sensor driver for I3C.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-21 15:16:55 -05:00
Fabio Baltieri
7b64f63139 drivers: kscan_ite_it8xxx2 fix wrong comment reference
The note refers to the wrong API, that has been replaced by a pinctrl
call, update the comment.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-21 13:54:54 -05:00
Fabio Baltieri
c19c5a99cf boards: drop few stale CONFIG_PINMUX entries
The one in esp32_net_defconfig is redundant and lpcxpresso51u68 is not
really using any of the pinmux api, so that can go as well.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-21 13:54:54 -05:00
Daniel DeGrasse
5980aa0196 drivers: gpio: gpio_mcux_igpio: handle gpio-reserved-ranges property
Add code to handle parsing the gpio-reserved-ranges property present on
iMX GPIO controllers, so that gpio controllers with gaps in their pin
indexing can still have pinmux settings applied correctly.

Fixes #50142

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-09-21 13:50:26 -05:00
Daniel DeGrasse
3e99bd1e46 dts: arm: nxp: add gpio-reserved-ranges property to RT10xx devices
Add gpio-reserved-ranges property to gpio controllers on RT10xx devices
that have gaps in their GPIO numbering.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-09-21 13:50:26 -05:00
Daniel Leung
b820cde7a9 soc: esp32: use Z_KERNEL_STACK_BUFFER instead of...
...Z_THREAD_STACK_BUFFER.

This is currently a symbolic change as Z_THREAD_STACK_BUFFER
is simply an alias to Z_KERNEL_STACK_BUFFER without userspace,
and Xtensa does not support userspace at the moment.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-21 18:47:13 +00:00
Daniel Leung
74df88d8f5 soc: intel_adsp: use Z_KERNEL_STACK_BUFFER instead of...
...Z_THREAD_STACK_BUFFER.

This is currently a symbolic change as Z_THREAD_STACK_BUFFER
is simply an alias to Z_KERNEL_STACK_BUFFER without userspace,
and Xtensa does not support userspace at the moment.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-21 18:47:13 +00:00
Ruud Derwig
9bccb5cc4b ARC: fx possible memory corruption with userspace
Use  Z_KERNEL_STACK_BUFFER instead of
Z_THREAD_STACK_BUFFER for initial stack.

Fixes #50467

Signed-off-by: Ruud Derwig <Ruud.Derwig@synopsys.com>
2022-09-21 18:46:06 +00:00
Chen Peng1
4c85c84ec2 x86: Kconfig: update dependency for X86_FP_USE_SOFT_FLOAT
Update Kconfig dependency for X86_FP_USE_SOFT_FLOAT.

Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
2022-09-21 18:43:11 +00:00
Chen Peng1
02f5e14b65 test: timer: behavior: Enhancement for running this test
Zephyr timer is based on system ticks, there usually exists some time drift
due to round up/down errors between cycles, ticks and time delay, we
need to add those expected time drift into the bound calculation for
running this test.
Add a new config TIMER_TEST_PERIOD_MAX_DRIFT_PERCENT for users to set
expected maximum drift percentage for the timer period.

Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
2022-09-21 18:43:11 +00:00
Antoniu Miclaus
9dda350e24 drivers: sensor: adxl372: update driver
Handle SPI/I2c interface in the dts.

Support multiple instances.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
2022-09-21 18:40:06 +00:00
Erwan Gouriou
9293222d25 tests: kernel: tickless: Don't run on nucleo_l073rz
Tickless test enables PM which implies use of LPTIM as ticker on STM32
platforms.
Specifically on nucleo_l073rz, this configuration is fragile as only
LSI(37KHz) could be used as LPTIM tick source, whith a huge accuracy
tolerance (20%).
This works on most cases, when a specific tick freq (4000 ticks/sec),
but this tests explicitly requires tick frequency set to 100.

Excludes nucleo_l073rz for this test.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-09-21 18:39:07 +00:00
Erwan Gouriou
2d740d42e0 drivers: timer: stm32_lptim: Change clock source config check sanction
A specific check is implemented lptim driver in order to ensure global
platform clock/tick configuration is in line with recommendations.
To respect portability principles, don't error out when a config
conflict is detected but generates a warning instead.
Also, since these are only recommendations, provide an option to override
the check. Besides automatically override when ZTEST is enabled, as some
kernel tests specifically configure tick freq to 100.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-09-21 18:39:07 +00:00
Enjia Mai
bafc258025 tests: kernel: common: remove the nop test case
The test case was originally designed for the coverage of
nop()/arch_nop() function. It is not very meaningful for
testing something but causing lots of false alarms on the
kernel/common test so far. Suggest removing this test case.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-09-21 13:38:09 -05:00
Anas Nashif
b3ead37efa twister: temporarily disable mec15xx boards
A workaround to exclude boards from twister. Other solutions do not work,
setting twister fields to false in the board yaml file is not enough,
given that this board has many associated samples and tests, so it can't
be disabled on its own.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-09-21 18:05:51 +00:00
Gerard Marull-Paretas
920ad1fff1 drivers: pinmux: deprecate pinmux
Pinctrl API has taken over pinmux. As planned, pinmux is going to be
deprecated for the next release (3.2). This patch flags all pinmux APIs
as deprecated.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-21 18:05:51 +00:00
Jay Vasanth
3bab0081dd samples: espi: add pinctrl in mec1501 board overlay
update mec1501modular board overlay to include pinctrl
properties for spi

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-09-21 18:05:32 +00:00
Jay Vasanth
a4ad4a2914 boards: microchip: mec15xx: delete pinmux.c files
remove pinmux support in mec15xxevb and mec1501modular
boards. pinmux API is deprecated in 3.2 release.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-09-21 18:05:32 +00:00
Jay Vasanth
d6ba6a5fac spi: mec15xx: add pinctrl for mec15xx/mec1501 qmspi
Remove pinmux calls and add pinctrl support for mec15xx
and mec1501 qmspi. Update board dts, pinmux and driver files.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-09-21 18:05:32 +00:00
Jay Vasanth
a2de15e5cc adc: mec15xx: add pinctrl for mec15xx/mec1501 adc
Remove pinmux calls and add pinctrl support for mec15xx
and mec1501 adc. Update board dts, pinmux and driver files.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-09-21 18:05:32 +00:00
Jay Vasanth
53e6da72d4 mec15xx: enable pinctrl for mec15xx/mec1501 boards
enable CONFIG_PINCTRL for mec15xx and mec1501 boards

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-09-21 18:05:32 +00:00
Jay Vasanth
d684425d4d i2c: mec15xx: add pinctrl for mec15xx/mec1501 i2c
Remove pinmux calls and add pinctrl support for mec15xx
and mec1501 pwm. Update board dts, pinmux and driver files.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-09-21 18:05:32 +00:00
Jay Vasanth
e46c56e117 espi: mec15xx: add pinctrl for mec15xx/mec1501 espi
Remove pinmux calls and add pinctrl support for mec15xx
and mec1501 espi. Update board dts, pinmux and espi driver
files.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-09-21 18:05:32 +00:00
Jay Vasanth
64eeef9d57 soc: arm: microchip: update mec1501 soc header
update mec1501 soc.h to include soc_dt.h for pinctrl
related macros

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-09-21 18:05:32 +00:00
Jay Vasanth
473c098af6 tach: mec15xx: add pinctrl for mec15xx/mec1501 tach
Remove pinmux calls and add pinctrl support for mec15xx
and mec1501 tach. Update board dts and pinmux files.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-09-21 18:05:32 +00:00
Jay Vasanth
4f9eceafc8 peci: mec15xx: add pinctrl for mec15xx/mec1501 peci
Remove pinmux calls and add pinctrl support for mec15xx
and mec1501 peci. Update board dts and pinmux files.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-09-21 18:05:32 +00:00
Jay Vasanth
a209dd4864 pwm: mec15xx: add pinctrl for mec15xx/mec1501 pwm
Remove pinmux calls and add pinctrl support for mec15xx
and mec1501 pwm. Update board dts and pinmux files.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-09-21 18:05:32 +00:00
Jay Vasanth
0a18452dc8 kscan: mec15xx: add pinctrl for mec15xx/mec1501 kscan
Remove pinmux calls and add pinctrl support for mec15xx
and mec1501 kscan. Update board dts and pinmux files.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-09-21 18:05:32 +00:00
Jay Vasanth
c29823aa1f ps2: mec15xx: add pinctrl for mec15xx/mec1501 ps2
Remove pinmux calls and add pinctrl support for mec15xx
and mec1501 ps2. Update board dts and pinmux files.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-09-21 18:05:32 +00:00
Tom Burdick
db372f8eaa doc: releases: update RTIO release notes for 3.2
Update RTIO release notes with changes since the 3.1 release

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-09-21 18:20:18 +02:00
Tom Burdick
e5b76065c3 doc: releases: update I2C release notes for 3.2
Update I2C release notes with changes since the 3.1 release

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-09-21 18:20:18 +02:00
Tom Burdick
184f8108a9 doc: releases: update DMA release notes for 3.2
Update the DMA release notes with changes since the 3.1 release

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-09-21 18:20:18 +02:00
Jamie McCrae
1489104ddb mgmt: mcumgr: img_mgmt: Fix slot3 if check
Fixes an issue with img_mgmt whereby the if check for a slot3
partition is using the wrong case for the partition name.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-09-21 18:18:18 +02:00
Thomas Stranger
4dc093f464 doc: release: 3.2.0: Add release notes for w1 (1-wire)
Add 1-wire release notes for zephyr v3.2.0.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-09-21 15:55:45 +00:00
Maureen Helm
16c07e71e5 doc: release: Add sensor release notes for v3.2.0
Added comments about new drivers, bug fixes, and enhancements made to
sensor drivers since the last release.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-09-21 17:49:33 +02:00
Martí Bolívar
22012894c0 dtlib: error out on duplicate node names
Attempts to define two nodes with the same name within a single set of
curly brackets should fail.

For example, this is invalid DTS according to dtc:

    / { foo {}; foo {}; };

By contrast, this is valid since the node named 'foo' appears twice in
two different sets of curly brackets:

    / { foo {}; };
    / { foo {}; };

Zephyr's dtlib currently does not error out on the invalid condition.

Now that Zephyr itself has been updated to not include such nodes (to
the best of my ability), we can fix this divergence from current dtc
behavior and add a regression test in dtlib.

Fixes: #49590
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-09-21 07:55:40 -07:00
Martí Bolívar
55f4075f92 dts: intel: cavs25: hack around awkward DT representation
Apparently, downstream drivers are allocating devices using
DT_NODELABEL(alh0) and DT_NODELABEL(alh1) on a node with compatible
intel,alh-dai. These represent something like "channels" within the
device.

This is a strange choice. It would be better to do something like have
a property with the count of "channels", or one child node per
channel.

It is also a dtc error to have duplicate node names like this, and
will be an error in Zephyr's dtlib soon.

For now, work around this representation issue by replacing it with
something equivalent that doesn't have duplicate nodes. The
representation should be addressed at some point, but not by me.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-09-21 07:55:40 -07:00
Martí Bolívar
79060be913 west.yml: update stm32 HAL
Bring in updated pinctrl files. These include fixes which remove
duplicate nodes.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-09-21 07:55:40 -07:00
Martí Bolívar
00240a81a3 boards: atmel SAM: pinctrl fixes
Various boards are incorrectly specifying two pin control groups named
'group1' in the same parent node. Fix this by splitting them into two
groups, replacing redundant 'group1' with 'group2'.

Suggested-by: Gerson Fernando Budke <nandojve@gmail.com>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-09-21 07:55:40 -07:00
Martí Bolívar
0e4f13bfba boards: arduino_nicla_sense_me: pinctrl fixes
Two pinctrl node labels for this board are referring to nodes that are
already defined higher in the file with different pinmux property
values.

This looks like a clear copy/paste error. Fix it by renaming the nodes
to create two distinct nodes in each case instead of overriding the
previous node definition. This will also make the file compile in dtc,
which regards duplicate node definitions as errors, and will be a
required fix for when Zephyr's dtlib does the same.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-09-21 07:55:40 -07:00
Martí Bolívar
22e8283992 dts: mec172x: pinctrl fixes
Two issues:

- The nsmi_gpio107 node is being defined twice with the same pinmux
  property value. This is an error when compiling the file with dtc.
  Zephyr's dtlib doesn't currently error out on this, but it will soon.

  Fix this by removing one of the redundant definitions.

- The eeprom_clk_gpio117 node label is referring to a node named
  gpspi_clk_gpio117, which is already defined in the same file, but
  with a different pinmux property value. This looks like a clear
  copy/paste error causing invalid pinmux settings for the
  gpspi_clk_gpio117 node.

  Fix it by aligning the node name with the node label to create
  a separate node with its own pinmux value.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-09-21 07:55:40 -07:00
Martí Bolívar
d23b3e81c2 boards: it8xxx2_evb: fix invalid DTS
The duplicated aliases node in this board's DTS file is an error when
compiling it with dtc. Zephyr's dtlib doesn't report the error yet,
but it will soon, so rearrange the alias definitions under a single
node. No functional changes expected.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-09-21 07:55:40 -07:00
Martí Bolívar
4d9fdc46a7 boards: hifive1: fix PWM pinctrl
A likely copy/paste error is making the pwm2_1_default pinmux setting
override the value for pwm1_1_default. Fix it.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-09-21 07:55:40 -07:00
Martí Bolívar
387b16a3a5 dts: nxp: rt11xx: fix lpuart12 base addresses
The correct address is 0x40c28000 on these SoCs.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-09-21 07:55:40 -07:00
Gerard Marull-Paretas
695313cfc6 maintainers: split documentation area
By including `doc/` under the "Documentation" area we put documentation
content and infrastucture in the same basket, however, people
maintaining infrastructure is often not interested in reviewing
documentation content. This patch creates a new "Documentation
Infrastructure" area and limits its scope to infrastructure-only files
(CMake, Sphinx, extensions, etc.). I've assigned myself as a maintainer
as I've been working on such areas for a long time now. @utzig removed
from the list of collaborators as it is no longer active in this area.
Core documentation, e.g. getting started, contribute, etc. is kept under
the "Documentation" area.

Subsystem specific documentation folders/files should be added in the
respective areas (many already do).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-21 16:43:04 +02:00
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
Aleksander Wasaznik
a8f12ab690 Bluetooth: Host: Name enum bt_keys_type
Name annonymous enum with `BT_KEYS_` as `bt_keys_type`.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2022-09-20 08:22:06 +00:00
Yinfang Wang
9b9b1af722 MAINTAINERS: Add yinfangw as collaborator
Add myself as collaborator for power management.

Signed-off-by: Yinfang Wang <yinfang.wang@intel.com>
2022-09-20 08:20:55 +00:00
Seppo Takalo
c93b4cf307 libc: newlib: Call gettimeofday() also when CONFIG_POSIX_CLOCK
When CONFIG_POSIX_CLOCK is enabled, we should have implementation
of gettimeofday() and therefore time(NULL) should return correct
time, instead of -1.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2022-09-20 08:19:23 +00:00
Emilio Benavente
e23a9e355a dts: bindings: fixed pinctrl binding description for nxp mcux rt-iocon
The FULLDRIVE description on the rt-iocon yaml file was
describing the slew rate and not the FULLDRIVE property.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2022-09-20 08:17:17 +00:00
Ettore Chimenti
96362d5a12 dts: arm: stm32f303: add uart5 node
Add missing UART5 node to STM32F303 chip family DTSI.

Signed-off-by: Ettore Chimenti <ettore.chimenti@seco.com>
2022-09-20 08:10:30 +00:00
Mariusz Skamra
bc2414e094 Bluetooth: audio: ascs: Fix crash on source QoS config
This fixes crash that happened during source ASE QoS by setting
the tx path that was left uninitialized.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-09-20 09:40:17 +02:00
Aleksander Wasaznik
5aa961d895 Bluetooth: Fix doc typo: BT_LE_ADDR_ANY -> BT_ADDR_LE_ANY
Fix the typo BT_LE_ADDR_ANY. Also use `@ref`.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2022-09-20 09:39:54 +02:00
Nicolas Pitre
1c857f37da riscv: pmp: fix SMP build with assertion enabled
Fix SMP build with assertion enabled.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2022-09-20 09:39:35 +02:00
Steven Slupsky
32f4f8d987 drivers: usb: usb_dc_sam0: fix memory leak
The usb_dc_sam0 driver is leaking memory when the usb device is detached
using usb_disable().

When a device is detached, the driver does not reliably deallocate the
descriptor bank memory. Therefore, upon the next attach and configure,
another block of memory is allocated. After several connect /
disconnect sequences, the usb interface becomes unresponsive.

This commit adds a static function to release all memory allocated
to the ep descriptors when usb_dc_detach() is called.  Since detach is
called from usb_disable(), this releases the memory when the
interface is disabled.

Avoid calling k_free() if buffer pointer is already
set to NULL.

Fixes #49177

Signed-off-by: Steven Slupsky <sslupsky@gmail.com>
2022-09-19 15:20:53 -05:00
Fabio Baltieri
7c231e3e27 tests: work_queue: initialize msg
Make sure msg is initialized before being used, fixes compiler warning:

  main.c:735:9: error: 'msg' may be used uninitialized

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-19 19:15:59 +00:00
Thomas Stranger
932020d700 boards: remove pinmux as supported feature
The tag that marks pinmux as supported is not used by any test or
sample, therefore this doesn't seem needed anymore.

- remove from 3 mec1x boards, they still use pinmux,
  but as the tag is neither used in tests and pinmux
  deprecated anyway no need for it.
- remove from 5 esp32 boards, as they now use pinctrl.
- remove from 2 lpc boards, as they now use pinctrl.
- remove from 1 stm32 board, as it now uses pinctrl.
- remove from 1 npcx board, as it now uses pinctrl.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-09-19 13:54:48 -05:00
Sylvio Alves
7891bed6e7 tests: counter: add esp32 test case
Adds only ESP32 board test case.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-09-19 18:37:28 +02:00
Sylvio Alves
e4969ec52e drivers: esp32: add check for absolute alarm configuration
ESP32 counter based on Timer or RTC misses the
COUNTER_ALARM_CFG_ABSOLUTE flag check.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-09-19 18:37:28 +02:00
Andrzej Puzdrowski
e8954e6c11 dfu/mcuboot: removes BOOT_MAX_ALIGN and BOOT_MAGIC_SZ
Mcuboot bootutil_public.h provides original definition.
Thanks to previous commit there is no need to copy then any
more.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-09-19 18:36:37 +02:00
Andrzej Puzdrowski
8d4d827a94 mgmt/mcumgr: include bootutil_public.h in im_mgmt
This header provides original BOOT_MAX_ALIGN definition.
This definition is used indirectly by the code this
patch modifies.
Let's use it instead of copy from mcuboot.h

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-09-19 18:36:37 +02:00
Andrzej Puzdrowski
1e7b120606 dfu: include MCUboot's bootutil_public.h
This header provides original BOOT_MAX_ALIGN definition.
This definition is used directly on indirectly by the code this
patch modifies.
Let's use it instead of copy from mcuboot.h

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-09-19 18:36:37 +02:00
Andrzej Puzdrowski
997bebf9d1 include/dfu/mcuboot: BOOT_MAX_ALIGN defined conditionally
BOOT_MAX_ALIGN	is originally provided in bootutil_public.h mcuboot's
header.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-09-19 18:36:37 +02:00
Fabio Baltieri
7f41f795ac board: icev_wireless: enable i2c
Enable the i2c0 node so that the corresponding driver gets compiled.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-19 16:35:51 +00:00
Fabio Baltieri
2db0bd73e8 board: esp32c3: drop sda-gpios and scl-gpios i2c properties
Drop scl and sda gpio properties from two esp32c3 boards. According to
the dts description these are not required, and the corresponding driver
has an explicit check to fail the build if these are defined when the
platform has SOC_I2C_SUPPORT_HW_CLR_BUS defined.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-19 16:35:51 +00:00
Wolfgang Puffitsch
06e7751303 Bluetooth: controller: Fix error codes for accept/reject CIS request
The LE Accept/Reject CIS Request commands shall return Unknown
Connection Identifier if the handle is not a CIS handle or does not
exist. If the CIS already has been established, the commands shall
return Command Disallowed.

Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
2022-09-19 18:34:41 +02:00
Emil Gydesen
927df43092 Bluetooth: Audio: Fix bad BASE config check for broadcast sink
The broadcast sink did not allow codec config data to exist
in both the subgroup and in the individual BISes, which
not only doesn't make sense to not allow, but would
also cause interoperability issues.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-09-19 18:34:25 +02:00
Dominik Ermel
4b01c733bb mgmt/mcumgr: Make img_mgmt_erase construct only good response
Constructing error response makes no sense as smp_build_err_rsp
will rewrite it.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-19 18:30:57 +02:00
Dominik Ermel
c19aac161e mgmt/mcumgr: Remove mgmt_write_rsp_status function
It is no longer used.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-19 18:30:16 +02:00
Dominik Ermel
1cd03dee96 mgmt/mcumgr: Fix CONFIG_MGMT_VERBOSE_ERR_RESPONSE
The options should enable verbose responses in error responses
to SMP command processing, but has been broen when the code
has been ported to zcbor.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-19 18:30:16 +02:00
Vinayak Kariappa Chettimada
d7b183d1da Bluetooth: Controller: Fix incorrect data type use
Fix incorrect data type int32_t local variable used for lazy
value which is uint16_t type.

Other minor code refactor done.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-19 18:27:38 +02:00
Aymeric Aillet
a47633bc91 doc: release: 3.2: Add new Renesas smartbond support
New Renesas Smartbond da1469x SoC series
New da1469x_dk_pro board
Flash, GPIO, Pinctrl and Serial driver

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2022-09-19 18:23:35 +02:00
Aymeric Aillet
95cc98dbfe doc: release: 3.2: Add new R-Car platform drivers
Added PWM support for Renesas R-Car platform.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2022-09-19 18:23:35 +02:00
Andrei Emeltchenko
beeecfdebf doc: Remove double code block anchor
Make code look consistent with other code blocks and remove
double block anchor. Leave code-block to have proper syntax
highlighting.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-09-19 18:23:17 +02:00
Vinayak Kariappa Chettimada
e8d1ed5d0d Bluetooth: Controller: Fix missing TICKER_SLOT_AGNOSTIC cond. compile
Fix missing conditional compile of structure members not
required with BT_TICKER_SLOT_AGNOSTIC is enabled.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-19 18:18:12 +02:00
Martí Bolívar
88ef844bd8 doc: dts: fix reference table of contents generation
Commit 6e9a43be79 ("doc: move DTS under Build/Configuration systems
section") made it so that the internal organization of the API
reference page is no longer visible to users. This means users have to
scroll around looking for macros they need, instead of being able to
look for a section that looks relevant and reading just that.

Fix it by restoring the independent toctree for DT reference material
with an appropriate maxdepth, and adding a local table of contents in
the reference page.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-09-19 18:15:43 +02:00
Vinayak Kariappa Chettimada
6843eef4cf samples: Bluetooth: Fix broadcast and receive to wait for all channels
Fix the iso_broadcast and iso_receive sample to wait on
semaphore for all channel establishment and all channel
terminate callbacks to be invoked.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-19 18:11:40 +02:00
Vinayak Kariappa Chettimada
3559abed4d samples: Bluetooth: iso_broadcast increase Tx buffers
Increase the ISO Tx Buffers to avoid throttling of ISO data
transmission when using 2 Broadcast ISO streams.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-19 18:11:40 +02:00
Vinayak Kariappa Chettimada
336013fe34 Bluetooth: Controller: Add 'U' to unsigned variable assignments
Add 'U' to a value when assigning it to an unsigned
variable.
MISRA-C rule 7.2

Relates to commit b97db52de7 ("misra-c: Add 'U' to
unsigned variable assignments in subsys/").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-19 18:11:40 +02:00
Vinayak Kariappa Chettimada
da2b1b615c Bluetooth: Controller: Fix incorrect use of stream instead of bis
Fix incorrect use of stream index (application selected list
of BIS stream) instead of BIS index when checking for
whether the received PDU is to be stored and to be
dispatched as ISO data to ULL.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-19 18:11:40 +02:00
Vinayak Kariappa Chettimada
be7a9ade7d Bluetooth: Controller: Fix missing terminate reason initialization
Fix missing Broadcast ISO Synchronized Receiver terminate
reason initialization that caused Sync Lost immediately on
a new Sync Establishment due to previous Sync terminate
reason not being reset.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-19 18:11:40 +02:00
Vinayak Kariappa Chettimada
dfa3d959e0 Bluetooth: Controller: Initialize invalid ISO data packet
Initialize the invalid ISO data packet generated by LLL.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-19 18:11:40 +02:00
Vinayak Kariappa Chettimada
75346a47f9 Bluetooth: Controller: Fix Rx chan idx when skipping BIS subevents
Fix missing implementation to correctly to use data channel
index for subevents when previous subevent of previous BIS
stream where skipped.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-19 18:11:40 +02:00
Vinayak Kariappa Chettimada
3c92b25234 Bluetooth: Controller: Fix ISO broadcast to flush and ack for all BIS
Fix ISO broadcast implementation to flush stale ISO data for
all BIS streams and like wise generate acknowledgements for
all BIS streams that had its ISO data transmitted at its
reference anchor points.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-19 18:11:40 +02:00
Vinayak Kariappa Chettimada
c8f5fbcf8d Bluetooth: Controller: Restrict maximum Pre-Transmissions to 1
Restrict the calculated possible Pre-Transmission subevents
count to a maximum of 1 so that the full ISO interval is
not fully occupied by the BIG event.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-19 18:11:40 +02:00
Vinayak Kariappa Chettimada
eff946a9ad Bluetooth: Controller: Fix leak in Num Completed Packets
Fix a leak in generation of Number of Completed Packets when
more than one handle has acknowledgements to be processed.

The loop exited for the current handle by dequeueing the
node tx element of the next handle leading to lost Number of
Completed Packets.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-19 18:11:40 +02:00
Derek Snell
f6cb8fe296 boards: doc: Update NXP boards docs with references to superset boards
Detail which NXP boards are superset boards.  Other boards will link to
their closest superset boards.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2022-09-19 11:05:55 -05:00
Vinayak Kariappa Chettimada
f11fe69450 Bluetooth: Controller: Fix missing supervision/sync lost
When radio event prepare is cancelled due to preemption by
overlapping radio events, the extra done event processing
was missing and hence the use of accumulated prepares'
skip/latency count.
This caused the check for supervision timeout and sync
lost not be aware of the elapsed events.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-19 18:02:28 +02:00
Vinayak Kariappa Chettimada
38905eb0ab Bluetooth: Controller: Add 'U' to unsigned variable assignments
Add 'U' to a value when assigning it to an unsigned
variable.
MISRA-C rule 7.2

Relates to commit b97db52de7 ("misra-c: Add 'U' to
unsigned variable assignments in subsys/").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-19 18:02:28 +02:00
Krzysztof Chruscinski
0cf220166d doc: release_notes: Notes for cbprintf and logging
Added section about cbprintf and logging.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-09-19 11:02:04 -05:00
Vinayak Kariappa Chettimada
0feb34363f Bluetooth: Controller: Add missing margin to BIG ticks_anchor
Add the missing ticker resolution margin when calculating
the ticks_anchor to be used to get non-overlapping BIG
events.

Relates to commit fab4511164 ("Bluetooth: Controller: Fix
overlapping advertising events").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-19 17:55:56 +02:00
Ryan Erickson
f8be736f2c boards: bl5340_dvk: fix gpio config
If GPIO is enabled, enable I2C by default because
the BL5340 DVK uses an I2C GPIO expander.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-09-19 15:18:11 +00:00
Krzysztof Chruscinski
4ece3406f5 logging: Add log_output dependency to mipi syst
Add missing dependency since log_output_syst.c is calling functions
from log_output module.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-09-19 14:15:17 +00:00
Nilson Oliveira
31fd4a63e4 boards: arm: rak4631_nrf52840: sx1262 dio1-gpios setup change
This commit fixes persistent tx timeout on loramac as described on
issue #49047 due to an invertion on gpio active state;

Signed-off-by: Nilson Oliveira <nilsonmont.o@gmail.com>
2022-09-19 15:48:10 +02:00
Yong Cong Sin
15b3150ac2 mgmt/hawkbit: Print hrefs only if there's an update
If the is no update from the server, the _links will be NULL.
Check if it is NULL before trying to LOG these strings.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2022-09-19 15:43:04 +02:00
Andrzej Głąbek
6d8172f4e9 drivers: pinctrl_nrf: Configure QSPI CSN pin as output set high
... so that the pin keeps the inactive state of the CSN line when it is
not controlled by the QSPI peripheral and the driver is not suspended.

Currently, the nrf_qspi_nor shim deinitializes the nrfx_qspi driver
after each operation, what leaves the pin uncontrolled until a new
operation is requested (and the nrfx_qspi driver is initialized again)
or the driver is suspended (and the pin is put into low-power state).
This can cause the flash chip to needlessly consume current when there
is no pull-up resistor on its CSN line and the line appears active.
Prevent this by keeping the pin in a defined (inactive) state.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-09-19 15:30:02 +02:00
Kamil Krzyżanowski
acd847c527 doc: smf: Fix SMF state machine creation example
The example further down works, but the first examples
have invalid syntax for initializing the state array.

Signed-off-by: Kamil Krzyżanowski <kamnxt@kamnxt.com>
2022-09-19 15:24:32 +02:00
Andrzej Głąbek
3a6584b0ae drivers: i2c_nrfx_twim: Fix compilation with disabled PINCTRL
This is a follow-up to commits 9974bb043f
and 00ecc66677.

Add one missing `#ifdef CONFIG_PINCTRL` and remove a no longer needed
one to restore the possibility to use this driver without PINCTRL.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-09-19 12:52:16 +02:00
Jamie McCrae
52e2493842 mgmt: mcumgr: fs_mgmt: hash/checksum: Fix size errors
There are warnings when building fs_mgmt with hash/checksum
functionality enabled due to array access and a wrong variable type
being used.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-09-19 10:50:42 +00:00
Jarno Lämsä
05b17356e2 net: lib: lwm2m: Fix lwm2m exec
The lwm2m exec erroneously checked the previous return value
instead of checking if the resource existed. This caused exec
to try to get and execute the execute callback from NULL and caused
a reboot.

Signed-off-by: Jarno Lämsä <jarno.lamsa@nordicsemi.no>
2022-09-19 10:33:04 +00:00
Artur Hadasz
2314d971e7 modules: hal_nordic: nrf_802154 serialization race condition fix
Fixed a race condition resulting in a serialization error.

Signed-off-by: Artur Hadasz <artur.hadasz@nordicsemi.no>
2022-09-19 10:31:50 +00:00
Krzysztof Chruscinski
9a971de18c doc: logging: Update documentation about limitations
Add link to cbprintf limitations and recommendations.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-09-19 10:14:23 +00:00
Krzysztof Chruscinski
b097f5c5f8 logging: Use new cbprintf check for pointers
Cbprintf has new feature where it can distinguish between
character pointers used for %p and %s. It is enabled by
flag CBPRINTF_PACKAGE_CONVERT_PTR_CHECK.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-09-19 10:14:23 +00:00
Krzysztof Chruscinski
f40c2b9550 doc: formatted_output: cbprintf: Align to new features
Align documentation with current set of supported features. Mainly,
it mentions a static packaging limitation and how to handle that.

Added section which summarizes limitations and recommendations.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-09-19 10:14:23 +00:00
Krzysztof Chruscinski
a7224830ce lib: os: cbprintf: Mechanism for detecting %p in static package
Static packaging is using only argument types to build a package. There
is one case where analysing argument type only is not enough to
determine package content. That is %p with (unsigned) char pointer vs
%s. In case of %s a string might need to be appended to the package
and in case of %p it must be avoided. Format string analysis is required
to distinguish those two cases.
In order to speed up the runtime inspection, additional information is
added to a static package. That is index of the string argument (where
first argument has index 0). This information allows quick format string
inspection where nth format specifier is found and checked if it is a
pointer format specifier.
Inspection algorithm is added to cbprintf_package_convert() and if %p
is found then data for that argument is discarded. Additionally, log
warning is printed with suggestion to cast pointer argument to void *
to avoid confusion. It is desired to get rid of this ambiguity because
there are going to be logging configurations where strings are stripped
from a binary and runtime inspection cannot be performed.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-09-19 10:14:23 +00:00
Krzysztof Chruscinski
bd51d0ed20 lib: os: cbprintf: Interpret unsigned char pointer as string
Static packaging is analyzing string argument type and based
on that builds a package. The most tricky one are pointers
which can be used for %s or %p. %s are strings which may be
transient and must be appended to the package to allow string
formatting from that package when original transient string
location is lost.
It is allowed (gcc printflike extension does not complain) to
using unsigned char for %s. So far static packaging allowed
only char or wchar_t pointers. Extending detection to unsigned
char as well.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-09-19 10:14:23 +00:00
Krzysztof Chruscinski
50d9c27990 tests: logging: log_stack: Adjust stack usage for x86
x86 deferred mode is failing. Adjust threshold values.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-09-19 10:14:23 +00:00
Krzysztof Chruscinski
b7b748b06d tests: unit: cbprintf: Disable logging
Force logging disable in the test.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-09-19 10:14:23 +00:00
Emilio Benavente
0eec3ed633 boards: arm: lpcxpresso55s36: Added Docs for FlexPWM
Documented the FlexPWM pins and show support's enabled.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2022-09-19 10:10:32 +00:00
Emilio Benavente
6b4a36f503 boards: arm: lpcxpresso55s36: Added FlexPWM Support
Added the pinmux and pinctrl support for FlexPWM on the LPC55s36 board.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2022-09-19 10:10:32 +00:00
Emilio Benavente
2f149fb653 soc: arm: nxp: lpc55xxx: Added FlexPWM to the SOC Kconfig
Added MCUX_PWM Kconfig dependency;
Added missing pin function definition needed for PWM;
Enabled submodule clocks for FlexPWM

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2022-09-19 10:10:32 +00:00
Emilio Benavente
40af5bf133 dts: arm: nxp: lpc: Added PWM to the peripheral node
The LPC55s3x SOC comes with 2 FlexPWM peripherals each with 4 Sub-Modules.
Each Sub-Modules has 2 channels A && B.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2022-09-19 10:10:32 +00:00
Gerard Marull-Paretas
f1a8d0bcbb doc: doxygen: fix Kconfig alias when using HTML output
The kconfig Doxygen alias needs to work for both, HTML and XML output
(used later by Sphinx). This patch modifies the alias so that it outputs
plain HTML for the HTML output and Sphinx roles for the XML output.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-19 10:02:48 +00:00
Henrik Brix Andersen
af88b960ff doc: release-notes: add CAN release notes for v3.2.0
Add CAN related release notes for Zephyr v3.2.0.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-19 10:00:16 +00:00
Henrik Brix Andersen
e61aec3e4c doc: release-notes: add EEPROM release notes for v3.2.0
Add EEPROM related release notes for Zephyr v3.2.0.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-19 09:47:05 +00:00
Enjia Mai
4c9faf95ef tests: driver: gpio: fix the incorrect testsuite names
There are some erros in previous ztest API migration of
the gpio_basic_api tests. Fix the incorrect testsuite
name of the callback mgmt and vari tests.

Fixes: #49953

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-09-19 09:34:36 +00:00
Pirun Lee
5b8b5b86db sample: ots: comply to coding guidelines MISRA C:2012 Rule 14.4
The controlling expression of an if statement
and the controlling expression of an iteration-statement shall have
essentially Boolean type.

Signed-off-by: Pirun Lee <pirun.lee@nordicsemi.no>
2022-09-19 10:57:10 +02:00
Pirun Lee
f6df36b148 Bluetooth: ots: fix sample data operation error
Peripheral: Fix wrong objects index
Central: Fix client not working after re-connect.
         Check object properties before read/write.

Signed-off-by: Pirun Lee <pirun.lee@nordicsemi.no>
2022-09-19 10:57:10 +02:00
Pirun Lee
8e0f003112 Bluetooth: OTS - Object Write check parameter properly
Check sum of len and offset with properties.
Check offset with obj cur size.

Signed-off-by: Pirun Lee <pirun.lee@nordicsemi.no>
2022-09-19 10:57:10 +02:00
Andy Ross
8ac135d7a9 tests/kernel/smp: Correct parameter name
The k_sys_fatal_error_handler() function is declared in zephyr/fatal.h
with a name of "esf" for the second parameter, not "pEsf".  For
unknown reasons, this is showing up in CI as a documentation
generation failure pointing at the (correct) header.

Still, no reason not to synchronize.

Signed-off-by: Andy Ross <andyross@google.com>
2022-09-19 09:19:02 +02:00
Andy Ross
358355a23d tests/kernel/smp: Fix cases for !SCHED_IPI_SUPPORTED
Obviously the test of the feature won't work if we don't have an IPI.
And there were two threads that spawned threads that enter busy loops,
expecting to be able to abort them from another CPU.  That doesn't
work[1] without an IPI.  Just skip these cases rather than trying to
kludge up some kind of abort signal.

[1] Rather, it does work, it just takes infinite time for these
    particular test cases.  Eventually the CPU would be expected to
    receive some other interrupt like a timeout, which would work to
    abort the running thread.  But no such timer was registered.

Signed-off-by: Andy Ross <andyross@google.com>
2022-09-19 09:19:02 +02:00
Andy Ross
0ca7150f90 kernel/idle: Fix !SCHED_IPI_SUPPORTED
The requirement for k_yield() to handle "yielding" in the idle thread
was removed a while back, but it missed a spot where we'd try to yield
in the fallback loop on bringup platforms that lack an IPI.  This now
crashes, because yield now unconditionally tries to reschedule the
current thread, which doesn't work for idle threads that don't live in
the run queue.

Just make it a busy loop calling swap(), even simpler.

Fixes #50119

Signed-off-by: Andy Ross <andyross@google.com>
2022-09-19 09:19:02 +02:00
Enjia Mai
d9206aa29b arch: arm: userspace: fix the incorrect ssf under bad syscall
The parameter ssf of the handler_bad_syscall got null pointer
due to that the R1 does not push into the stack in a right
order on cortex-M0. Adjust the pushing order of stack to make
the ssf being passed correctly.

Fixes #50146.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-09-19 09:17:26 +02:00
551 changed files with 27977 additions and 5066 deletions

View File

@@ -17,8 +17,9 @@ with the lowest [GitHub Permission Level] of Read. For example, Contributors
with Read permission do not have the permission to add reviewers to a pull
request.
Use this template to nominate a GitHub user for an elevated permission level in
the Contributor role.
Use this template to nominate a GitHub user for the Contributor role with
Triage permission level, which allows the user to add reviewers to a pull
request and be added as a reviewer by other users.
# Nomination
@@ -38,4 +39,4 @@ Zephyr project.
[TSC Project Roles]: <https://docs.zephyrproject.org/latest/project/project_roles.html>
[GitHub Permission Level]: <https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization>
[GitHub Permission Level]: <https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization>

View File

@@ -249,11 +249,12 @@
/drivers/dai/intel/dmic/ @marcinszkudlinski @abonislawski
/drivers/dai/intel/alh/ @abonislawski
/drivers/dma/*dw* @tbursztyka
/drivers/dma/*dw_common* @abonislawski
/drivers/dma/*sam0* @Sizurka
/drivers/dma/dma_stm32* @cybertale @lowlander
/drivers/dma/*pl330* @raveenp
/drivers/dma/*iproc_pax* @raveenp
/drivers/dma/*intel_adsp* @teburd
/drivers/dma/*intel_adsp* @teburd @abonislawski
/drivers/ec_host_cmd_periph/ @jettr
/drivers/edac/ @finikorg
/drivers/eeprom/ @henrikbrixandersen
@@ -592,7 +593,7 @@
/include/zephyr/arch/sparc/ @julius-barendt
/include/zephyr/sys/atomic.h @andyross
/include/zephyr/bluetooth/ @alwa-nordic @jhedberg @Vudentz @sjanc
/include/zephyr/bluetooth/audio/ @jhedberg @Vudentz @Thalley @asbjornsabo
/include/zephyr/bluetooth/audio/ @jhedberg @Vudentz @Thalley
/include/zephyr/cache.h @carlocaione @andyross
/include/zephyr/canbus/ @alexanderwachter @henrikbrixandersen
/include/zephyr/tracing/ @nashif
@@ -740,7 +741,7 @@ scripts/build/gen_image_info.py @tejlmand
/share/zephyr-package/ @tejlmand
/share/zephyrunittest-package/ @tejlmand
/subsys/bluetooth/ @alwa-nordic @jhedberg @Vudentz
/subsys/bluetooth/audio/ @jhedberg @Vudentz @Thalley @asbjornsabo @sjanc
/subsys/bluetooth/audio/ @jhedberg @Vudentz @Thalley @sjanc
/subsys/bluetooth/controller/ @carlescufi @cvinayak @thoh-ot @kruithofa
/subsys/bluetooth/host/ @alwa-nordic @jhedberg @Vudentz @sjanc
/subsys/bluetooth/mesh/ @jhedberg @PavelVPV @Vudentz @LingaoM
@@ -806,7 +807,7 @@ scripts/build/gen_image_info.py @tejlmand
/tests/bluetooth/ @alwa-nordic @jhedberg @Vudentz @sjanc
/tests/bluetooth/controller/ @cvinayak @thoh-ot @kruithofa @erbr-ot @sjanc @ppryga
/tests/bluetooth/bsim_bt/ @alwa-nordic @jhedberg @Vudentz @wopu-ot
/tests/bluetooth/bsim_bt/bsim_test_audio/ @jhedberg @Vudentz @wopu-ot @Thalley @asbjornsabo
/tests/bluetooth/bsim_bt/bsim_test_audio/ @jhedberg @Vudentz @wopu-ot @Thalley
/tests/bluetooth/tester/ @alwa-nordic @jhedberg @Vudentz @sjanc
/tests/posix/ @pfalcon
/tests/crypto/ @ceolin

View File

@@ -241,7 +241,6 @@ Bluetooth Audio:
status: maintained
maintainers:
- Thalley
- asbjornsabo
collaborators:
- Vudentz
- jhedberg
@@ -249,6 +248,7 @@ Bluetooth Audio:
- MariuszSkamra
- rymanluk
- sjanc
- asbjornsabo
files:
- subsys/bluetooth/audio/
- include/zephyr/bluetooth/audio/
@@ -412,11 +412,9 @@ Devicetree:
status: maintained
maintainers:
- mbolivar-nordic
collaborators:
- galak
files:
- scripts/dts/
- dts/bindings/
- dts/common/
- tests/lib/devicetree/
- doc/build/dts/
@@ -425,6 +423,15 @@ Devicetree:
labels:
- "area: Devicetree"
Devicetree Bindings:
status: maintained
maintainers:
- galak
files:
- dts/bindings/
labels:
- "area: Devicetree Binding"
Disk:
status: maintained
maintainers:
@@ -464,19 +471,33 @@ Documentation:
- carlescufi
collaborators:
- nashif
- utzig
- gmarull
files:
- doc/
- doc/_static/
- doc/_templates/
- doc/_doxygen/
- doc/_scripts/
- doc/contribute/
- doc/develop/
- doc/introduction/
- doc/project/
- doc/releases/
- doc/security/
- README.rst
- doc/Makefile
labels:
- "area: Documentation"
Documentation Infrastructure:
status: maintained
maintainers:
- gmarull
collaborators:
- carlescufi
- nashif
files:
- doc/_*/
- doc/CMakeLists.txt
- doc/conf.py
- doc/Makefile
- doc/zephyr.doxyfile.in
labels:
- "area: Documentation Infrastructure"
"Drivers: ADC":
status: maintained
maintainers:
@@ -1548,6 +1569,7 @@ Power management:
- mengxianglinx
- gmarull
- teburd
- yinfangw
files:
- include/zephyr/pm/
- samples/subsys/pm/
@@ -1559,11 +1581,10 @@ Power management:
RISCV arch:
status: maintained
maintainers:
- fkokosinski
- kgugala
- pgielda
- tgorochowik
collaborators:
- fkokosinski
- mgielda
- katsuster
- edersondisouza
@@ -2296,6 +2317,14 @@ West:
labels:
- manifest-hal_quicklogic
"West project: hal_renesas":
status: maintained
maintainers:
- andrzej-kaczmarek
files: []
labels:
- manifest-hal_renesas
"West project: hal_rpi_pico":
status: maintained
maintainers:
@@ -2357,6 +2386,15 @@ West:
labels:
- manifest-hal_ti
"West project: hal_wurthelektronik":
status: maintained
maintainers:
- mah-eiSmart
files:
- modules/Kconfig.wurthelektronik
labels:
- manifest-hal_wurthelektronik
"West project: hal_xtensa":
status: maintained
maintainers:

View File

@@ -2,4 +2,4 @@ VERSION_MAJOR = 3
VERSION_MINOR = 2
PATCHLEVEL = 0
VERSION_TWEAK = 0
EXTRAVERSION = rc2
EXTRAVERSION =

View File

@@ -50,7 +50,7 @@ void arch_start_cpu(int cpu_num, k_thread_stack_t *stack, int sz,
* arc_cpu_wake_flag will protect arc_cpu_sp that
* only one slave cpu can read it per time
*/
arc_cpu_sp = Z_THREAD_STACK_BUFFER(stack) + sz;
arc_cpu_sp = Z_KERNEL_STACK_BUFFER(stack) + sz;
arc_cpu_wake_flag = cpu_num;

View File

@@ -410,9 +410,9 @@ SECTION_FUNC(TEXT, z_arm_do_syscall)
/* BAD SYSCALL path */
/* fixup stack frame on the privileged stack, adding ssf */
mov r1, sp
push {r4,r5}
/* ssf is present in r1 (sp) */
push {r1,lr}
push {r4,r5}
/* restore r0, r1 */
mov r0, ip
mov r1, lr

View File

@@ -44,4 +44,13 @@ endif ()
zephyr_cc_option_ifdef(CONFIG_USERSPACE -mno-outline-atomics)
# GCC may generate ldp/stp instructions with the Advanced SIMD Qn registers for
# consecutive 32-byte loads and stores. Saving and restoring the Advanced SIMD
# context is very expensive, and it is preferable to keep it turned off by not
# emitting these instructions for better context switching performance.
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
zephyr_cc_option(-moverride=tune=no_ldp_stp_qregs)
endif()
add_subdirectory_ifdef(CONFIG_SOC_XENVM xen)

View File

@@ -133,7 +133,7 @@ config RISCV_PMP
select THREAD_STACK_INFO
select CPU_HAS_MPU
select ARCH_HAS_USERSPACE
select ARCH_HAS_STACK_PROTECTION
select ARCH_HAS_STACK_PROTECTION if !STACK_SENTINEL
select MPU
select SRAM_REGION_PERMISSIONS
select ARCH_MEM_DOMAIN_SYNCHRONOUS_API if USERSPACE

View File

@@ -319,9 +319,10 @@ void z_riscv_pmp_init(void)
#ifdef CONFIG_PMP_STACK_GUARD
/*
* Set the stack guard for this CPU's IRQ stack by making the bottom
* addresses inaccessible. This will never change so we do it here.
* addresses inaccessible. This will never change so we do it here
* and lock it too.
*/
set_pmp_entry(&index, PMP_NONE,
set_pmp_entry(&index, PMP_NONE | PMP_L,
(uintptr_t)z_interrupt_stacks[_current_cpu->id],
Z_RISCV_STACK_GUARD_SIZE,
pmp_addr, pmp_cfg, ARRAY_SIZE(pmp_addr));
@@ -330,11 +331,20 @@ void z_riscv_pmp_init(void)
write_pmp_entries(0, index, true, pmp_addr, pmp_cfg, ARRAY_SIZE(pmp_addr));
#ifdef CONFIG_SMP
#ifdef CONFIG_PMP_STACK_GUARD
/*
* The IRQ stack guard area is different for each CPU.
* Make sure TOR entry sharing won't be attempted with it by
* remembering a bogus address for those entries.
*/
pmp_addr[index - 1] = -1L;
#endif
/* Make sure secondary CPUs produced the same values */
if (global_pmp_end_index != 0) {
__ASSERT(global_pmp_end_index == index, "");
__ASSERT(global_pmp_cfg[0] == pmp_cfg[0], "");
__ASSERT(global_pmp_last_addr == pmp_addr[index - 1]);
__ASSERT(global_pmp_last_addr == pmp_addr[index - 1], "");
}
#endif

View File

@@ -8,6 +8,7 @@
#include <zephyr/toolchain.h>
#include <zephyr/linker/sections.h>
#include <zephyr/arch/cpu.h>
#include <offsets.h>
#include "asm_macros.inc"
/* exports */
@@ -66,7 +67,7 @@ boot_first_core:
#ifdef CONFIG_INIT_STACKS
/* Pre-populate all bytes in z_interrupt_stacks with 0xAA */
la t0, z_interrupt_stacks
li t1, CONFIG_ISR_STACK_SIZE
li t1, __z_interrupt_stack_SIZEOF
add t1, t1, t0
/* Populate z_interrupt_stacks with 0xaaaaaaaa */
@@ -79,10 +80,10 @@ aa_loop:
/*
* Initially, setup stack pointer to
* z_interrupt_stacks + CONFIG_ISR_STACK_SIZE
* z_interrupt_stacks + __z_interrupt_stack_SIZEOF
*/
la sp, z_interrupt_stacks
li t0, CONFIG_ISR_STACK_SIZE
li t0, __z_interrupt_stack_SIZEOF
add sp, sp, t0
#ifdef CONFIG_WDOG_INIT

View File

@@ -22,7 +22,7 @@ void arch_start_cpu(int cpu_num, k_thread_stack_t *stack, int sz,
riscv_cpu_init[cpu_num].fn = fn;
riscv_cpu_init[cpu_num].arg = arg;
riscv_cpu_sp = Z_THREAD_STACK_BUFFER(stack) + sz;
riscv_cpu_sp = Z_KERNEL_STACK_BUFFER(stack) + sz;
riscv_cpu_wake_flag = cpu_num;
while (riscv_cpu_wake_flag != 0U) {

View File

@@ -137,8 +137,7 @@ endif # CPU_HAS_FPU
config X86_FP_USE_SOFT_FLOAT
bool
prompt "Use Software Floating Point Operations" if !(NEWLIB_LIBC && !FPU)
default y if NEWLIB_LIBC && !FPU
default y if !FPU
help
Enable using software floating point operations.

View File

@@ -310,8 +310,8 @@ Release Notes
The following is a list of TODO items:
* :jira:`GH-2647`: Zephyr needs i-cache API (all targets)
* :jira:`GH-2230`: Zephyr ARC port doesn't yet support nested regular interrupts.
* ``GH-2647``: Zephyr needs i-cache API (all targets)
* ``GH-2230``: Zephyr ARC port doesn't yet support nested regular interrupts.
* pinmux driver: Possibly it can be written to configure PMods too.
References

View File

@@ -45,7 +45,7 @@ The following table shows the hardware features supported for different core con
+-----------+-----+-----+------+------+----------+------+-------+
For hardware feature details, refer to : `ARC EM Software Development Platform
<https://embarc.org/embarc_osp/doc/build/html/board/emsdp.html>`__
<https://embarc.org/project/arc-em-software-development-platform-sdp/>`__
Programming and Debugging

View File

@@ -26,7 +26,7 @@ Hardware
********
For hardware feature details, refer to : `ARC IoT Development Kit
<http://embarc.org/embarc_osp/doc/build/html/board/iotdk.html>`__
<https://embarc.org/project/arc-iot-development-kit/>`__
Programming and Debugging

View File

@@ -1,6 +1,6 @@
identifier: nsim_em
name: EM Nsim simulator
type: mcu
type: sim
simulation: nsim
arch: arc
toolchain:

View File

@@ -1,6 +1,6 @@
identifier: nsim_em7d_v22
name: EM Nsim simulator
type: mcu
type: sim
simulation: nsim
arch: arc
toolchain:

View File

@@ -1,6 +1,6 @@
identifier: nsim_hs
name: HS nSIM simulator
type: mcu
type: sim
simulation: nsim
arch: arc
toolchain:

View File

@@ -1,6 +1,6 @@
identifier: nsim_hs5x
name: HS5x nSIM simulator
type: mcu
type: sim
simulation: nsim
arch: arc
toolchain:

View File

@@ -1,6 +1,6 @@
identifier: nsim_hs5x_smp
name: Multi-core HS5x nSIM simulator
type: mcu
type: sim
simulation: mdb-nsim
arch: arc
toolchain:

View File

@@ -1,6 +1,6 @@
identifier: nsim_hs6x
name: HS6x nSIM simulator
type: mcu
type: sim
simulation: nsim
arch: arc
toolchain:

View File

@@ -1,6 +1,6 @@
identifier: nsim_hs6x_smp
name: Multi-core HS6x nSIM simulator
type: mcu
type: sim
simulation: mdb-nsim
arch: arc
toolchain:

View File

@@ -1,6 +1,6 @@
identifier: nsim_hs_mpuv6
name: HS (with MPU v6) nSIM simulator
type: mcu
type: sim
simulation: nsim
arch: arc
toolchain:

View File

@@ -1,6 +1,6 @@
identifier: nsim_hs_smp
name: Multi-core HS nSIM simulator
type: mcu
type: sim
simulation: mdb-nsim
arch: arc
toolchain:

View File

@@ -1,6 +1,6 @@
identifier: nsim_sem
name: SEM Nsim simulator
type: mcu
type: sim
arch: arc
simulation: nsim
toolchain:

View File

@@ -1,6 +1,6 @@
identifier: nsim_sem_mpu_stack_guard
name: SEM Nsim simulator
type: mcu
type: sim
arch: arc
simulation: nsim
toolchain:

View File

@@ -99,4 +99,4 @@ References
**********
1.`Programmers Reference Manual for ARC HS
<https://www.synopsys.com/dw/doc.php/ds/cc/programmers-reference-manual-ARC-HS.pdf>`_
<https://www.synopsys.com/dw/doc.php/iip/dwc_arc_hs4xd/latest/doc/ARC_V2_PublicProgrammers_Reference.pdf>`_

View File

@@ -11,3 +11,4 @@ supported:
- gpio
- i2c
- eeprom
- lora

View File

@@ -127,10 +127,10 @@ References
.. target-notes::
.. _BLE:
https://store.arduino.cc/usa/nano-33-ble/
https://store.arduino.cc/products/arduino-nano-33-ble
.. _BLE SENSE:
https://store.arduino.cc/usa/nano-33-ble-sense/
https://store.arduino.cc/products/arduino-nano-33-ble-sense
.. _pinouts:
https://learn.adafruit.com/introducing-the-adafruit-nrf52840-feather/pinouts

View File

@@ -50,7 +50,7 @@
};
};
spi1_default: spi2_default {
spi1_default: spi1_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 11)>,
<NRF_PSEL(SPIM_MOSI, 0, 27)>,
@@ -58,7 +58,7 @@
};
};
spi1_sleep: spi2_sleep {
spi1_sleep: spi1_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 11)>,
<NRF_PSEL(SPIM_MOSI, 0, 27)>,

View File

@@ -137,7 +137,7 @@ References
https://docs.arduino.cc/resources/datasheets/ABX00050-datasheet.pdf
.. _full pinout:
https://docs.arduino.cc/static/60a076271ab009f7be1a7984fa14cf32/ABX00050-full-pinout.pdf
https://docs.arduino.cc/static/5eff7076d9a031ce823972d6f1faac4a/ABX00050-full-pinout.pdf
.. _schematics:
https://docs.arduino.cc/static/aa5abe05aeec6f8b5fe6f3f605a986b5/ABX00050-schematics.pdf

View File

@@ -16,7 +16,7 @@ supported:
- spi
- i2c
- gpio
- pinmux
- counter
- eeprom
- nvs
- lora

View File

@@ -276,14 +276,18 @@ Default settings are 115200 8N1.
Programming and Debugging
*************************
B_U585I_IOT02A Discovery kit includes an ST-LINK/V3 embedded debug tool interface.
This probe allows to flash the board using various tools.
Flashing
========
B_U585I_IOT02A Discovery kit includes an ST-LINK/V2-1 embedded debug tool interface.
This interface is supported by the openocd version included in Zephyr SDK.
Board is configured to be flashed using west STM32CubeProgrammer runner.
Installation of `STM32CubeProgrammer`_ is then required to flash the board.
Flashing an application to B_U585I_IOT02A Discovery kit
-------------------------------------------------------
Alternatively, openocd (provided in Zephyr SDK), JLink and pyocd can also be
used to flash and debug the board if west is told to use it as runner,
using ``-r openocd``.
Connect the B_U585I_IOT02A Discovery kit to your host computer using the USB
port, then run a serial host program to connect with your Discovery
@@ -310,32 +314,40 @@ You should see the following message on the console:
Debugging
=========
Debugging
=========
STM32U5 support is not currently supported in openocd. As a temporary workaround,
user can use `STMicroelectronics customized version of OpenOCD`_ to debug the
the B_U585I_IOT02A Discovery kit.
For this you need to fetch this repo, checkout branch "openocd-cubeide-r3" and
build openocd following the instructions provided in the README of the project.
Then, build zephyr project indicating the openocd location in west build command.
Default flasher for this board is openocd. It could be used in the usual way.
Here is an example for the :ref:`blinky-sample` application.
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: b_u585i_iot02a
:gen-args: -DOPENOCD="<path_to_openocd>/openocd/src/openocd" -DOPENOCD_DEFAULT_PATH="<path_to_openocd>/openocd/tcl/"
:goals: build
:goals: debug
Then, indicate openocd as the chosen runner in flash and debug commands:
Building a secure/non-secure with Arm |reg| TrustZone |reg|
===========================================================
The TF-M applications can be run on this board, thanks to its Arm |reg| TrustZone |reg|
support.
In TF-M configuration, Zephyr is run on the non-secure domain. A non-secure image
can be generated using ``b_u585i_iot02a_ns`` as build target.
.. code-block:: console
.. code-block:: bash
$ west flash -r openocd
$ west debug -r openocd
$ west build -b b_u585i_iot02a_ns path/to/source/directory
Note: When building the ``*_ns`` image with TF-M, ``build/tfm/postbuild.sh`` bash script
is run automatically in a post-build step to make some required flash layout changes.
Once the build is completed, run the following script to initialize the option bytes.
.. code-block:: bash
$ build/tfm/regression.sh
Finally, to flash the board, run:
.. code-block:: bash
$ west flash
.. _B U585I IOT02A Discovery kit website:
https://www.st.com/en/evaluation-tools/b-u585i-iot02a.html

View File

@@ -13,16 +13,8 @@ config BOARD
config FLASH
default y
if BOARD_BL5340_DVK_CPUAPP
if DAC
config I2C
default y
endif # DAC
endif # BOARD_BL5340_DVK_CPUAPP
default GPIO || DAC
# By default, if we build for a Non-Secure version of the board,
# enable building with TF-M as the Secure Execution Environment.
@@ -87,9 +79,6 @@ config FLASH_LOAD_SIZE
endif # BOARD_BL5340_DVK_CPUAPP_NS
config I2C
default $(dt_compat_on_bus,$(DT_COMPAT_TI_TCA9538),i2c)
endif # BOARD_BL5340_DVK_CPUAPP || BOARD_BL5340_DVK_CPUAPP_NS
config BOARD

View File

@@ -423,7 +423,7 @@ References
.. _BL5340 homepage: https://www.lairdconnect.com/wireless-modules/bluetooth-modules/bluetooth-5-modules/bl5340-series-multi-core-bluetooth-52-802154-nfc-modules
.. _Nordic Semiconductor Infocenter: https://infocenter.nordicsemi.com
.. _TI TCA9538 datasheet: https://www.ti.com/lit/gpn/TCA9538
.. _Macronix MX25R6435FZNIL0 datasheet: https://www.macronix.com/Lists/Datasheet/Attachments/7913/MX25R6435F,%20Wide%20Range,%2064Mb,%20v1.5.pdf
.. _Macronix MX25R6435FZNIL0 datasheet: https://www.macronix.com/Lists/Datasheet/Attachments/8868/MX25R6435F,%20Wide%20Range,%2064Mb,%20v1.6.pdf
.. _Giantec GT24C256C-2GLI-TR datasheet: http://www.giantec-semi.com/Upload/datasheet/CU/GT24C256C_DS_Cu.pdf
.. _Bosch BME680 datasheet: https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme680-ds001.pdf
.. _ST Microelectronics LIS3DH datasheet: https://www.st.com/resource/en/datasheet/lis3dh.pdf

View File

@@ -10,7 +10,7 @@ The WeAct Black Pill V1.2 Board is an extremely low cost and bare-bones
development board featuring the STM32F401CC, see `STM32F401CC website`_.
This is the 48-pin variant of the STM32F401x series,
see `STM32F401x reference manual`_. More info about the board available
`here <stm32-base-board-page>`_ and on `WeAct Github`_.
`here <stm32-base-board-page_>`_ and on `WeAct Github`_.
.. image:: img/blackpill-v3.jpg
:align: center

View File

@@ -10,7 +10,7 @@ The WeAct Black Pill V3.0 Board is an extremely low cost and bare-bones
development board featuring the STM32F401CE, see `STM32F401CE website`_.
This is the 48-pin variant of the STM32F401x series,
see `STM32F401x reference manual`_. More info about the board available
`here <stm32-base-board-page>`_ and on `WeAct Github`_.
`here <stm32-base-board-page_>`_ and on `WeAct Github`_.
.. image:: img/blackpill-v3.jpg
:align: center

View File

@@ -10,7 +10,7 @@ The WeAct Black Pill V2.0 Board is an extremely low cost and bare-bones
development board featuring the STM32F411CE, see `STM32F411CE website`_.
This is the 48-pin variant of the STM32F411x series,
see `STM32F411x reference manual`_. More info about the board available
`here <stm32-base-board-page>`_ and on `WeAct Github`_.
`here <stm32-base-board-page_>`_ and on `WeAct Github`_.
.. image:: img/blackpill-v2.jpg
:align: center

View File

@@ -185,7 +185,7 @@ You can debug an application in the usual way. Here is an example for the
:goals: debug
.. _Dragino LSN50 website:
http://wiki.dragino.com/index.php?title=Lora_Sensor_Node-LSN50#Resource
https://www.dragino.com/products/lora-lorawan-end-node/item/128-lsn50.html
.. _STM32L072CZ on www.st.com:
http://www.st.com/en/microcontrollers/stm32l072cz.html

View File

@@ -158,7 +158,7 @@ Reset the board and you will see this message written to the serial port:
https://www.silabs.com/documents/public/user-guides/ug255-stk3400-user-guide.pdf
.. _EFM32HG-SLSTK3400A Schematics:
https://www.silabs.com/documents/public/schematic-files/EFM32HG_BRD2012A_B01_schematic.PDF
https://www.silabs.com/documents/public/schematic-files/BRD2012A-B01-schematic.pdf
.. _EFM32HG Website:
https://www.silabs.com/products/mcu/32-bit/efm32-happy-gecko

View File

@@ -197,7 +197,7 @@ terminal session:
https://www.silabs.com/documents/public/user-guides/ug257-stk3402-usersguide.pdf
.. _EFM32PG-STK3402A Schematics:
https://www.silabs.com/documents/public/schematic-files/EFM32PG12-BRD2501A-A01-schematic.pdf
https://www.silabs.com/documents/public/schematic-files/BRD2501A-A01-schematic.pdf
.. _EFM32PG Website:
https://www.silabs.com/products/mcu/32-bit/efm32-pearl-gecko

View File

@@ -120,4 +120,4 @@ Reset the board and you should see the following message in the terminal:
https://www.silabs.com/documents/public/reference-manuals/brd4104a-rm.pdf
.. _EFR32BG13-BRD4104A Schematics:
https://www.silabs.com/documents/public/schematic-files/EFR32BG13-BRD4104A-A00-schematic.pdf
https://www.silabs.com/documents/public/schematic-files/BRD4104A-A00-schematic.pdf

View File

@@ -101,7 +101,7 @@ Reset the board and you should see the following message in the terminal:
.. _EFR32FG1 Website:
https://www.silabs.com/products/wireless/proprietary/efr32-flex-gecko-2-4-ghz-sub-ghz
https://www.silabs.com/wireless/proprietary/efr32fg1-series-1-sub-ghz-2-4-ghz-socs
.. _EFR32FG1 Datasheet:
https://www.silabs.com/documents/public/data-sheets/efr32fg1-datasheet.pdf
@@ -119,4 +119,4 @@ Reset the board and you should see the following message in the terminal:
https://www.silabs.com/documents/public/reference-manuals/brd4250b-rm.pdf
.. _EFR32FG1-BRD4250B Schematics:
https://www.silabs.com/documents/public/schematic-files/efr32fg1-brd4250b-b02-schematic.pdf
https://www.silabs.com/documents/public/schematic-files/BRD4250B-B02-schematic.pdf

View File

@@ -179,7 +179,7 @@ Reset the board and you should see the following message in the terminal:
https://www.silabs.com/documents/public/user-guides/ug385-brd4180a-user-guide.pdf
.. _WSTK Main Board BRD4001A Schematics:
https://www.silabs.com/documents/public/schematic-files/WSTK-Main-BRD4001A-A01-schematic.pdf
https://www.silabs.com/documents/public/schematic-files/BRD4001A-A01-schematic.pdf
.. _J-Link:
https://www.segger.com/jlink-debug-probes.html

View File

@@ -202,7 +202,7 @@ the following message:
https://www.silabs.com/documents/public/user-guides/ug309-sltb004a-user-guide.pdf
.. _EFR32MG-SLTB004A Schematics:
https://www.silabs.com/documents/public/schematic-files/TBSense2-BRD4166A-D00-schematic.pdf
https://www.silabs.com/documents/public/schematic-files/BRD4166A-D00-schematic.pdf
.. _EFR32MG Website:
https://www.silabs.com/products/wireless/mesh-networking/efr32mg-mighty-gecko-zigbee-thread-soc

View File

@@ -17,5 +17,4 @@ supported:
- eeprom
- gpio
- i2c
- pinmux
- serial

View File

@@ -57,7 +57,12 @@ For more information about the K22F SoC and FRDM-K22F board:
Supported Features
==================
The frdm_k22f board configuration supports the following hardware features:
The frdm_k22f board configuration supports the hardware features listed
below. For additional features not yet supported, please also refer to the
:ref:`frdm_k64f`, which is the superset board in NXP's Kinetis K series.
NXP prioritizes enabling the superset board with NXP's Full Platform Support for
Zephyr. Therefore, the frdm_k64f board may have additional features
already supported, which can also be re-used on this frdm_k22f board:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
@@ -284,7 +289,7 @@ should see the following message in the terminal:
https://www.nxp.com/docs/en/reference-manual/K22P121M120SF7RM.pdf
.. _OpenSDA DAPLink FRDM-K22F Firmware:
http://www.nxp.com/assets/downloads/data/en/ide-debug-compile-build-tools/OpenSDAv2.2_DAPLink_frdmk22f_rev0242.zip
https://www.nxp.com/downloads/en/snippets-boot-code-headers-monitors/k20dx_frdmk22f_if_crc_legacy_0x8000.bin
.. _DAPLink Bootloader Update:
https://os.mbed.com/blog/entry/DAPLink-bootloader-update/

View File

@@ -58,7 +58,11 @@ For more information about the K64F SoC and FRDM-K64F board:
Supported Features
==================
The frdm_k64f board configuration supports the following hardware features:
NXP considers the FRDM-K64F as the superset board for the Kinetis K
series of MCUs. This board is a focus for NXP's Full Platform Support for
Zephyr, to better enable the entire Kinetis K series. NXP prioritizes enabling
this board with new support for Zephyr features. The frdm_k64f board
configuration supports the following hardware features:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |

View File

@@ -26,5 +26,3 @@ supported:
- spi
- usb_device
- watchdog
testing:
default: true

View File

@@ -58,7 +58,12 @@ For more information about the K82F SoC and FRDM-K82F board:
Supported Features
==================
The frdm_k82f board configuration supports the following hardware features:
The frdm_k82f board configuration supports the hardware features listed
below. For additional features not yet supported, please also refer to the
:ref:`frdm_k64f`, which is the superset board in NXP's Kinetis K series.
NXP prioritizes enabling the superset board with NXP's Full Platform Support for
Zephyr. Therefore, the frdm_k64f board may have additional features
already supported, which can also be re-used on this frdm_k82f board:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
@@ -225,7 +230,7 @@ should see the following message in the terminal:
https://www.nxp.com/design/development-boards/freedom-development-boards/mcu-boards/freedom-development-platform-for-kinetis-k82-k81-and-k80-mcus:FRDM-K82F
.. _FRDM-K82F User Guide:
https://www.nxp.com/docs/en/user-guide/FRDMK82FUG.pdf
https://www.nxp.com/webapp/Download?colCode=FRDMK82FUG
.. _FRDM-K82F Schematics:
https://www.nxp.com/downloads/en/schematics/FRDM-K82F-SCH.pdf
@@ -237,13 +242,13 @@ should see the following message in the terminal:
https://www.nxp.com/docs/en/data-sheet/K82P121M150SF5.pdf
.. _K82F Reference Manual:
https://www.nxp.com/docs/en/reference-manual/K82P121M150SF5RM.pdf
https://www.nxp.com/webapp/Download?colCode=K82P121M150SF5RM
.. _DAPLink Bootloader Update:
https://os.mbed.com/blog/entry/DAPLink-bootloader-update/
.. _OpenSDA DAPLink FRDM-K82F Firmware:
https://www.nxp.com/assets/downloads/data/en/snippets-boot-code-headers-monitors/k20dx_frdmk82f_if_crc_legacy_0x8000.bin
https://www.nxp.com/downloads/en/snippets-boot-code-headers-monitors/k20dx_frdmk82f_if_crc_legacy_0x8000.bin
.. _OpenSDA J-Link Firmware for FRDM-K82F:
https://www.segger.com/downloads/jlink/OpenSDA_FRDM-K82F

View File

@@ -214,7 +214,7 @@ should see the following message in the terminal:
https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/kinetis-cortex-m-mcus/l-seriesultra-low-powerm0-plus/freedom-development-platform-for-kinetis-kl14-kl15-kl24-kl25-mcus:FRDM-KL25Z
.. _FRDM-KL25Z User Guide:
https://www.nxp.com/docs/en/user-guide/FRDMKL25ZUM.zip
https://www.nxp.com/webapp/Download?colCode=FRDMKL25ZUM
.. _FRDM-KL25Z Schematics:
https://www.nxp.com/downloads/en/schematics/FRDM-KL25Z_SCH_REV_E.pdf
@@ -226,13 +226,13 @@ should see the following message in the terminal:
https://www.nxp.com/docs/en/data-sheet/KL25P80M48SF0.pdf
.. _KL25Z Reference Manual:
https://www.nxp.com/docs/en/reference-manual/KL25P80M48SF0RM.pdf
https://www.nxp.com/webapp/Download?colCode=KL25P80M48SF0RM
.. _DAPLink Bootloader Update:
https://os.mbed.com/blog/entry/DAPLink-bootloader-update/
.. _OpenSDA DAPLink FRDM-KL25Z Firmware:
https://www.nxp.com/assets/downloads/data/en/ide-debug-compile-build-tools/OpenSDAv2.2_DAPLink_frdmkl25z_rev0242.zip
https://www.nxp.com/downloads/en/ide-debug-compile-build-tools/OpenSDAv2.2_DAPLink_frdmkl25z_rev0242.zip
.. _OpenSDA J-Link FRDM-KL25Z Firmware:
https://www.segger.com/downloads/jlink/OpenSDA_FRDM-KL25Z

View File

@@ -254,7 +254,7 @@ should see the following message in the terminal:
https://www.nxp.com/webapp/Download?colCode=MKW41Z512RM
.. _OpenSDA DAPLink FRDM-KW41Z Firmware:
https://www.nxp.com/assets/downloads/data/en/reference-applications/OpenSDAv2.2_DAPLink_frdmkw41z_rev0241.zip
https://www.nxp.com/downloads/en/reference-applications/OpenSDAv2.2_DAPLink_frdmkw41z_rev0241.zip
.. _OpenSDA J-Link FRDM-KW41Z Firmware:
https://www.segger.com/downloads/jlink/OpenSDA_FRDM-KW41Z

View File

@@ -207,10 +207,10 @@ is :code:`$HOME/.local/bin`.
https://www.gigadevice.com/products/microcontrollers/gd32/arm-cortex-m4/high-performance-line/gd32f403-series/
.. _GD32F403 Datasheet:
http://www.gd32mcu.com/data/documents/shujushouce/GD32F403xx_Datasheet_Rev1.3.pdf
https://gd32mcu.com/data/documents/datasheet/GD32F403xx_Datasheet_Rev1.3.pdf
.. _GD32F403 Reference Manual:
http://www.gd32mcu.com/data/documents/yingyongbiji/GD32F403_User_Manual_Rev2.4.pdf
https://gd32mcu.com/data/documents/userManual/GD32F403_User_Manual_Rev2.6.pdf
.. _GD32F403Z Eval Schematics:
http://www.gd32mcu.com/download/down/document_id/270/path_type/1

View File

@@ -160,7 +160,7 @@ allows flash programming and debugging over USB. There is also a JTAG header
https://www.gigadevice.com/microcontroller/gd32f470ikh6/
.. _GD32F470xx Datasheet:
https://gd32mcu.21ic.com/data/documents/shujushouce/GD32F470xx_Datasheet_Rev1.1.pdf
https://gd32mcu.com/data/documents/datasheet/GD32F470xx_Datasheet_Rev1.3.pdf
.. _GD32F4xx User Manual:
https://www.gd32mcu.com/data/documents/yingyongbiji/GD32F4xx_User_Manual_Rev2.6.pdf
https://gd32mcu.com/data/documents/userManual/GD32F4xx_User_Manual_Rev2.7.pdf

View File

@@ -303,7 +303,7 @@ will then see a plot of the heart rate data that updates once per second.
.. _Hexiwear Website:
https://www.nxp.com/support/developer-resources/nxp-designs/hexiwear-complete-iot-development-solution:HEXIWEAR?&tid=vanHEXIWEAR
https://www.mikroe.com/hexiwear
.. _Hexiwear Fact Sheet:
https://www.nxp.com/docs/en/fact-sheet/HEXIWEAR-FS.pdf

View File

@@ -173,7 +173,7 @@ you should see the following message in the terminal:
https://www.nxp.com/docs/en/data-sheet/MKW40Z160.pdf
.. _KW40Z Reference Manual:
https://www.nxp.com/docs/en/reference-manual/MKW40Z160RM.pdf
https://www.nxp.com/webapp/Download?colCode=MKW40Z160RM
.. _Segger RTT:
https://www.segger.com/products/debug-probes/j-link/technology/about-real-time-transfer/

View File

@@ -155,7 +155,7 @@ Step through the application in your debugger.
https://www.nxp.com/docs/en/data-sheet/K66P144M180SF5V2.pdf
.. _K66F Reference Manual:
https://www.nxp.com/docs/en/reference-manual/K66P144M180SF5RMV2.pdf
https://www.nxp.com/webapp/Download?colCode=K66P144M180SF5RMV2
.. _OpenSDA J-Link Generic Firmware for V3.2 Bootloader:
https://www.segger.com/downloads/jlink/OpenSDA_V3_2

View File

@@ -16,3 +16,4 @@ supported:
- spi
- uart
- watchdog
- lora

View File

@@ -7,7 +7,6 @@ toolchain:
supported:
- arduino_serial
- clock_controller
- pinmux
- gpio
- i2c
- serial

View File

@@ -4,7 +4,6 @@ CONFIG_BOARD_LPCXPRESSO51U68=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_PINMUX=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_GPIO=y
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=12000000

View File

@@ -43,8 +43,12 @@ For more information about the LPC55S06 SoC and LPCXPresso55S06 board, see:
Supported Features
==================
The lpcxpresso55s06 board configuration supports the following
hardware features:
The lpcxpresso55s06 board configuration supports the hardware features listed
below. For additional features not yet supported, please also refer to the
:ref:`lpcxpresso55s69` , which is the superset board in NXP's LPC55xx series.
NXP prioritizes enabling the superset board with NXP's Full Platform Support for
Zephyr. Therefore, the lpcxpresso55s69 board may have additional features
already supported, which can also be re-used on this lpcxpresso55s06 board:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
@@ -57,7 +61,8 @@ hardware features:
+-----------+------------+-------------------------------------+
| GPIO | on-chip | gpio |
+-----------+------------+-------------------------------------+
| USART | on-chip | serial port |
| USART | on-chip | serial port-polling; |
| | | serial port-interrupt |
+-----------+------------+-------------------------------------+
| CLOCK | on-chip | clock_control |
+-----------+------------+-------------------------------------+

View File

@@ -48,8 +48,12 @@ For more information about the LPC55S16 SoC and LPCXPresso55S16 board, see:
Supported Features
==================
The lpcxpresso55s16 board configuration supports the following
hardware features:
The lpcxpresso55s16 board configuration supports the hardware features listed
below. For additional features not yet supported, please also refer to the
:ref:`lpcxpresso55s69` , which is the superset board in NXP's LPC55xx series.
NXP prioritizes enabling the superset board with NXP's Full Platform Support for
Zephyr. Therefore, the lpcxpresso55s69 board may have additional features
already supported, which can also be re-used on this lpcxpresso55s16 board:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
@@ -66,7 +70,8 @@ hardware features:
+-----------+------------+-------------------------------------+
| SPI | on-chip | spi |
+-----------+------------+-------------------------------------+
| USART | on-chip | serial port |
| USART | on-chip | serial port-polling; |
| | | serial port-interrupt |
+-----------+------------+-------------------------------------+
| SENSOR | off-chip | fxos8700 trigger |
+-----------+------------+-------------------------------------+
@@ -219,7 +224,7 @@ should see the following message in the terminal:
https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc5500-cortex-m33/lpc551x-s1x-baseline-arm-cortex-m33-based-microcontroller-family:LPC551X-S1X
.. _LPC55S16 Datasheet:
https://www.nxp.com/docs/en/nxp/data-sheets/LPC55S1x_PDS.pdf
https://www.nxp.com/docs/en/nxp/data-sheets/LPC55S1x_LPC551x_DS.pdf
.. _LPC55S16 User Manual:
https://www.nxp.com/webapp/Download?colCode=UM11295
@@ -228,7 +233,7 @@ should see the following message in the terminal:
https://www.nxp.com/design/development-boards/lpcxpresso-boards/lpcxpresso55s16-development-board:LPC55S16-EVK
.. _LPCXpresso55S16 User Manual:
https://www.nxp.com/docs/en/user-guide/UMLPCXPRESSO55S16.pdf
https://www.nxp.com/webapp/Download?colCode=UMLPCXPRESSO55S16
.. _LPCXpresso55S16 Development Board Design Files:
https://www.nxp.com/downloads/en/design-support/LPCXPRESSSO55S16-DESIGN-FILES.zip
https://www.nxp.com/webapp/Download?colCode=LPCXPRESSSO55S16-DESIGN-FILES

View File

@@ -48,8 +48,12 @@ For more information about the LPC55S28 SoC and LPCXPresso55S28 board, see:
Supported Features
==================
The lpcxpresso55s28 board configuration supports the following
hardware features:
The lpcxpresso55s28 board configuration supports the hardware features listed
below. For additional features not yet supported, please also refer to the
:ref:`lpcxpresso55s69` , which is the superset board in NXP's LPC55xx series.
NXP prioritizes enabling the superset board with NXP's Full Platform Support for
Zephyr. Therefore, the lpcxpresso55s69 board may have additional features
already supported, which can also be re-used on this lpcxpresso55s28 board:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
@@ -66,7 +70,8 @@ hardware features:
+-----------+------------+-------------------------------------+
| SPI | on-chip | spi |
+-----------+------------+-------------------------------------+
| USART | on-chip | serial port-polling |
| USART | on-chip | serial port-polling; |
| | | serial port-interrupt |
+-----------+------------+-------------------------------------+
| WWDT | on-chip | windowed watchdog timer |
+-----------+------------+-------------------------------------+
@@ -194,7 +199,7 @@ should see the following message in the terminal:
https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc5500-cortex-m33/lpc552x-s2x-mainstream-arm-cortex-m33-based-microcontroller-family:LPC552x-S2x
.. _LPC55S28 Datasheet:
https://www.nxp.com/docs/en/data-sheet/LPC55S2X-LPC552X.pdf
https://www.nxp.com/docs/en/nxp/data-sheets/LPC55S2x_LPC552x_DS.pdf
.. _LPC55S28 User Manual:
https://www.nxp.com/webapp/Download?colCode=UM11126

View File

@@ -47,7 +47,13 @@ For more information about the LPC55S36 SoC and LPCXPresso55S36 board, see:
Supported Features
==================
The Zephyr configuration for the LPC55S36 board (lpcxpresso55s36) is as follows:
NXP considers the LPCXpresso55S36 as a superset board for the LPC55(S)3x
family of MCUs. This board is a focus for NXP's Full Platform Support for
Zephyr, to better enable the entire LPC55(S)3x family. NXP prioritizes enabling
this board with new support for Zephyr features. The lpcxpresso55s36 board
configuration supports the hardware features below. Another similar superset
board is the :ref:`lpcxpresso55s69`, and that board may have additional features
already supported, which can also be re-used on this lpcxpresso55s36 board:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
@@ -60,7 +66,8 @@ The Zephyr configuration for the LPC55S36 board (lpcxpresso55s36) is as follows:
+-----------+------------+-------------------------------------+
| GPIO | on-chip | gpio |
+-----------+------------+-------------------------------------+
| USART | on-chip | serial port |
| USART | on-chip | serial port-polling; |
| | | serial port-interrupt |
+-----------+------------+-------------------------------------+
| CLOCK | on-chip | clock_control |
+-----------+------------+-------------------------------------+
@@ -68,6 +75,8 @@ The Zephyr configuration for the LPC55S36 board (lpcxpresso55s36) is as follows:
+-----------+------------+-------------------------------------+
| IAP | on-chip | flash |
+-----------+------------+-------------------------------------+
| PWM | on-chip | pwm |
+-----------+------------+-------------------------------------+
Other hardware features are not currently enabled.
@@ -98,6 +107,31 @@ the functionality of a pin.
+---------+-----------------+----------------------------+
| PIO1_18 | GPIO | Wakeup SW1 |
+---------+-----------------+----------------------------+
| PIO1_20 | FLEXPPWM0_PWM0_A| pwm |
+---------+-----------------+----------------------------+
| PIO1_17 | FLEXPPWM0_PWM0_B| pwm |
+---------+-----------------+----------------------------+
| PIO1_6 | FLEXPPWM0_PWM1_A| pwm |
+---------+-----------------+----------------------------+
| PIO1_22 | FLEXPPWM0_PWM1_B| pwm |
+---------+-----------------+----------------------------+
| PIO1_8 | FLEXPPWM0_PWM2_A| pwm |
+---------+-----------------+----------------------------+
| PIO1_4 | FLEXPPWM0_PWM2_B| pwm |
+---------+-----------------+----------------------------+
| PIO1_21 | FLEXPPWM1_PWM0_A| pwm |
+---------+-----------------+----------------------------+
| PIO0_3 | FLEXPPWM1_PWM0_B| pwm |
+---------+-----------------+----------------------------+
| PIO1_23 | FLEXPPWM1_PWM1_A| pwm |
+---------+-----------------+----------------------------+
| PIO0_21 | FLEXPPWM1_PWM1_B| pwm |
+---------+-----------------+----------------------------+
| PIO1_25 | FLEXPPWM1_PWM2_A| pwm |
+---------+-----------------+----------------------------+
| PIO0_31 | FLEXPPWM1_PWM2_B| pwm |
+---------+-----------------+----------------------------+
System Clock
============
@@ -197,7 +231,7 @@ should see the following message in the terminal:
https://www.nxp.com/design/development-boards/lpcxpresso-boards/development-board-for-the-lpc553x-family-of-mcus:LPCXpresso55S36
.. _LPCXpresso55S36 User Manual:
https://www.nxp.com/docs/en/user-guide/LPC55S36-EVKUM.pdf
https://www.nxp.com/docs/en/user-manual/LPCXpresso55S36UM.pdf
.. _LPCXpresso55S36 Development Board Design Files:
https://www.nxp.com/webapp/Download?colCode=LPCXPRESSO5536_EVK-DESIGN-FILES

View File

@@ -57,4 +57,53 @@
};
};
pinmux_flexpwm0_pwm0: pinmux_flexpwm0_pwm0 {
group0 {
pinmux = <PWM0_A0_PIO1_20>,
<PWM0_B0_PIO1_17>;
slew-rate = "standard";
};
};
pinmux_flexpwm0_pwm1: pinmux_flexpwm0_pwm1 {
group0 {
pinmux = <PWM0_A1_PIO1_6>,
<PWM0_B1_PIO1_22>;
slew-rate = "standard";
};
};
pinmux_flexpwm0_pwm2: pinmux_flexpwm0_pwm2 {
group0 {
pinmux = <PWM0_A2_PIO1_8>,
<PWM0_B2_PIO1_4>;
slew-rate = "standard";
};
};
pinmux_flexpwm1_pwm0: pinmux_flexpwm1_pwm0 {
group0 {
pinmux = <PWM1_A0_PIO1_21>,
<PWM1_B0_PIO0_3>;
slew-rate = "standard";
};
};
pinmux_flexpwm1_pwm1: pinmux_flexpwm1_pwm1 {
group0 {
pinmux = <PWM1_A1_PIO1_23>,
<PWM1_B1_PIO0_21>;
slew-rate = "standard";
};
};
pinmux_flexpwm1_pwm2: pinmux_flexpwm1_pwm2 {
group0 {
pinmux = <PWM1_A2_PIO1_25>,
<PWM1_B2_PIO1_31>;
slew-rate = "standard";
};
};
};

View File

@@ -30,6 +30,7 @@
sw0 = &btn_wk;
sw1 = &btn_usr;
usart-0 = &flexcomm0;
pwm-0 = &flexpwm1_pwm0;
};
leds {
@@ -145,3 +146,9 @@
};
};
};
&flexpwm1_pwm0 {
status = "okay";
pinctrl-0 = <&pinmux_flexpwm1_pwm0>;
pinctrl-names = "default";
};

View File

@@ -16,3 +16,4 @@ toolchain:
- xtools
supported:
- gpio
- pwm

View File

@@ -47,8 +47,11 @@ For more information about the LPC55S69 SoC and LPCXPRESSO55S69 board, see:
Supported Features
==================
The lpcxpresso55s69 board configuration supports the following hardware
features:
NXP considers the LPCXpresso55S69 as the superset board for the LPC55xx
series of MCUs. This board is a focus for NXP's Full Platform Support for
Zephyr, to better enable the entire LPC55xx series. NXP prioritizes enabling
this board with new support for Zephyr features. The lpcxpresso55s69 board
configuration supports the following hardware features:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
@@ -65,7 +68,8 @@ features:
+-----------+------------+-------------------------------------+
| SPI | on-chip | spi |
+-----------+------------+-------------------------------------+
| USART | on-chip | serial port-polling |
| USART | on-chip | serial port-polling; |
| | | serial port-interrupt |
+-----------+------------+-------------------------------------+
| WWDT | on-chip | windowed watchdog timer |
+-----------+------------+-------------------------------------+
@@ -375,7 +379,7 @@ should see the following message in the terminal:
https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/lpc-cortex-m-mcus/lpc5500-cortex-m33/high-efficiency-arm-cortex-m33-based-microcontroller-family:LPC55S6x
.. _LPC55S69 Datasheet:
https://www.nxp.com/docs/en/data-sheet/LPC55S6x.pdf
https://www.nxp.com/docs/en/nxp/data-sheets/LPC55S6x_DS.pdf
.. _LPC55S69 Reference Manual:
https://www.nxp.com/webapp/Download?colCode=UM11126

View File

@@ -4,9 +4,6 @@
# SPDX-License-Identifier: Apache-2.0
#
zephyr_library()
zephyr_library_sources(pinmux.c)
if(DEFINED ENV{EVERGLADES_SPI_GEN})
# Grab it from environment variable if defined
set(EVERGLADES_SPI_GEN $ENV{EVERGLADES_SPI_GEN})

View File

@@ -0,0 +1,122 @@
/*
* Copyright (c) 2022, Microchip Technology Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <microchip/mec1501hsz.dtsi>
#include <microchip/mec152x/mec152xhsz-pinctrl.dtsi>
&ps2_clk0b_gpio007 {
drive-open-drain;
};
&ps2_dat0b_gpio010 {
drive-open-drain;
};
&ps2_clk1b_gpio154 {
drive-open-drain;
};
&ps2_dat1b_gpio155 {
drive-open-drain;
};
&kso00_gpio040 {
bias-pull-up;
};
&kso01_gpio045 {
bias-pull-up;
};
&kso02_gpio046 {
bias-pull-up;
};
&kso12_gpio125 {
bias-pull-up;
};
&kso13_gpio126 {
bias-pull-up;
};
&kso03_gpio047 {
bias-pull-up;
};
&kso04_gpio107 {
bias-pull-up;
};
&kso05_gpio112 {
bias-pull-up;
};
&kso06_gpio113 {
bias-pull-up;
};
&kso14_gpio152 {
bias-pull-up;
};
&kso15_gpio151 {
bias-pull-up;
};
&kso07_gpio120 {
bias-pull-up;
};
&kso08_gpio121 {
bias-pull-up;
};
&kso09_gpio122 {
bias-pull-up;
};
&kso10_gpio123 {
bias-pull-up;
};
&kso11_gpio124 {
bias-pull-up;
};
&ksi0_gpio017 {
bias-pull-up;
};
&ksi1_gpio020 {
bias-pull-up;
};
&ksi2_gpio021 {
bias-pull-up;
};
&ksi3_gpio026 {
bias-pull-up;
};
&ksi4_gpio027 {
bias-pull-up;
};
&ksi5_gpio030 {
bias-pull-up;
};
&ksi6_gpio031 {
bias-pull-up;
};
&ksi7_gpio032 {
bias-pull-up;
};

View File

@@ -6,8 +6,7 @@
/dts-v1/;
#include <microchip/mec1501hsz.dtsi>
#include <microchip/mec152x/mec152xhsz-pinctrl.dtsi>
#include "mec1501modular_assy6885-pinctrl.dtsi"
/ {
model = "Microchip MEC1501MODULAR_ASSY6885 evaluation board";
@@ -57,6 +56,10 @@
&adc0 {
status = "okay";
pinctrl-0 = <&adc04_gpio204 &adc05_gpio205
&adc06_gpio206 &adc07_gpio207
&vref2_adc_gpio067 >;
pinctrl-names = "default";
};
&i2c_smb_0 {
@@ -64,6 +67,8 @@
port_sel = <0>;
sda-gpios = <&gpio_000_036 3 0>;
scl-gpios = <&gpio_000_036 4 0>;
pinctrl-0 = < &i2c00_scl_gpio004 &i2c00_sda_gpio003 >;
pinctrl-names = "default";
};
&i2c_smb_1 {
@@ -71,6 +76,8 @@
port_sel = <1>;
sda-gpios = <&gpio_100_136 24 0>;
scl-gpios = <&gpio_100_136 25 0>;
pinctrl-0 = < &i2c01_scl_gpio131 &i2c01_sda_gpio130 >;
pinctrl-names = "default";
};
&espi0 {
@@ -78,28 +85,69 @@
io_girq = <19>;
vw_girqs = <24 25>;
pc_girq = <15>;
pinctrl-0 = < &espi_reset_n_gpio061 &espi_cs_n_gpio066
&espi_alert_n_gpio063 &espi_clk_gpio065
&espi_io0_gpio070 &espi_io1_gpio071
&espi_io2_gpio072 &espi_io3_gpio073 >;
pinctrl-names = "default";
};
&ps2_0 {
status = "okay";
pinctrl-0 = <&ps2_clk0b_gpio007 &ps2_dat0b_gpio010>;
pinctrl-names = "default";
};
&ps2_1 {
status = "okay";
pinctrl-0 = <&ps2_clk1b_gpio154 &ps2_dat1b_gpio155>;
pinctrl-names = "default";
};
&pwm0 {
status = "okay";
pinctrl-0 = <&pwm0_gpio053>;
pinctrl-names = "default";
};
&kscan0 {
status = "okay";
pinctrl-0 = < &kso00_gpio040
&kso01_gpio045
&kso02_gpio046
&kso12_gpio125
&kso13_gpio126
&kso03_gpio047
&kso04_gpio107
&kso05_gpio112
&kso06_gpio113
&kso14_gpio152
&kso15_gpio151
&kso07_gpio120
&kso08_gpio121
&kso09_gpio122
&kso10_gpio123
&kso11_gpio124
&ksi0_gpio017
&ksi1_gpio020
&ksi2_gpio021
&ksi3_gpio026
&ksi4_gpio027
&ksi5_gpio030
&ksi6_gpio031
&ksi7_gpio032 >;
pinctrl-names = "default";
};
&peci0 {
status = "okay";
pinctrl-0 = <&peci_dat_gpio042 &vref_vtt_gpio044>;
pinctrl-names = "default";
};
&tach0 {
status = "okay";
pinctrl-0 = <&ict0_tach0_gpio050>;
pinctrl-names = "default";
};

View File

@@ -19,7 +19,6 @@ supported:
- espi
- gpio
- i2c
- pinmux
- pwm
- watchdog
- kscan

View File

@@ -15,7 +15,7 @@ CONFIG_RTOS_TIMER=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_PINMUX=y
CONFIG_GPIO=y
CONFIG_PINCTRL=y
CONFIG_PM=y

View File

@@ -1,484 +0,0 @@
/*
* Copyright (c) 2019 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/kernel.h>
#include <zephyr/drivers/pinmux.h>
#include "soc.h"
struct pinmux_ports_t {
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay)
const struct device *porta;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_040_076), okay)
const struct device *portb;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_100_136), okay)
const struct device *portc;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay)
const struct device *portd;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_200_236), okay)
const struct device *porte;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_240_276), okay)
const struct device *portf;
#endif
};
#ifdef CONFIG_I2C_XEC
static void i2c_pinmux(struct pinmux_ports_t *p, uint8_t port_sel)
{
switch (port_sel) {
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay)
case 0:
pinmux_pin_set(p->porta, MCHP_GPIO_003, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(p->porta, MCHP_GPIO_004, MCHP_GPIO_CTRL_MUX_F1);
break;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_100_136), okay)
case 1:
pinmux_pin_set(p->portc, MCHP_GPIO_130, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(p->portc, MCHP_GPIO_131, MCHP_GPIO_CTRL_MUX_F1);
break;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay)
case 2:
pinmux_pin_set(p->portd, MCHP_GPIO_154, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(p->portd, MCHP_GPIO_155, MCHP_GPIO_CTRL_MUX_F1);
break;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay)
case 3:
pinmux_pin_set(p->porta, MCHP_GPIO_007, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(p->porta, MCHP_GPIO_010, MCHP_GPIO_CTRL_MUX_F1);
break;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay)
case 4:
pinmux_pin_set(p->portd, MCHP_GPIO_143, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(p->portd, MCHP_GPIO_144, MCHP_GPIO_CTRL_MUX_F1);
break;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay)
case 5:
pinmux_pin_set(p->portd, MCHP_GPIO_141, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(p->portd, MCHP_GPIO_142, MCHP_GPIO_CTRL_MUX_F1);
break;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_100_136), okay)
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay)
case 6:
pinmux_pin_set(p->portc, MCHP_GPIO_132, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(p->portd, MCHP_GPIO_140, MCHP_GPIO_CTRL_MUX_F1);
break;
#endif
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay)
case 7:
pinmux_pin_set(p->porta, MCHP_GPIO_012, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(p->porta, MCHP_GPIO_013, MCHP_GPIO_CTRL_MUX_F1);
break;
#endif
default:
break;
}
}
#endif
static void configure_debug_interface(void)
{
/* No debug support */
ECS_REGS->DEBUG_CTRL = 0;
ECS_REGS->ETM_CTRL = 0;
#ifdef CONFIG_SOC_MEC1501_DEBUG_WITHOUT_TRACING
/* Release JTAG TDI and JTAG TDO pins so they can be
* controlled by their respective PCR register (UART2).
* For more details see table 44-1
*/
ECS_REGS->DEBUG_CTRL = (MCHP_ECS_DCTRL_DBG_EN |
MCHP_ECS_DCTRL_MODE_SWD);
#elif defined(CONFIG_SOC_MEC1501_DEBUG_AND_TRACING)
#if defined(CONFIG_SOC_MEC1501_DEBUG_AND_ETM_TRACING)
#pragma error "TRACE DATA are not exposed in HW connector"
#elif defined(CONFIG_SOC_MEC1501_DEBUG_AND_SWV_TRACING)
ECS_REGS->DEBUG_CTRL = (MCHP_ECS_DCTRL_DBG_EN |
MCHP_ECS_DCTRL_MODE_SWD_SWV);
#endif /* CONFIG_SOC_MEC1501_DEBUG_AND_TRACING */
#endif /* CONFIG_SOC_MEC1501_DEBUG_WITHOUT_TRACING */
}
static int board_pinmux_init(const struct device *dev)
{
ARG_UNUSED(dev);
struct pinmux_ports_t pinmux_ports;
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay)
const struct device *const porta = DEVICE_DT_GET(DT_NODELABEL(pinmux_000_036));
__ASSERT_NO_MSG(device_is_ready(porta));
pinmux_ports.porta = porta;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_040_076), okay)
const struct device *const portb = DEVICE_DT_GET(DT_NODELABEL(pinmux_040_076));
__ASSERT_NO_MSG(device_is_ready(portb));
pinmux_ports.portb = portb;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_100_136), okay)
const struct device *const portc = DEVICE_DT_GET(DT_NODELABEL(pinmux_100_136));
__ASSERT_NO_MSG(device_is_ready(portc));
pinmux_ports.portc = portc;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay)
const struct device *const portd = DEVICE_DT_GET(DT_NODELABEL(pinmux_140_176));
__ASSERT_NO_MSG(device_is_ready(portd));
pinmux_ports.portd = portd;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_200_236), okay)
const struct device *const porte = DEVICE_DT_GET(DT_NODELABEL(pinmux_200_236));
__ASSERT_NO_MSG(device_is_ready(porte));
pinmux_ports.porte = porte;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_240_276), okay)
const struct device *const portf = DEVICE_DT_GET(DT_NODELABEL(pinmux_240_276));
__ASSERT_NO_MSG(device_is_ready(portf));
pinmux_ports.portf = portf;
#endif
/* Configure GPIO bank before usage
* VTR1 is not configurable
* VTR2 doesn't need configuration if setting VTR2_STRAP
*/
#ifdef CONFIG_SOC_MEC1501_VTR3_1_8V
ECS_REGS->GPIO_BANK_PWR |= MCHP_ECS_VTR3_LVL_18;
#endif
configure_debug_interface();
/* Configure pins that are not GPIOS by default */
#ifdef CONFIG_SOC_MEC1501_VCI_PINS_AS_GPIOS
pinmux_pin_set(porta, MCHP_GPIO_000, MCHP_GPIO_CTRL_MUX_F0);
pinmux_pin_set(portd, MCHP_GPIO_161, MCHP_GPIO_CTRL_MUX_F0);
pinmux_pin_set(portd, MCHP_GPIO_162, MCHP_GPIO_CTRL_MUX_F0);
pinmux_pin_set(portd, MCHP_GPIO_163, MCHP_GPIO_CTRL_MUX_F0);
pinmux_pin_set(portd, MCHP_GPIO_172, MCHP_GPIO_CTRL_MUX_F0);
pinmux_pin_set(portf, MCHP_GPIO_250, MCHP_GPIO_CTRL_MUX_F0);
#endif
pinmux_pin_set(portd, MCHP_GPIO_170, MCHP_GPIO_CTRL_MUX_F0);
/* See table 2-4 from the data sheet for pin multiplexing*/
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart0), okay)
/* Set muxing, for UART 0 TX/RX and power up */
mchp_pcr_periph_slp_ctrl(PCR_UART0, MCHP_PCR_SLEEP_DIS);
UART0_REGS->CFG_SEL = (MCHP_UART_LD_CFG_INTCLK +
MCHP_UART_LD_CFG_RESET_SYS + MCHP_UART_LD_CFG_NO_INVERT);
UART0_REGS->ACTV = MCHP_UART_LD_ACTIVATE;
pinmux_pin_set(portc, MCHP_GPIO_104, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(portc, MCHP_GPIO_105, MCHP_GPIO_CTRL_MUX_F1);
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay)
/* Set muxing, for UART 1 TX/RX and power up */
mchp_pcr_periph_slp_ctrl(PCR_UART1, MCHP_PCR_SLEEP_DIS);
UART1_REGS->CFG_SEL = (MCHP_UART_LD_CFG_INTCLK +
MCHP_UART_LD_CFG_RESET_SYS + MCHP_UART_LD_CFG_NO_INVERT);
UART1_REGS->ACTV = MCHP_UART_LD_ACTIVATE;
pinmux_pin_set(portd, MCHP_GPIO_170, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(portd, MCHP_GPIO_171, MCHP_GPIO_CTRL_MUX_F1);
#endif
#ifdef CONFIG_ADC_XEC
/* Disable sleep for ADC block */
mchp_pcr_periph_slp_ctrl(PCR_ADC, MCHP_PCR_SLEEP_DIS);
/* ADC pin muxes, ADC00 - ADC07 */
/* Note, by default ETM is enabled ADC00-ADC03 are not available */
#ifndef CONFIG_SOC_MEC1501_DEBUG_AND_ETM_TRACING
pinmux_pin_set(porte, MCHP_GPIO_200, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(porte, MCHP_GPIO_201, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(porte, MCHP_GPIO_202, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(porte, MCHP_GPIO_203, MCHP_GPIO_CTRL_MUX_F1);
#endif
pinmux_pin_set(porte, MCHP_GPIO_204, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(porte, MCHP_GPIO_205, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(porte, MCHP_GPIO_206, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(porte, MCHP_GPIO_207, MCHP_GPIO_CTRL_MUX_F1);
/* VREF2_ADC */
pinmux_pin_set(portb, MCHP_GPIO_067, MCHP_GPIO_CTRL_MUX_F1);
#endif /* CONFIG_ADC_XEC */
#ifdef CONFIG_I2C_XEC
#if DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_i2c), okay)
i2c_pinmux(&pinmux_ports, DT_PROP(DT_INST(0, microchip_xec_i2c), port_sel));
#endif
#if DT_NODE_HAS_STATUS(DT_INST(1, microchip_xec_i2c), okay)
i2c_pinmux(&pinmux_ports, DT_PROP(DT_INST(1, microchip_xec_i2c), port_sel));
#endif
#if DT_NODE_HAS_STATUS(DT_INST(2, microchip_xec_i2c), okay)
i2c_pinmux(&pinmux_ports, DT_PROP(DT_INST(2, microchip_xec_i2c), port_sel));
#endif
#if DT_NODE_HAS_STATUS(DT_INST(3, microchip_xec_i2c), okay)
i2c_pinmux(&pinmux_ports, DT_PROP(DT_INST(3, microchip_xec_i2c), port_sel));
#endif
#if DT_NODE_HAS_STATUS(DT_INST(4, microchip_xec_i2c), okay)
i2c_pinmux(&pinmux_ports, DT_PROP(DT_INST(4, microchip_xec_i2c), port_sel));
#endif
#endif /* CONFIG_I2C_XEC */
#ifdef CONFIG_ESPI_XEC
mchp_pcr_periph_slp_ctrl(PCR_ESPI, MCHP_PCR_SLEEP_DIS);
/* ESPI RESET */
pinmux_pin_set(portb, MCHP_GPIO_061, MCHP_GPIO_CTRL_MUX_F1);
/* ESPI ALERT */
pinmux_pin_set(portb, MCHP_GPIO_063, MCHP_GPIO_CTRL_MUX_F1);
/* ESPI CS */
pinmux_pin_set(portb, MCHP_GPIO_066, MCHP_GPIO_CTRL_MUX_F1);
/* ESPI CLK */
pinmux_pin_set(portb, MCHP_GPIO_065, MCHP_GPIO_CTRL_MUX_F1);
/* ESPI IO1-4*/
pinmux_pin_set(portb, MCHP_GPIO_070, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(portb, MCHP_GPIO_071, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(portb, MCHP_GPIO_072, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(portb, MCHP_GPIO_073, MCHP_GPIO_CTRL_MUX_F1);
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(ps2_0), okay)
/* Set muxing for PS20B*/
mchp_pcr_periph_slp_ctrl(PCR_PS2_0, MCHP_PCR_SLEEP_DIS);
pinmux_pin_set(porta, MCHP_GPIO_007, MCHP_GPIO_CTRL_MUX_F2 |
MCHP_GPIO_CTRL_BUFT_OPENDRAIN);
pinmux_pin_set(porta, MCHP_GPIO_010, MCHP_GPIO_CTRL_MUX_F2 |
MCHP_GPIO_CTRL_BUFT_OPENDRAIN);
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(ps2_1), okay)
/* Set muxing for PS21B*/
mchp_pcr_periph_slp_ctrl(PCR_PS2_1, MCHP_PCR_SLEEP_DIS);
pinmux_pin_set(portd, MCHP_GPIO_154, MCHP_GPIO_CTRL_MUX_F2 |
MCHP_GPIO_CTRL_BUFT_OPENDRAIN);
pinmux_pin_set(portd, MCHP_GPIO_155, MCHP_GPIO_CTRL_MUX_F2 |
MCHP_GPIO_CTRL_BUFT_OPENDRAIN);
#endif
#ifdef CONFIG_PWM_XEC
#if DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_pwm), okay)
mchp_pcr_periph_slp_ctrl(PCR_PWM0, MCHP_PCR_SLEEP_DIS);
pinmux_pin_set(portb, MCHP_GPIO_053, MCHP_GPIO_CTRL_MUX_F1);
#endif
#if DT_NODE_HAS_STATUS(DT_INST(1, microchip_xec_pwm), okay)
mchp_pcr_periph_slp_ctrl(PCR_PWM1, MCHP_PCR_SLEEP_DIS);
pinmux_pin_set(portb, MCHP_GPIO_054, MCHP_GPIO_CTRL_MUX_F1);
#endif
#if DT_NODE_HAS_STATUS(DT_INST(2, microchip_xec_pwm), okay)
mchp_pcr_periph_slp_ctrl(PCR_PWM2, MCHP_PCR_SLEEP_DIS);
pinmux_pin_set(portb, MCHP_GPIO_055, MCHP_GPIO_CTRL_MUX_F1);
#endif
#if DT_NODE_HAS_STATUS(DT_INST(3, microchip_xec_pwm), okay)
mchp_pcr_periph_slp_ctrl(PCR_PWM3, MCHP_PCR_SLEEP_DIS);
pinmux_pin_set(portb, MCHP_GPIO_056, MCHP_GPIO_CTRL_MUX_F1);
#endif
#if DT_NODE_HAS_STATUS(DT_INST(4, microchip_xec_pwm), okay)
mchp_pcr_periph_slp_ctrl(PCR_PWM4, MCHP_PCR_SLEEP_DIS);
pinmux_pin_set(porta, MCHP_GPIO_011, MCHP_GPIO_CTRL_MUX_F2);
#endif
#if DT_NODE_HAS_STATUS(DT_INST(5, microchip_xec_pwm), okay)
mchp_pcr_periph_slp_ctrl(PCR_PWM5, MCHP_PCR_SLEEP_DIS);
pinmux_pin_set(porta, MCHP_GPIO_002, MCHP_GPIO_CTRL_MUX_F1);
#endif
#if DT_NODE_HAS_STATUS(DT_INST(6, microchip_xec_pwm), okay)
mchp_pcr_periph_slp_ctrl(PCR_PWM6, MCHP_PCR_SLEEP_DIS);
pinmux_pin_set(porta, MCHP_GPIO_014, MCHP_GPIO_CTRL_MUX_F1);
#endif
#if DT_NODE_HAS_STATUS(DT_INST(7, microchip_xec_pwm), okay)
mchp_pcr_periph_slp_ctrl(PCR_PWM7, MCHP_PCR_SLEEP_DIS);
pinmux_pin_set(porta, MCHP_GPIO_015, MCHP_GPIO_CTRL_MUX_F1);
#endif
#if DT_NODE_HAS_STATUS(DT_INST(8, microchip_xec_pwm), okay)
mchp_pcr_periph_slp_ctrl(PCR_PWM8, MCHP_PCR_SLEEP_DIS);
pinmux_pin_set(porta, MCHP_GPIO_035, MCHP_GPIO_CTRL_MUX_F1);
#endif
#endif /* CONFIG_PWM_XEC */
#if defined CONFIG_KSCAN_XEC
/* KSCAN KSO00 */
pinmux_pin_set(portb, MCHP_GPIO_040,
MCHP_GPIO_CTRL_MUX_F2 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO01 */
pinmux_pin_set(portb, MCHP_GPIO_045,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO02 */
pinmux_pin_set(portb, MCHP_GPIO_046,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO012 */
pinmux_pin_set(portc, MCHP_GPIO_125,
MCHP_GPIO_CTRL_MUX_F2 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO013 */
pinmux_pin_set(portc, MCHP_GPIO_126,
MCHP_GPIO_CTRL_MUX_F2 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO03 */
pinmux_pin_set(portb, MCHP_GPIO_047,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO04 */
pinmux_pin_set(portc, MCHP_GPIO_107,
MCHP_GPIO_CTRL_MUX_F2 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO05 */
pinmux_pin_set(portc, MCHP_GPIO_112,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO06 */
pinmux_pin_set(portc, MCHP_GPIO_113,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO14 */
pinmux_pin_set(portd, MCHP_GPIO_152,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO15 */
pinmux_pin_set(portd, MCHP_GPIO_151,
MCHP_GPIO_CTRL_MUX_F2 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO07 */
pinmux_pin_set(portc, MCHP_GPIO_120,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO08 */
pinmux_pin_set(portc, MCHP_GPIO_121,
MCHP_GPIO_CTRL_MUX_F2 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO09 */
pinmux_pin_set(portc, MCHP_GPIO_122,
MCHP_GPIO_CTRL_MUX_F2 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO10 */
pinmux_pin_set(portc, MCHP_GPIO_123,
MCHP_GPIO_CTRL_MUX_F2 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO11 */
pinmux_pin_set(portc, MCHP_GPIO_124,
MCHP_GPIO_CTRL_MUX_F2 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSI00 */
pinmux_pin_set(porta, MCHP_GPIO_017,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSI01 */
pinmux_pin_set(porta, MCHP_GPIO_020,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSI02 */
pinmux_pin_set(porta, MCHP_GPIO_021,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSI03 */
pinmux_pin_set(porta, MCHP_GPIO_026,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSI04 */
pinmux_pin_set(porta, MCHP_GPIO_027,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSI05 */
pinmux_pin_set(porta, MCHP_GPIO_030,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSI06 */
pinmux_pin_set(porta, MCHP_GPIO_031,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSI07 */
pinmux_pin_set(porta, MCHP_GPIO_032,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
#endif /* CONFIG_KSCAN_XEC */
#ifdef CONFIG_PECI_XEC
ECS_REGS->PECI_DIS = 0x00u;
mchp_pcr_periph_slp_ctrl(PCR_PECI, MCHP_PCR_SLEEP_DIS);
pinmux_pin_set(portb, MCHP_GPIO_042, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(portb, MCHP_GPIO_044, MCHP_GPIO_CTRL_MUX_F1);
#endif
#ifdef CONFIG_SPI_XEC_QMSPI
#if DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_qmspi), okay)
mchp_pcr_periph_slp_ctrl(PCR_QMSPI, MCHP_PCR_SLEEP_DIS);
#if DT_PROP(DT_INST(0, microchip_xec_qmspi), port_sel) == 0
/* Port 0: Shared SPI pins. Shared has two chip selects */
#if DT_PROP(DT_INST(0, microchip_xec_qmspi), chip_select) == 0
pinmux_pin_set(portb, MCHP_GPIO_055, MCHP_GPIO_CTRL_MUX_F2);
#else
pinmux_pin_set(porta, MCHP_GPIO_002, MCHP_GPIO_CTRL_MUX_F2);
#endif
pinmux_pin_set(portb, MCHP_GPIO_056, MCHP_GPIO_CTRL_MUX_F2);
pinmux_pin_set(porte, MCHP_GPIO_223, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(porte, MCHP_GPIO_224, MCHP_GPIO_CTRL_MUX_F2);
#if DT_PROP(DT_INST(0, microchip_xec_qmspi), lines) == 4
pinmux_pin_set(porte, MCHP_GPIO_227, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(porta, MCHP_GPIO_016, MCHP_GPIO_CTRL_MUX_F2);
#endif
#else
/* Port 1: Private SPI pins. Only one chip select */
pinmux_pin_set(portc, MCHP_GPIO_124, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(portc, MCHP_GPIO_125, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(portc, MCHP_GPIO_121, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(portc, MCHP_GPIO_122, MCHP_GPIO_CTRL_MUX_F1);
#if DT_PROP(DT_INST(0, microchip_xec_qmspi), lines) == 4
pinmux_pin_set(portc, MCHP_GPIO_123, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(portc, MCHP_GPIO_126, MCHP_GPIO_CTRL_MUX_F1);
#endif
#endif /* DT_PROP(DT_INST(0, microchip_xec_qmspi), port_sel) == 0 */
#endif /* DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_qmspi), okay) */
#endif /* CONFIG_SPI_XEC_QMSPI */
#ifdef CONFIG_SOC_MEC1501_TEST_CLK_OUT
/*
* Deep sleep testing: Enable TEST_CLK_OUT on GPIO_060 function 2.
* TEST_CLK_OUT is the PLL 48MHz conditioned output.
*/
pinmux_pin_set(portb, MCHP_GPIO_060, MCHP_GPIO_CTRL_MUX_F2);
#endif
#ifdef CONFIG_TACH_XEC
#if DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_tach), okay)
pinmux_pin_set(portb, MCHP_GPIO_050, MCHP_GPIO_CTRL_MUX_F1);
#endif /* CONFIG_TACH_XEC */
#endif
return 0;
}
SYS_INIT(board_pinmux_init, PRE_KERNEL_1, CONFIG_PINMUX_INIT_PRIORITY);

View File

@@ -4,9 +4,6 @@
# SPDX-License-Identifier: Apache-2.0
#
zephyr_library()
zephyr_library_sources(pinmux.c)
if(DEFINED ENV{EVERGLADES_SPI_GEN})
# Grab it from environment variable if defined
set(EVERGLADES_SPI_GEN $ENV{EVERGLADES_SPI_GEN})

View File

@@ -0,0 +1,122 @@
/*
* Copyright (c) 2022, Microchip Technology Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <microchip/mec1501hsz.dtsi>
#include <microchip/mec152x/mec152xhsz-pinctrl.dtsi>
&ps2_clk0b_gpio007 {
drive-open-drain;
};
&ps2_dat0b_gpio010 {
drive-open-drain;
};
&ps2_clk1b_gpio154 {
drive-open-drain;
};
&ps2_dat1b_gpio155 {
drive-open-drain;
};
&kso00_gpio040 {
bias-pull-up;
};
&kso01_gpio045 {
bias-pull-up;
};
&kso02_gpio046 {
bias-pull-up;
};
&kso12_gpio125 {
bias-pull-up;
};
&kso13_gpio126 {
bias-pull-up;
};
&kso03_gpio047 {
bias-pull-up;
};
&kso04_gpio107 {
bias-pull-up;
};
&kso05_gpio112 {
bias-pull-up;
};
&kso06_gpio113 {
bias-pull-up;
};
&kso14_gpio152 {
bias-pull-up;
};
&kso15_gpio151 {
bias-pull-up;
};
&kso07_gpio120 {
bias-pull-up;
};
&kso08_gpio121 {
bias-pull-up;
};
&kso09_gpio122 {
bias-pull-up;
};
&kso10_gpio123 {
bias-pull-up;
};
&kso11_gpio124 {
bias-pull-up;
};
&ksi0_gpio017 {
bias-pull-up;
};
&ksi1_gpio020 {
bias-pull-up;
};
&ksi2_gpio021 {
bias-pull-up;
};
&ksi3_gpio026 {
bias-pull-up;
};
&ksi4_gpio027 {
bias-pull-up;
};
&ksi5_gpio030 {
bias-pull-up;
};
&ksi6_gpio031 {
bias-pull-up;
};
&ksi7_gpio032 {
bias-pull-up;
};

View File

@@ -6,8 +6,7 @@
/dts-v1/;
#include <microchip/mec1501hsz.dtsi>
#include <microchip/mec152x/mec152xhsz-pinctrl.dtsi>
#include "mec15xxevb_assy6853-pinctrl.dtsi"
/ {
model = "Microchip MEC15XXEVB_ASSY6853 evaluation board";
@@ -85,6 +84,10 @@
&adc0 {
status = "okay";
pinctrl-0 = <&adc04_gpio204 &adc05_gpio205
&adc06_gpio206 &adc07_gpio207
&vref2_adc_gpio067 >;
pinctrl-names = "default";
};
&i2c_smb_0 {
@@ -92,6 +95,8 @@
port_sel = <0>;
sda-gpios = <&gpio_000_036 3 0>;
scl-gpios = <&gpio_000_036 4 0>;
pinctrl-0 = < &i2c00_scl_gpio004 &i2c00_sda_gpio003 >;
pinctrl-names = "default";
};
&i2c_smb_1 {
@@ -99,6 +104,8 @@
port_sel = <1>;
sda-gpios = <&gpio_100_136 24 0>;
scl-gpios = <&gpio_100_136 25 0>;
pinctrl-0 = < &i2c01_scl_gpio131 &i2c01_sda_gpio130 >;
pinctrl-names = "default";
pca9555@26 {
compatible = "nxp,pca95xx";
@@ -122,6 +129,8 @@
port_sel = <7>;
sda-gpios = <&gpio_000_036 10 0>;
scl-gpios = <&gpio_000_036 11 0>;
pinctrl-0 = < &i2c07_scl_gpio013 &i2c07_sda_gpio012 >;
pinctrl-names = "default";
};
&espi0 {
@@ -129,6 +138,11 @@
io_girq = <19>;
vw_girqs = <24 25>;
pc_girq = <15>;
pinctrl-0 = < &espi_reset_n_gpio061 &espi_cs_n_gpio066
&espi_alert_n_gpio063 &espi_clk_gpio065
&espi_io0_gpio070 &espi_io1_gpio071
&espi_io2_gpio072 &espi_io3_gpio073 >;
pinctrl-names = "default";
};
&timer5 {
@@ -137,22 +151,56 @@
&ps2_0 {
status = "okay";
pinctrl-0 = <&ps2_clk0b_gpio007 &ps2_dat0b_gpio010>;
pinctrl-names = "default";
};
&ps2_1 {
status = "okay";
pinctrl-0 = <&ps2_clk1b_gpio154 &ps2_dat1b_gpio155>;
pinctrl-names = "default";
};
&pwm0 {
status = "okay";
pinctrl-0 = <&pwm0_gpio053>;
pinctrl-names = "default";
};
&kscan0 {
status = "okay";
pinctrl-0 = < &kso00_gpio040
&kso01_gpio045
&kso02_gpio046
&kso12_gpio125
&kso13_gpio126
&kso03_gpio047
&kso04_gpio107
&kso05_gpio112
&kso06_gpio113
&kso14_gpio152
&kso15_gpio151
&kso07_gpio120
&kso08_gpio121
&kso09_gpio122
&kso10_gpio123
&kso11_gpio124
&ksi0_gpio017
&ksi1_gpio020
&ksi2_gpio021
&ksi3_gpio026
&ksi4_gpio027
&ksi5_gpio030
&ksi6_gpio031
&ksi7_gpio032 >;
pinctrl-names = "default";
};
&peci0 {
status = "okay";
pinctrl-0 = <&peci_dat_gpio042 &vref_vtt_gpio044>;
pinctrl-names = "default";
};
&spi0 {
@@ -160,8 +208,15 @@
port_sel = <0>;
chip_select = <0>;
lines = <1>;
pinctrl-0 = < &shd_cs0_n_gpio055
&shd_clk_gpio056
&shd_io0_gpio223
&shd_io1_gpio224 >;
pinctrl-names = "default";
};
&tach0 {
status = "okay";
pinctrl-0 = <&ict0_tach0_gpio050>;
pinctrl-names = "default";
};

View File

@@ -19,7 +19,6 @@ supported:
- espi
- gpio
- i2c
- pinmux
- pwm
- watchdog
- kscan

View File

@@ -13,8 +13,8 @@ CONFIG_RTOS_TIMER=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_PINMUX=y
CONFIG_GPIO=y
CONFIG_PINCTRL=y
# power management stuff
CONFIG_PM=y

View File

@@ -1,474 +0,0 @@
/*
* Copyright (c) 2018 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/kernel.h>
#include <zephyr/drivers/pinmux.h>
#include "soc.h"
struct pinmux_ports_t {
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay)
const struct device *porta;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_040_076), okay)
const struct device *portb;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_100_136), okay)
const struct device *portc;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay)
const struct device *portd;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_200_236), okay)
const struct device *porte;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_240_276), okay)
const struct device *portf;
#endif
};
#ifdef CONFIG_I2C_XEC
static void i2c_pinmux(struct pinmux_ports_t *p, uint8_t port_sel)
{
switch (port_sel) {
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay)
case 0:
pinmux_pin_set(p->porta, MCHP_GPIO_003, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(p->porta, MCHP_GPIO_004, MCHP_GPIO_CTRL_MUX_F1);
break;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_100_136), okay)
case 1:
pinmux_pin_set(p->portc, MCHP_GPIO_130, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(p->portc, MCHP_GPIO_131, MCHP_GPIO_CTRL_MUX_F1);
break;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay)
case 2:
pinmux_pin_set(p->portd, MCHP_GPIO_154, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(p->portd, MCHP_GPIO_155, MCHP_GPIO_CTRL_MUX_F1);
break;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay)
case 3:
pinmux_pin_set(p->porta, MCHP_GPIO_007, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(p->porta, MCHP_GPIO_010, MCHP_GPIO_CTRL_MUX_F1);
break;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay)
case 4:
pinmux_pin_set(p->portd, MCHP_GPIO_143, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(p->portd, MCHP_GPIO_144, MCHP_GPIO_CTRL_MUX_F1);
break;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay)
case 5:
pinmux_pin_set(p->portd, MCHP_GPIO_141, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(p->portd, MCHP_GPIO_142, MCHP_GPIO_CTRL_MUX_F1);
break;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_100_136), okay)
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay)
case 6:
pinmux_pin_set(p->portc, MCHP_GPIO_132, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(p->portd, MCHP_GPIO_140, MCHP_GPIO_CTRL_MUX_F1);
break;
#endif
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay)
case 7:
pinmux_pin_set(p->porta, MCHP_GPIO_012, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(p->porta, MCHP_GPIO_013, MCHP_GPIO_CTRL_MUX_F1);
break;
#endif
default:
break;
}
}
#endif
static void configure_debug_interface(void)
{
/* No debug support */
ECS_REGS->DEBUG_CTRL = 0;
ECS_REGS->ETM_CTRL = 0;
#ifdef CONFIG_SOC_MEC1501_DEBUG_WITHOUT_TRACING
/* Release JTAG TDI and JTAG TDO pins so they can be
* controlled by their respective PCR register (UART2).
* For more details see table 44-1
*/
ECS_REGS->DEBUG_CTRL = (MCHP_ECS_DCTRL_DBG_EN |
MCHP_ECS_DCTRL_MODE_SWD);
#elif defined(CONFIG_SOC_MEC1501_DEBUG_AND_TRACING)
#if defined(CONFIG_SOC_MEC1501_DEBUG_AND_ETM_TRACING)
ECS_REGS->ETM_CTRL = MCHP_ECS_ETM_CTRL_EN;
ECS_REGS->DEBUG_CTRL = (MCHP_ECS_DCTRL_DBG_EN |
MCHP_ECS_DCTRL_MODE_SWD);
#elif defined(CONFIG_SOC_MEC1501_DEBUG_AND_SWV_TRACING)
ECS_REGS->DEBUG_CTRL = (MCHP_ECS_DCTRL_DBG_EN |
MCHP_ECS_DCTRL_MODE_SWD_SWV);
#endif /* CONFIG_SOC_MEC1501_DEBUG_AND_TRACING */
#endif /* CONFIG_SOC_MEC1501_DEBUG_WITHOUT_TRACING */
}
static int board_pinmux_init(const struct device *dev)
{
ARG_UNUSED(dev);
struct pinmux_ports_t pinmux_ports;
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay)
const struct device *const porta = DEVICE_DT_GET(DT_NODELABEL(pinmux_000_036));
__ASSERT_NO_MSG(device_is_ready(porta));
pinmux_ports.porta = porta;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_040_076), okay)
const struct device *const portb = DEVICE_DT_GET(DT_NODELABEL(pinmux_040_076));
__ASSERT_NO_MSG(device_is_ready(portb));
pinmux_ports.portb = portb;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_100_136), okay)
const struct device *const portc = DEVICE_DT_GET(DT_NODELABEL(pinmux_100_136));
__ASSERT_NO_MSG(device_is_ready(portc));
pinmux_ports.portc = portc;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay)
const struct device *const portd = DEVICE_DT_GET(DT_NODELABEL(pinmux_140_176));
__ASSERT_NO_MSG(device_is_ready(portd));
pinmux_ports.portd = portd;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_200_236), okay)
const struct device *const porte = DEVICE_DT_GET(DT_NODELABEL(pinmux_200_236));
__ASSERT_NO_MSG(device_is_ready(porte));
pinmux_ports.porte = porte;
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_240_276), okay)
const struct device *const portf = DEVICE_DT_GET(DT_NODELABEL(pinmux_240_276));
__ASSERT_NO_MSG(device_is_ready(portf));
pinmux_ports.portf = portf;
#endif
/* Configure GPIO bank before usage
* VTR1 is not configurable
* VTR2 doesn't need configuration if setting VTR2_STRAP
*/
#ifdef CONFIG_SOC_MEC1501_VTR3_1_8V
ECS_REGS->GPIO_BANK_PWR |= MCHP_ECS_VTR3_LVL_18;
#endif
configure_debug_interface();
/* Configure pins that are not GPIOS by default */
#ifdef CONFIG_SOC_MEC1501_VCI_PINS_AS_GPIOS
pinmux_pin_set(porta, MCHP_GPIO_000, MCHP_GPIO_CTRL_MUX_F0);
pinmux_pin_set(portd, MCHP_GPIO_161, MCHP_GPIO_CTRL_MUX_F0);
pinmux_pin_set(portd, MCHP_GPIO_162, MCHP_GPIO_CTRL_MUX_F0);
pinmux_pin_set(portd, MCHP_GPIO_163, MCHP_GPIO_CTRL_MUX_F0);
pinmux_pin_set(portd, MCHP_GPIO_172, MCHP_GPIO_CTRL_MUX_F0);
pinmux_pin_set(portf, MCHP_GPIO_250, MCHP_GPIO_CTRL_MUX_F0);
#endif
pinmux_pin_set(portd, MCHP_GPIO_170, MCHP_GPIO_CTRL_MUX_F0);
/* See table 2-4 from the data sheet for pin multiplexing*/
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay)
/* Set muxing, for UART 2 TX/RX and power up */
mchp_pcr_periph_slp_ctrl(PCR_UART2, MCHP_PCR_SLEEP_DIS);
UART2_REGS->CFG_SEL = (MCHP_UART_LD_CFG_INTCLK +
MCHP_UART_LD_CFG_RESET_SYS + MCHP_UART_LD_CFG_NO_INVERT);
UART2_REGS->ACTV = MCHP_UART_LD_ACTIVATE;
pinmux_pin_set(portd, MCHP_GPIO_145, MCHP_GPIO_CTRL_MUX_F2);
pinmux_pin_set(portd, MCHP_GPIO_146, MCHP_GPIO_CTRL_MUX_F2);
#endif
#ifdef CONFIG_ADC_XEC
/* Disable sleep for ADC block */
mchp_pcr_periph_slp_ctrl(PCR_ADC, MCHP_PCR_SLEEP_DIS);
/* ADC pin muxes, ADC00 - ADC07 */
/* Note, by default ETM is enabled ADC00-ADC03 are not available */
#ifndef CONFIG_SOC_MEC1501_DEBUG_AND_ETM_TRACING
pinmux_pin_set(porte, MCHP_GPIO_200, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(porte, MCHP_GPIO_201, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(porte, MCHP_GPIO_202, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(porte, MCHP_GPIO_203, MCHP_GPIO_CTRL_MUX_F1);
#endif
pinmux_pin_set(porte, MCHP_GPIO_204, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(porte, MCHP_GPIO_205, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(porte, MCHP_GPIO_206, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(porte, MCHP_GPIO_207, MCHP_GPIO_CTRL_MUX_F1);
/* VREF2_ADC */
pinmux_pin_set(portb, MCHP_GPIO_067, MCHP_GPIO_CTRL_MUX_F1);
#endif /* CONFIG_ADC_XEC */
#ifdef CONFIG_I2C_XEC
#if DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_i2c), okay)
i2c_pinmux(&pinmux_ports, DT_PROP(DT_INST(0, microchip_xec_i2c), port_sel));
#endif
#if DT_NODE_HAS_STATUS(DT_INST(1, microchip_xec_i2c), okay)
i2c_pinmux(&pinmux_ports, DT_PROP(DT_INST(1, microchip_xec_i2c), port_sel));
#endif
#if DT_NODE_HAS_STATUS(DT_INST(2, microchip_xec_i2c), okay)
i2c_pinmux(&pinmux_ports, DT_PROP(DT_INST(2, microchip_xec_i2c), port_sel));
#endif
#if DT_NODE_HAS_STATUS(DT_INST(3, microchip_xec_i2c), okay)
i2c_pinmux(&pinmux_ports, DT_PROP(DT_INST(3, microchip_xec_i2c), port_sel));
#endif
#if DT_NODE_HAS_STATUS(DT_INST(4, microchip_xec_i2c), okay)
i2c_pinmux(&pinmux_ports, DT_PROP(DT_INST(4, microchip_xec_i2c), port_sel));
#endif
#endif /* CONFIG_I2C_XEC */
#ifdef CONFIG_ESPI_XEC
mchp_pcr_periph_slp_ctrl(PCR_ESPI, MCHP_PCR_SLEEP_DIS);
/* ESPI RESET */
pinmux_pin_set(portb, MCHP_GPIO_061, MCHP_GPIO_CTRL_MUX_F1);
/* ESPI ALERT */
pinmux_pin_set(portb, MCHP_GPIO_063, MCHP_GPIO_CTRL_MUX_F1);
/* ESPI CS */
pinmux_pin_set(portb, MCHP_GPIO_066, MCHP_GPIO_CTRL_MUX_F1);
/* ESPI CLK */
pinmux_pin_set(portb, MCHP_GPIO_065, MCHP_GPIO_CTRL_MUX_F1);
/* ESPI IO1-4*/
pinmux_pin_set(portb, MCHP_GPIO_070, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(portb, MCHP_GPIO_071, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(portb, MCHP_GPIO_072, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(portb, MCHP_GPIO_073, MCHP_GPIO_CTRL_MUX_F1);
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(ps2_0), okay)
/* Set muxing for PS20B*/
mchp_pcr_periph_slp_ctrl(PCR_PS2_0, MCHP_PCR_SLEEP_DIS);
pinmux_pin_set(porta, MCHP_GPIO_007, MCHP_GPIO_CTRL_MUX_F2 |
MCHP_GPIO_CTRL_BUFT_OPENDRAIN);
pinmux_pin_set(porta, MCHP_GPIO_010, MCHP_GPIO_CTRL_MUX_F2 |
MCHP_GPIO_CTRL_BUFT_OPENDRAIN);
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(ps2_1), okay)
/* Set muxing for PS21B*/
mchp_pcr_periph_slp_ctrl(PCR_PS2_1, MCHP_PCR_SLEEP_DIS);
pinmux_pin_set(portd, MCHP_GPIO_154, MCHP_GPIO_CTRL_MUX_F2 |
MCHP_GPIO_CTRL_BUFT_OPENDRAIN);
pinmux_pin_set(portd, MCHP_GPIO_155, MCHP_GPIO_CTRL_MUX_F2 |
MCHP_GPIO_CTRL_BUFT_OPENDRAIN);
#endif
#ifdef CONFIG_PWM_XEC
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm0), okay)
mchp_pcr_periph_slp_ctrl(PCR_PWM0, MCHP_PCR_SLEEP_DIS);
pinmux_pin_set(portb, MCHP_GPIO_053, MCHP_GPIO_CTRL_MUX_F1);
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm1), okay)
mchp_pcr_periph_slp_ctrl(PCR_PWM1, MCHP_PCR_SLEEP_DIS);
pinmux_pin_set(portb, MCHP_GPIO_054, MCHP_GPIO_CTRL_MUX_F1);
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay)
mchp_pcr_periph_slp_ctrl(PCR_PWM2, MCHP_PCR_SLEEP_DIS);
pinmux_pin_set(portb, MCHP_GPIO_055, MCHP_GPIO_CTRL_MUX_F1);
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm3), okay)
mchp_pcr_periph_slp_ctrl(PCR_PWM3, MCHP_PCR_SLEEP_DIS);
pinmux_pin_set(portb, MCHP_GPIO_056, MCHP_GPIO_CTRL_MUX_F1);
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm4), okay)
mchp_pcr_periph_slp_ctrl(PCR_PWM4, MCHP_PCR_SLEEP_DIS);
pinmux_pin_set(porta, MCHP_GPIO_011, MCHP_GPIO_CTRL_MUX_F2);
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm5), okay)
mchp_pcr_periph_slp_ctrl(PCR_PWM5, MCHP_PCR_SLEEP_DIS);
pinmux_pin_set(porta, MCHP_GPIO_002, MCHP_GPIO_CTRL_MUX_F1);
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm6), okay)
mchp_pcr_periph_slp_ctrl(PCR_PWM6, MCHP_PCR_SLEEP_DIS);
pinmux_pin_set(porta, MCHP_GPIO_014, MCHP_GPIO_CTRL_MUX_F1);
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm7), okay)
mchp_pcr_periph_slp_ctrl(PCR_PWM7, MCHP_PCR_SLEEP_DIS);
pinmux_pin_set(porta, MCHP_GPIO_015, MCHP_GPIO_CTRL_MUX_F1);
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm8), okay)
mchp_pcr_periph_slp_ctrl(PCR_PWM8, MCHP_PCR_SLEEP_DIS);
pinmux_pin_set(porta, MCHP_GPIO_035, MCHP_GPIO_CTRL_MUX_F1);
#endif
#endif /* CONFIG_PWM_XEC */
#if defined CONFIG_KSCAN_XEC
/* KSCAN KSO00 */
pinmux_pin_set(portb, MCHP_GPIO_040,
MCHP_GPIO_CTRL_MUX_F2 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO01 */
pinmux_pin_set(portb, MCHP_GPIO_045,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO02 */
pinmux_pin_set(portb, MCHP_GPIO_046,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO012 */
pinmux_pin_set(portc, MCHP_GPIO_125,
MCHP_GPIO_CTRL_MUX_F2 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO013 */
pinmux_pin_set(portc, MCHP_GPIO_126,
MCHP_GPIO_CTRL_MUX_F2 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO03 */
pinmux_pin_set(portb, MCHP_GPIO_047,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO04 */
pinmux_pin_set(portc, MCHP_GPIO_107,
MCHP_GPIO_CTRL_MUX_F2 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO05 */
pinmux_pin_set(portc, MCHP_GPIO_112,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO06 */
pinmux_pin_set(portc, MCHP_GPIO_113,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO14 */
pinmux_pin_set(portd, MCHP_GPIO_152,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO15 */
pinmux_pin_set(portd, MCHP_GPIO_151,
MCHP_GPIO_CTRL_MUX_F2 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO07 */
pinmux_pin_set(portc, MCHP_GPIO_120,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO08 */
pinmux_pin_set(portc, MCHP_GPIO_121,
MCHP_GPIO_CTRL_MUX_F2 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO09 */
pinmux_pin_set(portc, MCHP_GPIO_122,
MCHP_GPIO_CTRL_MUX_F2 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO10 */
pinmux_pin_set(portc, MCHP_GPIO_123,
MCHP_GPIO_CTRL_MUX_F2 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSO11 */
pinmux_pin_set(portc, MCHP_GPIO_124,
MCHP_GPIO_CTRL_MUX_F2 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSI00 */
pinmux_pin_set(porta, MCHP_GPIO_017,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSI01 */
pinmux_pin_set(porta, MCHP_GPIO_020,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSI02 */
pinmux_pin_set(porta, MCHP_GPIO_021,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSI03 */
pinmux_pin_set(porta, MCHP_GPIO_026,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSI04 */
pinmux_pin_set(porta, MCHP_GPIO_027,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSI05 */
pinmux_pin_set(porta, MCHP_GPIO_030,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSI06 */
pinmux_pin_set(porta, MCHP_GPIO_031,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
/* KSCAN KSI07 */
pinmux_pin_set(porta, MCHP_GPIO_032,
MCHP_GPIO_CTRL_MUX_F1 | MCHP_GPIO_CTRL_PUD_PU);
#endif /* CONFIG_KSCAN_XEC */
#ifdef CONFIG_PECI_XEC
ECS_REGS->PECI_DIS = 0x00u;
mchp_pcr_periph_slp_ctrl(PCR_PECI, MCHP_PCR_SLEEP_DIS);
pinmux_pin_set(portb, MCHP_GPIO_042, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(portb, MCHP_GPIO_044, MCHP_GPIO_CTRL_MUX_F1);
#endif
#ifdef CONFIG_SPI_XEC_QMSPI
#if DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_qmspi), okay)
mchp_pcr_periph_slp_ctrl(PCR_QMSPI, MCHP_PCR_SLEEP_DIS);
#if DT_PROP(DT_INST(0, microchip_xec_qmspi), port_sel) == 0
/* Port 0: Shared SPI pins. Shared has two chip selects */
#if DT_PROP(DT_INST(0, microchip_xec_qmspi), chip_select) == 0
pinmux_pin_set(portb, MCHP_GPIO_055, MCHP_GPIO_CTRL_MUX_F2);
#else
pinmux_pin_set(porta, MCHP_GPIO_002, MCHP_GPIO_CTRL_MUX_F2);
#endif
pinmux_pin_set(portb, MCHP_GPIO_056, MCHP_GPIO_CTRL_MUX_F2);
pinmux_pin_set(porte, MCHP_GPIO_223, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(porte, MCHP_GPIO_224, MCHP_GPIO_CTRL_MUX_F2);
#if DT_PROP(DT_INST(0, microchip_xec_qmspi), lines) == 4
pinmux_pin_set(porte, MCHP_GPIO_227, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(porta, MCHP_GPIO_016, MCHP_GPIO_CTRL_MUX_F2);
#endif
#else
/* Port 1: Private SPI pins. Only one chip select */
pinmux_pin_set(portc, MCHP_GPIO_124, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(portc, MCHP_GPIO_125, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(portc, MCHP_GPIO_121, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(portc, MCHP_GPIO_122, MCHP_GPIO_CTRL_MUX_F1);
#if DT_PROP(DT_INST(0, microchip_xec_qmspi), lines) == 4
pinmux_pin_set(portc, MCHP_GPIO_123, MCHP_GPIO_CTRL_MUX_F1);
pinmux_pin_set(portc, MCHP_GPIO_126, MCHP_GPIO_CTRL_MUX_F1);
#endif
#endif /* DT_PROP(DT_INST(0, microchip_xec_qmspi), port_sel) == 0 */
#endif /* DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_qmspi), okay) */
#endif /* CONFIG_SPI_XEC_QMSPI */
#ifdef CONFIG_SOC_MEC1501_TEST_CLK_OUT
/*
* Deep sleep testing: Enable TEST_CLK_OUT on GPIO_060 function 2.
* TEST_CLK_OUT is the PLL 48MHz conditioned output.
*/
pinmux_pin_set(portb, MCHP_GPIO_060, MCHP_GPIO_CTRL_MUX_F2);
#endif
#ifdef CONFIG_TACH_XEC
#if DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_tach), okay)
pinmux_pin_set(portb, MCHP_GPIO_050, MCHP_GPIO_CTRL_MUX_F1);
#endif /* CONFIG_TACH_XEC */
#endif
return 0;
}
SYS_INIT(board_pinmux_init, PRE_KERNEL_1, CONFIG_PINMUX_INIT_PRIORITY);

View File

@@ -427,6 +427,35 @@ Troubleshooting
#. If Dediprog can't detect the onboard flash, press the board's Reset button and try again.
PCA9555 Enabling
================
#. To enable PCA9555PW and test the I2C on mec172xevb_assy6906, additional works are needed:
As the I2C slave device NXP pca95xx on mec172xevb_assy6906 is connected to I2C00 port,
however, I2C00 port is shared with UART2 RS232 to TTL converter used to catch serial log,
so it's not possible to use UART2 and I2C00 port simultaneously. We need to change to use
I2C01 port by making some jumpers setting as below:
+---------+---------+------------------------------------------+
| Pin 1 | Pin 2 | Comment |
+=========+=========+==========================================+
| JP49.1 | JP49.2 | Connect PCA9555 VCC to +3.3V_STBY |
+---------+---------+------------------------------------------+
| JP53.1 | JP53.2 | Select address 0100b, which means 0x26 |
+---------+---------+------------------------------------------+
| JP12.13 | JP12.14 | Connect I2C01_SDA from CPU to header J20 |
+---------+---------+------------------------------------------+
| JP12.4 | JP12.5 | Connect I2C01_SCL from CPU to header J20 |
+---------+---------+------------------------------------------+
| JP77.7 | JP77.8 | External pull-up for I2C01_SDA |
+---------+---------+------------------------------------------+
| JP77.9 | JP77.10 | External pull-up for I2C01_SCL |
+---------+---------+------------------------------------------+
| JP58.1 | JP20.1 | Connect NXP PCA9555 SCL to I2C01 |
+---------+---------+------------------------------------------+
| JP58.3 | JP20.3 | Connect NXP PCA9555 SDA to I2C01 |
+---------+---------+------------------------------------------+
References
**********

View File

@@ -15,7 +15,6 @@ ram: 64
flash: 352
supported:
- gpio
- pinmux
- i2c
- adc
- pwm

View File

@@ -54,8 +54,12 @@ these references:
Supported Features
==================
The mimxrt1010_evk board configuration supports the following hardware
features:
The mimxrt1010_evk board configuration supports the hardware features listed
below. For additional features not yet supported, please also refer to the
:ref:`mimxrt1064_evk` , which is the superset board in NXP's i.MX RT10xx family.
NXP prioritizes enabling the superset board with NXP's Full Platform Support for
Zephyr. Therefore, the mimxrt1064_evk board may have additional features
already supported, which can also be re-used on this mimxrt1010_evk board:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
@@ -200,7 +204,7 @@ see the following message in the terminal:
https://www.nxp.com/webapp/Download?colCode=MIMXRT1010EVKHUG
.. _MIMXRT1010-EVK Design Files:
https://www.nxp.com/downloads/en/printed-circuit-boards/IMXRT1010-EVK-DESIGN-FILES.7z
https://www.nxp.com/webapp/Download?colCode=IMXRT1010-EVK-DESIGN-FILES
.. _i.MX RT1010 Website:
https://www.nxp.com/imxrt1010

View File

@@ -54,8 +54,12 @@ these references:
Supported Features
==================
The mimxrt1015_evk board configuration supports the following hardware
features:
The mimxrt1015_evk board configuration supports the hardware features listed
below. For additional features not yet supported, please also refer to the
:ref:`mimxrt1064_evk` , which is the superset board in NXP's i.MX RT10xx family.
NXP prioritizes enabling the superset board with NXP's Full Platform Support for
Zephyr. Therefore, the mimxrt1064_evk board may have additional features
already supported, which can also be re-used on this mimxrt1015_evk board:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |

View File

@@ -62,8 +62,12 @@ these references:
Supported Features
==================
The mimxrt1020_evk board configuration supports the following hardware
features:
The mimxrt1020_evk board configuration supports the hardware features listed
below. For additional features not yet supported, please also refer to the
:ref:`mimxrt1064_evk` , which is the superset board in NXP's i.MX RT10xx family.
NXP prioritizes enabling the superset board with NXP's Full Platform Support for
Zephyr. Therefore, the mimxrt1064_evk board may have additional features
already supported, which can also be re-used on this mimxrt1020_evk board:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |

View File

@@ -67,8 +67,12 @@ these references:
Supported Features
==================
The mimxrt1024_evk board configuration supports the following hardware
features:
The mimxrt1024_evk board configuration supports the hardware features listed
below. For additional features not yet supported, please also refer to the
:ref:`mimxrt1064_evk` , which is the superset board in NXP's i.MX RT10xx family.
NXP prioritizes enabling the superset board with NXP's Full Platform Support for
Zephyr. Therefore, the mimxrt1064_evk board may have additional features
already supported, which can also be re-used on this mimxrt1024_evk board:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
@@ -260,10 +264,10 @@ should see the following message in the terminal:
https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/i-mx-rt1024-evaluation-kit:MIMXRT1024-EVK
.. _MIMXRT1024-EVK User Guide:
https://www.nxp.com.cn/docs/en/user-guide/MIMXRT1024EVKHUG.pdf
https://www.nxp.com/webapp/Download?colCode=MIMXRT1024EVKHUG
.. _MIMXRT1024-EVK Design Files:
https://www.nxp.com/webapp/sps/download/preDownload.jsp?render=true
https://www.nxp.com/webapp/Download?colCode=MIMXRT1024-EVK-Design-Files
.. _i.MX RT1024 Website:
https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/i-mx-rt-crossover-mcus/i-mx-rt1024-crossover-processor-with-arm-cortex-m7-core:i.MX-RT1024
@@ -272,4 +276,4 @@ should see the following message in the terminal:
https://www.nxp.com.cn/docs/en/data-sheet/IMXRT1024CEC.pdf
.. _i.MX RT1024 Reference Manual:
https://www.nxp.com.cn/docs/en/reference-manual/IMXRT1024RM.pdf
https://www.nxp.com/webapp/Download?colCode=IMXRT1024RM

View File

@@ -7,5 +7,9 @@
board_runner_args(pyocd "--target=mimxrt1050_hyperflash")
board_runner_args(jlink "--device=MCIMXRT1052")
if(${CONFIG_BOARD_MIMXRT1050_EVK_QSPI})
board_runner_args(jlink "--loader=BankAddr=0x60000000&Loader=QSPI")
endif()
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)

View File

@@ -7,5 +7,9 @@
board_runner_args(pyocd "--target=mimxrt1060")
board_runner_args(jlink "--device=MIMXRT1062xxx6A")
if ((${CONFIG_BOARD_MIMXRT1060_EVK}) OR (${CONFIG_BOARD_MIMXRT1060_EVKB}))
board_runner_args(jlink "--loader=BankAddr=0x60000000&Loader=QSPI")
endif()
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)

View File

@@ -83,8 +83,12 @@ these references:
Supported Features
==================
The mimxrt1060_evk board configuration supports the following hardware
features:
The mimxrt1060_evk board configuration supports the hardware features listed
below. For additional features not yet supported, please also refer to the
:ref:`mimxrt1064_evk` , which is the superset board in NXP's i.MX RT10xx family.
NXP prioritizes enabling the superset board with NXP's Full Platform Support for
Zephyr. Therefore, the mimxrt1064_evk board may have additional features
already supported, which can also be re-used on this mimxrt1060_evk board:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
@@ -315,8 +319,8 @@ path.
There are two options: the onboard debug circuit can be updated with Segger
J-Link firmware, or :ref:`jlink-external-debug-probe` can be attached to the
EVK. See `Using J-Link with MIMXRT1060-EVK or MIMXRT1064-EVK`_ for more
details.
EVK. See `Using J-Link with MIMXRT1060-EVK or MIMXRT1064-EVK`_ or
`Using J-Link with MIMXRT1060-EVKB`_ for more details.
Configuring a Console
=====================
@@ -433,3 +437,6 @@ connected to the EVK properly. See :ref:`Using J-Link RT1060` for more details.
.. _Using J-Link with MIMXRT1060-EVK or MIMXRT1064-EVK:
https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/Using-J-Link-with-MIMXRT1060-EVK-or-MIMXRT1064-EVK/ta-p/1281149
.. _Using J-Link with MIMXRT1060-EVKB:
https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/Using-J-Link-with-MIMXRT1060-EVKB/ta-p/1452717

View File

@@ -81,8 +81,12 @@ these references:
Supported Features
==================
The mimxrt1160_evk board configuration supports the following hardware
features:
The mimxrt1160_evk board configuration supports the hardware features listed
below. For additional features not yet supported, please also refer to the
:ref:`mimxrt1170_evk` , which is the superset board in NXP's i.MX RT11xx family.
NXP prioritizes enabling the superset board with NXP's Full Platform Support for
Zephyr. Therefore, the mimxrt1170_evk board may have additional features
already supported, which can also be re-used on this mimxrt1160_evk board:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
@@ -195,15 +199,17 @@ however the :ref:`pyocd-debug-host-tools` do not yet support programming the
external flashes on this board so you must reconfigure the board for one of the
following debug probes instead.
:ref:`jlink-external-debug-probe`
.. _Using J-Link RT1160:
Using J-Link
---------------------------------
Install the :ref:`jlink-debug-host-tools` and make sure they are in your search
path.
Attach a J-Link 20-pin connector to J1. Check that jumpers J6 and J7
are **off** (they are on by default when boards ship from the factory) to
ensure SWD signals are disconnected from the OpenSDA microcontroller.
There are two options: the onboard debug circuit can be updated with Segger
J-Link firmware, or :ref:`jlink-external-debug-probe` can be attached to the
EVK. See `Using J-Link with MIMXRT1160-EVK or MIMXRT1170-EVK`_ for more details.
Configuring a Console
=====================
@@ -266,7 +272,7 @@ should see the following message in the terminal:
https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/i-mx-rt1160-evaluation-kit:MIMXRT1160-EVK
.. _MIMXRT1160-EVK Board Hardware User's Guide:
https://www.nxp.com/docs/en/user-guide/UM11617.pdf
https://www.nxp.com/webapp/Download?colCode=UM11617
.. _i.MX RT1160 Website:
https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/i-mx-rt-crossover-mcus/i-mx-rt1160-crossover-mcu-family-high-performance-mcu-with-arm-cortex-m7-and-cortex-m4-cores:i.MX-RT1160
@@ -276,3 +282,6 @@ should see the following message in the terminal:
.. _i.MX RT1160 Reference Manual:
https://www.nxp.com/webapp/Download?colCode=IMXRT1160RM
.. _Using J-Link with MIMXRT1160-EVK or MIMXRT1170-EVK:
https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/Using-J-Link-with-MIMXRT1160-EVK-or-MIMXRT1170-EVK/ta-p/1529760

View File

@@ -83,8 +83,11 @@ these references:
Supported Features
==================
The mimxrt1170_evk board configuration supports the following hardware
features:
NXP considers the MIMXRT1170-EVK as the superset board for the i.MX RT11xx
family of MCUs. This board is a focus for NXP's Full Platform Support for
Zephyr, to better enable the entire RT11xx family. NXP prioritizes enabling
this board with new support for Zephyr features. The mimxrt1170_evk board
configuration supports the following hardware features:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
@@ -236,15 +239,17 @@ however the :ref:`pyocd-debug-host-tools` do not yet support programming the
external flashes on this board so you must reconfigure the board for one of the
following debug probes instead.
:ref:`jlink-external-debug-probe`
.. _Using J-Link RT1170:
Using J-Link
---------------------------------
Install the :ref:`jlink-debug-host-tools` and make sure they are in your search
path.
Attach a J-Link 20-pin connector to J1. Check that jumpers J6 and J7
are **off** (they are on by default when boards ship from the factory) to
ensure SWD signals are disconnected from the OpenSDA microcontroller.
There are two options: the onboard debug circuit can be updated with Segger
J-Link firmware, or :ref:`jlink-external-debug-probe` can be attached to the
EVK. See `Using J-Link with MIMXRT1160-EVK or MIMXRT1170-EVK`_ for more details.
Configuring a Console
=====================
@@ -317,3 +322,6 @@ should see the following message in the terminal:
.. _i.MX RT1170 Reference Manual:
https://www.nxp.com/webapp/Download?colCode=IMXRT1170RM
.. _Using J-Link with MIMXRT1160-EVK or MIMXRT1170-EVK:
https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/Using-J-Link-with-MIMXRT1160-EVK-or-MIMXRT1170-EVK/ta-p/1529760

View File

@@ -11,7 +11,7 @@ config BOARD
config FLASH_MCUX_FLEXSPI_MX25UM51345G
default y if FLASH
config FLASH_SIZE
default $(dt_node_int_prop_int,/soc/spi@134000/mx25um51345g@0,size,K)
default $(dt_node_int_prop_int,/soc/spi@134000/mx25um51345g@0,size,Kb)
config FLASH_MCUX_FLEXSPI_XIP
default y if FLASH

View File

@@ -56,8 +56,13 @@ these references:
Supported Features
==================
The mimxrt595_evk board configuration supports the following hardware
features:
NXP considers the MIMXRT595-EVK as a superset board for the i.MX RT5xx
family of MCUs. This board is a focus for NXP's Full Platform Support for
Zephyr, to better enable the entire RT5xx family. NXP prioritizes enabling
this board with new support for Zephyr features. The mimxrt595_evk board
configuration supports the hardware features below. Another very similar
board is the :ref:`mimxrt685_evk`, and that board may have additional features
already supported, which can also be re-used on this mimxrt595_evk board:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
@@ -72,7 +77,8 @@ features:
+-----------+------------+-------------------------------------+
| GPIO | on-chip | gpio |
+-----------+------------+-------------------------------------+
| USART | on-chip | serial port-polling |
| USART | on-chip | serial port-polling; |
| | | serial port-interrupt |
+-----------+------------+-------------------------------------+
| CLOCK | on-chip | clock_control |
+-----------+------------+-------------------------------------+

View File

@@ -323,12 +323,19 @@ zephyr_udc0: &usbhs {
status = "okay";
mx25um51345g: mx25um51345g@0 {
compatible = "nxp,imx-flexspi-mx25um51345g";
size = <DT_SIZE_M(64)>;
/* MX25UM51245G is 64MB, 512MBit flash part */
size = <DT_SIZE_M(64 * 8)>;
reg = <0>;
spi-max-frequency = <200000000>;
status = "okay";
jedec-id = [c2 81 3a];
erase-block-size = <4096>;
/*
* Note- ECC will be disabled with a
* write block size of 1 byte. To enable ECC, ensure
* writes are in multiples of 16 bytes. This reduced
* block size is required for MCUBoot support.
*/
write-block-size = <1>;
partitions {

View File

@@ -19,7 +19,7 @@ choice FLASH_MCUX_FLEXSPI_MX25UM51345G_OPI_MODE
endchoice
config FLASH_SIZE
default $(dt_node_int_prop_int,/soc/spi@134000/mx25um51345g@2,size,K)
default $(dt_node_int_prop_int,/soc/spi@134000/mx25um51345g@2,size,Kb)
config FLASH_MCUX_FLEXSPI_XIP
default y if FLASH

View File

@@ -54,8 +54,13 @@ these references:
Supported Features
==================
The mimxrt685_evk board configuration supports the following hardware
features:
NXP considers the MIMXRT685-EVK as a superset board for the i.MX RT6xx
family of MCUs. This board is a focus for NXP's Full Platform Support for
Zephyr, to better enable the entire RT6xx family. NXP prioritizes enabling
this board with new support for Zephyr features. The mimxrt685_evk board
configuration supports the hardware features below. Another very similar
board is the :ref:`mimxrt595_evk`, and that board may have additional features
already supported, which can also be re-used on this mimxrt685_evk board:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
@@ -72,7 +77,8 @@ features:
+-----------+------------+-------------------------------------+
| FLASH | on-chip | OctalSPI Flash |
+-----------+------------+-------------------------------------+
| USART | on-chip | serial port-polling |
| USART | on-chip | serial port-polling; |
| | | serial port-interrupt |
+-----------+------------+-------------------------------------+
| I2C | on-chip | i2c |
+-----------+------------+-------------------------------------+

View File

@@ -309,12 +309,19 @@ i2s1: &flexcomm3 {
status = "okay";
mx25um51345g: mx25um51345g@2 {
compatible = "nxp,imx-flexspi-mx25um51345g";
size = <DT_SIZE_M(64)>;
/* MX25UM51245G is 64MB, 512MBit flash part */
size = <DT_SIZE_M(64 * 8)>;
reg = <2>;
spi-max-frequency = <200000000>;
status = "okay";
jedec-id = [c2 81 3a];
erase-block-size = <4096>;
/*
* Note- ECC will be disabled with a
* write block size of 1 byte. To enable ECC, ensure
* writes are in multiples of 16 bytes. This reduced
* block size is required for MCUBoot support.
*/
write-block-size = <1>;
partitions {

View File

@@ -232,4 +232,4 @@ see the following message in the terminal:
https://madmachine.io
.. _SwiftIO API Reference:
https://madmachine.io/docs
https://madmachineio.github.io/SwiftIO/documentation/swiftio/

View File

@@ -512,19 +512,19 @@ serial port:
https://developer.arm.com/tools-and-software/development-boards/fpga-prototyping-boards/mps2
.. _MPS2+ AN521 Technical Reference Manual (TRM):
http://infocenter.arm.com/help/topic/com.arm.doc.dai0521c/DAI0521C_Example_SSE200_Subsystem_for_MPS2plus.pdf
https://developer.arm.com/documentation/dai0521/latest/
.. _Cortex M33 Generic User Guide:
http://infocenter.arm.com/help/topic/com.arm.doc.100235_0004_00_en/arm_cortex_m33_dgug_100235_0004_00_en.pdf
https://developer.arm.com/documentation/100235/latest/
.. _Trusted Firmware M:
https://git.trustedfirmware.org/trusted-firmware-m.git/tree/docs/user_guides/tfm_build_instruction.rst
https://tf-m-user-guide.trustedfirmware.org/building/tfm_build_instruction.html
.. _Corelink SSE-200 Subsystem:
https://developer.arm.com/products/system-design/subsystems/corelink-sse-200-subsystem
https://developer.arm.com/documentation/dto0051/latest/subsystem-overview/about-the-sse-200
.. _IDAU:
https://developer.arm.com/docs/100690/latest/attribution-units-sau-and-idau
https://developer.arm.com/documentation/100690/latest/Attribution-units--SAU-and-IDAU-
.. _AMBA®:
https://developer.arm.com/products/architecture/system-architectures/amba

Some files were not shown because too many files have changed in this diff Show More