Commit graph

24538 commits

Author SHA1 Message Date
Daniel DeGrasse
8d2dc2f9ef drivers: display: ssd16xx: convert to MIPI DBI API
Convert SSD16XX display driver to use MIPI DBI API. This commit also
updates in tree board devicetrees to include the emulated MIPI DBI SPI
driver.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-13 17:01:16 -04:00
Mahesh Mahadevan
b219596cc1 drivers: mipi_dbi: Add controller driver for NXP FlexIO LCD
Add a driver to support the NXP FlexIO LCD controller that uses
8080/6800 bus protocol.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-06-13 16:48:34 -04:00
Mahesh Mahadevan
3dd5ffe20a drivers: display: st7796: Update the logic to invert RGB and BGR
1. Add a property for panels where the RGB is displayed as BGR.
2. Add a check for 8080 8-bit mode and invert RGB and BGR for
   this case.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-06-13 16:48:34 -04:00
Mahesh Mahadevan
6236779d32 drivers: display: Update setting the mode in the st7796s driver
MIPI mode is read from the device tree.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-06-13 16:48:34 -04:00
Mahesh Mahadevan
c396d8bdbc drivers: clock_control: Update NXP LPC Syscon driver to add FlexIO
Add support to get FlexIO clock

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-06-13 16:48:34 -04:00
Benjamin Cabé
94ded47fa7 drivers: crypto: make driver API and conf structs const
Save precious RAM by making sure driver API and config structs are
declared as const

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-13 16:42:35 -04:00
Mark Wang
b6b43c3ed7 drivers: udc: implement udc_mcux_ehci and udc_mcux_ip3511
udc_mcux_ehci is based on the MCUX USB controller driver
(usb_device_ehci.c); udc_mcux_ip3511 is based on the
MCUX USB controller driver (usb_device_lpcip3511.c);
add related Kconfig and CMake; include the usb_phy.h path in
modules/hal_nxp/usb/CMakeLists.txt because udc_mcux.c use it;
add related macros to usb_device_config.h;
update CMakeLists for udc_mcux_ehci and udc_mcux_ip3511.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-06-13 17:59:31 +02:00
Maureen Helm
595fdb6089 drivers: serial: Set default baud rate and data bits in max32 driver
The uart-controller devicetree binding declares current-speed and
data-bits properties as optional, but the max32 uart driver failed to
build if they weren't defined. Fix the driver by falling back to
commonly used values for these properties.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-06-13 17:52:37 +02:00
barry batsbak
2b7a39e83c drivers: wifi: add bssid/mac to wifi_scan result
copy bssid in wifi scan result if set

Signed-off-by: barry batsbak <sonofviking@protonmail.com>
2024-06-13 17:50:08 +02:00
Dong Wang
22061bd7a8 drivers: loapic: move 'z_loapic_int_vec_set()' into pinned section
Move it out of boot section because it's also called by none-boot function
'loapic_resume()' at runtime. Better to keep boot-only things in boot
section to avoid paging in boot section things at runtime.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2024-06-13 17:49:01 +02:00
Benjamin Cabé
22535a99ab drivers: clock_control: litex: declare unmuttable map as const
Save precious RAM by declaring DRP reg->size map as const as it's
immutable

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-13 08:02:26 -04:00
Benjamin Cabé
6403280142 drivers: clock_control: make driver API and conf structs const
Save precious RAM by making sure driver API and config structs are
declared as const

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-13 08:02:26 -04:00
Nazar Palamar
17889d23b9 driver/bluetooth: Added initial version of hci cyw208xx driver
Added initial version of hci cyw208xx driver

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-06-13 05:52:19 -04:00
Lyle Zhu
d74698a36b driver: bluetooth: hci: Support NXP BT CTLR FW blobs
Add Kconfig.nxp to support NXP Bluetooth Chipset.
Current only NXP IW612 Chipset (BT_NXP_NW612) has
been supported.

Add modules/hal_nxp/bt_controller/CMakeLists.txt to
determine whether any firmware is selected, and
check whether the firmware exists.

If the firmware exists, copy the firmware to the
temporary folder ${ZEPHYR_BINARY_DIR}/include/
generated/bt_nxp_ctlr_fw.h. OR, raise a fatal error.

In file hci_nxp_setup.c, includes the temporary file
bt_nxp_ctlr_fw.h.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-13 05:45:36 -04:00
Lyle Zhu
d164f9c0bb driver: bluetooth: hci: Add NXP BT module support
Implement UART firmware download driver for NXP
BT module.

Only support Murata 2EL M.2 module on RT1170EVKB.

And only one instance can be supported now.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-13 05:45:36 -04:00
Adam Wojasinski
34c1fcc939 drivers: eth: native: Align to support ptp_clock driver for PTP subsys
Add conditions to enable ptp_clock driver implementation
for native_posix when PTP subsystem is enabled.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Adam Wojasinski
50cfe12f90 drivers: eth: eth_stm32_hal: Add support for rx/tx timestamping
Add handling of net_pkt flags that can be used to indicate that the
network packet should be timestamped.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00
Pisit Sawangvonganan
fea0859b86 drivers: flash: stm32_qspi: make cmd_write_en definition as static const
Refactor the `QSPI_CommandTypeDef cmd_write_en` definition to
a `static const` local variable to eliminate redundant definitions.

This change enhances performance by reducing runtime overhead associated
with initializing `cmd_write_en` in multiple functions.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-06-13 05:34:29 -04:00
Daniel DeGrasse
f59156356d drivers: display: ili9xxx: support display_read API
Add support for display_read API with ili9xxx controller. This
functionality is opt-in, since the required bitshifting makes the
read not very performant, and the implementation adds otherwise unused
code overhead.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-13 09:23:40 +02:00
Daniel DeGrasse
a0e3dd1f87 drivers: display: st7789v: convert to MIPI DBI API
Convert ST7789V display driver to use MIPI DBI API. This commit also
updates in tree boards to use the new devicetree syntax needed to enable
this display with the MIPI DBI API.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-13 09:22:54 +02:00
Daniel Leung
db9d3134c5 kernel: mm: rename Z_MEM_PHYS/VIRT_ADDR to K_MEM_*
This is part of a series to move memory management functions
away from the z_ namespace and into its own namespace. Also
make documentation available via doxygen.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
552e29790d kernel: mm: rename z_phys_un/map to k_mem_*_phys_bare
This renames z_phys_map() and z_phys_unmap() to
k_mem_map_phys_bare() and k_mem_unmap_phys_bare()
respectively. This is part of the series to move memory
management functions away from the z_ namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Tom Burdick
98b26c6ca8 rtio: Remove builtin iodev mpsc queue
I/O Devices were meant to be handles of sorts and had a built in mpsc queue
as this made sense initially. As time has gone on it turned out that often
we wanted the mpsc queue to be an implementation detail hidden in a driver.
In fact pretty much all drivers work this way now.

Keeping the struct mpsc queue as a member of rtio_iodev meant wasted memory
in cases where it wasn't used. It also meant a bit of confusion as the
queue might be accidently used in places where it shouldn't be.

Remove the mpsc queue member from struct rtio_iodev and the last remaining
usages of it. Will ensure RTIO for 3.7 LTS avoids causing unneeded churn
for future users.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-06-12 21:12:54 -04:00
Declan Snyder
a5a2dbacbd drivers: nxp_enet: Support RW6XX series
Support RW6xx series in NXP ENET driver.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-12 18:24:48 -04:00
Declan Snyder
572433538d drivers: nxp_enet: Fix Kconfig dependency DCACHE
The NOCACHE symbol should be dependent on CPU_HAS_DCACHE here.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-12 18:24:48 -04:00
Declan Snyder
430f3a448a drivers: clock_control_mcux_syscon: Support ENET
Support NXP ENET clock control in the LPC syscon clk driver.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-12 18:24:48 -04:00
Krystian Dolatowski
317abcc589 sensor: fix fallthrough on sample_channel_get on AQI
fixed fallthrough on getting channel AQI value from ENS160

Signed-off-by: Krystian Dolatowski <kryqpl1@gmail.com>
2024-06-12 18:16:29 -04:00
Benjamin Cabé
c44b777221 drivers: display: make driver API structs const
Save precious RAM by making sure driver API structs are declared as
const

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-12 17:16:17 -05:00
Henrik Brix Andersen
6a29c79d4e drivers: usb: native posix: add option for enabling high speed support
Add Kconfig option for enabling high speed USB support for the native posix
USB controller driver.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-06-12 17:15:58 -05:00
Hou Zhiqiang
1cd37f21f3 drivers: ram_console: add option to link console buffer to given section
Currently, the ram_console buffer is defined as a global var, its
address is determined during the building and may be changed when
code update. This is not a problem if the ram_console is just used
in debug purpose.

While in the heterogeneous SoCs, there can be multiple MPU Cores
and several MCU cores, it can run multiple OS/bare-metal instances
on these cores, but the UART ports may be not enough, so the
ram_console can be leveraged. To make it easy to use, it's better
make the console buffer fixed and predefined.

This patch adds a option to link the console buffer to a given
section, through the "zephyr,memory-region" device tree node, then
the address can be known from the device tree node and easy to
check from other cores running Linux/U-Boot.

To use this option, the chosen property 'zephyr,ram-console' must
be added, the following is a example:

	chosen {
		zephyr,ram-console = &ram_console;
	};

	ram_console: memory@93d00000 {
		compatible = "zephyr,memory-region";
		reg = <0x93d00000 DT_SIZE_K(4)>;
		zephyr,memory-region = "RAM_CONSOLE";
	};

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-06-12 17:09:24 -05:00
Hou Zhiqiang
209568eabe driver: ram_console: leave one byte from the defined buffer size
Leave one byte from the CONFIG_RAM_CONSOLE_BUFFER_SIZE to ensure
the NULL-termination.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-06-12 17:09:24 -05:00
Francois Ramu
ac48369731 drivers: flash: stm32 xspi driver with DMA support
Add the commands to read and write to/from the xSPI with gpDMA
On the stm32h5 device, the one request for xspi instance

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-12 12:53:41 -04:00
Francois Ramu
be55b2c263 drivers: flash: stm32 xspi flash driver with clock domain
Configure the xspi clocks domain by the clock domain
as defined by the DTS
Up to 3 possible clock confg : xspix, xspi_ker, xspi_mgr

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-12 12:53:41 -04:00
Aksel Skauge Mellbye
d35eac2326 drivers: spi: gecko: Respect frequency configuration
This commit adds support for configuring SPI frequency per transaction.
The "clock-frequency" devicetree property is used as the default
frequency unless the peripheral being communicated with has a lower
"max-spi-frequency" (passed to the driver as spi_config::frequency).

An error is returned if the requested frequency is higher than the
hardware can support. This limit is half the peripheral clock (PCLK on
Series 2, HFPERCLK on Series 0/1) for SPI in controller mode.

Previously, the driver hard-coded 1 MHz operation. For backwards
compatibility, default to 1 MHz if the "clock-frequency" property is not
set in devicetree.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-06-12 18:52:17 +02:00
Aksel Skauge Mellbye
5513657e10 drivers: spi: gecko: Add support for devices with a single USART
This commit adds support for devices such as EFR32xG24 in the SPI
driver, as these devices only have a single USART peripheral.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-06-12 18:52:17 +02:00
Joakim Andersson
04e56f72c7 drivers: flash: Fix stm32 ospi and xpsi reset gpios handling
Fix compilation error when reset-gpios is enabled.
Undefined reference to dev_cfg variable.
Reset gpio duration needs to be defined, but is not in binding file.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-06-12 12:51:06 -04:00
Nazar Palamar
c0be06be02 soc: psoc6: fix build error when CONFIG_UART_INTERRUPT_DRIVEN
Fix build error when CONFIG_UART_INTERRUPT_DRIVEN is enabled
see details: issues/74004

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-06-12 12:50:28 -04:00
Martí Bolívar
48a14dc17e gpio: add support for node label based lookup in the shell
Use some new kernel features to make the experience of finding and
dealing with GPIO devices much more ergonomic by allowing the use of
devicetree node labels to identify GPIO devices by default.

Users who wish to avoid the associated footprint penalty can set
CONFIG_DEVICE_DT_METADATA=n by hand, but I think the convenience is
worth the price as a default. If we're running a shell, then we've
already paid a heavy footprint penalty.

Example output for qemu_cortex_m3:

    uart:~$ gpio devices
    Device           Other names
    gpio@40004000    gpio0
    gpio@40005000    gpio1
    gpio@40006000    gpio2
    gpio@40007000    gpio3
    gpio@40024000    gpio4
    gpio@40025000    gpio5
    gpio@40026000    gpio6

Signed-off-by: Martí Bolívar <mbolivar@amperecomputing.com>
2024-06-12 18:49:54 +02:00
Tomasz Moń
fb27c36ad5 drivers: udc_dwc2: Fix control OUT buffer leak
Release buffer allocated in dwc2_ctrl_feed_dout() on endpoint deactivate
to prevent the buffer from leaking on USB stack disable.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-06-12 12:48:45 -04:00
Pisit Sawangvonganan
9a0283d5e2 drivers: gnss: make gnss_xxx_config and gnss_driver_api as const
This change marks each instance of the `gnss_xxx_config` and
`gnss_driver_api` as `const`.

By using `const`, we ensure immutability, leading to usage of only
`.rodata` and a reduction in the `.data` area.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-06-12 12:47:34 -04:00
Francois Ramu
29afef1e7d drivers: i2c: stm32 for V2 driver get_config with timings
Change the get_config API for the stm32 I2C V2 driver.
It will also return the value of the content of TIMING register
for the I2C V2 bus.
This is hold by a i2c_config_timing structure of the device data

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-12 14:35:48 +03:00
Francois Ramu
e5048c0c6d drivers: i2c: stm32 I2C v2 driver fix compliance with a Macro
Define Macro to fix the compliance check warning :
"DEEP_INDENTATION: Too many leading tabs - consider code refactoring
in the i2c_compute_scll_sclh() function
in the i2c_compute_presc_scldel_sdadel() function

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-12 14:35:48 +03:00
Francois Ramu
3aea45053c drivers: i2c: stm32 driver V2 new timing calculation
This PR is implementing a new formula to calculate the I2C timing
value from the I2C clock source and the bit rate.
This is done under flag CONFIG_I2C_STM32_V2_TIMING.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-12 14:35:48 +03:00
Ren Chen
1264a9a163 usb: it82xx2: return the available data length in the ep read function
According to the Zephyr documentation, the number of bytes available
for read should be returned if the input data and length parameters are
NULL and zero, respectively. This commit corrects this behavior.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-06-12 14:29:42 +03:00
Ren Chen
d9099efc02 usb: it82xx2: lock irq when accessing fifo ctrl register and ready bit
Since the fifo control register and ready bit are checked in ISR
function, this commit locks IRQ when accessing these registers to
prevent racing conditions.

Tested with: Google spikyrock project

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-06-12 14:29:42 +03:00
Ren Chen
4fa5cb8dfc usb: it82xx2: fix some issues related to extended endpoint enablement
This commit addresses some issues during the extended endpoint(ep
number is larger than 4) access. There are enable and ready bits for
each endpoint on the IT82xx2 chip. The transaction completion should be
determined by the ready and enable bits of the corresponding endpoint.
Additioinally, for non-control endpoint, the FIFO control register is
selected before writing data and cleared when the IN transaction is
completed. When an IN token interrupts, the FIFO control register
should be checked if it's selected to prevent fake tokens.

Tested with: Google spikyrock project

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-06-12 14:29:42 +03:00
Ren Chen
21c4c169ab usb: it82xx2: remove the unnecessary explicit conversion
This change cleans up the unnecessary explicit conversion.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-06-12 14:29:42 +03:00
Abderrahmane Jarmouni
533ade504d drivers: spi: stm32: minor fixes
Minor fixes & code improvements.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-06-12 14:28:35 +03:00
Adam Berlinger
a427f42772 drivers: clock_control: clock_stm32_ll_u5 add get_status API callback
Adds get_status API for clock_stm32_ll_u5 driver

Signed-off-by: Adam Berlinger <adam.berlinger@st.com>
Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-06-12 14:22:13 +03:00
Tomasz Moń
fa0a6e2274 drivers: udc_dwc2: Allocate at least 8 bytes for control OUT
Make sure to feed control OUT endpoint with at least 8 bytes buffer to
make it possible to always receive SETUP data. This solves the assertion
failure in net_buf_add() called inside dwc2_handle_evt_setup() when a
host decides to start new control transfer immediately after it has
issued control transfer with Data Stage from host to device with wLength
less than 8.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-06-12 14:21:37 +03:00