Commit graph

25,525 commits

Author SHA1 Message Date
Sylvio Alves
d0d7a7909e driver: uart: esp32: get port number from reg address
ESP32 uart driver requires uart port number to its low level calls.

In case uart0 is disabled and uart1 is enabled, driver will set
default port num to 0 when it should be 1. This fixes this scenario
by retrieving uart pot number based on periphral address.

Fixes #69973

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-03-12 09:48:36 +00:00
Mark Wang
32ce6ef997 drivers: serial: uart_mcux_lpuart: support the flow control pin mux
Configure the pins of flow control if it is added in device tree.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-03-12 09:46:50 +00:00
Bartosz Sokolski
8c6e3a6d41 drivers: i2s_nrfx: Fix divider calculation
The driver wrongly handled perfect divider matches for clock setting

Signed-off-by: Bartosz Sokolski <bartosz.sokolski@nordicsemi.no>
2024-03-12 09:44:29 +00:00
Henrik Brix Andersen
019fde0437 drivers: can: take minimum supported bitrate into consideration
Take the minimum supported bitrate into consideration when validating the
bitrate.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-12 10:43:36 +01:00
Henrik Brix Andersen
c769da9e55 drivers: can: add can_get_min_bitrate() API function
Add a new CAN controller API function can_get_min_bitrate() for getting the
minimum supported bitrate of a CAN controller/transceiver combination.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-12 10:43:36 +01:00
Henrik Brix Andersen
621515ccf7 drivers: can: sja1000: allow front-ends to specify minimum bitrate
Allow frontend drivers based on the SJA1000 backend to specify a minimum
supported bitrate.

The ESP32 TWAI supports bitrates from 25kbit/s to 1Mbit/s.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-12 10:43:36 +01:00
Henrik Brix Andersen
6d35ec718f drivers: can: add support for specifying minimum supported CAN bitrate
Add support for specifying the minimum bitrate supported by a CAN
controller in CAN_DT_DRIVER_CONFIG_GET() and
CAN_DT_DRIVER_CONFIG_INST_GET().

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-12 10:43:36 +01:00
Guillaume Gautier
e91860d8c7 drivers: adc: stm32: disable dma before calibration
For some STM32 series, DMA has to be disabled before starting ADC
calibration.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-03-12 10:41:55 +01:00
Benedikt Schmidt
b47c66e3f2 drivers: adc: implement voltage biasing for ADS114s08
Implement voltage biasing on the inputs of the ADC ADS114s08.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-03-11 19:34:34 -04:00
Gustavo Silva
722e04da3c flash: stm32: configurable write block sizes
Add new devicetree bindings for F4 and L1 series for configuration of
block size used in flash write operations.

Allow byte-size write operations in `flash_stm32f1x.c`. This file is
being shared between F0, F1, F3, L0 and L1 series. L0 and L1 series
allows for single byte writes.

Signed-off-by: Gustavo Silva <gustavograzs@gmail.com>
2024-03-11 18:57:43 +00:00
Marcin Niestroj
227462eda9 drivers: counter: stm32: move reset_dt_spec from data to config
Move 'reset' member, which is const, from driver data to driver config.
This allows to reduce flash usage by few bytes.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-03-11 17:55:17 +00:00
Benedikt Schmidt
d03778f9e6 drivers: adc: reset data ready signal for ADS114s0x
Reset the data ready signal for a new read operation
with a ADS114s0x.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-03-11 17:23:54 +01:00
Armin Brauns
444018f133 drivers/sdmmc_stm32: add eMMC support
The only difference is calling HAL_MMC_*() instead of HAL_SD_*() functions,
and removing the card detect logic.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-03-11 17:23:38 +01:00
Kyle Kotowick
0d53af4aa1 drivers: dacx0508: fix for multiple DACs of the same type
Presently, this driver cannot handle multiple
DACs of the same type without throwing a
compile error due to a missing line ending.
This PR fixes that issue by adding the missing
line ending.

Signed-off-by: Kyle Kotowick <kotowick@invictonlabs.com>
2024-03-11 17:22:56 +01:00
Ali Hozhabri
bcf2ee9d49 drivers: bluetooth: hci: Special handling of hci_reset only for ST SPI v1
Exclude devices based on ST SPI protocol v2 from special handling of
hci_reset opcode as it is redundant.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-03-11 15:13:48 +00:00
Ali Hozhabri
9d8d20febb drivers: bluetooth: hci: Support raw mode in ST HCI SPI BT driver
Add raw mode in ST HCI SPI BT driver to support host-less configuration.

Remove compilation dependency for BT_QUIRK_NO_RESET as it applies to all
configurations.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-03-11 15:13:48 +00:00
Ali Hozhabri
35ae3e5353 drivers: bluetooth: hci: Move bt_spi_send_aci_config to setup function
Move bt_spi_send_aci_config to setup function.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-03-11 15:13:48 +00:00
Bartosz Sokolski
238b9be5ee drivers: i2s_nrfx: add support for divider setup on NRF54L15
Add support for NRF54L15 divider setting which is same as on NRF5340

Signed-off-by: Bartosz Sokolski <bartosz.sokolski@nordicsemi.no>
2024-03-11 14:42:18 +00:00
Ryan McClelland
f41c900b03 drivers: regulator: fix shell help typo
Fix typo with adget shell help

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-03-11 10:18:18 -04:00
Alberto Escolar Piedras
f9d5e8458c drivers/counter nrfx: Fix with DT instance not matching device instance
478530ec0aa1fe5f481786c25d50f7a081b22208 introduced a bug
where if the DT index while iterating its DT structure
initialization does not match the actual peripheral instance,
or if the device instance string is not just a simple integer,
but a more complex string like "00", or "02", either
the wrong peripheral address would be used, or the file
would failt to compile.

Let's fix this by reverting that change, and instead, for
simulation converting the hardcoded DT/real HW address
to the valid addr for simulation on the fly.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-11 14:09:16 +00:00
cyliang tw
47ed29bf49 drivers: flash: support for Nuvoton numaker series RMC
Add Nuvoton numaker series flash memory controller(RMC) with erase,
 read & write features of soc-flash.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-03-11 14:22:55 +01:00
Alexandre Poizat
0195f774ba drivers: adc: stm32: disable ADC before writing oversampling bits for g0
Added the STM32G0X SOC series to the list of SOC that need to disable the
ADC while setting the oversampling bits to prevent writing over the
CKMODE bits.

Signed-off-by: Alexandre Poizat <apoizat@kalrayinc.com>
2024-03-11 14:21:13 +01:00
Henrik Brix Andersen
6fa13e20e3 drivers: can: shell: properly sort mode table entries
Properly sort the entries in the can_mode_t translation table.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-11 14:20:50 +01:00
Jamie McCrae
cba1e34ef0 drivers: clock_control: Fix npcx leakage
Fixes an issue with Kconfig for this leaking into all devices where
it should not be

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-03-11 07:57:49 -04:00
Alberto Escolar Piedras
ad7086a2df drivers counter nrfx RTC: Fix ISR prototype
The ISR prototype is not matching the
signature for interrupt handlers, which results in
build warnings.
Let's fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-08 19:00:46 +01:00
Angelo Dureghello
06df4b5ae9 drivers: ethernet: adin2111: fix real rx frame size
Fix issue related to "generic SPI" mode only, when a packet of
1512 bytes is received, net_pkt_write() fails and thrwos the error:

"Still some length to go 2".

This is due to net_pkt_rx_alloc_with_buffer() allocating a maximum
mtu/size of 1514, and driver is not removing 4 bytes of crc32 from
rx buffer, that comes to be 1516 (2 bytes over buffer limit).

Fix generic SPI rx frame size removing crc32 bytes.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-03-08 18:04:06 +01:00
Angelo Dureghello
0ca8b0756b drivers: ethernet: adin2111: add Open Alliance SPI support
Add Open Alliance spi protocol support.

Open Alliance is a chunk-based SPI protocol, based on sending
over SPI an ethernet frame divided in smaller chunks, using a
specific 32-bit header for each chunk transferred. All chunks
can be sent or received by a single dma transfer.

Default mode is set to Open Alliance SPI without protection,
since the adin2111 dev. board comes shipped this way.

Tested:
- Open Alliance SPI, no protection (default board shipped)
- Open Alliance SPI, protection
- Generic SPI, no crc
- Generic SPI, with crc8

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-03-08 18:04:06 +01:00
Angelo Dureghello
06c8460a9e drivers: ethernet: adin2111: remove unused header_len variable
Non functional change, removing unused variable producing
compilation warning in "Generic SPI without CRC8" mode.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-03-08 18:04:06 +01:00
Angelo Dureghello
27f2cfb797 drivers: ethernet: adin2111: fix generic spi withotut crc8 mode
After some debugging related to non-working "Generic SPI without CRC"
mode in eval_adin2111_ebz (CONFIG_ETH_ADIN2111_SPI_CFG0=n), noticed
that even after proper STATUS0 RESETC bit detection, registers,
for a certain period (some msecs) still reads as zero.

This patch fixes adin2111_await_device and with it the
"Generic SPI without CRC" mode.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-03-08 18:04:06 +01:00
Angelo Dureghello
5784a3a78f drivers: ethernet: adin2111: always append crc32 to the eth frame
Enable appending of a crc32 at the end of the frame by the MAC,
always. This is always needed since the driver is not adding it.

This field has nothing to do with Generic SPI protocol-related
8-bit CRC, so this patch removes the CONFIG_ETH_ADIN2111_SPI_CFG0
choice related to this setting.

Testing without this flag set, packets are not forwareded in the
network, since the driver is not appending any crc32 header
to the frame.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-03-08 18:04:06 +01:00
Angelo Dureghello
a653d59b65 drivers: ethernet: adin2111: fix imask1 tx_ready_mask
Fix IAMSK1 TX_READY_MASK bitfield position.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-03-08 18:04:06 +01:00
Elias Speinle
c9c98d07e7 drivers: eth: esp32: support setting mac address during runtime
Add support for setting the mac address of the esp32
during runtime.

Signed-off-by: Elias Speinle <e.speinle@vogl-electronic.com>
2024-03-08 15:19:22 +00:00
Emil Gydesen
a5c2781c04 drivers: Bluetooth: HCI: Reduce logging of No available ISO buffers
In the case that there are no more ISO buffers left,
"No available ISO buffers" is logged. However, given the
nature of ISO where we are (very) likely to get additional ISO
very soon after (typically every 7.5 or 10ms for audio),
this will get logged a lot, and the logging may in some
cases actually prevent the application from handling and
freeing existng buffers due to the immense logging,
which may make this (minor) issue into a blocking issue.

This is fixed by reducing the logging to the first
occurence, and then only every 100 afterwards, which has
shown to reduce the risk of this effectively blocking
the application.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-03-08 15:18:54 +00:00
Ioannis Karachalios
96677e402e drivers: display: smartbond: Add support for the display driver class.
Exhibit Renesas LCD controller's driver implementation. The driver
is intended to employ the controller in the continuous mode so
it can drive display panels in the parallel RGB mode.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-03-08 10:21:06 +00:00
Miika Karanki
004c4769e3 drivers: flash: stm32 ospi refactor stm32_ospi_mem_erased args
Change to use dev pointer, from where the other parameters were
available as well.

Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
2024-03-08 09:39:07 +01:00
Miika Karanki
5d9acf52a5 drivers: flash: stm32 ospi: implement non busy wait polling
HAL_OSPI_AutoPolling is checking is the status match
happened in a busy loop. That CPU intensive operation
can cause starvation of other tasks especially on flash
erase operations which can take seconds to complete.

So, replace the use of HAL_OSPI_AutoPolling with
HAL_OSPI_AutoPolling_IT. The match results
HAL_OSPI_StatusMatchCallback being called.

Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
2024-03-08 09:39:07 +01:00
Laurentiu Mihalcea
b803e06099 drivers: dai: sai: use "dmas" property for handshake encoding
Since a DMA cell now allows specifying a channel and a MUX value
there's no need to fetch these values from the HAL. This, in turn,
allows for more flexibility and reduces the coding effort for new
platforms that want to use the SAI driver.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-03-08 09:38:25 +01:00
Lukasz Madej
f14228744f drivers: charger: charger_max20335: handle charger notifications
Add support for status and online notification properties.
Fire these notifications from int_routine_handler work directly.
Such approach makes the code cleaner and does not affect overall
max20335 interrupt processing performance. However application code
processing these notifications cannot be blocking.

Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
2024-03-08 09:38:03 +01:00
Pieter De Gendt
d288452ce1 drivers: ethernet: eth_adin2111: Fix build warning on 64bit
An overflow compiler warning is generated when building for native_sim_64,
add an explicit cast to fix -Werror builds.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-08 09:37:15 +01:00
Grzegorz Swiderski
f91323ee5d drivers: flash: Add flash driver for MRAM
Basic driver utilizing the flash API for NVM operations on the nRF54H20.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-03-08 09:36:04 +01:00
Tomi Fontanilles
fd5c76ddfd drivers: modem_cellular: allow leaving out the chat_filter parameter
Allow not specifying the chat_filter parameter in a device
definition, which is equivalent to setting it to "".

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-03-07 21:38:24 +00:00
Benedikt Schmidt
c08b66cfee drivers: adc: set name for acquisition thread of MCP320x
Set the name of the acquisition thread for the ADC MCP320x.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-03-07 21:37:54 +00:00
Robert Lubos
35502592a7 drivers: input: Fix uninitialized closest_mv variable warning
Building with GCC 9.4.0 gives the following warning/error:

  error: closest_mv may be used uninitialized in this function

This commit fixes it.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-03-07 21:37:40 +00:00
Emilio Benavente
9815296500 dts: arm: Enabling pit for imx devices
Enabled the PIT and Multi channel support
for some of the rtXXXX devices.
- rt1010
- rt1060
- rt1160
- rt1170

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-03-07 13:23:58 -06:00
Emilio Benavente
8bb95d33be drivers: counter: Adding Mutli Channel PIT Support
Updating the nxp,pit driver to support mutliple
channels. Updating the dts and board overlays
to account for the changes.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-03-07 13:23:58 -06:00
Emilio Benavente
9cb330e1ed drivers: counter: update nxp_pit api names
Update the api named for the new nxp pit
driver.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-03-07 13:23:58 -06:00
Emilio Benavente
04b240c830 dts: bindings: renamed binding used for pit
Renamed pit binding from nxp,kinetis-pit
to nxp,pit

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-03-07 13:23:58 -06:00
Gerard Marull-Paretas
80cc7d1ee5 drivers: mbox: update MBOX consumers to the new API
Update all usages of the MBOX API to the latest API changes (to be
squashed for bisectability).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-03-07 14:32:57 +00:00
Gerard Marull-Paretas
8be65b6608 drivers: mbox: refactor API
This patch refactors the MBOX API, so that it aligns with some common
Zephyr principles, main changes include:

- There is now a non-DT specific API that takes a regular struct device
  and a channel identifier, instead of a struct that contains both. This
  API should be used for cases where DT is not an option.
- There is a "dt-spec" variant of the API, meant to be used from
  devicetree specifications.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-03-07 14:32:57 +00:00
Gerard Marull-Paretas
e43ffcb5cd drivers: mbox: nxp_mailbox: add missing include
Add irq.h for IRQ_CONNECT.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-03-07 14:32:57 +00:00