Commit graph

23353 commits

Author SHA1 Message Date
Fin Maaß
9a7037683d drivers: spi: litex: rename driver
rename litex spi driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 12:39:02 +02:00
Chun-Chieh Li
9e9e409cb9 drivers: usb_c: numaker: support Nuvoton's M2L31 series
1. Support USB-C drivers TCPC, PPC, and VBUS with UTCPD H/W IP
2. UTCPD is interconnected with Timer-triggered EADC for updating
   VBUS/VCONN voltage periodically

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-08-01 12:38:53 +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
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
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
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
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
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
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
Chun-Chieh Li
ed49d7c5e9 drivers: hwinfo: add numaker m2l31x for device id
Add Nuvoton NuMaker M2L31 series for device id

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-08-01 09:13:06 +01:00
Joakim Andersson
7ddcfbdc4a clock_control: Add MCO support for STM32 U5 series
Add microcontroller clock output (MCO) support for the STM32
U5 series of devices.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-08-01 09:12:13 +01:00
Fabian Blatz
23435de71e drivers: input: cst816s: Configure before enabling interrupts on init
During driver init make sure that the IRQ_CTL field is set before enabling
the interrupts. Fixes the i2c read error on startup.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-08-01 09:12:01 +01:00
Francois Ramu
87af1984f5 drivers: flash: stm32 qspi flash size in dual flash mode
When  QSPI configuration is the dual-flash, the total
flash size and erase size are doubled. This is handled
with a STM32_QSPI_DOUBLE_FLASH factor which doubles
the values of one qspi component.
Note that SFDP table is for ONE flash component.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 09:11:30 +01:00
Fin Maaß
aeea701b2b dts: bindings: litex: rename eth comatible
Rename it from litex,eth to litex,liteeth
to reflect the new name of the driver.

Zero got removed from the litex
ethernet compatible, as it now supports
multiple instances.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 08:59:37 +01:00
Fin Maaß
239df9ce69 drivers: ethernet: litex: more instances
be able to use multiple instances of the
litex ethernet (liteeth) driver.

add support for vlan.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 08:59:37 +01:00
Fin Maaß
6ba5f6db60 drivers: ethernet: litex: rename driver
For more consistency, rename the liteeth driver to litex.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 08:59:37 +01:00
Fin Maaß
4ab40f442e drivers: intc: litex: add helper for interrupts
add helper for interrupts, so multiple
instances of peripherals work.

this way out-off-tree peripherals are supported.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 08:59:37 +01:00
Gerard Marull-Paretas
7123f142c3 drivers: clock_control: nrf: use SOC_NRF53_CPUNET_ENABLE
Board level option is deprecated.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Gerard Marull-Paretas
ffe10833ea drivers: bluetooth: hci: nrf53: use nrf_spu_extdomain_set
Instead of hardcoded values and device instances.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Gerard Marull-Paretas
8bc461ebe0 drivers: bluetooth: hci: nrf53: simplify DEBUG_SETUP code
debug.h module provides dummy implementation when necessary.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Fabio Baltieri
716fa268f4 input: add a user_data pointer to the callback
Add a void *user_data pointer to the input callback structure. This is
useful for driver to get back the driver data structure and avoid
defining wrapper functions.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-31 12:55:11 +02:00
Manuel Argüelles
6c7d836b0c drivers: nxp: convert SIUL2 drivers to native
Convert pin control, GPIO and external interrupt controller drivers
based on SIUL2 peripheral to native drivers. This must be done in a
single commit to preserve atomicity, as these drivers depend on each
other.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-07-31 10:08:24 +02:00
Bjarki Arge Andreasen
279f241e2f drivers: gnss: update drivers to select reference frame
Update in-tree device drivers to depend on the reference frame
datums they support.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-07-31 10:07:19 +02:00
Bjarki Arge Andreasen
b9fbc4f936 drivers: gnss: add choice for GNSS reference frame datum
Add choice symbol for reference frame datum from which GNSS will
produce navigation data. All in-tree device drivers use WGS84 by
default, for now, this is the only available option until support
for other datums are added.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-07-31 10:07:19 +02:00
Rahul Arasikere
6c4136812c drivers: ethernet: Update STM32 Ethernet driver to support MDIO if enabled.
Moved the definition of the phy device from depending on stm32hx
series SOC to its own #if...#else...#endif. This way mdio support
can be enabled on any stm32 soc that supports it by defining the
mdio node in the devicetree.

I have tested this in a custom board.

Signed-off-by: Rahul Arasikere <arasikere.rahul@gmail.com>
2024-07-30 18:31:02 +01:00
Johann Fischer
043aa837fd drivers: udc_stm32: remove wrong header and fix udc_ep_enable()
Driver includes wrong header zephyr/usb/usb_device.h and uses defines
from include/zephyr/drivers/usb/usb_dc.h.
Also fix udc_ep_enable() implementation in general. HAL_PCD_EP_Open()
takes the ep_type parameter as uint8_t integer type and the shim driver
should not just pass int type.
It is recommended that drivers use ep_cfg or cfg for struct
udc_ep_config, fix this as well.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-30 18:29:26 +01:00
Francois Ramu
9ec7697bdb drivers: usb: stm32 udc driver get the global otg interrupt
The global otg interrupt hs/fs is enabled by the udc_stm32
driver. Get it in the list of interrupts of the OTG node.
Use UDC_STM32_IRQ naming.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-07-30 18:29:17 +01:00
Pieter De Gendt
92019b1dac emul: Support UART device emulation
Add support to the existing UART emulated bus, to have a client device
emulator.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-30 18:28:17 +01:00
Murali Karicheri
d2d0289750 drivers: flash : stm32h7: Fix the offset for get_sector()
The offset is wrong when the second bank is used by M4 as the
offset is relative to the base which is 0. So add the least
significant 6 nibbles from the CONFIG_FLASH_BASE_ADDRESS to
find the sector.

Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
2024-07-30 18:26:20 +01:00
Murali Karicheri
188fe4d5d1 drivers: flash: stm32h7: support flash controller driver on M4
Currently flash controller driver builds and runs only on M7.
This patch supports enablement of the driver on M4 CPUs. The
main issue in using the driver on M4 is that LL_GetFlashSize()
to read the flash size works only on M7 as the internal register
is not accessible from M4. So to use the driver on M4, add a dt
property, bank2-flash-size, to configure flash size of bank2.
this will allow gradual support of flash controller driver
on M4 of all supported STMH7 boards by defining the above
dt property and testing it. Currently this is verified only
on STM32H747i-disco board.

Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
2024-07-30 18:26:20 +01:00
Johann Fischer
76fadf90f7 drivers: udc_dwc2: enable Internal DMA support by default
Remove BUILD_ASSERT for Internal DMA and DCACHE if both are enabled, and
enable Internal DMA support by default.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-30 18:26:04 +01:00
Johann Fischer
9bf32320f2 drivers: udc_mcux_ehci: remove bounce buffer
UDC_BUF_POOL_*_DEFINE macro will place buffer pool in __nocache
section if NOCACHE_MEMORY is enabled.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-30 18:26:04 +01:00
Johann Fischer
67caae3aca usb: device_next: introduce UDC_BUF_POOL_*_DEFINE macros
Introduce UDC_BUF_POOL_*_DEFINE macros based on NET_BUF_POOL_*_DEFINE
macros but use our own version of alloc and unref callbacks to get
buffers with specific alignment and granularity. Also, do not use ref
callback because it breaks alignment.
Also introduces helper macros for defining and checking UDC
driver-compliant static buffers.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-30 18:26:04 +01:00
Jordan Yates
e2549cc3c9 lora: rylrxxx: add missing timeout
Add the missing timeout parameter to `modem_pipe_open`. 10 seconds
appears to be the default value added to other in-tree drivers.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-30 11:44:04 +02:00
Martin Åberg
7dbc5f09ed drivers/gpio: Add support for GRLIB GRGPIO2
This adds support for the GRLIB GRGPIO2 controller used in
LEON and NOEL-V systems.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2024-07-29 14:27:15 +02:00
Ryan McClelland
147df87fa4 drivers: i3c: add ddr, ibi tir, direct ccc def byte support
Revision 1p7 of the silicon added support for IBI TIR, full word fifo
while target usage, defining byte with direct CCCs. This also adds
support of HDR-DDR.

This also fixes short ccc commands where multiple targets in a
payload for the same ccc.

Modification of the i3c_target_tx_write had to be done in order to
distinguish the difference for each fifo to be written to.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-07-29 14:23:43 +02:00