Commit graph

66750 commits

Author SHA1 Message Date
Anas Nashif efbadbb677 scripts: move gen_kobject_list.py to scripts/build/gen_kobject_list.py
Move scripts needed by the build system and not designed to be run
individually or standalone into the build subfolder.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-12 10:03:45 +02:00
Anas Nashif c36307ea86 scripts: move gen_isr_tables.py to scripts/build/gen_isr_tables.py
Move scripts needed by the build system and not designed to be run
individually or standalone into the build subfolder.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-12 10:03:45 +02:00
Anas Nashif 80f4b5db21 scripts: move gen_handles.py to scripts/build
Move scripts needed by the build system and not designed to be run
individually or standalone into the build subfolder.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-12 10:03:45 +02:00
Anas Nashif 6e1a335447 scripts: move gen_app_partitions.py to scripts/build
Move scripts needed by the build system and not designed to be run
individually or standalone into the build subfolder.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-12 10:03:45 +02:00
Tim Lin 361e6e5fec tests: drivers: i2c_api: Convert to use DEVICE_DT_GET
This PR is related to #47464, missing the fix of device_get_binding
in the test_burst_gy271 function.

Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-07-12 09:55:02 +02:00
Carlo Caione dd0bf0e59a riscv: Disable IRQ_VECTOR_TABLE_JUMP_BY_CODE for CLIC
Quoting from the SiFive Interrupt Cookbook [0]

  CLIC vectored mode has a similar concept to CLINT vectored mode, where
  an interrupt vector table is used for specific interrupts. However, in
  CLIC vectored mode, the handler table contains the address of the
  interrupt handler instead of an opcode containing a jump instruction.
  When an interrupt occurs in CLIC vectored mode, the address of the
  handler entry from the vector table is loaded and then jumped to in
  hardware

So, when CLIC is present we must use IRQ_VECTOR_TABLE_JUMP_BY_ADDRESS
instead of IRQ_VECTOR_TABLE_JUMP_BY_CODE.

[0] https://starfivetech.com/uploads/sifive-interrupt-cookbook-v1p2.pdf

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-12 09:54:13 +02:00
Pieter De Gendt 850cdc9196 drivers: memc: mcux_flexspi_hyperram: Fix multiple log module definition
Enabling the FlexSPI HyperRAM results in a build error, due to a logging
module re-definition. Fixed by changing the log module name.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-07-12 09:54:07 +02:00
Daniel DeGrasse 5dcb5e0f67 drivers: ethernet: mcux: Increase available RX buffers
increase available RX buffers to MCUX ethernet driver.
improves measured performance on RT1050 EVK zperf download
from 500Kbps to 22Mbps.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-07-12 09:53:56 +02:00
Pieter De Gendt 3cde5a0aaa soc: mimxrt1064: Remove unused low power header include
The included header file wasn't used.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-07-11 17:51:18 -05:00
Pieter De Gendt 3556bf6fa9 soc: mimxrt1064: Fix low power build issue with video PLL
Fix build error if CONFIG_PM and CONFIG_INIT_VIDEO_PLL are enabled.
Added 2 missing semicolons.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-07-11 17:51:18 -05:00
Maximilian Deubel 3d2b04c9a8 ADXL362: add dynamic inact time setting
This patch extends the adxl362 driver by adding an option
to change the inactivity detection timeout at runtime.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2022-07-11 18:19:45 +00:00
Krzysztof Chruscinski 5f60164a0f logging: Prevent redundant thread wake up
Fix a bug introduced by 658123bb21 where if all backends were
ready prior to logging thread loop, thread was periodically
waken up for no reason. Fix is setting timeout to K_FOREVER
if all backends are ready after the initialization.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-07-11 18:05:35 +00:00
Krzysztof Chruscinski 60ca7899c7 logging: Initialize backends with autostart flag set
Added check which ensures that only backends with autostart
flag set are enabled automatically by the logging.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-07-11 18:05:35 +00:00
Peter Ujfalusi e243122c1e dma/cavs_hda: Configure DGMBS only for host DMA configuration
The DGMBS should be only set for the host side and not on the link DMA.

Fixes: #46632
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2022-07-11 18:04:54 +00:00
Pieter De Gendt a727b8aaac debug: coredump: flash backend: add query/command to get raw data
Add a new coredump query and command type to retrieve the raw data
stored to the flash backend

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-07-11 18:04:05 +00:00
Mariusz Skamra a3904bd991 Bluetooth: audio: Fix PACS location chrc properties
If the characteristic is non-writtable, the BT_GATT_CHRC_WRITE property
flag shall be unset. Moreover, threre is no point to set
BT_GATT_PERM_WRITE_ENCRYPT permission flag as well if the attribute has
no `write` callback set anyway.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-07-11 16:04:42 +00:00
Jamie Iles 6868058c03 arch: arm: cache: Add cache maintenance functions
This commit adds icache and dcache maintenance functions
for aarch32.

Signed-off-by: Jamie Iles <quic_jiles@quicinc.com>
Signed-off-by: Dave Aldridge <quic_daldridg@quicinc.com>
2022-07-11 16:03:31 +00:00
Kiril Petrov 44f651d315 drivers: nordic_nrf_temp: nrfx: Fix build warning into temp_nrf5_init
Building lwm2m_client with CONFIG_NET_L2_OPENTHREAD=y leads to
following warning during build:

west build -s samples/net/lwm2m_client -b nrf52840dk_nrf52840 -- \
				-DCONFIG_NET_L2_OPENTHREAD=y

zephyr/drivers/sensor/nrf5/temp_nrf5.c:115:10:
warning: zero-length gnu_printf format string [-Wformat-zero-length]
115 |  LOG_DBG("");

Signed-off-by: Kiril Petrov <retfie@gmail.com>
2022-07-11 17:57:12 +02:00
Gerard Marull-Paretas c2d699ec2d drivers: spi: sifive: remove CONFIG_SIFIVE_SPI_0_ROM
CONFIG_SIFIVE_SPI_0_ROM (default y) was an option to disable spi0 if
used to access SPI Flash ROM. However, its design had a problem: it
relied on instance numbers. You had to set status okay for spi0 to make
it work (incongruent with the purpose of the option itself). This patch
makes things simpler: if such SPI0 is not available, simply keep it
disabled in DT. Bindings have been updated to mention this case.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-11 17:56:55 +02:00
Gerard Marull-Paretas aa1988f0ca boards: riscv: hifive: disable spi0 and flash0 by default
When flash connected to spi0 is used as ROM Flash, it can't be
instantiated. spi0 is in fact disabled now with CONFIG_SIFIVE_SPI_0_ROM,
which defaults to y. However, the child flash device is not. This causes
issues with tests relying on `jedec,spi-nor` because they can't find a
parent device.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-11 17:56:55 +02:00
Gerard Marull-Paretas 1e2dbf075d arch: riscv: linker: do not require jedec,spi-nor to be 'okay'
It is not always possible to enable the jedec,spi-nor driver (e.g.
because the SPI controller can't be enabled). This is the case for
HiFive boards. Still, DT can be used for hardware description.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-11 17:56:55 +02:00
Gerard Marull-Paretas e0c647c147 samples: drivers: flash_shell: remove duplicate include
<stdlib.h> was included twice, keep the first occurence only.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-11 17:56:55 +02:00
Gerard Marull-Paretas d424d66aff samples: drivers: flash_shell: remove unused soc.h
The sample included soc.h for no reason, remove it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-11 17:56:55 +02:00
Gerard Marull-Paretas 457fa9d463 drivers: flash: shell: remove unused soc.h
The flash shell included soc.h for no reason, remove it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-11 17:56:55 +02:00
Carlo Caione 87692cd809 riscv: Reduce callee saved registers for RV32E
This was lost when working on 673f41e708.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-11 16:11:13 +02:00
Carlo Caione 2f5fef960e sample: s2ram: Introduce S2RAM sample
Introduce a template / sample for S2RAM running on rf5340dk.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-11 15:26:26 +02:00
Carlo Caione 0ed637a7b6 arch: cortex-m: Enable support for S2RAM
Enable S2RAM for Cortex-M hooking up the provided API functions.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-11 15:26:26 +02:00
Carlo Caione 1e74f1bff5 arch: Introduce S2RAM interface
Add a new API used by arch to implement suspend-to-RAM (S2RAM).

The API is composed by a single function to save the CPU context on
suspend.

A CPU context is the arch-specific set of registers that must be
preserved on power-off (in retained RAM) to be able to resume the
execution from the point it was suspended without going through the
whole kernel startup stage.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-11 15:26:26 +02:00
Carlo Caione 83939c1bb5 dts: nrf5340: Add label for cpu0
Add a node label for cpu0 so that we can extend that using overlays.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-11 15:26:26 +02:00
Kumar Gala 97281913f5 modem: hl7800: Cleanup gpio assert/deassert
Use logical values of 0/1 for gpio_pin_set_dt and handle any
inversions as GPIO flags that might be required at a board level.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-11 07:46:22 -05:00
Kumar Gala 6100eadd4b modem: hl7800: Update driver to use gpio_dt_spec
Simplify the implementation by using gpio_dt_spec.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-11 07:46:22 -05:00
Kumar Gala de49b0a926 boards: arm: pinnacle_100_dvk: Add GPIO flags for hl7800 to dts
Update devicetree to have GPIO flags set for various pins on the
hl7800 modem.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-11 07:46:22 -05:00
Jonathan Rico 1f226e0c4b samples: boards: fix bbc_microbit pong build
The GATT caching feature isn't needed, and was making the memory
consumption blow up because of the recent addition of `long_wq` for
deferred work.

Fixes #47428 .

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2022-07-11 14:38:10 +02:00
Carlo Caione 541024eb43 riscv: litex-vexriscv: Add missing header
soc.h is using sys_read* functions. Add the proper header for that.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-11 14:31:39 +02:00
Carlo Caione 5d104f20ab riscv: Introduce API for CLIC and PLIC
Introduce a new interface for CLIC and PLIC to be used by the drivers.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-11 14:31:39 +02:00
Carlo Caione 364ad6dc64 riscv: Move IRQ code to a standalone header
arch.h is getting crowded. Move the IRQ code in a proper header file.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-11 14:31:39 +02:00
Carlo Caione 56466a14e1 riscv: Decouple CLIC and PLIC
Try to decouple CLIC and PLIC as much as possible.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-11 14:31:39 +02:00
Carlo Caione 31c5dc2230 Kconfig: Introduce RISCV_HAS_CLIC
Introduce a new RISCV_HAS_CLIC symbol for platforms using CLIC,
reorganize the Kconfigs and make the Nuclei ECLIC depending on the new
symbol.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-11 14:31:39 +02:00
Vinayak Kariappa Chettimada b397a950c5 Bluetooth: Controller: Fix missing reset of coded PHY scanning
When switching from Extended Scanning by Extended
Advertising HCI commands back to Legacy Scanning after a
HCI reset it is required that the coded PHY scanning
context is reset.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-07-11 14:15:13 +02:00
Pieter De Gendt f73ff469da manifest: nanopb: upmerge to version 0.4.6
The upstream version 0.4.6 was tagged. Upmerge the zephyr branch.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-07-11 14:15:06 +02:00
Pieter De Gendt 657a67d090 scripts/requirements: Replace protobuf with grpcio-tools
The nanopb module generates source files from .proto files,
however the latest protobuf v4.21.0 python package breaks
compatibility.
Using grpcio-tools instead fixes this.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-07-11 14:15:06 +02:00
Vinayak Kariappa Chettimada 265731b971 Bluetooth: Controller: Fix Extended Scan Address Resolution
Fix Extended Scanning Address Resolution that incorrectly
checked for Bit Count Comparison which is not to be checked
when explicit resolution is performed in the Rx ISR.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-07-11 13:53:19 +02:00
Vinayak Kariappa Chettimada 918585263e Bluetooth: Controller: Use maximum Adv PDU size time reservation
Use the maximum advertising PDU size time reservation
consider the Advertising Data could be updated from zero to
maximum support size. If maximum time reservation is
disabled then time reservation corresponding to the
Advertising Data present at the time of the start/enable
of Advertising is used.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-07-11 13:34:29 +02:00
Vinayak Kariappa Chettimada fab4511164 Bluetooth: Controller: Fix overlapping advertising events
When multiple advertising sets are support then use advanced
scheduling implementation to place multiple auxiliary PDUs
and periodic advertising PDUs in a non-overlapping schedule.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-07-11 13:34:29 +02:00
Aurelien Jarno 2ea4516a4a drivers/flash: stm32g0: Prepare for unaligned accesses in flash writes
When using the settings subsystem, the data argument argument passed to
flash_stm32_write_range() might not be 8-bytes aligned, causing an
unaligned memory access fault.

Fix that the same way as it was done for the STM32L4 in commit
652efa530f.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2022-07-11 13:28:45 +02:00
Guo Lixin dada9ea54b tests: kernel: gen_isr_table: move to new ztest API
Move tests/kernel/gen_isr_table/ to use new ztest API.

Signed-off-by: Guo Lixin <lixinx.guo@intel.com>
2022-07-11 13:23:27 +02:00
Gerard Marull-Paretas 2533b13cd2 drivers: gpio: nrfx: add custom drive flags
Now that we have 8 bits reserved for vendor specific GPIO flags,
introduce a new set of flags for nRF platforms to configure pins drive
mode. These new flags are equivalent to the previous existing ones, but
use a naming scheme the fits better with vendor hardware capabilities.

The table below shows the equivalence between old and new flag

| Old flags                 | New flags             |
|---------------------------|-----------------------|
| `NRF_GPIO_DS_DFLT_LOW`    | `NRF_GPIO_DRIVE_S0`   |
| `NRF_GPIO_DS_DFLT_HIGH`   | `NRF_GPIO_DRIVE_S1`   |
| `NRF_GPIO_DS_ALT_LOW`     | `NRF_GPIO_DRIVE_H0`   |
| `NRF_GPIO_DS_ALT_HIGH`    | `NRF_GPIO_DRIVE_H1`   |
| `NRF_GPIO_DS_DFLT`        | `NRF_GPIO_DRIVE_S0S1` |
| `NRF_GPIO_DS_ALT`         | `NRF_GPIO_DRIVE_H0H1` |
| `NRF_GPIO_DS_DFLT_LOW \|` | `NRF_GPIO_DRIVE_S0H1` |
| `NRF_GPIO_DS_ALT_HIGH`    |                       |
| `NRF_GPIO_DS_ALT_LOW \|`  | `NRF_GPIO_DRIVE_H0S1` |
| `NRF_GPIO_DS_DFLT_HIGH`   |                       |

Documentation has been written to explain in more detail the meaning of
the flags and how they can be used.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-11 13:22:24 +02:00
Gerard Marull-Paretas e29055a225 drivers: gpio: nrfx: remove custom DS flags
The naming of the custom DS flags is not clear for nRF platforms. This
patch removes all the NRF_GPIO_DS* flags. New flags will be
re-introduced in a follow-up commit.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-11 13:22:24 +02:00
Anas Nashif bfb65b054c cmake: binutils: find binutils nm for host compiler
We need this to generate symbols from final binary.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-11 11:56:39 +02:00
Anas Nashif 32c22cc63a ztest: generate symbols for tests
This will help with parsing testcases in test binaries.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-11 11:56:39 +02:00