Commit graph

65696 commits

Author SHA1 Message Date
Carlo Caione 3a48365bab irq: Fix IRQ vector table relocation
The generation of the software ISR table and the IRQ vector table
(respectively generated by CONFIG_GEN_SW_ISR_TABLE and
CONFIG_GEN_IRQ_VECTOR_TABLE) should (in theory) go through three stages:

1. A placeholder table is generated in arch/common/isr_tables.c and
   placed in an orphaned .gnu.linkonce.{irq_vector_table, sw_isr_table}
   section

2. The real table is generated by arch/common/gen_isr_tables.py (creating
   the build/zephyr/isr_tables.c file)

3. The real table is un-orphaned by moving it in a proper section with a
   proper alignment

While all the steps are done automatically for the software ISR table,
for the IRQ vector table each architectures must take care of modiying
its own linker script to place somewhere the generated IRQ vector table
(basically step 3 is missing).

This is currently only done for 2 architectures: Cortex-M (ARMv7) and
ARC. But when another architecture tries to use the IRQ vector table,
the linker complains about that. For example:

  Linking C executable zephyr/zephyr.elf
  riscv64-zephyr-elf/bin/ld.bfd: warning: orphan section
    `.gnu.linkonce.irq_vector_table' from
    `zephyr/CMakeFiles/zephyr_final.dir/isr_tables.c.obj' being placed in
    section `.gnu.linkonce.irq_vector_table'

In this patch we introduce a new CONFIG_ARCH_IRQ_VECTOR_TABLE_ALIGN to
support the architectures requiring a special alignment for the IRQ
vector table and we also introduce a way to automatically place the IRQ
vector table in place in the same way it is done for the ISR software
table.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-06-28 12:29:42 +02:00
Carlo Caione 7d2aea9ab1 arm64: linker: Remove IRQ vector table symbols
The IRQ vector table cannot be used on this architecture.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-06-28 12:29:42 +02:00
Eugene Cohen 434e748cbb arch: arm64: add WAIT_AT_RESET_VECTOR config
On platforms where reset vector catch is not possible
it is useful to have a compile-time option to spin
at the reset vector allowing a debugger to be attached
and then to manually resume execution.

Define a config option for arm64 to spin at the
reset vectdor so a debugger can be attached.

Signed-off-by: Eugene Cohen <quic_egmc@quicinc.com>
2022-06-28 12:29:17 +02:00
Jeremy Bettis 6ede43b078 npcx: Set hex_file automatically w/ npcx hex image
When using CONFIG_NPCX_IMAGE_OUTPUT_HEX, set the hex_file
runners_yaml_props_target property, so that west flash will flash the
correct file.

Change the cmake flash rules to populate the hex_file value in the
runners.yaml file if either CONFIG_BUILD_OUTPUT_HEX is enabled or some
cmake file set the runners_yaml_props_target hex_file property.

Update the npcx9m6f_evb instructions now that the filename is implicit.

Signed-off-by: Jeremy Bettis <jbettis@google.com>
2022-06-28 11:09:35 +02:00
Henrik Brix Andersen 27820e9dcb scripts: requirements: extras: add clang-format
Add clang-format to the requirements-extras.txt and require a version
compatible with the configuration options present in the .clang-format
file.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-06-28 11:09:14 +02:00
Kumar Gala 9dfbae0ba5 wifi: eswifi: Convert to DEVICE_DT_GET
Move to using DEVICE_DT_GET so we can phase out DT_LABEL.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-28 11:09:03 +02:00
Carles Cufi 97720bee1f gh: issue templates: Maintainershp section in ext-source
Add a maintainership section in the ext-source template, forcing future
contributors to identify one or more maintainers.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-06-28 11:08:56 +02:00
Carles Cufi 0eb2207ca2 gh: issue templates: Fix formatting of ext-source
Fix the heading level of the Dependencies section so that it matches the
rest of them.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-06-28 11:08:56 +02:00
Aurelien Jarno 3f656778e6 boards: arm: nucleo_h7a3zi_q: enable ITCM
Add a zephyr,itcm entry to the chosen node similarly to the zephyr,dtcm
one.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2022-06-28 11:08:16 +02:00
Aurelien Jarno 6e56cfc5cd dts: arm: st: h7: add ITCM memory for STM32H7A3
The STM32H7A3 SoC has 64 kB of ITCM RAM mapped at address 0x00000000.

Tested using zephyr_code_relocate().

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2022-06-28 11:08:16 +02:00
Benjamin Björnsson 6318d29035 drivers: sensor: max17055: Update driver to use i2c_dt_spec
Simplify driver by using i2c_dt_spec for bus access.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-28 11:07:57 +02:00
Benjamin Björnsson 805ad30324 drivers: sensor: max17055: Change parameters of helper functions
Change parameter list of functions for consistency with other drivers.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-28 11:07:57 +02:00
Kumar Gala ed738ed096 drivers: sensor: ti_hdc: Update driver to use gpio_dt_spec
Move driver to use gpio_dt_spec for DRDY GPIO handling.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-28 11:07:50 +02:00
Kumar Gala c738c99b33 drivers: sensor: ti_hdc: Update driver to use i2c_dt_spec
Move driver to use i2c_dt_spec for I2C bus access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-28 11:07:50 +02:00
Kumar Gala fca571955b samples: ti_hdc: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as we
work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-28 11:07:50 +02:00
Thomas Ebert Hansen d9774bd925 Bluetooth: controller: llcp: fix issue re. version exchange
Complete the remote initiated version exchange if a LL_VERSION_IND is
received while already having responded in an earlier version exchange
procedure.

Clarify comment regarding how to handle this invalid behaviour.

This has been seen when running the LL/CON/CEN/BI-12-C test on EBQ.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2022-06-28 11:07:43 +02:00
Andries Kruithof 19bf928ffb Bluetooth: controller: llcp: fix DLE related EBQ tests
Calculation of the DLE related parameters (rx/tx octets and time) depend
on the actual phy in use. For this reason the PHY settings must be
initialised before doing the DLE parameter calculations

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2022-06-28 11:07:36 +02:00
Erwan Gouriou bced529f78 include: stm32: clock_control: Ease usage of STM32_DT_CLOCKS macro
STM32_DT_CLOCKS was designed to take a device tree node label name as
argument: STM32_DT_CLOCKS(uart1)
Change its implementation to take a node identifier instead:
STM32_DT_CLOCKS(DT_NODELABEL(uart1)).

This make its usage more flexible since the argument can now be extracted
from other DT macros such as DT_PARENT. Then, the following can be done:
STM32_DT_CLOCKS(DT_PARENT(child_node_label)).

Since it is now possible implement STM32_DT_INST_CLOCKS using
STM32_DT_CLOCKS.

Finally, update existing STM32_DT_CLOCKS users and convert
STM32_INST_CLOCK_INFO users to STM32_CLOCK_INFO.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-06-28 11:07:29 +02:00
Christopher Friedt d0f497c821 tests: posix: use new ztest api
* Convert test suite declaration to `ZTEST_SUITE()`
  and test case declaration to `ZTEST()`.
* add `CONFIG_ZTEST_NEW_API=y` to prj.conf

Fixes #46793

Signed-off-by: Christopher Friedt <cfriedt@fb.com>
2022-06-28 11:07:12 +02:00
Erik Brockhoff 8b1d50b981 Bluetooth: controller: llcp: fix issue re. missing ack of terminate ind
On remote terminate on central the conn clean-up would happen before ack
of terminate ind was sent to peer.
Now clean-up is 'postponed' until subsequent event.
Also now data tx is paused on rx of terminate ind to ensure no data is
tx'ed after rx of terminate ind

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
2022-06-28 11:07:04 +02:00
Erik Brockhoff 8b912f1488 Bluetooth: controller: llcp: fix issue re. missing release of tx node
On disconnect with refactored LLCP, if data tx is paused,
possibly 'waiting' tx nodes would not get released.

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
2022-06-28 11:06:41 +02:00
Huifeng Zhang eb949061ce drivers: timer: arm_arch_timer: assign a initial value to last_cycle
On FVP platform, when parameter 'bp.refcounter.use_real_time' is set
to 1, cntvct_el0 isn't count from 0 and may cause overflow issue in
first timer compare interrupt.

'bp.refcounter.use_real_time' is 0 by default.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2022-06-28 11:06:31 +02:00
Huifeng Zhang 79d076be7f drivers: timer: arm_arch_timer: Fix round up issue
Fast hardware with slow timer hardware can trigger and enter an
interrupt and reach 'sys_clock_set_timeout' before the counter has
advanced.

That defeats the "round up" logic such that we end up scheduling
timeouts a tick too soon (e.g. if the kernel requests an interrupt
at the "X" tick, we would end up computing a comparator value
representing the "X-1" tick!).

Choose the bigger one between 1 and "curr_cycle - last_cycle" to
correct.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2022-06-28 11:06:31 +02:00
Erik Brockhoff 522e0b5ade Bluetooth: controller: fixing issue re. erroneous DLE changed events
Only apply change to effective DLE times if current max times are too
small to accommodate. Similar to legacy implementation
Update unit tests to new DLE ntf behavior

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
2022-06-28 11:06:15 +02:00
Loris Schmit e1c2f2cfb6 drivers: mpu9250: magnetometer data read fix
The magnetometer data read from AK9863 is assumed to be big endian
(like the accelerometer & gyroscope data).
However it is in little endian, which means the appropriate byteorder
function is sys_le16_to_cpu().
See the MPU925 register map:
https://3cfeqx1hf82y3xcoull08ihx-wpengine.netdna-ssl.com/wp-content/uploads/2017/11/RM-MPU-9250A-00-v1.6.pdf
At 5.6 HXL to HZH: Measurement Data

Signed-off-by: Loris Schmit <loris.schmit@inovex.de>
2022-06-28 11:06:06 +02:00
Henrik Brix Andersen 3f0e8dda3d clang-format: restore column limit value of 100
Restore line length limit of 100 characters as introduced in
6432a56ae9.

Fixes: bac0dbe8f2

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-06-27 17:18:04 -04:00
Erwan Gouriou 343fdddfdd drivers: i2c: stm32: Use device tree as single source of compatibility
Some text in help section was documenting the compatibility of driver
variants with stm32 series.
This is duplicate of information versus device tree which should be
used as single source of information for hardware description.
Remove these lines, so we don't have to touch this driver each time
a series is added.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-06-27 15:43:14 -05:00
Torstein Grindvik fe9893ec86 samples: tfm: Enumerate more test variants
Some TFM samples run different test suites/cases based on
which configurations are set.
Enumerate more of these.

For samples/tfm_integration/tfm_psa_test,
add the following new build configurations:
	* Add CONFIG_TFM_PSA_TEST_STORAGE
	* Add CONFIG_TFM_PSA_TEST_CRYPTO
	* Add CONFIG_TMF_PSA_TEST_INITIAL_ATTESTATION

For samples/tfm_integration/tfm_regression_test,
add this to all build configurations:
	* Add CONFIG_TFM_PARTITION_PROTECTED_STORAGE
	* Add CONFIG_TFM_PARTITION_INTERNAL_TRUSTED_STORAGE
	* Add CONFIG_TFM_PARTITION_CRYPTO
	* Add CONFIG_TFM_PARTITION_INITIAL_ATTESTATION
	* Add CONFIG_TFM_PARTITION_PLATFORM
	* Add CONFIG_TFM_PARTITION_AUDIT_LOG

And build the above for CONFIG_TFM_IPC as well.

Signed-off-by: Torstein Grindvik <torstein.grindvik@nordicsemi.no>
2022-06-27 15:41:57 -05:00
Ederson de Souza 4fd8d474ec soc/xtensa/intel_adsp/tools: Do not use grep Perl extensions
They may be disabled in some environments (such as Gentoo based
developer mode on Chromebooks). Use extended regular expressions
instead.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-06-27 15:41:00 -05:00
Gerard Marull-Paretas fa0dc683fd boards: arm: nrf9160_innblue22: use regulators
The board enabled power switches at init time, hardcoding switch
information in a board C file. This patch makes use of the regulator
infrastructure to describe such power switches in DT, making the board
specific C code obsolete. CONFIG_REGULATOR is only enabled if
CONFIG_SENSOR=y, as switches power sensors.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-06-27 12:23:00 -05:00
Gerard Marull-Paretas bfe2c4eef9 boards: arm: nrf9160_innblue21: use regulators
The board enabled power switches at init time, hardcoding switch
information in a board C file. This patch makes use of the regulator
infrastructure to describe such power switches in DT, making the board
specific C code obsolete. CONFIG_REGULATOR is only enabled if
CONFIG_SENSOR=y, as switches power sensors.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-06-27 12:23:00 -05:00
Yuriy Vynnychek 835b25b82a MAINTAINERS: replace yurvyn by andy-liu-telink
Replaced yurvyn by andy-liu-telink.

Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
2022-06-27 18:19:48 +02:00
Benjamin Björnsson 5be2c81222 samples: sensor: sm351lt: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:59:53 -05:00
Benjamin Björnsson 8f5d247a71 drivers: sensor: sm351lt: Update driver to use gpio_dt_spec
Simplify driver by using gpio_dt_spec for bus access.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:59:53 -05:00
Benjamin Björnsson 935bf6fa25 drivers: sensor: sm351lt: Move variable declaration
Move variable declaration inside if-def to remove compiler
warning when building the driver without trigger.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:59:53 -05:00
Benjamin Björnsson 3e4e4eaf75 drivers: sensor: si7060: Update driver to use i2c_dt_spec
Simplify driver by using i2c_dt_spec for bus access.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:57:34 -05:00
Benjamin Björnsson 0f7751049f drivers: sensor: si7060: Change parameters of helper functions
Change parameter list of functions for consistency with other drivers.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:57:34 -05:00
Benjamin Björnsson 4e30743d28 drivers: sensor: si7055: Update driver to use i2c_dt_spec
Simplify driver by using i2c_dt_spec for bus access.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:49:45 -05:00
Benjamin Björnsson 7937345afd drivers: sensor: si7055: Change parameters of helper functions
Change parameter list of functions for consistency with other drivers.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:49:45 -05:00
Benjamin Björnsson 00fac1e91b drivers: sensor: si7006: Update driver to use i2c_dt_spec
Simplify driver by using i2c_dt_spec for bus access.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:48:06 -05:00
Benjamin Björnsson f8aef61793 drivers: sensor: si7006: Change parameters of helper functions
Change parameter list of functions for consistency with other drivers.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:48:06 -05:00
Benjamin Björnsson 5eb99ac36c drivers: sensor: shtcx: Update driver to use i2c_dt_spec
Simplify driver by using i2c_dt_spec for bus access.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:46:06 -05:00
Benjamin Björnsson dd5cf763ab drivers: sensor: shtcx: Remove wrapper functions
Remove wrapper functions for getting i2c bus and i2c bus
address. This is done here to make it easier to move this
driver to i2c_dt_spec while still having clear separation
between commits.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:46:06 -05:00
Benjamin Björnsson f61607c57c samples: sensor: sht3xd: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:43:51 -05:00
Benjamin Björnsson fa75491aca drivers: sensor: sht3xd: Update driver to use gpio_dt_spec
Simplify driver by using gpio_dt_spec for bus access.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:43:51 -05:00
Benjamin Björnsson 238d5ad291 drivers: sensor: sbs_gauge: Update driver to use i2c_dt_spec
Simplify driver by using i2c_dt_spec for bus access.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:40:19 -05:00
Benjamin Björnsson 04ce7bca33 drivers: sensor: opt3001: Update driver to use i2c_dt_spec
Simplify driver by using i2c_dt_spec for bus access.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:38:56 -05:00
Benjamin Björnsson b4b02c1b42 drivers: sensor: opt3001: Change parameters of helper functions
Change parameter list of functions for consistency with other drivers.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:38:56 -05:00
Benjamin Björnsson e3e1bd19a3 drivers: sensor: ms5837: Update driver to use i2c_dt_spec
Simplify driver by using i2c_dt_spec for bus access.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:36:31 -05:00
Benjamin Björnsson 762db471c0 drivers: sensor: ms5837: Change parameters of helper functions
Change parameter list of functions for consistency with other drivers.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:36:31 -05:00