Commit Graph

63187 Commits

Author SHA1 Message Date
Georgij Cernysiov 778f1d7d72 dts: bindings: memc: stm32: support FMC NOR/PSRAM
Adds STM32 FMC NOR/PSRAM controller bindings.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2022-04-19 11:47:06 +02:00
Georgij Cernysiov 7ce7f75ae9 include: dt-bindings: add stm32 fmc nor psram defines
Add defines to configure STM32
FMC NOR/PSRAM controller.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2022-04-19 11:47:06 +02:00
Dominik Ermel ef199e92df mgmt/mcumgr/lib: doc: Minor fixes to zcbor_bulk documentation
Little polishing here and there.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-04-19 11:35:16 +02:00
Dominik Ermel fb4afe2112 mgmt/mcumgr/lib: Remove mcumgr_util
With replacement of (u)ll_to_s with snprintf the util is no longer
needed.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-04-19 11:34:40 +02:00
Dominik Ermel 3445c29979 mgmt/mcumgr/lib: Use snprintf instead of ll_to_s in OS group
The commit replaces usage of ll_to_s with snprintf.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-04-19 11:34:40 +02:00
Dominik Ermel 4a12570ef8 mgmt/mcumgr/lib: Allow image management list broken version str
The commit adds change to image management list where "<???>"
will be returned as version string in case when version to string
conversion fails.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-04-19 11:34:40 +02:00
Dominik Ermel 692a4a7e63 mgmt/mcumgr/lib: Replace ull_to_s with snprintf in img_mgmt_ver_str
The ull_to_s, which is used to covert ints to string, has been
replaced with snprintf.
Above also fixes a bug where ull_to_s has been given INT_MAX as allowed
output string, while it should be given maiximum allowed buffer size.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-04-19 11:34:40 +02:00
Dominik Ermel ca60b75613 mgmt/mcumgr/lib: Remove mgmt_streamer_reset_buf
Commit removes mgmt_streamer_reset_buf from mcumgr lib,
and supporting Zephyr function zephyr_smp_reset_buf.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-04-19 11:32:56 +02:00
Emil Obalski c5dc184b74 tests: ipc: Update exclude platforms
remove qemu_xtensa from exclude platforms as fix for this platform
is provided.

add ast1030_evb to exclude platforms as this soc does not yet have
in tree driver for external cache controller.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2022-04-18 23:19:32 -04:00
Emil Obalski 3a9b082fef tests: Move icmsg_buf tests to subsys/ipc
Move ipc service backend unit test from tests/lib to
tests/subsys directory.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2022-04-18 23:19:32 -04:00
Emil Obalski cc57f0acb9 tests: Align buffer in icmsg_buf tests.
This change adds alignment to buffer on which icmsg_buf
is created. Some platforms run into fatal exception
when accessing unaligned addresses. Fix that by ensure
4 byte alignment.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2022-04-18 23:19:32 -04:00
Flavio Ceolin 370ce60152 linker: Re-use device handle logic
Add a new file with the device handles logic that is included in both
ram and ROM

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-04-18 17:25:01 -07:00
Flavio Ceolin d02a1e9879 pm: Only resize power domains
Instead of resizing all devices handles, we just resize devices that are
power domains. This means that a power domain has to be declared as
compatbile with "power-domain" in device tree node.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-04-18 17:25:01 -07:00
Flavio Ceolin acca447948 pm: device: Use pm flags to mark a power domain
Add a new flag that is used to tell whether or not a device is a power
domain. In order to a device be identified as a power domain the node
has to be compatible with "power-domain".

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-04-18 17:25:01 -07:00
Flavio Ceolin 605d785428 pm: Add an underline in device pm slot
Add an underline character before "slot" to make the sufix easier to
read.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-04-18 17:25:01 -07:00
Flavio Ceolin 8ddb21e230 tests: pm: Add a power domain test
Add simple test to exercise power domain behavior
with device runtime.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-04-18 17:25:01 -07:00
Flavio Ceolin 0b13b44a66 pm: device: Dynamically add a device to a power domain
Add API to add devices to a power domain in runtime. The number of
devices that can be added is defined in build time.

The script gen_handles.py will check the number defined in
`CONFIG_PM_DEVICE_POWER_DOMAIN_DYNAMIC` to resize the handles vector,
adding empty slots in the supported sector to be used later.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-04-18 17:25:01 -07:00
Mahesh Mahadevan b2d3fdceff cmake: Add support to add symbols to ramfunc section
This PR allows the user to add symbols to the ramfunc
section. The use for this could be as follows:

zephyr_linker_sources_ifdef(CONFIG_ARCH_HAS_RAMFUNC_SUPPORT
  RAMFUNC_SECTION
  quick_access_code.ld
)

quick_access_code.ld (as shown below) can define additional
symbols to  go into the ramfunc section

. = ALIGN(4);
KEEP(*(CodeQuickAccess))

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-04-18 17:24:12 -07:00
Stephanos Ioannidis f9a3f02b86 x86: Initialise FPU regs during thread creation for eager FPU sharing
When "eager FPU sharing" mode is enabled, FPU registers must be
initialised at the time of thread creation because the floating-point
context is always active and no further FPU initialisation is performed
later.

Note that, in case of the "lazy FPU sharing" mode, floating-point
context is inactive by default and the FPU is initialised when the
first floating-point instruction is executed.

Refer to the issue #44902 for more details.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-04-18 17:23:48 -07:00
Henrik Brix Andersen 77fa7709e4 tests: drivers: can: api: add test for can_set_bitrate()
Add test for the can_set_bitrate() syscall.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-18 17:23:28 -07:00
Henrik Brix Andersen d5f3f20edb drivers: can: allow calling can_set_bitrate() from userspace
Add syscall to allow calling can_set_bitrate() from userspace.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-18 17:23:28 -07:00
Rui Sousa e5848129be modules: cmsis: fix Cortex-A support
CMSIS Cortex-A only supports AARCH32, remove dependency on
AARCH64 Cortex-A.

Signed-off-by: Rui Sousa <rui.sousa@nxp.com>
2022-04-18 17:22:51 -07:00
Tom Burdick 2f320730a1 dma/cavs_hda: Adds link in/link out compatibles
Adds hda link in and out drivers. The link in and link
out channels of HDA have small differences
with the host channels. Updates the existing
cavs_hda drivers and code to account for these
differences.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-04-18 19:19:40 -04:00
Vaishnav Achath 98f1a98cf5 drivers: pinmux: remove cc13xx_cc26xx pinmux driver
all the consumers of the obsolete pinmux driver is
updated to use pinctrl API, this commit removes
the pinmux driver and assosciated sections.

Signed-off-by: Vaishnav Achath <vaishnav@beagleboard.org>
2022-04-18 18:19:46 -04:00
Vaishnav Achath ace77c71e9 drivers: CC1XX/CC26XX based boards: transition to pinctrl driver
This commit has the necessary changes to update the consumers
of pinmux driver(SPI, I2C, UART) and update the board specific
files to use the pinctrl interface.

Signed-off-by: Vaishnav Achath <vaishnav@beagleboard.org>
2022-04-18 18:19:46 -04:00
Vaishnav Achath e2ed8cf130 drivers: pinctrl: add CC13XX/CC26XX pinctrl driver
Add pinctrl driver for CC13XX/CC26XX family of SoCs
to facilitate transition from pinmux to pinctrl.

`IOCPortConfigureSet()` from TI hal driverlib used to
implement the generic pinctrl driver.

Signed-off-by: Vaishnav Achath <vaishnav@beagleboard.org>
2022-04-18 18:19:46 -04:00
Flavio Ceolin bb98bd6d11 libc: newlib: Fix declare a type conflict
Fix a variable declaration type conflict:

libc-hooks.c:92:16: error: conflicting types for '_heap_sentry'
   92 |   extern void *_heap_sentry;
soc.h:78:13: note: previous declaration of '_heap_sentry' was here

Fixes #44926

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-04-18 14:42:19 -05:00
Yuval Peress aaf0c6e827 modules: chre
Add initial build rules for CHRE. This change includes a Kconfig and
CMakeLists.txt to begin compiling code from the CHRE module.
Additional files are included to bridge the APIs from CHRE's to
Zephyr's. These can be found in modules/chre/include and
modules/chre/src.

Additionally, add a sample to make sure that the module builds. It can
be built via:

```
$ west build -b native_posix -p=always samples/application_development/chre
```

Signed-off-by: Yuval Peress <peress@google.com>
2022-04-18 13:21:52 -05:00
Yuval Peress 8da60c3c7e cpp: Update structs to be compatible with C++
Both the `_cpu_arch` and `k_thread_runtime_stats` structs can have a
size of 0 in C, but will fail when building with C++. Add an extra
byte in those cases.

Signed-off-by: Yuval Peress <peress@google.com>
2022-04-18 13:21:52 -05:00
Benjamin Björnsson e9ab9990d4 boards: arm: arduino_nano_33_ble: Add support for sense version of board
This commit adds support for the Arduino Nano 33 BLE Sense board.

The DTS is separated into a common dtsi and one DTS for each version
of the board. The sensors with existing drivers: hts221, lps22hb and
apds9960 are added to the DTS of the Sense version.

A startup delay is added to the vdd_env node. This is done to give some
time for the sensors VDD/VCC to go high before the sensor drivers are
initialized.

The functionality was verified using the driver sample of each sensor.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-04-18 12:20:32 -05:00
Benjamin Björnsson 0c23a02c8d boards: arm: arduino_nano_33_ble: Add uart console to board defconfig
This commit adds uart console to the board defconfig.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-04-18 12:20:32 -05:00
Stephanos Ioannidis 13f382287a ci: twister: Trigger on release branches
This commit updates the Twister workflow to trigger on all pushes and
pull requests to the release branches.

Note that this change in itself does not make the Twister workflow run
on the existing release branches -- what this does is to prepare for
the future release branches to run the Twister workflow in them.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-04-16 15:53:16 +09:00
Anas Nashif 8d7a4f79fb kernel: fix cpu_mask api documentation
wrong kconfig is being used in the note, DEADLINE is not related to cpu
mask APIs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-15 16:14:14 -07:00
Oliver Stäbler 74c1d35900 drivers: i2c: flexcomm: Add i2c slave support
Add i2c slave support to mcux_flexcomm driver.

Signed-off-by: Oliver Stäbler <oliver.staebler@bytesatwork.ch>
2022-04-15 14:07:30 -05:00
Georgij Cernysiov 3650664875 drivers: pwm: stm32: support counter modes
Adds support for different timer counter modes.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2022-04-15 11:59:16 -07:00
Georgij Cernysiov 366bf47c27 drivers: pwm: stm32: remove obvious comments
Removes obvious comments from the PWM
configuration struct.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2022-04-15 11:59:16 -07:00
Georgij Cernysiov 063e9447e0 dts: bindings: timer: stm32: lptim exclude countermode
LPTIMER has a different `countermode` meaning.
We shall exclude introduced property from lptim bindings.

Alternative property (e.g. `external-mode`) can be added
later on to support external counter mode.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2022-04-15 11:59:16 -07:00
Georgij Cernysiov 20dfae9cfd dts: bindings: timer: stm32: add countermode
Adds `countermode` property. That allows to
configure timer counter mode.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2022-04-15 11:59:16 -07:00
Georgij Cernysiov fcab131279 include: dt-bindings: timer: add stm32 timer constants
Adds timer countermode constants.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2022-04-15 11:59:16 -07:00
Pavel Vasilyev 442e477116 doc: mcumgr: Update instruction for go version 1.18+
go get is deprecated starting from go tool version 1.18:
https://go.dev/doc/go-get-install-deprecation

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-04-15 11:52:44 -07:00
Piotr Pryga 4a18d615a4 slist: Fix sys_slist_append_list with head and tail NULL break a list
If the sys_slist_t instance is not empty, its head and tail points to
some sys_snode_t instances. If sys_slist_append_list is executed with
tail being NULL the list object is corrupted. Tail of the sys_slist_t
instance is set to NULL. If one executes sys_slist_append on that node,
then nodes pointed by head are lost.

The commit fixes the issue and adds unit tests to verify correct
behavior.

Added change verifies if head and tail of appended list are not NULL.
In other case the list object is invalid and should not be appended
to a valid list instance.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-04-15 11:50:29 -07:00
Ruibin Chang 7b43deedd5 ITE drivers/watchdog: clean up the #ifdef
Use if(IS_ENABLED(...)) {...} instead.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2022-04-15 10:35:35 -07:00
Ruibin Chang 4aa6e98292 ITE drivers/kscan: clean up it8xxx2 kscan driver
1.Declare the member type to match the kscan_it8xxx2_regs, so
we needn't to transform the local structure in the function.
2.Stop using DRV_CONFIG, DRV_DATA, DRV_REG macros.
3.Delete unused register defines.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2022-04-15 10:35:35 -07:00
Fabio Baltieri e61c534e52 scripts: check_compliance: check for commit message errors
Change CheckPatch() compliance test to call checkpatch.pl directly
rather than through git diff. This has the advantage of including the
commit message in what is being checked, which is useful to catch stuff
like spurious Gerrit commit ids.

The --mailback does not seem to work correctly in this mode, but since
the output is filtered by checking the command exit code anyway, that
option is redundant, so drop that as well.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-04-15 10:35:09 -07:00
Ryan McClelland f7ddcd2713 arch: arm: aarch32: initialize FPSCR to reset value for ARMv8.1
With GCC 11 now supporting low overhead branching in ARMv8.1, ASM "LE"
(loop-end) instructions would trigger an INVSTATE hard-fault after
FPSCR was set to 0. This was due to the FPSCR getting a new field in
ARMv8.1. LTPSIZE is now set to it's reset value of Tail predication not
applied.

Signed-off-by: Ryan McClelland <ryanmcclelland@fb.com>
2022-04-15 10:33:48 -07:00
Rihards Skuja d5b83a8c90 logging: disable Linux-style timestamp formatting by default
Fix a typo in #43934.

Signed-off-by: Rihards Skuja <rhssk@posteo.eu>
2022-04-15 10:33:15 -07:00
Szymon Czapracki 827890c075 Bluetooth: audio: Add initial Hearing Access Service shell
This adds initial shell support for HAS.

Signed-off-by: Szymon Czapracki <szymon.czapracki@codecoup.pl>
2022-04-15 10:32:54 -07:00
Mariusz Skamra 4ac9eba3d5 Bluetooth: has: Add initial support for presets
This adds initial support for presets that includes API functions
to register/unregister presets and Read Preset Request control point
handler.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-04-15 10:32:54 -07:00
Bartosz Bilas e4950bc729 drivers: serial: xen: remove superfluous default n for boolean
bool symbols implicitly default to n so
there is no need to redundant those values.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2022-04-15 10:32:24 -07:00
Bartosz Bilas 6f6ef91fa7 drivers: watchdog: it8xxx2: remove superfluous default n for boolean
bool symbols implicitly default to n so
there is no need to redundant those values.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2022-04-15 10:32:24 -07:00