Commit Graph

69019 Commits

Author SHA1 Message Date
NingX Zhao b2c64dee27 tests: kernel: workq: migrate work_queue test cases
Move work_queue testcases to new ZTEST API.

Signed-off-by: NingX Zhao <ningx.zhao@intel.com>
2022-08-24 17:48:26 +00:00
NingX Zhao d4e2e883d7 tests: kernel: workq: migrate workq testcases.
Move test cases to new ZTEST API.

Signed-off-by: NingX Zhao <ningx.zhao@intel.com>
2022-08-24 17:48:26 +00:00
NingX Zhao 69c89b1acd tests: kernel: workq: move critical test cases to new ZTEST
Move critical test cases to new ZTEST API.

Signed-off-by: NingX Zhao <ningx.zhao@intel.com>
2022-08-24 17:48:26 +00:00
Carles Cufi 7743b6da85 doc: Require Python 3.8
Given that 3.6 is now several years old and the current and previous
 Ubuntu LTS ship with 3.8 or later, upgrade the minimum required Python
version from 3.6 to 3.8.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 18:35:57 +02:00
Carles Cufi 5fd3cbf9a7 actions: Make Python 3.8 the minimum required version
Change the matrix so that we now start testing 3.8+. No need to exclude
any particular OS/Python version combinations.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 18:35:57 +02:00
Carles Cufi 33211b3fb4 cmake: Bump the minimum required Python version to 3.8
Given that 3.6 is now several years old and the current and previous
Ubuntu LTS ship with 3.8 or later, upgrade the minimum required Python
version from 3.6 to 3.8.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 18:35:57 +02:00
Carles Cufi 25db534a07 west: blobs: Finally fix the --format option handling
Turns out that `Namespace.format` was not a good fix to the issue
described in f033040812, it was returning
the default format even when the user specified -f/--format.

Replace "getattr" with a simple logical operation.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 17:31:24 +02:00
Carles Cufi f033040812 west: blobs: Fix --format handling
There were two issues with the original commit
e04487cad2b98385c850fa478e1d1ca97bf0e836:

- getattr() doesn't seem to work properly with args
- Comparison between bound methods with "is" seems not to work, so
  replace it with a simpler string comparison

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 07:38:42 -07:00
Carles Cufi 8f0af41fd8 scripts: compliance: Add commit range info output
Log at the info level the commit range that the script is acting upon.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 07:40:27 -04:00
Carles Cufi 0082dbfbd5 scripts: compliance: Remove unused command-line args
There were a bunch of old command-line arguments that haven't been used
in a while, remove them.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 07:40:27 -04:00
Carles Cufi 73598db4db scripts: compliance: Tiny cleanup for -c
Use a common source for default and doc.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 07:40:27 -04:00
Carles Cufi c10a0f28b4 scripts: compliance: Clean up logging
- Add a choice in the cmd-line param
- Use the logger object everywhere
- Remove stale todo

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 07:40:27 -04:00
Carles Cufi d160d0c20c scripts: compliance: Complete transition to junitparser v2
Follow-up to b187477fe7.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 07:40:27 -04:00
Carles Cufi 5ee76c97ab scripts: compliance: Remove unused variable
EDIT_TIP has not been used for a while now, remove it.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-24 07:40:27 -04:00
Vinayak Kariappa Chettimada 689bf9b015 Bluetooth: Controller: Fix uninitialized adv mode in scan rsp PDU
Fix uninitialized adv mode value in the scan response PDU.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-24 12:41:21 +02:00
Thomas Stranger 24594cf7ce dts/arm: stm32f105: enable master can gating clock for can2
The can2 only works if gating clock of the master can (can1)
is enabled, therefore also set that bit for can2.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-08-24 10:37:40 +00:00
Henri Xavier dfededeadf cache: Fix build warning 'No SOURCES given to Zephyr library'
Following 4806e1087e ,
the following warning appears for some boards (e.g. `qemu_cortex_a53`)
```
CMake Warning at /zephyr/CMakeLists.txt:798 (message):
  No SOURCES given to Zephyr library: drivers__cache

  Excluding target from build.
```

Allow this driver to have no sources.

Signed-off-by: Henri Xavier <datacomos@huawei.com>
2022-08-24 10:36:40 +00:00
Dinh Nguyen 62b7dc2a7f dts: arm64: agilex: add additional cpu nodes
Add CPU1 - CPU3 nodes and add the cpu0 label.

Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
2022-08-24 11:41:23 +02:00
TLIG Dhaou 546218ad2b drivers: sensor: stm32_temp add the ts cal resolution to the driver
Add the ts cal resolution in the driver in order to calculate temperature
value.

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-08-24 11:35:45 +02:00
TLIG Dhaou 7b102a9993 drivers: adc: stm32 init the Regular group for stm32wl
The stm32wl mcu requires the REG group of the ADC
to be initialized before starting the conversion.

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-08-24 11:35:45 +02:00
TLIG Dhaou df364cc372 drivers: adc: stm32 init the Regular group for stm32u5
The stm32u5 mcu requires the REG group of the ADC
to be initialized before starting the conversion.

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-08-24 11:35:45 +02:00
TLIG Dhaou 366a32bccf Samples: sensor: stm32_temp_sensor: Edit the yaml file of the sample
-Edit the yaml file of the sample in order to execute tests.

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-08-24 11:35:45 +02:00
TLIG Dhaou d97b51d248 boards: arm: Enable the die-temp capabilities of ADC
-Enable the die-temp capabilities of ADC in each dts file of stm32
 boards where it is available.
-Execute the testcase running the samples/sensor/stm32_temp_sensor on each
 available target board.

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-08-24 11:35:45 +02:00
TLIG Dhaou 93b4fcc611 dts: arm: st: Add adc support of the temperature sensor on stm32
Add the support of the temperature sensor in the ADC device-tree node of
each stm32 where it is available.
- Check all the ADC of the stm32 mcus where the temp and VrefInt monitoring
is available (based on the Ref Man).
- Check that has-temp-channel; and has-vref-channel; in the corresponding
ADC node of the DTS of each stm32 mcu is correctly set.
- Verify the VTEMP/ VREFINT activation in the in adc_stm32.c for example).
-Add the die-temp node (based on the ref man/ datasheet).

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-08-24 11:35:45 +02:00
TLIG Dhaou 6778393ce3 dts: binding: sensor: stm32-temp add temp sensor calibration property
The TS_CAL values for the temperature sensor are measured on 12, 14 and
16 bit resolution depends on the STM32 series. Because the drivers
operates at 12 bit resolution the TS_CAL1 and TS_CAL2 must be divided.

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-08-24 11:35:45 +02:00
Mahesh Mahadevan 32e2e1cb79 dts: lpc55S6x: Add back the USB SRAM region
USB SRAM region was accidentally deleted by an earlier
commit. Rename the memory region used by USB to USB_SRAM instead
of SRAM4. SRAM4 was the wrong name for this region.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-08-24 10:08:40 +02:00
Peter Marheine d400b8135c arch/riscv: support CONFIG_CODE_DATA_RELOCATION
This implements support for relocating code to chosen memory regions via
the `zephyr_code_relocate` CMake function for RISC-V SoCs. ARM-specific
assumptions that were made by gen_relocate_app.py need to be corrected,
in particular not assuming any particular name for the default RAM
section (which is 'SRAM' for most ARM pltaforms) and not assuming 32-bit
pointers (so the test works on RV64).

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2022-08-24 10:08:06 +02:00
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