Commit graph

72012 commits

Author SHA1 Message Date
Jeppe Odgaard
afd6eb35f9 modem: ppp: gsm: extract access technology
Some modems supports multiple access technologies.
The access technology of the serving cell can be extracted from the
+CEREG command, which is already sent to the modem.

The parse function is extended to also parse the access technology value.

Fixes https://github.com/zephyrproject-rtos/zephyr/issues/51153.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2022-11-11 08:41:13 +00:00
Francois Ramu
838cd28195 samples: drivers: watchdog stm32 wwdg decrease apb clock
The most of the wwdg peripherals requires a reduced apb clock
to pass the sample.drivers.watchdog.stm32_wwdg testcase.
This apb1 prescaler is added to the overlay file
for that particular clock.
Specific overlay for the stm32h7 family because of the APB1
bus clock named d2ppre1.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-11 08:40:23 +00:00
Gerard Marull-Paretas
21c4bbe385 driver: watchdog: multiple doxygen improvements
- Fix incorrect struct fields documentation (`@param` can't be used)
- Removed redundant `@file` entry, public APIs may be split into
  multiple headers.
- Grouped and anchored options and flags, so they can be referenced.
- Guarded some internal fields with INTERNAL_HIDDEN.
- Exposed conditional struct fields, using __DOXYGEN__.
- Use `@see` in cases where used was instructed to look at other
  function calls.
- Added `errno` `@retval` to all functions. In case of external
  watchdogs, communication errors may be propagated.
- Other minor/typo fixes

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-10 22:41:43 -05:00
Daniel Leung
bbb2f8277a uart: ns16550: move command macro to public header
This moves the CMD_SET_DLF command macro to public header
so application can use it without weird include path to
include the "private" header file under drivers/serial.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-11-10 22:40:21 -05:00
Jay Vasanth
acf473f850 driver: peci: mec: enable peci in ec subsystem register
Ensure that PECI block is enabled in the EC Subsystem by clearing
the PECI_DIS (peci disable) register

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-11-10 22:39:43 -05:00
Jay Vasanth
4ce502777b soc: arm: mec1501: add debug interface configuration
Move regs configuration from previous pinmux.c to soc layer.
This involves the debug interface, configuring the GPIO bank power
and the test clock out pin.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-11-10 22:39:43 -05:00
Kumar Gala
a1d0120d91 intel_adsp: Sort SoC nodes by address
Sort SoC nodes by address to make it easier to find them.  As part
of this also move the intel-sha node under SoC where it belongs.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-11-10 22:09:14 -05:00
Anas Nashif
f98a240537 ci: twister: capture footprint data on push/schedule
Capture footprint data on push/schedule so we visualize footprint in
dashboards.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-10 13:45:00 -06:00
Gerard Marull-Paretas
33e583b643 drivers: regulator: s/reg/dev
Use "dev" for device instance variable for consistency with other driver
classes.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-10 17:58:48 +01:00
Gerard Marull-Paretas
e68ba0fd5b drivers: regulator: fix includes
File was including zephyr/types.h and zephyr/drivers/gpio.h for nothing,
and missed zephyr/device.h

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-10 17:58:48 +01:00
Gerard Marull-Paretas
ee90deeafd drivers: regulator: improve Doxygen documentation
- Remove redundant `@file`
- Hide driver-specific code using `INTERNAL_HIDDEN`.
- Use standard `@funcprops`
- Use `@retval` for return codes, and clarify them as well. Added -errno
  case, since external regulators may propagate e.g. bus errors.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-10 17:58:48 +01:00
Kevin Townsend
26e4eea90d boards: arm: mps2_an521: Clarify memory map
Attempts to clarify the memory map on the MPS2 AN521, showing how
the 4MB code region and 4MB SRAM region are partitioned across the
various board targets.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2022-11-10 17:52:41 +01:00
Gerard Marull-Paretas
8be5f9e755 boards: nrf52840dk_nrf52840: fix pinctrl overlay documentation
The board already provides a pinctrl setup for UART1, the documentation
assumes it does not. This patch updates the documentation to explain how
to apply an overlay so that UART1 is routed to another set of pins.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-10 17:07:11 +01:00
Carles Cufi
b90c27238a Bluetooth: crypto: Refactor a few items
After merging #51809, a few things were spotted that needed tweaking.
Among them:

- Rename the folder from bt_crypto to crypto, since the prefix is
  unnecesary
- Remove the include folder
- Remove the path from the global include paths

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-10 17:54:14 +02:00
Daniel DeGrasse
d21dff001f boards: arm: mimxrt1060_evk: Enable booting RT1060 from Hyperflash.
RT1060 board with hyperflash configuration was missing the appropriate
flash configuration block required by the bootloader. Since this board
uses the same flash chip as the RT1050, the flash configuration block for
that board can be reused.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-10 09:11:08 -06:00
Daniel DeGrasse
a78323ae74 boards: arm: Update NXP boards with flashless SOCs to include flash data
Update NXP boards that use flashless SOCs to include flash data
configuration blocks, as well as device configuration blocks where
required. These configuration blocks are used by the bootloader.
Although the files themselves are stored in NXP's HAL, CMake directives
are used to include them directly, and notify the user of their
existence when a new board is created, to aid in the bringup process.

This commit updates the revision of the NXP HAL to one that does not
include flash data configuration blocks, to prevent linker errors.
Note that due to merge order in the NXP HAL, the updated SHA will also
include NXP's S32 System Timer Module drivers.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-10 09:11:08 -06:00
Daniel DeGrasse
b53eaf1f24 soc: nxp_imx: include fsl_flexspi_nor_boot when boot header is present
Only include fsl_flexspi_nor_boot when a boot header is present,
as this is the only case where the boot header data will be required.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-10 09:11:08 -06:00
Dominik Ermel
dac058c058 mgmt/mcumgr: Fix documentation for hash_checksum_mgmt_list_cb
Incorrectly hash_checksum_mgmt_handler_fn has been referenced
in documentation for hash_checksum_mgmt_list_cb, causing
documentation generation error, because parameter list does
not match.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-11-10 15:48:39 +01:00
Jason Wright
e369a8899f testsuite: coverage: create kconfig option for gcov dump heap size
The heap size for serial dump of gcov data is currently
defined by MALLOC_MAX_HEAP_SIZE, which cannot be
adjusted by kconfig. This commit adds a new kconfig
option, CONFIG_COVERAGE_GCOV_HEAP_SIZE, which retains
the behavior or MALLOC_MAX_HEAP_SIZE by default.

Signed-off-by: Jason Wright <jwright@synchron.com>
2022-11-10 08:48:06 -05:00
Dominik Ermel
7ed6775d02 mgmt/mcumgr: Fix MCUMGR_BUF_USER_DATA_SIZE selection for BT
Rounded up struct smp_bt_user_data takes 8 bytes; this fixes
static assert failing with message:
  CONFIG_MCUMGR_BUF_USER_DATA_SIZE not large enough to fit Bluetooth
  user data

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-11-10 13:30:12 +01:00
Jamie McCrae
dbd2176655 mgmt: mcumgr: fs_mgmt: Update hash/checksum supported command
Updates the hash/checksum supported command to use the new command
structure.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-10 12:34:39 +01:00
Jamie McCrae
4b70d4337f doc: release: 3.3: Add mcumgr stable API change
Adds details of the stable API change to mcumgr's callback system,
including a link to the migration guide.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-10 12:34:39 +01:00
Jamie McCrae
d5693ed464 doc: device_mgmt: callbacks: Add initial documentation
Adds the initial documentation describing the mcumgr callback
system and how to use it, including API reference and samples.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-10 12:34:39 +01:00
Jamie McCrae
c2b872b901 mgmt: mcumgr: os_mgmt: Switch to new event callback system
Switches to the new event callback system for the os_mgmt
functionality and removes the old code.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-10 12:34:39 +01:00
Jamie McCrae
986ea39512 mgmt: mcumgr: img_mgmt: Switch to new event callback system
Switches to the new event callback system for the img_mgmt
functionality and removes the old code.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-10 12:34:39 +01:00
Jamie McCrae
4e8fde15a3 mgmt: mcumgr: fs_mgmt: Switch to new event callback system
Switches to the new event callback system for the fs_mgmt
functionality and removes the old code.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-10 12:34:39 +01:00
Jamie McCrae
042ed0539b mgmt: mcumgr: Add access denied error code
Adds an access denied error code that can be used to signal to the
mcumgr client that the requested access to a specific resource or
command/functionality has been denied.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-10 12:34:39 +01:00
Jamie McCrae
6f75c99b8b mgmt: mcumgr: Rework event callback system
Reworks the event callback system to use a linked list to allow for
chained handlers and support passing a status back to the handler to
indicate if the request should be rejected or allowed. This also
removes the old base callback functionality.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-10 12:34:39 +01:00
Guillaume Gautier
bd5eea7a50 dts: bindings: ospi: Require STM32 OSPI clock-names binding
Following the modification of the STM32 OSPI driver, the clock-names
binding is now required

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2022-11-10 11:28:18 +00:00
Guillaume Gautier
2604951989 drivers: flash: Use dts to configure STM32 OSPI manager clock
Instead of calling __HAL_RCC_OSPIM_CLK_ENABLE() to enable the OSPI
manager clock, we now use a new clock binding in the dts.

In order to avoid confusion between the different clocks, the driver
is modified to select the clock based on their names instead of indexes.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2022-11-10 11:28:18 +00:00
Guillaume Gautier
59d6b94a40 dts: arm: st: Add clock names for all STM32 OSPI instances in dts
For all STM32 featuring octospi, clock-names are added to use them
instead of indexing for configuring the clock.
For U5 series, a third clock is added for the OSPI manager.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2022-11-10 11:28:18 +00:00
Guillaume Gautier
3352c2d42f doc: releases: Update release notes with stm32 rtc modification
Update release notes 3.3 with the different modifications brought
to the STM32 RTC counter including new functionality, deprecated
and removed Kconfig

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2022-11-10 11:27:49 +00:00
Guillaume Gautier
58f82bf243 drivers: counter: Remove unused Kconfig symbols for stm32 rtc
Remove a set of Kconfig symbols for configuring the RTC on STM32
that are no longer useful

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2022-11-10 11:27:49 +00:00
Guillaume Gautier
3bfc22ac73 drivers: counter: Add support for STM32 RTC source from dts
Add support for STM32 RTC source from dts

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2022-11-10 11:27:49 +00:00
Guillaume Gautier
dbbfff5002 boards: arm: Add RTC clock source for STM32 boards dts
For every board using an STM32, add the RTC clock source in its dts

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2022-11-10 11:27:49 +00:00
Guillaume Gautier
00504fd585 include: zephyr: dt-bindings: clock: Add RTC clk src defines for STM32
For all STM32 series, add some defines to select the RTC clock source.
This change is necessary to be able to select the RTC clock source in
dts instead of Kconfig

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2022-11-10 11:27:49 +00:00
Guillaume Gautier
a332ee3172 drivers: clock_control: clock_stm32: Add support for lse bypass
Add support for LSE bypass for all STM32 series

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2022-11-10 11:27:49 +00:00
Guillaume Gautier
a407c4e04e include: zephyr: drivers: clock_control: Add stm32 lse bypass
Add a define to get the value of the LSE bypass property from dts

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2022-11-10 11:27:49 +00:00
Guillaume Gautier
24680021b7 dts: bindings: clock: add bypass property to stm32 lse
For STM32 LSE clock, add LSE bypass property (defaulting to false)

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2022-11-10 11:27:49 +00:00
Gerson Fernando Budke
92ca06577f samples: usb: mass: Add support to TFM NS boards
This add TFM cmake definitions to build mass storage sample for non
secure firmware boards versions. The stm32l562e_dk_ns board was used
to demonstrate. It uses SDMMC/SD with TFM profile large. Tests were
conducted using a 2GB transflash card with FAT-32 partition.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2022-11-10 11:26:11 +00:00
Gerson Fernando Budke
151e145b44 boards: arm: stm32l562e_dk: Enable usb tags for tests
This enables usb and usb_device tag for tests. It explicitly disable
samples/subsys/usb/dfu for non-secure version of this board due to
building errors, which can be explored in future.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2022-11-10 11:26:11 +00:00
Jamie McCrae
82258f6c5c doc: release: 3.3: Add note on MCUmgr changes
Adds a note on changes needed to applications to update them for
changes introduced into MCUmgr.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-10 11:54:46 +01:00
Gregers Gram Rygg
c9e07fc385 drivers: flash: spi_nor: fix flash busy during init
After a soft-reset of the host controller the flash device is not reset.
This can cause the flash device to still be busy writing or erasing when
the host controller boots and initializes the flash. The often results
in errors and the flash device not being initialized.

This fix polls the status register until the WIP flag is off before
initializing the flash device.

Fixes #51713

Signed-off-by: Gregers Gram Rygg <gregers.gram.rygg@nordicsemi.no>
2022-11-10 11:11:11 +01:00
Jamie McCrae
f85eafe02c doc: release: 3.3: Add note on new fs_mgmt feature
Adds a note on the new fs_mgmt feature to query supported
hash/checksum types.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-10 11:10:03 +01:00
Jamie McCrae
379d23001f tests: mgmt: mcumgr: Add fs_mgmt_hash_supported test
Adds a test which checks that the fs_mgmt supported hash/checksum
functionality is working and returns the expected response.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-10 11:10:03 +01:00
Jamie McCrae
7f56c06ea8 doc: guides: device_mgmt: smp: fs: Add supported hash/checksum info
Adds information on the supported hash/checksum mcumgr command.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-10 11:10:03 +01:00
Jamie McCrae
77374b3857 mgmt: mcumgr: fs_mgmt: Allow querying supported hash/checksums
Adds a new mcumgr command for returning information on all supported
hash/checksum types that the firmware supports.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-10 11:10:03 +01:00
Jamie McCrae
2aca1242f7 mgmt: mcumgr: Fix Bluetooth transport issues
This fixes issues with the Bluetooth SMP transport whereby deadlocks
could arise from connection references being held in long-lasting
mcumgr command processing functions.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-10 11:08:52 +01:00
Jamie McCrae
7028d01544 mgmt: mcumgr: Update struct name in documentation
Replaces mgmt_hdr with smp_hdr in documentation to match changes in
code.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-10 11:08:26 +01:00
Jamie McCrae
f0669f845c mgmt: mcumgr: Replace mgmt_ctxt struct with smp_streamer
This replaces an intermediatory structure with a different one which
allows command functions to access the full contents of the streamer
structure that would be otherwise unavailable. This is a foundation
for allowing asynchronous mcumgr messages from the server.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-10 11:08:26 +01:00