Commit Graph

70619 Commits

Author SHA1 Message Date
Jun Lin 14d3688dd4 dts: kscan: npcx: add the kscan node and binding
- Add kscan node to npcx.dtsi.
- Add yaml binding for npcx kscan.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2022-10-03 10:14:51 +02:00
Jim Mussared e1c134a582 samples/bluetooth/hci_uart: Add support for USB CDC UART.
This PR adds support using the USB CDC UART in the hci_uart sample,
including sample configuration for the nRF 52840 dongle.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-03 10:14:35 +02:00
Troels Nilsson a96dfe9ce9 tests: bluetooth: BSIM tests compile function enhancement
Allow ZEPHYR_MODULES to be specified to support non-west builds

Return the error code when/if a build fails instead of always 0

Signed-off-by: Troels Nilsson <trnn@demant.com>
2022-10-03 10:13:51 +02:00
Michal morsisko 3b26d50012 samples: bluetooth: Add sample demonstrating direct advertising
This sample shows how to run BLE direct advertising towards central
with enabled privacy.

Signed-off-by: Michal morsisko <morsisko@gmail.com>
2022-10-03 10:13:40 +02:00
Piotr Pryga 9f56e3d8a5 cpp: Add C++20 [[nodiscard]] attribute to operator new
C++20 standard added [[nodiscard]] attribute to operator new
definitions. In case value returned by operator new is ignored,
compiler emits a warning.

The commit adds the attribute to operator new definitions.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-10-03 10:13:25 +02:00
Piotr Pryga 7205f3e35b cpp: Add spec of new operator with alignment request
C++17 delivered another specialization of a new operator,
that allows to allocate a memory with requested alignment.

The commit adds these specialziations to C++ subsystem.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-10-03 10:13:25 +02:00
Piotr Pryga a0dc682bd9 cpp: new: Add no-throwing implementation of new operator
C++ subsystem defines exception throwing operator new.
Though the implementation never throws an exception.

If used by an application it should verify if requested
memory was allocated. This is against C++ standard.
If an application does not support exceptions or does not
want to call throwing new operator, it should use a
specialization of a new operator that makes sure it
never throws bad_alloc exception. The cpp subsystem
does not provide this specialization.

The commit adds missing operator new specializations.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-10-03 10:13:25 +02:00
Piotr Pryga e2e06a74c3 libc: minimal: Add C11 aligned_alloc
Extend capabilities of a minimal libc to support C11 capability
to allocate memory with requested alignment.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-10-03 10:13:25 +02:00
Aleksandr Khromykh be18ed7a98 tests: Bluetooth: Mesh: optimize mesh bsim compilation
Remove not used test suites from compilations for low latency
configuration.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2022-10-03 10:12:34 +02:00
Aleksandr Khromykh bab80595df tests: Bluetooth: Mesh: add proxy mix mesh bsim test
The commit adds proxy mix advertiser test that checks
mix of transmission between pb gatt, proxy and adv bearers.
The exact test scenario is described in proxy_mixin.sh file.

Additionally, the separate test configuration has been added.
All bsim mesh tests have been implemented not considering that
GATT frames are possible if PB-GATT or GATT Proxy are enabled.
The solution to avoid this misimplementation is to create
the separate configuration for tests with enabled
PB-GATT and GATT Proxy features. The commit adds this as well.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Signed-off-by: Artur Dobrynin <artur.dobrynin@nordicsemi.no>
2022-10-03 10:12:34 +02:00
Anders Storrø 901767a47a Bluetooth: Mesh: Shell: Add cfg opt for health srv
Adds Kconfig option for the Mesh Shell Health server.

The shell implementation of Health Server test commands is
dependent on the user adding and initializing the shell Health
Server instance in their application to make the commands functional.
To prevent any confussion about how these commands work, a Kconfig
option has been added to allow conditional compilation of these
commands. In this way the user must actively enable this feature, making
the conditional requirements more clear.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2022-10-03 10:12:25 +02:00
Thad House f11e5b77f6 rpi_pico: Mark RTT as supported by RP2XXX Chip
RTT is supported by the RP2XXX series of chips, so it should be marked
as such

Signed-off-by: Thad House <thadhouse1@gmail.com>
2022-10-03 10:12:17 +02:00
Pieter De Gendt fd81163f58 samples: subsys: display: lvgl: Add native_posix overlay for SDL input
Enable SDL keyboard events using the zephyr,gpio-emul-sdl driver and
alias key to sw0.
Pressing 'r' on the keyboard resets the counter.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-10-03 10:12:03 +02:00
Pieter De Gendt aa4082a093 samples: subsys: display: lvgl: Add button to reset counter
Connect the sw0 alias to reset the counter.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-10-03 10:12:03 +02:00
Pieter De Gendt ff8a90b1de drivers: gpio: Add SDL emulated GPIO support
This commit adds a driver to simulate GPIO state and interrupts
using the keyboard when using SDL.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-10-03 10:12:03 +02:00
Pieter De Gendt bd71698a66 drivers: gpio: pca953x: select I2C
Select I2C instead of depending on it, following upstream policy.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-10-03 10:12:03 +02:00
Pieter De Gendt 58e8e56d2d dts: bindings: sensor: st,lis2mdl cleanup boolean properties
Remove 'required: false' for boolean properties.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-10-03 10:11:45 +02:00
Pieter De Gendt 3e6f11e0c1 dts: bindings: sensor: st,lis2dw12 cleanup boolean properties
Remove 'required: false' for boolean properties.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-10-03 10:11:45 +02:00
Pieter De Gendt a165713715 dts: bindings: sensor: st,lis2dh cleanup boolean properties
Remove 'required: false' for boolean properties.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-10-03 10:11:45 +02:00
Pieter De Gendt 70e99fe575 drivers: sensor: lis2dh: Configurable latch and mode for any movement
Add 2 properties to configure the "any movement" event.
* Ability to disable the interrupt latch
* Select movement mode

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-10-03 10:11:45 +02:00
Ryan Erickson 46045e6df0 tests: ADC API: Add support for MG100 board
MG100 board added to ADC API tests.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-10-03 10:11:28 +02:00
Ryan Erickson a16fb03608 tests: modem: build_all: Add MG100 board exclusions
Add MG100 board to test exclusions where necessary.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-10-03 10:11:28 +02:00
Ryan Erickson eadb45612d samples: mcumgr: smp_svr: Add support for MG100 board
Add support to build the sample for the MG100 board.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-10-03 10:11:28 +02:00
Ryan Erickson 3996c0327b samples: net: mqtt_publisher: Add support for MG100 board
Add support to build the sample for the MG100 board.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-10-03 10:11:28 +02:00
Ryan Erickson b612c49424 samples: net: lwm2m_client: Add support for MG100 board
Add support to build sample for MG100 board.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-10-03 10:11:28 +02:00
Ryan Erickson 511ae9b55a MAINTAINERS: Add MG100 board to Laird Connectivity Platforms
Add the MG100 board as a Laird Connectivity platform

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-10-03 10:11:28 +02:00
Ryan Erickson 1ffb5162fc CODEOWNERS: add MG100 board owner
Add myself.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-10-03 10:11:28 +02:00
Ryan Erickson 52cfe2838c boards: Add MG100
Add Laird Connectivity MG100 board.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-10-03 10:11:28 +02:00
Gerard Marull-Paretas b8f9d8add7 tests: devicetree: cover DT(_INST)_FOREACH_PROP_ELEM_SEP(_VARGS)
Add coverage for DT(_INST)_FOREACH_PROP_ELEM_SEP(_VARGS).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-03 10:11:18 +02:00
Gerard Marull-Paretas fdea3c9a44 devicetree: add DT(_INST)_FOREACH_PROP_ELEM_SEP(_VARGS)
Add a new set of helpers for expanding property entries with a
separator. These macros complement DT(_INST)FOREACH_PROP_ELEM(_VARGS) by
adding the capability to expand with a custom separator between property
entries. This allows, in some cases, to re-use existing macros (e.g.
DT_PROP_BY_IDX) without creating an auxiliary macro that just appends a
separator. Example:

```dts
n: node {
	...
	my-gpios = <&gpioa 0 GPIO_ACTIVE_HIGH>,
		   <&gpiob 1 GPIO_ACTIVE_HIGH>;
};
```

Before:

```c
 #define GPIO_DT_SPEC_BY_IDX_AND_COMMA(node_id, prop, idx) \
	GPIO_DT_SPEC_BY_IDX(node_id, prop, idx),

struct gpio_dt_spec specs[] = {
	DT_FOREACH_PROP_ELEM(DT_NODELABEL(n), my_gpios,
			     GPIO_DT_SPEC_BY_IDX_AND_COMMA)
};
```

After:

```c
struct gpio_dt_spec specs[] = {
	DT_FOREACH_PROP_ELEM_SEP(DT_NODELABEL(n), my_gpios,
				 GPIO_DT_SPEC_BY_IDX, (,))
};
```

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-03 10:11:18 +02:00
Gerard Marull-Paretas 1f98c24fc2 doc: dts: macros.bnf: add missing DT_FOREACH_PROP_ELEM entries
Entries for DT_FOREACH_PROP_ELEM_(VARGS) internal helpers were missing.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-03 10:11:18 +02:00
Krzysztof Chruscinski e6bbc6941a logging: Use STRUCT_SECTION macros for log backend
Clean up logging code to utilize macros for handling sections.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-10-03 10:11:03 +02:00
Mariusz Skamra 7cc5be0dcf bluetooth: audio: pacs: Remove duplicated code
Remove code duplicates

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-10-03 10:10:46 +02:00
Valerio Setti b609c7a474 CODEOWNERS: add ownership of STM32 quadrature decoder driver
Adding myself as the code owner for the STM32's quadrature encoder
driver

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2022-10-03 10:10:31 +02:00
Valerio Setti 2bcc6f9194 samples: sensor: adding a sample application for the STM32 qdec driver
Sample application for the STM32 quadrature encoder driver

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2022-10-03 10:10:31 +02:00
Valerio Setti cda7d05ca6 dts: sensor: adding nodes for STM32 quadrature encoder
Nodes for quadrature encoders are added to the STM32F4 devices

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2022-10-03 10:10:31 +02:00
Valerio Setti 1b78f2dfbd drivers: sensor: adding driver for STM32 quadrature encoder
This driver configures STM32's internal timers in order to use
the quadrature encoder mode.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2022-10-03 10:10:31 +02:00
Enjia Mai cce22da0bc tests: drivers: pwm: move the pwm_loopback test to new ztest API
Migrate the testsuite tests/drivers/pwm/pwm_loopback to the new
ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-10-03 10:10:15 +02:00
Enjia Mai 08a7b3e421 tests: drivers: pwm: move the pwm api test to new ztest API
Migrate the testsuite tests/drivers/pwm/pwm_api to the new
ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-10-03 10:10:15 +02:00
Peter Marheine 34ca7347a2 tests: remove incorrect comment from code_relocation for RISCV
This was copied from the ARM version of the test's linker script, which
in turn seems to have been copied from another linker script at some
point. Remove the incorrect comment.

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2022-10-03 10:09:53 +02:00
Peter Marheine 42a25255d2 nios2: rename default RAM region from 'SRAM' to 'RAM'
It's useful for the default RAM region to have a uniform name across
architectures so higher-level build processes do not need to have their
own awareness of the names. Since NIOS2 uniformly uses 'SRAM', change it
to 'RAM' to match most other architectures.

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2022-10-03 10:09:53 +02:00
Peter Marheine ec5b9ad348 arm64: rename default RAM region from 'SRAM' to 'RAM'
As with 32-bit ARM, it is useful to make the RAMABLE_REGION name uniform
across architectures so the build system does not need to be aware of
the differences when CODE_DATA_RELOCATION is supported. Generalize the
name to just 'RAM' for uniformity.

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2022-10-03 10:09:53 +02:00
Peter Marheine 5eb75b81f7 arm: rename default RAM region from 'SRAM' to 'RAM'
It's useful for RAMABLE_REGION to have a uniform name when
CODE_DATA_RELOCATION is supported, because otherwise the build system
needs to be aware of how the region name differs between architectures.
Since architectures tend to prefer one of 'SRAM' or 'RAM' for that
region, prefer to use 'RAM' as the more general term.

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2022-10-03 10:09:53 +02:00
Dhruva Gole c82d66f319 boards: cc3220sf: add bosterpack_connector.dtsi
This can be used in DTOs

The boosterpack_connector.dtsi is an attempt to add something similar
to the arduino_r3_connectors that make using DT overlays with these
boards far easier and cleaner.
This can probably also be expanded to other CC32x TI launchpads
having similar layouts.

Referred swru465, ie. cc3220 TRM Table 5-14 and compared with launchpad
pinout. The numbering is done from 0...40 as per in the boosterpack pinout.
The pins like VCC/ GND have been skipped from the numbering. Also
the non-default pins are skipped.

Also add gpio status ok: This ensures that all the gpios are
enabled by default

Signed-off-by: Dhruva Gole <goledhruva@gmail.com>
2022-10-03 10:08:59 +02:00
Jackson Cooper-Driver 23c9f7b215 ipc_service: Add ipc_service_close_instance function
This function allows the application to close an ipc_service instance.
It is intended for use when the remote agent it is communicating with
has gone down and allows for cleanup.
It first checks that the endpoints have been separately deregistered
with the instance using the deregister_endpoint function before
calling into previously added functions in ipc_static_vrings.c
and ipc_rpmsg.c to close those instances.

Signed-off-by: Jackson Cooper-Driver <jackson.cooper---driver@amd.com>
2022-10-03 10:08:44 +02:00
Jackson Cooper-Driver e69d131bc5 ipc_service: Adding ipc_static_vrings_deinit function
This function deinitialises the static vrings used by the ipc_service
instance. It acheieves this by tearing down the initialised
virtqueues before closing the various aspects of libmetal which
are in use.

Signed-off-by: Jackson Cooper-Driver <jackson.cooper---driver@amd.com>
2022-10-03 10:08:44 +02:00
Jackson Cooper-Driver f16a19c33f ipc_service: Add ipc_rpmsg_deinit function
This function does the opposite of the ipc_rpmsg_init function and
allows the rpmsg instance to be torndown in the case that the application
wishes to do so. It is intended to be used by the ipc_service subsystem.

Signed-off-by: Jackson Cooper-Driver <jackson.cooper---driver@amd.com>
2022-10-03 10:08:44 +02:00
Szymon Janc f09220d050 test: Bluetooth: EDTT: Disable invalid tests
Some tests assume that if IUT accepted HCI_LE_Set_Data_Length command
than HCI_LE_Data_Length_Change event will always be sent. This is not
the case anymore as HCI_LE_Data_Length_Change is sent only if effective
parameters changed.

Those tests should be re-enabled when EDDT implementation is updated.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2022-10-03 10:08:34 +02:00
Szymon Janc 6673cb1f60 Bluetooth: Controller: Fix DLE HCI params parsing
LE Write Suggested Default Data Length and LE Set Data Length commands
are suggestions from host and should be validated only as per HCI
specification regarding internal setting of LLCP.

LLCP is allowed to use other values if needed.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2022-10-03 10:08:34 +02:00
Dominik Chat f7785f4cad boards: Remove bmi270 int1-gpios form thingy:53 DTS
BMI270 driver does not support interrupts
and int1-gpios property produces twister failures.

Signed-off-by: Dominik Chat <dominik.chat@nordicsemi.no>
2022-10-03 10:06:46 +02:00