Commit graph

99443 commits

Author SHA1 Message Date
cyliang tw
5b921c53b0 soc: nuvoton: numaker: add poweroff for m46x
Add support of sys_poweroff API on m46x series.
It could support SPD standby or DPD deep power down mode.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-08-01 12:37:47 +02:00
Bjarki Arge Andreasen
371206d254 drivers: i2c: i2c_ll_stm32: Remove redundant last msg stop
The I2C API itself now enforces last msg stop, remove duplicate code
from driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-01 12:37:40 +02:00
Bjarki Arge Andreasen
3cc8350396 drivers: i2c: i2c_gd32: Remove redundant last msg stop
The I2C API itself now enforces last msg stop, remove duplicate code
from driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-01 12:37:40 +02:00
Bjarki Arge Andreasen
d8b49b0aa4 drivers: i2c: i2c_esp32: Remove redundant last msg stop
The I2C API itself now enforces last msg stop, remove duplicate code
from driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-01 12:37:40 +02:00
Bjarki Arge Andreasen
580bdafb81 drivers: i2c: i2c_dw: Remove redundant last msg stop
The I2C API itself now enforces last msg stop, remove duplicate code
from driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-01 12:37:40 +02:00
Bjarki Arge Andreasen
2b007ab784 drivers: i2c: enforce i2c stop flag in last i2c_transfer_cb msg
The i2c_transfer API specifies that the I2C_MSG_STOP flag implicitly
is set for the last message in a i2c_transfer(). This is identical to
explicitly setting the I2C_MSG_STOP flag in the last message, which is
what every driver which properly adheres to this specification does.

The i2c_transfer_cb API is seemingly identical to the i2c_transfer_api,
it references it using @see i2c_transfer(), while providing a callback,
and being available from isr context. This commit extends the wrapper
to provide the following guarantees also present in the i2c_transfer API:

- If num_msgs is 0, no transfer will occur
- The last message of the transfer implies a stop condition

This allows for users to use both functions interchangeably, while
removing handling of num_msgs = 0 and last message missing stop cond
from device drivers.

Additionally a check for num_msgs == 0 is added to prevent any transfer
and immediately call back with success then return without invoking
the transfer_cb API.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-01 12:37:40 +02:00
Bjarki Arge Andreasen
e7487f1777 drivers: i2c: enforce i2c stop flag in last i2c_transfer msg
The i2c_transfer API specifies that the I2C_MSG_STOP flag implicitly
is set for the last message in a i2c_transfer(). This is identical to
explicitly setting the I2C_MSG_STOP flag in the last message, which is
what every driver which properly adheres to this specification does.

This commit updates the i2c_transfer() API wrapper to explicitly set
the flag before calling the drivers API implementation, which ensures
the specification is followed, while moving this additional complexity
from the device drivers themselves.

Additinally it checks for the num_msgs being 0, in which case no
transfer shall occur, nor shall any stop condition be set. This removes
an additional check from device drivers.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-01 12:37:40 +02:00
Anke Xiao
bd7a6b5d79 samples: sensor: mcux_acmp: add acmp configuration for ke17z
Add acmp pinctrl configuration to support ACMP driver for NXP frdm_ke17z
and frdm_ke17z512, tested 'sample.sensor.mcux_acmp' case.
Update the index.rst to add acmp description for ke17z.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-01 12:37:23 +02:00
Anke Xiao
643e464c76 modules: Kconfig.mcux: remove HAS_MCUX_ACMP
Remove the ‘HAS_MCUX_ACMP’ Kconfig, and also remove it from
driver and soc Kconfig files. It is not needed since we already
depend on 'ACMP' enabled in the dt file, the 'HAS_MCUX_ACMP'
kconfig is a relic of the past before devicetree was stable.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-01 12:37:23 +02:00
Anke Xiao
d96b301de5 dts: arm: nxp: nxp_ke1xz.dtsi: add acmp information
Add acmp driver address and interrupt informations.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-01 12:37:23 +02:00
Francois Ramu
1c59fa5231 doc: release 3.6: no CACHE_MANAGEMENT by default on stm32h7/f7
Mentioning that stm32h7 and stm32F7 series do not have the
CONFIG_CACHE_MANAGEMENT by default. The application must
explicitly set CONFIG_CACHE_MANAGEMENT=y to activate
the cache (Icache, Dcache) on those stm32 series.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 12:37:14 +02:00
Manuel Aebischer
f1359dd9ed drivers: i2c_dw: Fixes #75463, interrupt routine for i2c target mode
When using the eeprom_target in 16-bit mode on rp2040, some issues in the
addressing have been observed where the read was executed before all writes
where finished.

Signed-off-by: Manuel Aebischer <manuel.aebischer@netmodule.com>
2024-08-01 12:37:05 +02:00
Francois Ramu
d0108b2673 drivers: udc: stm32 usb device controller in sleep mode
Force disabling the USB OTG HS and PHY clock during sleepmode
By default, that clock is enabled by clock gating during sleep
mode. Like stm32H7, it has to be kept running.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 12:36:58 +02:00
Francois Ramu
ac6bdffd01 drivers: udc: stm32 usb device controller clock and power
Special sequence to enable clock and power for the OTG HS
peripheral of the stm32U59x serie
This code is based on the stm32Cube HAL_HCD_MspInit/DeInit.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 12:36:58 +02:00
Francois Ramu
7a0c31c975 drivers: usb: stm32 usb device controller in sleep mode
Force disabling the USB OTG HS and PHY clock during sleepmode
By default, that clock is enabled by clock gating during sleep
mode. Like stm32H7, it has to be kept running.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 12:36:58 +02:00
Francois Ramu
06662fc5cc drivers: usb: stm32 usb device controller clock and power
Special sequence to enable clock and power for the OTG HS
peripheral of the stm32U59x serie
This code is based on the stm32Cube HAL_HCD_MspInit/DeInit.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 12:36:58 +02:00
Francois Ramu
edcc673d9d boards: st: stm32u5a9 disco kit has a OTG HS peripheral
Enable the USB OTG HS node of the stm32u5a9j_dk board

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 12:36:58 +02:00
Francois Ramu
e3f9293fc2 dts: arm: stm32u59x serie with OTG HS instance
Add the USB OTG HS node for the stm32U59x/5Ax/5Fx/5Gx devices

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 12:36:58 +02:00
Francois Ramu
ea6c5f0e85 drivers: usb: stm32 usb device controller correct USB PHY
Set the correct the phy_itface depending on the setting
Save few lines after resetting the priv->pcd structure
with the memset

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 12:36:58 +02:00
Armando Visconti
8bc00e1420 drivers/sensor: lis2dux12: fix mode when setting odr
In lis2dux12_set_odr(), the call to stmemsc module lis2dux12_mode_set()
API is done with the .fs field left uninitialized, so setting the
underlying device regs in an unproper way.

Suggested-by: Luis Ubieda <luisf@croxel.com>
Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-08-01 12:36:48 +02:00
Tim Lin
0980cc4390 drivers/interrupt: it8xxx2: Register interrupt number 0 to handle
In the it8xxx2 chip, the interrupt for INT0 is reserved. However,in some
stress tests, the unhandled IRQ0 issue occurs. To prevent the system from
going directly into kernel panic, we implemented a workaround by
registering interrupt number 0 and doing nothing in the IRQ0 handler.
The side effect of this solution is that when IRQ0 is triggered, it will
take some time to execute the routine. There is no need to worry about
missing interrupts because each IRQ's ISR is write-clear, and if the
status is not cleared, it will continue to trigger.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-08-01 12:36:23 +02:00
Tahsin Mutlugun
387239e667 tests: i2c: i2c_target_api: Add configuration for MAX32680EVKIT
Enable I2C target API tests for MAX32680EVKIT.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-01 12:36:14 +02:00
Furkan Akkiz
f3953351c7 tests: drivers: i2c: Add MAX32672EVKIT overlay file
Enable I2C test for MAX32672EVKIT.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-08-01 12:36:14 +02:00
Mert Ekren
3d4490caed tests: drivers: i2c: Add MAX32670EVKIT overlay file
Enable I2C test for MAX32670EVKIT.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-08-01 12:36:14 +02:00
Tahsin Mutlugun
e396ff82a1 tests: i2c: i2c_target_api: Add configuration for MAX32655EVKIT
Enable I2C target API tests for MAX32655EVKIT.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-01 12:36:14 +02:00
Tahsin Mutlugun
72381e5e90 boards: adi: Add I2C to MAX32680EVKIT board driver list
Add I2C into 'index.rst' and '.yaml' files.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-01 12:36:14 +02:00
Furkan Akkiz
793ae91cd5 boards: adi: Add I2C to MAX32672 boards driver list
Add I2C into 'index.rst' and '.yaml' file of MAX32672 boards.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-08-01 12:36:14 +02:00
Mert Ekren
6f4befe01c boards: adi: Add I2C to MAX32670EVKIT board driver list
Add I2C into 'index.rst' and '.yaml' files.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-08-01 12:36:14 +02:00
Tahsin Mutlugun
ad38831565 boards: adi: max32655: Enable I2C in MAX32655 boards
Now that I2C support has been added, include it in documentation and
YAML metadata for MAX32655FTHR and MAX32655EVKIT boards.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-01 12:36:14 +02:00
Marcin Niestroj
460b111fb4 drivers: wifi: esp_at: support listening UDP sockets in active mode
So far receving was possible in active mode, but IP and port information
was not fetched nor propagated to application layer. Support fetching that
information even in active mode, so that using bind() with recvfrom() is
working accordingly.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-01 12:36:07 +02:00
Marcin Niestroj
086ae6e84f drivers: wifi: esp_at: move socket allocation to cmd_ipd_parse_hdr()
This is just a step forward to make cmd_ipd_parse_hdr() capable of parsing
IP address and port when CONFIG_WIFI_ESP_AT_PASSIVE_MODE=n. After obtaining
this information (IP and port) it will be simply much easier to write this
information into 'struct esp_socket' directly, instead of passing to upper
layer.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-01 12:36:07 +02:00
Marcin Niestroj
0e11b68a32 drivers: wifi: esp_at: utilize esp_pull*() in cmd_ipd_parse_hdr()
Use common utilities for consuming parameters from AT response string.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-01 12:36:07 +02:00
Marcin Niestroj
d093783606 drivers: wifi: esp_at: handle ':' in esp_pull()
Treat ':' similar as ',', '\r' and '\n', so that AT response parameter
parsing can be gracefully stopped.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-01 12:36:07 +02:00
Marcin Niestroj
1caab70918 drivers: wifi: esp_at: introduce esp_pull_long() helper
Use it to get information about RSSI. In subsequent commits this helper
will be used to get other information as well.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-01 12:36:07 +02:00
Marcin Niestroj
806842b759 drivers: wifi: esp_at: s/ntohs/htons/ after parsing port number
'struct sockaddr_in' should contain port number in network byte order. This
means that htons() macro should be used, instead of ntohs().

This was working before since both htons() and ntohs() end up in calling
BSWAP_16().

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-01 12:36:07 +02:00
Jukka Rissanen
20a69f6dbf net: wifi: Add iterable_sections header file
This is related to change in commit dacb3dbfeb
("iterable_sections: move to specific header")

Until now iterable sections APIs have been part of the toolchain
(common) headers. They are not strictly related to a toolchain, they
just rely on linker providing support for sections. Most files relied on
indirect includes to access the API, now, it is included as needed.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-08-01 12:36:00 +02:00
Seppo Takalo
e86bdf952d net: lwm2m: Always emit DISCONNECTED event
When LwM2M engine is requested to stop,
emit the disconnected event unconditionally.
There is really no reason to skip the event
on network error, or if we have never been registered.

Fixes #76422

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-08-01 12:35:53 +02:00
Fabio Baltieri
60df679366 debug: thread_analyzer: fix incorrect k_thread_foreach_unlocked argument
Fix the second k_thread_foreach_unlocked argument, it's supposed to be
an instance of ta_cb_user_data as that's what's it casted back to in
thread_analyze_cb. Current code results in an exception and crash for
single core applications.

This is a regression introduced in 1b6e0f6479.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-01 12:35:45 +02:00
Daniel Leung
d2b072078d debug: thread_analyzer: fix casting pointer to int warning
In thread_analyzer_auto(), it casts one function argument
directly into unsigned int. However, on 64-bit platforms,
the compiler complains about casting from pointer of
different size (-Wpointer-to-int-cast). So cast it first to
uintptr_t before casting it into unsigned int.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-01 12:35:34 +02:00
Benjamin Cabé
704000eb58 ci: doc-build: compress HTML docs more efficiently
Compressing doc build to upload it to AWS S3 is talking several minutes.
Use -T0 to run xz in parallel mode to speed up the process.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-01 09:33:07 +01:00
Erwan Gouriou
ab850deb64 drivers: flash: stm32h7: Fix unused variable warning
This variable is only used under DUAL_BANK condition and a warning
is generated in !DUAL_BANK case, so move its definition accordingly.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-08-01 09:15:48 +01:00
Jordan Yates
6bbb2079f2 samples: usb: mass: filter by supported disk types
Some boards claim `sdhc` support but use the `zephyr,mmc-disk`
instead of `zephyr,sdmmc-disk` compatible, with the former not being
compatible with this sample.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-01 09:15:31 +01:00
Jordan Yates
8dd90f52f3 samples: usb: mass: move check to compile time
Move the check for valid disk drivers to compile time to enable twister
to run the configure step without errors.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-01 09:15:31 +01:00
Benjamin Cabé
45e51c08ab doc: fixed :c:enum: used in lieu of :c:enumerator:
While Breathe seems to not care,  the proper role to reference an
enumerator is :c:enumerator:

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-01 09:14:38 +01:00
Benjamin Cabé
b7166032cc doc: misc fixes to C domain types
Breathe is not very strict about the types used to reference C domain
objects (ex. referencing a struct using `:c:type:` would work, and vice
versa) but other tooling might be. This commit fixes some of such
incorrectly documented elements.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-01 09:14:38 +01:00
Benjamin Cabé
8e6b44ce66 doc: net: fix Sphinx C domain roles usage
use the proper types/syntax for referencing C elements from Networking
docs

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-01 09:14:26 +01:00
Felipe Neves
804db65928 drivers: input: cst816s: read the gesture-ID register
And report the gestures as specific device  event type
to the input subsystem.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-08-01 09:14:19 +01:00
Felipe Neves
acaee9f019 dt-bindings: input: introduce INPUT_EV_DEVICE input code
For reporting specific input device events.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-08-01 09:14:19 +01:00
Szymon Janc
89b129742d tests: bluetooth: tester: Enable DIS service
Previously autopts was incorrectly using GATT server service to
construct DIS.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-08-01 09:13:55 +01:00
Kamil Piszczek
f9a5699bd8 Bluetooth: DIS: integrate app version into FW revision characteristic
Integrated the application version feature of the build system with
the default configuration of the Bluetooth DIS module and its Firmware
Revision characteristic.

The firmware revision string now defaults to APP_VERSION_TWEAK_STRING
if the application version feature is used in a project. This specific
version format is used to unify version formatting with other parts of
Zephyr like the MCUboot module and its versioning Kconfig:
CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2024-08-01 09:13:39 +01:00