Commit graph

94271 commits

Author SHA1 Message Date
Al Semjonovs 023248a1f3 shell: Add test for custom shell macros
Verify customized shell macro APIs

Signed-off-by: Al Semjonovs <asemjonovs@google.com>
2024-04-24 16:04:03 -04:00
Al Semjonovs 0bca04635d shell: Allow extension of shell APIs
Similar to logging module, allow application specific extension of
shell fprintf APIs at a macro level.

Signed-off-by: Al Semjonovs <asemjonovs@google.com>
2024-04-24 16:04:03 -04:00
Yong Cong Sin 30b122b3f0 arch: riscv: print callee-saved-registers in fatal error
Print callee-saved registers during fatal error
to help with debugging.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-04-24 15:57:40 -04:00
Jeff Daly 7e0a334060 drivers: sensor: ntc_thermistor: Add Murata NCP15XH103
Murata NCP15XH103 compensation table added.

Signed-off-by: Jeff Daly <jeffd@silicom-usa.com>
2024-04-24 15:56:23 -04:00
Daniel Schultz 5dbfbbcca2 dts: arm: ti: am62x_m4: Remove address-cells from gpio
An address-cells definition is not required for the gpio
node and therefore should be removed.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-04-24 15:56:01 -04:00
Daniel Schultz 43a600e40d board: phytec: Add phyBOARD-Electra
Add PHYTEC's phyBOARD-Electra kit with the phyCORE-AM64x
System on Module (SOM).

This board only supports the M4F core, UART and GPIO right now,
since other drivers are still missing.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-04-24 15:56:01 -04:00
Daniel Schultz d30cbe999a dts: arm: ti: Add dtsi for AM64x M4
This file is basically a copy of the AM62x M4 dtsi but an
additional mcu_uart1 interface.

The internal clock frequency feeded into the UART IP is
96 MHz instead of 48 MHz, which is different to the AM62x.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-04-24 15:56:01 -04:00
Daniel Schultz 59de472dab dts: arm: ti: am62x_m4: Use DT_FREQ_x fpr frequenies
We define two frequencies in the am62x_m4.dtsi file.

Use DT_FREQ_M for both frequency to make them more
human-readable and easier to understand.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-04-24 15:56:01 -04:00
Daniel Schultz 145e17d1c9 soc: ti: k3: Add support for AM6442
The AM64x and AM62x are both SOCs from the TI K3 family
and share common architecture designs. The M4F subsystem
is actuall identical on both SOCs.

Therefore, just add all missing CONFIGs, files, etc. to
support the AM6442x SOC.

Since MMR and RAT initialization are identical too, both
functions can be re-used. However, since they might
differ in the future, the am64x has it's own init
function.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-04-24 15:56:01 -04:00
Julien Vermillard b52f041172 boards: esp32: axp192, mpu6886, rtc on m5stickc_plus
- fix i2c pin control
- configure axp192 MPU and the regulators
- configure the mpu6886 IMU
- configure the bm856 RTC

Signed-off-by: Julien Vermillard <julien@vermillard.com>
2024-04-24 15:55:44 -04:00
Anas Nashif 571d7b4ca7 tests: fuel_gauge: fixed filtering
Use platform key to filter out non emulation platforms before running
cmake.

Fixes #71870

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-04-24 15:55:29 -04:00
Dominik Ermel 22a7d2d8fb drivers/flash_simulator: Fix FLASH_SIMULATOR_DOUBLE_WRITES help
Fix incorrect note that write only allows to change value of
bit to zero, where proper information is that change is only allowed
from erase-value to the opposite.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-04-24 19:42:44 +00:00
Dominik Ermel 8b109b6649 drivers/flash_simulator: Fix write for 0x00 erase value
The commit adds missing binary or in write operation.
Assuming that program-erase devices only allow switching bits
from erase-value to opposite, in case of 0x00 erase value device
only ones can be written.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-04-24 19:42:44 +00:00
Dominik Ermel a14c69a52a dts/bindings/flash_simulator: Restrict erase-value
The commit restricts erase-value to either 0xff or 0x00.
On program-erase type devices writes can only change from
erase value of bit to opposite, ease usually consists of two
operations which is programming the opposite value to every bit
of erase range and then turning back all bits to the "erase-value";
above makes it impossible to have erase value of device to be other
than 0xff or 0x00.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-04-24 19:42:44 +00:00
Joakim Andersson 24264ad4af shell: Improve the default serial backend init level
Improve the default serial backend init level.
The documentation says to be bigger than the init level of the serial
device used. Since serial devices default to the kernel device init
level (50) then put this to default of application level drivers (90).

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-04-24 19:42:23 +00:00
Erwan Gouriou f71c7f21f4 boards: st: stm32h573i_dk: Enable sdmmc support
Configure SDMMC port on stm32h573i_dk.
Disable SDMMC clock check as using 48MHz is not strictly required.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-04-24 19:41:09 +00:00
Erwan Gouriou 58a9f9f528 drivers: disk: sdmmc_stm2: Add HWFC support on stm32h5
Hardware flow control is available also on stm32h5.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-04-24 19:41:09 +00:00
Erwan Gouriou a6f94f65a0 dts: stm32h5: Add SDMMC nodes
Add sdmmc1 and sdmmc2 nodes descriptions for STM32H5 SoCs.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-04-24 19:41:09 +00:00
Alvis Sun 629bfd9f9f drivers: i3c: i3c_shell: add alphabetical order constraint
Add /* zephyr-keep-sorted-start */ around DT_FOREACH_STATUS_OKAY.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-04-24 19:40:28 +00:00
Alvis Sun 5d33a4cffe drivers: i3c: i3c_shell: add nuvoton_npcx_i3c compat macro to i3c_shell.
As titile.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-04-24 19:40:28 +00:00
Alvis Sun c6763bd2ca drivers: i3c: npcx: introduce NPCX I3C driver
This implements basic driver to utilize the I3C IP block
on NPCX.

1. I3C mode: Main controller mode only.
2. Transfer: Support SDR only.
3. IBI: Support Hot-Join, IBI(MDB).
   Controller request is not supported.
4. Support 3 I3C modules:
   I3C1(3.3V), I3C2(1.8V, espi mode), (I3C3 1.8V or 3.3V)

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-04-24 19:40:28 +00:00
Alvis Sun a3cd76b6f2 drivers: i3c: update i3c_dev_list_daa_addr_helper()
During DAA, the responding device might not be in the device list.
This CL adds target device descriptor's pointer checking to prevent
getting unexpected results.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-04-24 19:40:28 +00:00
Alvis Sun cd91bf72bf boards: nuvoton: npcx4m8f_evb: add i3c pinctrl
Add I3C pinmux configuration.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-04-24 19:40:28 +00:00
Alvis Sun 18f6a541f2 dts: arm: nuvoton: add I3C device nodes
Add I3C device nodes.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-04-24 19:40:28 +00:00
Alvis Sun 3ed5f8a948 drivers: clock_control: npcx: add MCLKD as i3c source clock
1. The only valid values of MCLKD clock frequency
   are between 40Mhz to 50Mhz.
2. If DMA is used, the APB4_CLK clock frequency must
   be equal to or higher than 20Mhz.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-04-24 19:40:28 +00:00
Ren Chen 9b8550a24a ite/it8xxx2: avoid cpu entering deep doze mode when JTAG is enabled
Prevent the CPU from entering deep doze mode when JTAG debug is enabled.
Additionally, The CPU address from 0x80000800 to 0x800008FF should be
reserved for JTAG debug usage. This commit reserves the area from the end
of the reset section to 0x800008FF if JTAG debug is enabled.

Tested with:
- west build -p always -b it82xx2_evb samples/hello_world/
       -DCONFIG_SOC_IT8XXX2_JTAG_DEBUG_INTERFACE=y

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-04-24 19:40:07 +00:00
Hake Huang d16b4ab103 test: mcux_acmp: remove hwv1 overlay which conflicts with hwv2
remove the hwv1 config and use hwv2 only

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-04-24 15:05:01 -04:00
Henrik Brix Andersen 9312f2e987 tests: drivers: can: api: use common test setup function
Use a common test setup function between the classic and CAN FD test
suites.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-04-24 15:02:55 -04:00
Vinayak Kariappa Chettimada 2329a2f0a1 Bluetooth: Controller: Aux offset population assertion check
Add aux offset population assertion check, to ensure the
aux offset calculation is completed before the primary
PDU is setup for transmission.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-04-24 15:02:28 -04:00
François Baldassari dcb974a9df Can: mcan: Uninitialized access in state_change_handler
Found via static analysis. In `can_mcan_state_change_handler`, the
return value of `can_mcan_get_state` is not checked for error. In the
event of an error, both `err_cnt` and `state` are left unitialized and
accessed downstream.

The correct behavior is to return early in that case.

Signed-off-by: François Baldassari <francois@memfault.com>
2024-04-24 15:01:59 -04:00
Aleksandr Khromykh fe13209eb1 Bluetooth: Mesh: fix start rx transaction before tx is ended
Commit fixes behavior when provisioning protocol accepts
incoming transaction before ongoing tx transaction is
still active (device didn't receive acknowledgement yet).
Incoming data are ignored until ack is not received.

Specification:
5.3.3 Generic Provisioning behavior
...
If the sender receives a Transaction Acknowledgement
message, then the transaction has completed.
If the sender receives a message with other PDU types,
then the message shall be ignored.
...

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2024-04-24 15:01:43 -04:00
Tomi Fontanilles b98769ea41 samples: gnss: improve logging
Report more information and do not use `dev->name` so that what the
sample prints looks less similar to the GNSS dump logs.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-04-24 15:00:10 -04:00
Tomi Fontanilles b4c8d47536 drivers: gnss: nmea_generic: some fixes/improvements
- Configure a UART TX buffer; the backend would otherwise assert in
its configuration or (if the asserts are off) miserably fail when
trying to send anything to the GNSS modem.
- Fine tune the UART RX buffer size and make it depend on whether
satellite data is received.
- Remove unused k_spinlock.
- Make declaration of Kconfig items dependent on GNSS_NMEA_GENERIC
conditional.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-04-24 15:00:10 -04:00
Tomi Fontanilles 21efdc23c9 drivers: gnss: nmea_generic: implement basic power management
As of now only the resume action is supported, and doesn't perform
any power action on the GNSS modem.
It allows to initialize the GNSS driver later than it would otherwise
be.

Also, the driver now runs a modem-specific chat script on resumption.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-04-24 15:00:10 -04:00
Tomi Fontanilles a986905df5 modem: chat: implement helper defines/structs
Those helpers allow to define some typical kinds of chat matches and
scripts with more ease/less boilerplate.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-04-24 15:00:10 -04:00
Carles Cufi d20889d26f arm: irq: Disable clang warning on VFP clobbering
Clang warns the user whenever an ISR invokes a function that is not
marked with the `interrupt` attribute. This applies to the whole call
chain, which makes it unfeasible to add the attribute to add it to all
functions.

Instead, disable the clang warning just like it was done for the
equivalent GCC one in 5b3f80094e.

See also:
https://reviews.llvm.org/D28820

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-04-24 14:59:19 -04:00
Benjamin Cabé e01e1800ec ci: github: bump brcrista/summarize-issues version
bump brcrista/summarize-issues from 3 to 4

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-24 14:57:32 -04:00
Benjamin Cabé c5b4e57446 ci: github: bump aws-actions/configure-aws-credentials version
Bump aws-actions/configure-aws-credentials from 2 to 4.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-24 14:57:32 -04:00
Benjamin Cabé 2df4cce71e ci: github: bump tj-actions/changed-files version
Bump tj-actions/changed-files to v44.
As of v42, input file patterns that end with a / now match all sub-files
within the directory without requiring to specify the globstar pattern.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-24 14:57:32 -04:00
Benjamin Cabé c00ecd33f1 ci: github: bump dawidd6/action-download-artifact version
Bump dawidd6/action-download-artifact to v3

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-24 14:57:32 -04:00
Richard Wheatley 54bd261e8c tests: drivers: rtc: rtc_api
Check for EINVAL on rollover test

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-04-24 14:57:02 -04:00
Benjamin Cabé 728abd8645 doc: boards: esp32: fix wrong link in M5Stack-Core2 docs
fix link to core2 main doc page (was pointing to StickC-Plus)

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-24 14:56:18 -04:00
Dominik Ermel c007e717d4 mcumgr/img_mgmt: Fix zcbor logic in os_mgmt_bootloader_info
There have been to problems with the code where zcbor_bool_encode
has been fed value instead of expected pointer and the result
of previous zcbor_encode operations has not been taken to evaluate
value of ok status.
The change also replaces usage of  #if IS_ENABLED with #ifdef, as
IS_ENABLED should not be used outside if().

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-04-24 14:55:57 -04:00
Jamie McCrae 23551eb05a cmake: boards: Fix missing board name
Fixes an issue whereby the board name was missing

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-24 14:55:18 -04:00
Henrik Brix Andersen 1327ff92f5 tests: drivers: can: timing: reintroduce overlays for native 64 bit
Reintroduce the overlays for native_sim/native/64 and
native_posix/native/64 to verify all bitrates on those platforms.

These were removed in fddbd79cf7.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-04-24 14:54:45 -04:00
Mikhail Siomin 4b276c4962 drivers: can: stm32_bxcan: fix CAN mailbox overwrite
Fixes overwriting a mailbox before sending it completes.
Overwriting can occur when one thread has waited for
another thread to complete the send function and
fills a mailbox selected based on
the transmit_status_register variable,
which has not been updated after waiting and,
accordingly, does not contain up-to-date information
about the mailboxes used.

Signed-off-by: Mikhail Siomin <victorovich.01@mail.ru>
2024-04-24 10:56:33 -04:00
Erwan Gouriou a33f9d25f0 MAINTAINERS: shields: Handover maintainership
I no longer have time to do my due diligence on shields subsystem.
Glad to handover to @kartben who has been active on the area since
almost a year now.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-04-24 10:02:38 -04:00
Marcin Szymczyk 6a80a52b6c boards: nordic: nrf54l15pdk: remove redundant Kconfig
`RISCV_ALWAYS_SWITCH_TRHOUGH_ECALL` is already enabled in SoC defconfig.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-04-24 13:45:44 +00:00
Lukasz Mrugala ef792d1b9a scripts: twister: Fix duplicate scans
If the src_dir_path is a child of testsuite_path,
some c files might be scanned twice.

To prevent that, we check for parentage.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-04-24 09:34:32 -04:00
Fin Maaß 3ba4c98a1d ci: fix broken microsoft repo
temporary fix broken microsoft repo

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-04-24 20:01:08 +09:00