Commit graph

92202 commits

Author SHA1 Message Date
Declan Snyder 17ab3d5deb drivers: gpio: mcux_lpc: Support MCI_IO_MUX
Support MCI_IO_MUX pinctrl in LPC GPIO driver

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Co-authored-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-03-13 16:45:13 +00:00
Declan Snyder 6f4cf5c73c drivers: pinctrl: Add RW pinctrl driver
Add pinctrl driver for NXP RW6XX chip.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Co-authored-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-03-13 16:45:13 +00:00
Kanak Shilledar 24a12802a5 MAINTAINERS: list soc and board files in RISCV Arch
added files for VisionFive 2 board and JH7110 SoC under the
RISCV Arch area.

Signed-off-by: Kanak Shilledar <kanakshilledar111@protonmail.com>
2024-03-13 11:39:51 -05:00
Pratik Farkase 5e346f553d boards: starfive: add visionfive2 board
these list of patches add support the Starfive Visionfive2
SBC based on the JH7110 SoC. Board identifier is `visionfive2`.

Signed-off-by: Kanak Shilledar <kanakshilledar111@protonmail.com>
Signed-off-by: Pratik Farkase <pratik.farkase@wsisweden.com>
2024-03-13 11:39:51 -05:00
Pratik Farkase 2b4ce8b3bb soc: starfive: jh71xx: add jh7110 soc support
These list of files add Kconfig support for
Starfive JH7110 SOC support.

Signed-off-by: Pratik Farkase <pratik.farkase@wsisweden.com>
2024-03-13 11:39:51 -05:00
Pratik Farkase 7679b8e6b4 dts: riscv: starfive: add DT includes for JH7110 SOC
These list of files add basic support for StarFive
JH7110 SOC Device Tree includes for VisionFive2
board.

Signed-off-by: Pratik Farkase <pratik.farkase@wsisweden.com>
2024-03-13 11:39:51 -05:00
Glenn Andrews 2f691ad8de Driver Input: FT5336 reports touch pressed on no touches
See https://github.com/zephyrproject-rtos/zephyr/discussions/69997

The driver thinks that when there are zero touches, the screen is
pressed. This changes it so zero touches mean the screen is not
pressed.

Also, multi-touch is now considered a single touch, and the
TOUCH_ID is checked so that only valid touches are registered.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-03-13 11:39:19 -05:00
Seppo Takalo 8a38ff7161 net: lwm2m: Handle empty URI
On some content-types, it might be impossible to
send strings with size of zero.
Therefore empty URI should also allow cases
where strlen() is zero.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-03-13 11:37:54 -05:00
Eve Redero 4809491b26 boards: st: st25dv_mb1283_disco: add mb1283 board
ST25DV discovery kit, including an LCD color screen.
ST25 support not included.

Signed-off-by: Eve Redero <eve.redero@gmail.com>
2024-03-13 09:50:26 -05:00
Lucas Denefle 08aa504e66 modem: modem_cellular: increase imsi size
Fixes an issue introduced with `080d51bb`

Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
2024-03-13 09:46:38 -05:00
Lucas Denefle b287ad70f8 modem: modem_cellular: increase imei size
Fixes an issue introduced with `b668296a`

Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
2024-03-13 09:46:38 -05:00
Lucas Denefle fe4f002eef modem: modem_cellular: increase model_id size
Fixes an issue introduced with `08a51bae`

Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
2024-03-13 09:46:38 -05:00
Lucas Denefle c36b1039be modem: modem_cellular: increase manufacturer size
Fixes an issue introduced with `ae951f5f`

Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
2024-03-13 09:46:38 -05:00
Lucas Denefle 4cd0dee7cc modem: modem_cellular: increase fw_version size
Fixes an issue introduced with `adcdf64a`

Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
2024-03-13 09:46:38 -05:00
Gerson Fernando Budke 8303b3dab0 tests: i2s: sam: Add missing overlays
Add missing overlays files to allow I2S tests pass on ci.

Fixes #69936

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2024-03-13 10:41:52 -04:00
Jukka Rissanen c6e482714f MAINTAINERS: Add maass-hamburg as DHCPv4 collaborator
Adding Fin Maaß <f.maass@vogl-electronic.com> (maass-hamburg) as
a collaborator to the DHCPv4.

Related PR #69992

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-13 07:41:43 -05:00
Christopher Friedt 9a0b8e7809 posix: sysconf: use Z_SC_VAL_IFDEF for sysconf constants
Previously, CONFIG_MAX_TIMER_COUNT and CONFIG_MSG_COUNT_MAX were
used without checking if CONFIG_TIMER and CONFIG_POSIX_MQUEUE
were enabled.

Use Z_SC_VAL_IFDEF() to conditionally define those constants
based on their gating Kconfig values, otherwise, they are defined
to -1.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-03-13 20:00:49 +08:00
Vinayak Kariappa Chettimada cd6674f7c2 samples: Bluetooth: Broadcast audio sink USB headset on nRF52 Series
Broadcast audio sink USB headset on nRF52 Series with USB
support.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-03-13 12:33:20 +01:00
Vinayak Kariappa Chettimada bd5e906f68 Bluetooth: Controller: Fix assertion establishing periodic sync
When the AUX_ADV_IND and AUX_SYNC_IND are close to each
other, the duration between them is not sufficient to
schedule a new instance of ticker to establish
synchronization. This processing time introduces latencies
detected by the prepare callback.

When the sync offset is low, schedule the start of the
reception to next periodic interval.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-03-13 12:33:08 +01:00
Vinayak Kariappa Chettimada 11bae5cfa9 Bluetooth: Controller: Fix missing radio timer comp and range delay
Fix missing PPI to timer start compensation and missing
inclusion of range delay in the calculation of packet
header receive timeout value.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-03-13 12:32:54 +01:00
Vinayak Kariappa Chettimada 92ad509902 Bluetooth: Controller: Fix ext adv param checking intervals
Fix Extended Advertising Parameter check to exclude legacy
high duty cycle directed advertising from validating the
intervals as advertising interval parameter values are not
applicable for high duty cycle directed advertising.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-03-13 12:32:40 +01:00
Marc Herbert 251f52cbce list_hardware.py: sort rglob(SOC_YML) HWMv2 results
This makes .config, autoconf.h, and configs.c deterministic again.

Directory listing is not deterministic, it must always be sorted.
https://reproducible-builds.org/docs/stable-inputs/

Fixes commit 61bbfb5ba25f ("scripts: introduce list_hardware.py for
listing of architectures and SoCs") in collab-hwm branch which was
squashed in mega HWMv2 commit 8dc3f85622 ("hwmv2: Introduce Hardware
model version 2 and convert devices")

SOF CI builds with both Windows and Linux and compares the outputs. This
catches practically 100% of build reproducibility issues and caught this
one too:

 https://github.com/thesofproject/sof/actions/runs/8241692987/job/22539664560

HWMv2 was a "big bang" integration on both the Zephyr and SOF sides. So
this `rglob()` was a needle in a haystack but with hindsight, this issue
is really trivial to reproduce and verify:

```
apt-get install disorderfs
mkdir disorderedWorkspace/
disorderfs --shuffle-dirents=yes  workspace/ disorderedWorkspace/
```

... then just build `samples/hello_world/` twice in disorderedWorkspace/
with any --board and compare the build directories.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-03-13 11:16:21 +00:00
Emil Gydesen 093ffdf117 Bluetooth: Host: Add NULL check for callback_list
If no callbacks have been registered then callback_list
is NULL, in which case we can skip searching.

This also fixes a NULL-pointer acces in the while loop
as previous_callback would be NULL when it gets
dereferenced as previous_callback->_next.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-03-13 11:16:06 +00:00
Laurentiu Mihalcea f91065b7c9 nxp: adsp: enable usage of DCACHE API
With the transition to HWMv2, `CONFIG_CPU_HAS_DCACHE` is no
longer selected. This causes issues with Sound Open Firmware
since this configuration allows the usage of DCACHE-related
cache management operations. As such, to fix said issues,
select `CONFIG_CPU_HAS_DCACHE` on all NXP ADSP SOCs.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-03-13 11:13:54 +00:00
Morten Priess a30795e1f6 Bluetooth: controller: Fixes for BIGinfo endianness issues
The BIGinfo PDU bitsets were not accessed in a portable maner for
endianness independence, and need to be handled as bit-manipulations.

Add utility functions to access PDU bitset variables independent of
endianness. Use macros to abstract the offsets and widths.

Conversion of BIG_Handle to LE in HCI layer incorrectly use
sys_cpu_to_le16, which fail because target type is 8-bit.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2024-03-13 11:13:17 +00:00
Yong Cong Sin 2262b294dd arch: riscv: introduce a Kconfig to mask mhartid
Configure a new Kconfig (`CONFIG_RISCV_HART_MASK`) so that it
is possible to mask the `mhartid` of a processor. This is
helpful in the cases when the hart id starts from non-zero
value.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-03-13 11:10:25 +00:00
Erwan Gouriou 15cb9bcab5 boards: st: stm32g0316: Use openocd as debug interface.
Default pyocd configuration doesn't allow debugging on this board.
Now that Zephyr openocd version support stm32g0 series, use it instead
of pyocd.
This commit provides working openocd configuration for this board
an update documentation.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-03-13 11:10:10 +00:00
Kamil Paszkiet c63ad6c915 scripts: tests: Blackbox test expansion - coverage
Adds tests related to coverage flags:
--coverage-tool
--coverage-basedir
--coverage-formats

Move to coverage.py:
--coverage
--enable-coverage

Signed-off-by: Kamil Paszkiet <kamilx.paszkiet@intel.com>
2024-03-13 11:09:59 +00:00
Francois Ramu 031cdfa23f soc: arm: stm32 with USB Type-C dead battery disabled if needed
Check the driver configuration to disable
the USB Type-C dead battery, only if
 - a USB PD system is in place (the UCPD node is enabled)
 - or the user does not require USB PHY anyway

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-03-13 11:09:44 +00:00
Anas Nashif 35176b993d twister: fix exception message
'Handling of handler...' is a bit weird to read.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-13 08:39:37 +01:00
Anas Nashif dbc3246723 tests: twister: use assert_called_with for multiple calls
Do not use assert_called_once_with, we can some functions more than once
and test should not prevent that.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-13 08:39:37 +01:00
Anas Nashif 6eb3c2e4c1 twister: harness: match exact charachters when we detect tests
Avoid detecting garbage.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-13 08:39:37 +01:00
Anas Nashif 233b2e1100 twister: handler: update missing status of failed tests
Some tests report no status even without timeout, so address this case
as well.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-13 08:39:37 +01:00
Marc Herbert 811a74c019 boards/Kconfig: $BOARD_REVISION -> $(BOARD_REVISION)
Add parentheses missing around $BOARD_REVISION.

The syntax without parentheses has been deprecated for at least 5 years:
https://github.com/ulfalizer/Kconfiglib/commit/374f48873424f9

That same documentation states "Using the old syntax with an undefined
environment variable keeps the string as is." This what actually happens
on Windows where `build/zephyr/.config` looks like this:

  CONFIG_BOARD_REVISION="$BOARD_REVISION"

I found this because the behavior differs on Linux where the same,
"old" syntax produces this instead:

  CONFIG_BOARD_REVISION=""

This could be because environment variables work differently?
(BOARD_REVISION is passed from kconfig.cmake to kconfiglib.py thanks to
cmake -E env)

Let's not try to debug this and just drop the deprecated syntax. It
aligns both Windows and Linux on the same, expected, empty string
behavior.

Note these are the only two `def_string` found across all Kconfig files
right now.

Fixes commit c11b7852d1 ("Kconfig: add CONFIG_BOARD_REVISION")
Fixes commit e2ff2a88ba ("sysbuild: include HWMv2 Kconfig in sysbuild")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-03-13 08:38:07 +01:00
TOKITA Hiroshi ba46cd006c dts: bindings: gpio: arduino-mkr-header: Correct wrong D9/SCK pin number
D9/SCK pin is #9 pin, not #0.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-03-12 20:22:12 -05:00
TaiJu Wu be9a85bf6c test: Remove multi level queue limit test
Set total priorities to 71.
This setting already exceeds original limit(32) and exceeds 64 to test
secondary bitmap.

Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
2024-03-12 19:37:40 -04:00
TaiJu Wu 1f5f0cf838 sched: Remove multi-level queue priority limit
Modified bitmask to  bitmask array, it can make multilevel queue remove
32 bit prioriry limit.

We can scan bitmask array to find which queue have ready thread.

Only need the number of queues as priority because the priority
is checked on create_thread.

Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
2024-03-12 19:37:40 -04:00
Fabio Baltieri a63b3d1de6 input: xec: use the generic keyboard code
Split the common keyboard scanning code out of the XEC specific driver
and use the generic code instead.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-03-12 19:30:09 -04:00
Fabio Baltieri ddd2cf1fdc input: convert kscan_mchp_xec.c driver to input
Convert the XEC keyboard scanning driver from kscan to input, add the
corresponding kscan compatibility node to the current board, build test
only.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-03-12 19:30:09 -04:00
Guillaume Gautier 3b50237699 drivers: adc: stm32: use correct macros for dma transfer
Use the correct dedicated macros for enabling DMA transfer for STM32H7 and
U5.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-03-12 19:28:54 -04:00
Guillaume Gautier 7aa5d33a94 include: zephyr: drivers: dma: stm32: Fix macro
Macro STM32_DMA_SLOT_BY_IDX should return 0 instead of nothing for
dma v2bis.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-03-12 19:28:54 -04:00
Guillaume Gautier 5d2558bdad drivers: adc: stm32: dma fixes
Add a blank define for the case where DMA channels are defined in ADC node
of the dts but STM32_ADC_DMA is not enabled. Otherwise compilation fails.
Also fix the way the DMA channel is configured by using a standard DT
macro, otherwise it doesn't work for dma-v2bis DMA types.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-03-12 19:28:54 -04:00
Fabio Baltieri d123a4571a input: kbd_matrix: define PRIkbdrow coherently
It's not supposed to have the "%" in the macro, reuse the existin one
for the data type.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-03-12 19:28:40 -04:00
Marc Herbert 03a79d6387 llext: elf.h: fix sign of the r_addend field of struct elf32_rela
The r_addend field is signed (it seems unused for now).

Fixes commit a9a82d557c ("llext: use elf_rela_t instead of elf_rel_t")

https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.reloc.html

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-03-12 19:28:18 -04:00
Marc Herbert 7eb1d3d57d llext: elf.h: fix wrong 32 bits length of elf64_rela fields
Fixes commit a9a82d557c ("llext: use elf_rela_t instead of elf_rel_t")

Also switch sign of (unused?) `r_addend` to unsigned.

https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.reloc.html

Issue found thanks to the following warnings when compiling in 64bits:

```
/__w/zephyr/zephyr/include/zephyr/llext/elf.h:349:29: error:
  right shift count >= width of type [-Werror=shift-count-overflow]
     349 | #define ELF64_R_SYM(i) ((i) >> 32)
```

The name `elf64_word` was admittedly confusing.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-03-12 19:28:18 -04:00
Marc Herbert 4ad9f90638 llext.c: fix logging of 64 bits pointers
Note `elf64_addr` and friends are defined as uint64_t which is defined
as `long long unsigned` which is for some reason different from
`size_t`. So they all require a cast.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-03-12 19:28:18 -04:00
Declan Snyder 3667526b83 boards: lpcxpresso55s69: Fix misnomer
pinmux.c is inaptly named since it has nothing to do with pinmux.
Also, remove inclusion of iocon.h since this file does not use it,
as this file has nothing to do with pinmux.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-12 21:26:48 +01:00
Robert Lubos 53561e3766 net: dns: Fix timeout calculation with DNS retransmissions
With recently introduced DNS retransmission mechanism, a certain bug
could occur when calculating query timeout.

If the time until the final DNS timeout (as indicated by
CONFIG_NET_SOCKETS_DNS_TIMEOUT) was less than 1 millisecond, the actual
millisecond timeout value was rounded down, resulting in 0 ms timeout.
This in order was interpreted as invalid argument by dns_get_addr_info()
function, so in result, instead of reporting query timeout, the function
reported invalid argument error.

Fix this by rounding the millisecond timeout up, instead of down, so
that in any case, if the final timeout is not due, we always provide
non-zero timeout to dns_get_addr_info().

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-03-12 15:13:31 -05:00
Flavio Ceolin 07426a800c intel_adsp/ace: power: Lock interruption when power gate fails
In case the core is not power gated, waiti will restore intlevel. In
this case we lock interruption after it.

In the bug scenario, the host starts streaming and via SOF APIs, keeps a
lock to prevent Zephyr from entering PM_STATE_RUNTIME_IDLE. During the
test case, host removes this block and core0 is allowed to enter IDLE
state.

When core0 enters power gated state, interrrupts are left enabled (so
the core can be woken up when something happens). This leaves a race
where suitably timed interrupt will actually block entry to power gated
state and k_cpu_idle() in power_gate_entry() will return. This is rare,
but happens often enough that the relatively short test plan run on SOF
pull-requests will trigger this case.

Fixes #69807

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-12 15:12:57 -05:00
Marc Herbert c15f029a71 init.h: restore designated initializers in SYS_INIT_NAMED()
As seen in the PR #68125 discussion, commit 19a33c7884 ("init: adjust
the SYS_INIT dev field init to play nice with older compilers") entirely
threw away designated initializers in SYS_INIT_NAMED() to avoid
compatibility issues across toolchains.

One key aspect that was probably missed at the time: C and C++ are two
different languages and this is especially true with respect to
designated initializers.

Designated initializers provide safer and more readable code, especially
in their much stricter C++ version. So use an #ifdef to restore them in
SYS_INIT_NAMED() thanks to a small braces difference between C and C++.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-03-12 15:12:37 -05:00