Commit graph

115720 commits

Author SHA1 Message Date
Jamie McCrae
270f5d6771 soc: nordic: Use proper devicetree entries for clock frequency
Sets the SYS_CLOCK_HW_CYCLES_PER_SEC Kconfig from devicetree
entries. Also fixes invalid configuration on nrf54h20 whereby it
attempts to take the clock frequency from a peripheral that does
not exist

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-05-23 14:04:32 +02:00
Jamie McCrae
dd99eda025 dts: arm: nordic: Add default rtc1 clock frequency to nrf53 network core
Adds the default 32.768KHz clock frequency to this peripheral, as it is
used as the system timing source

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-05-23 14:04:32 +02:00
Jamie McCrae
e553b290f7 dts: bindings: timer: Add default clock frequency for nordic grtc
Adds a default for the nordic grtc

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-05-23 14:04:32 +02:00
Jamie McCrae
a9d0a36332 scripts: kconfig: Add dt_nodelabel_int_prop function
Adds a function which can be used to get the integer value of a
devicetree property in Kconfig from a nodelabel

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-05-23 14:04:32 +02:00
Adam Kondraciuk
bc06d8522e tests: kernel: timer: Align timer tests to nRF54
The new Nordic platforms use GRTC instead of RTC
as the system timer.
Also the nrf54h20 CPUPPR target does not have enough memory
to execute the `timer_behavior` test.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-05-23 14:04:29 +02:00
Mark O'Donovan
b1f9351930 boards: opta: enable qspi
Features enabled by this commit:
* QSPI

Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
2025-05-23 11:04:47 +02:00
Jiafei Pan
0537df8dd2 MAINTAINERS: nxp-mpu: add more collaborators
Add yangbolu1991 and Zhiqiang-Hou as the collaborators for NXP MPU,
yangbolu1991 has contributed a lot of in scope of MPU M-core and
Zhiqiang-Hou has contributed a lot of in scope of MPU A-Core, they
could help to fast the review process.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-05-23 11:04:38 +02:00
Hao Luo
0e4ff0f3fe drivers: gpio: ambiq: need to select AMBIQ_HAL_USE_GPIO
This commit selects AMBIQ_HAL_USE_GPIO to include ambiq GPIO HAL

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-05-23 11:04:34 +02:00
Hao Luo
76caed2e37 dts: bindings: add back missing pl011 for apollo4p
This commit adds back missing pl011 for apollo4p and
fixed compiling errors.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-05-23 11:04:34 +02:00
Karun Kumar Eagalapati
7f5b686d65 manifest: Update nrf_wifi for Raw modes boot failure
pull fix for raw modes boot failure

Signed-off-by: Karun Kumar Eagalapati <karun.kumar@nordicsemi.no>
2025-05-23 11:04:26 +02:00
Luca Burelli
8151dd9c6c drivers: flash_stm32h7: fix flash size detection
Commit 0e41b07309 ("drivers : flash:
update way to get flash size") changed the way to get flash size from
the LL_FLASH_GetSize() HAL function to the current DT_REG_SIZE() macro.

However, they are not equivalent:

- With LL_FLASH_GetSize(), REAL_FLASH_SIZE_KB returned the *total* size
  of the Flash memory, reading it from a ROM register of the CPU. For
  example, it was 2048 (2MB) for a STM32H747xI.

- The current DT_REG_SIZE() applies to a flash *bank*, therefore it only
  returns half of the total Flash size on dual bank devices.

This mismatch causes issues with the DISCONTINUOUS_BANKS logic below,
incorrectly matching partitions close to the end of the first bank as
appearing to span both and triggering the "range overlaps discontinuity"
check later.

Fix it by doubling the size when appropriate, in the same way it is
already done for the M4 core.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-05-23 11:04:15 +02:00
Emil Lindqvist
65b7470972 hwinfo: stm32: reverse device id byte order to match v4.1 order
Reverse back the device id byte order to the way it was in v4.1 to
return the same device id.

Signed-off-by: Emil Lindqvist <emil@lindq.gr>
2025-05-23 11:04:10 +02:00
Ayush Singh
4c3491d8a4 drivers: i2c: omap: Fix for RAM MMIO
- RAM MMIO is initialized using DEVICE_MMIO_MAP. So add it to init code.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-05-23 11:04:00 +02:00
Ayush Singh
d4ee678fe3 drivers: i2c: omap: Use non-named mmio macros
- Since only one mmio region is used, use the non-named macros

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-05-23 11:04:00 +02:00
Ayush Singh
9db744ba06 drivers: i2c: omap: Use DEVICE_MMIO macro for registers
- Use DEVICE_MMIO_* macros for getting the registers.
- These macros automatically used the proper RAM/ROM address.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-05-23 11:04:00 +02:00
Sven Ginka
3239544e60 board: sensry: sy1xx: default slew-rate for rgmii interface
Set default slew-rate of tx pins of rgmii interfaces to 16pf.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
2025-05-23 11:03:41 +02:00
Sven Ginka
70ea3b115d drivers: pinctrl: added slew-rate setting for the sy1xx soc
With this commit we have the option to set the pad slew-rates
for all available pins on the soc.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
2025-05-23 11:03:41 +02:00
Jaro Van Landschoot
79f5575f46 tests: drivers: build_all: audio: add pcm1681 to tests
Add an spi overlay for the audio build_all tests.
Add the pcm1681 to both i2c and spi overlays.

Signed-off-by: Jaro Van Landschoot <jaro.vanlandschoot@basalte.be>
2025-05-23 11:03:32 +02:00
Jaro Van Landschoot
219770df71 drivers: audio: pcm1681: add driver
Add a basic driver for the PCM1681 and PCM1681-Q1 DAC

Signed-off-by: Jaro Van Landschoot <jaro.vanlandschoot@basalte.be>
2025-05-23 11:03:32 +02:00
Stoyan Bogdanov
58431564e1 dts: arm: ti: cc23x0: Add LGPT support
Add support for LGPT0, LGPT1, LGPT2 and LGPT3 to cc23x0 SoC.

Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
2025-05-23 11:03:24 +02:00
Stoyan Bogdanov
cfe7a58a28 drivers: counter: Add support for cc23x0 LGPT
Add support for LGPT0, LGPT1, LGPT2 and LGPT3 to cc23x0 SoC.

Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
2025-05-23 11:03:24 +02:00
Yishai Jaffe
fc56305c2f drivers: display: st7567: add display_clear support
Add support for `display_clear` API to the st7567 display.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2025-05-23 09:37:58 +02:00
Yishai Jaffe
bdb69c4afd drivers: display: ls0xx: add display_clear support
Add support for `display_clear` API to the Sharp display.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2025-05-23 09:37:48 +02:00
Yishai Jaffe
1d4a0fe8c0 bindings: sensor: si7006: fix title
Added the Si7020 support to the bindings title as stated in the
description

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2025-05-23 09:37:38 +02:00
Markus Lassila
28e40128aa modem_cellular: Close carrier with suspend
Fix regression introduced by dormant state, where the
carrier does not get closed when Cellular Modem driver
is suspended.

Signed-off-by: Markus Lassila <markus.lassila@nordicsemi.no>
2025-05-23 09:37:29 +02:00
Veijo Pesonen
68f8c1b256 toolchain: gcc: ramfunc with Clang
With Clang you can't set long_call attribute on function basis. Instead
of converting all calls to long calls let the linker create veneers when
necessary.

Signed-off-by: Veijo Pesonen <veijo.pesonen@alifsemi.com>
2025-05-23 09:37:16 +02:00
Chun-Chieh Li
35cf9ada0e modules: hal_ethos_u: fix failure to override ETHOSU_TARGET_NPU_CONFIG
This fixes failure to override ETHOSU_TARGET_NPU_CONFIG in hal_ethos_u
due to CMP0126 not being NEW. See:
https://cmake.org/cmake/help/latest/policy/CMP0126.html#policy:CMP0126

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2025-05-23 09:37:07 +02:00
Erwan Gouriou
30c441bc21 west.yml: Update hal_stm32 for new signals in -pcintrl.dtsi
Mostly ETH,SAI pins on MP13 and HSPI pins on STM32U5.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-05-23 09:36:58 +02:00
Chris Friedt
d61a7a80ad sys: timeutil: check for 32-bit time_t to avoid warning
A warning was propogated to error when building for
native_sim/native.

```
timeutil.h:519:17: error: result of comparison of constant \
  -9223372036854775808 with expression of type '__time_t' (aka 'long') \
  is always false [-Werror,-Wtautological-constant-out-of-range-compare]
```

This is due to the issue described in #90029.

Add workarounds for `timespec_to_timeout()` and `timespec_negate()`
until 90029 is resolved.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-05-23 09:36:41 +02:00
Duy Nguyen
f77e258cb9 cmake: Set RX build use 64bit doubles as default
The RX floating-point hardware only works on 32-bit values
so default gcc will build doubles as 32-bit, this make many
test fail on RX build test.
This commit force the build for RX arch to use 64-bit doubles
FPU will be supported later on this arch

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2025-05-22 23:57:26 +02:00
Chris Friedt
8a5c744213 posix: timers: use newly added timespec util functions
Use the newly added timespec util functions to manipulate and
compare timespec structures with overflow detection.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-05-22 23:57:17 +02:00
Chris Friedt
03099f30da doc: kernel: timeutil: add documentation for timespec apis
Add documentation in the timeutil group for recently added functions
for validating, comparing, and manipulating `struct timespec`
objects as well as functions for converting between representation
of time durations as either `struct timespec` or `k_timeout_t`.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-05-22 23:57:17 +02:00
Chris Friedt
13fe95b51d tests: lib: timeutil: add timespec util testsuite
Add a timespec util testsuite. This should have reasonably high enough
coverage to be useful.

I would have preferred to add this as an architecture-independent
unit test (for the unit_testing platform) under tests/unit/timeutil but
there is an inconsistency about the size of time_t on the unit_testing
and native_sim/native platforms. On every other platform supported by
Zephyr, time_t is 64-bits. However, on those platforms, time_t is only
32-bits.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-05-22 23:57:17 +02:00
Chris Friedt
21b8bd1ba1 sys: timeutil: add utility functions for struct timespec
Add a number of utility functions for manipulating struct timespec.

* timespec_add()
* timespec_compare()
* timespec_equal()
* timespec_is_valid()
* timespec_negate()
* timespec_normalize()
* timespec_sub()
* timespec_from_timeout()
* timespec_to_timeout()

If the `__builtin_add_overflow()` function is available, then the
API is mostly branchless, which should provide decent performance on
systems with an instruction cache and branch prediction. Otherwise,
manually written alternatives exist that are also perhaps more
readable.

The two functions at the end convert time durations between
representation as `struct timespec` and `k_timeout_t`.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-05-22 23:57:17 +02:00
Chris Friedt
246c65bfe9 timeutil: correct position of doxygen end-group comment
swap the relative position of the __cplusplus closing
bracket and the doxygen end-group comment.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-05-22 23:57:17 +02:00
Yuval Peress
6c73b5813f i2c: npcx: Loosen requirements for target registration
Allow NPCX_I2C_ERROR_RECOVERY as a valid state when registering a
target.

Signed-off-by: Yuval Peress <peress@google.com>
2025-05-22 23:57:08 +02:00
Yuval Peress
270c98bc23 i2c: npcx: Improve error logging
Add the device name to the error logs so we can differentiate which
device caused the error and not just which port.

Signed-off-by: Yuval Peress <peress@google.com>
2025-05-22 23:57:08 +02:00
Yuval Peress
27f6bc861c i2c: npcx: Remove erroneous debug messages
When enabling I2C debug logging these messages make it impossible to
see what's going on.

Signed-off-by: Yuval Peress <peress@google.com>
2025-05-22 23:57:08 +02:00
Andriy Gelman
b78fb2c39d kernel/init: Corrected a typo
"bot region" should read "boot region".

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2025-05-22 23:56:59 +02:00
Nazar Palamar
4c822b7e03 soc: modifications for cyw920829m2evk_02 power configuration
Added possibility to configure buck regulators according to
power profile.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2025-05-22 23:56:48 +02:00
Joel Holdsworth
8b5fe624e2 include: usb_ch9: ensure packing of usb_setup_packet
struct usb_setup_packet represents the setup data payload of a USB control
message which is exactly 8-bytes in length.

On a legacy build of GCC 4.1.2 for an OpenRISC-like architecture it was
found that the compiler added padding after the bmRequestType anonymous
union, and subsequently the bRequest field causing the structure to be
padded to 12-bytes in length with the fields incorrectly laid out.

This patch corrects the issue by applying the __packed attribute to the
anonymous union. This corrects the issue.

The __packed attribute is also applied to the outer structure for the sake
of consistency.

Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
2025-05-22 20:57:47 +02:00
Joel Holdsworth
39916042d1 code_relocation: use booleans for string_create_helper arguments
The string_create_helper function has the arguments: load_address_in_flash
and is_copy. These arguments take logical values, but previously the
calling code used 1 and 0 rather than the more idiomatic True and False.

This patch corrects the issue by replacing use of int values with bool
values.

Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
2025-05-22 20:57:39 +02:00
Joel Holdsworth
f7332da62e code_relocation: improve code conciseness
This patch makes various simplifications to the code structure which make
it more concise by reducing repetition.

Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
2025-05-22 20:57:39 +02:00
Joel Holdsworth
33d9961f56 code_relocation: use named fields in string templates
Previously the script used templates where the fields were identified by
numeric ordinal-identified placeholders. This makes the code hard to read
because it is hard to tell which string corresponds to which placeholder
in the substitution.

This patch corrects the issue by replacing the ordinal placeholders with
named placeholders.

Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
2025-05-22 20:57:39 +02:00
Joel Holdsworth
567984c12e code_relocation: fix ruff UP037 warnings
In Python, type annotations can be quoted to avoid forward references.

However, if "from __future__ import annotations" is present, Python will
always evaluate type annotations in a deferred manner, making the quotes
unnecessary.

The ruff python linter produces UP037 warnings to indicate cases where
quoting of type annotations can be removed. This patch corrects the
warnings.

Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
2025-05-22 20:57:39 +02:00
Joel Holdsworth
8ee466337e code_relocation: fix ruff UP006 and UP035 warnings
PEP585 enabled collections in the Python standard library (like tuple) to
be used as generic type annotations directly, instead of importing
analogous members from the typing module (like typing.Tuple).

The ruff python linter produces a UP006 warning if the deprecated type
annotations continue to be used.

This patch corrects the issue by correcting the single instance where
PEP585-style type annotations can be used.

Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
2025-05-22 20:57:39 +02:00
Joel Holdsworth
6ede0d5bc1 code_relocation: fix ruff SUM401 warning
The ruff python linter produces a SIM401 warning when a dictionary is
accessed using if-statements to check for key presence. In this case, the
dict.get() method could be used instead.

For example:

    value = foo["bar"] if "bar" in foo else 0

...can be replaced with:

    value = foo.get("bar", 0)

This patch corrects the single instance of this issue in the script.

Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
2025-05-22 20:57:39 +02:00
Joel Holdsworth
f4c54fcb93 code_relocation: fix ruff SIM102 warning
The ruff python linter produces a SIM102 warning when there are nested if
statements which can be collapsed into a single if statement:

    if foo:
        if bar:
	    ...

...becomes...

    if foo and bar:
        ...

This patch corrects the single instance of this issue in the script.

Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
2025-05-22 20:57:39 +02:00
Joel Holdsworth
3db20541de code_relocation: fix ruff I001 warning
The ruff python linter produces a I001 warning when the imports of a Python
script are not sorted. This patch corrects the issue by sorting them.

Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
2025-05-22 20:57:39 +02:00
Joel Holdsworth
8a8b42be8c code_relocation: combine typing imports onto a single line
The script can be made more concise by combining the imports of three
classes from the typing module into a single line.

Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
2025-05-22 20:57:39 +02:00