Commit graph

74438 commits

Author SHA1 Message Date
Anas Nashif 7d5cf451fd MAINTAINERS: add West project: chre
Add missing entry for chre in the maintainers file.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-01-25 16:32:52 -05:00
Yuval Peress e7443bb203 sensors: Add attribute configuration for icm42688
Implement the attribute get/set for the icm426888

Signed-off-by: Yuval Peress <peress@google.com>
2023-01-25 09:48:05 -06:00
Yuval Peress ad4cb88494 sensor_shell: add attribute support
Add 2 new sub-commands to the sensor command (attr_get and attr_set).
These commands can be used to access the driver's attr_set and attr_get
functions.

Signed-off-by: Yuval Peress <peress@google.com>
2023-01-25 09:48:05 -06:00
Yuval Peress 3f4c568f71 sensor_shell: run clang-format
Run clang-format on the sensor_shell.c to make diffs easier for the
next commit.

Signed-off-by: Yuval Peress <peress@google.com>
2023-01-25 09:48:05 -06:00
Juha Heiskanen 1f84409b48 net: lwm2m: Trace clean
Cleaned Trace message print.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2023-01-25 15:08:07 +00:00
Chamira Perera ce49beb297 net: ethernet: Fixes for ethernet stats reporting.
The following fixes were applied:
 - Multicast Rx packets stats were not recorded due not parsing the
ethernet header. The function that tried to parse the ethernet header
was parsing the ethernet packet beyond the ethernet header.
 - Added a new stats for unknown protocol which gets updated when the
ethernet layer encounters an unknown ethernet packet type.

Fixes #53994

Signed-off-by: Chamira Perera <chamira.perera@audinate.com>
2023-01-25 15:01:14 +00:00
Henrik Brix Andersen 55d0ffa874 drivers: can: remove CAN_HAS_CANFD Kconfig helper
Remove the CAN_HAS_CANFD Kconfig helper symbol in order to allow enabling
CAN-FD support in the API regardless of driver support.

Change default to CAN-FD support being disabled and have samples and tests
that require CAN-FD support turn it on. This aligns the default
configuration across CAN controller drivers regardless of their
capabilities.

The rationale behind this is that we are starting to see MCUs with multiple
CAN controllers, some CAN-FD compatible, some not (e.g. NXP i.MX RT1060 and
FPGAs). Automatically enabling CAN-FD support based on the presence of a
CAN-FD capable CAN controller leads to different application default
settings based on the CAN controller(s) in use.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-25 15:00:39 +00:00
Henrik Brix Andersen c6db73e93d tests: drivers: can: timing: use capabilities to skip tests
Use the CAN controller driver capabilities to determine if the CAN-FD
timing tests should be skipped or not. There is no need for special
handling of CONFIG_CAN_FD_MODE.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-25 15:00:39 +00:00
Henrik Brix Andersen f1a7ec96db drivers: can: remove CAN_HAS_RX_TIMESTAMP Kconfig helper
Remove the CAN_HAS_RX_TIMESTAMP Kconfig helper symbol in order to allow
enabling CAN RX timestamps in the API regardless of driver support.

This simplifies application prj.conf settings across board supporting/not
supporting RX timestamps considerably.

CAN drivers not supporting RX timestamps already initialize the timestamp
to 0 for received frames.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-25 15:00:39 +00:00
Guillaume Gautier d9662d1706 dts: bindings: adc: Remove unused properties for STM32 ADC
Boolean properties for STM32 ADC internal channels are not used anymore
and can be removed. It is replaced by channel number properties.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-01-25 15:00:21 +00:00
Guillaume Gautier 4635af398b dts: arm: st: Remove obsolete properties for all STM32 ADC from dts
In all STM32 dts, remove all reference to the following properties:
- has-temp-channel
- has-vref-channel
- has-vbat-channel

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-01-25 15:00:21 +00:00
Guillaume Gautier 6deebdd13a drivers: adc: Remove now unused variables for STM32 ADC
Remove boolean variables for internal channels now that we use channel
number directly

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-01-25 15:00:21 +00:00
Guillaume Gautier 9c6d44ef5a drivers: adc: Simplify STM32 ADC channels setup
Now that we have the information of internal channel number for STM32
ADCs in the dts, we can use it to remove a lot of specific code and
make it clearer.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-01-25 15:00:21 +00:00
Guillaume Gautier 009fcb9305 dts: arm: st: Add ADC temperature and Vref channels for all STM32
Now that we have a binding to define the channel number for temperature
and Vref measurement, update all dtsi to include the information.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-01-25 15:00:21 +00:00
Guillaume Gautier e834976d04 dts: bindings: adc: Add bindings for internal STM32 ADC channels
Add some bindings to define STM32 ADC internal channels for:
 - Temperature
 - Vref
 - Vbat
The goal is to transfer information to the dts instead of inside the
ADC driver.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-01-25 15:00:21 +00:00
Erwan Gouriou 34e49a7c54 drivers: adc: stm32: Refactor driver init section
Slightly refactor STM32_ADC_INIT macro.
adc_stm32_cfg_##index declaration is now part of ADC_STM32_INIT
and extracted from CONFIG_ADC_STM32_SHARED_IRQS #ifdef.

Aim is to minimize code duplication when adding new adc_stm32_cfg_X
or adc_stm32_data_Y entries

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2023-01-25 15:00:21 +00:00
Jordan Yates fb1ee429a2 pm: device: rework pm_device_children_action_run
Rework the implementation of `pm_device_children_action_run` to use the
common `device_supported_foreach` iterator.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-01-25 14:58:52 +00:00
Jordan Yates 34251808ac device: fixup doxygen parameter names
Fix several parameter references with incorrect names.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-01-25 14:58:52 +00:00
Andrei Emeltchenko ec8c9f05fc drivers: ieee802154_rf2xx: Fix logical operation
Fix using AND instead of OR.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-01-25 14:58:09 +00:00
Andreas Chmielewski 2571d6c3e3 tests: lwm2m_rd_client: Added fff tests
Added unittests for lwm2m_rd_client.c using FFF framework.

Signed-off-by: Andreas Chmielewski <andreas.chmielewski@grandcentrix.net>
2023-01-25 14:55:02 +00:00
Andreas Chmielewski 022ff636da net: lwm2m: rd_client: added init function
To write tests it is necessary to offer init function for the RDClient
to define custom fakes before.

Signed-off-by: Andreas Chmielewski <andreas.chmielewski@grandcentrix.net>
2023-01-25 14:55:02 +00:00
Andrzej Głąbek cf871aec64 drivers: nrf_rtc_timer: Adjust set_absolute_alarm to prevent CC misses
This is a follow-up to commit 205e684958.

The recently added nrf_rtc_timer test case (test_next_cycle_timeouts)
revealed a problem in the current implementation of this function.
Adjust it to avoid missing COMPARE events in specific circumstances.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-01-25 11:25:01 +00:00
Andrzej Głąbek ea859cce1e tests: drivers: nrf_rtc_timer: Add a next cycle timeouts test case
Add a test case that schedules a set of consecutive timeouts,
each one on the next cycle of the system timer but each time
after a slightly larger delay.
This test case reveals a problem in the current nrf_rtc_timer
implementation that sometimes a compare value can be missed
what leads to timeouts delayed by 512 seconds.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-01-25 11:25:01 +00:00
Evgeniy Paltsev d705f740ee samples/subsys/zbus/benchmark: fix counter synchronization issue
Current implementation has obvious synchronization issue with
global counter variable which is updated (RMW) in multiple threads
without any locking.

Replace regular variable by atomic type. As the maximum possible
value is much less than INT32_MAX it's OK to replace the original
uint64_t by (32-bit) atomic_t.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2023-01-25 11:24:07 +00:00
Joakim Andersson b43dfa27e9 modules: trusted-firmware-m: Remove dependency on module file for tests
Remove the dependency on the test repositories having a zephyr module
file in their repositories.
With this change we can take the upstream test repositories direct
commit SHA or tag.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-01-25 11:23:23 +00:00
Marcin Jabrzyk 5787c69b9c samples: watchdog: RP2040 doesn't require custom max timeout
RP2040 accepts window max time in milliseconds then
the default Zephyr sample value is fine.

Signed-off-by: Marcin Jabrzyk <marcin.jabrzyk@gmail.com>
2023-01-24 19:01:34 -08:00
Marcin Jabrzyk 61916c69dd drivers: watchdog: Fix RP2040 watchdog load time
RP2040 requires watchdog load time in us, but Zephyr
watchdog window values are in ms. Make sure that it is
adjusted to hardware requirements.

Signed-off-by: Marcin Jabrzyk <marcin.jabrzyk@gmail.com>
2023-01-24 19:01:34 -08:00
Evgeniy Paltsev 5c1d311ba0 ARC: hsdk: openocd: replace depricated syntax
Replace depricated openocd syntax with proper one

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2023-01-24 19:00:13 -08:00
Keith Short d2c598e784 docs: Add emulator API reference
Add the API reference section to the peripheral and hardware emulators
documentation.

Signed-off-by: Keith Short <keithshort@google.com>
2023-01-24 18:58:49 -08:00
Evgeniy Paltsev 9eb8baeff9 ARC: irq: idu: mask IRQ before level setup
Currently we setup irq trigger type (pulse or level) in IDU
before we Mask (disable) IRQ line.

The IDU is disabled at this moment, however we still may
accidentally generate interrupt by trigger setup.

To avoid that let's mask (disable) IRQ before trigger type setup.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2023-01-24 18:57:50 -08:00
Kumar Gala 1764e52b78 llvm: define __INT*_C() and __UINT*_C()
llvm based toolchains need the same fix as exists for xcc that was
introduced with commit:

commit 5ef8db8ac9
Author: Daniel Leung <daniel.leung@intel.com>
Date:   Wed Feb 3 14:23:51 2021 -0800

    xcc: define __INT*_C() and __UINT*_C()

Since llvm based toolchains don't define these macros either.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-01-24 20:29:49 -05:00
Anas Nashif c2b2486072 twister: adapt tests after revert of namespacing
Remove prefix with path from tests, we do not have  namespacing anymore.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-01-24 20:21:57 -05:00
Anas Nashif eb56ea4d42 Revert "twister: tests: Add unit tests for names of external and module tests"
This reverts commit 45e1ff94cd.

This is not needed after removal of namespacing.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-01-24 20:21:57 -05:00
Anas Nashif a4b2d58d3f Revert "twister: Update path structure for tests"
This reverts commit 21eb27c5c0.

This change has been a source of much trouble and ends up preventing us
from tracking test results across tree. It uses the repo name as the
namespace, and that is not always the same and does not have to be
called 'zephyr', depending on where you are running and in which
environment.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-01-24 20:21:57 -05:00
Benjamin Kyd ee1e514b3b driver: ethernet: cvsx remove ugly whitespace
Remove the ugly whitespace in drivers/ethernet/eth_cyclonev.c

Signed-off-by: Benjamin Kyd <benjamin.kyd@intel.com>
2023-01-24 17:46:17 -06:00
Benjamin Kyd f3a610fffe drivers: ethernet: cvsx change bit label
Change the bit label to include the BIT() macro to tidy up the code.

Signed-off-by: Benjamin Kyd <benjamin.kyd@intel.com>
2023-01-24 17:46:17 -06:00
Benjamin Kyd 591a98babd boards: arm: Cyclone V SoC add gmac config
Add gmac config to board so its not in the socfpga dts

Signed-off-by: Benjamin Kyd <benjamin.kyd@intel.com>
2023-01-24 17:46:17 -06:00
Benjamin Kyd 88466a6f0b dts: intel_socfpga: bugfix, add emac-index in dts
Bugfix for the Cyclone V SoC DK ethernet driver need to add emac-index
in dts
 - We remove the "local-mac-address" property from
   dts/arm/intel_socfpga_std.dtsi to
   boards/arm/cyclonev_socdk/cyclonev_socdk.dts, since this value is
   dependant on the board / implementation and not universal to
   the "intel_socfpga" package that it inherets from.
 - The above is also true for the "status" property as the board
   should enable the device.

Signed-off-by: Benjamin Kyd <benjamin.kyd@intel.com>
2023-01-24 17:46:17 -06:00
Benjamin Kyd aad76523e1 drivers: ethernet: bugfix for Cyclone V Ethernet
bugfix for Cyclone V Ethernet Phy error and timeout overflow.
 - p->instance was incorrectly assumed to be a reference to
   the emac device, this is ammended
 - the volatile uint16_t timeout would often overflow
 - code cleanup and added more macros for housekeeping

Signed-off-by: Benjamin Kyd <benjamin.kyd@intel.com>
2023-01-24 17:46:17 -06:00
Alex Tsamakos c348fb51c9 boards: actinius_*: change all boards to use common/actinius lib
This changes all Actinius boards to use the helper lib in
`boards/common/actinius` for setting up common init values
such as SIM Select and Charger Enable.

Signed-off-by: Alex Tsamakos <alex@actinius.com>
2023-01-24 12:54:16 -08:00
Alex Tsamakos 6c25cad55c boards: arm: add support for the Actinius Icarus SoM DK w/ helper lib
This adds support for the nRF9160-based Icarus SoM DK
(development kit) from Actinius and a common library for
board init code that is common to multiple boards
from Actinius.

Signed-off-by: Alex Tsamakos <alex@actinius.com>
2023-01-24 12:54:16 -08:00
Fabio Baltieri b787cc088d samples: bt: hids: add a non authenticated mode to the sample
The HIDs sample is currently setup with a passkey callback and requires
authenticated write and read access.

Add a sample option to disable the passkey callbacks, and automatically
set the GATT attributes as encryption required. This is a useful sample
setup as real world HID devices (mice, keyboards...) usually don't have
a passkey mechanism, and removing the callback to reproduce that setup
while not changing the GATT permission leads to automatic disconnections
for encryption failures that can be fairly hard to troubleshoot.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-24 19:33:03 +01:00
Fabio Baltieri ca2bcf8d15 samples: bt: set a sample names and descriptions
Set a sample name and description for a bunch of tests where those are
left as "TBD" right now.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-24 19:33:03 +01:00
Marti Bolivar dc5cf7b76c doc: west: improve 'manifest --validate' section
I got a couple of questions about what this command's purpose is and
how to debug 'valid' manifests that aren't working as desired. Add
some information to address this.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2023-01-24 10:14:13 -08:00
Daniel Leung 256db60ebf kernel: mark z_cstart to not have stack protector
Most of the time, z_cstart() is running on an arbitrary region
of memory as stack, where the necessary stack setup has not been
performed. This prevents stack protection to work correctly,
as the stack canary has not been populated. So mark z_cstart()
to have no stack protection at all inside the function to avoid
raising exception during boot.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-01-24 13:04:45 -05:00
Daniel Leung 52f570b200 toolchain: add macro FUNC_NO_STACK_PROTECTOR
This provides a macro to disable stack protector for a function,
by specifying a function attribute. This is useful for boot
and early init code where we know for sure stack pointer and/or
stack content are being manipulated manually.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-01-24 13:04:45 -05:00
Jeppe Odgaard 74b94b4dff boards: add rt1050 qdec pinmux and overlay
Add a qdec pinctrl definition for rt1050.
Add an overlay in the qdec sample to support rt1050.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-01-24 10:21:39 -06:00
Jeppe Odgaard 35d60dbd0e samples: sensor: add qdec emulation support
Add emulation option to the qdec sample.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-01-24 10:21:39 -06:00
Jeppe Odgaard 9fb47e43a8 dts: arm: add xbar and qdec nodes and update soc
Add three xbar nodes and four qdec nodes in the rt10xx devicetree include.
Add xbara to rt1052 in Kconfig.soc

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-01-24 10:21:39 -06:00
Jeppe Odgaard a76b908f4c drivers: sensor: add mcux quadrature encoder
Add a driver for the NXP MCUX Quadrature Decoder. The driver
is simple and only implements the phase a and phase b inputs. The
module has additional features which can be added in future PRs.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-01-24 10:21:39 -06:00