Commit graph

56917 commits

Author SHA1 Message Date
Sylvio Alves
944b6d0486 soc: esp32: use same rom func prefix
This sets esp32 to use common rom functions
prefix among SoCs.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-10-21 10:55:45 -04:00
Yong Cong Sin
a720f8c627 tests/subsys/storage/flash_map: get flash device from flash area
Get flash device from flash area instead of the hardcoded
DT_CHOSEN_ZEPHYR_FLASH_CONTROLLER_LABEL. This makes the test
possible to be ran on device that has image_1 defined in
external flash.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2021-10-21 10:55:16 -04:00
Sylvio Alves
b0717d518e drivers: gpio: esp32: use dts and improve code checks
This PR updates GPIO driver to use DTS information
regarding gpio availability.

This also fixes interrupt handling and
also removes kconfig definition for GPIO port.

A few configuration checks were also added to
improve code usage.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-10-21 10:53:34 -04:00
Sylvio Alves
7c10e0d947 pinmux: esp32: add missing pull down call
When configuring pin as pull up, pull down needs
to be disabled first.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-10-21 10:53:34 -04:00
Yuguo Zou
4e33cd62d0 arch: arc: Add _ARCH_MEM_PARTITION_ALIGN_CHECK for arc mpu v3 v6
_ARCH_MEM_PARTITION_ALIGN_CHECK was missing for arc mpu v3 and v6.
This commit add the missing macros.

Signed-off-by: Yuguo Zou <yuguo.zou@synopsys.com>
2021-10-21 10:50:03 -04:00
Johann Fischer
220ad1d40d boards: add zephyr_udc0 nodelabel to stm32 boards with usbotg_fs node
Add zephyr_udc0 (USB device controller) nodelabel to
STM32 boards with usbotg_fs node to allow generic USB device
samples to be build.

Follow up on commit e4f894788a
("boards: add zephyr_udc0 nodelabel to all boards with USB support")

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-10-21 10:33:37 -04:00
Alexandre Bourdiol
2d4b1b6cba soc: arm: stm32h7: implement workaround for AXI SRAM data corruption
Errata ES0392 Rev 8:
2.2.9: Reading from AXI SRAM may lead to data read corruption
Workaround: Set the READ_ISS_OVERRIDE bit in the AXI_TARG7_FN_MOD
register.
This is applicable only to RevY (REV_ID 0x1003)

Fixes #38933

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-10-21 10:32:21 -04:00
Alexandre Bourdiol
82ce5c57ef boards: arm: stm32l562e_dk and nucleo_l552ze_q add openocd support
OpenOCD was partially implemented in board.cmake,
it is now functional.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-10-21 10:31:48 -04:00
Martin Jäger
f24367963e task_wdt: ensure hw wdt is started before being fed
If a fallback hardware watchdog is used, it is fed together with the
task watchdog in task_wdt_feed. However, the hardware watchdog was
not yet set up before the first call to task_wdt_feed.

This commit fixes the order of wdt_setup and task_wdt_feed calls.

Fixes #39523

Signed-off-by: Martin Jäger <martin@libre.solar>
2021-10-21 07:35:11 -04:00
Keith Packard
177f95464e arm: Use correct macro for z_interrupt_stacks declaration in stack.h
There are two macros for declaring stack arrays:

K_KERNEL_STACK_ARRAY_DEFINE:

	Defines the array, allocating storage and setting the section name

K_KERNEL_STACK_ARRAY_EXTERN

	Declares the name of a stack array allowing code to reference
	the array which must be defined elsewhere

arch/arm/include/aarch32/cortex_m/stack.h was mis-using
K_KERNEL_STACK_ARRAY_DEFINE to declare z_interrupt_stacks by sticking
'extern' in front of the macro use. However, when this macro also set
the object file section for the symbol, having two of those caused a
conflict in the compiler due to the automatic unique name mechanism used
for sections to allow unused symbols to be discarded during linking.

This patch makes the header use the correct macro.

Signed-off-by: Keith Packard <keithp@keithp.com>
2021-10-21 07:34:56 -04:00
Guennadi Liakhovetski
33dbbfb3d6 Xtensa: ADSP: bootloader: use proper struct field access
Replace byte-counting with proper structure field access.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-10-21 07:34:03 -04:00
Guennadi Liakhovetski
c2400a47ab xtensa: ADSP: Intel: fix booting on APL with XCC
When built with XCC for Apollolake, Zephyr fails to boot with the
default multi-core option enabled. Invalidate cache before reading
the firmware image to fix that.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-10-21 07:34:03 -04:00
Erwan Gouriou
aa144ca3f0 drivers/usb: stm23: Fix deprecated macro declaration
Use of '__DEPRECATED_MACRO' was not compatible with the way macro
is used later in this driver.
Remove it and keep the warning as vector for deprecation information.

Additionally, replace DT_NODE_HAS_PROP with DT_INST_PROP as
using the former is not recommended with boolean properties.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-10-21 05:53:52 -05:00
Iuliana Prodan
c0fcd35531 manifest: update hal_xtensa
Update hal_xtensa for i.MX8MP SoC overlay support.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-10-20 19:08:50 -04:00
Iuliana Prodan
602e675418 west: sign: add support for NXP i.MX8MP
Add support for signing i.MX8MP SOF with
Zephyr images with rimage.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-10-20 19:08:50 -04:00
Iuliana Prodan
8bbb11d6a1 soc: xtensa: adsp: add support for NXP ADSP for i.MX8MP
Add support for i.MX8MP target.
This has a 1 Xtensa HiFi4 core, with 64 KB TCM,
256KB OCRAM, 8MB SDRAM and 1 SAI as audio interface.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-10-20 19:08:50 -04:00
Iuliana Prodan
dd1c96d123 samples/subsys/audio/sof: add configuration for imx8m board
Add support for SOF with Zephyr on i.MX8MP board.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-10-20 19:08:50 -04:00
Iuliana Prodan
ad772693aa boards: xtensa: adsp: add support for imx8m board
Add support for i.MX8MP board by defining defconfig,
board configuration and device tree.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-10-20 19:08:50 -04:00
Iuliana Prodan
78606101a0 dts: xtensa: add device tree for imx8m
Add dtsi file for i.MX8MP board.
This has one HiFi4 core, from Cadence, lx6 compatible
and 2 System RAM.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-10-20 19:08:50 -04:00
Peter Mitsis
1d8c1162c7 doc: Fix K_EVENT_DEFINE macro code-block example
Fixes the code-block example for K_EVENT_DEFINE() documentation
to show that it only takes one argument instead of three.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2021-10-20 17:44:12 -04:00
Tom Burdick
9cb94df57a MAINTAINERS: add myself to maintainers
Adds myself to collaborators for

* Power Management
* Sensors
* Tracing

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2021-10-20 10:56:35 -05:00
Kumar Gala
fb4d68973f shell: Fix various build issues with string formattors
We get a few different CI failures associated with data type
differences on various platforms.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-10-20 10:54:38 -05:00
Lixin Guo
2643e8d62d tests: mutex: fix improper test identifier
The test identifier of mutex error case in testcase.yaml is
exactly the same as mutex api's test identifier.
So I fix this.

Signed-off-by: Lixin Guo <lixinx.guo@intel.com>
2021-10-20 10:19:18 -04:00
Jiafei Pan
799f37b421 arm64: add nocache memory segment support
In some drivers, noncache memory need to be used for dma coherent
memroy, so add nocache memory segment mapping and support for ARM64
platforms.

The following variables definition example shows they will use nocache
memory allocation:
   int var1 __nocache;
   int var2 __attribute__((__section__(".nocache")));

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2021-10-20 08:56:40 -05:00
Maureen Helm
b0cdef3c25 drivers: adc: Refactor drivers to use shared init priority
Refactors all of the ADC drivers to use a shared driver class
initialization priority configuration, CONFIG_ADC_INIT_PRIORITY, to
allow configuring ADC drivers separately from other devices. This is
similar to other driver classes like I2C and SPI.

The default is set to CONFIG_KERNEL_INIT_PRIORITY_DEVICE to preserve the
existing default initialization priority for most drivers. The
exceptions are lmp90xxx, mcp320x, and mcux_adc16 drivers which have
dependencies on GPIO, SPI, and/or DMA drivers and must therefore
initialize later than the default device priority.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2021-10-20 07:33:44 -04:00
Martí Bolívar
f259790bf8 dts: bindings: fix file names
Make sure binding file names match their compatibles.

Done with a script.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-10-20 07:33:04 -04:00
Wouter Cappelle
96f9f6e6d2 modem: clang-format the modem_socket files
Running clang-format on the modem socket files

Signed-off-by: Wouter Cappelle <wouter.cappelle@crodeon.com>
2021-10-20 07:30:46 -04:00
Wouter Cappelle
287481ef0a modem: Rework the modem_sockets poll behavior
The current modem sockets poll implementation has 2 limitations
as of today:
- not following posix spec wrt timeout of -1 (should be forever,
  but as today it's was returning immediately)
- not able to poll from multiple threads on different sockets
  on the same modem.
This pull request should implement these limitations.

Signed-off-by: Wouter Cappelle <wouter.cappelle@crodeon.com>
2021-10-20 07:30:46 -04:00
Pete Dietl
71334fcd6b dts: stm32g4: add timers 5 and 20 to STM32G4xx SOCs where approriate
Add a DTS description of timer5 to: STM32G474, STM32G484, STM32G473,
STM32G483, and STM32G471

Add a DTS description of timer5 to: STM32G474, STM32G484, STM32G473,
STM32G483, STM32G491, and STM32G4A1

Signed-off-by: Pete Dietl <petedietl@gmail.com>
2021-10-20 07:29:20 -04:00
Evgeniy Paltsev
74f8e81e34 ARC: improve _ARCH_MEM_PARTITION_ALIGN_CHECK
* split conditions check
* implement custom _ARCH_MEM_PARTITION_ALIGN_CHECK version
  for MWDT toolchain
* use uintptr_t instead of uint32_t for addresses

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2021-10-20 07:24:03 -04:00
Evgeniy Paltsev
235a98e371 ARC: MWDT: enable back BUILD_ASSERT macro
BUILD_ASSERT macro was disabled for MWDT toolchain from the
moment of adding MWDT support to Zephyr. Built-in _Static_assert
is now working fine for the most of the cases with MWDT toolchain
so we can use it in BUILD_ASSERT.

The only exception is _ARCH_MEM_PARTITION_ALIGN_CHECK macro
as it often used with variable addresses as parameters
which need to be checked at compile time. We disable
_ARCH_MEM_PARTITION_ALIGN_CHECK for MWDT toolchain so we can use
BUILD_ASSERT in other places.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2021-10-20 07:24:03 -04:00
Martí Bolívar
8882467b53 dts: rules for bindings
Capture some general rules for writing bindings that we've been
enforcing in review but could use better documentation for.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-10-20 07:21:39 -04:00
Timo Teräs
1eb6831ddd drivers: uart_ns16550: Fix dts hw_flow_control mapping to config
DT_INST_NODE_HAS_PROP() returns true always since the boolean
tag is valid. Use DT_INST_PROP_OR() to get the real value.

Fixes: baecd7e55a drivers: uart_ns16550: Remove CMake-based templating
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
2021-10-20 07:13:42 -04:00
Henrik Brix Andersen
267a83e94b drivers: can: flexcan: fix timing parameter limits
Fix the limits for the timing parameter calculations.

The lower limit for the phase_seg2 value is wrongly specified as 1 to 7,
but 1U is substracted before writing it to the CTRL1:PSEG2 register
field. This results in register field values between 0 and 6, but 0 is
an invalid value for the PSEG2 register field.

The upper limits for several of the timing parameters are wrong as well,
but this does not result in invalid register field values being
calculated. It can, however, result in not being able to meet CAN timing
requirements.

The confusion in specifying the limits likely stems from the timing
calculations and timing limits using the "physical" values, whereas the
registers fields all use the "physical" value minus 1. When the
datasheet says "The valid programmable values are 1-7", the
corresponding limits should be set to 2 to 8 to take the "minus 1" into
account.

Fixes: #39541

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-10-20 07:06:56 -04:00
Guillaume Lager
7eb74f3db5 logging: rtt: Fix compilation error when multithreading disable
Fixes #39538

RTT_UNLOCK() uses a variable defined in RTT_LOCK() making mandatory
to use both function in the same block

Signed-off-by: Guillaume Lager <g.lager@innoseis.com>
2021-10-19 23:06:20 -04:00
Maureen Helm
ed9cb841c3 drivers: clock_control: Refactor drivers to use shared init priority
Refactors all of the clock control drivers to use a shared driver class
initialization priority configuration,
CONFIG_CLOCK_CONTROL_INIT_PRIORITY, to allow configuring clock control
drivers separately from other devices. This is similar to other driver
classes like I2C and SPI.

Most drivers previously used CONFIG_KERNEL_INIT_PRIORITY_OBJECTS or
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, therefore the default for this new
option is the lower of the two, which means earlier initialization.

The even lower defaults for STM32 and Arm Beetle are preserved by
SoC-family level overrides.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2021-10-19 23:05:25 -04:00
David Brown
365853a213 MAINTAINERS: Add myself and Flavio for Mbed TLS
Add us as maintainers for the Mbed TLS module and associated files and
tests.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-10-19 19:30:55 -04:00
David Brown
536f511e63 CODEOWNERS: Add myself and Flavio for Mbed TLS
Add us as maintainers for the Mbed TLS module and associated files.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-10-19 19:30:55 -04:00
Nicolai Glud
8012228e71 boards: arm: mimxrt1050_evk: added support for hyperflash
This is all the settings for the hyperflash driver in the dts.

Signed-off-by: Nicolai Glud <nicolai.glud@prevas.dk>
2021-10-19 16:42:12 -05:00
Nicolai Glud
31d583c713 boards: arm: imx rt: changes to flash driver Kconfig
selecting flash driver is now a choice.

Signed-off-by: Nicolai Glud <nicolai.glud@prevas.dk>
2021-10-19 16:42:12 -05:00
Nicolai Glud
81cdf7a455 drivers: flash: added flexspi hyperflash.
This enables accessing the hyperflash through the flash api.

Added a feature to memc_mcux_flexspi that waits for flexspi bus to be
quiet.

Signed-off-by: Nicolai Glud <nicolai.glud@prevas.dk>
2021-10-19 16:42:12 -05:00
Gerard Marull-Paretas
d7b7bb1e75 doc: drop 2.2.0 version
Drop the 2.2.0 version entry so that its link is removed from the docs
drop-down list.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-19 12:08:04 -04:00
Gerard Marull-Paretas
9130455677 doc: add 2.7.0 release to versions list
Add 2.7.0 to the version list so that a link to it is created on the
documentation drop-down list.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-19 12:08:04 -04:00
Henrik Brix Andersen
5d34a45697 runners: openocd: always search the board support directory if found
Always add the boards/<arch>/<board>/support directory to the OpenOCD
runner search path if the directory exists.

This simplifies using custom --config <partial-board.cfg> runner
arguments without having to use the full path to the cfg file.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-10-19 17:38:54 +02:00
Bartosz Bilas
fd316a5452 drivers: sensor_shell: add missing power sensor channel
There is no power channel within the name array that
is used by e.g INA23X so let's add it to have support
in sensor shell commands.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2021-10-19 07:15:55 -04:00
Henrik Brix Andersen
d711d224c2 drivers: serial: neorv32: use shared serial driver init priority
Use the shared CONFIG_SERIAL_INIT_PRIORITY for driver initialization
priority.

Override the default value for the NEORV32 SoC to ensure the serial
driver is initialized after the syscon driver by default.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-10-19 06:44:46 -04:00
Evgeniy Paltsev
efc9cee834 samples: shell_module: fix build on 64bit platforms
After the __printf_like validation was added to the shell_fprintf
functions we got warnings while building the
'samples/subsys/shell/shell_module' due to incorrect specifiers
while printing size_t variables. Fix that.

Fixes: #39386
Fixes: fe2075d140 "shell: Add __printf_like to shell_fprintf"

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2021-10-19 06:44:20 -04:00
Dominik Ermel
74ad99198d west.yml: Update mcumgr revision
Commits affecting Zephyr that are included with the new revision:
    12b496e Add IMG_MGMT_FRUGAL_LIST configuration option;
    18c628d cborattr: fixes missing error handling;
    2e385b6 zephyr: Fix usage of zephyr_img_mgmt_flash_area_id.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-10-19 11:45:32 +02:00
Ryan Erickson
d6adbf9d0e modem: hl7800: fix IPv6 socket creation
When creating a socket, be sure to check the address
family and set the correct address family option in
the AT command.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2021-10-18 17:58:15 -04:00
David Brown
93f7a48e0d manifest: Use Mbed TLS 3.0 based on upstream
Use a new branch of Mbed TLS 3.0 based on the upstream history rather
than our local version with a different directory layout.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-10-18 09:51:06 -05:00