Commit graph

18323 commits

Author SHA1 Message Date
Tom Chang 3f8fe6b4b5 drivers: espi: npcx: select RING_BUFFER for p80
This CL adds automatic select CONFIG_RING_BUFFER for port 80 multi-byte.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-05-20 20:52:35 -04:00
Tom Chang fe138fc246 drivers: espi: npcx: update espi taf driver
This CL updates the read, write, erase, and get_channel_status
implementations of NPCX chip.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-05-20 20:52:35 -04:00
Hao Luo 35aae8b5c1 drivers: watchdog: Add support for Apollo3 SoCs watchdog
This commit adds support for the watchdog which
can be found in Apollo3 SoCs

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-05-20 20:50:26 -04:00
Aurelien Jarno 52935edc5c drivers: sensor: stm32_temp: use sensor_value_from_float()
The temperature being computed using a float variable, use
sensor_value_from_float() instead of sensor_value_from_double(). This
saves some flash.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-05-20 20:39:01 -04:00
Yong Cong Sin 1e196f0f75 sensor: sensor_shell: print something when trig command succeeds
Print something to the shell when the `trig` command
completed successfully.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-20 22:56:11 +03:00
Juliane Schulze 72b20315ea drivers: set LIS2DH default trigger mode to "EDGE_BOTH"
Previous value just activated the ability to trigger for both edges,
without (de)-activating the gpio. This caused an assrtion error in GPIO.h.

Fixes #71227

Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
2024-05-20 18:05:01 +02:00
Kevin Wang 52284f57ce drivers: counter: fix the bug for atcpit100
Let the callback execute after the interrupt status has cleared.
Because if the callback is executed before the interrupt status
is cleared, it might cause subsequent counter interrupts to fail to
trigger due to the callback function taking too long to execute.

Signed-off-by: Kevin Wang <kevinwang821020@google.com>
2024-05-20 15:17:15 +01:00
Jeppe Odgaard 0b94ab7704 drivers: sensors: add veaa_x_3 proportional pressure regulator sensor
Add driver for Festo VEAA-X-3 series proportional pressure regulator.

The driver assumes that the maximum ADC value matches the maximum
output from the device, and that the maximum DAC value matches the
maximum input value for the device. External hardware is probably
required between the ADC/DAC and the device.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-05-18 15:56:09 +03:00
Björn Stenberg 63c8b950e5 voltage_divider: Add support for single-ended 16-bit ADC
Unless configured as differential, the raw ADC data is unsigned.

Includes workaround for #71119.

Signed-off-by: Björn Stenberg <bjorn@haxx.se>
2024-05-18 15:55:02 +03:00
Declan Snyder 938050c7ce drivers: lpuart: Fix async configure
Fix async configure function not being called
when the irq driven api is not used, which
both causes a build warning and would not
work at runtime.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-18 15:50:11 +03:00
Tomasz Moń f4e95ccd48 drivers: udc_dwc2: Properly revive STALLed endpoints
DWC2 documentation unfortunately assigns somewhat confusing semantics to
endpoint "enable"/"disable" and "activate"/"deactivate". The Zephyr USB
device stack endpoint enable/disable refers to DWC2 activate/deactivate.
The DWC2 endpoint enable/disable actions can be loosely referred to
Zephyr USB stack enqueue/dequeue.

Rename the functions and rework internal working to match DWC2
Programming Guide. This makes endpoint halt work as expected by the
stack and therefore fixes all classes that rely on correct STALL
handling. Most notable STALL user is the Mass Storage class.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-05-18 13:24:26 +02:00
Tomasz Moń 00e2b86708 drivers: udc_dwc2: Process SETUP stage when allowed
DWC2 programming guide mentions that SETUP can only be processed by
application after DOEPINTn.SETUP interrupt. Not respecting this
requirement makes setting Global OUT NAK hang while waiting for
GOUTNAKEFF interrupt until the host starts next control transfer.
Global OUT NAK is necessary if the application ever wants to properly
cancel any ongoing transfer.

Change the processing to comply with the programming guide.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-05-18 13:24:26 +02:00
Tomasz Moń fa912f4389 drivers: udc_dwc2: Add missing register bit defines
Add missing GINTSTS, GRXSTSR and DEPCTL bit defines based on nRF54H20
register map.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-05-18 13:24:26 +02:00
Phi Bang Nguyen 95657e3312 drivers: video: Add ov5640 camera driver
Add driver to support ov5640 camera sensor

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-17 14:50:56 -05:00
Abderrahmane Jarmouni 4d038fb523 drivers: rtc: stm32: fix error handling
re-enable Write Protection when Init Mode errors.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-17 14:47:05 -05:00
Ioannis Karachalios 6f0476eb77 drivers: rtc: smartbond: Update RTC driver
This commit should fix the followings:
1.  When an alarm event is initialized, the driver should only
    consume the valid alarm fields, based on the given mask.
    Otherwise, the driver should use default valid subfield
    values.
2.  Setting an alarm event should not return with error code
    if the timer and/or calendar counters have yet to be
    initialized, explicitly. Instead, a log warning should be
    issued.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-17 14:46:11 -05:00
Ioannis Karachalios b8836ab94a drivers: display: smartbond: Acquire power rail when using PM
The power rail of a peripheral block should always be
acquired/released before/after its employment even if
it's known that it should already be up and running.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-17 14:42:24 -05:00
Johann Fischer 715e4ce6f3 drivers: udc_dwc2: prevent access to registers if USBHS is not ready
On USBHS, we cannot access the DWC2 register until VBUS is detected and
valid. Kernel event API is used to block if a valid VBUS signal is not
present when the user tries to force usbd_enable().

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-17 14:05:08 +01:00
Johann Fischer acd2fa7972 drivers: udc_dwc2: fix interpretation of NUMDEVEPS and INEPS fields
The NUMDEVEPS field provides the number of endpoints in addition to the
control endpoint. It is used to iterate over GHWCFG1 register value to
get correct number of configured IN/OUT endpoints. To get it correctly,
we need to use it internally as number including control endpoint.

Interpretation of INEPS misses +1 because value 0 means 1 IN endpoint
and so on.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-17 14:05:08 +01:00
Johann Fischer b117155320 drivers: udc_dwc2: add vendor quirks to support Nordic USBHS controller
Add vendor quirks to support Nordic USBHS controller.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-17 14:05:08 +01:00
Johann Fischer 6d06a8cea9 drivers: udc_dwc2: use devicetree to configure endpoint capabilities
Although we can get the number of configured OUT and IN endpoints and
endpoint capabilities from the DWC GHWCFGn registers, we need to
configure the number of endpoint configuration structs at build time. On
some platforms, we cannot access the hardware register at pre-init, so
we use the GHWCFGn values from the devicetree to provide endpoint
capabilities. This can be considered a workaround, and we may change the
upper layer internals to avoid it in the future.

Also, add a new vendor quirk to fill in platform-specific controller
capabilities.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-17 14:05:08 +01:00
Johann Fischer efb286dfdf drivers: udc_dwc2: rework vendor quirks
Rework and rename vendor quirks to better reflect where they intended to
be called. Number of quirks probably not final and will be trimmed
later.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-17 14:05:08 +01:00
Johann Fischer 67cdccc1c2 drivers: udc_dwc2: rework controller initialization
Move most of the controller initialization to a separate function called
during udc_enable(). This allows us to add support for the platform
where the device controller is only available when VBUS is present and
the PHY is powered.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-17 14:05:08 +01:00
Yong Cong Sin 5f1e1c7b34 drivers: sensor: sensor_shell: fix infinite loop when doing sensor get
Should increment `ch.chan_idx` instead of `channel_idx`,
otherwise we will be stucked in the loop forever.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-17 14:34:09 +02:00
Laurentiu Mihalcea ae082064ff drivers: dai: sai: write some data into TX FIFO before start
While running the following command:

	aplay ... | arecord ...

multiple times, it was discovered that the SAI transmit
FIFO goes into underrun. This only happened in the
beginning, a few BCLK cycles after unmasking the transmit
data line. With the following flow:

	1) Trigger start on RX
		a) Do TX and RX software reset
		b) Enable RX FIFO error interrupt
		c) Enable RX DMA requests
		d) Enable receive data line
		e) Enable transmitter
		f) Enable receiver

	    ..... some time has passed .....

	2) Trigger start on TX
		a) Enable DMA requests
		b) Enable transmit data line

and configuration in mind:

	1) RX is SYNC with TX
	2) TX is ASYNC
	3) Each FSYNC edge is 32-bit wide
	4) Each frame contains 2 32-bit words

this points to the following possibilites:

	1) The transmitter is enabled so close to the
	start of a new frame that even though the DMA requests
	are asserted, the DMAC doesn't have enough time
	to service them until the module goes into underrun
	=> the timing is bad.

	2) The transmitter is enabled somewhat close to
	the start of a new frame such that the DMAC is not
	fast enough to service the module until it goes into
	underrun => DMAC is too slow AND the timing is bad.

Although the exact cause was not pinpointed, this patch
aims to fix the problem by writing a frame's worth of 0s
in the transmit FIFO. This way, even if we're dealing with
scenario 1) or 2), the DMAC has plenty of time to perform
the transfer (i.e: a frame), thus avoiding the underrun.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-05-17 12:40:43 +02:00
Yong Cong Sin b0394425e1 drivers: sensor: st: vbat: check for ADC nodes
The vbat driver requires the adc node to be enabled:

```c
.adc = DEVICE_DT_GET(DT_INST_IO_CHANNELS_CTLR(inst))
```

Update its Kconfig to depend on `DT_HAS_ST_STM32_ADC_ENABLED`,
which is the `"st,stm32-adc"` compat that all ST ADC bindings
include, this will guarantee that at least one ADC node is
enabled, but not necessarily the ADC used by the vbat node.

To make sure that it at least compiles, we init the `adc`
pointer only if the specified ADC node is enabled, otherwise
it will points to `NULL`.

Finally, check if the `adc` points to `NULL` in
`stm32_vbat_init`. We are not relying on the existing
`device_is_ready` check because `DEVICE_DT_GET` will not
return `NULL` if the ADC is enabled. `adc == NULL` means
that the ADC node is not enabled in the devicetree.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-17 11:39:19 +02:00
Marcin Niestroj 87a6df2a9b drivers: nsos: support IPV6_V6ONLY getsockopt() and setsockopt()
Handle IPV6_V6ONLY option in getsockopt() and setsockopt() APIs.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-05-17 11:12:43 +02:00
Marcin Niestroj d47ec4f75d drivers: nsos: support IPPROTO_TCP getsockopt() and setsockopt()
Handle IPPROTO_TCP specific options in getsockopt() and setsockopt() APIs.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-05-17 11:12:43 +02:00
Marcin Niestroj 736fe29349 drivers: nsos: support ioctl(FIONREAD)
This further increases compatibility with tests defined in
'tests/net/socket/udp/'.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-05-17 11:12:43 +02:00
Marcin Niestroj cd2c425efe drivers: nsos: support setsockopt(SO_RCVTIMEO)
Handle timeout on receive that is configured using SO_RCVTIMEO.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-05-17 11:12:43 +02:00
Marcin Niestroj a3f2b5f4b3 drivers: nsos: initial support for getsockopt() and setsockopt()
Add initial support for getsockopt() and setsockopt() on SOL_SOCKET level.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-05-17 11:12:43 +02:00
Andrei Emeltchenko adeb19b30c drivers: apic_tsc: Use toolchain cpuid()
We have already code using toolchain provided __get_cpuid(), clean up
apic_tsc and make it consistent with the rest of the code.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2024-05-17 09:30:27 +02:00
Tom Burdick b249535093 sensors: Add channel specifier
Use a structured channel specifier rather than a single enum when
specifying channels to read in the new read/decoder API.

Replaces usages of a seperate channel and channel_index parameter
where previously used with a struct sensor_chan_spec.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-05-17 09:30:18 +02:00
Daniel DeGrasse a2087bed16 drivers: sdhc: sdhc_spi: rework CMD12 failure logic
Rework CMD12 failure logic for SDHC SPI driver. Previously, the error
code of CMD12 was not checked, so even if CMD12 failed to send the
initial command would be retried. Change this behavior to retry CMD12
until it succeeds. If CMD12 fails, its error code will be propagated to
the caller. Otherwise, the return code from the command being sent by
the caller will be propagated.

Fixes #72365

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-17 09:30:12 +02:00
Daniel DeGrasse cb9d8bac54 drivers: sdhc: sdhc_spi: release bus on error
Properly release SPI bus on transmit error within the SDHC SPI driver.
In these cases return code is not checked, as we wish to return the
error code from the failed transfer to the SD stack.

Fixes #72364

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-17 09:30:12 +02:00
Flavio Ceolin 8cd1ab8896 drivers: pcie: Remove deprecated pcie_bdf_lookup
pcie_bdf_lookup() was deprecated before 3.3 release. Time to remove
it.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-17 09:30:04 +02:00
Flavio Ceolin f4aefc281b drivers: pcie: Remove deprecated pcie_probe
pcie_probe() was deprecated before 3.3 release. Time to remove it.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-17 09:30:04 +02:00
Jerzy Kasenberg 82ca880fb9 drivers: clock_control: Smartbond: Add runtime frequency support
RC32K and RCX low power clocks require runtime calibration to work
correctly.
Frequency of those clock can differ from chip to chip, one constant
value from Kconfig may not be best when low power clock (sourced
from RCX or RC32K) is used for system tick.

This code modifies global z_clock_hw_cycles_per_sec variable that
is used when TIMER_READS_ITS_FREQUENCY_AT_RUNTIME is enabled
in Kconfig.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-05-17 09:29:58 +02:00
frei tycho caf332e745 drivers: added missing parenthesis
- added missing parenthesis around macro argument expansion

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-05-17 09:29:48 +02:00
Andrzej Kaczmarek 6306596b27 drivers: hci: da1469x: Add driver for CMAC core on DA1469x
This adds HCI driver which enables communication with CMAC core on
Renesas SmartBond DA1469x series. The CMAC core is running an Apache
NimBLE controller binary and uses shared memory for communcation via
mailboxes.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2024-05-16 18:58:00 -04:00
Jeppe Odgaard c9f53d3374 drivers: sensor: add Innovative Sensor Technology TSic xx6 driver
Add driver for TSic 206/306/316/506F/516/716 temperature sensor.
The driver uses PWM capture driver to read a single wire with
Manchester-like encoding.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-05-16 18:57:24 -04:00
Daniel DeGrasse 1de7574d3a drivers: flash: flash_mcux_flexspi_nor: better handle legacy SFDP tables
Implement more robust handling for legacy SFDP tables, which may not
implement some of the JEDEC defined DWORDS for SFDP data. Instead of
failing to probe/initialize the flash when these DWORDS are not defined
in the basic flash parameter table, revert to sane defaults for SPI
flash.

Fixes #72051

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-16 18:56:33 -04:00
Jordan Yates 7ddbe9d4bd sensor: voltage_divider: fix power-gpio
`CONFIG_PM_DEVICE` being disabled does not mean that the `power-gpio`
does not need to be controlled.

Additionally, not having a `power-gpio` property does not mean that
power management is not supported, just that is has no work to do.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-16 18:55:45 -04:00
Ioannis Karachalios 97bd924f59 drivers: entropy: smartbond: Bug fix
This commit should fix few wrong expressions

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-16 18:55:18 -04:00
Sylvio Alves bda05fb51a drivers: wifi: esp32: remove pre-defined mbedTLS requirements
In #72651, build fails due to conflict when enabling mbedTLS components.
Current Wi-Fi implementation for ESP32 can discard those selected cryptos.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-05-16 18:54:43 -04:00
Ryan McClelland c75783219f drivers: i3c: cdns: handle variable length ccc with m0 err
The CDNS will report a M0 error if the data length is not what
it expects, but certain CCCs can have a variable length such as
GETMXDS and GETCAPS. This sets it up to ignore the M0 error if
it sees that ccc was GETMXDS or GETCAPS.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-05-16 16:23:31 +02:00
Ryan McClelland bb66b7b870 drivers: i3c: shell: fix argc length check for optional param
GETSTATUS and GETMRL where not checking the right argc length. This
corrects it to check for the right count.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-05-16 16:23:31 +02:00
Ryan McClelland 328b03f56e drivers: i3c: shell: add ccc getcaps command
Add a shell command for the CCC GETCAPS

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-05-16 16:23:31 +02:00
Ryan McClelland e59d65536d drivers: i3c: add reading GETCAPS in basic_info_get
Add reading of GETCAPS CCC in `i3c_device_basic_info_get`.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-05-16 16:23:31 +02:00
Ryan McClelland 9640905a71 drivers: i3c: add ccc getcaps helper
This adds the defines for getcaps format 1 and format 2.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-05-16 16:23:31 +02:00
Ryan McClelland 014e879e6f drivers: i3c: use byte ordering macros with ccc
Use the sys_get_be* macros with ccc where it can be used.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-05-16 16:23:31 +02:00
Alberto Escolar Piedras d599e2b670 drivers/timer/nrf_grtc_timer: Misc fixes
Misc fixes for the grtc timer driver:
* In non tickless mode:
  * The tick time would drift a bit with each interrupt
  * If something would cause a very significant delay
    in handling the tick interrupt the number of announcements
    would be incorrect
* Fortickless mode: The calculation of the next tick time
  in sys_clock_set_timeout() was incorrectly done,
  resulting in two spurious, too early, wakes of the kernel
  before each correct wake. This caused tests/kernel/context/
  to fail.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-16 15:19:08 +01:00
Armin Brauns 846007676a drivers/flash: enable memory-mapped mode for STM32 QSPI
This puts the QSPI peripheral into memory-mapped mode when
CONFIG_STM32_MEMMAP is set. Writes and erase put it back into indirect
write mode.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-05-16 15:52:01 +02:00
Francois Ramu cb7ed8d97d drivers: flash: stm32 flash driver has a Kconfig STM32_MEMMAP
This CONFIG_STM32_MEMMAP is for enabling the MemoryMapped mode
on external octo or quad spi memory.
In this case, the flash_stm32_read is done in mem map mode
the flash_stm32_erase is not available.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-05-16 15:52:01 +02:00
Fabio Baltieri 7a538c88cd input: gpio_keys: skip change checking when suspended
Check if the driver is suspended in gpio_keys_change_deferred(), this
avoids a potential situation where a race condition could try and read
from a pin that has just been disconnected.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-05-16 14:02:36 +02:00
Jordan Yates d725666b2c sensor: convert ADC depends on to select
When a sensor that depends on an ADC is enabled in devicetree, enable
the ADC subsystem. ADC is roughly equivalent to a bus for these sensors
(the mechanism through which data is transferred), which had the same
conversion applied in #48707.

The same benefits apply here, namely removing the need for the following
pattern in board `.kconfig` files:
```
configdefault ADC
    default y if SENSOR
```

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-16 13:31:32 +02:00
Francois Ramu c8cd57fe9e drivers: flash: stm32 qspi driver when Dual-Flash not supported
Some stm32 devices with quadspi (like stm32l47x or stm32l48x)
does not support Dual-Flash Mode. Avoid building error even if
the &quadspi node has a <flash-id>  property defined.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-05-16 11:00:27 +02:00
Henrik Brix Andersen 0f7cd6128e drivers: can: set default initial bitrates via Kconfig
Set the default initial bitrates globally via Kconfig. The initial bitrates
can still be overridden using the "bus-speed" and "bus-speed-data"
devicetree properties.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-05-16 09:23:59 +02:00
Daniel DeGrasse 3b718bf1fe drivers: sdhc: rcar_mmc: remove frequency correction code
RCAR MMC driver previously had to report inaccurate maximum supported
frequency to SD subsystem so that the subsystem would select SDR104 mode
timing. Remove this logic, as it should no longer be needed.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-16 09:21:03 +02:00
Mahesh Mahadevan d9e83c9026 drivers: usb: usb_dc_mcux: add case for MCXN94X SOC series
Add case for MCXN94X SOC series to indicate which device controller
is in use.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-05-16 09:17:18 +02:00
Johann Fischer ba2e257d06 drivers: udc_nrf: rework controller initialization
udc_init() only initializes and enables the USB regulator. This is
enough to detect VBUS changes, the USB controller is enabled in
udc_enable(). Deinitialization happens correspondingly in reverse order.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-15 17:29:24 +01:00
Johann Fischer 48f2a4bc1a usb: device_next: remove initialized state checks in event processing
For the simple events, do not check whether the device driver and stack
are marked as initialized. USB device notification will reschedule
delivery if the stack is not yet marked initialized.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-15 17:29:24 +01:00
Zhaoxiang Jin db87c6c0ff drivers: adc: Support regulator output as reference to LPADC
Support regulator output different voltage as reference to LPADC
the regulator output voltage can be set through property
zephyr,vref-mv

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-05-15 17:28:38 +02:00
Zhaoxiang Jin fd736c4f2d drivers: regulator/nxp_vref: Remove nxp_ground_select property
Remove nxp_ground_select property.
Delete the use of NXP vref peripheral CSR register REFL_GRL_SEL bit.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-05-15 17:28:38 +02:00
Zhaoxiang Jin 5dde5416b3 drivers: regulator/nxp_vref: Fixed incorrect input parameter
Fixed incorrect parameter passed in function linear_range_get_value.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-05-15 17:28:38 +02:00
Mykola Kvach 69c6732d23 drivers: regulator: fixed warning during build in gpio regulator
Fix warning in gpio regulator:
    "declaration of 'ret' shadows a previous local".

Signed-off-by: Mykola Kvach <xakep.amatop@gmail.com>
2024-05-15 17:07:51 +02:00
Sebastian Głąb 319a8867ef drivers: watchdog: wdt_nrfx.c: Unistall timeouts in wdt_disable()
According to API description, wdt_disable() shall
automatically uninstall all timeouts.
https://docs.zephyrproject.org/latest/hardware/peripherals/watchdog.html

Implement missing wdt_disable() functionality:
- disable WDT RR channels;
- remove callback from timeout channels;
- set data->m_allocated_channels to zero.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-05-15 15:34:38 +01:00
Karol Lasończyk 3ca3131a7d drivers: adc: Update adc driver to support nRF54L15 device
Expands driver to cover nRF54L15 features like AIN as GPIO configuration,
new reference voltage, different set of supported gain options.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-05-15 15:33:41 +01:00
Ioannis Karachalios 6771e79729 drivers: entropy: smartbond: Add support for PM
This commit should add all the functionality needed for the entropy
driver to work when PM is enabled.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-15 16:09:32 +02:00
Hao Luo a64b069785 drivers: gpio: Add support for Apollo3 SoCs GPIO
This commit adds support for the GPIO which
can be found in Apollo3 SoCs

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-05-15 16:08:29 +02:00
Fin Maaß 2b496759eb drivers: ethernet: eth_liteeth: add set_config
Add set_config to set the mac address.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-15 16:07:21 +02:00
Armando Visconti 8e13268439 drivers/sensor: lps25hb: Fix int32 overflow in the val2 part
The val2 calculation was done using (1000000 / 40960) as
multiplying factor, which was sometimes leading to a
int32 overflow. So, let's use the equivalent (but smaller)
(3125 / 128).

Fix #46615

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-05-15 15:01:15 +02:00
John Johnson 15a1b6d5c2 drivers: esp_at: make esp_pull_quoted() to only return -EAGAIN
If no " character is found in buffer by esp_pull_quoted() it
returns -EAGAIN which causes a loop that never ends. This is because
the buffer dont get filled up with new data so no " chrachter will be
found. This commit changes esp_pull_quoted() to only return -EAGAIN,
so the buffer can get filled with new data and thus the loop can come
to an end.

Signed-off-by: John Johnson <john.filip.johnson@gmail.com>
2024-05-15 14:59:03 +02:00
Tomasz Moń 3a8c9b8ac3 drivers: udc_dwc2: Fix debug logging bus fault
Pass DIEPTXF address instead of value to sys_read32() to prevent bus
fault when debug logging is enabled.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-05-15 12:28:08 +02:00
Henrik Brix Andersen b989920c1b drivers: can: transceiver: gpio: add build assert for GPIO properties
Add a build-time assert for verifying that at least one of the supported
devicetree GPIO properties is present on each compatible devicetree node.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-05-15 11:17:43 +02:00
Francois Ramu 182c5475e2 drivers: flash: stm32 flash driver for xspi instance
Introduce a XSPI driver to cover the common XSPI peripherals
of the stm32 mcu: X is for single or quad or octo or hexa
SPI bus access to external memories
DMA not supported in this version

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-05-15 10:56:04 +02:00
Andrzej Głąbek 41786a6477 drivers: sensor: Add driver for nRF temperature sensor accessed via nrfs
Add driver, together with the corresponding dts binding and node in
the nRF54H20 SoC definiton, for the nRF temperature sensor that cannot
be accessed directly but only through nRF Services (nrfs) layer.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-05-15 09:25:30 +01:00
Filip Kokosinski 99aa65c725 drivers/console/xtensa_sim_console: force \r\n byte sequence
Force `\r\n` byte sequence for newline for the Xtensa simulator console
driver. This effectively mirrors the behavior of the UART console driver.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-05-15 09:33:27 +02:00
Fin Maaß 3b87a0b939 drivers: esp32: i2c: configure clock frequency
Be able to configure the clock frequency during runtime
using `i2c_configure()` and be able to use `i2c_get_config()`
of the i2c api for the esp32.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-15 09:29:31 +02:00
Benjamin Perseghetti daaf06db94 drivers: pwm: pwm_mcux: make thread safe with mutex.
Fixes a bug where more than one thread trying to access
different PWM devices can cause erroneous behavior.

Co-authored-by: James Goppert <james.goppert@gmail.com>
Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
2024-05-15 09:27:38 +02:00
Dawid Niedzwiecki 27c3378285 drivers: flash: stm32: select extended operations correctly
Select that the STM32 driver has extended operations feature when
the FLASH_STM32_BLOCK_REGISTERS is set.

It allows using only block registers extended operation.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-05-15 09:26:55 +02:00
Daniel DeGrasse bf61a47887 drivers: sdhc: imx_usdhc: extend reset timeout duration
Some instances of the USDHC peripheral take longer to reset, and will
timeout with the previous delay of 100 cycles. Extend this delay to 1000
cycles to resolve this.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 20:23:28 -04:00
Daniel DeGrasse da9361e544 drivers: sdhc: imx_usdhc: remove dead code for waiting for clock gate
Remove function for waiting for clock gate, as this is not used anywhere
within the USDHC driver.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 20:23:28 -04:00
Daniel DeGrasse bd17c86299 drivers: sdhc: imx_usdhc: move voltage selection to separate function
Some USDHC IP instances do not have the voltage control bit present, as
they can only operate at 3.3V. Move code to select 1.8V mode into a
separate helper, and guard the call to UDSHC_SelectVoltage() behind a
feature macro from MCUX SDK.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 20:23:28 -04:00
Phi Bang Nguyen ba1565b46d drivers: video: csi: Rename sensor to source
The CSI can connect to either a camera sensor (as on i.MX RT10xx) or
a MIPI CSI-2 receiver (as on i.MX RT11xx). To be generic, change the
naming from sensor to source.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-14 20:23:15 -04:00
Pisit Sawangvonganan eff80ae5bc modem: modem_cellular: make modem_cellular_config structure constant
Remove redundant `const` qualifiers in `struct modem_cellular_config` and
add `const` to the declaration to ensure the structure resides
in read-only memory (rodata).

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-05-14 20:22:45 -04:00
Aurelien Jarno 09fc2dab43 drivers: sensor: stm32_vref: get rid of floating point computation
Instead of using floating point operations to compute the vref voltage,
it is possible to use the sensor_value_from_milli() function.

On a STM32G0, this saves 130 bytes of flash, excluding the FP library
needed on a FPU less MCU.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-05-14 20:22:18 -04:00
Aurelien Jarno 99804c77c4 drivers: sensor: stm32_vbat: get rid of floating point computation
Instead of using floating point operations to compute the vbat voltage,
it is possible to do the computation using 32-bit variables by
reordering operations and using the sensor_value_from_milli() function.

On a STM32G0, this saves 140 bytes of flash, excluding the FP library
needed on a FPU less MCU.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-05-14 20:22:18 -04:00
Declan Snyder fa990a7639 drivers: dac: Add driver for NXP GAU DAC
Add driver for NXP GAU DAC using MCUX HAL.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-14 18:23:22 -04:00
Declan Snyder b9e89ef688 drivers: adc: Add NXP GAU ADC Driver
Add driver for NXP GAU ADC using MCUX HAL.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-14 18:23:22 -04:00
Ioannis Karachalios 75a3c5b848 drivers: display: smartbond: Add support for PM
This commit should add all the functionality needed for the DISPLAY
driver to work when PM is enabled.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-14 18:22:54 -04:00
Daniel DeGrasse 558c2916b9 drivers: display: mcux_elcdif: add additional documentation around PXP
Add additional documentation and warnings around PXP usage. PXP rotation
is only intended to be used when framebuffers passed to the eLCDIF
display driver are equal in size to the screen.

Moreover, PXP rotation is flipped versus LVGL rotation. So a LVGL
rotation of 90 degrees requires the PXP to be set to rotate 270 degrees
to function as expected.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:22:28 -04:00
Daniel DeGrasse 4f65595b24 drivers: flash: flash_mcux_flexspi_nor: reduce LUT usage
FLEXSPI nor driver uses several LUTs for "scratch" commands during the
SFDP probe phase that are not needed once the flash is configured. Set a
second "end" marker we can use to configure the FLEXSPI MEMC driver, so
that we can indicate the true number of LUTs needed by this driver when
init is completed.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:21:57 -04:00
Daniel DeGrasse ef8b8a2983 drivers: memc: memc_mcux_flexspi_is66wvq8m4: do not reset FLEXSPI
Do not reset the FLEXSPI during init, as this will crash the chip if we
are running the MEMC driver in XIP mode.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:21:57 -04:00
Daniel DeGrasse 372cf92060 drivers: memc: memc_mcux_flexspi: support initializing FLEXSPI when XIP
Add support for initializing the FLEXSPI when using a flash attached to
the FLEXSPI for XIP. This option is guarded behind a Kconfig, as
enabling it is dangerous and requires special care be taken by the user
to ensure that the configuration of pins and FLEXSPI settings will not
break support for reading the attached flash, as this will break XIP
support.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:21:57 -04:00
Daniel DeGrasse c4eac60982 drivers: memc: use custom initialization priority for FLEXSPI
Use custom initialization priority for FLEXSPI MEMC driver. This may be
needed when the MEMC driver must initialize before a flash driver, and
before another MEMC driver (for an attached device, like PSRAM)

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:21:57 -04:00
Daniel DeGrasse ba98dfd976 drivers: memc: memc_mcux_flexspi: correctly handle multi-device usage
When multiple devices are used, the FLEXSPI will place their address
spaces sequentially (based on the chip select port used). Additionally,
each device must use different sections of the FLEXSPI LUT table.

Fix the following calculation issues with multi-device usage:
- correct calculation of LUT sequence indices for AHB commands
- correctly add address and sequence offset when submitting FLEXSPI IP
  transfer

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:21:57 -04:00
Daniel DeGrasse 481462d4a6 drivers: memc: memc_mcux_flexspi: update documentation for flash_config
Update documentation for flash_config memc function, to correctly
reflect usage of the "lut_count" parameter

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:21:57 -04:00
Ayush Kothari 13dfd86616 Driver: Add pin inversion to Esp32 Uart
Additional properties are added to esp32 uart to allow
for signal inversion.

Signed-off-by: Ayush Kothari <ayush@croxel.com>
2024-05-14 18:21:27 -04:00
Alberto Escolar Piedras c1a39f31b2 driver: uart: native: fix stop_bits/databits mix
Correct a trivial bug and doxygen documentation error
in which data_bits was missused instead of stop_bits.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Signed-off-by: Mateusz Grzywacz <amateusz.grzywacz@gmail.com>
2024-05-14 18:19:11 -04:00
Jerzy Kasenberg f2e3d3f951 soc: smartbond: Move PM_DEVICE dependency to soc
For DA1469x if PM config is selected PM_DEVICE must also
be selected for GPIO to work when device enters/exists
deep sleep.

Previously GPIO and regulator drivers selected PM_DEVICE
when PM was enabled.
Now it is moved to SOC instead.

PM_DEVICE selection in GPIO could result in circular dependency
for mcux if MEMC_MCUX_FLEXSPI (which is already dependent on PM_DEVICE)
was to be additionally dependent on GPIO.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-05-14 17:05:03 +02:00
Armin Brauns 3ca157e76f drivers: usb: stm32: fix logic for USB clock configuration
- If the peripheral is OTG_HS with ULPI, enable the OTG_HS ULPI clock
  - The constant has a slightly different name on stm32h7
- Otherwise, if the peripheral is OTG_HS:
  - Disable the OTG_HS ULPI clock in sleep/low power mode,
  - If the peripheral is OTG_HS with PHYC[1], enable the PHYC clock.
- Otherwise, if the peripheral is OTG_FS[2] on stm32h7, also disable the
  OTG_FS ULPI clock in sleep mode (in the device/ driver, this is done in
  usb_dc_stm32_init()),

[1]: Internal HS PHY in stm32f7x2xx and (some) stm32f730xx
[2]: "OTG_FS" on stm32h7 is really just another OTG_HS peripheral, but
without any way to actually connect a HS PHY

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-05-14 17:04:49 +02:00
Jun Lin 71b71015a9 driver: espi: npcx: enable the Serial Port
Initialize and enable the Serial Port/Host UART when
CONFIG_ESPI_PERIPHERAL_UART=y.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-05-14 13:25:43 +02:00
Tomasz Moń 25229b2fce drivers: udc_dwc2: Submit reset after chirp sequence
DWC USB 2.0 HS OTG Controller sets USB Reset interrupt after Reset
signalling starts, but before the High-Speed Detection Handshake. This
allows software to perform most of the reset handling even before the
connection speed is known. The device controller indicates High-Speed
Detection Handshake result is available in DSTS register by setting
Enumeration Done interrupt.

USB stack expects that the connection speed is known immediately after
UDC_EVT_RESET is submitted. Due to this expectation, it is important to
submit UDC_EVT_RESET only after Enumeration Done interrupt to prevent
the USB stack from reading (and storing) actual device speed before
it is known.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-05-14 12:16:06 +01:00
Jamie McCrae 7a4f4711af drivers: led_strip: Make update channels function optional
Makes the update channels function optional, this is only
implemented in one driver so can be safely omitted from most
drivers

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Jamie McCrae 50b7d61c91 drivers: led_strip: Check length before updating LED strip
Checks that the supplied length is valid for the given driver
before passing it to the update function

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Jamie McCrae 4bea96b68b drivers: led_strip: Add length function
Adds a length function which returns the length of the LED strip

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Samuel Kleiser d796c117ce stm32: ospi: make all clk, dqs, ncs pins configurable
The clk, dqs and ncs pins can be remapped between OSPI instances, but the
driver doesn't support it, yet. Therefore replace hard coded numbers to
device tree optional properties.

Signed-off-by: Samuel Kleiser <s.kleiser@vega.com>
2024-05-14 09:32:57 +02:00
Luis Ubieda 413518e0c8 serial: bt: Set configurable options for the NUS Work-queue
Default priority set to Main Thread's and Stack-size set to 1KiB. This
should still allow for the System work-queue, considering this
Work-queue could be temporarily blocked on BT TX commands.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-05-13 16:17:58 -04:00
Luis Ubieda b1913fb47e drivers: serial: bt: Use dedicated Workqueue
Stop relying on the system workqueue, as the BT TX APIs should
potentially block and now by design this will not work with the
Bluetooth Stack (for good reasons). Now the UART NUS driver has a
dedicated workqueue, which all NUS instances share.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-05-13 16:17:58 -04:00
Abderrahmane Jarmouni e783aafdd0 drivers: uart_stm32: add DCache support in async DMA mode
Adapt the driver to verify if DMA buffers are located in noncacheable
memory when DCache is activated, in order to avoid cache coherency issues.
This is required until manual cache coherency management is implemented.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 16:09:20 -04:00
Fredrik Gihl 2d31d45429 drivers: sensors: Add support for ds18s20
Added support for the older ds18s20 inside the (newer) ds18b20.

Signed-off-by: Fredrik Gihl <fgihl@hotmail.com>
2024-05-13 16:06:35 -04:00
Hess Nathan 958a4505bd coding guidelines: comply with MISRA Rule 12.1.
-added parentheses verifying lack of ambiguities

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-05-13 16:05:53 -04:00
Grzegorz Swiderski 24ce3f4182 drivers: serial: nrfx: Update Kconfig dependencies for RX cache
Two Kconfig symbols were tied to a board-specific DT nodelabel - namely
the `NRFX_UARTE_CONFIG_RX_CACHE_ENABLED` and `UART_<n>_RX_CACHE_SIZE`
were tied to `shared_ram3x_region` - but this is not necessary.

That DT node is where the UARTE driver RX/TX cache buffers are placed
in the default nRF54H20 DK memory map, but on another board, they could
be located somewhere else.

The exact memory sub-regions used for this purpose are indicated using
the `memory-regions` property on each UARTE instance, which should be
generic enough already, so let's use that instead.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-05-13 16:05:39 -04:00
Balaji Srinivasan d9b3ffa5ea drivers: regulator: npm6001: Fix compiler warning
This patch fixes a compiler warning about the val being used
uninitialized. The previously present if check did not seem to satisfy
compiler. Hence the val is now explictly initialized.

Signed-off-by: Balaji Srinivasan <balaji.srinivasan@nordicsemi.no>
2024-05-13 09:54:48 -05:00
Mateusz Michalek a859191413 drivers: flash: RRAMC regions
Adding definition of regions granularity to Kconfig.

Signed-off-by: Mateusz Michalek <mateusz.michalek@nordicsemi.no>
2024-05-13 09:53:05 -05:00
IBEN EL HADJ MESSAOUD Marwa 23a03b7a0a drivers: counter: ll_stm32_timer: G4X changes
Use "const LL_TIM_OC_GetCompareCHx" & "const LL_TIM_IsEnabledIT_CCx" with
STM32G4X series, following changes in stm32cube:stm32g4xx:drivers:
include:stm32g4xx_ll_tim.h

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-13 14:23:52 +02:00
IBEN EL HADJ MESSAOUD Marwa 99fd91bf1c drivers: pwm: pwm_stm32: G4X changes
Use "const LL_TIM_IC_GetCaptureCHx" & "const LL_TIM_IsActiveFlag_CCx"
with STM32G4X series, following changes in stm32cube:stm32g4xx:drivers:
include:stm32g4xx_ll_tim.h

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-13 14:23:52 +02:00
IBEN EL HADJ MESSAOUD Marwa ccd1019f80 drivers: dma: G0X changes
Use "const LL_DMA_IsActiveFlag_HTx", "const LL_DMA_IsActiveFlag_TEx",
"const LL_DMA_IsActiveFlag_TCx" and "const LL_DMA_IsActiveFlag_GIx" with
STM32G0X series, following changes in stm32cube:stm32g0xx:drivers:
include:stm32g0xx_ll_dma.h

Use "const LL_DMAMUX_IsActiveFlag_SOx","const LL_DMAMUX_IsActiveFlag_RGOx"
"const LL_DMAMUX_ClearFlag_SOx" and "const LL_DMAMUX_ClearFlag_RGOx" with
STM32G0X series, following changes in stm32cube:stm32g0xx:drivers:
include:stm32g0xx_ll_dmamux.h

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-13 14:23:52 +02:00
IBEN EL HADJ MESSAOUD Marwa 1f16e9c44c drivers: counter: ll_stm32_timer: F4X changes
Use "const LL_TIM_OC_GetCompareCHx" & "const LL_TIM_IsEnabledIT_CCx" with
STM32F4X series, following changes in stm32cube:stm32f4xx:drivers:
include:stm32f4xx_ll_tim.h

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-13 14:23:52 +02:00
IBEN EL HADJ MESSAOUD Marwa 820cf4d639 drivers: pwm: pwm_stm32: F4X changes
Use "const LL_TIM_IC_GetCaptureCHx" & "const LL_TIM_IsActiveFlag_CCx"
with STM32F4X series, following changes in stm32cube:stm32f4xx:drivers:
include:stm32f4xx_ll_tim.h

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-13 14:23:52 +02:00
Marcin Niestroj 3111261940 drivers: nsos: fcntl: prefer Zephyr-specific macros over libc
Definitions of fcntl flags are different between native libc and Zephyr. In
order to correctly map those values to the host, include Zephyr's fcntl.h
header, instead of the one bundled with libc.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-05-13 14:22:46 +02:00
Johann Fischer b501278237 drivers: udc_dwc2: handle interrupt IEPINT before the RXFLVL
During a control read transfer host is able to start status stage as
soon as it receives last data packet. The time between last data packet
and status stage can be approximately 1 us at High-Speed and 8 us at
Full-Speed (exact timing depends on host but it is mostly constrained by
bus turnaround time).

With sufficient interrupt latency it is therefore possible that both
IEPINT (raised at end of Data Stage) and RXFLVL (raised at Status Stage)
would be set when dwc2 interrupt handler reads GINTSTS register. When
device is operating at High-Speed, the latency introduced by UART logger
backend is enough to trigger this condition. If the RXFLVL is handled
before IEPINT the stack will trigger "Cannot determine the next stage"
error.

Handle IEPINT before RXFLVL to make the handler immune to increased
interrupt latencies.

Co-authored-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-13 11:46:39 +01:00
Jędrzej Ciupis b457645423 drivers: ieee802154: nrf5: fix default value for nRF54H20
The default value of IEEE802154_NRF5_DELAY_TRX_ACC Kconfig option is
based on a symbol that is undefined for nRF54H20. It evaluates as empty,
which leads to compilation errors with very cryptic logs.

This commit assures that a sane value for IEEE802154_NRF5_DELAY_TRX_ACC
is selected at all times, avoiding the compilation errors.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2024-05-13 10:21:08 +02:00
Abderrahmane Jarmouni 4682e10e2a drivers: rtc: stm32: subsecond not supported by F2x
subsecond counting is not supported by STM32F2x SoC series.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 09:45:17 +02:00
Abderrahmane Jarmouni 83b5d65d57 drivers: rtc: stm32: make it clean again
Make driver clean again.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 09:45:17 +02:00
Abderrahmane Jarmouni b1f878f7a5 drivers: rtc: stm32: fix clk enable call
On STM32WBAX series, there is no bit in BCDR register to enable RTC.
Enabling RTC is done directly via the RCC APB register bit.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 09:45:17 +02:00
Abderrahmane Jarmouni c085177af5 drivers: rtc_stm32: add support for alarms A & B
Add support for STM32 RTC Alarms A & B for all series except F1X.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 09:45:17 +02:00
Jerzy Kasenberg 961959fc5f drivers: serial: Smartbond: add support DTR line wakeup
This change allows to use DTR line driven from external serial port
that when active (low) will prevent UART device from going to sleep.
It will also wake up platform when DTR line becomes active.

DTR line is often activated in serial port connected to host computer
when operating system opens serial device like COMx for Windows
or /dev/ttyACMx /dev/ttyUSBx for Linux based systems.

DTR line (specified in device tree) will be used by WAKEUP and PDC
controllers (via GPIO driver) to handle DTR line changes.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-05-12 17:03:17 -04:00
Jerzy Kasenberg f10b77364a drivers: serial: Smartbond: add support RX line wakeup
This change allows to wake up UART from sleep mode when
low level on inactive UART is detected during platform sleep.

Timeout can be specified for each UART separately in device tree.
If one of the UARTs is selected as console sleep timeout is taken
from Kconfig same way other platform configure same functionality
using CONFIG_UART_CONSOLE_INPUT_EXPIRED_TIMEOUT

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-05-12 17:03:17 -04:00
Andrzej Kaczmarek e24c6ce721 drivers: serial: smartbond: Add PM for UART
This is initial version that implements device power
management support when configured in Kconfig files.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2024-05-12 17:03:17 -04:00
Dino Li f76f2928f1 espi/it8xxx2: enable EC to accept port 81 cycle
This allows EC to accept 2 bytes of port 80 data written from the Host.

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2024-05-10 20:25:13 -04:00
Peter van der Perk 7adc4b689b drivers: serial: mcux lpuart add (tx/rx)invert and single wire
Adds device tree definitions to enable tx/rx invert and singlewire modes

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2024-05-10 18:25:03 -04:00
Phi Bang Nguyen 249159f531 drivers: video: csi: Drop pixel format config
The pixel format config is not used in the low level driver. Drop it.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-10 18:09:44 -04:00
Phi Bang Nguyen 46eb7e2b65 drivers: video: csi: Fix get_fmt
The CSI should always propagate the get_fmt request down to the sensor.
It should not return a format by it own unless it contains a test
pattern generator inside it.

The problem with the legacy code is that this code snippet is never
reached if the sensor could return a format. In case the sensor failed
to return a format, these codes are reached but the returned format
makes no sense and its value was not initialized.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-10 18:09:44 -04:00
Phi Bang Nguyen 1a40d1fd5a drivers: video: csi: Run clang format
Run clang format before making any changes

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-10 18:09:44 -04:00
Phi Bang Nguyen f621407d50 modules: mcux: Drop HAS_MCUX_CSI config
The HAS_MCUX_CSI (as well as all the HAS_MCUX_XXX) config was obsolete
and has been replaced by the DT_HAS_NXP_IMX_CSI_ENABLED (i.e.
DT_HAS_XXX_ENABLED). Drop it as well as all the dependencies on it.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-10 18:09:44 -04:00
cyliang tw de58070fa4 drivers: pinctrl: support digital-path-disable for Numaker
Add new property digital-path-disable for Nuvoton numaker pinctrl driver.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-05-10 18:06:15 -04:00
Declan Snyder 385c6874ef drivers: nxp_pit: check if top cb is null
check if top cb is null to avoid hard fault
top cb is allowed to be null in api so this is required

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-10 18:05:32 -04:00
Luis Ubieda 215cdb65df drivers: i2c: rtio: Remove extra clear of RTIO_SQE_TRANSACTION
Already handled within `i2c_rtio_copy()`. Not needed.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-05-10 14:41:34 -05:00
Aaron Ye 6d4ed7e192 drivers: flash: flash_ambiq: add Apollo3 SOC support
This commit adapts the Ambiq flash controller to support the Apollo3
SOC (e.g. Apollo3 Blue, Apollo3 Blue Plus).
Also uses the Zephyr common IRQ API to replace the Ambiq HAL ones.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2024-05-10 13:30:33 +02:00
Richard Wheatley e1e78a5f08 drivers: hwinfo: Adds Ambiq hwinfo support
This commit adds support for the hwinfo for Apollo4P SoCs

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-05-10 12:32:02 +02:00
Mike J. Chen d371a0f9ad drivers: regulator: shell: fix strcmp usage bug in cmd_adset
Bug in "enable/disable" argument parsing would cause
the oppostive of the requested setting to get
passed to active discharge API invocation.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2024-05-10 11:50:15 +02:00
cyliang tw 796fc9d54f drivers: gpio: Update Numaker driver init function
To update Numaker driver to turn on clock in init function.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-05-10 11:52:22 +03:00
Dinesh Kumar K 6a746dc012 drivers: sensor: grow_r502a: add RX packet validation
Add RX packet validator where header, address, pid
and checksum bytes are verified and validated on
every functions.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K e08ce0ed71 drivers: sensor: grow_r502a: add upload and download template
1. Add functionality for upload and download fingerprint
template data of the R502A fingerprint sensor device.
2. change data type for data_len parameter of
transceive_packet function to uint16_t as it may hold
value 256 for dowload template data to sensor.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K 7ae0158e35 drivers: sensor: grow_r502a: add set/read system parameter
Add functionality for read and set system
parameter of sensor device.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K b63fe1c368 drivers: sensor: grow_r502a: modified Tx and Rx data handling
improvised uart tx and rx handler functions to handle
large chunk of fingerprint data from/to the sensor.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K 3c8bd0bc2b drivers: sensor: grow_r502a: add built-in LED control
Add LED control attribute for sensor device's
built-in LED using zephyr's led driver APIs.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K e57c6f9d2b drivers: sensor: grow_r502a: move enroll, search, delete to application
Removed fps_enroll, fps_search and fps_delete from
driver code, since they did application usage inside
driver. add the following attributes to achieve the
above functionality from application.
1. SENSOR_ATTR_R502A_CAPTURE
2. SENSOR_ATTR_R502A_TEMPLATE_CREATE
3. SENSOR_ATTR_R502A_RECORD_ADD
4. SENSOR_ATTR_R502A_RECORD_LOAD
5. SENSOR_ATTR_R502A_COMPARE

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K 378034c66a drivers: sensor: grow_r502a: fix in fps_read_template_table
consuming sensor_value struct instead of local device
driver variable.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K 63c48bba91 drivers: sensor: grow_r502a: fix in checksum calculation
change checksum calculation to consider 2 bytes in pkg_len.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K 476a3982af drivers: sensor: grow_r502a: fix in fps_empty_db
return ret; on goto unlock in fps_empty_db function.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K d33bf33b66 drivers: sensor: grow_r502a: fix in fps_search
return -ENOENT; when no record found on getting
attribute SENSOR_ATTR_R502A_FIND and fix array indexing
for tx data in fps_search.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Aurelien Jarno 7a2a4ff6ec drivers: sensor: tmp112: only show options when device enabled
Only show the tmp112 runtime options when the tmp112 driver is enabled,
otherwise the option is confusing and does not appear hierarchically in
menuconfig.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-05-09 12:40:54 -04:00
Mayank Mahajan d1687a557c ADD: Driver for Sensor INA226
INA226 - Bidirectional Current and Power Monitor w/ I2C
Boards Tested: mr_canhubk3

Signed-off-by: Mayank Mahajan <mayankmahajan.x@nxp.com>
2024-05-09 15:46:31 +02:00
Bjarki Arge Andreasen 3769648793 drivers: gnss: Add emulated GNSS device driver
The emulated GNSS driver behaves like a GNSS, implementing
device pm and the GNSS APIs, using only kernel features (
zephyr work queue and uptime) making it buildable on all
zephyr targets.

The purpose of this device driver is to tailor and validate
the gnss api test suite.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-09 15:45:34 +02:00
Sebastian Głąb 2f17c46fb1 drivers: wdt: nrf: Add WDT instances that exist in nrf54h20
Add WDT instances no. 010, 011, 131, 132.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-05-09 15:44:40 +02:00
Mike J. Chen 6c244cf440 drivers: regulator: shell: print all 6-digits of micro values
Previously only the upper/first 3 digits of a micro value
would be printed, dropping the last 3 digits. This could cause
misleading output for cmds like vlist.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2024-05-09 10:29:18 +02:00
Abderrahmane Jarmouni c09f1ec91a drivers: counter: stm32_rtc: fix clk disable for WBAX
clock_control_on() was called instead of clock_control_off().

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-09 10:29:05 +02:00
Ali Hozhabri fae32ac0b8 drivers: bluetooth: hci: Fix int conversion warning
Fix int conversion warning (-Wint-conversion), which is caused by
parallel PRs.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-05-09 10:28:58 +02:00
Chekhov Ma ad2745471c drivers: mfd: add new driver "mfd_adp5585"
Add mfd_adp5585 and gpio_adp5585 driver. This driver enables ADP5585
as an GPIO expander.
This chip is used as an GPIO expander on i.MX93 EVK. GPIO pinctrl,
read/write and interrupt is supported.
Note that ADP5585 has 2 GPIO banks with 5 pins each. The driver combines
two group into a 16-bit port. Index 0~4 correspond to R0~R4 lines, index
8~12 correspond to C0~C4 lines. Index 5~7 is reserved unavailable.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-05-08 16:09:08 -04:00
Dominik Ermel d954060626 drivers: flash: rram: Select NRFX_RRAMC
Select NRFX_RRAMC for RRAM driver.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-05-08 14:59:56 -05:00
Alberto Escolar Piedras 4ccfeb7669 drivers: counter_nrfx_timer.c: Check max-frequency DT property
Check that the max-frequency DT property matches the
one provided by the nrfx HAL.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-08 15:58:16 -04:00
Alberto Escolar Piedras dede897035 drivers: counter_nrfx_timer.c: Get frequency directly from DT
Instead of working it from a macro from the HAL
based on the DT address, let's just get the maximum
frequency directly from DT.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-08 15:58:16 -04:00
Rafael Laya a55ebe1377 drivers: Fixes Controller Mode for I2C DW Driver
4996a9be262ca81bae717bdd8c2939db2a6876b7 adds Target Support for the
Designware I2C Driver

But the change missed guarding some places with
CONFIG_I2C_TARGET

This commit fixes regressions caused by such change

Signed-off-by: Rafael Laya <rafael_laya97@hotmail.com>
2024-05-08 09:30:45 -04:00
Eran Gal a3660d178c drivers: i2c_shell: Add direct_read sub command
Adds a direct_read subcommand to the I2C command.
Usage: I2C direct_read <device> <addr> [<nbytes>].
This command reads directly from the I2C device without first writing
a register address.

Signed-off-by: Eran Gal <erang@google.com>
2024-05-08 09:29:58 -04:00
Nick Ward 3718b515bd drivers: sensor: adxl362: fix temperature conversion
It was missing the test condition for the temperature sensor.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2024-05-08 09:24:42 -04:00
Nick Ward 7602c4f386 drivers: gpio: shell: add toggle command
Usage:
gpio toggle [device] [pin]

Also added Kconfig option so this command can be removed if
resources need to be conserved.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2024-05-08 09:24:20 -04:00
Armando Visconti dd42501a60 drivers/sensor: lsm6dsl: use sensor APIs to convert to units
Make use of sensor_ug_to_ms2() and sensor_10udegrees_to_rad() APIs
to convert from raw values into proper units (i.e. m/s^2 for accel
and rad/s for gyro). It also improves measurement precision.

Fixes #63980

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-05-08 09:23:50 -04:00
Benjamin Cabé 30ce8b1b18 drivers: fix bad SPDX-License-Identifier header
fix typo in SPDX header

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-05-08 09:23:16 -04:00
Fabio Baltieri d8476170bf input: it8xxx2_kbd: mask out KSOL and KSOH1 register access
KSOL and KSOH1 registers are used not only by the kbd driver, but
potentially by other GPIOs attached to the keyboard scanning pins. Mask
write access to those registers to ensure drivers don't step over each
other.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-05-08 12:03:15 +02:00
Fabio Baltieri 2e36c898c9 input: it8xxx2_kbd: fix col_size build warning range
Fix the range check for col_size to allow a configuration with less than
16 columns. Not sure why the minimum was set so high but there's no
reason I can tell for it.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-05-08 12:03:15 +02:00
Abderrahmane Jarmouni 98342107fe drivers: rtc: stm32: INF log msg to DBG
Turn INF log msg to DBG.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-08 11:59:51 +02:00
Abderrahmane Jarmouni 0398b2a3d9 drivers: rtc: stm32: check for NULL pointer
Check for NULL rtc_time pointer in get_time() function.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-08 11:59:51 +02:00
Jerzy Kasenberg 0a60adc333 drivers: regulator: Smartbond: Fix current and voltage get functions
Argument to FIELD_GET macro was mixed up resulting in
incorrect values being reported for voltage and current

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-05-08 11:59:43 +02:00
Nicolas Pitre 13f2f2cca0 arm_arch_timer: fix maximum allowed cycles between reports
The code currently clamps timeout length so not to overflow the computed
cycle difference variable or the sys_clock_announce() argument's range.
But this completely fails to take into account the case where two
successive timeouts with enough time between them will still overflow the
cycle difference and/or the tick count.

Fix this by clamping the actual number of cycles to wait for based on
the previous report occurrence rather than clamping the timeout ticks.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-05-07 21:22:12 -04:00
Nicolas Pitre a99185fa8e arm_arch_timer: properly fix cycles overflow with GDB stub
In commit 6068255512 ("drivers/timer/arm_arch_timer: Fix cycles
overflow with GDB stub") an extra TO_CYCLE_DIFF() macro was introduced
to bypass the cycle_diff_t type cast in some cases.

The actual fix consists in defining that type properly in the first
place. That's the very reason why such type was abstracted.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-05-07 21:22:12 -04:00
Nicolas Pitre 0ea64b3ecb riscv_machine_timer: fix maximum allowed cycles between reports
There are two issues being fixed here:

1) The code currently clamps timeout length so not to overflow the
   computed cycle difference variable or the sys_clock_announce()
   argument's range. But this completely fails to take into account
   the case where two successive timeouts with enough time between them
   will still overflow the cycle difference and/or the tick count.

2) If a timeout with K_TICKS_FOREVER is provided then the comparator is
   set with UINT64_MAX which is bogus. Not only this value doesn't make
   much sense in the context of a running cycle counter, but it also
   opens the possibility for the same cycle diff and/or ticks overflow
   as above.

Fix both of those by clamping the actual number of cycles to wait for
based on the previous report occurrence rather than clamping the timeout
ticks.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-05-07 21:22:12 -04:00
Matthias Alleman 8ae0934470 drivers: ethernet: ksz8863 Fix wrong register for tail tag enable
A wrong register address was used to enable tail tagging for
the ksz8863 device.

Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
2024-05-07 15:23:01 -05:00
Romain Pelletant bb0277da16 pinctrl: stm32: add remap support for STM32C0
Add remap11 and remap12 support for STM32C0 series

Signed-off-by: Romain Pelletant <romainp@kickmaker.net>
2024-05-07 15:19:23 -05:00
Daniel DeGrasse 23bb8fc6ae drivers: memc: add driver for is66wvq8m4 PSRAM using MCUX FlexSPI
Add driver for IS66WVQ8M4 PSRAM, using the MCUX FlexSPI interface to
write data to the PSRAM device.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-07 15:06:25 -05:00
Daniel DeGrasse 88802acf78 drivers: memc: memc_mcux_flexspi: support diff RX clock source on port B
Some instances of the FlexSPI IP support a different clock source being
used for port B of the FlexSPI instance. Add a devicetree property and
driver support to enable configuring this property of the hardware.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-07 15:06:25 -05:00
Hao Luo 638f1d58df drivers: timer: Add support for Apollo3 SoCs system timer (STIMER)
This commit adds support for the system timer peripheral which
can be found in Apollo3 SoCs

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-05-07 18:57:19 +02:00
Hao Luo 3c1fd19d96 drivers: serial: pl011: Add support for Ambiq Apollo3 SoCs UART
Apollo3 SoCs have different UART register design compared with
that of Apollo4 SoCs, we need to change the offset and mask for
the power status check

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-05-07 18:57:19 +02:00
Hao Luo d71c97f072 drivers: pinctrl: Add pinctrl driver for Apollo3 SoCs
This commit adds pinctrl support for Apollo3 SoCs.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-05-07 18:57:19 +02:00
Théo Battrel b2e235d530 Bluetooth: Remove legacy debug symbols
The `BT_DEBUG_*` Kconfig symbols have been deprecated for more than 2
versions, remove them.

Update code that was still using them.

Remove the Bluetooth specific `Kconfig.template.log_config_bt` and use
`Kconfig.template.log_config_inherit` from the logging subsystem
instead, now that the legacy symbols can be removed.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-05-07 09:49:27 +02:00
Angelo Dureghello dc376a8bd9 drivers: eth: phy: adin2111: add support for adin1100 phy
Add support for similar adin1100 phy, boath are 10Base-T1L,
only difference is that adin1100 connects through r/mii.

Signed-off-by: Angelo Dureghello <angelo@kernel-space.org>
2024-05-07 09:41:46 +02:00
Angelo Dureghello ac165f663e drivers: eth: eth_stm32: use phy api support for h5/h7
Use PHY apis to access the PHY, to avoid any kind of collisions
with other tasks using the PHY apis.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-05-07 09:41:46 +02:00
Angelo Dureghello fe29929c91 drivers: mdio: add stm32 mdio support
MDIO is part of the ETH IP, but some phy chip may need a
specific phy driver to set up certain vendor registers enabling
particular features.

Add support for stm32 mdio access.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-05-07 09:41:46 +02:00
Pierre-Louis Bossart 3a044aea80 drivers: dai: ssp: fix MN_MDIVCTRL_M_DIV_ENABLE for ACE+ platform
In previous generations, each MCLK divider could be enabled separately.

Starting with ACE, there is a single-bit MDE field to enable a single
divider. The existing code would not enable MDE in case MCLK1 is used.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2024-05-07 09:35:21 +02:00
Thibo Verheyde 8e07777d52 drivers: modem: modem_cellular: Add Sequans GM02S Modem
Adds the necessary defines with init, dial and periodic chat scripts to
support the Sequans GM02S Modem.
Modification to cxreg handler to process GM02S +CEREG response.

Signed-off-by: Thibo Verheyde <thibo@dptechnics.com>
2024-05-06 22:51:28 +01:00
Jeronimo Agullo 7ae9a16ca6 drivers: gnss: Air530z: Add new driver
Intial driver adding intial script to receive only GGA, RMC and GSV
NMEA messages, configuring fix rate, setting enabled system and adding
power management with the module on-off pin.

Signed-off-by: Jeronimo Agullo <jeronimoagullo97@gmail.com>
2024-05-06 22:50:30 +01:00
Ioannis Karachalios 58b9facbd1 drivers: mipi dbi: smartbond: Add support for PM
This commit should add all the functionality needed for the MIPI DBI
driver to work when PM is enabled.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-06 21:55:03 +03:00
Juliane Schulze 26a8a20542 drivers: tmag5273 add missing ifdef around CRC support
Fixes an error causing build issues if CRC support is not set to active.

Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
2024-05-06 17:31:57 +01:00
Hess Nathan 1486259139 coding guidelines: comply with MISRA Rule 20.9
- avoid to use undefined macros in #if expressions

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-05-06 17:30:26 +01:00
Aurelien Jarno 3da656388d drivers: hwinfo: shell: fix error message when no hardware support
When there is no implementation for a particular hardware information
device, the API return -ENOSYS, while the hardware information shell
checks for -ENOTSUP. This returns a non-user friendly message:

  uart:~$ hwinfo devid
  Error: -88

The API can't be changed easily without breaking things, so let's change
the shell instead. This gives:

  uart:~$ hwinfo devid
  Not supported by hardware

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-05-06 17:30:14 +01:00
Peter Ujfalusi 5f81652b2d drivers: dai: intel: ssp: Only setup mclk/bclk when it is needed by role
When SSP is consumer for FS and BCLK then it does not needs MCLK as the
shifting and rate is derived form the I2S bus directly.
When SSP provides FS only then the BCLK setup is not needed.
When SSP provides BCLK only then both MCLK and BCLK setup is needed.

In hardware multiple SSPs share the same MCLK source, in case of one
SSP port is used as clock provider while other is used as clock consumer
then the consumer SSP should not need to depend on the provider SSP
configuration, the ports can run in different clock rates.

In this example the consumer SSP should not try to configure and lock the
MCLK frequency to some arbitrary rate (as it does not need MCLK at all)
which might be different than the frequency needed by the provider port.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-05-06 17:29:41 +01:00
Pieter De Gendt f147a5fec2 spelling: Replace occurrences of "iff" with "if and only if"
Spell checking tools do not recognize "iff", replace with "if and only if".
See https://en.wikipedia.org/wiki/If_and_only_if

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-05-06 14:58:08 +01:00
Juliane Schulze de0dfc3145 drivers: allow lis2dh anymotion triggers if no anymotion latching is active
Since the interrupt state of the IA bit (interrupt source register) is
checked, it needs to be read out everytime, not only on latching.

Fixes #71245

Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
2024-05-06 14:54:46 +01:00