Commit graph

69934 commits

Author SHA1 Message Date
Szymon Czapracki
85639f78bd Bluetooth: audio: Fix error message in PACS
Change error code in PACS source/sink
write operation to Write Request Rejected.

Signed-off-by: Szymon Czapracki <szymon.czapracki@codecoup.pl>
2022-09-13 08:55:39 +00:00
Hu Zhenyu
59bc1c52a5 tests: Enable the pca9555 chip on mec172xevb_assy6906
Enable the pca9555 chip on mec172xevb to test the I2C function
1. Add tests/boards/mec172xevb_assy6906/i2c_api
2. The HW connections are described in README.txt
3. Use I2C01 to connect the PCA9555, as I2C00 is for UART2

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
2022-09-13 08:54:25 +00:00
Dennis Sitelew
42f9b69f50 logging: Fix signed integer cast for isprint
Casting the value byte to char may result in it being a negative
number. On some platforms this could lead to either UB, or a crash.

Signed-off-by: Dennis Sitelew <dennis.sitelew@grandcentrix.net>
2022-09-13 08:51:22 +00:00
Sjors Hettinga
452592fc9a net: websockets: Fix websocket_send_msg return code
When the websocket_prepare_and_send is called from websocket_send_msg,
the header length is subtracted to retrieve the transmitted payload length.
Make an exclutsion to prevent the return code of
websocket_prepare_and_send being modified in case of 0 or a negative
return code.
This avoid confusion with modificated error codes

Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
2022-09-13 08:49:24 +00:00
Michael Laß
53af1ba59e boards: heltec_wifi_lora32_v2: improve documentation
* Document use of OLED display.
* Fix indentation in list of features.
* References are only rendered if they are used and currently most of
  them are not. Introduce a list of links in addition to the actual
  references to make them show up.

Signed-off-by: Michael Laß <bevan@bi-co.net>
2022-09-12 20:08:39 +00:00
Michael Laß
fec126f190 boards: heltec_wifi_lora32_v2: enable trng0
trng0 refers to the entropy source in the ESP32, as defined in
esp32.dtsi. It enables the configuration item ENTROPY_ESP32_RNG and
therefore offers an entropy driver, making the use of
CONFIG_TEST_RANDOM_GENERATOR unnecessary.

This change helps running the esp32_wifi_station sample.

Signed-off-by: Michael Laß <bevan@bi-co.net>
2022-09-12 20:08:39 +00:00
Tom Burdick
9b3a2f1938 tests: hda_log: Increase timeout for testing
The tests can take a bit of time as they try and work with real world
buffer settings and excercise wrapping the ring buffer many times. It's
important to do this as the padding and wrapping code may have sharp
edges that are better caught in a test.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-09-12 15:57:57 -04:00
Andrei Emeltchenko
7c50ab1f03 i3c: doc: Make documentation readable
Use @code .. @endcode blocks to make docs readable.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-09-12 10:25:29 -05:00
Dominik Ermel
af79689c8b CODEOWNERS: Add/change onership of mcumgr components
Add de-nordic as codeowner for:
 include/zephyr/mgmt/mcumgr/
 subsys/mgmt/mcumgr/
 tests/subsus/mgmt/mcumgr/

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-12 14:16:04 +00:00
Dominik Ermel
c45dbb01eb tests/subsys/mgmt/mcumgr: Move tests
Move smp_reassembly and zcbor_bulk tests under
tests/subsys/mgmt/mcumgr.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-12 14:15:06 +00:00
Anders Storrø
97ed0061cb Bluetooth: Mesh: Remove experimental tag from CDB
The CDB module is a mandatory part of provisioning features in BTM, and
can not be regarded as experimental anymore.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2022-09-12 14:14:27 +00:00
Florian Grandel
2a6d82b2d8 drivers: console: rtt_console: undefined reference
Disabling PRINTK with RTT enabled caused a compile error (undefined
reference to __printk_hook_install').

Fixes: #50108

Signed-off-by: Florian Grandel <jerico.dev@gmail.com>
2022-09-12 15:08:47 +01:00
Przemyslaw Bida
2636bb4e4a net: openthread: priortize usec timer for openthread port.
This commit prioritizes usec timer over msec. Doing so improves
CSL by helping scheduling timeslots on IEEE 802.15.4 with lower miss
rate.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2022-09-12 10:54:56 +00:00
Thomas Stranger
1c411cc7f0 tests: drviers: remove superfluous source files
During rebase two test main source files, that were removed during the
transition to the new ztest api, were accidetally added again.

First Removed in #49509 and #49554.
This commit removes them again.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-09-12 10:54:18 +00:00
Anders Storrø
cae98c8020 MAINTAINERS: Add Andrewpini as BTM collaborator
Add myself as a Bluetooth Mesh collaborator

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2022-09-12 10:54:02 +00:00
Sagar Shah
91ffbaa0fc tests: net: lib: coap: test coap_handle_request() for invalid request code.
Adding tests to test the case where an invalid request code is
received. coap_handle_request() should return with -ENOTSUP.

Signed-off-by: Sagar Shah <sagar.shah@legrand.us>
2022-09-12 10:53:34 +00:00
Sagar Shah
dfd897096d net: lib: coap: method_from_code() API change to return errors.
method_from_code() signature has changed to return error and
the method. In case of an invalid code it returns -EINVAL and
causes coap_handle_request() to return -ENOTSUP.

Fixes: #49498

Signed-off-by: Sagar Shah <sagar.shah@legrand.us>
2022-09-12 10:53:34 +00:00
Pavel Vasilyev
1357be36b0 Bluetooth: Mesh: Fix print of newly allocated node in CDB
Using the passed address is incorrect since the passed address can be
zero to find the lowest available address.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-09-12 10:52:50 +00:00
Pavel Vasilyev
33b9f3e361 Bluetooth: Mesh: Prevent CDB reusing address of deleted nodes
According to MshPRFv1.0.1, section 3.10.7, the Provisioner shall only
use reuse addresses of the deleted nodes after IV Index is updated.

This change prevents CDB reusing addresses of the deleted nodes until IV
Index is updated. Due to a high range of the unicast addresses, CDB only
stores the highest deleted address once a node is deleted. This creates
a limitation where allocating a node with the high primary unicast
address and then deleting it will make CDB skip big range of address
until next IV Index update.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-09-12 10:52:50 +00:00
Ola Tangen Kulseng
1df3de4e98 net: lwm2m: API for multiple resource writing
Used the registry lock in the functions lwm2m_registry_lock() and
lwm2m_registry_unlock() to make the registry lockable through a public
API. If writing to multiple resources that are composite-observed,
locking will halt the main thread until every resource is written to,
ensuring that only one notify message will be sent. Updated
the documentation in lwm2m to include this addition.

Signed-off-by: Ola Tangen Kulseng <ola.kulseng@nordicsemi.no>
2022-09-12 10:52:18 +00:00
Florian Grandel
0956647aaf pm: device_runtime.c: compile error
Enabling device power management together with tracing caused a compile
error.

Fixes: #50107

Signed-off-by: Florian Grandel <jerico.dev@gmail.com>
2022-09-10 17:04:20 -04:00
Dominik Ermel
32ad01bb48 MAINTAINERS: Add mcumgr tests under mcumgr area.
The tests/subsys/mgmt/mcumgr/ added to mcumgr.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-10 11:49:40 -04:00
Fabio Baltieri
ad1d6d3623 release: Zephyr 3.2.0-rc1
Set version to v3.2.0-rc1.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-09-09 19:10:13 -05:00
Fabio Baltieri
8e1ef9c4b4 Revert "manifest: mcuboot update"
This reverts commit 95292e85aa:

It's introducing a CI failure for sample.bootloader.mcuboot on
frdm_k64f.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-09 18:57:48 -04:00
Daniel Leung
47bf9ee51c samples: sensors: add a new one for lsm6dso as I2C on I3C bus
This adds some skeleton files to enable using LSM6DSO on I3C bus
while still acting like a I2C device. The new files here are
simply to provide a way to have overlay for each board that
would not conflict with the pure I2C one. Also this is set to
build only because it require external hardware that is not
necessary on the board being tested.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-09 17:42:33 -04:00
Daniel Leung
34e353c0a8 samples: sensors: adds a new one for lps22hh on I3C bus
This adds some skeleton files to enable using LPS22HH on I3C bus.
This still uses the C source file for I2C. The new files here
are simply to provide a way to have overlay for each board that
would not conflict with the I2C one. Also this is set to build
only because it may require external hardware that is not
necessary on the board being tested.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-09 17:42:33 -04:00
Daniel Leung
34ccd88c12 sensor: lps22hh: extend to support being on I3C bus
This extends the lps22hh driver to support being on I3C bus.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-09 17:42:33 -04:00
Daniel Leung
6034714909 dts: lps22hh: extends to support being on I3C bus
This adds a new YAML file to allow LPS22HH to work on I3C bus.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-09 17:42:33 -04:00
Daniel Leung
eb9cd9242c sensors: stmemsc: add I3C access functions
This adds I3C access functions so that STM sensors connected
on I3C bus can utilize I3C.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-09 17:42:33 -04:00
Daniel Leung
4b26bd3349 boards: nxp/mimxrt685_evk: add pinctrl for I3C block
This adds the pinctrl/pinmux device tree node for the I3C
block on RT685 SoC.

Note the the drive strengths and slew rates for SCL and SDA
are recommended by the NXP application note AN12796: RT600 I3C
Simple Master, which can downloaded from the NXP website.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-09 17:42:33 -04:00
Daniel Leung
164a1aa95e soc: arm/nxp/imx/rt6xx: add bits to support I3C controller
This adds a few bits to the RT6xx SoC code to support the I3C
bus interface on RT600 series.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-09 17:42:33 -04:00
Daniel Leung
3e8f97009d i3c: add I3C controller driver for MCUX
This adds a very basic driver to utilize the I3C IP block
on MCUX (e.g. RT685). Note that, for now, this only supports
being the active controller on the bus.

Origin: NXP MCUXpresso SDK
License: BSD 3-Clause
URL: https://github.com/zephyrproject-rtos/hal_nxp
Commit: 2302a1e94f5bc00ce59db4e249b688ad2e959f58
Purpose: Enabling the I3C controller on RT685.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-09 17:42:33 -04:00
Daniel Leung
3c8dcb568d dts: add a binding for NXP MCUX I3C controller
This adds a binding for NXP MCUX I3C controller, with compatible
string "nxp,mcux-i3c".

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-09 17:42:33 -04:00
Daniel Leung
16b22fa46a doc: i3c: add a few bits about the new I3C API
This adds a fews bits about the newly introduced I3C API
for I3C controller.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-09 17:42:33 -04:00
Daniel Leung
66a9a15104 i3c: add a global workqueue for IBI
Adds support for a global workqueue so drivers can defer
IBI callbacks instead of doing it in interrupt context.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-09 17:42:33 -04:00
Daniel Leung
1493285912 i3c: add API for controller to act as target device
This adds the bits to allow an I3C controller to act as target
device. This is modelled after the I2C target model.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-09 17:42:33 -04:00
Daniel Leung
ce7058d2f5 drivers: i3c: introduce I3C API for controllers
This introduces the I3C API for I3C controllers. Currently,
this supports one controller per bus under Zephyr.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-09 17:42:33 -04:00
Daniel Leung
9cdd49c6e6 dts: add base binding for I3C controllers
This adds a base binding for I3C controllers.

Note that this follows the Linux kernel 5.17 bindings under
Documentation/devicetree/bindings/i3c/i3c.yaml.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-09 17:42:33 -04:00
Daniel Leung
db9d83fbb8 tests: devicetree: add bits to test multi-bus nodes
This adds a few bits to the devicetree API tests for multi-bus
nodes where a bus can support multiple protocols. This uses
I3C as basis as I3C controller can support both I2C and I3C on
the same bus, while I2C controller cannot support both. So
this needs to make sure the correct bus macros are generated
if appropriate (and not generated if not needed).

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-09 17:42:33 -04:00
Daniel Leung
418c915f1b dts: add primitive support for multi-bus in bindings
For a single bus that supports multiple protocols, e.g. I3C and I2C,
the single value "bus:" setting is no longer sufficient, as a I3C bus
cannot be matched to a device having "on-bus: I2C". This commit
extends the "bus:" setting so that it can accept a list of values.
This change allows corresponding devicetree macros to be generated
so that DT_ON_BUS() can work properly in this scenario.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-09 17:42:33 -04:00
Flavio Ceolin
d80be13791 intel_adsp: Use vectors offset defined in the hal
Do not hardcode vectors offset, instead get this values from the HAL.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-09-09 16:53:12 -04:00
Flavio Ceolin
bfdd5a7517 intel_adsp: ace: Remove un-existent vectors
Interrupt vectors level 5 and 6 are not available in ACE. Just remove
them from the linker script.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-09-09 16:53:12 -04:00
Flavio Ceolin
d103eee642 intel_adsp: ace: Fix debug vector address
In ace15_mtpm the debug exception vector address is mapped to INTLEVEL4
and not INTLEVEL 6. This can be checked in the core-isa header:

"""
define XCHAL_DEBUG_VECTOR_VADDR        XCHAL_INTLEVEL4_VECTOR_VADDR
"""

in
modules/hal/xtensa/zephyr/soc/intel_ace15_mtpm/xtensa/config/core-isa.h

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-09-09 16:53:12 -04:00
Flavio Ceolin
f37e7cdd3d intel_adsp: Do not use hal namespace
Do not define symbols using xtensa hal namespace.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-09-09 16:53:12 -04:00
Flavio Ceolin
b5a0567984 intel_adsp: Rename common file
Symbols defined in cavs-vectors.h is also used by ace, just rename it
to avoid confusion.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-09-09 16:53:12 -04:00
Sylvio Alves
383cefd4a4 docs: esp32c3: add west blobs reference
As part of #49682, this updates esp32c3
documentation to add proper west blobs command.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-09-09 16:34:03 -04:00
Steffen Jahnke
84462d896b boards: Update pan1782_evb evaluation board slow clock config
The pan1782 module on the evaluation board will not longer be available
with external oscillator, so the internal RC must be used by default
for the slow clock.

Signed-off-by: Steffen Jahnke <steffen.jahnke@eu.panasonic.com>
2022-09-09 16:33:29 -04:00
Ivan Herrera Olivares
2c2b8c3422 SD: Implement sdhc_card_busy in SDHC SPI-driver
Currently, the sdhc_card_busy function is unimplemented in the
SDHC SPI-driver. This causes some functions which rely on f_sync(),
such as fs_close(), to fail as it will timeout the busy-check. This PR
implements sdhc_card_busy by checking if the MISO-line is kept high to
check if the SD-card is idle (not busy).

Solves https://github.com/zephyrproject-rtos/zephyr/issues/49982

Signed-off-by: Ivan Herrera Olivares <ivan.herreraolivares@uantwerpen.be>
2022-09-09 16:32:52 -04:00
Hu Zhenyu
0d0f2e94a2 tests: counter_basic_api will return pass even if no counter is found
In test_all_instances(), if ARRAY_SIZE(devices) is 0, the test is not
performed. At this time, the test result should be TC_FAIL, instead of
TC_PASS. A zassert is needed to filter this case.
Fixes: #45647

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
2022-09-09 16:32:07 -04:00
Hu Zhenyu
3f9131ff5f tests: Enable the counter_basic_api test on mec172x board
1. enable timer5 on dts
2. Replace all BTMR_Type with struct btmr_regs, to make it compatiable
   on both mec 15 and 17
3. As MEC15 and MEC17 have different ways to access the register, use
   "#if defined" to access counter_cfg->girq_id on different board.

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
2022-09-09 16:32:07 -04:00