Commit graph

17896 commits

Author SHA1 Message Date
Laurentiu Mihalcea bd9b3c67b2 drivers: dai: add driver for NXP's ESAI
This commit introduces a new DAI driver used for NXP's ESAI IP.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-03 16:18:50 +01:00
Erwan Gouriou fa4ab81f40 drivers: clocks_control: stm32wba: Fix erratum 2.2.4
Cf Errata sheet, 2.2.4: With HSE active, switching the system clock source
from any other source to HSI, spuriously deactivates HSE.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-04-03 15:38:55 +01:00
Erwan Gouriou 930e03fdfd drivers: clock_control: stm32wba: Fix chain loaded applications case
In case of chain loaded application with PLL set as the sysclk source,
directly exit the init function.
This also applies to exit from stop mode and was tested successfully.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-04-03 15:38:55 +01:00
Pieter De Gendt fcc729f240 drivers: spi: Support NXP i.MX ECSPI
Add a driver implementation for NXP's Enhanced Configurable SPI.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-04-02 21:03:47 -04:00
Erik Andersson 72503ab386 drivers: display: add driver for frida,nt35510
For now DSI settings are hard-coded for the specific
LCD module used on the STM32H747I Discovery board

Signed-off-by: Erik Andersson <erian747@gmail.com>
2024-04-02 21:03:10 -04:00
Erik Andersson 36e2b40e38 drivers: dsi: stm32: add additional dt options
To support the NT35510 display, some additional
options needs to be configurable in the STM32
DSI peripheral

Signed-off-by: Erik Andersson <erian747@gmail.com>
2024-04-02 21:03:10 -04:00
Declan Snyder 62b56bb313 drivers: ethernet: Add NXP ENET QOS Driver
Add driver for NXP ENET QOS Ethernet

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-02 21:02:25 -04:00
Declan Snyder e90fa0399b drivers: mdio: Add NXP ENET QOS MDIO Driver
Add driver for NXP ENET QOS MDIO

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-02 21:02:25 -04:00
Declan Snyder 8fdacb5e45 drivers: clock_control_mcux_syscon: Add ENET QOS
Add code for ENET QOS clocking in clock control driver

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-02 21:02:25 -04:00
Mahesh Mahadevan cbbe33996e drivers: i2c: Use the NXP Flexcomm driver for interrupt handling
The Low Power Flexcomm driver manages the interrupt handling
and provides an API to register interrupt callbacks.
Register the NXP LPI2C interrupt handler.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-04-02 21:00:24 -04:00
Mahesh Mahadevan 678e65093b dts: nxp_lpi2c: Interrupts is no longer a required property
Some NXP SoC's have a FlexComm interface that manages the
interrupts.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-04-02 21:00:24 -04:00
Mahesh Mahadevan 6199bd9c61 drivers: i2c: MCUX SDK LPI2C driver sometimes uses instance number
Update the driver to account for variations in the SDK driver
when it uses the instance number instead of the base address.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-04-02 21:00:24 -04:00
Mahesh Mahadevan a9fea59281 soc: nxp: Select the MFD Kconfig when LPFlexcomm is enabled
LPFlexcomm is a MFD device hence select this Kconfig whenever
it is enabled.
Remove the selection from the individual driver Kconfig files.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-04-02 21:00:24 -04:00
Jason Yu d5b1a7d929 driver: input: gt911: Support case that no dedicated reset pin
On some boards, there is not dedicated reset pin for GT911, it might
be the same pin with display IC, or might be tighted to a high level
voltage.
This patch makes the rst_gpio can be empty.

Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
2024-04-02 15:35:50 +01:00
Laurentiu Mihalcea f4c73105e5 drivers: dai: sai: add pinctrl support
Add support for performing pinctrl operations. For now,
the only supported operation is applying the pinctrl default
state. Pinctrl is left optional to allow for scenarios in which
this is not required (e.g: AMP system in which another
OS configures the pinctrl).

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-02 14:31:15 +01:00
cyliang tw 820a70242f drivers: spi: support for Nuvoton numaker m2l31x
Update m2l31x.dtsi for spi support and update spi_numaker.c
for dummy TX data.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-04-02 14:30:57 +01:00
Tim Lin 0967f13c3f ITE: drivers/i2c: Add a property selecting to drive I2C recovery mode
Add a property to select the push-pull GPIO output type to drive the
I2C recovery. The default is open-drain.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-04-02 14:30:48 +01:00
Laurentiu Mihalcea 139fcfa5f7 drivers: clock: clock_control_mcux_pcc: add support for 8ULP
This patch add supports for performing clock-related operations
on i.MX8ULP. This consists of:
	1) Adding a LUT.
	2) Adding an initialization function meant to tell the
	HAL which rate the XTALs on the boards (EVK and EVK9)
	run at. This is used by the functions that compute the
	rate of an IP clock.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-02 14:30:27 +01:00
Laurentiu Mihalcea 9afd8c9054 drivers: clock: clock_control_mcux_pcc: rework clock ID computation
In the case of some SOCs simply using the PCC base and clock
offset to build the clock ID passed to the HAL is not sufficient
since the clock ID may also contain some flags (e.g: see the case of
i.MX8ULP). For such SOCs, we change the semantic of the value passed
from the DTS (which is simply called "name", thus allowing us to
interpret it differently from SOC to SOC) to an index in a LUT
used to fetch the clock ID that can be safely passed to the HAL.

For compatibility reasons, we also keep the old way and use it
for SOCs which don't define such a LUT. The driver will decide
which method to use based on the LUT size (i.e: if 0, use the
old way, if != 0 use the new way).

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-02 14:30:27 +01:00
Renato Soma da7b65735e drivers: sensors: Add driver for LM35
Add a driver implementation for the LM35 ADC temperature sensor

Signed-off-by: Renato Soma <renatoys08@gmail.com>
2024-04-02 14:29:42 +01:00
Iuliana Prodan 1f55be8b42 nxp: imx8: change CONFIG_SOC_<name> to match the value
Change, for audio DSP and M7 cores, SOC_<name> to match
the exact soc name.
Update the board files accordingly.

These configs are used in SOF and NXP_HAL, so change
sha for these modules.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-04-02 10:41:07 +03:00
Luis Ubieda 92e0d0bbfc bluetooth: nus: Change Kconfigs prefix to BT_ZEPHYR_NUS
To prevent future conflicts with NCS's NUS implementation, whose
Kconfig's are prefixed with BT_NUS.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-04-02 10:36:01 +03:00
Jeppe Odgaard 17b1912bc3 drivers: ad559x: add i2c bus support
Rename ad5592 files in dts, driver and include to ad559x and add support
for I2C bus which is required for AD5593.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-04-01 12:18:47 -05:00
Jeppe Odgaard 2a5dc2a0df drivers: sensor: qdec_stm32: add optional encoder mode
Add support for setting encoder mode in dts.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-04-01 12:10:54 -05:00
Jeppe Odgaard 06a4d4b02f drivers: sensor: qdec_stm32: clang-format qdec_stm32.c
Run clang-format on qdec_stm32.c.

This moves '\' in macros to line index 100, which ensures '\' still
aligns if a macro is edited with a new line that is longer than the
previous longest line.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-04-01 12:10:54 -05:00
Boris Mulder f87143d919 drivers: sensor: tmp108: Handle negative values correctly
Negative temperatures were converted to the sensor_value struct
incorrectly.
This fixes the causes: signed/unsigned mixups and integer overflows.
Also clarified temperature calculation using multiplier/divisor config
values.

Fixes #68240

Signed-off-by: Boris Mulder <b.mulder@innoseis.com>
2024-03-29 15:09:25 +00:00
Armin Brauns f4c596ae28 drivers: add iis328dq stmemsc driver
Based on the iis2dlpc driver, with some significant differences in
interrupt handling.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-03-29 10:01:37 -05:00
Armin Brauns 808d897ca8 drivers: iis2dlpc: fix typo in function name
iis2dlpc, not ii2sdlpc.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-03-29 10:01:37 -05:00
Armin Brauns b49116c7eb drivers: iis2dlpc: fix typo in log message
Probably copy-pasted from another line.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-03-29 10:01:37 -05:00
Jakub Michalski e92c04cbeb drivers: gpio: add interrupt support to renesas rzt2m gpio
Add interrupt support to renesas rzt2m gpio driver

Signed-off-by: Jakub Michalski <jmichalski@internships.antmicro.com>
2024-03-29 10:56:55 +01:00
Vit Stanicek 903bbefef3 drivers: dma_mcux_lpc: Fix omitted interrupt config
Add the invocation of an interrupt config function
(config->irq_config_func). Absence of this call results in the DMA
driver not being able to service interrupts raised by the DMA
peripheral.

This case was observed on the i.MX RT685's HiFi 4 DSP domain, where DMA
was not functional because of this.

Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
2024-03-28 16:04:34 -05:00
Henrik Brix Andersen bfad7bc00e drivers: can: mcan: enable transmitter delay compensation when possible
Enable Transmitter Delay Compensation whenever the data phase timing
parameters allow it.

Fixes: #70447

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-28 09:41:53 +00:00
Henrik Brix Andersen ec75dc2232 drivers: can: mcan: remove broken transmitter delay compensation support
Remove broken support for Transmitter Delay Compensation from the Bosch
M_CAN backend driver.

Even if this was enabled via Kconfig, the TDC bit in the DBTP register set
during driver initialization is overwritten in can_mcan_set_timing_data(),
turning TDC off.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-28 09:41:53 +00:00
Jukka Rissanen c4a4506b4a drivers: ethernet: nxp_s32_netc: Remove VLAN code as it is no longer needed
The VLAN packets are prepared in Ethernet L2 so no need to have
special handling in the driver.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-28 09:41:38 +00:00
Jukka Rissanen 7825ce2418 drivers: ethernet: e1000: Remove VLAN code as it is no longer needed
The VLAN packets are prepared in Ethernet L2 so no need to have
special handling in the driver.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-28 09:41:38 +00:00
Jukka Rissanen c5dc6542fd drivers: ethernet: xmc4xxx: Remove VLAN code as it is no longer needed
The VLAN packets are prepared in Ethernet L2 so no need to have
special handling in the driver.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-28 09:41:38 +00:00
Jukka Rissanen bcb34705bb drivers: ethernet: nxp_enet: Remove VLAN code as it is no longer needed
The VLAN packets are prepared in Ethernet L2 so no need to have
special handling in the driver.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-28 09:41:38 +00:00
Jukka Rissanen 813af655c5 drivers: ethernet: nxp_s32_gmac: Remove VLAN code as it is no longer needed
The VLAN packets are prepared in Ethernet L2 so no need to have
special handling in the driver.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-28 09:41:38 +00:00
Jukka Rissanen 4e7565dceb drivers: ethernet: mcux: Remove VLAN code as it is no longer needed
The VLAN packets are prepared in Ethernet L2 so no need to have
special handling in the driver.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-28 09:41:38 +00:00
Jukka Rissanen e45a8c9104 drivers: ethernet: enc28j60: Remove VLAN code as it is no longer needed
The VLAN packets are prepared in Ethernet L2 so no need to have
special handling in the driver.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-28 09:41:38 +00:00
Jukka Rissanen 898a0d8ab8 drivers: ethernet: sam_gmac: Remove VLAN code as it is no longer needed
The VLAN packets are prepared in Ethernet L2 so no need to have
special handling in the driver.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-28 09:41:38 +00:00
Jukka Rissanen f9b8608d2b drivers: ethernet: stm32: Remove VLAN code as it is no longer needed
The VLAN packets are prepared in Ethernet L2 so no need to have
special handling in the driver.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-28 09:41:38 +00:00
Jukka Rissanen aca5f43ecc drivers: eth: native_sim: Remove VLAN handling
Virtual LAN logic is now done in Ethernet L2 so no need to manipulate
VLAN packets in the driver.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-28 09:41:38 +00:00
Declan Snyder 353c6a66cb dts: bindings: ethernet: Remove fixed link
Remove ethernet-fixed-link binding as it is redundant with the
phy bindings. Clearly, ethernet does not work without the L1
layer, which is a phy device, or an integrated mac/phy device,
and all of these things should be described properly in DT.
The schema did not even come with a compatible, meaning nodelabels
were hardcoded into the drivers, which is unacceptable.

- Remove the binding file for ethernet-fixed-link.yaml.
- Remove fixed link functionality from the nxp s32 gmac driver.
  Since this functionality is already covered by the phy support,
  it is redundant.
- Remove fixed link include from the s32 gmac binding.
- Remove fixed link include from the nuvoton numaker binding.
  As far as I can tell the corresonding driver does not even
  use it anyways, and I did not find any board with this device
  that describes a "fixed link".
- Move the definition into the nxp,kinetis-ethernet binding
  as the eth_mcux driver, which is already being deprecated,
  does use this, contain the debt to the legacy driver.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-27 15:18:54 +00:00
Raffael Rostagno b17712364c drivers: systimer: Removed mention to ESP32C3
Removed mention to C3 SoC, so files are not SoC specific. Ready for C6
integration.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-03-27 15:18:45 +00:00
Fabian Kainka 24c03bfacb serial: uart_native_tty: Polling thread fix
Addresses an issue where attempts to transmit data fail.
The identified cause of this failure is the handling of the
`rx_irq_enable` and `tx_irq_enable` flags. The `else if` handling the
`tx_irq_enable` was replaced by an `if` so both flags can be true,
and both functions can be called. This fix was tested with the
`cellular_modem` example successfully.

Signed-off-by: Fabian Kainka <kainka@cognid.de>
2024-03-27 15:18:11 +00:00
Andy Sinclair c7f59c9e40 drivers: mfd: npm1300: Added long press reset config
Added configuration of long press reset functionality.
Includes ship/hibernate to wake debounce time and
disabled/one_button/two_button mode selection.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2024-03-27 14:32:17 +00:00
Angelo Dureghello e0a1e69262 drivers: ethernet: eth_adin2111: use NET_ETH_ADDR_LEN
Use new NET_ETH_ADDR_LEN definition.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-03-27 14:31:21 +00:00
Angelo Dureghello 180c423c80 drivers: ethernet: eth_adin2111: fix port to port_idx
Fix all references of port to port_idx to be uniform.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-03-27 14:31:21 +00:00
Angelo Dureghello 569ebc247a drivers: ethernet: eth_adin2111: enable promiscuous mode
Add promiscuous mode support.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-03-27 14:31:21 +00:00
Angelo Dureghello 2cebc0f307 drivers: ethernet: eth_adin2111: extend api support
Extend api support with new functionalities.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-03-27 14:31:21 +00:00
Angelo Dureghello dd8072abb3 drivers: ethernet: eth_adin2111: adjust multicast filter
Multicast rule as 01:00:00:00:00:00 is actually shadowing
broadcast rule, enabling broadcast packets to be received/forwarded
even if broadcast rule/filter is not set.

Set the multicast filter with an appropriate mask.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-03-27 14:31:21 +00:00
Nathan Olff 13deb0365c drivers: sensor: dht20: implement new driver
The DHT20 sensor is a temperature and humidity sensor that uses I2C to
communicate with a microcontroller. The DHT20 sensor is Aosong.

use standard crc

update description to add reference to AHT20 and AM2301B

clean code, use defines and bit manipulation

add dht20 to i2c test suite for build tests

update bit manipulation

use more defines instead of raw numbers

add bindings to allow aht20 or am2301b to be used in devicetree

in all 3 cases, the same dht20.c driver is compiled

Signed-off-by: Nathan Olff <nathan@kickmaker.net>
2024-03-27 14:29:54 +00:00
Mahesh Mahadevan 8b7cff7d33 drivers: spi: Use the NXP Flexcomm driver for interrupt handling
The Low Power Flexcomm driver manages the interrupt handling
and provides an API to register interrupt callbacks.
Register the NXP LPSPI interrupt handler.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-03-26 16:39:18 -04:00
Mahesh Mahadevan e5ecc96b3c dts: spi: Interrupts in NXP LPSPI is no longer a required property
Some NXP SoC's have a FlexComm interface that manages the
interrupts.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-03-26 16:39:18 -04:00
Mahesh Mahadevan 7c431dde18 drivers: spi: NXP LPSPI driver sometimes uses instance number
Update the driver to account for variations in the SDK driver
when it uses the instance number instead of the base address.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-03-26 16:39:18 -04:00
Mahesh Mahadevan 55abfcb31e drivers: dma: Update NXP EDMA driver for version 4
1. Update EDMA driver for version 4
2. The DMAMux module is not always present. Use the
   feature define to make this optional.
3. Use the EDMA_SetChannelMux API for SoC's that supports
   this feature.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-03-26 16:39:18 -04:00
Lukasz Madej a64a64b3c2 drivers: charger: charger_max20355: handle thermistor mode
Allow to configure thermistor monitoring mode.

Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
2024-03-26 16:18:31 -04:00
Lukasz Madej bda4c18fc9 drivers: charger: charger_max20355: handle recharge threshold
Allow to configure recharge threshold.

Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
2024-03-26 16:18:31 -04:00
Lukasz Madej f1b35a5c78 drivers: charger: charger_max20335: handle minimum system voltage
Allow to configure minimum system voltage threshold parameter.

Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
2024-03-26 16:18:31 -04:00
Lukasz Madej e43f6f5d2a drivers: charger: charger_max20335: rename register related macros
Rename macros related to charger harware registers to make them
consistent.

Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
2024-03-26 16:18:31 -04:00
Lukasz Madej c7c168b378 drivers: charger: charger_max20335: rename macro to reduce ambiguity
The ILimCntl name can be understood as both register name and its field
name. Therefore it is better to change macro name so it contains both
register and field name. Second field of this register will be also
utilized by this driver in the future and new code will be aligned to
this naming convention.

Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
2024-03-26 16:18:31 -04:00
Lukasz Madej b2c460f274 drivers: charger: charger_max20335: fix linear range usage
Fix validation of `linear_range_get_index()` results.
The function can resturn both 0 or -ERANGE but -EINVAL is never
returned. Use comparison against 0 to make the validation robust.

Use valid maximum index for the linear range. The 0x0C is reserved
value and should not be used. Therefore replace it with 0x0B.

Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
2024-03-26 16:18:31 -04:00
Lukasz Madej 82169bba15 drivers: charger: charger_max20335: drop redundant validation
`max20335_get_constant_charge_current()` and
`max20335_set_chgin_to_sys_current_limit()` functions has redundant input
values validation. Drop not important ones to make the code clean.
While on it remove `max20335_get_constant_charge_voltage()` function
since it become useless.

Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
2024-03-26 16:18:31 -04:00
Lukasz Madej d791526dd8 drivers: charger: charger_max20355: fix configuration
Maximum charging current is selected with an external resistor in
the MAX20335 charger. Therefore it is not possible to configure it
with software directly. There is only a capability to limit current
set with hardware but configuration of the limiter is not
straight-forward.

To reflect real functionality, drop usage of
`constant-charge-current-max-microamp` property as an required one and
use custom `chgin-to-sys-current-limit-microamp` instead.
Use enum in binding file to signalize improper values at compile time.

Drop support for `CHARGER_PROP_CONSTANT_CHARGE_CURRENT_UA` API property
since this cannot be handled.

The `max20335_get_constant_charge_current()` function become useless so
remove it.

Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
2024-03-26 16:18:31 -04:00
Rick Bruyninckx 9b0510cea9 drivers: led: add output current configuration to ti,lp5562
Add Output current configuration for led channels to the TI lp5562 driver.

Signed-off-by: Rick Bruyninckx <xactme@gmail.com>
2024-03-26 16:17:23 -04:00
Phi Bang Nguyen 64ca263bfd drivers: video: mt9m114: Rework to support more resolutions
Currently, the driver supports only VGA resolution while 480x272 is
needed to match with the display resolution on i.MX RT10XX family.

Also, the current framerate is very low, about 3-4 fps without doing
anything else with the image buffers (just discarding them).

Rework the driver to address the low framerate issue as well as to add
support for 480x272 and 1280x720 resolutions.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-03-26 16:16:52 -04:00
Phi Bang Nguyen f17f1d67f8 drivers: video: mt9m114: Drop unused stuffs
Drop unused register macros and coherently use major letters for
register address.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-03-26 16:16:52 -04:00
Phi Bang Nguyen c0d52e4837 drivers: video: mt9m114: Run clang format
Run clang format before making any changes

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-03-26 16:16:52 -04:00
Jeff Welder 2f63bc7ac9 modem: modem_cellular: Telit ME910G1 Complete Modem Info
Add missing fields to complete info struct to
chat script for Telit ME910G1. Also for test
suite modem bg95.

Signed-off-by: Jeff Welder <Jeff.Welder@ellenbytech.com>
2024-03-26 11:20:01 -05:00
Jeff Welder bf910873bc modem: modem_cellular: Add ICCID to Modem Info API
Added missing SIM ICCID case to
Modem Info API.

Signed-off-by: Jeff Welder <Jeff.Welder@ellenbytech.com>
2024-03-26 11:20:01 -05:00
Immo Birnbaum e9bc58bc75 drivers: gpio: xlnx_axi: fix polling mode
Fix compiler errors and warnings that are issued when compiling this
driver for use without the optional interrupt facilities.

When interrupts are not enabled for any instance of this device,
there's currently a compiler error in gpio_xlnx_axi_pin_interrupt_configure
due to the function's header being located within the ifdef-block for
interrupt-driven operation.

Fully encapsulate the interrupt-related functions
gpio_xlnx_axi_pin_interrupt_configure, gpio_xlnx_axi_manage_callback
and gpio_xlnx_axi_get_pending_int with ifdefs checking for interrupt
mode inorder to remove compiler warnings caused by those functions
being always present so far, while not being used in the API function
pointer table when all instances of this GPIO controller are operating
in polling mode. This circumstance causes a "declared, but not used"
compiler warning for each of those functions.

Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
2024-03-26 11:18:28 -05:00
Aleksander Wasaznik b91728619c Bluetooth: host: remove CONFIG_BT_RECV_BLOCKING
This config selects a variant of the HCI driver interface that spills
out host internals unto the drivers and even the Zephyr controller. It
will now be removed in favor of driver interfaces that hide the
internals of the host.

The new default is `CONFIG_BT_RECV_WORKQ_BT`.

Any references to the removed kconfig are refactored out.

Any out-of-tree driver using the removed interface can be easily adapted
by copying the following implementations into the driver as private
functions:

 - `hci_driver.h:BT_HCI_EVT_FLAG_RECV_PRIO`
 - `hci_driver.h:BT_HCI_EVT_FLAG_RECV`
 - `hci_driver.h:bt_hci_evt_get_flags`
 - `hci_raw.c:bt_recv_prio`

In combination these symbols function as a interface adapter. These
symbols will be removed in this PR in subsequent commits.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-03-26 11:17:29 -05:00
Fabio Baltieri 55c14e6fa6 input: analog_axis: rework deadzone calibration code
Rework the data scaling algorithm for the "deadzone" mode so that the
deadzone is subtracted from the input rather than from the output. This
makes the whole output range usable rather than making the output jump
from the center value to the minimum deadzone range.

This changes the calibration data structure as well so now all values
refer to the input data, which is more coherent.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-03-26 11:10:10 -04:00
Fabio Baltieri 1b2bb0dbf2 input: analog_axis: fix the variable name for calibration
Use a coherent name for the calibration data structure variable name.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-03-26 11:10:10 -04:00
Juliane Schulze 5254c153b9 sensor: tmag5273: fix switched mask/value argument in FIELD_GET
This somehow worked without problems during the test runs, but we found a
corner case where this leads to an error.

Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
2024-03-26 11:04:26 -04:00
Lukas Gehreke 9e06a8a1e6 drivers: uart_pl011: Implemented runtime configure
Implemented runtime configure functions for the driver.

Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
2024-03-26 11:03:13 -04:00
Tom Burdick 41f1c3a2b7 sensors: Move TDK sensors to a subdirectory
Move all tdk/invensense sensors to a subdirectory named after the
vendor.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-03-26 10:54:27 -04:00
Bartosz Sokolski f4d55e7f68 drivers: nrf_qspi_nor: Add option for 2bit IO
Add missing NRF_QSPI_READOC_READ2IO option handling
to enable 2bit IO

Signed-off-by: Bartosz Sokolski <bartosz.sokolski@nordicsemi.no>
2024-03-26 10:47:20 -04:00
Jeppe Odgaard d1d6938a16 drivers: sensors: grow_r502a: remove all unused drv_data
Fix compile warnings cause by removing drv_data in some functions.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-03-26 10:46:30 -04:00
Jeppe Odgaard 83957729dd drivers: sensors: add fcx-mldx5 o2 sensor
Add driver for Angst+Pfister O2 sensors FCX-MLD25 & FCX-MLD95 and maybe
more. Tested with FCX-MLD25.

Supports get O2 value, get status, and power management.

Note that in suspended power mode heating output is at 20 %, thus
probably not suited for a battery powered device.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-03-26 10:46:30 -04:00
Jeppe Odgaard 29cc0e6aed sensor: add SENSOR_CHAN_O2 enum value
Add an enum value to support O2 sensors.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-03-26 10:46:30 -04:00
Krzysztof Chruściński 8bc5111c27 drivers: serial: uart_async_rx: Optimize RAM usage
Since there is only one consumer of the data stored in the buffers,
it is enough to have one read index variable which can be stored in
the data associated with the module and not in the buffer space (where
there is a read index for each buffer).

Additionally, we can safely assume that module works with small buffers
so 127 byte limit is enough. Based on that assumption completed flag
can be stored on a single byte together with write index. After this
change, control data for each buffer takes 1 byte (3 bytes previously).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-03-26 10:46:02 -04:00
Krzysztof Chruściński 17dc3da35d drivers: serial: uart_async_rx: Fix race condition
There was a wrong order of conditions checking. First indexes were
compared and then completed flag was checked. It was possible that
after checking first condition context is preempted and new data
is written to the buffer and completed flag is set. In that case
both conditions are met but data added in preemption is dropped.
In order to avoid that completed flag must be checked first.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-03-26 10:46:02 -04:00
Krzysztof Chruściński d2bd82eb5f drivers: serial: uart_async_rx: Add return value to consume function
Return availability of free buffers after data is consumed. This
information may be important for the module using uart_async_rx to
schedule next reception if there is a new buffer available.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-03-26 10:46:02 -04:00
Krzysztof Chruściński 65b42260f7 drivers: serial: uart_async_rx: Add buffer release to consuming function
Add buffer releasing to consuming function to allow better buffer
utilization since buffer is available earlier.

Note that releasing in claiming function is still needed as there
are cases when there are empty but completed buffers and those
need to be consumed in claiming phase.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-03-26 10:46:02 -04:00
Krzysztof Chruściński ce3d45375e drivers: serial: uart_async_rx: Remove unused field
Removing a field which was redundant. It was only incremented but
never read.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-03-26 10:46:02 -04:00
Jordan Yates 71c3c955c1 drivers: flash: spi_nor: use pm_device_driver_init
Use `pm_device_driver_init` to ensure that init is run correctly
regardless of the power state.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2024-03-26 10:45:34 -04:00
Dean Sellers e193f922cd drivers: ethernet: enc28j60: Add DT property to set Rx filter
Byte value written to the device's
ERXFCON: ETHERNET RECEIVE FILTER CONTROL REGISTER
Sets the devices receive packet filter, optional. If not set
in device tree previous hard coded value`0xA3` is used.
Uni, multi and broadcast packets with valid CRC are accepted.

Signed-off-by: Dean Sellers <dsellers@evos.com.au>
2024-03-26 10:03:07 -04:00
Mayank Mahajan 3d81167eaf ADD: GNSS Driver for U-BLOX M10 & Support for UBX Messages
MODEM_UBX: Adds Support for UBX Messages in Modem Subsystem.

GNSS API Supported: get_supported_systems, set_fix_rate, get_fix_rate,
	set_enabled_systems, get_enabled_systems, set_navigation_mode,
	get_navigation_mode.

Boards Tested: MIMXRT1062_FMURT6, VMU_RT1170.

Note: Partial support for U-BLOX Messages is provided as of now.

Signed-off-by: Sumit Batra <sumit.batra@nxp.com>
Signed-off-by: Mayank Mahajan <mayankmahajan.x@nxp.com>
2024-03-26 09:28:36 +00:00
Clement Dysli bc140e1a36 drivers: input: add cf1133 controller touchscreen
The driver allows to use CF1133 controller touchscreen (I2C)

Signed-off-by: Clement Dysli <clementdy@kickmaker.net>
2024-03-26 09:24:43 +00:00
Armando Visconti 8d83b76f84 drivers/sensor: add support to STTS22H temperature sensor
The STTS22H is an ultralow-power, high-accuracy, digital temperature
sensor offering high performance over the entire operating temperature
range. This driver is based on stmemsc HAL i/f v2.3

https://www.st.com/resource/en/datasheet/stts22h.pdf

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-03-25 18:40:54 -04:00
Lingao Meng 137efd1c30 drivers: bluetooth: hci: Fix userchan insufficient buf cause dead-loop.
If insufficient buf for given event, will cause dead-loop.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-03-25 18:39:03 -04:00
Mike J. Chen fe4b03baf3 drivers: i3c: i3c_mcux: Fix bug in do_one_xfer
Error check was incorrect, causing wait for complete
not to be done. This can result in emit stop not
working on writes because controller won't do the
stop if it is still busy processing transmit.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2024-03-25 18:38:31 -04:00
Dominik Ermel 6266dc11a9 drivers: flash: spi nor: Fix missing init of hold pin
There has been missing line initializing the hold pin,
which caused SPI NOR device init to fail with -ENODEV,
if property defining such pin has been present in device
definition.

Fixes #70661

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-03-25 13:26:55 -05:00
Luis Ubieda 3c56af6c87 drivers: serial: bt: Fix Max payload to be transmitted with minimum MTU
As correctly pointed during the initial PR Review, when the MTU-size is
23 the effective payload that can be transferred is MTU-3 = 20. Thus,
this change to be consistent.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-03-25 13:26:27 -05:00
Daniel Leung 3664ed64c3 arch: move arch_interface.h under zephyr/arch
arch_interface.h is for architecture and should not be
under sys/. So move it under include/zephyr/arch/.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-03-25 09:58:35 +00:00
Mahesh Mahadevan 4045975c80 drivers: timer: NXP OS Timer updated for low power modes
Add ability to set a wakeup counter in case OS Timer is
disabled in certain low power modes. Also add code to
compensate the tick value.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-03-25 09:35:51 +01:00
Kevin ORourke 9bf0a24f2e drivers: clock_control: stm32: clock_control_on
Make clock_control_on for STM32 behave the same as the HAL,
delaying after enabling peripheral clocks. Otherwise it may return
before the clock is actually enabled, causing subsequent writes to
peripheral registers to be silently ignored.

Signed-off-by: Kevin ORourke <kevin.orourke@ferroamp.se>
2024-03-25 09:31:54 +01:00
Pisit Sawangvonganan 5aa4ae6ed5 drivers: can: stm32: fdcan: refactor register bits remap
Optimize bit remapping in STM32 FDCAN driver by grouping consecutive bits.

Additionally, leverage shared bit mapping between MCAN_IR and MCAN_IE to
consolidate switch cases.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-03-24 20:56:10 +01:00
Chen Xingyu 7273f212e3 drivers: gpio: dw: Address warning of unused gpio_dw_isr
This commit conditionally masks out `gpio_dw_isr` to prevent a build
warning if none of the instances of this driver are connected to an IRQ.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2024-03-24 12:49:23 +01:00
Chen Xingyu a622407bd3 drivers: gpio: dw: Switch to DT_INST_IRQN_BY_IDX
Switch to using `DT_*IRQN` helpers for obtaining the IRQ number instead of
directly accessing the `irq` cell. This change ensures that the encoded
values for multi-level interrupts are correctly retrieved.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2024-03-24 12:49:23 +01:00
Flavio Ceolin 6b9d01f995 intel_adsp/ace: power: No pending transaction before power gate
Issue an upstream read transaction through uncached memory to flush
out all pending transactions before power down the host domain.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-03-22 21:29:33 -04:00
Declan Snyder 9607543496 drivers: hwinfo: Add RW hwinfo driver
Add RW hwinfo driver

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-22 15:58:03 -05:00
Mahesh Mahadevan 68ed426751 drivers: flash: Update mcux driver to add support for MCX flash
Add support for the MCX flash

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-03-22 14:25:31 +00:00
Marcin Niestroj 4f9e3fa1b7 drivers: net: nsos: support blocking accept() and recvfrom()
So far only non-blocking accept() and recvfrom() were suported. This patch
implements blocking behavior, with the use of poll(fd, POLLIN) as helper
mechanism.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-03-22 14:39:27 +01:00
Marcin Niestroj 8487fcca5b drivers: net: nsos: implement poll() syscall
Use NSI_HW_EVENT() in order to periodically check for events in host
sockets. Whenever there is a socket event ready to be processed by Zephyr,
raise native_sim (newly introduced) CPU interrupt, so that Zephyr driver
can signal readiness with k_poll().

Maintain a list of Zephyr poll() executions in Zephyr context. Iterate
through them whenever there is some event to be processed.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-03-22 14:39:27 +01:00
Marcin Niestroj 483c41d209 drivers: net: nsos: add F_GETFL and F_SETFL support
This allows to use Zephyr TLS subsystem with Native Sim offloaded sockets.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-03-22 14:39:27 +01:00
Marcin Niestroj 4317cd4576 drivers: net: nsos: add IPv6 support
Add support for IPv6 socket offloading, next to existing IPv4 support.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-03-22 14:39:27 +01:00
Marcin Niestroj d1adffc123 drivers: net: nsos: add DNS offload support
Extend driver to support DNS by offloading getaddrinfo() and freeaddrinfo()
APIs.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-03-22 14:39:27 +01:00
Marcin Niestroj 07edc9a070 drivers: net: nsos: new driver for Native Simulator offloaded sockets
Add driver for 'native_sim' target that implements offloaded socket
networking by the use of host networking stack and wrapped BSD sockets API.

This driver has following advantages over existing networking drivers for
emulated platforms that are already in tree:
 * no TUN/TAP use means that no additional setup is required on the host
   side:
   * possible to use it within unpriviledged Docker containers, either for
     development or in CI
 * possibility to use and test offloaded sockets
   (CONFIG_NET_SOCKETS_OFFLOAD=y) with emulated target, which allows
   to increase tests coverage of this feature, without requirement of using
   hardware

Native Simulator host libc has different error codes than embedded libc
used by Zephyr. Convert between those.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-03-22 14:39:27 +01:00
Luis Ubieda 205994b87b drivers: serial: bt: Add UART over NUS Bluetooth driver
Enables usage Bluetooth LE GATT as a serial endpoint to exchange data
using UART APIs. This implementation is compatible with UART Interrupt
Driven APIs and uses the nus-uart device-tree node properties to
configure FIFO buffers for transmitting and receiving. Defining
multiple instances of the driver is possible and it allows implementing
multiple GATT NUS service instances to exchange data as separate serial
endpoints.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-03-22 10:25:37 +01:00
Daniel DeGrasse 6b3e14e7d5 drivers: pwm: pwm_mcux_ctimer: use correct clock subsystem ID
With the merge of zephyrproject-rtos/zephyr/pull/70254,
MCUX_CTIMER_CLK_OFFSET is no longer defined nor needed. Remove this from
the macro getting the clock subsystem in the ctimer PWM driver.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-03-22 10:23:58 +01:00
Tomasz Bursztyka 7004f373f2 disk/nvme: Update copyright headers
Most of the code is a port of FreeBSD's NVMe's driver, made by Jim
Harris (Intel).

Though all subsequent contributions that happened on this original
driver were made on files copyrighted by Intel, and under BSD-2 clause,
let's update the copyright header to point out Jim's original work and
major contributors were relevant.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2024-03-22 09:23:00 +00:00
Johann Fischer 13022ceab7 drivers: udc_dwc2: enable SOF interrupts and SOF events
Enable SOF interrupts and SOF events.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-03-22 10:10:26 +01:00
Declan Snyder ad393fbbfa dts: Rename RW pinctrl to MCI IO MUX
"RW pinctrl" is clearly SOC specific naming for an IP
that is not necessarily constrained to live on one SOC series.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-22 08:56:10 +01:00
Ricardo Rivera-Matos 64a959c922 regulator: cp9314: Prevents reset while switching
Configures and initializes the EN GPIO to inactive prior
to calling the soft reset sequence during probe. The EN
pin may have been left asserted by the hardware on some systems.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-03-21 13:16:56 -05:00
Wafer Xie 2396b01b1e drivers: eth: stellaris: Fix driver poll all packets from ethernet
The number of interrupts received by the driver maybe less than
the number of data packets received by Ethernet,
so the driver should read the packets number
from the register REG_MACNP value.

Signed-off-by: Wafer Xie <wafer@jaguarmicro.com>
2024-03-21 12:07:35 +00:00
Andy Sinclair 9813221ea6 drivers: mfd: npm1300: Added GPIO events
Added GPIO input edge events

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2024-03-21 10:25:42 +00:00
Andy Sinclair 13e43ca5c8 drivers: gpio: npm1300: Event configuration based on active state
Configuration of GPIO as input now sets rising/falling
event orientation based on ACTIVE_HIGH/LOW setting.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2024-03-21 10:25:42 +00:00
Mehdi Zemzem adedf14c42 drivers: flash: spi nor: Add MultInstance support
Modify the SPI Nor driver to be able to have multiple instances at
the same time.

This patch is heavily inspired by the at45 driver.
It was tested on the nRF5340 DK by using the external spi memory two times.
Macros were improved by de-nordic

Signed-off-by: Mehdi Zemzem <mehdi.zemzem2@gmail.com>
2024-03-21 10:07:53 +00:00
Ledion Daja 4c25482ef6 modules: hal_ethos_u: update module revision
Updated revision for hal_ethos_u module, and adapted
ethosu_semaphore_take function prototype accordingly in order to align
with changes in the NPU driver

Signed-off-by: Ledion Daja <ledion.daja@arm.com>
2024-03-21 09:07:35 +01:00
Declan Snyder d3e2052a69 drivers: clock_control: Support RW MRT
Support RW MRT in clock control syscon driver

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-21 09:06:48 +01:00
TOKITA Hiroshi 7b61d1c43c drivers: led_strip: Enabling config with DT_HAS_..
Applying the modern way which is adding `default y` and
`depends on DT_HAS_...` to enable configs.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-03-20 17:20:08 -05:00
TOKITA Hiroshi 7d99de6dfa drivers: led_strip: ws2812: Remove WS2812_STRIP and WS2812_STRIP_DRIVER
Removing `choice WS2812_STRIP_DRIVER` to enable the use of multiple
types of WS2812 drivers.
Also, `menuconfig WS2812_STRIP` will be deleted as it does not
correspond to the appropriate settings.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-03-20 17:20:08 -05:00
Johan Carlsson 94351ce2ad drivers: uart_mcux_flexcomm: fix invalid use of status bits.
uart flexcomm driver incorrectly used kStatus enum as mask when
checking for errors and enabling the error interrupts.

Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
2024-03-20 17:18:48 -05:00
Daniel DeGrasse adfe4b8359 drivers: clock_control: clock_control_mcux_syscon: allow FlexSPI reclock
Enable support for setting and querying the FlexSPI clock rate to the
clock_control_mcux_syscon driver, as this is required by the
flash_flexspi_nor_driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-03-20 19:08:06 +00:00
Declan Snyder e336c644be drivers: wdt_mcux_wwdt: Support RW
Support RW soc series in wwdt driver

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-20 16:19:12 +00:00
Alberto Escolar Piedras 46193f48f6 drivers/sensor/bma4xx/Kconfig: Change native_posix reference to native_sim
As we are replacing native_posix with native_sim, let's
use native_sim instead of native_posix as example platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-20 15:43:05 +01:00
Alberto Escolar Piedras 11530015ad drivers/gpio emul: Fix reference to example overlay
That file does not exist anymore, let's refer
to its new name.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-20 15:43:05 +01:00
Mykola Kvach ff35a247f1 drivers: pinctrl: pfc_rcar: add dummy IPSR flag to pinctrl driver
Add a dummy IPSR flag to the RCar PFC driver. It is necessary
to ensure that the driver sets the 'peripheral' bit (the driver
resets this bit during the first call of 'pfc_rcar_set_gpsr') for
a pin that doesn't have a pin function defined in IPSR, but always
acts as a 'peripheral', for example, the MMC pins on the Spider
board.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2024-03-20 15:42:45 +01:00
Pieter De Gendt 2ee4716091 drivers: ethernet: Build ethernet drivers with ETH_DRIVER_RAW_MODE
Allow building ethernet drivers without NET_L2_ETHERNET config symbol.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-20 08:05:55 -05:00
Pieter De Gendt e99b5228a1 drivers: ethernet: Introduce ETH_DRIVER_RAW_MODE option
Add a Kconfig symbol to allow building ethernet device driver without
an L2 layer.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-20 08:05:55 -05:00
Pieter De Gendt 78457c0499 drivers: ethernet: adin2111: Use ethernet init macro
Use the ethernet specific init macro.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-20 08:05:55 -05:00
Pieter De Gendt e1b132771e drivers: ethernet: nxp_s32_gmac: Imply MDIO
The ethernet driver will most likely require the MDIO device to be
enabled.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-20 08:05:55 -05:00
Benedikt Schmidt 04f38ffba2 drivers: sensor: add sensors for MAX31790
Add sensors for fan speed and fan fault for the PWM
controller MAX31790.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-03-20 07:38:18 -05:00
Benedikt Schmidt 961c985ee4 drivers: pwm: split up driver for MAX31790 into a MFD
Split up the driver for the PWM controller MAX31790
into a multi function device driver.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-03-20 07:38:18 -05:00
Fabio Baltieri c82b38c7be input: pmw3610: run the whole init with spi clock on
Move the pmw3610_spi_clk_on and pmw3610_spi_clk_off calls so that the
"on" call is before the first write. The datasheet calls for doing this
before any write operations, though some writes seems to work without
this in place, other seems to behave erroneously.

The non static functions do it on their own as they can be called
separately.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-03-20 09:02:50 +01:00
Fabio Baltieri 2c5b992209 input: pmw3610: add few config options
Add config options for resolution, force awake and smart mode.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-03-20 09:02:50 +01:00
Sebastian Głąb 7ffafd9b64 drivers: watchdog: wdt_nrfx.c: Fix error code value
Align driver implementation to the watchdog driver API.
https://docs.zephyrproject.org/latest/hardware/peripherals/watchdog.html

int wdt_disable(const struct device *dev)
shall return:
    0 – If successful.
    -EFAULT – If watchdog instance is not enabled.
    -EPERM – If watchdog can not be disabled directly by application code.
    -errno – In case of any other failure.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-03-19 18:00:24 -05:00
Daniel DeGrasse 81ec61c085 drivers: clock_control: clock_control_mcux_syscon: make clock IDs unique
Syscon clock driver previously used a sequence where clock IDs increased
sequentially. This had a few disadvantages:
- if a new SOC was introduced with more instances of a given IP, the
  clock ID could not be sequential with the remaining IDs
- chance of collisions between clock IDs was relatively high

To resolve this, define LPC clock IDs using a bitmask macro. Note that
the CTIMER clock IDs are used within SOC clock files to perform clock
init, and the macro requires that the clock ID expand to an integer
rather than a expression with bitshifts (hence why the macro is not used
for these IDs)

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-03-19 18:43:58 +00:00
Guennadi Liakhovetski 315ee38b95 ADSP: don't use timer interrupts on secondary cores
When running SOF on Intel ADSP we choose to only serve the timer
interrupt on the primary core.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-03-19 14:30:47 +01:00
Laurentiu Mihalcea 0ff402657b nxp: sai: add support for passing TX/RX data line through DTS
Some SAI instances are mutliline, meaning they can have multiple
TX/RX data lines (channels). Depending on the board, the index
of the TX/RX data lines that are connected to the consumer
(e.g: the codec) may not always be 0. This commit fixes this
issue by adding support for passing the index of the used
TX/RX data lines through the DTS.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-03-19 14:30:32 +01:00
Henrik Brix Andersen b39f542537 drivers: can: loopback: remove info log at driver initialization
Remove the LOG_INF() at driver initialization.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-19 14:30:15 +01:00
Tim Lin 9d9d1ff380 ITE: drivers/i2c/target: Remove hardware reset setting
In the interrupt pending routine, only the interrupt status needs to be
cleared at the end of the interrupt routine. There is no need to do a
hardware reset(HALT) to avoid clearing the next transfer interrupt when
the current transfer is completed.

Test: Testing this function does not cause I2C data/clk to get stuck on
the system platform.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-03-19 07:56:19 -04:00
Henrik Brix Andersen 91751f4fc2 drivers: can: fake: use CiA recommeded configurations ranges
Use the CAN clock and configuration ranges recommended by CAN in Automation
(CiA). Adjust the CAN shell test, which makes use of the fake CAN
controller driver, to match the new timing limits.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-19 09:47:24 +01:00
Henrik Brix Andersen 7a1ec980e0 drivers: can: loopback: use CiA recommeded configurations ranges
Use the CAN clock and configuration ranges recommended by CAN in Automation
(CiA).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-03-19 09:47:24 +01:00
Andrzej Głąbek e977a8d623 drivers: pinctrl_nrf: Set clockpin bitfield when necessary
For certain peripheral signal lines in nRF54H20, it is required
to set the clockpin bitfield for pins assigned to them, otherwise
the peripheral may not work properly, for example, there will be
no output from UART.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-03-18 19:11:36 +00:00
Tom Chang 0e4b5de6ca drivers: espi: npcx: workaround Global Reset issue
Apply the workaround for the issue "eSPI global reset" in the
NPCX49nF_Errata

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-03-18 19:11:29 +00:00
Daniel DeGrasse f378fd0282 drivers: dma: dma_mcux_lpc: add workaround for RW61x flexspi
RW61x DMA has the *unique* restriction that DMA access is not routed
through the FlexSPI cache engine, only via the non-cached address space.
To enable DMA to read from the FlexSPI AHB space directly, fixup any
address passed to the DMA engine that is in the FlexSPI AHB cached
region to be in the non cached region

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-03-18 18:57:03 +01:00
Pieter De Gendt 76cd676050 drivers: ethernet: eth_nxp_s32: Implement HW MAC address filtering
Replace the multicast monitor with a HW MAC filter configuration.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-18 10:14:34 +01:00
Pieter De Gendt f900bfc3de drivers: ethernet: eth_stm32: Rework HW MAC address filtering
Rework the driver to use HW MAC address filtering as an ethernet
capability.
Use a counter table for CRC indexes added/removed.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-18 10:14:34 +01:00
Pieter De Gendt 28e10630c2 drivers: ethernet: eth_enet: Implement HW MAC address filtering
Replace the multicast monitor with a HW MAC filter configuration.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-18 10:14:34 +01:00
Pieter De Gendt a3f74ac50e drivers: ethernet: eth_nxp_s32_gmac: Fix multicast filter
Update multicast filter with HW filtering and fix missing CONFIG_ prefix.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-18 10:14:34 +01:00
Pieter De Gendt d052822d5d drivers: ethernet: eth_mcux: Implement HW MAC address filtering
Replace the multicast monitor with a HW MAC filter configuration.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-03-18 10:14:34 +01:00
Grzegorz Swiderski a55f67d284 drivers: misc: nordic_vpr_launcher: Update src/exec memory size check
Firstly, build-asserting the execution/source memory sizes to be equal
wasn't working, due to the wrong (non-inst) DT API being used.

Secondly, this assert can be relaxed so that the source memory region
only needs to have greater than or equal size to the execution region,
as VPR firmware needs to fit into execution memory first and foremost.
This will come in handy, since MRAM partitions (typical source memory)
have stricter alignment requirements than RAM regions.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-03-18 10:13:11 +01:00
Daniel DeGrasse 8347abd001 drivers: counter: counter_nxp_mrt: include soc.h for MRT CMSIS defines
Include soc.h in nxp MRT driver, so that CMSIS register definitions will
be available in this file

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-03-15 17:12:08 -04:00
Ren Chen 765a4eb0b8 drivers: timer: it8xxx2: enhances the accuracy of hw cycle calculation
This commit enhances the accuracy of hardware cycle calculation before
setting the IT8xxx2 event timer. The next target cycle is calculated by
the last, elapsed, and expected timeout ticks. And then, the difference
in hardware cycles between the target cycle and the current cycle is set
into the event timer. This increased accuracy effectively resolves the
clock drift issue.

Tested with:
west build -p always -b it8xxx2_evb tests/kernel/timer/timer_api
     -T kernel.timer.tickless
west build -p always -b it8xxx2_evb tests/kernel/timer/timer_behavior
     -T kernel.timer.timer

Fixes #67474 #67833

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-03-15 17:11:33 -04:00
Samy Francelet 4163ea0207 drivers: eswifi: Add option for maximum data size
Default MAX_DATA_SIZE might be too small depending
on application (e.g. handling the scan result with 12 APs detected)
Added config option for MAX_DATA_SIZE and warning for the user

Signed-off-by: Samy Francelet <samy.francelet@ik.me>
2024-03-15 15:16:27 -05:00
Jeppe Odgaard 20f747bb63 drivers: sensor: qdec_stm32: fix inverted polarity
Use the Polarity member instead of the ActivityInput.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-03-15 17:43:51 +01:00
Michele Sardo aa58fb0f0a drivers: bluetooth: hci: Enable SPI_LOCK_ON mode
Use SPI_LOCK_ON to lock configuration for multiple transaction while CS is
kept low.

Change control of CS line from direct GPIO manipulation to SPI driver API.

Signed-off-by: Michele Sardo <msmttchr@gmail.com>
2024-03-15 15:50:03 +02:00
Michele Sardo ca4ff1e6fe drivers: spi: keep SPI enabled if SPI_HOLD_ON_CS is used
Keep the SPI enabled when performing multiple transaction with
SPI_HOLD_ON_CS.
In such case, the end of transaction is marked by application calling
spi_release.

Signed-off-by: Michele Sardo <msmttchr@gmail.com>
2024-03-15 15:50:03 +02:00
Vidar Berg ceff785434 drivers: bluetooth: hci: Apply workaround for HW anomaly on nRF53
Use the nrf_reset_network_force_off() function to release and set the
force-off signal.This ensures that the workaround for errata 161 is
applied.

Signed-off-by: Vidar Berg <vidar.berg@nordicsemi.no>
2024-03-15 14:32:01 +01:00
YunZe Li 8c19142278 drivers: watchdog: fix wdt_counter_setup option checking condition
The expression (options & WDT_OPT_PAUSE_IN_SLEEP) is duplicated. Fix it
by replacing the second one with (options &WDT_OPT_PAUSE_HALTED_BY_DBG).

Signed-off-by: YunZe Li <yzli.cs@realtek.com>
2024-03-15 13:06:51 +01:00
Steven Chang b231905e38 drivers: i2c: initial device driver for ENE KB1200
Add i2c driver for ENE KB1200

Signed-off-by: Steven Chang <steven@ene.com.tw>
2024-03-15 09:39:48 +00:00
Steven Chang 5c354ca055 drivers: watchdog: initial device driver for ENE KB1200
Add watchdog driver for ENE KB1200

Signed-off-by: Steven Chang <steven@ene.com.tw>
2024-03-15 09:39:48 +00:00
Steven Chang 1b028ca2ce drivers: tach: initial device driver for ENE KB1200
Add tachmeter driver for ENE KB1200

Signed-off-by: Steven Chang <steven@ene.com.tw>
2024-03-15 09:39:48 +00:00
Steven Chang 1147c39fe9 drivers: pwm: initial device driver for ENE KB1200
Add pwm driver for ENE KB1200

Signed-off-by: Steven Chang <steven@ene.com.tw>
2024-03-15 09:39:48 +00:00
Steven Chang 7d12798a22 drivers: adc: initial device driver for ENE KB1200
Add adc driver for ENE KB1200

Signed-off-by: Steven Chang <steven@ene.com.tw>
2024-03-15 09:39:48 +00:00
Steven Chang 9f22c8951b drivers: uart: initial device driver for ENE KB1200
Add uart driver for ENE KB1200

Signed-off-by: Steven Chang <steven@ene.com.tw>
2024-03-15 09:39:48 +00:00
Steven Chang 62245b3ba9 drivers: gpio: initial device driver for ENE KB1200
Add GPIO driver for ENE KB1200

Signed-off-by: Steven Chang <steven@ene.com.tw>
2024-03-15 09:39:48 +00:00
Steven Chang 64b4a3fe08 drivers: pinctrl: initial device driver for ENE KB1200
Add pinctrl driver for ENE KB1200

Signed-off-by: Steven Chang <steven@ene.com.tw>
2024-03-15 09:39:48 +00:00
Krisna Resi 7dd7175336 drivers: rtc: Fix RTC alarm when using both CONFIG_COUNTER and CONFIG_PM
It is found that when we use CONFIG_COUNTER and CONFIG_PM concurrently,
the RTC alarm callback can be used only once (in some cases, it just
won't work at all, e.g., using CONFIG_BT). By set the DBP bit on PWR
control register 1 via LL_PWR_EnableBkUpAccess function to temporarily
disable write protection every time we assign RTC alarm, we can register
alarm callback correctly. Tested on Nucleo WB55RG.

Fixes: #68673
Signed-off-by: Krisna Resi <krisna_resi@ymail.com>
2024-03-15 09:33:14 +00:00
Jun Lin 0bf4ec6d7b drivers: gpio: npcx: workaround both trigger issue for npcx9m7fb
Apply the workaround for the issue "MIWU Any Edge Trigger Condition" in
the NPCX99nFB_Errata.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-03-15 08:43:47 +00:00
Benedikt Schmidt 4e4049d939 drivers: sensor: add diagnostics sensor for BD8LB600FS
Implement a sensor for the output diagnostics of the low side
switch BD8LB600FS.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-03-15 09:00:26 +01:00
Benedikt Schmidt 31450fcb12 drivers: gpio: split up driver for BD8LB600FS into a GPIO and MFD
Split up the driver for the low side switch BD8LB600FS into a GPIO
and MFD part.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-03-15 09:00:26 +01:00
Serhiy Katsyuba 41b3c71586 drivers: dma: intel_adsp_hda: Fix L1 exit condition
Transition to a low power DMI L1 state should be allowed only after all
pending DMA channels transfers have started.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2024-03-15 08:59:12 +01:00
Phi Bang Nguyen 4b8d3dbed8 drivers: video: sw_generator: Fix set_format
Add code to handle invalid formats when setting format

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-03-15 08:52:13 +01:00
Phi Bang Nguyen d1275f7fde drivers: video: sw_generator: Support XRGB32 pixel format
Add support for XRGB32 pixel format as this is useful to test camera
and display drivers on i.MX RT11xx

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-03-15 08:52:13 +01:00
Phi Bang Nguyen cd2d987e82 drivers: video: sw_generator: Fix minor macro usage
VIDEO_PATTERN_FPS should be coherently used across the entire code file.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-03-15 08:52:13 +01:00
Fabio Baltieri d0a8c4158c input: gpio_keys: fix suspend race condition
Change the suspend/resume code to ensure that the interrupt are disabled
before changing the pin configuration. The current sequence has been
reported to cause spurious readouts on some platforms, this takes the
existing code and duplicates for the suspend and resume case, but swaps
the interrupt disable and configure for the suspend case.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-03-14 17:03:01 -05:00
Jun Lin 6057a83060 drivers: entropy: npcx: add rng driver support
This commit add the rng driver support by using the npcx drgb API.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-03-14 18:14:04 +00:00
Kurtis Dinelle 3c3bee96ef drivers: sensor: tsl2591
Add the tsl2591 sensor to drivers.

Signed-off-by: Kurtis Dinelle <kurtisdinelle@gmail.com>
2024-03-14 16:32:24 +00:00
Emil Lindqvist b610312314 modem_cellular: add registration status API
This commit implements a network registration status API,
including return of reject cause in case of denial.

Signed-off-by: Emil Lindqvist <emil@lindq.gr>
2024-03-14 16:30:57 +00:00
Sebastian Głąb 3c2b68eb61 drivers: watchdog: wdt_nrfx.c Fix channel id check in wdt_feed()
A Bug in the watchdog driver code allows an unconfigured
WDT timer channel to be feed.

The first configured WDT timer channel has an id of zero.
At this point, data->m_allocated_channels is equal to one.
The condition of the if statement is invalid and allows
channel one to be feed.

Change the test condition from greater to greater-or-equal.
Add check if channel id is less than zero.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-03-14 11:02:19 -05:00
Tomas Galbicka 9882cf11cc drivers: mbox: Fix nxp,mbox kconfig depends on
This commit fixes Kconfig.nxp_mailbox depends on is now
set to correct value DT_HAS_NXP_MBOX_MAILBOX_ENABLED.

Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
2024-03-14 11:01:07 -05:00
Andrzej Głąbek cb6f44c3b9 drivers: nrf_qspi_nor: Handle anomaly 159 on nRF5340
The nrfx_qspi driver in nrfx 3.4.0 started checking conditions that
could trigger anomaly 159 on nRF5340 so make sure that QSPI transfers
are only performed with properly configured clocks (PCLK192M undivided
and HCLK128M divided by 2).

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-03-14 15:35:06 +01:00
Fabio Baltieri 154b2b9c1c input: pat912x: fix build with default cpi setting
Fix up the BUILD_ASSERT so that it does not trigger if the resolution
cpi is not specified in the devicetree and left to the default value.
Also use the correct spelling for "cpi".

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-03-14 09:47:36 +00:00
Tom Chang 87f77ca35f drivers: espi: npcx: fix warning when using ESPI_OOB_RX_ASYNC macro
This CL prevents unused warnings when CONFIG_ESPI_OOB_CHANNEL_RX_ASYNC
is used.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-03-14 09:33:01 +01:00
Tim Lin ebbc96534c ITE: drivers/i2c: Change GPIO output type to open-drain in recovery mode
If I2C recovery mode uses GPIO push-pull to drive(3.3v), it will result
leakage in a pull-up voltage of 1.8V on the power rail, leading to
damage to 1.8V devices, including SoC, sensors.
Therefore, the recovery mode should be changed to GPIO open-drain type
to avoid this.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-03-14 09:31:50 +01:00
Declan Snyder 5254fcbd0a drivers: gpio_mcux: Add support for GPIO ICR
Add support for devices that use the kinetis
GPIO/PORT scheme but with the slight modification
that the interrupt control bits are in the GPIO
peripheral instead of the PORT peripheral.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-13 22:38:46 +00:00
Mahesh Mahadevan 205a8fed79 drivers: pinctrl: Add support for more ports
MCX has more port modules which requires updating
the pinctrl driver

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-03-13 22:38:46 +00:00
Mahesh Mahadevan 61d1a711fc drivers: uart: Use the register define instead of enum define
The enum define is not implemented with the same name on all SoC's.
Use the register define instead.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-03-13 22:38:46 +00:00
Mahesh Mahadevan bb9386473b dts: nxp_lpuart: Interrupts is no longer a required property
Some NXP SoC's have a FlexComm interface which manages
interrupts.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-03-13 22:38:46 +00:00
Mahesh Mahadevan 742a8e85d8 drivers: clock: Enable PORT & LP Flexcomm in NXP syscon driver
1. Add support to enable PORT control clocks
2. Add support for LP Flexcomm
3. MCX family has a different Clock API for USDHC.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-03-13 22:38:46 +00:00
Mahesh Mahadevan 301ebf83f3 drivers: uart: Use the NXP Flexcomm driver to interrupt handling
The Low Power Flexcomm driver manages the interrupt handling
and provides an API to register interrupt callbacks.
Register the NXP LPUART interrupt handler.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-03-13 22:38:46 +00:00
Mahesh Mahadevan 72fd8d14da drivers: mfd: Add NXP LP Flexcomm driver
1. This driver allows to configure the Low Power Flexcomm
   interface as a UART, SPI or I2C device.
2. Manages the interrupts and dispatches it to the
   appropriate device driver.
3. A Flexcomm interface can be configured to be used as
   I2C and UART device. However a SPI device cannot be used
   concurrently with I2C or UART. Add checks for this feature.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-03-13 22:38:46 +00:00
Ryan Erickson 06c62e4c17 modem: modem_cellular: fixes for hl7800
Add connect match for dialing PPP connection.
Ensure PDP authentication is disabled.
Request manufacturer, firmware version, and IMSI from the modem.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2024-03-13 13:05:51 -05:00
Declan Snyder 5f53afca0a soc: nxp: Add RW SOC Family
Add SOC definition for NXP RW Family

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-13 16:45:13 +00:00
Declan Snyder 17ab3d5deb drivers: gpio: mcux_lpc: Support MCI_IO_MUX
Support MCI_IO_MUX pinctrl in LPC GPIO driver

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Co-authored-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-03-13 16:45:13 +00:00
Declan Snyder 6f4cf5c73c drivers: pinctrl: Add RW pinctrl driver
Add pinctrl driver for NXP RW6XX chip.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Co-authored-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-03-13 16:45:13 +00:00
Glenn Andrews 2f691ad8de Driver Input: FT5336 reports touch pressed on no touches
See https://github.com/zephyrproject-rtos/zephyr/discussions/69997

The driver thinks that when there are zero touches, the screen is
pressed. This changes it so zero touches mean the screen is not
pressed.

Also, multi-touch is now considered a single touch, and the
TOUCH_ID is checked so that only valid touches are registered.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-03-13 11:39:19 -05:00
Lucas Denefle 08aa504e66 modem: modem_cellular: increase imsi size
Fixes an issue introduced with `080d51bb`

Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
2024-03-13 09:46:38 -05:00
Lucas Denefle b287ad70f8 modem: modem_cellular: increase imei size
Fixes an issue introduced with `b668296a`

Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
2024-03-13 09:46:38 -05:00
Lucas Denefle fe4f002eef modem: modem_cellular: increase model_id size
Fixes an issue introduced with `08a51bae`

Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
2024-03-13 09:46:38 -05:00
Lucas Denefle c36b1039be modem: modem_cellular: increase manufacturer size
Fixes an issue introduced with `ae951f5f`

Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
2024-03-13 09:46:38 -05:00
Lucas Denefle 4cd0dee7cc modem: modem_cellular: increase fw_version size
Fixes an issue introduced with `adcdf64a`

Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
2024-03-13 09:46:38 -05:00
Fabio Baltieri a63b3d1de6 input: xec: use the generic keyboard code
Split the common keyboard scanning code out of the XEC specific driver
and use the generic code instead.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-03-12 19:30:09 -04:00
Fabio Baltieri ddd2cf1fdc input: convert kscan_mchp_xec.c driver to input
Convert the XEC keyboard scanning driver from kscan to input, add the
corresponding kscan compatibility node to the current board, build test
only.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-03-12 19:30:09 -04:00
Guillaume Gautier 3b50237699 drivers: adc: stm32: use correct macros for dma transfer
Use the correct dedicated macros for enabling DMA transfer for STM32H7 and
U5.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-03-12 19:28:54 -04:00
Guillaume Gautier 5d2558bdad drivers: adc: stm32: dma fixes
Add a blank define for the case where DMA channels are defined in ADC node
of the dts but STM32_ADC_DMA is not enabled. Otherwise compilation fails.
Also fix the way the DMA channel is configured by using a standard DT
macro, otherwise it doesn't work for dma-v2bis DMA types.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-03-12 19:28:54 -04:00
Fabio Baltieri d123a4571a input: kbd_matrix: define PRIkbdrow coherently
It's not supposed to have the "%" in the macro, reuse the existin one
for the data type.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-03-12 19:28:40 -04:00
Daniel DeGrasse 5b6fadc10d drivers: mipi_dbi: mipi_dbi_spi: do not take spinlock
Taking a spinlock will result in interrupts being blocked in the MIPI
DBI driver, which is not desired behavior while issuing SPI transfers,
since the driver may use interrupts to drive the transfer

Fixes #68815

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-03-12 15:12:12 -05:00
Alberto Escolar Piedras 62e9a38590 drivers counter_nrfx_rtc: Fix for simulation
For simulation, let's convert 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-12 17:57:18 +00:00
Yasushi SHOJI 98903d48c3 drivers: sensor: ams_as5600: Fix calculation of fractional part
The original calculation has two bugs. One is the calculated value, and the
other is that the value is not in one-millionth parts.

What the original calculation does is compute a scaled position value by
multiplying the raw sensor value (`dev_data->position`) by
`AS5600_FULL_ANGLE`, which represents a full rotation in degrees. It then
subtracts the product of the whole number of pulses (`val->val1`) and
`AS5600_PULSES_PER_REV` from this scaled position value.

    ((int32_t)dev_data->position * AS5600_FULL_ANGLE)
    - (val->val1 * AS5600_PULSES_PER_REV);

What you actually need is to extract the fractional part of the value by
taking the modulo of AS5600_PULSES_PER_REV from the scaled value of the
position.

   (((int32_t)dev_data->position * AS5600_FULL_ANGLE)
   % AS5600_PULSES_PER_REV)

Then convert the value to one-millionth part.

   * (AS5600_MILLION_UNIT / AS5600_PULSES_PER_REV);

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
2024-03-12 16:08:17 +01:00
Fabio Baltieri fe2b03178a gpio: pcal64xxa: switch to 8 bit internal data automatically
Convert the internal uint16_t data of the driver to an internal type
that automatically switches from uint8_t to uint16_t depending on
whether any 16 bit device is present in the system or not. This shrinks
the internal structures by few bytes when the extra data is not needed.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-03-12 16:06:25 +01:00
Dat Nguyen Duy 9c500a8a82 drivers: mbox: fix build failures when userspace enabled
Fix build failures due to using wrong arguments when
calling the implementation functions

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2024-03-12 15:39:05 +01:00
Andrzej Głąbek 6692d880e9 modules: hal_nordic: Enable support for DPPI on nRF54H20
Include into compilation the nrfx_gppi_dppi_ppib helper and related
interconnect layers when DPPIC nodes are enabled in DTS. Provide macro
definitions required by those interconnect layers based on information
from devicetree (the nrf_grtc_timer is only modified because a macro
that it uses became more generic).

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-03-12 14:27:16 +00:00
Mikhail Siomin 8dbfdd6f9f drivers: mcux: flexio: Added MCUX FlexIO SPI driver
Added SPI driver using FlexIO.

Signed-off-by: Mikhail Siomin <victorovich.01@mail.ru>
2024-03-12 14:00:45 +01:00
Mikhail Siomin 877b10bef1 drivers: mcux: flexio: Added generic MCUX FlexIO driver
Added FlexIO driver that distributes hardware resources
between interfaces using them.

Signed-off-by: Mikhail Siomin <victorovich.01@mail.ru>
2024-03-12 14:00:45 +01:00
Mikhail Siomin b12e8cd2b0 clock: nxp_imx: Added clock control support for FlexIO
Added clock control support for flexIO for i.MX series.

Signed-off-by: Mikhail Siomin <victorovich.01@mail.ru>
2024-03-12 14:00:45 +01:00
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