Commit graph

24538 commits

Author SHA1 Message Date
Pisit Sawangvonganan
a378440116 drivers: intc: stm32: correct inconsistent parameter names
Correct several inconsistent parameter names in the following functions:
- stm32_gpio_intc_select_line_trigger: rename `trigger` to `trg`
  to match the header file.
- stm32_gpio_intc_set_irq_callback: rename the callback argument to `user`
  to match the `stm32_gpio_irq_cb_t` type.
- stm32_exti_get_line_src_port: rename `pin` to `line` to align with
  the Doxygen comment and implementation.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-10-07 17:12:34 +01:00
TOKITA Hiroshi
3f6bddc2bf drivers: mipi_dsi: Change MIPI_DSI priority to the same as DISPLAY
These priorities can be resolved automatically with the sub-priority
mechanism, so set them to the same value.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-07 17:11:58 +01:00
TOKITA Hiroshi
ef3847c3d8 drivers: mipi_dsi: Add dummy driver for vnd,mipi-dsi
Add dummy driver for "vnd,mipi-dsi" to use in build_all tests.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-07 17:11:58 +01:00
Guillaume Gautier
9566d4ecb5 drivers: adc: stm32: add a check for asynchronous clock source
Add a compile-time check to verify that a domain clock is explicitly
defined if a STM32 ADC is configured to use an asynchronous clock.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-07 13:40:06 +02:00
Guillaume Gautier
46d4be75e0 drivers: clock_control: st: add missing bus source clocks
Add missing bus source clocks for STM32H5, U5 and WBA

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-07 13:40:06 +02:00
Mateusz Holenko
aa7c367f44 drivers: led_strip: Fix formatting of log message
The previous version generated compilation warnings.

Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2024-10-07 13:39:59 +02:00
Ian Morris
627c33292a boards: mikroe: remove CONFIG_PINCTRL from defconfig of RA4M1 clicker
This PR fixes #78619 for the Mikroe RA4M1 Clicker board.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-10-05 14:05:48 -04:00
Ryan McClelland
ae63c62f0e drivers: i3c: implement support for ibi thr interrupts
Some IBI TIR packets can be larger than the ibi data fifo size
which can prevent it from receiving the full packet. This adds
a data struct in to the driver data where data can be pushed
to as data is being transfered.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-10-05 14:04:25 -04:00
Ryan McClelland
31e821bef6 drivers: i3c: cdns: grab mutex before adjusting prescalers
Grab the mutex before adjusting the prescalers to make sure no
transaction is on going.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-10-05 14:04:25 -04:00
Ryan McClelland
9c48f7eb37 drivers: i3c: cdns: correct sda push pull hold time
correct the comments and timing for the sda push-pull hold time
configuration.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-10-05 14:04:25 -04:00
Martin Stumpf
4ec266152d drivers: cc: mcux: Fix incorrect clock source of FlexSPI2
The clock control mcux rev2 returns FlexSPI1 clock rate when FlexSPI2
clock rate is requested.

Signed-off-by: Martin Stumpf <martin.stumpf@vected.de>
2024-10-04 22:52:39 +01:00
Daniel DeGrasse
22a922fded drivers: mipi_dbi: nxp_lcdic: add support for 8080 mode
Enable support for 8 bit 8080 mode in the NXP LCDIC driver. Support
for programming the minimum duration of the write active/inactive signal
is also added, since this will be required to support high display
clocks in 8080 mode.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-04 22:50:45 +01:00
Daniel DeGrasse
04726a22cb drivers: display: st7796s: respect rgb_is_inverted in 8080 8 bit mode
Update ST7796s display driver to respect the setting of rgb_is_inverted
in 8080 8 bit mode, as it was previously not applied for this mode.

Also, simplify the logic check for 16 bit mode- the new check is
functionally equivalent, but no longer inverts both boolean values.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-04 22:50:45 +01:00
Yong Cong Sin
796b795cda drivers: intc: plic: fix for SMP=n when MP_MAX_NUM_CPUS > 1
The functions to obtain the address are hardcoded to return
the address of the first core when `CONFIG_SMP != y`, this
causes an issue with enabling an IRQ when there are more than
one core in the system (`CONFIG_MP_MAX_NUM_CPUS > 1`), as the
driver would first enable the IRQ on the first core, and when
it tries to obtain the address for the following cores and
disable the IRQ on them, the functions continue to return the
address of the first core, causing the IRQ to be disabled
on the first core.

Fix this by determine if `CONFIG_MP_MAX_NUM_CPUS > 1` instead
of `CONFIG_SMP=y` when returning the address.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-04 10:50:14 +01:00
Krzysztof Chruściński
242331291d drivers: misc: coresight: nrf_etr: Imply UART asynchronous API
Asynchronous API is recommended to be used by ETR buffer handler but
polling is also supported. Imply UART_ASYNC_API so that it is possible
to disable it in project config and fall back to polling if needed. For
example to reduce memory footprint.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-04 10:46:54 +01:00
Tomasz Moń
508bd3edef drivers: udc_dwc2: Change hibernation exit on bus reset
Adhere to programming guide steps on Hibernation Exit on Host Initiated
Reset.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-10-03 17:08:36 +01:00
Tomasz Moń
f57e78de2a drivers: udc_dwc2: Suspend if connected to suspended bus
Peripherals are required to support the suspend state whenever VBUS
is powered, even if bus reset has not occurred (Mandate: Required,
Effective Date: February, 2010).

Remove the stale suspend check that essentially prevented the device
from hibernating when connected to already suspended bus.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-10-03 17:08:36 +01:00
Yong Cong Sin
52a202309b zephyr: bulk update to DT_NODE_HAS_STATUS_OKAY
Change instances of:

DT_NODE_HAS_STATUS(<node_id>, okay)

to

DT_NODE_HAS_STATUS_OKAY(<node_id>)

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-03 17:06:52 +01:00
Andrew Sonzogni
44d101acab drivers: sensor: lis2dw12: add interrupt status fetch
INT status can be fetched if the feature can't trigger via interrupt

Signed-off-by: Andrew Sonzogni <andrew@safehear.fr>
2024-10-03 11:41:51 +01:00
Andrew Sonzogni
70de35d9c9 drivers: sensor: lis2dw12: add inactivity detection
Add inactivity mode or stationary detection

Signed-off-by: Andrew Sonzogni <andrew@safehear.fr>
2024-10-03 11:41:51 +01:00
Andrew Sonzogni
c74dd3ee74 drivers: sensor: lis2dw12: add temp reading
adds support for reading temperature
Signed-off-by: Andrew Sonzogni <andrew@safehear.fr>
2024-10-03 11:41:51 +01:00
Yong Cong Sin
c710f8892b drivers: intc: plic: implement irq affinity configuration
- Implement irq-set-affinity in RISCV PLIC.
- Added new affinity shell command to get/set the irq(s)
  affinity in runtime, when `0` is sent as the `local_irq`, it
  means set/get all IRQs affinity.
- Some minor optimizations

Updated the build_all test to build this new configuration.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-02 13:48:05 -05:00
Jori Rintahaka
a3f2ba1928 drivers: bluetooth: silabs: move code from module to main tree
The code that handles passing events to and from the controller
resided in the hal_silabs module. This is an integral part of the
HCI driver that it can't work without, and logically belongs in
the driver.

Signed-off-by: Jori Rintahaka <jori.rintahaka@silabs.com>
2024-10-02 13:42:56 -05:00
Georgij Cernysiov
d8c0a67d7b drivers: ethernet: adin2111: fix generic spi frame reception
Fixes a bug that results in double RX buffer read from ADIN
when generic SPI protocol is used.

Actual frame size to be read must be RX_FSIZE - HEADER.
If we read less amount of bytes, then ADIN raises an IRQ or
signals via Pn_RX_RDY that there is another frame available, as
we fail to read the whole frame.

The fix for "Still some length to go 2" is still present, we drop
the CRC32 bytes from the frame prior allocation and network
stack pass.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-10-02 13:40:42 -05:00
Daniel Gaston Ochoa
bce51b7706 drivers: spi: stm32h7: avoid unnecessary suspend
The SPI stm32 H7 driver always suspends the SPI transaction
when finishing the transceive operation. This, according to
the stm32 H7 datasheet, must only be done when the SPI master
is configured as receive-only, and the driver always
configures it as full-duplex.

Hence, remove this unnecessary operation for clarify and for
a potential reduction in the minimum time between SPI
transceive operations.

Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
2024-10-02 14:42:48 +01:00
Fabio Baltieri
f98fde07b3 devicetree: make DT_..._REG_ADDR return unsigned
`DT_..._REG_ADDR` macros do not always return an unsigned value. This
commit adds and unsigned 32bit prefix to ensure the value is always
unsigned.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-10-02 14:41:32 +01:00
Florian Grandel
117a0098f3 drivers: flash: simulator: fix address resolution
The flash simulator assumes that flash is being addressed with absolute
addresses by clients. But this is not the case. Given addresses are
relative to the flash base address.

The existing code only worked because the base address was always zero.
Testing with non-zero base addresses caused a mem fault/page fault.

(Reproducible e.g. when using the NVS settings subsystem on QEMU x86
with a non-zero base address in the soc-nv-flash node.)

Fixes #79082

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-10-02 10:12:27 +02:00
TOKITA Hiroshi
773d50e072 drivers: sensor: mc3419: Change the TRIGGER config to a typical
Because MC3419's TRIGGER's Kconfig was different from the typical
configuration, the `build_all` test settings were not correctly
applied.

The Kconfig configuration has been revised to be set in conjunction
with MC3419_TRIGGER_OWN_THREAD, even if MC3419_TRIGGER is not
explicitly specified.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-02 10:05:58 +02:00
Mathieu Choplain
5a0775b1ab dts: bindings: stm32-temp*: align 'avgslope' to datasheet format
Change the STM32 Temperature Sensor bindings to accept the average slope
value in string form instead of integer. With this change, it is possible
to use the raw decimal value found in each MCU's datasheet instead of
needing to scale it (differently depending on series!). This also allows
regrouping the property in a single file to reduce duplication.

Also update all DTSI files affected by this change and the dietemp driver
to accept the property's new format.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-02 10:03:03 +02:00
Mathieu Choplain
7f44ecb06a drivers: sensor: stm32_temp: update and comment conversion code
Update all the conversion code in the STM32 dietemp sensor driver to be
more readable and match the Reference Manuals. Additionally, comment all
the code to make it easy to understand.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-02 10:03:03 +02:00
Mathieu Choplain
dabcd605a8 drivers: sensor: stm32_temp: read calibration data in dedicated function
Move the reading of calibration data from manufacturing flash to a
dedicated function. This makes introduction of new STM32 series easier.

Additionally, use the sys_read16 primitive to read data instead of
manipulating and dereferencing raw manufacturing flash pointers.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-02 10:03:03 +02:00
Mathieu Choplain
2ef666a15c drivers: sensor: stm32_temp: make driver data field names closer to RM
Rename the fields of the STM32 dietemp sensor driver data structure to
match the names in Reference Manual more closely, and add documentation
comments to all of them.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-02 10:03:03 +02:00
Mathieu Choplain
70bf26b358 drivers: sensor: stm32_temp: convert samples in dedicated function
Factor out the ADC-sample-to-temperature conversion logic from the sensor
subsystem API implementation, and move it to a dedicated function.

This makes the driver more readable.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-02 10:03:03 +02:00
Mathieu Choplain
d307221065 drivers: sensor: stm32_temp: enable/disable channel in separate functions
Moves the temperature sensor channel enable and selection to separate
functions. This improves the driver's readability and makes introduction
of new STM32 series easier.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-02 10:03:03 +02:00
Kurtis Dinelle
5eeff698ca sensor: tsl2591: fix: Address CID 353644 & 353654
Fixes implicit sign-extension/potential overflow by explicitly casting
to int64_t.

Signed-off-by: Kurtis Dinelle <kurtisdinelle@gmail.com>
2024-10-02 10:01:43 +02:00
Jordan Yates
0425b04fc3 serial: uart_nrfx_*: update tx_ready return codes
Update nrfx drivers with the minimum number of bytes that can be sent
in a single call to `uart_fifo_fill`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-02 09:56:45 +02:00
Jordan Yates
3e5c72a0ee serial: async_to_irq: update tx_ready return
The async IRQ shim supports writes of any size up to the TX buffer size.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-02 09:56:45 +02:00
Jordan Yates
81352d011f serial/usb: update struct ring_buf users
Update the interrupt driver UART drivers that use `struct ring_buf`
internally to report the number of bytes that can be pushed in
`uart_fifo_fill` without fragmentation.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-02 09:56:45 +02:00
Raffael Rostagno
724376de33 drivers: clock_control: esp32: Fix for UART baud
Fixes UART baud rate adjustment for ESP32 devices.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-10-02 09:52:23 +02:00
Ian Morris
92ec60f5ab drivers: sensor: renesas: Move to vendor subdirectory
Moves all Renesas sensor drivers into a vendor specific subdirectory
matching the organization used for other drivers.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-10-02 09:51:54 +02:00
TOKITA Hiroshi
1f30346d4f drivers: dac: Add dummy driver for vnd,dac
Add dummy driver for "vnd,dac" to use in build_all tests.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-02 09:51:19 +02:00
TOKITA Hiroshi
00eaa850b2 drivers: input: sbus: Fix incorrect index reference of INPUT_SBUS_INIT
The argument of INPUT_SBUS_INIT is named `n,` but there are some places
where it references `id.`  Correcting these.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-02 09:50:22 +02:00
TOKITA Hiroshi
e9adbe4077 drivers: input: sbus: Remove unused pinctrl.h including
This source does not reference any pinctrl functions.
Removing the unused header.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-02 09:50:22 +02:00
Alberto Escolar Piedras
3ee9b40a5a eeprom sim: Enhance & refactor native part so it works w emb libCs
For the parts of the simulator which are dedicated for the native
platforms (POSIX arch based):
* Refactor the parts that interacts with the host, so it is possible to
  use it also with embedded libCs
* Enhance it with more options to allow:
  * Keeping the content just in RAM
  * Erasing the EEPROM file at exit
  * Clearing the file at boot
* Also show in the command line help the default file name.

As part of this:

* Update the kconfig dependencies, so we allow building it with other
  C libraries in the native targets
* Update the table in the native_sim docs to indicate all C libraries
  are supproted now

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-02 09:48:12 +02:00
Vladislav Pejic
fe5bfc9eb2 driver: sensor: adxl372: Bug fix for status2 reg
This is a bug fix for adxl372_get_status function.
This function is used to get STATUS1, STATUS2, FIFO_ENTRIES2
and FIFO_ENTRIES1 registers (they are continuously present
in the memory in this order). User can choose if it wants
STATUS2 and/or FIFO registers by passing pointers where
to store received values. Bug was when user doesn't want
STATUS2 and want FIFO regs. In that case calculated length
would be 3 which will result in reading of STATUS1, STATUS2
and FIFO_ENTRIES2 regs and not expected STATUS1, FIFO_ENTRIES2
and FIFO_ENTRIES1.

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2024-10-02 09:47:12 +02:00
Tom Chang
080787f5b7 drivers: espi: npcx: update the parsing function for espi taf
This commit updates the FLASHRXBUF parsing functionality of eSPI TAF.
It ensures that data can be read correctly from FLASHRXBUF[0].
And, the eSPI TAF request can be parsed correctly.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-10-01 10:48:43 +01:00
Alberto Escolar Piedras
517d51e33a drivers/timer native_posix: Allow without BOARD_NATIVE_POSIX
This driver works both with native_posix and native_sim.
native_sim will eventually not set NATIVE_SIM_NATIVE_POSIX_COMPAT
(i.e. not pretend to be native_posix) so let's correct the
dependencies.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-01 10:47:55 +01:00
Francois Ramu
ff34d575bc drivers: flash: stm32 qspi flash driver with unprotect command
Add the write_unprotect command to the stm32 qspi flash driver
to un protect flash before any write operation to the external quad-NOR

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-10-01 09:52:34 +02:00
Francois Ramu
76740ae1d1 drivers: flash: qspi stm32 driver supporting requires_ulbpr
Add the support of the requires_ulbpr property when a Microchip
quad-spi flash is mounted.
Set the CONFIG_USE_MICROCHIP_QSPI_FLASH_WITH_STM32=y flag to access
the command

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-10-01 09:52:34 +02:00
Lucas Tamborrino
6c99888bfe drivers: video: esp32: Fix unused variables
Fix build warning for unused variables.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-10-01 09:51:46 +02:00