Commit graph

68892 commits

Author SHA1 Message Date
Peter Marheine
c30833da3a arch: move CODE_DATA_RELOCATION to top level
Support for CODE_DATA_RELOCATION is not inherently limited to ARM, so
move the Kconfig definition to top-level so it can be used by other
architectures. Since support is opt-in (requiring linker script
support), add a helper symbol enabled by architecture config that gates
whether CODE_DATA_RELOCATION is available instead of listing all
supported systems inline.

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2022-08-24 10:08:06 +02:00
Peter Marheine
9bd46852a3 build: don't assume FLASH is the ROM region
Most ARM platforms name their ROM region `FLASH`, but this assumption is
not portable. Have gen_relocate_app refer to ROMABLE_REGION instead of
hard-coding the platform-specific memory region name.

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2022-08-24 10:08:06 +02:00
Peter Marheine
3a8c20d849 build: don't assume .symtab section type
Only the elftools SymbolTableSection section type provides an
iter_symbols() method, and compilers are free to emit sections that
include the substring '.symtab' in their name which causes errors if
gen_relocate_app examines only the section name. Instead check whether a
section is a symbol table to skip attempting to inspect sections that
are not actually symbol tables.

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2022-08-24 10:08:06 +02:00
Martí Bolívar
0c198f97a1 drivers: entropy: fail mcux CAAM init on error
Commit d556a0c8a6
("drivers: entropy: Add entropy driver for MCUX CAAM")
added a shim entropy driver whose initialization function
always returns 0, even when the underlying HAL API fails.

This is wrong; if the device initialization function fails, it must
return nonzero by contract. Papering this over with an assert is not
enough. Fix it by returning -ENODEV on error.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-08-24 10:07:28 +02:00
Caspar Friedrich
598de06165 drivers: ds2484: Fix wrong early exit during suspend/resume
The sleep pin is optional and the driver checks for availability during
runtime. Currently the logic is inverted and therefore the driver exits
early if the pin is actually available. This pr fixes this behavior.

Also: Add `fallthrough` flags to switch/case

Signed-off-by: Caspar Friedrich <c.s.w.friedrich@gmail.com>
2022-08-24 10:06:58 +02:00
Gerson Fernando Budke
b0564dfd97 zephyr/ztest_assert.h: Fix implicit to bool conversion
The current zassert macro uses implicit conversion to boolean which
has implication on analysis tools like clang-tidy-14. This add an
aditional step to create a boolean value for the evaluation instead
use the string direct which allows run analysis tool without this
warning/error.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-08-24 10:06:53 +02:00
Gerson Fernando Budke
09cad20b48 logging/log_core.h: Fix unused variable diagnose
The current _mode variable can be diagnosed as unused by tools like
clang-tidy-14. This add a small fix to by pass this situation and allow
run analysis tool without this warning/error.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-08-24 10:06:53 +02:00
Francois Ramu
60bb584301 tests/drivers/dma: testing mem-to-mem DMA transfer on stm32u5
Add the testcase to run on the stm32u5x5 disco kit
and nucleo_u575zi_q boards.
The DMA instance is the GPDMA (up to 16 channels).

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-08-24 10:05:32 +02:00
Francois Ramu
eed4b43dab boards: arm: stm32u575 nucleo target board has GPDMA instance
Enable the GPDMA 1 instance on the target board nucleo_u575zi_q
from STMicroelectronics.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-08-24 10:05:32 +02:00
Francois Ramu
4d2e57db2e boards: arm: stm32 disco kit target board has GPDMA instance
Enable the GPDMA 1 instance on the target board b_u585i_iot02a
from STMicroelectronics.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-08-24 10:05:32 +02:00
Francois Ramu
8bc8b8eec1 drivers: dma: stm32 Kconfig with the new DT_HAS_<COMPAT>_ENABLED.
This commit is converting the DMA kconfig for the stm32 dma driver
with new macro DT_HAS_<COMPAT>_ENABLED.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-08-24 10:05:32 +02:00
Francois Ramu
3fafe7fdee drivers: dma: new dma peripheral driver for stm32u5
It includes the definition for the DMA peripheral of this type,
present on stm32U5 devices.
A particular DMA_STM32U5 config is selected for that purpose.
The driver is derived from the existing dma_stm32.c
The GPDMA is counting channels (0-15) ; stream offset is 0.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-08-24 10:05:32 +02:00
Francois Ramu
77b3ab0c02 dts: arm: stm32U5 add a DMA node for the GPDMA1 instance
This commit defines the GPDMA peripheral for the stm32U5.
This dma is of a new type with 16 channels and 114 requests.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-08-24 10:05:32 +02:00
Francois Ramu
46a8708eec dts: bindings: dma: introduce a new type of DMA
This commit defines a new dma version for devices like stm32U5.
The peripheral is a GPDMA in this soc serie.
It has several specific definitions used by its stm32 LL driver
compared to the V2, including up to 16 channels.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-08-24 10:05:32 +02:00
Vinayak Kariappa Chettimada
4938d2a0d4 Bluetooth: Controller: Fix regression in overlapping 1M and Coded Scan
Fix regression in overlapping 1M and Coded PHY scan window
by considering rounding margins when checking for same
interval and same window durations.

Relates to commit c14bde45b6 ("Bluetooth: Controller: Fix
overlapping 1M and Coded PHY scannning").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-24 10:04:20 +02:00
Guo Lixin
80f848e4a4 tests: kernel: early_sleep: move to new ztest API
Move tests/kernel/early_sleep/ to use new ztest API.

Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-08-23 20:57:04 -04:00
Anas Nashif
a04d06514a Revert "intel_adsp: cavs: irq: simplify code"
This reverts commit 2241fb0592.

Fixes #49200

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-23 20:46:10 -04:00
Kumar Gala
ca7d74bf76 dts: arm: st: Fix DTC warnings
Fix various DTC warnings of the form:

   Warning (simple_bus_reg): simple-bus unit address format error

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-23 19:33:25 +00:00
Kumar Gala
c76dd1a3bf dts: arm: xilinx: Remove improper range property
Remove 'ranges' property from gpio node as it shouldn't be there
since we aren't converting 1:1 between address spaces.  This fixes
the following DTC warning:

   Warning (ranges_format): /soc/gpio@e000a000:ranges: empty "ranges"
   property but its #size-cells (0) differs from /soc (1)

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-23 19:29:46 +00:00
li biao
2a457b5ecf tests: subsys: logging: move log_syst to new ztest API
Move test subsys/logging/log_syst to use new ztest API.

Signed-off-by: li biao <biao1x.li@intel.com>
2022-08-23 19:27:51 +00:00
Aaron Massey
a5feaa4990 tests: sbs_gauge ZTEST API migration
Migrate the existing sbs_gauge driver tests to the new ZTEST API.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2022-08-23 19:27:28 +00:00
Kumar Gala
e759161572 dts: stm32: l0: Move usb PHY nodes out of SoC to fix warning
We currently get a number of warnings like:

        Warning (simple_bus_reg): /soc/otgfs_phy: missing or empty
        reg/ranges property

This is due to the usb phy nodes not have a reg property since they
don't have an mmio address associated with them.

Move the phy nodes out of the SoC node so their lack of a reg property
will not cause a warning.  This is similar to how Linux dts files
handle the phy nodes.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-23 20:09:31 +02:00
Kumar Gala
a17b30a311 boards: stm32f411e_disco: Fix devicetree node deletion
The stm32f411e_disco_B.overlay wasn't propertly deleting the
lsm303agr-magn@1e node and associated alias.  Fix this which also
addresses a DTC warning we get.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-23 20:09:17 +02:00
Enjia Mai
be4b6ed45d tests: benchmarks: move the cmsis_dsp bathmath test to new ztest API
Migrate the testsuite tests/benchmarks/cmsis_dsp/basicmath to the
new ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-08-23 20:08:59 +02:00
Enjia Mai
f0fd78612c tests: benchmarks: move the rbtree_perf test to new ztest API
Migrate the tests/benchmarks/data_structure_perf/rbtree_perf/
test to the new ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-08-23 20:08:59 +02:00
Enjia Mai
e9a7519ff6 tests: benchmarks: move the dlist_perf test to new ztest API
Migrate the tests/benchmarks/data_structure_perf/dlist_perf/
test to the new ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-08-23 20:08:59 +02:00
TLIG Dhaou
402ebb3df0 drivers: counter: Patch for the stm32 counter
Fix the TIM_Typedef types.

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-08-23 20:08:35 +02:00
TLIG Dhaou
cc9b6bb0b4 drivers: ethernet: patch for the stm32 drivers
This commit is a patch to fix the ETH buffer redefined in many files.

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-08-23 20:08:35 +02:00
TLIG Dhaou
b9d393a091 west.yml: Update hal_stm32 with recent cube packages
stm32cube: update stm32f4 to cube version V1.27.1.
stm32cube: update stm32f7 to cube version V1.17.0.
stm32cube: update stm32g0 to cube version V1.6.1.
stm32cube: update stm32g4 to cube version V1.5.1.
stm32cube: update stm32l4 to cube version V1.17.2.
stm32cube: update stm32mp1 to cube version 1.6.0.
stm32cube: update stm32u5 to cube version V1.1.1.
stm32cube: update stm32wb to cube version V1.14.0.
lib/stm32: update stm32wb to cube version V1.14.0


Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-08-23 20:08:35 +02:00
TLIG Dhaou
f9c54a0b07 tests: drivers: pwm: add a testcase for pwm_loopback test.
Add a overlay file to test the pwm_loopback.


Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-08-23 20:08:07 +02:00
TLIG Dhaou
9ad8dd06bd boards: arm: b_u585i_iot02a: activate PWM node
Activate the PWM nodes in the b_u585i_iot02a board, in order to test.


Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-08-23 20:08:07 +02:00
TLIG Dhaou
e385bf10dc dts: arm st: u5: Enable PWM support for stm32U5 in dtsi
add PWM support in dtsi for stm32U5. Adding timer nodes for different
PWM capability.

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-08-23 20:08:07 +02:00
Pieter De Gendt
afc784c2ea soc: mimxrt1064: Add HAL clock header include
The low power mode logic for i.MX RT1064 indirectly includes the HAL
definitions, but this is fragile and depends on specific Kconfig options.

This fixes build issues if for example CONFIG_ARM_MPU is not set.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-08-23 11:39:27 -05:00
Daniel DeGrasse
1a9d470fab sd: fix spelling in sdmmc_decode_csd
Fix spelling in sdmmc_decode_csd to use count instead of cout. Shortening
the variable name here was needlessly confusing.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-23 11:12:37 -05:00
Francois Ramu
6bd5ef3137 samples: boards: stm32 serial_wakeup does not check device ready
Since the change in the PR  #49167
samples: boards: stm32: serial_wakeup: fix device usage issues
the sample should not check the "Device ready" anymore

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-08-23 14:44:44 +00:00
Francois Ramu
db39cd1169 samples: boards: pm on stm32 boards with serial wakeup
This commit retrains the power management testcase
tests/samples/boards/stm32/power_mgmt/serial_wakeup
to bun on stm32 boards only.
Limiting first to nucleo_wg55 and stm32l562dk targets,
more to be added.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-08-23 14:44:44 +00:00
Enjia Mai
4f3761cb8d tests: boards: altera_max10: move the sysid test to new ztest API
Migrate the testsuite tests/boards/altera_max10/sysid to
the new ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-08-23 14:41:44 +00:00
Enjia Mai
5c8080285e tests: boards: altera_max10: move the qspi test to new ztest API
Migrate the testsuite tests/boards/altera_max10/qspi to the
new ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-08-23 14:41:44 +00:00
Enjia Mai
4be4376bc4 tests: boards: altera_max10: move the msg dma test to new ztest API
Migrate the testsuite tests/boards/altera_max10/msgdma to the
new ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-08-23 14:41:44 +00:00
Enjia Mai
ba0e277da2 tests: boards: altera_max10: move the i2c test to new ztest API
Migrate the testsuite tests/boards/altera_max10/i2c_master to
the new ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-08-23 14:41:44 +00:00
Emil Gydesen
d62223e930 Bluetooth: Audio: Fix unicast_client avail ctx dir check
The unicast_client_pacs_avail_ctx_notify_cb had a direction
check that was a leftover copy from the location notification.

However the context notification is always for both sink and
source, and thus does not need any direction checks (in fact
the dir variable was unused).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-08-23 16:24:24 +02:00
Richard Osterloh
258737b2ef soc: arm: stm32f4: Add STM32F423 support
Add support for STM32F423xx devices in dts and soc

Signed-off-by: Richard Osterloh <richard.osterloh@gmail.com>
2022-08-23 16:23:55 +02:00
Kumar Gala
2779d8964d net: Use DEVICE_DT_NAME
Make networking use DEVICE_DT_NAME so the name is consistent with
how DEVICE_DT_DEFINE works.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-23 16:23:37 +02:00
Enjia Mai
513cd6989a tests: unit: move the math_extra test to new ztest API
Migrate the testsuite tests/unit/math_extra to the new ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-08-23 16:22:59 +02:00
Enjia Mai
7133f34c1b tests: unit: move the timeutil test to new ztest API
Migrate the testsuite tests/unit/timeutil to the new ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-08-23 16:22:59 +02:00
Enjia Mai
8f87885965 tests: unit: move the winstream test to new ztest API
Migrate the testsuite tests/unit/winstream to the new ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-08-23 16:22:59 +02:00
Enjia Mai
81bb2a026b tests: unit: move the cbprintf test to new ztest API
Migrate the testsuite tests/unit/cbprintf to the new ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-08-23 16:22:59 +02:00
Enjia Mai
811e691cf6 tests: unit: move the base64 test to new ztest API
Migrate the testsuite tests/unit/base64 to the new ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-08-23 16:22:59 +02:00
Enjia Mai
2dcaf08c8b tests: unit: move the net timeout test to new ztest API
Migrate the testsuite tests/unit/net_timeout to the new ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-08-23 16:22:59 +02:00
Enjia Mai
a729f4d065 tests: unit: move the intmath test to new ztest API
Migrate the testsuite tests/unit/intmath to the new ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-08-23 16:22:59 +02:00