Commit graph

23353 commits

Author SHA1 Message Date
Lucien Zhao
ad0a066f4f drivers: gpio: update rgpio driver code
RGPIO model on RT1180 is same with igpio, however,
current driver can't support.

Update gpio driver to support gpio pad control

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-15 14:51:02 -04:00
Lucien Zhao
222162dc5e drivers: clock_control: update clock_control/clock_control_mcux_ccm_rev2.c
Due to two lpuart instance use common clock root,
update driver to support new feature for RT1180.

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-15 14:51:02 -04:00
Benjamin Cabé
45ccd4a769 drivers: display: ssd1306: do not re-declare errno
errno is a reserved macro. Use ret instead.
Fixes a bug introduced with commit
bfb541ccbe.

Fixes #76751.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-15 14:50:41 -04:00
Marek Pieta
cd931fdb73 drivers: usb: common: nrf_usbd_common: Handle USB SoF IRQ first
The processing order is relevant if the IRQ handler call is delayed and
multiple interrupts are pending. Handle USB SoF before other interrupts
to ensure that it would be reported before other USB events (e.g. before
completed USB data transfers).

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2024-08-15 14:50:25 -04:00
Tahsin Mutlugun
04e8570266 drivers: i2c: i2c_max32: Add DMA support for controller mode
MAX32 I2C peripheral can benefit from DMA transfers. This patch adds
DMA support for transactions made in controller mode.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-15 14:50:13 -04:00
Bjarki Arge Andreasen
3f681806ef drivers: rtc: fake: Patch alarm and update fakes
The RTC alarm and update fakes where not defined correctly. This
commit adjusts them to match the RTC API.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-15 11:59:34 -04:00
Raffael Rostagno
b12336c80e pm: clock_control: esp32c6: Peripherals clock init review
Clock is disabled at startup for LP core peripherals, greatly
improving power consumption in deep sleep mode.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-15 11:59:08 -04:00
Raffael Rostagno
3ee2a62a55 pm: esp32c6: Power management support
Power management support (light/deep sleep) for ESP32C6

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-15 11:59:08 -04:00
Tim Lin
50a23a6195 drivers/espi: it8xxx2: Fix H2RAM address mask size to match SRAM size
The base address of H2RAM can be as large as KB(CONFIG_SRAM_SIZE), so
the mask for the H2RAM address should be (KB(CONFIG_SRAM_SIZE)-1).
This PR corrects the size of the mask.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-08-15 12:40:33 +02:00
Mark Wang
564f348612 drivers: udc: mcux: support the UDC_EVT_SOF
Enable the MCUX USB controller driver sof, then
convert it to zephyr UDC_EVT_SOF event.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-08-15 10:17:00 +01:00
Daniel Kampert
f849140de7 drivers: sensor: Add attribute for gain and resolution
- Add SENSOR_ATTR_GAIN and SENSOR_ATTR_RESOLUTION
- Remove SENSOR_ATTR_GAIN from tsl2540 header

Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
2024-08-15 10:16:12 +01:00
Neil Chen
fd7139e9da drivers: watchdog/usb: Update CONFIG_SOC_SERIES_MCXNX4X name
Change CONFIG_SOC_SERIES_MCXNX4X name to CONFIG_SOC_SERIES_MCXNX

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-08-15 10:15:12 +01:00
Neil Chen
19d6217118 drivers: timer: remove fsl_power.h for MCXN236
remove fsl_power.h in os_timer driver for MCXN236

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-08-15 10:15:12 +01:00
Andrey VOLKOV
213da72d06 timer: cortex_m_systick: use direct interrupt handler instead of C-function
The current driver implements the global defined "systick" interrupt
callback "sys_clock_isr" as a standard C function with an argument.
However, ARM's direct interrupt handlers do not have any arguments;
they must be declared as "void handler(void)".

Additionally, the direct handler should include some missing special
header/footer.

Fixes: #75693

Signed-off-by: Andrey VOLKOV <andrey.volkov@munic.io>
2024-08-14 15:57:15 -05:00
Andrey VOLKOV
59db014f43 timer: cortex_m_systick: minor refactoring
Replace useless "TICKLESS" define by
IS_ENABLED(CONFIG_TICKLESS_KERNEL) one, and replace error-prone
'cycle_t' pseudotype defs by real typedefs.

Signed-off-by: Andrey VOLKOV <andrey.volkov@munic.io>
2024-08-14 15:57:15 -05:00
Thao Luong
8bcfbf4d80 drivers: i2c: Add I2C driver support for Renesas RA8 devices
Add implemetation of I2C driver use IIC Master for Renesas RA8 devices

Signed-off-by: Ha Nguyen <ha.nguyen.fz@bp.renesas.com>
Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-14 15:53:50 -05:00
Ryan Erickson
bbcf23e95e drivers: modem: cellular: hl7800 fix enter cmux
The OK response should be processed before entering CMUX mode.

Use UART ISR mode by default.

Fix warnings and errors produced by the sample.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2024-08-14 15:51:04 -05:00
Alex Fabre
84889d4783 drivers: eth: fix stm32_hal PHY address resolution
When the PHY is hardware designed to communicate on address '1', the mdio
node of the device tree is labeled 'ethernet-phy@1'.
Therefore, STM32 HAL must adapt to resolve the appropriate DT node:
'ethernet_phy_1'.

Signed-off-by: Alex Fabre <alex.fabre@rtone.fr>
2024-08-14 15:50:24 -05:00
Pisit Sawangvonganan
e6ca8d9d12 modem: modem_cellular: streamline instance configuration with new macro
Introduced `MODEM_CELLULAR_DEFINE_INSTANCE` macro to streamline
the definition and initialization of modem cellular instances.

This macro enables passing parameters that vary among modems, including:
`power_pulse_duration_ms`, `reset_pulse_duration_ms`, `startup_time_ms`,
`shutdown_time_ms`, `autostarts`, `init_chat_script`, `dial_chat_script`
and `periodic_chat_script`.

This will reduce the number of redundant lines in the code, aiming for
improved maintainability.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-14 14:46:00 -04:00
Pisit Sawangvonganan
1f2c898788 modem: modem_cellular: consolidated user pipe data in to single macro
Introduced the `MODEM_CELLULAR_DEFINE_AND_INIT_USER_PIPES` macro to
consolidate multiple user pipe data definitions into a single macro call.

This will reduce the number of redundant lines in the code, aiming for
improved maintainability.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-14 14:46:00 -04:00
Nikodem Kastelik
022e81e8d2 drivers: retained_mem: nrf: implement using nrfx_ram_ctrl helper
Now retained_mem driver can utilize nrfx_ram_ctrl helper
for nRF devices. It provides abstraction over various RAM retention
peripherals like POWER, VMC or MEMCONF.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-08-14 12:35:17 -04:00
Jordan Yates
a390f450ec sensor: voltage_divider: don't pulse enable pin
Don't pulse the enable pin on boot if the device is going to immediately
go into suspend mode via `zephyr,pm-device-runtime-auto`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-14 12:34:45 -04:00
Charles Dias
0be1f31e16 drivers: video: stm32_dcmi: add set and get ctrl
Add set_ctrl and get_ctrl functions.

Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
2024-08-14 12:34:13 -04:00
Tahsin Mutlugun
99603e4c38 drivers: gpio: gpio_max32: Fix high-impedance setting
Put disconnected GPIOs to high impedance state by setting their
direction to input and pad control to none.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-14 12:33:16 -04:00
Brett Witherspoon
a0f36d59b7 drivers: video: video_stm32_dcmi: Prevent out of bounds memory access
The frame event callback unconditionally copies into the enqueued video
buffer. The driver only supports fixed length frames, so reject enqueued
buffers that are not large enough to prevent invalid memory access.

Signed-off-by: Brett Witherspoon <brett@witherspoon.engineering>
2024-08-14 09:14:56 -04:00
Alberto Escolar Piedras
ad0fc3b5b1 drivers/bluetooth/userchan: Fix dependency
The driver can run in either native_posix or native_sim.
Let's make sure to set the dependencies acordingly.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-14 09:14:10 -04:00
Jun Lin
1aff275642 soc: npcx: scfg: select host interface type in global
The Host Interface Type in the DEVCNT register sets the HIF type
(either eSPI or LPC).
Currently, it is configured in the host-interface-related drivers like
eSPI or SHI. However, some I/O pads sourced from VHIF in the other
modules such as GPIO and I3C also rely on this field. It might be
problematic when using those I/Os without enabling eSPI or SHI drivers.
This commit moves the setting from the specific drivers to the global
system initialization function scfg_init().

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-08-14 10:47:15 +01:00
Duy Nguyen
a95cade729 driver: serial: Convert Kconfig of renesas RA8 to rsource
Change Kconfig of renesas RA8 to rsource

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2024-08-14 10:46:27 +01:00
BH Li
2f40168287 drivers: adc: add ambiq adc driver
Add Ambiq adc driver

Signed-off-by: BH Li <bli@ambiq.com>
2024-08-14 10:45:47 +01:00
Reto Schneider
9aa2f5ffb0 drivers: serial: Add name to choice symbol
Add name to choice symbol, so that default value can be changed
downstream.

Developed-by: Andreas Rudolf <andreas.rudolf@husqvarnagroup.com>

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-08-14 09:40:34 +02:00
Pisit Sawangvonganan
c20126f950 drivers: serial: ns16550: apply __maybe_unused to ns16550_out,inword
Instead of disabling code with a specific compilation switch, enable it
and apply `__maybe_unused` in the `ns16550_outword` and `ns16550_inword`
functions to make the codebase cleaner.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-14 09:40:00 +02:00
Pisit Sawangvonganan
e868b6b49d drivers: serial: ns16550: fix typo
Correct the following typo in Kconfig and
the corresponding function.
- Kconfig.it8xxx2 from `BUADRATE` to `BAUDRATE`
- Correspoding function from `burdrate` to `baudrate`

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-14 09:40:00 +02:00
Charles Dias
1ed9eb6125 drivers: video: ov2640: fix vertical flip
Fix the vertical flip instruction into ov2640_set_vertical_flip
function.

Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
2024-08-14 09:38:39 +02:00
Krzysztof Gawryś
dfcc3b6db4 RP2040: clock control: support PLL On/Off
Simple improvement that adds control over SYS and USB PLLs in RPi Pico
(RP2040) MCU.

Signed-off-by: Krzysztof Gawryś <kgawrys@concisesoftware.com>
2024-08-13 18:29:03 -04:00
Murali Karicheri
7baf026adf drivers: flash: stm32h7: ignore STRBERR during flash write
When application code runs from M4 (resides on lower 896KiB of
the internal flash of bank2) and it does write to a block in
the upper 128KiB, write fails sometime (for example failed
1 out of 10 block write based on the tests) due to STRBERR.
As per technical reference manual section 4.7.4 of
STM32H745/755 SoC, application may ignore this error and
continue with write. So check for the flag and return okay
status for write(). Based on our tests, the application write
succeeds even when this error happens and match with document
description. So igoring this error flag is okay during write.

Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
2024-08-13 18:19:41 -04:00
Flavio Ceolin
b9a0f0039f dma: emul: Fix pm action signature
The signature for dma_emul pm action callback is wrong.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-08-13 18:18:44 -04:00
Georgij Cernysiov
5246c16109 drivers: flash: stm32 ospi correct memory map return code
Use ENOTSUP instead of EIO to signal about not
supported configuration.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-08-13 14:57:59 +02:00
Georgij Cernysiov
a1e39d0b64 drivers: flash: stm32 ospi reword memory map log output
Add more clarity to memory map log output.

Use LOG_DBG instead of LOG_INF to signal about
memory map mode being enabled.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-08-13 14:57:59 +02:00
Georgij Cernysiov
f4b63f9644 drivers: flash: stm32 ospi extend memory map modes support
Extend memory map support to QUAD, DUAL, SPI modes.

Allow custom write opcode usage and SFDP:BFP read opcode.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-08-13 14:57:59 +02:00
Armando Visconti
a47b88c09b drivers/sensor/st: iis2iclx: (fix) convert range into mg
Fix the sensor range setting at runtime which is currently returning error,
converting the SI (ms2) value passed thru SENSOR_ATTR_FULL_SCALE in mg (and
not in g) as this is the unit used in the driver internals.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-08-13 14:56:39 +02:00
Armando Visconti
c6f8d37056 drivers/sensor/st: iis2iclx: fix odr setting
Do not fail when requested rate passed in SENSOR_ATTR_SAMPLING_FREQUENCY
is not matching any of the odr values supported by sensor. Instead, round
it up to the next one.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-08-13 14:56:39 +02:00
Francois Ramu
48b84d2c65 drivers: counter: stm32 counter timer exclude stm32 devices without APB2
The STM32 devices like stm32F0/G0/C0 which have a f0-rcc compatible
does not have APB2 prescaler : do not try to set it.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-13 14:56:22 +02:00
Tim Lin
9bcf33bbc4 drivers/pinctrl: it8xxx2: Fix I2C5 pin leakage
When setting these pins as I2C alternate mode and then setting
GCR7 or func3-ext of GPIO extended, it will cause leakage.
In order to prevent leakage, it must be set to GPIO INPUT mode.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-08-13 14:55:34 +02:00
Anke Xiao
7c7760f4cd drivers: counter: update counter_mcux_rtc.c
Set LPO 1KHZ clock for RTC if clock source 'LPO' is selected.
The frdm_ke17z512 has no 32KHZ OSC, the RTC clock comes from SOSC,
RTC_CLKIN, LPO 1KHZ. But usually the SOSC is connected with 8MHZ
oscilator, so only 1kHZ LPO is usable.
Update the nxp,kinetis-rtc.yaml to select RTC clock source.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-13 09:50:13 +01:00
Anke Xiao
9491e726ff drivers: pwm: update pwm_mcux_pwt.c
Skip period and pulse width capture configurations that
specific flags are not supported on ke17z.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-13 09:50:06 +01:00
Raffael Rostagno
cd27198727 intc: esp32c6: Fix for interrupt controller
Fixes repeated allocation of interrupt sources by successive calls
to esp_intr_alloc or esp_intr_enable for the same source.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-13 09:49:49 +01:00
Benjamin Gwin
47a0813561 drivers: serial: pl011: Fix ignored const qualifiers
When trying to build Zephyr with -Wignored-qualifiers this leads to a
compiler warning like:

zephyr/drivers/serial/uart_pl011_registers.h:40:1: error: type
qualifiers ignored on function return type [-Werror=ignored-qualifiers]

Since the return value is copied by the caller, making it const has no
effect and the compiler warns that this is being ignored. This enables
applications to build with additional compiler warnings turned on.

Signed-off-by: Benjamin Gwin <bgwin@google.com>
2024-08-12 19:25:34 -04:00
Armin Kessler
237c49acb8 drivers: dma: esp32: added support for multiple descriptors
Previously, configuring the GDMA was limited to a single descriptor,
restricting memory transfers to a maximum of 4kB.
This update introduces support for multiple descriptors, enabling users
to define multiple dma_blocks. The maximum number of descriptors can be
configured via the CONFIG_DMA_ESP32_DESCRIPTOR_NUM option.
Additionally, the dma_get_status() function now reports the index of the
currently processed descriptor
through the status.read_position and status.write_position fields.

Signed-off-by: Armin Kessler <ake@espros.com>
2024-08-12 19:23:38 -04:00
Manuel Argüelles
2786cb9512 drivers: intc: gic: implement set pending interrupt
Implement a function to set pending interrupts for Arm GIC.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-08-12 15:54:42 +02:00
Jan Peters
b8bef42add device_dt_metadata: handle dt_meta being NULL
Using  DEVICE_DEFINE, a device without a corresponding DT node can be
defined (for example CRYPTO_MTLS), Z_DEVICE_INIT() does not initialize
dt_meta for such devices, leaving the field as NULL.
device_get_dt_nodelabels() and functions calling it have to handle
dev->dt_meta == NULL to prevent fatal errors.

Signed-off-by: Jan Peters <peters@kt-elektronik.de>
2024-08-12 15:54:22 +02:00