Commit Graph

81971 Commits

Author SHA1 Message Date
Daniel DeGrasse a3b8f062f8 drivers: display: add driver for HX8394 TFT LCD controller
Add driver for HX8394 TFT LCD controller. This controller is driven via
MIPI DSI, and is configured for a 720x1280 display

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-28 09:06:17 +00:00
Daniel DeGrasse 918c79706d drivers: mipi_dsi: dsi_mcux_2l: add support for MIPI generic long write CMD
Add support for MIPI generic long write commands to DSI MCUX 2L driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-28 09:06:17 +00:00
Daniel DeGrasse d620511c22 drivers: mipi_dsi: dsi_mcux: add support for MIPI generic long write CMD
Add support for MIPI generic long write commands to DSI MCUX driver.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-28 09:06:17 +00:00
Florian Vaussard 8bac51be1e drivers: flash: stm32: add a weak flash_stm32_valid_range()
Most implementations have the same logic, with only a different write
block size. Now that we are using write-block-size from the device tree,
it is possible to use a default implementation that can be overridden if
necessary.

Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
2023-07-28 09:02:17 +00:00
Florian Vaussard 4c9e42925e drivers: flash: stm32l5: use write-block-size when writing
STM32L5 have a write block size of 8, but STM32U5 and STM32H5 have a
write block size of 16. Convert write_dword() and
flash_stm32_write_range() to write write-block-size data at a time.

Fixes #60724

Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
2023-07-28 09:02:17 +00:00
Florian Vaussard 199486546a drivers: flash: stm32l5: use write-block-size when validating
STM32L5 have a write block size of 8, but STM32U5 and STM32H5 have a
write block size of 16. Use write-block-size from the device tree
instead of hardcoding this value when validating the range of write
operations.

Fixes #60724

Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
2023-07-28 09:02:17 +00:00
Marcin Niestroj 96768ea2d2 boards: nucleo_h563zi: add ST Morpho connector nexus node
Add a new GPIO nexus node for the ST Morpho connector in the board.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2023-07-28 08:39:39 +00:00
Marcin Niestroj e47175becd dts: bindings: extend st-morpho-header to support Nucleo-144
Nucleo-144 boards have up to 72 pins (there are boards with only 70) on
each ST Morpho header. Extend pin identifiers to support that number.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2023-07-28 08:39:39 +00:00
Marcin Niestroj cbb83d64ab dts: bindings: rename st-morpho-header pin identifiers
So far pin identifiers were named after CN7 and CN10 connector names on
Nucleo-64 boards. In case of Nucleo-144 there are ST Morpho connectors on
both sides, but bigger (up to 72 instead of 38 pins on each side). First 38
pins out of 72 on each side usually map to the same pins (e.g. PA5 being
13th pin on right ST Morpho connector). This means that single ST Morpho
connector definition will suffice.

Leaving CN7 and CN10 (name of pin headers on Nucleo-64 boards) is confusing
in context of Nucleo-144 boards, since corresponding pin headers are named
CN11 and CN12.

Rename:

 * s/ST_MORPHO_CN7_/ST_MORPHO_L_/
 * s/ST_MORPHO_CN10_/ST_MORPHO_R_/

so that pin identifiers make more sense in context of Nucleo-144 boards.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2023-07-28 08:39:39 +00:00
Gustavo Romero 5818031af7 boards: arm: stm32f746g_disco: Use specified USB serial
The 'west flash' command allows specifying the port where the target is
attached via the '--serial' option, allowing users to set the USB serial
port for flashing. However, the 'stm32f746g_disco' script file currently
ignores the _ZEPHYR_BOARD_SERIAL variable set by this option, preventing
effective port specification.

This commit fixes it by correctly setting the openocd adapter serial
when _ZEPHYR_BOARD_SERIAL variable is set, enabling proper USB serial
port specification during flashing.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
2023-07-28 08:38:43 +00:00
Christopher Friedt 16e1526866 tests: thrift: check for channel closure before throwing
Previously, the binary protocol variant of ThriftTest would fail
consistently in CI for `qemu_x86_64` with the message below.

```
E: failed to poll fds -1, -1: 1
```

Note: 1 corresponds to EPERM

The root cause of this is that we do not yet have support for
standard synchronization primitives in C++, and there is
slightly racey behaviour in thrift until we do have support
for standard synchronization primitives.

With the addition of dynamic thread stacks, conforming pthreads,
and some additional work in the toolchain area
(re gthr-posix.h), we should soon be able to enable proper
synchronization primitives.

This change is a temporary workaround but solves the
test failure (which would occur even when tests all passed).

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-07-28 08:36:29 +00:00
Alberto Escolar Piedras 85059866d5 native_simulator: Align with upstream latest
Upstream SHA: c8d3e4134ee24f8c3bbc598dfc80520c5a0c46d5

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-07-28 09:08:07 +02:00
Johann Fischer aecb1ca2e7 usb: device: move the content of usb_msc.h to implementation file
The usb_msc.h header does not provide any API. The content is only
used by the MSC implementation for the current USB device stack and
is not required for any use of MSC by the application.
The content has no proper namespace and must not be reused for
anything else in (new) USB support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-07-28 07:09:48 +02:00
Damian Krolik 74859013f1 lib: cpp: name the choice group for selecting C++ standard
Add a name to the choice group for selecting the C++
standard to be able to override the default standard in
Kconfig.* files.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2023-07-27 22:33:14 -04:00
Bruno Mendes 7da7742c66 west debugserver: openocd: configure rtos
This enables thread awareness in the spawned OpenOCD server.

Signed-off-by: Bruno Mendes <bd_mendes@outlook.com>
2023-07-27 15:08:15 -05:00
David Ullmann 724a5cd54f board: add cy8ckit 062 pioneer
Tested with hello_world and blinky projects
Signed-off-by: David Ullmann <davidl.ullmann@gmail.com>
2023-07-27 15:26:40 -04:00
Cong Nguyen Huu b77d40d1fe tests: drivers: enable tests eeprom and i2c for mr_canhubk3
Enable tests: tests/drivers/eeprom/api,
tests/drivers/i2c/i2c_target_api.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2023-07-27 12:32:07 -05:00
Cong Nguyen Huu 3d1285bc40 drivers: i2c_mcux: update to compatible with S32K344
Update to shim driver compatible with the hardware block
in S32K344. Configure the pins before initializing I2C
to avoid happening bus busy.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2023-07-27 12:32:07 -05:00
Marc Desvaux ae72fa7bf6 samples: net: zperf: add Ethernet twister test
add one Ethernet twister test for nucleo_h563zi,
nucleo_h743zi, nucleo_f429zi, nucleo_f746zg.
remove the common: harnesses: net  that are not supported
leave harnesses: net for all other test execpt the one we use

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-07-27 16:24:54 +00:00
Cong Nguyen Huu 36d63e132d boards: arm: mr_canhubk3: enable support for FlexCAN
Reuse existing MCUX-based shim driver for FlexCAN.
Enable flexcan0 for Zephyr canbus to run tests.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2023-07-27 11:06:45 -05:00
Cong Nguyen Huu a3fb2dcc2f drivers: can: add kconfig CAN_MAX_MB
Each CAN instance of S32K344 has different maximum number
of message buffers, depends on payload. Add kconfig that
defines maximum number of message buffers for concurrent
active instances and update driver to compatible
support S32k344.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2023-07-27 11:06:45 -05:00
Alberto Escolar Piedras c044b2e916 posix arch: Fix very rare segfault on program termination
In some very rare cases (< 1/1000 runs), in very loaded machines,
a race in the glibc pthread_cancel() seems to be triggered.

In this the cancelled thread cleanup overtakes the pthread_cancel()
code, and frees the pthread structure before pthread_cancel()
has finished, resulting in a dereference into already
free'd memory, and therefore a segfault.
Calling pthread_cancel() during cleanup is not required beyond
preventing a valgrind memory leak report (all threads will be
stopped immediately on exit).
Therefore we stop doing this, to avoid this very rare crashes.

This issue was reproduced in Ubuntu 22.04, with its default
gcc 11.3.0 and glibc 2.35.
The issue may also have been seen very rarely in Zephyr's CI.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-07-27 17:02:36 +02:00
Erwan Gouriou 16d9d4d1a5 Kconfig: Provide name to orphan configuration choice symbol
Kconfig choice section for LINKER_ORPHAN configuration has no name.
This prevents configuring a default value in .defconfig files and
constrain to set in _defconfig /.prj files.
Then it is not possible to generalize this setting to a whole set of
boards (soc series for instance) or make it dependent on another symbol.
Provide it a name to add this flexibility.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-07-27 13:59:49 +00:00
Josep Puigdemont 677d377299 sensor: bme280: BMP280 has no humidity sensor
Return ENOTSUP when getting the humidity channel if the driver is used
with a BMP280, since this device does not provide humidity readings.

Signed-off-by: Josep Puigdemont <josep.puigdemont@gmail.com>
2023-07-27 08:46:40 -05:00
Josep Puigdemont 17fb2a1fb5 sensor: bme280: return ENOTSUP on invalid channel
ENOTSUP should be returned for unsupported channels.

Signed-off-by: Josep Puigdemont <josep.puigdemont@gmail.com>
2023-07-27 08:46:40 -05:00
Juha Heiskanen 9a06ce19ad tests: mcumgr: MCUmgr and smp client unit test
Added unit test for testing IMG and OS group component's.

Added Unit test for SMP Client.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2023-07-27 14:35:43 +02:00
Juha Heiskanen d77a657526 mgmt: smp: MCUmgr Client support
MCUmgr client basic implementation for support Image and OS grpup
commands.

Image Group:
* Image state read/write
* Image Upload secondary slot
* Image Erase secondary slot

OS group:
* Reset
* Echo service, disabled by default

Opeartion's are blocked call and cant't call inside worker queue.
IMG and OS need to be SMP client object for transport.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2023-07-27 14:35:43 +02:00
Juha Heiskanen 5797e4241e mgmt: smp: SMP Client enabler
SMP client support for generate request and handling
response message.

Updated SMP transport for send request.

Added API for register SMP transport.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2023-07-27 14:35:43 +02:00
Huifeng Zhang 0cf26615db drivers: eth_smsc91x: Fix the missing of selecting bank 3
Fix the missing of selecting bank 3 at the beginning of the function
`smsc_miibus_writereg`.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-07-27 13:27:47 +02:00
Wojciech Sipak e473dd5333 pinctrl: gecko: fix compilation and UART handling
LEUART_Typedef isn't defined for every possible target.
It should be included in the conditional compilation part.

For proper handling of UART location, the driver needs
to remember pin configuration of both TX and RX.
This was broken in #60695 is brought back here.

Signed-off-by: Wojciech Sipak <wsipak@antmicro.com>
2023-07-27 10:51:31 +00:00
Carles Cufi 641b438de0 soc: nordic: Make all compatibles lower case
Devicetree specification v0.4, Section 2.3.1:

"The compatible string should consist only of lowercase letters, digits
and dashes, and should start with a letter."

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-07-27 10:50:50 +00:00
Carles Cufi dd8a1f16bd soc: nordic_nrf: nrf52840-qfaa has no USB
The QFN48 version has no USB peripheral, remove it from the Devicetree.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-07-27 10:13:12 +00:00
Adam Wojasinski f53041cb79 manifest: hal_nordic: Pull PWM driver fix for nrfx_pwm_stopped_check()
When `nrfx_pwm_stopped_check()` was called multiple times it was
returning incorrect value after second and next calls.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-07-27 12:12:11 +02:00
Alberto Escolar Piedras b89ff1b3d6 manifest: Update nRF HW models to latest
The nRF HW models have been updated to include the following
fixes and improvements.

* RADIO: Improve T_IFS support, and fix for low latency mode
* docs: Miscelaneous improvements

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-07-27 11:23:01 +02:00
Jamie McCrae 9f56995d35 tests: mgmt: mcumgr: all_options: Add additional checks
Adds additional checks to enable more options for the build-only
check that compilation is successful.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-07-27 11:16:04 +02:00
Jamie McCrae 8ecedf2dfb mgmt: mcumgr: grp: img_mgmt: Fix renamed define
Fixes an issue whereby a define was renamed in one place but not
another.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-07-27 11:16:04 +02:00
Carles Cufi acb8f6bf0b soc: nordic_nrf: Add nRF52833 QDAA variant
This variant has fewer pins.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-07-27 08:47:35 +00:00
Carles Cufi b140963557 soc: nordic_nrf: Add nRF52840 QFAA variant
This variant has fewer pins.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-07-27 08:47:35 +00:00
Rubin Gerritsen 88f161778a Bluetooth: Controller: Kconfig: Move BT_LL_SW_SPLIT specific configs
These configs are very tied to the BT_LL_SW_SPLIT implementation,
so it makes sense that these are only visible when that link layer is
used.

For the ones that may be used by other controllers in the future,
a dependency has been added.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2023-07-27 10:20:55 +02:00
Troels Nilsson c0649ef694 Bluetooth: Controller: Fix truncation of adv. data
Truncation of advertising data has to be done at a PDU
boundary; Including only part of a PDUs advertising data is
not allowed

Signed-off-by: Troels Nilsson <trnn@demant.com>
2023-07-27 10:20:18 +02:00
Troels Nilsson e0370f5439 Bluetooth: Controller: Stop following aux ptr if DATA_LEN_MAX is hit
If the aux scanner already has CONFIG_BT_CTLR_SCAN_DATA_LEN_MAX
advertising data, there is no point in following an aux ptr -
instead flush the data and produce an incomplete report

Signed-off-by: Troels Nilsson <trnn@demant.com>
2023-07-27 10:20:18 +02:00
Jakub Rzeszutko bdeb62d116 shell: fix possible negative indexing
Fixes #60808

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@verkada.com>
2023-07-27 10:20:04 +02:00
Aaron Massey 43b385ae65 tests: sbs_gauge: Factor fixture out of test
In the near future we'll be adding SBS tests that are linked in based on
configs.

Extract the test fixture as a header that can be shared by multiple tests.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-07-27 10:19:41 +02:00
Sylvio Alves 41f16c3dd7 driver: wifi: esp32: increase default stack values
When testing Wi-Fi with MQTT/HTTP/Socket features,
network stacks can be full very fast, causing network issues
and eventual crash.

By analyzing used stacks,increasing the stack size described
in this PR fixes most use cases related above.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-07-27 10:17:53 +02:00
Aaron Massey 43601095b5 emul: sbs_gauge: Return err or unsupported feature
The fuel gauge emulators will attempt to access a 0 pointer when running a
backend emulator function that hasn't been implemented.

Add an explicit runtime check to return -ENOTSUP to signify the emulator
feature is not supported. We do not ASSERT here so we can write tests that
are generic and can run with various emulators that support a variety of
features.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-07-27 10:17:37 +02:00
Jacques Supcik d7c00ee7c2 boards: arm: stm32f412g_disco: Fix LED4 pin
On the stm32f412g_disco board, the LED LD4 (blue LED) is actually
on the pin 3 of GPIOE and not on the pin 4

(see https://www.st.com/resource/en/user_manual/um2032-discovery-kit-with-stm32f412zg-mcu-stmicroelectronics.pdf, page 31)

Signed-off-by: Jacques Supcik <jacques.supcik@hefr.ch>
2023-07-26 15:25:53 +00:00
Gerard Marull-Paretas 00f0054cf6 dts: arm: silabs: remove redundant pstate_em4 state
This state is never used in practice, even if handled by the PM
subsystem hooks. Shutdown-like states are always invoked manually, so
they don't need to be described in DT.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-26 16:49:00 +02:00
Gerard Marull-Paretas 1c0ec37931 dts: arm: silabs: move cpu-power-states to SoC dts files
CPU power states is a property of the SoC, not dts.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-26 16:49:00 +02:00
Gerard Marull-Paretas a05371d353 pm: state: allow disabling certain power states
In some platforms it may be desirable to disable certain CPU power
states, for example, because they have extra requirements not available
on all boards/applications. Because `cpu-power-states` are defined at
SoC dts file levels, the only way to achieve that now was by re-defining
`cpu-power-states` property in e.g. a board file. With this patch, one
can now selectively set `status = "disabled";` to any power state and it
will be skipped by the PM subsystem.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-26 16:49:00 +02:00
Gerard Marull-Paretas 068cffd78b dts: arm: nxp: ke1xf: move cpu-power-states to SoC dts files
CPU power states are not board dependent, but a property of the SoC.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-26 16:49:00 +02:00