Commit graph

69802 commits

Author SHA1 Message Date
Thomas Stranger
ab88f5c492 boards/arm: nucleo_u575zi_q enable CAN
Enable CAN and set it's domain clock source to PLL1_Q.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-09-09 10:11:10 +02:00
Diwakar C
6c6c496a82 espi: driver: Config spare espi vw register to OCP index
USBC port (Port 0/1/2/3) OCP (Over Current Protection) status
should be sent to PCH over eSPI VW index 0x50h. But there is
no dedicated VW register mapped to VW index 0x50h.
In this patch, configuring spare VW register SMVW06 to OCP VW
index 50h.

Signed-off-by: Diwakar C <diwakar.c@intel.com>
2022-09-09 10:11:02 +02:00
Emil Gydesen
34d4501e8a Bluetooth: Shell: Add connect-name command
Add a new command, connect-name, which takes a string
as the single input and uses that to setup a scan filter
and connect to the first device that matches the name.

This command is thus basically shorthand for
bt scan-filter-set <name>
bt scan on
bt scan off
bt connect
bt scan-filter-clear-name

The idea of this command is to not only make it easier
find and connect to devices in a crowded environment,
but also to more easily connect to devices that changes
their advertised address.

The implementation is minimal as it uses existing
shell commands.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-09-09 10:10:52 +02:00
Wei-Tai Lee
4d74651c18 boards: riscv: adp_xc7k_ae350: update dts for atmel eeprom driver
Update dts for usage of atmel eeprom driver.

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2022-09-09 10:09:46 +02:00
Martin Jäger
77e4c6515a drivers: can: native_posix_linux: initial implementation
This driver provides an interface to SocketCAN interfaces of the Linux
system running a Zephyr application with the native_posix board. These
interfaces may be virtual or actual CAN buses.

Signed-off-by: Martin Jäger <martin@libre.solar>
2022-09-09 10:08:59 +02:00
Hang Fan
fd4d18852d Bluetooth: Audio: Set transparent coding format for default ISO path
As per BAP_v1.0, Section 5.6.3.1:

If HCI is used when setting up their respective audio data paths,
and if the codec in use resides in the Bluetooth Host of the device
using the LE Setup ISO Data Path command, the Unicast Client and/or
Unicast Server shall:
* Write the LE Setup ISO Data Path command Codec_Configuration_Length
parameter with the value 0x00.
* Write octet 0 (Coding_Format) of the LE Setup ISO Data Path command
Codec_ID parameter with the value 0x03 (Transparent).

We can assume the codec in use resides in the Bluetooth Host default.

Signed-off-by: Hang Fan <fanhang@xiaomi.com>
2022-09-09 10:08:34 +02:00
Szymon Czapracki
35c0d5ef67 Bluetooth: audio: shell: Add command to set location
Allow to set audio locations from shell

Signed-off-by: Szymon Czapracki <szymon.czapracki@codecoup.pl>
2022-09-09 10:07:49 +02:00
Emil Gydesen
8a652639b5 Bluetooth: Audio: Remove redundant whitespace for BT_CODEC macros
Some macros had a space after the initial tab for indentation,
which was removed.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-09-09 10:07:35 +02:00
Emil Gydesen
513259d195 Bluetooth: LC3: Fix prefer and streaming context macros
Fix the BT_CODEC_LC3_META (prefer context) and
BT_CODEC_LC3_CONFIG_META (streaming context) macros, as
they did not properly set the right values due to missing
parenthesis.

This commit also modifies the BT_CODEC_LC3_CONFIG_DATA
and BT_CODEC_LC3_DATA macros, to ensure correctness, and
to be more similar to e.g. the BT_UUID_128_ENCODE type
macros.

Also added casts to `uint8_t` to avoid compiler warnings on
e.g. GCC when assigning a non uint8_t value to a uint8_t array.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-09-09 10:07:35 +02:00
Ahmed Moheb
db5ef779c4 tests: bluetooth: host: Add UT for bt_buf_get_type()
Unit test project for bt_buf_get_type().
This part of subsys/bluetooth/host/buf.c unit testing

Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
2022-09-09 10:06:19 +02:00
Ahmed Moheb
e544792ae1 tests: bluetooth: host: Add UT for bt_buf_get_evt()
Unit test project for bt_buf_get_evt().
This part of subsys/bluetooth/host/buf.c unit testing

Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
2022-09-09 10:06:19 +02:00
Ahmed Moheb
13203cc801 tests: bluetooth: host: Add UT for bt_buf_get_cmd_complete()
Unit test project for bt_buf_get_cmd_complete().
This part of subsys/bluetooth/host/buf.c unit testing

Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
2022-09-09 10:06:19 +02:00
Ahmed Moheb
4abff8a625 tests: bluetooth: host: Add UT for bt_buf_get_rx()
Unit test project for bt_buf_get_rx().
This part of subsys/bluetooth/host/buf.c unit testing

Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
2022-09-09 10:06:19 +02:00
Ahmed Moheb
cb5ba5bea8 tests: bluetooth: host: Add mocks for buf.c
Add required mocks to be able to compile and test /bluetooth/host/buf.c

Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
2022-09-09 10:06:19 +02:00
Torsten Rasmussen
a0a72b9a96 cmake: create test_interface interface library
Creating a test_interface allows more complex unittest projects to
create additional libraries, for example mock libs, that can be re-used
between test projects.

To support the possibility of such libs to build with same flags as the
testbinary the test_interface is now populated with the public compile
and include flags from testbinary.

testbinary has been updated to use test_interface.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-09-09 10:06:19 +02:00
Szymon Czapracki
1e4960b28e Bluetooth: Add IAS tests
Add babblesim tests for IAS.

Signed-off-by: Szymon Czapracki <szymon.czapracki@codecoup.pl>
2022-09-09 10:05:46 +02:00
Szymon Czapracki
ac6c35728a Bluetooth: Add IAS shell
This commit adds IAS functionality to the shell.

Signed-off-by: Szymon Czapracki <szymon.czapracki@codecoup.pl>

shell fixes
2022-09-09 10:05:46 +02:00
Szymon Czapracki
f4d23b6cd7 Bluetooth: Immediate Alert Client
Implement Immediate Alert Client
Move IAS into separate subdirectory

Signed-off-by: Szymon Czapracki <szymon.czapracki@codecoup.pl>

general fixes
2022-09-09 10:05:46 +02:00
Ryan Erickson
820fca76cc logging: fs backend: only delete old files if necessary
During initialization of the FS backed, the oldest
file is always deleted.
Fix this to prevent throwing away useful historic logs.
If there is space left in the newest file, append to it instead
of creating a new file and removing the oldest.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-09-09 10:04:24 +02:00
Ederson de Souza
3f6286040b dts/bindings/mm: Fix ADSP Meteor Lake DTS bindings
New properties were added but not in the bindings. Add them.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-09-08 20:05:15 -04:00
Ederson de Souza
cf6bad78c4 soc/xtensa/intel_adsp: Disable L2 cache at boot based on Kconfig
Instead of deciding based on SoC version, add information to Kconfig and
get it from there on code.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-09-08 18:03:33 -04:00
Ederson de Souza
fcdc9c78e2 soc/xtensa/intel_adsp: Get register address from DTS
Instead of hardcoding it where it's used.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-09-08 18:03:33 -04:00
Ederson de Souza
67a6837efd drivers/mm: Remove redundant ifdef for MTL ADSP TBL implementation
An `ifdef CONFIG_SOC_SERIES_INTEL_ACE1X` currently always evaluates to
true, as `drivers/mm/mm_drv_intel_adsp_mtl_tlb.c` is only built when
`CONFIG_MM_DRV_INTEL_ADSP_MTL_TLB=y`, which depends on
`CONFIG_SOC_SERIES_INTEL_ACE1X`. So remove the ifdef.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-09-08 18:03:33 -04:00
Ederson de Souza
03a947850d drivers/mm: Get some bit configurations from DTS instead of SoC version
Migrate information to DTS and get it from there on the code. Note that
for CAVS 15, the information is not migrated as there's no DTS entry for
it. It can be brought back (in the DTS) if TLB support is enabled for
it.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-09-08 18:03:33 -04:00
Ederson de Souza
5f4e2f99f0 soc/xtensa/intel_adsp/cavs: Init HP SRAM based on Kconfig
Instead of deciding to init based on SoC version, define that
information in Kconfig and use it from there.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-09-08 18:03:33 -04:00
Ederson de Souza
9b7375d82a soc/xtensa/intel_adsp/common: Power on cache SRAM banks based on Kconfig
Instead of using SoC version to decide to power on or not, add this
information to Kconfig and get it from there.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-09-08 18:03:33 -04:00
Ederson de Souza
c1dc2683b9 drivers/dai/intel/ssp: Get number of SSP ports from Kconfig
Instead of using SoC versions, define the information about base and
extended ports on Kconfig, and use this information from there.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-09-08 18:03:33 -04:00
Ederson de Souza
79980f250c drivers/dai/intel/ssp: Decide about clock gating based on Kconfig
Instead of using version of the SoC, declare on Kconfig the need for it,
and use this information to decide upon enabling the code or not.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-09-08 18:03:33 -04:00
Ederson de Souza
68e8eddca6 tests/boards/intel_adsp: Fix SSP test build
Test wasn't building since 8dd57467c made Intel DAI SSP depend on power
management. This patch fix this by adding the required configs to the
test prj.conf.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-09-08 18:03:33 -04:00
Flavio Ceolin
9f13c1bf95 intel_adsp: ace: Fix wrong type assignment
error: assignment to 'void *' from 'unsigned int' makes pointer from int
|         lpsheader->lp_restore_vector = (uint32_t) &dsp_restore_vector;

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-09-08 17:54:35 -04:00
Flavio Ceolin
2851815c22 intel_adsp: ace: Add missing header on power.c
MEMCTL_L0IBUF_EN is defined in corebits.h

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-09-08 17:54:35 -04:00
Keith Packard
1dfc469bd5 toolchain/cross-compile: Allow TLS support selection.
Add a user-settable configuration value indicating whether the toolchain
selected by the cross-compile variant supports thread local storage, using
the default 'n' value to preserve compatibility with existing uses.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-09-08 21:36:37 +00:00
Keith Packard
7052d52b3b toolchain/xtools: Crosstools-ng supports TLS by default
The Zephyr cross tools configuration which the 'xtools' variant supports
enables TLS, so set TOOLCHAIN_SUPPORTS_THREAD_LOCAL_STORAGE when using it.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-09-08 21:36:37 +00:00
Ryan Erickson
d6f836e964 boards: pinnacle_100_dvk: enable uart1 flow control
UART1 flow control needs to be enabled for proper
HL7800 modem communication.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-09-08 21:10:28 +00:00
Lauren Murphy
3b8c1f755b boards: mtpm: make DAI_SSP_HAS_POWER_CONTROL optional
Makes DAI_SSP_HAS_POWER_CONTROL depend on DAI_INTEL_SSP
in intel_adsp_ace15_mtpm Kconfig.defconfig.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2022-09-08 16:25:25 -04:00
Gerard Marull-Paretas
18dfc91a71 devicetree: adjust some fragments syntax
The `node@...` syntax is not accepted by the Pygments Devicetree Lexer
as it is not valid. Add dummy addresses to fix the problem.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-08 16:24:24 -04:00
Gerard Marull-Paretas
8582cc97fb devicetree: fix incorrect internal usage
`@internal`/`@endinternal` is used to put "internal" information within
docstring blocks, but not to hide from public documentation any
macro/function. For this purpose, we use `@cond`/`@endcond` blocks with
the INTERNAL_HIDDEN convention.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-08 16:24:24 -04:00
Gerard Marull-Paretas
64e41c0967 devicetree: improve Doxygen docstrings
- Use `@code`/`@endcode` commands so that examples will have code
  highlighing
- Remove redundant `@ref` commands
- Fix some incorrect `@p` usages (it is for function/macro parameters)
- Use `@p` name to reference macro arguments
- Convert a few "quoted strings" to literals using Markdown syntax (``)
- Always use Markdown syntax for literals (no `<tt>`, `@c`, etc.)
- Move implementation details to `@internal`/`@endinternal` blocks inside
  the relevant macro.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-08 16:24:24 -04:00
Ederson de Souza
578e8ee964 soc/xtensa/intel_adsp/cavs: Fix CPU sporadically not idling
Sometimes, on CAVS 25, the CPU may fail to idle. This was due a failure
during test initialisation - the test is supposed to run from CPU0, and
halt and restart the other ones. However, code to pin thread to CPU was
incorrect - a running thread can't be pinned to a CPU (the
k_thread_cpu_mask* calls were returning error).

This patch solves this by creating a thread that is pinned to CPU0
before it is run.

While at it, add some more checks for returned values.

Fixes: #49790

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-09-08 16:23:29 -04:00
Andrei Emeltchenko
9a8ccde07c i2c: doc: Make documentation readable
Use @code .. @endcode blocks to make docs readable.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-09-08 19:29:09 +02:00
Henrik Brix Andersen
420385218f dts: arm: nxp: lpc55sxx: reduce LPC MCAN RAM usage
Reduce the default RAM usage for the NXP LPC MCAN CAN controller driver by
reducing the number of RX buffers, TX buffers, and filter elements.

The LPC MCAN uses regular SRAM as backend and the default configuration
causes SRAM overflows for many CAN tests.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-08 19:26:01 +02:00
Pieter De Gendt
34ee707d4a mgmt: mcumgr: Fix unused function warning
The static function img_mgmt_flash_check_empty is only used if
CONFIG_IMG_ERASE_PROGRESSIVELY isn't set.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-09-08 15:31:36 +00:00
Øyvind Rønningstad
1ec015daa1 modules: zcbor: Fix ZCBOR_ASSERT kconfig typo
It should define ZCBOR_ASSERTS, not ZCBOR_ASSERT

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2022-09-08 15:30:47 +00:00
Henrik Brix Andersen
b01ea7c0c9 drivers: can: transceiver: Update drivers to use dts Kconfig symbol
Update the GPIO-controlled CAN transceiver driver to use the
DT_HAS_CAN_TRANSCEIVER_GPIO_ENABLED Kconfig symbol to expose the driver and
enable it by default based on devicetree.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-08 15:30:23 +00:00
Enjia Mai
4b90e788f6 tests: drivers: dac: move the dac loopback test to new ztest API
Migrate the testsuite tests/drivers/dac/dac_loopback to the new
ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-09-08 15:29:51 +00:00
Enjia Mai
40e44a4b3e tests: drivers: dac: move the dac api test to new ztest API
Migrate the testsuite tests/drivers/dac/dac_api to the new
ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-09-08 15:29:51 +00:00
Jamie McCrae
1da4adfe20 mgmt: mcumgr: Replace #if with #ifdef for CONFIG_ checks
Replaces #if with #ifdef when checking Kconfig defines

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-09-08 15:29:21 +00:00
Jamie McCrae
edd1a5ff6f mgmt: mcumgr: os_mgmt: Make reboot conditional on CONFIG_REBOOT
This prevents the os_mgmt reboot command being available if
CONFIG_REBOOT is not selected.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-09-08 15:29:21 +00:00
Jamie McCrae
d834768da7 tests: mgmt: mcumgr: os_mgmt_echo: Add mcumgr echo test
Adds a simple mcumgr test which checks that the os_mgmt echo commmand
works and responds with the correct data.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-09-08 15:29:21 +00:00
Jamie McCrae
7992256df5 mgmt: mcumgr: Add dummy SMP backend
This adds a dummy SMP backend which can be used for unit testing or
virtual interface purposes.

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2022-09-08 15:29:21 +00:00