Commit graph

106196 commits

Author SHA1 Message Date
Andy Ross
cdd4cbcc67 soc/mtk_adsp: Remove "msg" API
This is a feature of the 8195 DSP only, which is used only vestigially
by SOF to store data that nothing reads.  The Linux kernel on the
other side uses a shared driver for all 81xx devices, which does not
expose the feature.  It seems to work, but it's not worth maintaining
a driver in tree for legacy hardware that will never use it.

Signed-off-by: Andy Ross <andyross@google.com>
2024-11-28 20:51:50 +01:00
Andy Ross
48a84911ac soc/mtk_adsp: Add default console hook
Wire the default printk output to the console at boot, just to be sure
we have stdio output good enough to get tests to pass.

Signed-off-by: Andy Ross <andyross@google.com>
2024-11-28 20:51:50 +01:00
Andy Ross
f7c10ac194 arch: Let CONFIG_IRQ_OFFLOAD_NESTED be overridable
This is currently selected by the arch, but some devices (in paticular
xtensa ones which have configurable interrupt setups) might not
actually be able to effect an irq_offload() from within an ISR even
though we have code for it.

Make this a default and not a select so that lower layers can override
the setting.

Signed-off-by: Andy Ross <andyross@google.com>
2024-11-28 20:51:50 +01:00
Jan Kuliga
8ba134cea6 drivers: auxdisplay: hd44780: implement busy-flag polling mechanism
HD44780 controller can indicate via busy flag whether it's finished
processing current command. This allows for faster completion of HD44780
commands as seen from MCU perspective, as the MCU doesn't have to wait
for fixed long period of time. Implement this functionality.

Signed-off-by: Jan Kuliga <jtkuliga@gmail.com>
2024-11-28 20:51:39 +01:00
Jan Kuliga
1b784f9892 drivers: auxdisplay: hd44780: rework the initialization procedure
If proper power supply is used to power the hd44780, it initializes
correctly on a reset condition all by itself. However,
if the power supply is below its expectations (e.g. some 3.3V Nucleo
board), it won't initialize properly on its own, and the MCU
has to carry out the initialization as listed in the reference manual.
Since we cannot determine it properly in the runtime,
always carry out the initialization procedure.

Signed-off-by: Jan Kuliga <jtkuliga@gmail.com>
2024-11-28 20:51:39 +01:00
Jan Kuliga
91a14dcc50 drivers: auxdisplay: hd44780: add rs-line-delay dt parameter
In order for the driver to be compliant with the timing sequence
diagrams presented in the reference manual, the MCU has to wait
for some additional period of time while setting both the rs and rw
lines.

Signed-off-by: Jan Kuliga <jtkuliga@gmail.com>
2024-11-28 20:51:39 +01:00
Jan Kuliga
55de1c9719 drivers: auxdisplay: hd44780: get rid of excessive delays
Express delay values in nanoseconds. Set the default delay time values
as specified in the HD44780 reference manual.

Signed-off-by: Jan Kuliga <jtkuliga@gmail.com>
2024-11-28 20:51:39 +01:00
Jan Kuliga
537182a96a drivers: auxdisplay: hd44780: rework auxdisplay_hd44780_command()
Make this function more concise in order to introduce busy-flag polling
mechanism later on.

Signed-off-by: Jan Kuliga <jtkuliga@gmail.com>
2024-11-28 20:51:39 +01:00
Jan Kuliga
e8dc0c6f42 drivers: auxdisplay: hd44780: set rw_gpio line value only once
There's no need to set this line every single time a command is sent
to the HD44780. Set it only once, so that one can save some cpu cycles.

Signed-off-by: Jan Kuliga <jtkuliga@gmail.com>
2024-11-28 20:51:39 +01:00
Andreas Rudolf
7d2251381e doc: devicetree: clarify child node disabling
Add a note to status property that disabled parent nodes do not
implicitly disable child nodes.

Issue #82040

Signed-off-by: Andreas Rudolf <andreas.rudolf@husqvarnagroup.com>
2024-11-28 15:44:43 +00:00
Johann Fischer
1a5ab2c16e usb: device_next: fix null pointer dereference in Get Interface
Respond with a Request Error in default and addressed states.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-11-28 15:43:56 +00:00
Wilfried Chauveau
468ce19e9c twister: testplan: fix robot filter when there is no simulator
#79174 incorectly interpreted the condition. If no simulator is found
if cannot be "renode" and therefore robot should be considered unsupported.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-11-28 15:43:48 +00:00
Robert Lubos
df79f10513 net: lib: http_server: Verify fs_read result for filesystem resources
Verify the result of the fs_read() operation when handling filesystem
resources, and abort processing the resource in case of errors.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-11-28 15:43:32 +00:00
Stig Bjørlykke
95333705e5 net: lwm2m: Reset server timestamps after bootstrap
Reset the server timestamps after bootstrap to handle a case
where a new server instance has replaced the bootstrap server
instance.

Signed-off-by: Stig Bjørlykke <stig.bjorlykke@nordicsemi.no>
2024-11-28 15:43:18 +00:00
Robert Lubos
35820f23f6 net: lwm2m: Add missing NULL pointer check in shell
In case lwm2m_get_engine_obj_field() fails to find a corresponding
object field when iterating resource instances, simply skip that
resource instance when printing object instance contents.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-11-28 15:43:04 +00:00
Stig Bjørlykke
48de0fcd73 net: lwm2m: Fix index for default disabled_until
Use correct index to set disabled_until default value in
server_create().

Signed-off-by: Stig Bjørlykke <stig.bjorlykke@nordicsemi.no>
2024-11-28 15:42:54 +00:00
Stig Bjørlykke
633269a913 net: lwm2m: Accept OMA TLV in LwM2M 1.1
Support write OMA TLV resource instance in LwM2M 1.1.
Accept OMA TLV as default content format.

Signed-off-by: Stig Bjørlykke <stig.bjorlykke@nordicsemi.no>
2024-11-28 15:42:42 +00:00
Jukka Rissanen
3bd4000712 net: dns: mdns_responder: Interface name might miss terminating null
The network interface name that is copied to if_req struct might
be missing terminating null for IPv4.

This is fixing the IPv4 issue which was missed in previous fix attempt.

Fixes #74795
Coverity-CID: 368797

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-28 15:42:32 +00:00
Jukka Rissanen
bf091fc909 net: ipv6: Check return value from mbedtls_md_setup
Bail out if mbedtls_md_setup() returns an error.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-28 15:42:08 +00:00
Jukka Rissanen
26d033b790 net: ipv6_pe: Check return value from mbedtls_md_setup
Bail out if mbedtls_md_setup() returns an error.

Fixes #81950
Coverify-CID: 434626

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-28 15:42:08 +00:00
Stig Bjørlykke
7d20d3a28c net: lwm2m: Make BinaryAppDataContainer instances configurable
Add Kconfig variables for BinaryAppDataContainer instance count
and data instance count.

Signed-off-by: Stig Bjørlykke <stig.bjorlykke@nordicsemi.no>
2024-11-28 15:41:52 +00:00
Ilya Tagunov
07b4d3a297 posix: clock: partially reformat __z_clock_nanosleep
Apply clang-format to the offending lines to make it happy.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2024-11-28 15:41:32 +00:00
Ilya Tagunov
4c56eb6f65 posix: clock: fix potential int32_t overflow in __z_clock_nanosleep
As k_sleep returns int32_t, there is a possibility for integer overflow
during conversion from milliseconds to nanoseconds.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2024-11-28 15:41:32 +00:00
Ilya Tagunov
bf525851e8 posix: clock: fix 32-bit time_t overflow in __z_clock_nanosleep
Nanosecond time calculation overflows if the libc has 32-bit time_t.
One such libc is the classic ARC MWDT one, but there might be others.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2024-11-28 15:41:32 +00:00
Benedikt Schmidt
760210f39d drivers: fpga: separate drivers of iCE40 for SPI and GPIO bitbang
Separate the current driver for the FPGA iCE40 into two different ones.
One implements only the SPI load mode, the other one only the GPIO
bitbang mode.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-11-28 15:39:33 +00:00
Sylvio Alves
a7a978a946 drivers: bluetooth: esp32: enable entropy generator by default
As BT now uses PSA crypto API instead of TinyCrypt, entropy generator
is now needed for a proper bluetooth operation.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-11-28 15:39:08 +00:00
Valerio Setti
1320b3dd66 tests: bsim: comment out some failing AC tests
This commit comments out some test AC cases that are failing in bsim.
These will be investigated in PR #82199.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-28 15:38:57 +00:00
Valerio Setti
2e822d5c56 Revert "samples: bt: reduce system heap memory for the hci_ipc sample"
This reverts commit 184c0f9e9d.

Reducing system heap memory to 1024 caused runtime failures on some
platforms. This commit revert that change and return to the previous
size.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-28 15:38:57 +00:00
Valerio Setti
3bf9a14f98 Bluetooth: Host: increase BT_LONG_WQ stack size when using ECC emulation
After the switch from TinyCrypt to PSA Crypto API as crypto
backend, runtime crashes might happen on some platform due
to BT_LONG_WQ's stack size not being large enough. This
commit fixes this issue.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-28 15:38:57 +00:00
Valerio Setti
5790de6d6a Bluetooth: Host: use P256-M in ECC emulation
When BT_SEND_ECC_EMULATION and the platform uses Mbed TLS as PSA
Crypto provider, we select the Cortex-M software optimized
implementation of the secp256r1 curve algorithms. This is much
faster than the standard support provided by Mbed TLS and it
also reduces ROM footprint.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-28 15:38:57 +00:00
Benjamin Cabé
2f583a8369 doc: gsg: warn against using Python 3.13 on Windows
History seems to repeat itself and we need to momentarily discourage
folks to use Python 3.13 on Windows until windows-curses releases a
PyPI package that works with it.
See https://github.com/zephyrproject-rtos/windows-curses/issues/69

Fixes #81543.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-28 12:53:42 +01:00
Sahaj Sarup
18a3f6f0fa board: arm: Add support for WeAct Mini STM31H7B0
This board is mostly the same as mini_stm32h743.

Noatable diffrences for dt:
- rcc config
- octospi in quadspi mode
- pinmux naming for USB and quadspi

Signed-off-by: Sahaj Sarup <sahaj.sarup@linaro.org>
2024-11-28 12:53:25 +01:00
Emil Gydesen
f254280f1f Bluetooth: Audio: Fix bad docs for codec helper functions
Several of the codec helper functions used @retval incorrectly
Several functions referenced @ccid_list incorrectly

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-28 12:53:09 +01:00
Ravi Dondaputi
11dae0e9eb net: l2: wifi: Add checks for cert header creation
Execute certificate headers creation rules only if Wi-Fi Enterprise mode
is enabled.

Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
2024-11-28 12:52:34 +01:00
Grzegorz Swiderski
c120f4fe56 modules: hal_nordic: nrfs: Enqueue requests when not connected
Allow `nrfs_backend_send` to push early requests into the message queue,
but defer sending them until a connection is established, at which point
the queue will be flushed. This benefits asynchronous code by making it
optional to call `nrfs_backend_wait_for_connection` before using the
nrfs service API, which is already non-blocking.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-11-28 12:52:16 +01:00
Ian Morris
dae37b69c5 boards: shields: added reset to mikroe ble tiny click
Added ability for host MCU to perform a hardware reset of the DA14531
contained on the Mikroe BLE Tiny Click.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-11-28 12:52:01 +01:00
Ian Morris
8e51ebf499 drivers: bluetooth: hci: add hardware reset for da1453x
Add ability to perform a hardware reset of the DA1453x during setup of
the HCI transport.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-11-28 12:52:01 +01:00
Krzysztof Chruściński
d87bafea30 dts: common: nordic: nrf54l20: Add missing nodes
Add missing nodes: i2c23, i2c24, spi23, spi24, uart23, uart24.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-28 12:51:45 +01:00
Piotr Kosycarz
d897c70b06 samples: boards: nordic: system_off: add console checking
Basic verification of output.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-11-28 12:51:32 +01:00
Yong Cong Sin
e6dd68ec89 arch: riscv: introduce CONFIG_RISCV_GP_PURPOSE choice
Introduce `CONFIG_RISCV_GP_PURPOSE` choice to make sure that only
one of `CONFIG_RISCV_GP` or `CONFIG_RISCV_CURRENT_VIA_GP` can be
enabled, instead of relying of dependencies.

To do that, introduce a new
`CONFIG_RISCV_SOC_HAS_GP_RELATIVE_ADDRESSING` that can be selected
by SoC when it implemented global pointer (GP) initialization for
relative addressing in its linker.

`CONFIG_RISCV_GP` will be the default choice when
`CONFIG_RISCV_SOC_HAS_GP_RELATIVE_ADDRESSING=y`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-28 12:51:09 +01:00
Yong Cong Sin
033804e266 arch: riscv: support CONFIG_USERSPACE in CONFIG_RISCV_CURRENT_VIA_GP
Reset the the `gp` register to `_kernel->cpus[i].current` when
`CONFIG_USERSPACE` is enabled on exception to keep it sane.

Updated the testcase to test both `CONFIG_RISCV_GP` and
`CONFIG_RISCV_CURRENT_VIA_GP`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-28 12:51:09 +01:00
Pavel Vasilyev
1eeee010bd bluetooth: mesh: cfg_cli: Update logs when pulling out CDP0 and 1
This commits puts in order log messages when unpacking CDP0 and CDP1 so
that it a bit more clear where the error happens.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-11-28 12:50:58 +01:00
Pavel Vasilyev
e2a0fafe42 bluetooth: mesh: cfg_cli: Check buf len when pulling out data
This commit checks that config client doesn't pull out data outside of
the buffer.

Fixes #80012

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-11-28 12:50:58 +01:00
Arkadiusz Balys
1e69738bf2 boards: nordic: Fix cpuapp_ram0x_region reg value.
There is a mistake and the cpuapp_ram0x_region "reg" value should
start from 0x2f011000.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
2024-11-28 12:50:44 +01:00
Jukka Rissanen
c6a1af5c17 net: ethernet: bridge: Drop the cloned packet in error
We need to drop the cloned packet that was fed to the bridge instead of
returning directly from the function. Without this change we have a
buffer leak.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-28 12:50:36 +01:00
Jukka Rissanen
ed0dcca2fb net: ethernet: bridge: Avoid null pointer access
If the packet cloning failed, bail out in order to avoid
null pointer access.

Fixes #81992
Coverity-CID: 434493

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-28 12:50:36 +01:00
Ilya Tagunov
8780d912fa tests/storage/stream_flash: add nrf52840dk/nrf52840 to platform_allow
If nrf52840dk/nrf52840 is an integration platform, it should also be an
allowed platform, otherwise the test run breaks down.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2024-11-28 12:07:58 +02:00
Pavel Vasilyev
2041682900 bluetooth: mesh: brg_cfg_cli: Initialize prohibited value
Coverity complains about uninitialized prohibited fields. Even though it
is not used because it is "prohibited", it is simpler to just
initialized it with the value received from a server.

Fixes #81939
Coverity-CID: 434649

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-11-28 09:43:48 +01:00
Piotr Kosycarz
5ae4f11c93 tests: drivers: enable more tests for nrf54l10 and nrf54l05
counter_basic_api, i2s_api, i2s_speed, uart_async_api

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-11-28 09:42:58 +01:00
Håkon Amundsen
8a82b078a4 boards: nrf54h20: increase size of cpuapp and cpurad partitions
This is possible due to the memory map changes introduced in
26603cefaf

Signed-off-by: Håkon Amundsen <haakon.amundsen@nordicsemi.no>
2024-11-28 09:42:46 +01:00