Commit graph

23353 commits

Author SHA1 Message Date
Arkadiusz Balys
2de6274119 drivers: flash: Do not select NRFX_RRAMC while building with TF-M
RRAMC peripheral is a secure-only peripheral, and the application
cannot use it directly. While building an application with TF-M
enabled and SOC_FLASH_NRF_RRAM the NRFX_RRAMC selection must
be forbidden.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
2024-08-06 15:42:44 +01:00
Gerard Marull-Paretas
5e3188605e drivers: pinctrl: nrf: add support for nordic,clock-enable
Driver will be capable of retrieving such property from DT and apply it
accordingly.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
65b45e5760 drivers: serial: nrfx_uarte: add support for arbitrary peripheral clock
Some UARTE instances may be clocked at higher speeds than 16MHz, so the
baudrate setting needs to be scaled accordingly. This patch parses the
`clocks` property and obtains the clock-frequency property of the
associated clock, assuming it is a fixed-clock. We should ideally have a
proper clock control subsystem where frequency can be queried using an
API, but we're far from there.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Damian Nikodem
ed31037d5f drivers: ssp: fix program of MLCS register
Programming of the MLCS register was performed on the incorrect bits.
Additionally, saving the new version did not erase the previously set
value, which could result in an incorrect register value.

Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
2024-08-06 10:28:16 +02:00
Chaitanya Tata
638ce2fbfd drivers: wifi: Add nRF70 Wi-Fi driver
Driver for Nordic nRF70 Wi-Fi6 companion chipset, depends on
hal_nordic/nrf_wifi for OS agnostic part of the driver.

This supports (Q)SPI interface to communicate from host to chip.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-06 10:27:21 +02:00
Shang Xiangyao
fae0f5bb77 drivers: input: cst816s: add cst816d support
The CST816D touch chip is similar to the CST816S, with the primary
difference being the chip ID. This commit extends the existing
CST816S driver to support the CST816D by adding its chip ID. There
are no other modifications.

Signed-off-by: Shang Xiangyao <shxyke@gmail.com>
2024-08-06 09:19:49 +01:00
Gerard Marull-Paretas
9d72903840 drivers: usb: use DT regulator properties
Instead of CONFIG_SOC_DCDC_NRF52X[_HV], about to be deprecated.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 09:17:10 +01:00
Flavio Ceolin
1fe98407ce espi: ite: Use proper flexible array
Use proper flexible array instead of a GNU extension.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-08-05 18:38:42 -04:00
Flavio Ceolin
15ac8407a6 i2c: ite: Use proper flexible array
Use proper flexible array instead of a GNU extension.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-08-05 18:38:42 -04:00
Flavio Ceolin
90870eb9b1 entropy: Use proper flexible array
Use proper flexible array instead of a GNU extension.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-08-05 18:38:42 -04:00
Flavio Ceolin
cbb9613d83 dai: intel/ssp: Use proper flexible array
Use proper flexible array instead of a GNU extension.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-08-05 18:38:42 -04:00
Declan Snyder
d4d56de4d4 drivers: bt_nxp: Use DT code partition if needed
Remove the logic from the board level about overriding the
flash load size and instead just select to use the DT code
partition if app is not expected to be able to occupy the
whole flash space because of the firmware image being
loaded separately.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-05 18:37:35 -04:00
Patryk Biel
59eb3eac92 lora: driver: sx12xx: fix driver recv func when RX error occurs
The sx12xx driver does not provide RxError event handler therefore
when such error occurs, the driver does not handle it at all.
As a result, when the lora_recv function is called with infinite timeout,
it never returns as it waits on k_poll forever, with radio operation mode
set to STDBY_RC. Therefore, once the rx error occurs, radio is no longer
able to receive any subsequent incoming transmission. Fix it by adding
RxError event handler which releases modem usage and signals error
allowing lora_recv to return with a value indicating receive error.
Tested on lora e5 mini by transmitting multiple LoRa messages over a
short period of time that caused CRC error, thus RX errors.
Once the fix is applied, the descibed behaviour no longer occurs despite
the CRC errors caused by test.

Signed-off-by: Patryk Biel <pbiel7@gmail.com>
2024-08-05 18:37:11 -04:00
Fin Maaß
c0396a9c5c drivers: ethernet: litex: add phy
add phy for litex liteeth ethernet.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-05 16:29:06 +02:00
Fin Maaß
4436a15f34 drivers: mdio: litex: add mdio driver
add a mdio driver for litex liteeth.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-05 16:29:06 +02:00
Fabian Pflug
ac8e578456 drivers: sensor: tmag5273: Add support for tmag3001
The TMAG3001 is quite similar to the tmag5273 and can be used with just
some small modifications.

Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>
2024-08-05 16:27:25 +02:00
Manuel Argüelles
896d8d6896 drivers: counter: nxp: convert STM to native driver
Convert NXP System Timer Module driver to a native driver.

Timer prescaler in tests is updated because short relative alarms
sometimes give false positives.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-08-05 07:35:57 -05:00
Ryan McClelland
5690088a5c drivers: i3c: only configure tsco for rev 1p4 and above
Adjusting T_sco is only support by revision 1p4 and above. Also,
correct the T_sco default time from 10ns to 8ns.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-08-05 11:32:36 +02:00
Alessandro Manganaro
4fc77248de drivers: bluetooth: hci: Fix stm32wb BLE behavior
Enabling BT_HCI_SETUP for STM32WB55 to have a
correct and proper initialization procedure to fix
#75318 issue

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2024-08-05 11:32:17 +02:00
Alessandro Manganaro
7ca2072ed0 drivers: bluetooth: hci: Fix stm32wb BLE behavior
Implementing HCI setup function to have a correct and proper
initialization procedure to fix #75318 issue

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2024-08-05 11:32:17 +02:00
Julia Azziz
e7cfb05c72 drivers: adc: fix missing ref_internal in adc_sam0
The .ref_internal field in the adc_driver_api
struct was previously unset.
Now it's set to the proper value, 1 V.

Signed-off-by: Julia Azziz <juliaazziz7@gmail.com>
2024-08-04 16:20:16 -05:00
Manuel Argüelles
b8928dfc3f drivers: watchdog: convert NXP SWT to native driver
Convert NXP SWT watchdog driver to a native driver and extend the
SWT supported functionalities and configuration options.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-08-03 05:58:46 -05:00
Raffael Rostagno
f4802dd7bd gdma: esp32: Modulate interrupts with low level calls
Use LL calls to enable/disable interrupts rather than make calls to the
interrupt controller.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-02 18:48:37 -05:00
Raffael Rostagno
1b72ec0329 dma: esp32c6: Added support to GDMA
Added support of GDMA driver for C6

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-02 18:48:37 -05:00
Matthias Alleman
931628a78a drivers: ethernet: nxp_enet: Fused MAC address fixes
Add required initialisation of OCOTP. The IMXRT10XX
variants don't support fuseWords to be greater than 1.
MAC0 fuse map address is 0x22 instead of 0x620.
Fill in mac_addr buffer correctly.

Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
2024-08-02 18:47:10 -05:00
Léo BRIAND
cf0c2a5275 drivers: wifi: eswifi: Fix memory buffer allocation in off_read_work
When receiving data over the eswifi module, we currently read the data
first, then allocate a buffer, and finally write the data into the
buffer. The issue is that if we can't allocate the buffer, the data
that was read is lost. To fix this, we should first attempt to allocate
the buffer before reading any data. If we can't allocate the buffer, we
should not proceed with reading the data. By allocating a buffer with
the MTU size, we can read the packet, write it into the allocated buffer
and then resize by removing unused allocated buffer with
net_pkt_trim_buffer().

Signed-off-by: Léo BRIAND <leo.briand@smile.fr>
2024-08-02 18:42:53 -05:00
Maksim Salau
eeb24400e1 drivers: eth: nxp,enet-qos: Fix MAC address check
Switch from `DT_INST_NODE_HAS_PROP(n, zephyr_random_mac_address)`
to `DT_INST_PROP(n, zephyr_random_mac_address)` since the property
is always present and we are interested in its value.

Signed-off-by: Maksim Salau <maksim.salau@gmail.com>
2024-08-02 18:36:11 -05:00
Manuel Argüelles
d2ba31d503 drivers: intc: nxp: convert wkpu to native driver
Convert NXP WKPU to a native driver, all existing functionalities are
retained.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-08-02 15:14:33 -05:00
Carles Cufi
ebd31d3916 drivers: hwinfo: Add support for generating device id from device addr
In some ICs (including nRF54H20) the DEVICEID register is not part of
FICR, and thus it is not accessible to applications. Use instead the
device address, along with a couple of bytes from ER and IR, to
generated a unique device id.

At the same time update the pointer to the hal_nordic repo to pull in
https://github.com/zephyrproject-rtos/hal_nordic/pull/196.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-08-02 13:49:54 +01:00
Vladislav Litvinov
95622e49b2 drivers: regulator: fix reference count underflow
Fixes regulator reference count underflow and adds error code
for attempting to disable an already disabled regulator

Signed-off-by: Vladislav Litvinov <vladislav.litvinov@nordicsemi.no>
2024-08-02 13:42:01 +02:00
Fin Maaß
7869e05649 dts: bindings: litex: rename uart compatible
Zero got removed from the litex
uart compatible, as it now supports
multiple instances.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-02 03:32:21 -04:00
Fin Maaß
9b6d783ceb drivers: serial: litex: support multiple instances
support multiple instances of the litex uart driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-02 03:32:21 -04:00
Fin Maaß
072abdcaec drivers: serial: litex: rename uart driver
As there is no LiteUART it is more fitting
to rename the uart driver. This way it is also
more coherent with the other drivers and will
match the conditions in the MAINTAINERS.yml.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-02 03:32:21 -04:00
Anke Xiao
c7562f7122 drivers: serial: uart_mcux.c: add a feature macro wrap specific code
The enableRxRTS and enableTxCTS can only be configured when the
'UART_HAS_MODEM_SUPPORT' feature is enabled.
Uart has no 'error' IRQ on frdm_ke17z512, so update irq configuration
to configure the error interrupt when it exists.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-02 03:31:38 -04:00
Jose Alberto Meza
c76e776b67 drivers: i3c: common: Do not tread GETCAPS failure as error for 1.0 device
If it's a I3C v1.0 device without any HDR modes do not treat as an error
if GETCAPS gives no valid response.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2024-08-02 03:30:47 -04:00
Daniel Kampert
3bf35ce696 drivers: rtc: Change error to ENODATA in get time function
- Change the error type from ECANCELED to ENODATA

Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
2024-08-02 03:29:41 -04:00
Joakim Andersson
0efbbcb7fd drivers: gnss: Handle malloc returning NULL pointer
Handle malloc returning NULL pointer, set err and return from function.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-08-02 03:29:18 -04:00
Joakim Andersson
76907ff399 drivers: gnss: Do not re-assign err from helper function
Do not re-assign err from helper function, this just causes loss of
information from the helper function.
Only possible err returned is -EINVAL, so not a functional change.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-08-02 03:29:18 -04:00
Lucas Tamborrino
7b27d4c9d5 drivers: adc: esp32: Fix calibration scheme for esp32s3
ESP32S3 requires ESP_ADC_CAL_VAL_EFUSE_TP_FIT calibration
scheme. The use of ESP_ADC_CAL_VAL_EFUSE_TP is not supported
in the SoC..

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-08-01 16:49:25 +01:00
Fabio Baltieri
f1a639ca9f console: ipm_console_sender: fix function naming camel case
Should be console_out not consoleOut.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-01 16:49:08 +01:00
Fabio Baltieri
e466efaf74 libc, console: declare __stdout_hook_install in libc-hooks.h
Declare __stdout_hook_install in libc-hooks.h and use it in the console
drivers rather than redeclare it every time.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-01 16:49:08 +01:00
Nikodem Kastelik
43128052e7 drivers: serial: nrf: add default value for frame timeout cfg
This is needed to avoid warnings about uninitialized
structure member, which was added in nrfx 3.6.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-08-01 16:45:04 +01:00
Théo Battrel
c1a2c5b8a8 Drivers: ssd1306: Respect segment-offset DTS property
Update `ssd1306_write_default` to take into account the `segment_offset`
property. This is needed for some displays to show the image correctly.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-08-01 16:44:24 +02:00
Théo Battrel
bfb541ccbe Drivers: ssd1306: Add use_internal_iref DTS option
Necessary for supporting for EastRising 0.42 OLED display/board.

Some boards don't have external Iref set up. This is probably done in an
effort to save on component cost. This command is only documented in the
V1.1 revision of the SSD1306 datasheet.

See issue https://github.com/olikraus/u8g2/issues/1047

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-08-01 16:44:24 +02:00
Mathieu Choplain
94c375ed2f drivers: sensor: stm32_vref: update incorrect comment
The ICACHE must be disabled on STM32H5 series due to documented
behaviour of the flash controller, not to an errata.

For a more technical explaination: (see RM0492 for references)
 -  on STM32H5, the ICACHE block is interposed on C-bus between
    the Cortex-M33 and the FLASH (§2.1.1)
 -  the ICACHE determines if accesses are cacheable or non-cacheable
    based on an AHB attribute; the Cortex-M33 sets this attribute or
    not depending on the MPU configuration (§8.4.6)
 -  when a cacheable access is requested by the Cortex-M33, if the
    requested data is not present in ICACHE (cache miss), a cache line
    refill (128-bit burst read) is performed (§8.4.7)
 -  however, all accesses to OTP and Read-Only regions of the FLASH must
    be done with caching disabled (§7.3.2); indeed, the accesses MUST be
    16 or 32-bit sized - otherwise, the flash interface raises a bus
    error (§7.5.9 / Table 38 "OTP/RO access constraints").

    This is the behaviour that was observed and lead to the introduction
    of ICACHE disable code in 065a8f25e1.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00
Mathieu Choplain
c77d5b8c3b drivers: sensor: stm32_vbat: handle disabled ADCs more gracefully
This commit modifies the STM32 battery voltage sensor driver
to handle erroneous usage more gracefully. More precisely,
it now fails builds with an explicit error message when the
sensor is enabled but the corresponding ADC is not. This can
only happen on STM32 series with more than one ADC (e.g., H7).

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00
Mathieu Choplain
1e0e3a874f drivers: sensor: stm32_vref: handle disabled ADCs more gracefully
This commit modifies the STM32 internal voltage reference sensor
driver to handle erroneous usage more gracefully. More precisely:
  - driver no longer builds if no ADC node is enabled
  - fail builds with an explicit error message when the sensor
    is enabled but the corresponding ADC is not. This can only
    happen on STM32 series with more than one ADC (e.g., H7).

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00
Mathieu Choplain
8d40279644 drivers: sensor: stm32_temp: handle disabled ADCs more gracefully
This commit modifies the STM32 internal temperature sensor driver
to handle erroneous usage more gracefully. More precisely:
 - driver no longer builds if no ADC node is enabled
 - fail builds with an explicit error message when the sensor
   is enabled but the corresponding ADC is not. This can only
   happen on STM32 series with more than one ADC (e.g., H7).

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00
Fin Maaß
d71ad169d4 drivers: spi: litex: add litespi driver
add litespi driver for flash.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 12:39:02 +02:00
Fin Maaß
0f3955cc80 drivers: spi: litex: rework spi driver
rework the litex spi driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 12:39:02 +02:00