Commit graph

3657 commits

Author SHA1 Message Date
Antoniu Miclaus 678b29386d dts: bindings: adxl367: add interrupt support
Add int1-gpios property in the adxl367 dts bindings.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
2023-11-10 10:44:11 -06:00
Fabio Baltieri 7a3a6d0c03 input: convert ite_it8xxx2_kbd driver from kscan to input
Convert the ITE 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>
2023-11-10 16:30:37 +00:00
Nick Kraus 5bd18886e9 sam: mdio: Fix Transfer Timeout at Initialization
Initialize the MDIO peripheral clock (normally done during GMAC
initialization) before trying any MDIO transfers, preventing startup
errors.

Signed-off-by: Nick Kraus <nick@nckraus.com>
2023-11-10 10:42:26 +01:00
Declan Snyder 0b5e48985d dts: bindings: Add binding for NXP Multirate Timer
Add binding for nxp,mrt and nxp,mrt-channel. MRT is
NXP multirate timer, a simple timer with multiple
independent channels.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-10 10:40:54 +01:00
Laurentiu Mihalcea 707759bd12 soc: xtensa: imx8: Add pinctrl support
This commit introduces support for pinctrl-related operations
on i.MX8QM/QXP.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-11-09 18:21:05 +01:00
Laurentiu Mihalcea ea99578b76 soc: xtensa: imx8: Enable clock control on i.MX8QM/QXP
This commit enables clock control on the i.MX8QM and QXP boards.
This is achieved through the following changes:
	1) The "reg" property is no longer marked as required
	for the "nxp,imx-ccm" binding. This is necessary because
	in the case of i.MX8QM and i.MX8QXP the clock management
	is done through the SCFW, hence there's no need to access
	CCM's MMIO space (not that you could anyways).

	2) The DTS now contains a scu_mu node. This node refers
	to the MU instance used by the DSP to communicate with
	the SCFW.

	3) The CCM driver needs to support the LPUART clocks
	(which will be the only IP that's supported for now)
	and needs to perform an initialization so that the
	NXP HAL driver knows which MU to use to communicate
	with the SCFW.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-11-09 18:21:05 +01:00
Lukasz Majewski 12665a0dc1 driver: eth: Support for lan8651 T1S ETH
This patch set provides support for T1S ethernet device - LAN8651.

For SPI communication the implementation of Open Alliance TC6
specification is used.

The driver implementation focuses mostly on reducing memory footprint,
as the used SoC (STM32G491) for development has only 32 KiB RAM in total.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2023-11-09 15:35:01 +01:00
Declan Snyder 345f079e49 dts: bindings: Fix NXP USB bindings
NXP USB bindings were combined into one binding and using
a property corresponding to HAL enums which is improper use
of devicetree.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-09 15:34:39 +01:00
Ayush Singh 2b98b67109 dt-bindings: i2c: Add gpio-i2c-switch
Generic GPIO enabled analog switch to isolate devices from an I2C bus

Signed-off-by: Vaishnav Achath <vaishnav@beagleboard.org>
Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2023-11-09 15:33:54 +01:00
Andy Sinclair 488f56c033 drivers: regulator: npm1300: soft start configuration
Added configuration of soft start functionality

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-11-09 15:32:17 +01:00
Emil Obalski eb4fc3f083 ipc: backends: Port IcMsg based backends to use pbuf
Replace spsc_pbuf with pbuf implementation dedicated to
be used by IcMsg based backends.
The pbuf is written on top of simple read/write semantics
with minimal footprint and code complexity

Signed-off-by: Emil Obalski <Emil.Obalski@nordicsemi.no>
2023-11-09 10:18:37 +00:00
Antoniu Miclaus fbee62d9e3 dts: bindings: adxl372: move int1-gpios to common
The `int1-gpios` property is common for both spi and i2c
implementations of adxl372. Therefore move it to
`adi,adxl372-common.yaml`

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
2023-11-09 10:17:51 +00:00
Ioannis Karachalios 546a640657 drivers: dma: smartbond: Support DMA accelerator.
Add support for the DMA engine.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2023-11-09 10:17:29 +00:00
Gustavo Silva b4625d6f13 drivers: sensor: add tsl2561 basic support
Add basic support for ams TSL2561 light sensor. Triggers, attributes
and manual integration time are currently not supported.

Signed-off-by: Gustavo Silva <gustavograzs@gmail.com>
2023-11-09 10:16:51 +00:00
Tobias Pisani ec202d852f drivers: sensor: bq274xx: Configure or confirm chemistry profile
Both the BQ27421 and BQ27427 have a few preset Chemistry profiles.
For the BQ27421 there exists three variants of the IC, and for the BQ27427,
it can be configured. The chemistry profile among other things includes the
taper voltage, which is used to detect charge termination.

This adds an optional `chemistry-id` config option to the driver. On the
BQ27421, it will confirm that the correct variant of the IC is mounted,
and on the BQ27427, it will configure it with the correct value.

Side note: The reference manual for the BQ27427
(https://www.ti.com/lit/ug/sluucd5/sluucd5.pdf) currently contains some
errors and inconsistencies regarding these registers. The table on page 7
appears to be correct.

Signed-off-by: Tobias Pisani <topisani@hamsterpoison.com>
2023-11-08 11:55:52 -06:00
Nazar Palamar 4fd732a738 drivers: wifi: added Infineon AIROC WIFI driver
Added initial version of Infineon AIROC WIFI  driver

Added initial version of binding file for Infineon AIROC WIFI
driver

Rename CONFIG_ABSTRACTION_RTOS_COMPONENT_ZEPHYR to
CONFIG_USE_INFINEON_ABSTRACTION_RTOS

Exclude cy8cproto_062_4343w platform from
drivers.modem.esp_at.build test

Change revision hal_infineon to
69c883d3bd9fac8a18dd8384624b8c472a68d06f

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-11-08 15:07:37 +00:00
Nazar Palamar 1fd080b8cf drivers: sdhc: added Infineon CAT1 SDHC/SDIO driver
Added initial version of Infineon CAT1 SDHC/SDIO driver

Added initial version of binding file for Infineon CAT1 SDHC/SDIO
driver

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-11-08 15:07:37 +00:00
Tim Lin f1dc11174c ITE: drivers/i2c: Add a property for I2C located channel
Add a property for I2C channel switch selection. This property will
write to the SMBxxCHS register according to the I2C node you selected,
which can make channel swapping.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-11-08 10:08:28 +01:00
Bartosz Bilas 2c09999d24 drivers: dac: add driver for AD5592
Add MFD subdriver for the built-in DAC controller
in AD5592 chip.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2023-11-08 10:07:41 +01:00
Bartosz Bilas 0689d3dc11 drivers: gpio: add driver for AD5592
Add MFD subdriver for the built-in GPIO controller
in AD5592 chip.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2023-11-08 10:07:41 +01:00
Bartosz Bilas ad3c5a27b4 drivers: adc: add driver for AD5592
Add MFD subdriver for the built-in ADC controller
in AD5592 chip.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2023-11-08 10:07:41 +01:00
Bartosz Bilas 9bdff044f0 drivers: mfd: add AD5592 MFD driver
This commit introduces a driver for
Analog AD5592 8-channel, configurable ADC/DAC/GPIO chip.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2023-11-08 10:07:41 +01:00
Aaron Ye 6722544f1e drivers: clock_control: Add Ambiq clock_control driver.
This commit adds Ambiq clock_control driver support.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2023-11-07 09:42:25 +01:00
Armando Visconti 01dc3c48e6 drivers/sensor: lis2dh: add INT1/INT2 gpio interrupt config in DT
Add INT1/INT2 gpio interrupt configuration at Device Tree level.

Two new properties:

  - int1-gpio-config
  - int2-gpio-config

Possible values:

  0 = GPIO_INT_EDGE
  1 = GPIO_INT_EDGE_RISING
  2 = GPIO_INT_EDGE_FALLING
  3 = GPIO_INT_LEVEL_HIGH
  4 = GPIO_INT_LEVEL_LOW

Fixes #63736

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-11-06 14:00:54 +00:00
Armando Visconti f39dba5da5 drivers/sensor: lsm6dsv16x: add in DT both INT1 and INT2 pin
Add in DT the possibility to configure both INT1 and INT2
pin. The driver will then assign one of the two (either 1
or 2, according to what value drdy_pin is set) to a gpio
for receiving drdy interrupts.

The other pin may be used in the future to receive event
interrupts.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-11-06 10:13:38 +01:00
Jordan Yates 2283b02ce4 bluetooth: hci: spi: delay between header and data
The HCI receive path has a delay between reading the header and payload
from the controller to give the controller time to setup the SPI
peripheral for the next transaction. Add the same delay on the transmit
path for the same reasons.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-11-06 10:11:33 +01:00
Daniel DeGrasse 8d5322b8ff drivers: ipm: remove nxp,imx-mu-rev2 compatible
Remove nxp,imx-mu-rev2 compatible. This IP block is the same as the
nxp,imx-mu device, and should be handled by the same compatible

Instead, use CONFIG_HAS_MCUX to determine which HAL APIs should be used
to interact with the messaging unit IP.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-11-06 10:09:59 +01:00
Andy Sinclair 8fd676295e drivers: sensor: npm1300_charger: die temp threshold configuration
Added configuration of die temperature stop/resume thresholds

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-11-03 15:36:26 +00:00
cyliang tw 8ba8c188a0 drivers: ethernet: support for Nuvoton numaker series
Add Nuvoton numaker series EMAC controller feature.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-11-03 12:11:33 +00:00
Bjarki Arge Andreasen 27dfdd737e drivers: serial: emul: Make UART FIFO size realistic
Real UARTs usually write 1 to a few bytes at a time through a
latch buffer. Add latch buffer property to binding for
uart_emul and limit fifo_read and fifo_fill to not exceed the
latch buffer.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-11-03 11:44:12 +01:00
Bartosz Bilas e87fd3165f drivers: regulator: add MAX20335 driver
Add a MAX20335 MFD subdriver to manage the built-in PMIC.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2023-11-02 20:32:40 +00:00
Bartosz Bilas 4a397402a7 drivers: mfd: add Maxim MAX20335 MFD driver
Maxim MAX20335 is a PMIC with Ultra-Low IQ Voltage Regulators and
Battery Chargers for Small Lithium Ion Systems.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2023-11-02 20:32:40 +00:00
Ning Yang e5d47e91a4 drivers: dma: add init version for dma sedi driver
Add dma sedi driver support

Signed-off-by: Ning Yang <ning.yang@intel.com>
2023-11-02 09:44:30 +01:00
Jeff Welder 018cd27ac6 dts: bindings: Add Telit ME910G1 Modem
Add Telit to vendor-prefixes, and add ME910G1 bindings

Signed-off-by: Jeff Welder <Jeff.Welder@ellenbytech.com>
2023-11-02 08:34:50 +00:00
Henrik Brix Andersen 5d5249d85b drivers: can: unify spelling of CAN Flexible Data-rate abbreviation
Unify spelling of CAN Flexible Data-rate abbreviation to "CAN FD" instead
of "CAN-FD". The former aligns with the CAN in Automation (CiA)
recommendation.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-11-01 11:17:17 +00:00
Albert Jakieła 06cfbd4159 drivers: power_domain: Introduce a gpio monitor driver
Power rails of some peripherals are controlled externally.
This is a case in embedded controllers, where the power of
some I2C devices are managed by the main application
processor.

To ensure that zephyr drivers access the devices where is
powered on, introduce a "monitoring" power domain. It works
by registering interrupt handler with gpio a pin, so that
when power state changes, it will notify relevant drivers.

Additionaly add CONFIG_POWER_DOMAIN_INIT_PRIORITY to replace
harcoded init priority.

Fixes: #51349

Signed-off-by: Albert Jakieła <jakiela@google.com>
2023-11-01 10:57:17 +00:00
TOKITA Hiroshi 69a3930a19 drivers: serial: Add UART driver for Renesas RA series
Adding initial support for Renesas RA UART.

To avoid complicating initial code for supporting the SoC,
I have implemented only the bare minimum for now.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-11-01 10:56:46 +00:00
TOKITA Hiroshi 3292c36115 drivers: gpio: Add GPIO driver for Renesas RA series
Add initial support for Renesas RA GPIO.

To avoid complicating the initial code for supporting the SoC,
I have implemented only the bare minimum for now.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-11-01 10:56:46 +00:00
TOKITA Hiroshi a9e49918cf drivers: interrupt_controller: Add icu driver for Renesas RA series
To avoid complicating the initial code for supporting the SoC,
I have implemented only the bare minimum for now.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-11-01 10:56:46 +00:00
TOKITA Hiroshi 04b723e900 drivers: pinctrl: Add pinctrl driver for Renesas RA series
To avoid complicating the initial code for supporting the SoC,
I have implemented only the bare minimum for now.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-11-01 10:56:46 +00:00
TOKITA Hiroshi 1741b3a356 drivers: clock_control: Add clock driver for Renesas RA series
Add initial support for Renesas RA clock generation circuit.

It returns a fixed value to simplify the first commit to get the UART
working now.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-11-01 10:56:46 +00:00
Andriy Gelman 2c972d5b57 drivers: flash: spi_nor: Allow page-size to be set via devicetree
In the CONFIG_SPI_NOR_SFDP_MINIMAL configuration this value is hard
coded to 256 bytes. Make it configurable via devicetree.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-11-01 10:56:16 +00:00
Fabio Baltieri d3d484c473 input: add some initial keyboard matrix library stubs
We currently have three keyboard scanning drivers in the code base
(npcx, it8xxx2 and mchp_xec, last two yet to be converted to input).
These have been largely copy pasted from each other and share a lot of
the same structure and code.

This PR lays a foundation to start decoupling feature from those drivers
into a common code base, and it is heavily inspired by the current
regulator common data/config one.

Feature wise this only moves the thread struct, stack and initialization
to the common code and declares the thread callback as the only API, but
the intent is to move as much code as possible in there an only abstract
device specific callbacks in the api structures.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-10-31 09:00:27 +01:00
Bjarki Arge Andreasen b60eb1881b drivers: gnss: Add GNSS driver for Quectel LCX6G
This commit adds a GNSS driver for the Quectel LCX6G
series of GNSS modems (LC26G, LC76G, LC86G). It is
based on the modem subsystem, and the GNSS utilities
added in the two previous commits.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-30 11:43:19 -04:00
Andriy Gelman d0961756a6 drivers: watchdog: Add xmc4xxx support
Adds watchdog support for Infineon xmc4xxx MCUs.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-10-27 12:58:07 -05:00
Arunmani Alagarsamy e9ecc83eea drivers: rtc: new maxim ds1307 rtc driver
Added rtc driver for ds1307. It allows to read and set the date and time

Signed-off-by: Arunmani Alagarsamy <arunmani27100@gmail.com>
2023-10-27 10:50:46 +02:00
Mike J. Chen b0a5492026 drivers: i3c: mcux: Add dt property disable-open-drain-high-pp
The default is that the high time for open-drain clk is one
PPBAUD, which is typically very short. Some device require
a longer high time during the open-drain address phase so
add a property to allow device tree to override the default.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2023-10-27 10:50:16 +02:00
Aaron Ye 51d5794387 drivers: flash: Add Ambiq flash controller driver.
This commit adds flash controller driver for Ambiq Apollo4 SoCs.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2023-10-27 10:50:05 +02:00
Jan Henke 7ca296c016 auxdisplay: Add SerLCD auxdisplay driver
SerLCD is an interface for several lcd character display sold by sparkfun.

Signed-off-by: Jan Henke <Jan.Henke@taujhe.de>
2023-10-27 10:49:03 +02:00
Marc Desvaux 72aee4b90b drivers: clock_control: stm32: add an option to enable CRS for HSI48
for nucleo_stm32g0b1 board.
the HSI48 clock is the clock used by default for the USB controller,
however its default tolerance is not enough for the USB specification,
leading to some random errors depending on many factors, including the
upstream HUB or host.

this commit adds an option in the device tree to enable the STM32 Clock
recovery system (CRS) using USB SOF packet reception as a reference,
which brings the HSI48 within the required accuracy for USB transfers.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-10-26 09:47:48 +02:00
Ioannis Karachalios 6f6066cdf1 drivers: crypto: smartbond: Support crypto accelerator
Add support for the crypto engine.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2023-10-26 09:47:23 +02:00
Ali Hozhabri 154023f754 drivers: spi: update drivers that were using spi cpol and cpha
Modified files (yaml, dts, overlay, and c) which were using spi-cpol
and spi-cpha to be compatible with the new structure.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2023-10-25 18:30:28 -07:00
Ali Hozhabri eb2f5ceb19 dts: bindings: spi: add support to set CPOL, CPHA, and HOLD_CS in dts file
Add support to set SPI clock polarity (CPOL), clock phase (CPHA), and
hold-on-cs in a dts file to get rid of using related macros in spi.c driver
since each board may work on a different SPI mode rather than the default
one (based on CPOL and CPHA).

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2023-10-25 18:30:28 -07:00
Martin Kiepfer a169f581d3 gpios: shields: Add definition for M5Stack M-Bus port
This commit adds basic support for m5stacks M-Bus extenions port that is
support my core and core2 module.

Signed-off-by: Martin Kiepfer <m.kiepfer@teleschirm.org>
2023-10-25 17:33:35 +02:00
Antoniu Miclaus a282f6a92b dts: bindings: add adxl367 support
Add bindings for the adxl367 accelerometer.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
2023-10-25 09:57:02 +02:00
cyliang tw b59810650d drivers: can: support for Nuvoton numaker series
Add Nuvoton numaker series can-fd controller based on mcan.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-10-24 09:31:47 -05:00
Mike J. Chen 01aa800464 drivers: mipi_dsi: dsi_mcux_2l add property to enable non-continuous hs clk
Allows device tree to enable usage of the controller feature
where HS clock is disabled when not in use, which is good
for reducing power consumption if MIPI DSI is mostly idle.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2023-10-24 11:37:41 +02:00
Bjarki Arge Andreasen 312c8b1930 soc: sam: Add SUPC driver and dts model
This commit adds a driver and dts model for the ATMEL SAM
SUPC component.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-24 11:35:43 +02:00
Chen Xingyu a2ef2f7605 drivers: gpio: Add GPIO driver for BCM2711
The BCM2711 SoC exposes 58 GPIOs. The first 28 (bank 0) are accessible
to users via the 40-pin header, while the others (bank 1) are used for
controlling on-board peripherals.

This also update doc of `rpi_4b` board.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2023-10-24 11:03:44 +02:00
Markus Becker e51c044216 sensor: ltrf215a: LiteOn LTR-F216A
New driver for I2C illuminance sensor LiteOn LTR-F216A.

Datasheet:
https://optoelectronics.liteon.com/upload/download/DS86-2019-0016/LTR-F216A_Final_DS_V1.4.PDF

* Applied suggestions from code review
* Removed retry mechanism

Signed-off-by: Markus Becker <markus.becker@tridonic.com>
Co-authored-by: Andy Sinclair <andy@aasinclair.co.uk>
2023-10-23 09:47:09 -05:00
Bjarki Arge Andreasen 99ce7d071f drivers: rtc: Add atmel sam series RTC driver
This commit adds an RTC device driver for the atmel SAM
series chips.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-23 10:49:11 +01:00
Teoh Shi Lin bfa0b52a84 drivers: serial: uart_intel_lw: add driver
Enable driver for intel lw uart.

Changes from review:
- refactor spinlock to inside of loop
- use menuconfig for kconfig
- add CONFIG_UART_INTEL_LW_AUTO_LINE_CTRL_POLL

Signed-off-by: Teoh Shi Lin <shi.lin.teoh@intel.com>
2023-10-21 11:54:23 +02:00
Karthikeyan Krishnasamy f5ed51c179 drivers: sensors: add MC3419 accel sensor support
add basic sensor support for 3-axis accelerometer, currently
this driver support data acquisition and motion detection
features.

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2023-10-20 15:25:16 -05:00
Dennis Grijalva 2516aa8b0b drivers: regulator: pca9420: Add support for configuring ASYS UVLO
Add support for configuring ASYS UVLO (under voltage lock out) threshold

Signed-off-by: Dennis Grijalva <dennisgrijalva@meta.com>
2023-10-20 15:14:04 +02:00
Ioannis Karachalios 9f76879a0b drivers: rtc: smartbond: Support RTC peripheral.
Add support for the RTC peripheral.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2023-10-20 15:10:44 +02:00
Adrian Wojak 5b9a7d0553 drivers/sensor: lis2dw12: add wakeup_duration support
Add wakeup_duration support. (WAKE_DUR in WAKE_UP_DUR)
Value is configurable through DT per instance.

Signed-off-by: Adrian Wojak <adrian.wojak@outlook.com>
2023-10-20 15:02:41 +02:00
Daniel DeGrasse 906ee53834 drivers: i2s: i2s_mcux_sai: use clock-mux property to select SAI mux
Use a new property, "clock-mux" to select the clock mux for the SAI.
Previously, the clock mux was being selected using the "bits" specifier
of the "clocks" phandle property, which is not the purpose of this
specifier. This can be shown by the regression introduced by 5bebbb91,
which changed the "bits" field to the clock gate shift (which is the
intended meaning).

This incidently worked for the SAI1 and SAI3 peripherals, as the lower 2
bits of the correct clock source selection (0b10) are the same as the new
value placed in the "bit" specifier. For SAI2, the clock source was
switched to PLL3 PDF0 by this change.

To resolve this, use an explict "clock-mux" property for this selection.

Fixes #63541

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-10-20 15:01:10 +02:00
Ye Weize 2a86016aff drivers: spi: Add Intel SEDI driver
Add a new SPI shim driver for Intel SoCs. Builds upon the SEDI bare
metal SPI driver in the hal-intel module.

Co-Authored-By: Kong Li <li.kong@intel.com>
Signed-off-by: Ye Weize <weize.ye@intel.com>
2023-10-20 14:55:49 +02:00
Ricardo Rivera-Matos 65c36b7519 dts: charger: bq24190: Adds dt-bindings for BQ24190
Adds devicetree bindings for the BQ24190 family of charging ICs

Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
2023-10-20 14:55:22 +02:00
Ricardo Rivera-Matos 5b1a7b0f2a dts: battery: Create bindings for common battery properties
Adds a devicetree for describing common battery characteristics used
by multiple devices and subsystems.

Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
2023-10-20 14:55:22 +02:00
Paweł Anikiel 2f7cb40dd2 drivers: sensor: Add driver for SB-TSI
Add a driver for the SB Temperature Sensor Interface. This is an I2C
temperature sensor on AMD SoCs.

Signed-off-by: Paweł Anikiel <pan@semihalf.com>
2023-10-20 14:51:59 +02:00
Kevin Wang d3a73cdb0e drivers: dma: Add Andestech atcdmac300 driver.
Support the Andes atcdmac300 dma driver.

Signed-off-by: Kevin Wang <kevinwang821020@google.com>
2023-10-20 14:51:08 +02:00
Martí Bolívar 853b8c4ca0 dts: add sqn to vendor-prefixes.txt
This is needed since commit f66b73197d
("drivers: hwspinlock: implement sqn hwspinlock driver") started
using it. Not sure how this got past CI.

Signed-off-by: Martí Bolívar <mbolivar@amperecomputing.com>
2023-10-19 18:14:04 +01:00
Andrei Emeltchenko bdd8edd67b dts: x86: Remove old atom.dtsi
Remove old unused atom.dtsi and intel,atom.yaml binding.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-10-13 11:37:17 +01:00
Nazar Palamar 4d76e26f17 drivers: pinctrl: Update Infineon CAT1 pinctrl driver
- if we have input enable use CY_GPIO_DM_xxxx else
CY_GPIO_DM_xxx_IN_OFF;

- added bias_high_impedance option

- Updated HIGHZ drive mode, now it sets if:
--- we have bias_high_impedance
--- or if input_enable and no addition bias mode

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-10-12 15:17:35 +03:00
Manuel Argüelles a034cce23c gpio: nxp_s32: support passing external interrupts to WKPU
Extend the NXP S32 GPIO driver to be able to route external interrupts
to either SIUL2 EIRQ interrupt controller or, when available on the
SoC, WKPU interrupt controller.

Since WKPU can support up to 64 external interrupt sources and SIUL2
EIRQ up to 32, gpio_get_pending_int() is removed and the interrupt
controller specific API must be used instead.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-10-11 16:38:34 +01:00
Manuel Argüelles c8a5cf6728 intc: add NXP S32 WKPU interrupt controller driver
Introduce an interrupt controller for the NXP S32 WKPU peripheral
that can be integrated with GPIO to trigger interrupts through
external interrupt pad inputs.

WKPU can trigger interrupts from certain input pads that support this
function, as well as wake-up events to the power management domain. This
patch only adds WKPU functionality as an interrupt controller to extend
the number of input pads that can interrupt the core. Power management
functionalities are not supported.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-10-11 16:38:34 +01:00
Benjamin Cabé 3ee0f305b0 dts: bindings: fix typo in iSentek spelling
Fixed a typo in the spelling of the sensor's manufacturer.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-11 15:45:59 +01:00
Jonas Otto 4d59868397 dts: usb-c: fix invalid power-role in example
The example sets the power-role to "SINK", but the value is
case-sensitive and only accepts lowercase "sink".

Signed-off-by: Jonas Otto <jonas@jonasotto.com>
2023-10-11 11:19:06 +01:00
Antoniu Miclaus 22a086216a dts: bindings: adxl372-i2c: update description
Specify only the bus corresponding to the current yaml file, as done in
the adi,adxl372-spi.yaml.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
2023-10-08 11:17:02 +01:00
Steve Jacot-Guillarmod 13d74677ba drivers: led: pca9633: disable allcall
The PCA9633 i2c LED controller offers an All Call address in its nominal
operation, allowing simultaneous communication with all instances present
on the same i2c bus. The default address is 0x70. While this functionality
is convenient, it is possible that the board uses another i2c component
that also uses this address (for example, the shtcx). In such cases, the
address conflict prevents the proper functioning of the system.

The idea is to add a "disable-allcall" property to the device tree. If this
option is present, the initialization of the PCA9633 forces the bit 0
(ALLCALL) to be set to false, thereby disabling this function. It is
necessary to add this property to all PCA9633 devices on the bus to free up
the address 0x70.

Signed-off-by: Steve Jacot-Guillarmod <steve@piziwate.net>
2023-10-06 12:24:23 +01:00
Jun Lin db8855aaa3 driver: crypto: SHA: npcx: change to support npcx4
The pre-alloacted size of the buffer for the SHA ROM API code increases
in npcx4 chip. This commit adds a new property context-buffer-size to
sha0 DT node in npcx9 and npcx4 separately. The driver can pre-allocate
buffer with the correct size based on the property.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2023-10-05 09:14:05 +01:00
Fabio Baltieri 6f0a5961e3 drivers: i2c: i2c_nrfx_twim: fail gracefully on dma max size
Different nRF52 devices have different maximum TWI DMA transfer size,
and it's easy to hit the limit with i2c displays on nrf52832 (8 bit) and
nrf52810 (10 bit). Currently neither the driver or the hal validate the
limit, leading to random NACK errors when trying to transfer more data.

Add a check on the driver to fail gracefully when going over the limit.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-10-04 16:17:15 +01:00
Fabio Baltieri 591c1bb867 bindings: move cst816s and cap1203 to input
These two have been converted from kscan to input already, move the
bindings over to match the change.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-10-04 16:05:05 +01:00
Henrik Brix Andersen df156d7faf dts: bindings: can: reword the CAN controller bindings descriptions
Reword the descriptions for the bus-speed, sample-point, bus-speed-data,
and sample-point-data CAN controller devicetree properties.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-10-04 14:53:39 +01:00
Yong Cong Sin 8db1a5add2 drivers: intc: plic: support trigger type by default and hardcode offset
Removing the edge-trigger Kconfig as it is supported by default
in the RISCV PLIC specifications.

Define the edge-trigger register offset in the driver instead
of retrieving the value from devicetree as it is not something
configurable. The value 0x1080 is defined in Andes & Telink
datasheets.

Updated build_all testcase.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-10-04 09:06:28 -04:00
Andriy Gelman 31bef35897 drivers: can: mcp251xfd: Add driver
This continue PR #31270. The updated changes are:
- Updated to work with latest zephyr
- Inplace reads/writes of registers
- Batch read of RX messages when multiple messages can be read
- FIFO abstraction of RX/TEF queues
- Handle ivmif errors
- Use READ_CRC for register reads
- Use bitmasks instead of bitfield members
- Rename mcp25xxfd to mcp251xfd
- General cleanups

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-10-01 09:20:37 +03:00
Abram Early 33277f9b48 drivers: can: Implement MCP25xxFD driver
Implementation for Microchip MCP2517FD/MCP2518FD SPI based CAN-FD
controller.

Signed-off-by: Abram Early <abram.early@gmail.com>
2023-10-01 09:20:37 +03:00
Manuel Argüelles b38dab48c6 counter: nxp_s32_sys_timer: use clock control APIs
Use clock control API to retrieve the counter module's frequency and
update the boards using it to provide the source clocks.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-09-29 16:29:31 +02:00
Najumon B.A a14bc241c0 drivers: sdhc: add driver support for emmc host controller
add host controller driver support for emmc version 5.1.
The driver expose zephyr sdhc api interface for emmc host controller.

Signed-off-by: Najumon B.A <najumon.ba@intel.com>
2023-09-29 16:29:00 +02:00
Anisetti Avinash Krishna c45b719442 drivers: misc: timeaware_gpio: Added intel PCH driver
Added intel PCH driver for timeaware GPIO.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-09-29 16:28:09 +02:00
Gerard Marull-Paretas 2de7a8124a dts: bindings: serial: nxp,kinetis-lpsci: do not re-specify pinctrl-0
Property type is already defined in pinctrl-device.yaml.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-29 08:44:19 -05:00
Dat Nguyen Duy 0b0988db2d drivers: pwm_nxp_s32_emios: add support for pwm capture
This introduces pwm capture shim driver for NXP S32 EMIOS,
the driver uses SAIC mode that is supported for all channels,
to capture the counter value on each edge for period/pulse
measurement

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-29 15:40:04 +02:00
Dat Nguyen Duy 05fd40012f drivers: pwm_nxp_s32_emios: prepare for support pwm capture
This prepares support pwm capture APIs by extended current pwm
shim driver but use a differrence hal component:

- Introduce a Kconfig options that will be set when PWM pulse
  generation API is used, it is also used to select the hal
  component. Guarding current code inside this Kconfig option

- Increase #pwm-cells to 3, flags is supported for PWM capture

- Do not require duty-cycle and polarity be set in dt, PWM
  capture doesn't need it.

- Rename emum value for pwm-mode to keep only key information

- Add preprocessor in case no channel is configured for generate
  PWM output, to avoid warning when build

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-29 15:40:04 +02:00
Dat Nguyen Duy e021108ace misc: nxp_s32_emios: enable and declare interrupt handler
This enables and declares interrupt handlers for eMIOS,
the handlers defined and implemented at HAL, the driver
takes the name for each id from interrupt-names devicetree

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-29 15:40:04 +02:00
Maureen Helm d5287578fe dts: bindings: boards: Update Ethernet PHY to use reg property
Updates Ethernet PHY devicetree bindings to be more consistent with
Linux by using the standard `reg` property for the PHY address instead
of a custom `address` property. As a result, MDIO controller bindings
now require standard `#address-cells` and `#size-cells` properties.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2023-09-29 09:47:15 +02:00
Maureen Helm ce42ffcce0 dts: boards: Use ethernet-phy devicetree node name consistently
Some Ethernet PHYs used the devicetree node name `phy`, while others
used `ethernet-phy`. Be consistent and use `ethernet-phy` throughout.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2023-09-29 09:47:15 +02:00
Henrik Brix Andersen 9783ed56d9 dts: bindings: can: deprecate the sjw and sjw-data properties
Update the descriptions for the various CAN devicetree timing properties
specified in Time Quanta (TQ) to make it clear that these, if present, are
only used for the initial timing parameters.

Deprecate the (Re-)Synchronization Jump Width (SJW) devicetree properties
for both arbitration and data phase timing as these are now only used in
combination with the other TQ-based CAN timing properties, which are all
deprecated.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-09-28 16:28:56 +02:00
Gerard Marull-Paretas c9686e18b6 dts: bindings: nxp,kinetis-*: do not re-specify pinctrl-0 type
It's already defined in pinctrl-device.yaml.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-28 14:46:16 +02:00
honglin leng c4f102fd8b boards: arm64: add support for Raspberry Pi 4 Model B
This is an AArch64 board. We also add BCM2711 SoC support

Signed-off-by: honglin leng <a909204013@gmail.com>
2023-09-28 13:40:45 +02:00
Aleksander Wasaznik 0e83c66cef dts: bindings: Remove reg from vnd,serial
`vnd,serial` is a virtual device which does not have an address.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2023-09-28 14:07:52 +03:00
Franciszek Zdobylak c95026a9ac dts: bindings: rename quicklogic uart binding
Rename filename of binding for quicklogic,usbserialport-s3b to make it
consistent with compatible string.

Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
2023-09-28 09:35:16 +02:00
Franciszek Zdobylak df4d64c15e dts: bindings: Update compats and filenames
Update compatible strings and file names of Intel CPUs. Always use dash
instead of underscore. This will make all the compat strings and binding
files names for Intel consistent.

Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
2023-09-28 09:35:16 +02:00
Manuel Argüelles 280ddaef4a mdio: introduce Clause 45 APIs
Add `mdio_read_c45()`/`mdio_write_c45()` APIs for Clause 45 access
and remove the `protocol` MDIO binding property so that MDIO bus
controller can support more than one protocol.

A new MDIO header is introduced with generic opcodes, MMD and
registers addresses, to be used by MDIO and PHY drivers.

Existing MDIO drivers that support both Clause 22 and Clause 45
access are migrated to the new APIs.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-09-28 09:33:10 +02:00
Dat Nguyen Duy 8185faa0cb drivers: dma_mcux_edma: add support dma driver for s32k344
On S32K344, the offset in memory map between each channel
is 0x4000 for most channels, but there is specific case is
between channel 11 and 12 which is 0x1D4000 instead. As a
consequence, 32 channels are divided to two parts: one
starts from channel 0 -> 11. The other is from channel 128
to 145. The channel gap is from 12 -> 127.

For user and data structures in shim driver, the channel's
value comes from 0 --> 31. Above constraint will be counted
when interact with the mcux sdk

Beside that, the DMAMUX register in this platform is very
specific, not in identical with DMAMUX channel, so shim
driver is updated to cover this case

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-27 14:02:09 -05:00
Dat Nguyen Duy d4a2b2244f drivers: dma_mcux_edma: add support for edma version 3
Add new dt binding for edma v3 that inherits whole dt
properties from current version. One more property is
added for SoCs that don't have separate error interrupt
id, use same id with channel interrupt

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-27 14:02:09 -05:00
Dat Nguyen Duy a5cf757c9e drivers: dma_mcux_edma: improve interrupt handling
The current implementation iterates over all channels
even if only several channels share the same irq. This
introduces one more dt property to describe an offset
between two channels share the same interrupt id.

Beside that, the error interrupt must be put as last
element of "interrupt" dt property.

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-27 14:02:09 -05:00
Dat Nguyen Duy f27815d645 dts: bindings: correct information in mcux edma bindings
With the current implementation, the 1st cell is not DMAMUX id
as mentioned in the bindings (0 for DMAMUX0 and 1 for DMAMUX1).

Moreover, the referenced Linux bindings is obsoleted, it was
migrated to use yaml syntax

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-27 14:02:09 -05:00
Gerard Marull-Paretas ad08b3c300 dts: bindings: add missing pinctrl-device.yaml includes
These worked because edtlib allows 'pinctrl-.*' properties without
specifying them on the bindings. However, this has never been an
anounced pinctrl feature, the reference documents explicitly mention
that usage of pinctrl-device.yaml is mandatory.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-27 13:58:28 +02:00
Neal Liu df64ae2d2d dts: bindings: reset: ast10x0: revise cells' name
Revise property's name & cells' name for further
devicetree reset macro used.

Signed-off-by: Neal Liu <neal_liu@aspeedtech.com>
Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
2023-09-27 11:51:13 +02:00
Jatty Andriean e364a095a6 drivers: clock_control: Add PLL fracn for STM32U5
Based on RM0456, each PLL in the STM32U5 has the
capability to work either in integer or fractional mode.
In this update, the fractional mode can be enabled
by setting the fracn value in the device tree.

Signed-off-by: Jatty Andriean <jandriea@outlook.com>
2023-09-26 15:06:56 +02:00
Michal Morsisko 8e32b5ee0a drivers: sensor: Add suport for TMAG5170 3D Hall sensor
Introduce support for Texas Instruments TMAG5170
high-precision linear 3D Hall-effect SPI sensor.
This driver allows to configure measurements on
magnetic and temperature channels. It is also
possible to read rotation of the magnet.

Signed-off-by: Michal Morsisko <morsisko@gmail.com>
2023-09-26 08:36:09 +02:00
Anisetti Avinash Krishna 0b57fdb1ad dts: bindings: dma: intel_lpss: Added phandle dma-parent
Added a phandle named dma-parent to get base address instead of
adding DMA as child node because it is causing a build warning
(avoid_unnecessary_addr_size) if the parent instance has
"#address-cells/#size-cells" dts properties marked required
and child doesn't have reg property. DMA doesn't have reg
as it gets the base address from parent device

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-09-25 18:43:29 -04:00
Benjamin Cabé 4d10c960da drivers: sensor: Add initial support for hm330x dust sensor
Adds initial support for hm330x dust sensor series. Allows to read PM1,
PM2.5 and PM10 concentrations in atmospheric environment. A further
update to the driver may add support for also reading "standard" CF1
concentrations by exposing of a custom sensor attribute or a Kconfig
option. Tested with Grove - Laser PM2.5 Sensor (HM3301) attached to a
Wio Terminal.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-25 19:53:49 +02:00
Nick Ward 3dba54b92d drivers: current sense amp: add pm
Enable power management for current sense amp.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-09-25 11:23:45 -05:00
Teoh Shi Lin d98229c352 drivers: gpio: Add ALTERA PIO
Add driver for altera avalon pio.

Signed-off-by: Teoh Shi Lin <shi.lin.teoh@intel.com>
2023-09-25 16:41:17 +02:00
Anas Nashif 1640d37189 drivers: neural_net: remove obsolete driver
This driver is not being used by anything and is not being built or
tested, so remove it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-25 07:40:07 -04:00
Tim Lin dca9cbff08 ITE: drivers/pinctrl: Add alternate function additional setting
When the alternate setting is configured as func3, in addition to
the setting of func3-gcr, some pins require external setting.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-09-25 09:48:57 +02:00
Sri Surya 049aaac696 drivers: rtc: new ambiq am1805 rtc driver
Added RTC driver for am1805 with rtc time, alarm set/get,
callback and calibration.

Signed-off-by: Sri Surya <srisurya@linumiz.com>
2023-09-25 09:47:46 +02:00
Daniel DeGrasse 8d2f4633f2 drivers: dma: introduce SMARTDMA dma driver
Introduce SMARTDMA dma driver. The SMARTDMA is a peripheral present on
some NXP SOCs, which implements a programmable DMA engine. The DMA
engine does not use channels, but rather provides a series of API
functions implemented by the firmware provided with MCUX SDK.

These API functions can be selected by the dma_config slot parameter. A
custom API is also provided to allow the user to install an alternate
firmware into the SMARTDMA.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-09-25 09:46:55 +02:00
Aleksandr Senin a1e2fdcc4d drivers: mdio: add bit-bang driver
Add MDIO driver that works through GPIO pins. This driver is
useful when a microcontroller doesn't have MDIO bus or when multiple
separate MDIO buses are required. The driver provides access to
the MDIO bus through GPIO pins for any SoC that has GPIO pin control
available.

Signed-off-by: Aleksandr Senin <al@meshium.net>
2023-09-24 08:28:10 -04:00
Guillaume Gautier 723b24fc58 dts: bindings: adc: stm32: add a property for adc sequencer type
Add a property for STM32 ADC to indicate which type of sequencer is used
by the device (fully configurable or not).
Add defines to help with this setting.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-09-22 15:30:47 +02:00
Brunon Blok bf830ba780 drivers: input: add driver for stmpe811 i2c touch controller
This commit adds STMPE811 I2C touch controller driver.

Signed-off-by: Brunon Blok <bblok@internships.antmicro.com>
Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2023-09-22 09:29:56 +02:00
Manuel Argüelles cdcba384bc spi: nxp_s32: use clock control APIs
Use clock control API to retrieve the module's frequency and
update the boards using it to provide the source clocks.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-09-22 09:24:40 +02:00
Manuel Argüelles be08ce18d0 wdt: nxp_s32: use clock control APIs
Use clock control API to retrieve the module's frequency and
update the boards using it to provide the source clocks.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-09-22 09:24:32 +02:00
Manuel Argüelles 45c8cb2343 counter: nxp_pit: use clock control to obtain module's clock rate
Use standard clock control API to retrieve the PIT clock rate instead of
using the HAL.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-09-22 09:23:30 +02:00
Manuel Argüelles ddaacd9ee8 counter: nxp_pit: allow to specify max load value
The PIT maximum load value may not be always 32-bit. Allow the SoC to
define this value from devicetree.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-09-22 09:23:30 +02:00
Guillaume Gautier fa1f33316d dts: arm: st: remove sensor channels from stm32 adc nodes
Remove temp-, vref- and vbat-channel from STM32 ADC nodes as it is not
used in the driver anymore.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-09-22 09:21:34 +02:00
Saw Xu 16487c7047 dts: bindings: usb_audio: Add volume properties
Add volume feature specific fields. So remove this outdated description.

Signed-off-by: Saw Xu <Saw1993@126.com>
2023-09-21 15:04:14 +02:00
Manuel Argüelles af7d972f4c can: nxp_s32_canxl: use clock control APIs
Use clock control API to retrieve the module's frequency and
update the boards using it to provide the source clocks.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-09-21 13:37:19 +02:00
Henrik Brix Andersen 89935550ce dts: bindings: can: deprecate advanced CAN timing properties
Deprecate the advanced CAN timing devicetree properties in favor of setting
advanced timing parameters from application code.

The advanced timing properties are giving in number of time quanta (Tq) and
requires reverse-calculation to find a suitable CAN clock divider. The
resulting bitrate error is compared against a threshold in the driver
initialization code, but the application is not able to retrieve it.

Forcing applications to use the CAN timing APIs directly instead makes it
up to the application to determine if the bitrate error is acceptable or
not.

The deprecated properties are:
- prop-seg
- phase-seg1
- phase-seg2
- prop-seg-data
- phase-seg1-data
- phase-seg2-data

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-09-21 13:37:08 +02:00
Declan Snyder fe8b112efd dts: bindings: lpadc: Add regulator phandle prop
Add phandle prop to reference any regulator that must
be enabled in order for the LPADC to function as intended.

Change LPADC driver to use this property if present.

LPADC on LPC55S36 depends on VREF peripheral, enable for this platform.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-09-21 09:26:57 +02:00
Declan Snyder b1d2a8a9b6 drivers: regulator: Add NXP VREF driver
Add binding, include header, and driver for NXP VREF IP block.

NXP VREF is an internal voltage reference generator on some SOCs
that fits well with the regulator API in zephyr.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-09-21 09:26:57 +02:00
Gerard Marull-Paretas 49df14c08a dts: arm: nordic: fix cryptocell description
The ARM Cryptocell 310/312 IP is wrapped by Nordic specific registers.
It is organized as follows:

- Base address: Nordic wrapper
- Base address + 0x1000: ARM Cryptocell IP registers

Following more standard devicetree conventions, use a single node for
what is exposed as a single peripheral. The node contains 2 register
entries, one for the wrapper and a second one for the 3rd party IP.
Compatibles are used from more specific (nordic,cryptocell) to more
generic (arm,cryptocell-3xx).

Other minor fixes: peripheral is disabled by default (as it should be in
SoC dts files).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-20 13:54:38 +01:00
Paweł Anikiel ebdfb6b5e2 drivers: sensor: ntc-thermistor: Add Murata NCP15WB473 thermistor
Add murata,ncp15wb473 property together with a compensation table. The
table can be found on the vendor's website
(Resistance VS. Temperature tab):
https://www.murata.com/en-us/products/productdetail?partno=NCP15WB473F03RC

Signed-off-by: Paweł Anikiel <pan@semihalf.com>
2023-09-19 09:28:50 -05:00
Paweł Anikiel 5db05878ab drivers: sensor: ntc-thermistor: Remove r25-ohm property
Remove the r25-ohm property. It is not used by the driver, and it is
not present in linux.

Signed-off-by: Paweł Anikiel <pan@semihalf.com>
2023-09-19 09:28:50 -05:00
Jilay Pandya 9fe56ed709 dts: bindings: adiltc2990: add dts bindings for analog devices ltc2990
This commit adds adi,adltc2990.yaml to dts/bindings/sensor.

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2023-09-18 17:41:38 +02:00
Johann Fischer f67dd39bb2 drivers: ramdisk: use devicetree to instantiate RAM disk
Rework RAM disk driver to be configured using devicetree and
support multiple instances.

This patch also removes a copy of the RAM disk driver,
tests/subsys/fs/fat_fs_dual_drive/src/disk_access_test_drv.c,
that was there for testing multiple disk drivers support.

Bonus: one SYS_INIT() less and a memory region can be exported to the
host.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-09-18 17:36:50 +02:00
Gerard Marull-Paretas 55ec77cac7 dts: bindings: arm: nordic,nrf-uicr: add gpio-as-nreset
So that the reset GPIO can be configured as nRESET from devicetree.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-18 13:14:08 +02:00
Tomasz Leman ea9dd59460 yamllint: bindings: add ipll clock index
Adding new property to intel,adsp-shim-clkctl with ACE integrated PLL
clock index.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-09-18 10:35:23 +01:00
Gerard Marull-Paretas 1213ed4e8f dts: bindings: arm: nordic,nrf-uicr add nfct-pins-as-gpios
Allow configuring NFCT pins as GPIOs from devicetree. This setting is
part of the UICR.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-15 16:05:28 +02:00
Carlo Caione e4a125b6a4 dt: Make zephyr,memory-attr a capabilities bitmask
This is the final step in making the `zephyr,memory-attr` property
actually useful.

The problem with the current implementation is that `zephyr,memory-attr`
is an enum type, this is making very difficult to use that to actually
describe the memory capabilities. The solution proposed in this PR is to
use the `zephyr,memory-attr` property as an OR-ed bitmask of memory
attributes.

With the change proposed in this PR it is possible in the DeviceTree to
mark the memory regions with a bitmask of attributes by using the
`zephyr,memory-attr` property. This property and the related memory
region can then be retrieved at run-time by leveraging a provided helper
library or the usual DT helpers.

The set of general attributes that can be specified in the property are
defined and explained in
`include/zephyr/dt-bindings/memory-attr/memory-attr.h` (the list can be
extended when needed).

For example, to mark a memory region in the DeviceTree as volatile,
non-cacheable, out-of-order:

   mem: memory@10000000 {
       compatible = "mmio-sram";
       reg = <0x10000000 0x1000>;
       zephyr,memory-attr = <( DT_MEM_VOLATILE |
			       DT_MEM_NON_CACHEABLE |
			       DT_MEM_OOO )>;
   };

The `zephyr,memory-attr` property can also be used to set
architecture-specific custom attributes that can be interpreted at run
time. This is leveraged, among other things, to create MPU regions out
of DeviceTree defined memory regions on ARM, for example:

   mem: memory@10000000 {
       compatible = "mmio-sram";
       reg = <0x10000000 0x1000>;
       zephyr,memory-region = "NOCACHE_REGION";
       zephyr,memory-attr = <( DT_ARM_MPU(ATTR_MPU_RAM_NOCACHE) )>;
   };

See `include/zephyr/dt-bindings/memory-attr/memory-attr-mpu.h` to see
how an architecture can define its own special memory attributes (in
this case ARM MPU).

The property can also be used to set custom software-specific
attributes. For example we can think of marking a memory region as
available to be used for memory allocation (not yet implemented):

   mem: memory@10000000 {
       compatible = "mmio-sram";
       reg = <0x10000000 0x1000>;
       zephyr,memory-attr = <( DT_MEM_NON_CACHEABLE |
			       DT_MEM_SW_ALLOCATABLE )>;
   };

Or maybe we can leverage the property to specify some alignment
requirements for the region:

   mem: memory@10000000 {
       compatible = "mmio-sram";
       reg = <0x10000000 0x1000>;
       zephyr,memory-attr = <( DT_MEM_CACHEABLE |
			       DT_MEM_SW_ALIGN(32) )>;
   };

The conventional and recommended way to deal and manage with memory
regions marked with attributes is by using the provided `mem-attr`
helper library by enabling `CONFIG_MEM_ATTR` (or by using the usual DT
helpers).

When this option is enabled the list of memory regions and their
attributes are compiled in a user-accessible array and a set of
functions is made available that can be used to query, probe and act on
regions and attributes, see `include/zephyr/mem_mgmt/mem_attr.h`

Note that the `zephyr,memory-attr` property is only a descriptive
property of the capabilities of the associated memory  region, but it
does not result in any actual setting for the memory to be set. The
user, code or subsystem willing to use this information to do some work
(for example creating an MPU region out of the property) must use either
the provided `mem-attr` library or the usual DeviceTree helpers to
perform the required work / setting.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-09-15 12:46:54 +02:00
Mykola Kvach 66dfe7b99a dts: bindings: xen: add xen,xen.yaml file
Add yaml file for 'xen,xen', because without it an appropriate
'CONFIG_DT_HAS_XEN_XEN_ENABLED' isn't generated.

It will be used for checking Xen support on current setup, instead of
checking if it is BOARD/SOC "xenvm" (which is not correct for Domain-0
configurations).

Remove xen,xen-4.15.yaml at all, because it isn't necessary to have
yaml for some specific Xen version.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
2023-09-15 11:15:00 +01:00
Mahesh Rao c5d224abb6 dts: arm64: intel: Change compat string for Intel Agilex SiP SMC driver.
Change compat string from intel,agilex-socfpga-sip-smc
to intel,socfpga-agilex-sip-smc for Intel AGILEX SOC FPGA sip smc driver.

Signed-off-by: Mahesh Rao <mahesh.rao@intel.com>
2023-09-15 09:26:49 +02:00
Vincent van Beveren a6db78e2b3 driver: sdhc: added atmel SAM4E hsmci driver
This commit adds support for the ATMEL HSMCI peripheral
for the SAM4E MCU series, enabling native SD card support.

Signed-off-by: Vincent van Beveren <v.van.beveren@nikhef.nl>
2023-09-14 16:46:12 -05:00
Benedikt Schmidt c3bb1b3c6d dts: bindings: adc: add MAX11102-MAX11117
Add bindings for the following ADCs:
- MAX11102
- MAX11103
- MAX11105
- MAX11106
- MAX11110
- MAX11111
- MAX11115
- MAX11116
- MAX11117

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-09-14 08:32:46 -05:00
Filip Kokosinski 806c95163a dts/riscv: add missing riscv,isa fields and modify existing ones
This commit adds/modifies `riscv,isa` strings using the following rules:
* the ISA string is lowercase
* multi-letter extensions are preceded with the underscore mark
* if an extension is implied by another one, it is not specified - e.g. the
  D extension implies the F extension, so writing `rv32ifd` is redundant

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-09-14 14:34:34 +02:00
Filip Kokosinski 9ed51516ed dts/bindings/riscv: don't enforce riscv,isa values with enum array
This commit removes the enum array with allowed values for the `riscv,isa`
field. There are many ways in which RISC-V ISA extension string can be
represented, and listing them all is futile. In addition, custom extensions
can be implemented, meaning every extension would have to be listed in the
enum array as well.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-09-14 14:34:34 +02:00
Yicheng Li 6ead139b4b mbox: Add NXP MU as a MBOX device
Add a MBOX driver wrapper around the NXP MU, simular to
the existing wrapper around the NXP S32 MRU. This allows Zephyr IPC
to work based on the MU, on a number of NXP boards.

Also update the SHA of NXP HAL to enable the Kconfig for this driver.

Signed-off-by: Yicheng Li <yichengli@google.com>
2023-09-14 14:34:05 +02:00
Ricardo Rivera-Matos 4c04f4488a dts: regulator: Fix reoccurring typo in properties
Corrects 'propably' to 'probably' in the regulator devicetree
bindings.

Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
2023-09-13 17:34:27 -04:00
TOKITA Hiroshi 2f7e822705 drivers: display: ssd1306: determin sh1106 by dts compatibility
Determine sh1106 from the `compatibility` value instead of
the SSD1306_CONTROLLER_TYPE setting.

Change the settings in `boards/shields/ssd1306/sh1106_128x64.overlay`
to follow this change.
Remove the SSD1306_CONTROLLER_TYPE from its Kconfig.defconfig,
and set the `compatibility` to `sinowealth,sh1106`.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-09-13 14:23:24 -07:00
TOKITA Hiroshi 91d750ea94 drivers: display: ssd1306: replace SSD1306_REVERSE_MODE by property
When multiple devices are connected, the SSD1306_REVERSE_MODE setting
cannot switch for each device.
Add an equivalent setting to the devicetree properties to replace it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-09-13 14:23:24 -07:00
Benjamin Lemouzy 75bc80d86f drivers: audio: tas6422dac: add driver
Add Texas Instruments TAS6422 DAC driver.

Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
2023-09-13 16:27:11 +02:00
Andreas Wiesinger cb76aab9d3 dts: sensor: bosch,bmi270: Move interrupt handling to parent binding
Moved the interrupt handling code from a bus-specific binding file to
the parent binding file. This modification ensures that interrupt
handling, which is inherently independent of the type of BUS used
(either i2c or spi), is located in the appropriate location within
the code.

Previously, this code was found in a bus-specific file, despite its
functionality being applicable to all buses. This change ensures a
more logical placement and will help to maintain coherence within the
codebase.

This change aligns with the existing implementation where the interrupt
handling code already operates independently of the BUS type.

Tested this on a nrf52840 with a bmi270 on spi bus with the sample from
zephyr/samples/sensor/bmi270 by adding an interrupt handler in main.c
which uses the bmi270_trigger.c implementation and verified this with
breakpoints and log output.

Added the irq-gpios to tests/drivers/build_all/sensor/i2c.dtsi and
tests/drivers/build_all/sensor/spi.dtsi and fixed whitespace formatting.

Fixes: #58843

Signed-off-by: Andreas Wiesinger <awiesing90@gmail.com>
2023-09-13 16:26:24 +02:00
Mourad Kharrazi a85ffa8130 drivers: sdhc: allow bandwidth selection
The current implementation uses both, host and card capabilites to derive
the maximum bus width to be used. However, in cases where a MMC device is
not connected to the host via shdc using the full bus width of 8 lines,
device initialization fails. Introducing the `bus-width` property
circumvents this by reducing the host bus capabilites and forcing
communication with the MMC device using 1, 4 or 8 lines.

Signed-off-by: Mourad Kharrazi <mourad.kharrazi@ithinx.io>
2023-09-13 16:20:59 +02:00
TOKITA Hiroshi cf242016b4 drivers: counter: Add support for rpi_pico timer
Adds support for rpi_pico timer

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-09-13 16:18:44 +02:00
Weiwei Guo 2779dd9d9b drivers: sensor: bmm150: Add trigger support for bmm150 magnetometer sensor
Add bmm150 magetometer sensor data ready trigger support.

Signed-off-by: Weiwei Guo <guoweiwei@syriusrobotics.com>
2023-09-13 12:07:57 +02:00
Marcel Krüger 387f3c2092 drivers: fuelgauge: Add TI BQ27z746 driver
Add driver for the Texas Instruments BQ27z746 fuel gauge

Signed-off-by: Marcel Krüger <marcel.krueger@ithinx.io>
2023-09-13 12:05:04 +02:00
Fabian Blatz 094342866f modules: lvgl: input: add zephyr,lvgl-encoder-input device binding
Add a pseudo device which can be used to hook into qdec events and
optionally a button and relay the input_event to lvgl.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-09-13 11:35:04 +02:00
Kong Li 2749b3beb0 drivers: gpio: Add Intel SEDI gpio driver
Add a new GPIO shim driver for Intel Socs. Builds upon the SEDI bare
metal gpio driver in hal-intel module.

Signed-off-by: Kong Li <li.kong@intel.com>
2023-09-12 10:56:08 +02:00
Sreeram Tatapudi fd04f8cc81 drivers: spi: Initial version of the Infineon CAT1 SPI driver
Initial version of Infineon CAT1 SPI Driver supporting synchronous
and asynchronous data transfer API

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-09-12 10:55:01 +02:00
David Lamparter a532dbab51 doc: list ST7735S alongside ST7735R
Throw ST7735S into a few places so people can find it.

Signed-off-by: David Lamparter <equinox@diac24.net>
2023-09-11 20:05:26 +02:00
Henrik Brix Andersen 48a09e5b4f dts: bindings: can: add binding for ti,tcan4x5x
Add devicetree binding for the TI TCAN4x5x series of CAN controllers. These
CAN controllers are based on the Bosch M_CAN IP and interfaced via a SPI
bus.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-09-11 19:55:44 +02:00
Albort Xue 2ffead788b drivers: dac: Add driver for mcux lpdac
Create dac_mcxu_lpdac.c file to implement mcux lpdac, add binding for
the mcux lpdac, update Kconfig.mcux and CMakeLists.txt file to support
mcux lpdac.

Signed-off-by: Albort Xue <yao.xue@nxp.com>
2023-09-11 19:55:26 +02:00
Rick Talbott a07b79a8bf drivers: sensor: tsl2540
Add the tsl2540 sensor to drivers.

Signed-off-by: Rick Talbott <richard.talbott1@t-mobile.com>
2023-09-11 19:54:59 +02:00
TOKITA Hiroshi 5f17a16ef4 dts: bindings: i2c: Add RasbperryPi Pico I2C
Add Raspberry Pi Pico I2C that inheriting both DesignWare I2C
device and reset device.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-09-11 11:10:12 +02:00
Keith Short ea40f3af24 mfd: Add NCT38xx multi-function driver
The Nuvoton NCT38xx is a multi-function device providing a TCPC
controller and a I/O expander (GPIO driver).  Add a multi-function
driver to manage exclusive access to the device.

Tested with "twister -T tests/drivers/build_all/gpio".

Signed-off-by: Keith Short <keithshort@google.com>
2023-09-11 11:00:47 +02:00
Mateusz Sierszulski 8db11e6a0a drivers: spi: Add Ambiq MSPI driver
This commit adds MSPI driver for Apollo4 SoCs.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2023-09-08 14:44:12 +02:00
Fabio Baltieri 3d713a42e8 display: ssd1306: add some init delay
Seems like the SSD1306 controller needs a bit of time after power up
before it can take i2c commands. This causes problems with
microcontrollers that have no other delays in the startup sequence, like
rpi_pico.

There's currently no good way of modeling this in Zephyr right now, and
there's also no clear indication of how much time the device needs in
the datasheet that I could find, but it seems like 10ms is enough for
that to start reliably so add a delay in the ssd1306 init function to
ensure that at least that time has passed from system power up.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-08 14:44:03 +02:00
Mulin Chao eacdadf270 driver: adc: npcx: remove threshold-reg-offset DT property
Remove `threshold-reg-offset` DT property and implement them with static
inline functions in `reg_def.h`

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2023-09-08 14:43:37 +02:00
Mulin Chao d2892c1123 driver: sensor: npcx: add 'thr-sel' prop. for adc comparator
Add `thr-sel` prop. to select the relevant threshold register for adc
comparator since there're two adc modules in npcx4 series.

Signed-off-by: Kate Yen <htyen@nuvoton.com>
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2023-09-08 14:43:37 +02:00
Mulin Chao 72ee4f75ef driver: adc: npcx: add multi-device support in npcx adc driver
Add multi-device support in npcx adc driver since there is more than one
adc module in npcx4 series. And each adc's reference voltage might be
different, this CL introduces the `vref-mv` prop. to select its own
reference voltage.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Signed-off-by: Kate Yen <htyen@nuvoton.com>
2023-09-08 14:43:37 +02:00
Jiang Wei W a5f4beccd2 drivers: ipm: add init version of sedi ipm driver
add init version of sedi ipm driver

Signed-off-by: Jiang Wei W <wei.w.jiang@intel.com>
2023-09-08 14:43:17 +02:00
Ricardo Rivera-Matos aee815f19d charger: Sample sbs charger driver with tests
Adds a sample sbs charger driver and basics tests.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2023-09-07 13:03:13 -04:00
Benedikt Schmidt 54f8c2b98b dts: bindings: dac: add AD56xx
Add bindings for the DACs AD56xx.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-09-07 08:48:32 -05:00
Tim Lin 8a779fc706 ITE: drivers/i2c/target: Introduce I2C target transfer using PIO mode
Introduce I2C target transfer using the PIO mode. Add an option
"target-pio-mode" in the yaml file, determined by the DTS, to dictate
whether I2C target transfer uses the PIO mode.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-09-07 09:43:06 +02:00
Paweł Anikiel 43668c6416 drivers: sensor: Add F75303 driver
Add driver for F75303 temperature sensor IC.

Signed-off-by: Paweł Anikiel <pan@semihalf.com>
2023-09-07 09:42:59 +02:00
Paweł Anikiel f020aa41fc dts: bindings: Add fintek vendor prefix
Add vendor prefix for Feature Integration Technology Inc.

Signed-off-by: Paweł Anikiel <pan@semihalf.com>
2023-09-07 09:42:59 +02:00
Hein Wessels 1732651062 drivers: pwm: stm32: support capturing on four channels
Previously the pwm capture only support capturing on channel 1
and 2, because the slave mode controller was used, which uses
the signal TIxFP which is not available for channel 3 and 4.

This commit adds optional support for four channel capturing by
changing the method of capturing PWM signals to not use the
slave mode controller to reset the counter register. Instead the
counter is reset in the ISR. This will result in a slight loss
of accuracy but is still within an acceptable range.

Co-authored-by: Jeroen van Dooren <jeroen.van.dooren@nobleo.nl>
Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
2023-09-07 09:42:25 +02:00
Michał Barnaś 2bc7dcdc2e i2c: add filtering of i2c dumped messages
This commit adds option to dump i2c messages of only specified
devices. It makes it easier to debug communication of specific
i2c device instead of logging all i2c communication.
The filter of devices is specifiec in device-tree using the
node with "zephyr,i2c-dump-filter" compatible string.

Example of device-tree node:
i2c-dump-filter {
	compatible = "zephyr,i2c-dump-filter";
	devices = < &display0 >, < &sensor3 >;
};

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2023-09-06 17:54:53 +02:00
Dat Nguyen Duy 92f3fb79fe drivers: pwm: introduce PWM driver for NXP S32 EMIOS
This introduces PWM driver with supporting PWM output
APIs based on NXP S32 EMIOS peripheral. This supports
three mode: OPWFMB, OPWMCB and OPWMB.

OPWFMB uses internal counter, the new period and duty
cycle takes effect immediately.

OPWMCB and OPWMB use external counter as timebase, changing
PWM period at runtime will impact to all channels share the
same timebase. Also the new period and duty cycle take effect
in next period boundary of the timebase

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-06 11:44:00 +02:00
Dat Nguyen Duy e5e2f2fad8 drivers: misc: add NXP S32 eMIOS driver
This PR adds a misc driver for NXP S32 eMIOS peripheral.
eMIOS provides multiple unified channels (UCs), there are
several channels can be used as reference timebase
(master bus) for other channels. At this time, the
driver does initialize global configuration for eMIOS

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-06 11:44:00 +02:00
Vinayak Kariappa Chettimada 9ede8cd87e dts: nRF: Add missing headermask binding for NRF_CCM
Add missing headermask binding for NRF_CCM peripheral and
define HAS_HW_NRF_CCM_HEADERMASK Kconfig.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-09-05 10:04:57 +02:00
Prashanth S 05fe627d79 drivers: interrupt-controller: Add VIM Interrupt Controller support
Add TI VIM (Vectored Interrupt Manager) interrupt controller support.
VIM is a TI specific custom interrupt controller for ARM cores.
In J721E soc, VIM aggregates interrupts to Cortex R5 cores.

TRM for J721e https://www.ti.com/lit/zip/spruil1
File: spruil1c.pdf
VIM: section 6.3.3.6

Signed-off-by: Prashanth S <slpp95prashanth@yahoo.com>
2023-09-04 10:53:09 +02:00
Steve Boylan 85cbc7a96e drivers: spi: spi_pico_pio: Add basic support for SPI via PIO
Add fundamental feature support for RP2040 PIO SPI peripherals.
This commit implements synchronous transfer with 8-bit MSB
format.  Using PIO allows any GPIO pins to be assigned the roles
of CS, CLK, MOSI, and MISO.

Optional features not implemented yet:

  - Interrupt based transfer
  - DMA transfer
  - Slave mode
  - Varying word size
  - 3-wire SPI support
  - LSB-first

Updated in response to review comments.
Further updates from second round of review.
Rename spi_pico_pio.c source to match zephyr/MAINTAINERS.yml
Remove unnecessary initialization code.
Resolve merge conflicts

Signed-off-by: Steve Boylan <stephen.boylan@beechwoods.com>
2023-09-01 16:36:41 +02:00
Umar Nisar 31a6594212 drivers: loapic: add device tree support for loapic
As per #26393, Local APIC is using Kconfig based option for
the base address. This patch adds DTS binding support in the driver,
just like its conunter part I/O APIC.

Signed-off-by: Umar Nisar <umar.nisar@intel.com>
2023-09-01 16:36:18 +02:00
Benjamin Lemouzy a7135a6c3a drivers: watchdog: wdt_mcux_imx_wdog: add pinctrl support
i.MX RT SoC have some pins related to the watchdog.
For example, iomuxc_gpio_ad_b0_15_wdog1_rst_b_deb allows WDOG1_RST_B_DEB
signal to be used as reset source for i.MX RT10xx boards.

Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
2023-08-31 20:19:33 +02:00
Prashanth S 12996d5d4d drivers: gpio: Add Davinci gpio controller support
Davinci gpio controller support to add various soc gpio
support (J721E, AM654).

TRM for J721e https://www.ti.com/lit/zip/spruil1
File: spruil1c.pdf
GPIO: section 12.1.2

BeagleBone AI_64 https://beagleboard.org/ai-64

Signed-off-by: Prashanth S <slpp95prashanth@yahoo.com>
2023-08-31 10:31:37 +02:00
cyliang tw 449211a307 drivers: pwm: support for Nuvoton numaker series
Add Nuvoton numaker series pwm controller, including
capture feature.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-08-31 10:19:31 +02:00
Jakub Michalski f54a7b1602 drivers: mb85rc: support use of multiple modules as a single one
Allow use of multiple mb85rc frams at contiguous i2c addresses as a single
big fram module.
Tested on mb85rc1mt used as two 32K modules, where the first one was at
mb85rc1mt's first i2c address and the second one at mb85rc1mt's second i2c
address.

Signed-off-by: Jakub Michalski <jmichalski@internships.antmicro.com>
Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2023-08-30 17:38:21 +02:00
Jakub Michalski a5c0a9656d drivers: add mb85rc fram driver
Add fujitsu mb85rc i2c fram driver.
Tested on mb85rc1mt.

Signed-off-by: Jakub Michalski <jmichalski@internships.antmicro.com>
Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2023-08-30 17:38:21 +02:00
Bjarki Arge Andreasen b14c39f2c1 drivers/modem: Add generic cellular modem driver
The added cellular modem driver is a naive driver, which
shall serve as a template for implementing tailored
drivers for modems like the UBLOX-R4. It uses only
generic at commands, described in 3gpp, and protocols,
like CMUX and PPP.

A binding for the BG95 has been added, which replaces
the quectel,bg9x. This is neccesary since the BG95 does
not have a usable reset pin, the reset and powerkey are
internally connected to each other.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-08-30 13:48:51 +02:00
Benjamin Lemouzy d2e420029b drivers: sensor: add NXP TEMPMON driver
Add driver for the NXP TEMPMON to retrieve on-die operational
temperature.

Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
2023-08-30 10:18:27 +02:00
Eric Holmberg 5a6610240e test: sensor: ina230: add emulator unit test
Add emulator unit test of the INA230.

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2023-08-29 09:44:20 -05:00
Eric Holmberg f0f7f8b146 dt-bindings: sensor: ina230: add configuration properties
Add properties to replace the configuration register value.

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2023-08-29 09:44:20 -05:00
Eric Holmberg a70d056513 drivers: sensor: ina237: add high-precision mode
The current-shunt calibration requires a factor of 4x if high-precision
mode is selected.

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2023-08-29 09:44:20 -05:00
Eric Holmberg c7135a2ac5 dt-bindings: sensor: ina237: add configuration properties
Add properties to replace the configuration register values.

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2023-08-29 09:44:20 -05:00
Guillaume Gautier 8f197adc30 dts: bindings: adc: add properties for stm32 adc clock source
Add two properties to define the STM32 ADC clock source:
- Clock source: synchronous or asynchronous
- Clock prescaler
By combining these two parameters, it will be possible to set the desired
ADC clock for most series.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-08-29 11:27:07 +01:00
Fabian Blatz b296d1152f input: add zephyr,lvgl-button-input device binding
Add a pseudo device which can be used to hook into gpio-keys input_events
and relay the events to a lv_indev.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-08-29 10:17:52 +02:00
Fabian Blatz c536bd3845 modules: lvgl: add zephyr,lvgl-pointer-input pseudo device
Add the scaffolding to create input lvgl pseudo devices which route zephyr
input_event to their lvgl `indev` equivalent. As a first cut also add a
`zephyr,lvgl-pointer-input compatible which can be a drop-in replacement
for the existing kscan solution.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-08-29 10:17:52 +02:00
Daniel Leung 3d63e2060e dts: cpu: add cdns,tensilica-xtensa-lx3
Adds a CPU binding for the Xtensa LX3 core.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-26 16:50:40 -04:00
Mateusz Sierszulski be149593c9 drivers: pinctrl: Add more config options for Ambiq Apollo4
This commits add more configuration options
for Ambiq Apollo4 pinctrl driver.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2023-08-25 10:31:58 +02:00
Mateusz Sierszulski 2b74109f20 drivers: spi: Add Ambiq SPI driver
This commits adds SPI master driver for Apollo4 SoCs.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2023-08-25 10:31:58 +02:00
Andy Sinclair 075a859869 drivers: sensor: npm1300: Additional charger configuration
Added configuration of termination current and trickle voltage
Added option to bypass low voltage charge inhibit
Added option to disable automatic recharge

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-08-24 18:42:37 -05:00
Kim Bøndergaard 44e18e8d47 drivers: rtc: rtc_fake: fff rtc driver added
Can be valuable for unit testing modules accessing the RTC

Signed-off-by: Kim Bøndergaard <kim.bondergaard@prevas.dk>
2023-08-24 22:06:51 +01:00
Mulin Chao 5c7ab5c2bf driver: clock_control: npcx: add support for npcx4 series
This CL introduces new clock architectures in npcx4 series and wraps
clock configurations of different series by device tree files.

For example, the PWDWN_CTLx reg initialization relies on `pwdwn-ctl-val`
prop of pcc DT node now.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2023-08-24 10:42:33 +01:00
Martin Kiepfer 74db02bad1 drivers: gpio: AXP192 GPIO driver
AXP192 is a small power management IC, that also
features 5 GPIOS.
Besides GPIO driver this commit also includes needed modifications
in axp192 regulator and mfd driver as LDOIO0 functioanlity
is multiplexed with GPIO0 pin.

Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
2023-08-22 18:08:51 +02:00
Aaron Massey 82bfb26446 fuel_gauge: Add battery cutoff support
Many fuel gauge ICs offer a battery cutoff/shipping mode functionality that
cutoff charge from the battery. This is often useful for preserving battery
charge on devices while in storage.

Add battery cutoff support to the fuel gauge API with a generic default SBS
driver showing an example of support in tests.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-08-22 18:05:50 +02:00
Jerzy Kasenberg d5edbba89f dts: bindings: flash-controller: Add smartbond QSPI parameters
This adds QSPI controller properties that allow tuning
chip select timings (needed for accessing QSPI at high speed)

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2023-08-22 12:16:16 +02:00
Jerzy Kasenberg 7ec2e9ef4b dts: bindings: clocks: Add smartbond low power oscillator
RC32K/RCX/XTAL32K were present in device tree as fixed-clock.
Now calibration time for RCX and RC32K is added and settle time
for XTAL32K so additional binding is created.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2023-08-22 12:16:16 +02:00
Dawid Niedzwiecki 63af3c00e9 mgmt: ec_host_cmd: add SPI SMT32 backend
Add support for SPI host command backend for STM32 chips family.

Unfortunately, the current SPI API can't be used to handle the host
commands communication. The main issues are unknown command size sent
by the host(the SPI transaction sends/receives specific number of bytes)
and need to constant sending status byte(the SPI module is enabled and
disabled per transaction). Thus the SPI backend includes basic SPI STM32
driver adjusted to host command specification.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-08-21 15:11:21 +02:00
Mykola Kvach 5a87252c53 drivers: regulator: add regulator-gpio driver
Add basic support of 'regulator-gpio'. For now, it is support
only controling voltage and driver presents only six functions:
  * enable and disable the regulator;
  * set and get voltage;
  * count and list of voltage(s).

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2023-08-21 10:55:26 +02:00
Andy Sinclair 7a71ebe372 drivers: mfd: npm1300: Added event interrupt handling
Added support for npm1300 interrupt events

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-08-21 10:04:03 +02:00
Mustafa Abdullah Kus 2e4e992644 drivers: adc: add max1125x driver
This adds support for the max1125x (max11254, max11254)
family of spi adc devices.

Signed-off-by: Mustafa Abdullah Kus <mustafa.kus@sparsetechnology.com>
2023-08-18 12:05:17 +02:00
Fabio Baltieri 243e84d155 ethernet: phy_mii: get the MDIO bus with DT_INST_BUS
Now that all in-tree phys are declared under their mdio bus, drop the
`mdio` property and use DT_INST_BUS to find the bus.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-17 13:29:45 -05:00
Mateusz Sierszulski 47d0e79444 drivers: i2c: Add Ambiq I2C driver
This commit adds I2C master driver for Apollo4 SoCs.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2023-08-17 15:15:45 +02:00
Eric Holmberg 9452cbfe9d soc: esp32s3: add ADC single-shot support
Add support for single-shot ADC readings.

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2023-08-17 10:36:20 +02:00
Aziz Idomar f66b73197d drivers: hwspinlock: implement sqn hwspinlock driver
When we lock an hwspinlock, we must write the CPU identifier to
the hwspinlock register. If we want to unlock the locked hwspinlock,
we have to rewrite the same CPU identifier.

To define the CPU identifier, we use affinity 1 and affinity 2 fields
of the MPIDR register.

Signed-off-by: Aziz Idomar <aidomar@sequans.com>
2023-08-16 20:46:55 +02:00
Antoniu Miclaus a6e3829252 drivers: ethernet: adin2111: add adin1110 support
Add support for ADIN1110 10BASE-T1L Ethernet MAC-PHY.

The ADIN1110 is an ultra low power, single port, 10BASE-T1L
transceiver design for industrial Ethernet applications and is com-
pliant with the IEEE® 802.3cg-2019™ Ethernet standard for long
reach, 10 Mbps single pair Ethernet (SPE). Featuring an integrated
media access control (MAC) interface, the ADIN1110 enables direct
connectivity with a variety of host controllers via a 4-wire serial
peripheral interface (SPI). This SPI enables the use of lower power
processors without an integrated MAC, which provides for the
lowest overall system level power consumption. The SPI can be
configured to use the Open Alliance SPI protocol or a generic SPI
protocol.

Documentation:
https://www.analog.com/en/products/adin1110.html

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
2023-08-16 20:45:03 +02:00
Andriy Gelman 0913d092c9 dts: arm: xmc4xxx: Add extra pinctrl nodes for i2c
The existing i2c sda/slc pinctrl nodes serve as an input and output
for the USIC. This limits the number of pins that can be used for i2c
since the pin must be internally connected to both DOUT0 and DX0 signals
on the USIC (for the sda signal for example).

It is also possible to use separate pins to DOUT0 and DX0, but connect
the pins externally. Add these extra pinctrl nodes and document their
use in infineon,xmc4xxx-i2c.yaml.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-08-16 20:43:50 +02:00
Andriy Gelman d481ec286d driver: pintcrl: xmc4xxx: Revert recent changes from i2c driver
In commit 541482ff20 the pinctrl alternate
function mask was increased to also include open-drain setting.

Revert this change because open-drain can already be set via property
drive-open-drain.

The commit also added separate pinctrl nodes for the i2c controller and
target modes. However, the alternate function settings
is the same in both modes, so keep only one and remove the mode
label.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-08-16 20:43:50 +02:00
Andriy Gelman d330d97997 dts: bindings: Rename compatible infineon,xmc4-i2c->infineon,xmc4xxx-i2c
To be consistent with other xmc4xxx drivers.

A few other device tree changes:
- Rename clock signal option as it's handled by DX1.
- Remove clock-frequency option as it's already added in
  i2c-controller.yaml, and interrupts is already defined as array
  in base.yaml.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-08-16 20:43:50 +02:00
Fabio Baltieri f2e275639d ethernet: smsc91x: rework the device node hierarchy
Rework the devicetree definition for smsc91x to put the mdio and
ethernet device at the same level, and make the phy a child of the mdio
node.

This allows matching up the device initialization sequence with the
devicetree hierarchy.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-16 14:52:31 +02:00
Andrzej Głąbek ff0f389d0b dts: bindings: adc-controller: Add zephyr,differential property
Add a property that allows explicit selection of the differential
input mode for ADC channels in DTS. This is useful for controllers
that do not have configurable inputs, so the zephyr,negative-input
property that implicitly selects the differential mode is not
specified for them.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-08-16 14:51:03 +02:00
Mateusz Sierszulski 171285140c drivers: watchdog: Add Ambiq wdt driver
This commits add watchdog driver for Apollo4 SoCs

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2023-08-16 13:03:33 +02:00
Henrik Brix Andersen 913e59c5ea drivers: can: stm32: bxcan: rename driver to match reference manuals
Rename the STM32 bxCAN driver DTS compatible, Kconfig symbol, and
implementation file to match the naming used in the ST reference manuals.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-08-16 13:03:00 +02:00
Balsundar Ponnusamy e3f0ec6d41 drivers: counter: add snps apb timer
adding driver for snps dw timer

Signed-off-by: Balsundar Ponnusamy <balsundar.ponnusamy@intel.com>
2023-08-16 10:20:31 +02:00
Mourad Kharrazi 651c841faa drivers: hyperram: Add Winbond W956A8MBYA driver
Adding hyperram support for Winbond W956A8MBYA

Signed-off-by: Mourad Kharrazi <mourad.kharrazi@ithinx.io>
2023-08-15 21:51:57 +00:00
Tanmay Shah 09e2a4e9eb drivers: ipm: add zynqmp r5f support
Add ipm driver to use Inter Processor Interrupts
on Xilinx ZynqMP platform. This patch also adds sample
application that shows use of xlnx ipm driver.

This driver uses default arm gic interrupt controller
and works only for lockstep mode of cortex-r5f
cluster for now.

In split mode the cortex-r5 cluster will
have two r5f cores and they are expected to work in AMP
mode. If both r5f cores run simultaneouly, only one of
the core is able to receive IPI interrupts at this time
and it will be the one that started later. In future
this limitation shall be removed.

Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
2023-08-15 11:23:04 +00:00
Florian Grandel b954ce4903 drivers: cc13xx_cc26xx: pwm: introduce pwm driver
This change introduces a new PWM driver for all CC13/26xx SoC.

See the documentation in ti,cc13xx-cc26xx-timer-pwm.yaml for detailed
usage instructions.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-08-14 13:36:12 +00:00
Mykola Kvach d9fe261f8e drivers: regulator-fixed: extend api of driver (list/count voltages)
Allow properties 'regulator-min-microvolt' and 'regulator-max-microvolt'
for fixed regulators: Note: they should be equal.

Add simple functions for getting list of allowed and count of voltages.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2023-08-10 18:11:35 +00:00
Mykola Kvach ed9ca0f6d3 drivers: regulator-fixed: add possibility to work without enable pins
Possible situation is that in some driver, devices can be controlled in
different ways: in some, we can only turn the power on or off, in others,
we can only control the voltage, and in some, we can control power supply
or voltage level. There may also be devices where there is no control
over power supply at all. A clear example of this can be eMMC devices
where the voltage is usually fixed and they are always powered on.
However, we would like to have a common code for controlling all the
mentioned types of devices, at least the driver shouldn't worry about the
implementation details of voltage regulators. Therefore, there may exist
empty regulators - regulators that only contain information about the
supported voltage, and we cannot change anything in them. The device tree
node description for such a regulator is only necessary for compatibility
with other regulators. Hence, we need to add the possibility of the
existence of such a dummy fixed-regulator.

In this commit, support for a fixed dummy regulator without the ability
for any control has been added. Note that such support also exists in the
Linux kernel. In other words, the logic of the fixed regulator has been
aligned with the logic of the fixed regulator inside the Linux kernel.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2023-08-10 18:11:35 +00:00
Christopher Friedt 02f4aeb93d dts: vendor-prefixes: deprecate facebook and add meta
Although there are no in-tree users, we will deprecate the
`facebook` vendor prefix and add `meta`.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-08-10 09:27:10 -04:00
Christopher Friedt 6b59c7e5f7 Revert "dts: vendor-prefixes: remove facebook and add meta"
This reverts commit 352ece1e7d.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-08-10 09:27:10 -04:00
Christopher Friedt 352ece1e7d dts: vendor-prefixes: remove facebook and add meta
Since we do not have any in-tree users, we will skip the
deprecation process for `facebook` and add `meta`.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-08-09 17:00:35 -04:00
Andrei Emeltchenko c6e322d406 soc: alder_lake: Add Adler Lake SoC
Add Adler Lake SoC. The SoC is derived from Elkhart Lake SoC.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-08-09 13:45:38 +00:00
Bjarki Arge Andreasen 2c2f1c4576 drivers/rtc/rtc_mc146818.c: Add input clock config to driver
This commit adds input clock selection to the RTC driver. This
is required to allow for the real hardware to operate. The
QEMU emulated hardware ignores the input clock settings.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-08-09 07:27:40 -04:00
Fabio Baltieri ec15061e79 bindings: gpio-qdec use INPUT_REL_WHEEL as example
INPUT_REL_WHEEL is the code that normally refer to scroller wheel, which
probably makes a bit more sense in this context, use that instead of
INPUT_REL_Y.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-09 08:29:46 +00:00
cyliang tw 5148c98e83 drivers: spi: support for Nuvoton numaker series
Add Nuvoton numaker series spi controller, including
full and half duplex support.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-08-09 08:24:38 +00:00
Maciej Sobkowski 9bc3ee67be drivers: counter: Add Ambiq counter driver
This commit adds Ambiq counter driver for Apollo4p SoCs.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
2023-08-07 16:12:58 +02:00
Fabio Baltieri 35e3bfcdef drivers: input: drop the zephyr,gpio-keys binding
This is now redundant and `gpio-keys` can be used instead.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-07 11:26:26 +02:00
Fabio Baltieri 2b489fd1f2 input: unify gpio-keys and zephyr,gpio-keys
Change the gpio-keys and zephyr,gpio-keys so that they can both be used
with the input subsystem driver. Make the zephyr,code property optional
so that existing out of tree board can still use this node with their
custom code, but change everything else so that an existin gpio-keys
node can be used with the input driver as long as the codes are defined.

From the application perspective, this means that the application can
still use the GPIOs directly, the input specific driver only gets
enabled if CONFIG_INPUT is enabled and the driver can always be turned
off manually.

This makes gpio-keys behave the same as gpio-leds with CONFIG_LED.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-07 11:26:26 +02:00
Peter van der Perk 86812b1551 sensors: ist8310: New driver
Adds support for the Isentek IST8310
3-axis magnetic sensor

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2023-08-04 17:30:02 -05:00
Peter van der Perk a095bd7328 drivers: led: Add Onsemi ncp5623c driver
The controller and the driver support two hardware configurations:
	   - one three-channel (RGB) LED
	   - or three single-channel LEDs

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2023-08-04 10:47:31 -05:00
Mathieu Anquetin 8807930248 drivers: led: lp50xx: add enable gpio
Some boards may have connected the enable pin of the chipset to a GPIO.
On these boards, it is necessary to configure and set this GPIO before
using the chipset, otherwise the I2C circuitry is disabled.

Based on initial work from:
  - Marek Janus <marek.janus@grinn-global.com>
  - Rico Ganahl <rico.ganahl@bytesatwork.ch>

Signed-off-by: Mathieu Anquetin <mathieu.anquetin@groupe-cahors.com>
2023-08-04 13:18:01 +02:00
Mathieu Anquetin 26f4fab391 drivers: led: lp503x: extend driver to all lp50xx devices
Add support for LP5009, LP5012, LP5018 and LP5024 devices which only
differ by the number of LEDs they can control.

Also, update application sample to run on all these new supported
devices.

Based on initial work from:
  - Marek Janus <marek.janus@grinn-global.com>
  - Rico Ganahl <rico.ganahl@bytesatwork.ch>

Signed-off-by: Mathieu Anquetin <mathieu.anquetin@groupe-cahors.com>
2023-08-04 13:18:01 +02:00
Maciej Sobkowski 5ffce32376 drivers: timer: Add driver for Ambiq system timer (STIMER)
This commit addst support for the system timer peripheral which
can be found in Apollo4 SoCs.

Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
2023-08-04 10:48:58 +02:00
Maciej Sobkowski 6b912f044d dts: bindings: Add new binding ambiq,uart
UART controllers present on Ambiq SoCs implement a PL011 compatible
interface, with some minor differences that require certain quirks.
To support them a dedicated compatible is needed.

Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
2023-08-04 10:48:58 +02:00
Mateusz Sierszulski 670043822b dts: bindings: Add new ambiq-pwrcfg binding
This commit adds Ambiq power configuration dedicated
compatible.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2023-08-04 10:48:58 +02:00
Mateusz Sierszulski bfceddfcaa dts: bindings: Add new ambiq,pwrctrl binding
This commit adds Ambiq power control dedicated compatible.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2023-08-04 10:48:58 +02:00
Maciej Sobkowski 8a670d0713 drivers: pinctrl: Add pinctrl driver for Apollo4
This commit addst pinctrl support for Apollo4 SoCs.

Co-authored-by: Mateusz Sierszulski <msierszulski@antmicro.com>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
2023-08-04 10:48:58 +02:00
Maciej Sobkowski 1733076474 dts: vendor-prefixes: Add Ambiq Micro vendor prefix
Added Ambiq Micro vendor prefix to enable dts bindings for peripherals in
Ambiq SoCs.

Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
2023-08-04 10:48:58 +02:00
Dong Wang b774b97ff9 drivers: i2c: Add Intel SEDI driver
Adds a new I2C shim driver for Intel SoCs. Builds upon the SEDI bare
metal I2C driver in the hal-intel module.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2023-08-04 10:46:24 +02:00
Tim Lin 159fa4888b ITE: drivers/i2c: Channel C/i2c2 cannot use FIFO mode
Sometimes, channel C may write wrong register to the target device.
This issue occurs when FIFO2 is enabled on channel C. The problem
arises because FIFO2 is shared between channel B and channel C.
FIFO2 will be disabled when data access is completed, at which point
FIFO2 is set to the default configuration for channel B.
The byte counter of FIFO2 may be affected by channel B. There is a
chance that channel C may encounter wrong register being written due
to the FIFO2 byte counter wrong write after channel B's write operation.

The current workaround is that channel C cannot use FIFO mode.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-08-04 10:45:48 +02:00
Fabio Baltieri 693b19d0f2 input: add zephyr/ prefix to the event code sample and docs
The system still takes both prefixed and unprefixed dt-bindings files,
but let's use zephyr/ prefixed in the examples and documentation.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-04 10:41:57 +02:00
David Ullmann bcc7499684 drivers: rt6xx ctimer pwm driver
using ctimer to implement pwm api
Signed-off-by: David Ullmann <davidu@meta.com>
2023-08-03 12:39:06 -04:00
Sylvio Alves d7bcac091c drivers: spi: esp32: add option to handle lines state
SPI driver is current working for common SPI devices.
However, addressable LED like WS2812 requires MOSI line to be
default LOW during initialization. This PR adds such option.
This has no effect on common SPI operation.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-08-03 12:15:18 -04:00
Madhurima Paruchuri 9fab38dd04 drivers: flash: npcx: Update erase function to allow 0x1000 byte erase size
Modify the NPCX driver erase method to allow 0x1000 byte size erases
along with 0x10000 byte size erases based on input parameters

Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com>
2023-08-03 10:29:14 +02:00
Manuel Argüelles 36f11627ce drivers: eth: add support for NXP S32 GMAC
Add initial support for NXP S32 GMAC/EMAC:
- it's a copy-implementation with DMA data buffers and buffer
  descriptors in non-cached memory (buf len and ring size configurable)
- PHY interface selection only implemented for S32K3 devices as it is
  SoC-specific
- no PHY driver integration, it works as a fixed link with speed/duplex
  configured through devicetree
- supports multicast hash filtering, promiscuous mode, MAC loopback

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-08-03 10:28:20 +02:00
Wei-Tai Lee 3548bf26d8 dts: bindings: mtd: add Andes qspi-nor
Add dts binding for Andes qspi-nor.

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2023-08-03 10:28:02 +02:00
Fabio Baltieri d7504ab474 ethernet: esp32: make phy a phandle of the ethernet device
Change the eth-phy definition so that the phy is pointed by a phandle
rather than a child node, make the phy device a child of mdio. This
makes more sense from a devicetree hirearchy where the phandles have to
be initialized before the device itself, allows keeping the priorities
in check with CHECK_INIT_PRIORITIES.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-02 18:12:14 -04:00
Fabio Baltieri 5037e3a902 ethernet: sam-gmac: make phy a phandle of the ethernet device
Make ethernet phys childs of the mdio device and move the mdio device up
a level on the tree. That makes the device hierarchy coherent with the
required initialization priority and allows keeping the sequence in
check with CHECK_INIT_PRIORITIES.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-01 15:37:59 +02:00
Andrzej Głąbek 7974ff2665 drivers: spi_nrfx_*: Add support for optional WAKE line
Add option to use (by defining the `wake-gpios` devicetree properties)
an additional signal line between SPI master and SPI slave that allows
the latter to stay in low-power state and wake up only when a transfer
is to occur.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-08-01 11:07:21 +02:00
Manuel Arguelles 3d36af15fa drivers: watchdog: support NXP FS26 watchdog
Introduce support for NXP FS26 SBC watchdog. Both Challenger and
Simple watchdog types are supported. Only watchdog functionalities of
the device are supported and any other monitoring feature is either not
supported or disabled.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-08-01 09:51:16 +02:00
Manuel Arguelles cd78028e15 drivers: spi: mcux_lpspi: allow to configure data pins
Add binding properties to allow configuring the direction of data pins
SDI and SDO.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-08-01 09:51:16 +02:00
Dong D Wang c896e1ed15 drivers: serial: sedi: add new dts attri peripheral-id
It's used to pass right device index to hal_intel module.
DT_INST_FOREACH_STATUS_OKAY() does not guarantee the node ordering.

Signed-off-by: Dong D Wang <dong.d.wang@intel.com>
2023-07-31 13:13:47 -04:00
Fabio Baltieri 258fc16570 bindings: ethernet: rename ethernet to ethernet-controller
Rename the ethernet.yaml template to ethernet-controller.yaml to match
the Linux one.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-31 10:09:16 +02:00
Fabio Baltieri c2f4200ad5 bindings: ethernet: replace phy-dev with phy-handle
Rename the phy-dev property with phy-handle to match the Linux
ethernet-controller binding and move it up to ethernet.yaml so that it
can be used by other drivers.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-31 10:09:16 +02:00
Joshua Lilly 67268f5cbd drivers: interrupt_controller: plic: support edge triggered interrupts
This adds a check and option for edge triggered interrupts

Signed-off-by: Joshua Lilly <jgl@meta.com>
2023-07-31 10:08:52 +02:00
Nachiketa Kumar 9f6d6a0fa7 drivers: serial: Add Intel SEDI driver
Adds a new serial shim driver for Intel SoCs. Builds upon the SEDI bare
metal UART driver in the hal-intel module.

Signed-off-by: Nachiketa Kumar <nachiketa.kumar@intel.com>
Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2023-07-28 17:49:09 +02:00
Dong Wang 445f9d28c4 boards: x86: Add boards and SoCs for Intel ISH
Adds new boards and SoCs for the Intel Sensor Hub (ISH).

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2023-07-28 17:49:09 +02:00
Cong Nguyen Huu f809614136 drivers: adc: add NXP S32 ADC SAR driver
Add support ADC SAR for NXP S32. ADC SAR diver
support 3 group channels (precision, standard
and external), run normal trigger in oneshot
conversion mode with 2 callbacks normal end
of conversion and normal end chain callbacks.
An instance only run on 1 group channel and
1 kind of callback at the same time.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2023-07-28 08:55:38 -05:00
Daniel DeGrasse f9daa0397c drivers: sdhc: enable pwr-gpios property within SPI SDHC driver
Enable SPI SDHC driver to manage card power via pwr-gpios property.
Control for this property was previously partially implemented. When
this property is present, the SPI SDHC driver will use it to control
power to the SD card.

Power is toggled during SD init, so this power control can make SD init
more reliable as the power toggle will insure the SD card state is reset.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-28 09:07:55 +00:00
Daniel DeGrasse a3b8f062f8 drivers: display: add driver for HX8394 TFT LCD controller
Add driver for HX8394 TFT LCD controller. This controller is driven via
MIPI DSI, and is configured for a 720x1280 display

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-28 09:06:17 +00:00
Marcin Niestroj cbb83d64ab dts: bindings: rename st-morpho-header pin identifiers
So far pin identifiers were named after CN7 and CN10 connector names on
Nucleo-64 boards. In case of Nucleo-144 there are ST Morpho connectors on
both sides, but bigger (up to 72 instead of 38 pins on each side). First 38
pins out of 72 on each side usually map to the same pins (e.g. PA5 being
13th pin on right ST Morpho connector). This means that single ST Morpho
connector definition will suffice.

Leaving CN7 and CN10 (name of pin headers on Nucleo-64 boards) is confusing
in context of Nucleo-144 boards, since corresponding pin headers are named
CN11 and CN12.

Rename:

 * s/ST_MORPHO_CN7_/ST_MORPHO_L_/
 * s/ST_MORPHO_CN10_/ST_MORPHO_R_/

so that pin identifiers make more sense in context of Nucleo-144 boards.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2023-07-28 08:39:39 +00:00
Andriy Gelman d8f955e375 drivers: pwm: Add driver for xmc4xxx using ccu8 module
Adds driver for pwm on xmc4xxx using Capture Compare Unit 8 (CCU8)
module. There are two CCU8 nodes with each one having four slices.
Each slice has two output channels.

Unlike CCU4, this module can generate complementary high-side/low-side
signals for each output channel. A variable dead time can be added
during the off to on transitions to make sure that the
high-side/low-side signals are not on at the same time.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-07-26 15:09:41 +02:00
Andriy Gelman 23b6e4f507 drivers: pwm: Add driver for xmc4xxx using ccu4 module
Adds driver for pwm on xmc4xxx using Capture Compare Unit 4 (CCU4)
module. There are four CCU4 with each one having four channels
Thus it's possible to have up to 16 pwm output signals. The output of
each channel can only be connected to a specific port/pin. The possible
connection and gpio configurations are defined using pinctrl.

The CCU4 module also has a capture mode. Capture support will be added
in the future.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-07-26 15:09:41 +02:00
Wojciech Sipak bff69f5384 drivers: pinctrl: add driver for EOS S3
This adds a new pinctrl driver for Quicklogic EOS S3 SoC

Signed-off-by: Wojciech Sipak <wsipak@antmicro.com>
2023-07-26 14:59:59 +02:00
Iuliana Prodan b4293ec026 dts: xtensa: nxp: add nodes for IPC
Add mailbox and interrupt-controller nodes used for
inter-process communication.

Add also the dt binding for the interrupt-controller.
For now, this is used just to fix some compile errors,
since the mailbox requires an interrupt-controller.

For DSP, we have a direct interrupt line to the core.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-07-26 14:33:36 +02:00
Florian Grandel d34709121f drivers: cc13xx_cc26xx: pinctrl: support edge detection
Introduces support for SoC-specific input-edge-detect configuration to
the CC13/26xx pinctrl driver.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-07-26 14:32:53 +02:00
Florian Grandel 0dcbb22265 drivers: cc13xx_cc26xx: pinctrl: support drive strength
Introduces support for drive-strength configuration to the CC13/26xx
pinctrl driver.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-07-26 14:32:53 +02:00
Florian Grandel 0c16fea93f doc: dts: bindings: pinctrl: minor readability improvement
Improves readability of input/output-enable/disable flags.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-07-26 14:32:53 +02:00
Oliver King fbc6a91a5a drivers: sensor: a01nyub: added driver
Added a driver for the DFRobot A01NYUB distance sensor. This sensor
sends its readings via UART at 9600 baud. This driver uses interrupts
to read the data from the sensor.

Signed-off-by: Oliver King <oliver.king@steadconnect.com>
2023-07-26 13:28:28 +02:00
Kevin Wang 3744fe2d49 drivers: mbox: Add Andestech mailbox driver
Support the Andes mailbox driver via software plic.

Signed-off-by: Kevin Wang <kevinwang821020@google.com>
2023-07-26 10:51:41 +02:00
Manuel Argüelles 6d0a876525 drivers: flash: add NXP S32 QSPI flash NOR driver
Add support for flash NOR memory devices on a NXP S32 QSPI bus. The
driver uses a fixed LUT configuration assuming a default standard page
size and erase types, and allows to select between multiple read/program
instructions/modes. It is also possible to read the flash device
characteristics from the device at run-time as long as the memory is
JESD216 compatible, providing more flexibility.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-07-26 09:44:14 +02:00
Manuel Argüelles 5dad944351 drivers: memc: add NXP S32 QSPI controller
The NXP S32 QSPI controller acts as an interface to up to two serial
flash memory devices, each with up to eight bidirectional data lines,
depending on the platform. It is based on a LUT enginee to interface
through commands with different memory types including flash NOR and
Hyperram.

This patch adds support for the QSPI in S32K344 which supports a single
memory device (side A) with up to four bidirectional data lines and SDR
only. Nevertheless, the memory controller is implemented flexible enough
to be extended to support more feature-rich QSPI blocks.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-07-26 09:44:14 +02:00
Adam Wojasinski 368acbe2d1 drivers: i2c: i2c_nrfx_twim: Utilize memory-region prop from devicetree
This commit aligns TWIM shim to utilize memory-region property.
The memory-region is not required property that enables user
to specify placement of dma buffers in memory region.
It is done by assigning to memory-region property,
phandle to node with zephyr,memory-region and mimo-sram compatible.

When memory-region property is not specified for given
instance, buffer is placed in default RAM region with other data.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-07-26 09:36:31 +02:00
Pavlo Havrylyuk f4a1d40924 drivers: counter: Add Infineon CAT1 counter driver
Add initial version of Infineon CAT1 counter driver
Add initial version of binding file for Infineon
Add counters to psco6 dtsi
Add external trigger pin that runs counter

Signed-off-by: Pavlo Havrylyuk <pavlo.havrylyuk@infineon.com>
2023-07-26 09:10:31 +02:00
Pieter De Gendt 6758777ddf drivers: crypto: Add NXP MCUX DCP driver
Add a shim driver for NXP's Data Co-Processor (DCP) driver.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-07-26 09:09:48 +02:00
Girisha Dengi 62dbe72cb7 drivers: pm_cpu_ops: Add support for multiple PSCI versions
Each PSCI interface versions have different DT compatible strings
like arm,psci-0.2, arm,psci-1.1 and so on. However, the same driver
can be used for all the versions by adding #define DT_COMPAT for
required version and #undef DT_COMPAT for default version.

Add support for PSCI cold reset, warm reset and cpu-on function IDs.

Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
Signed-off-by: Navinkumar Balabakthan <navinkumar.balabakthan@intel.com>
2023-07-25 16:58:01 +00:00
Girisha Dengi f0ac2347da drivers: serial: Add optional reset line for uart_ns16550
If the optional hardware reset line is available, this change
will use that reset line to assert the uart module and bring
it out of reset state to use.

Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
2023-07-25 16:58:01 +00:00
Girisha Dengi 6639756fae drivers: reset: Add reset controller for Intel Agilex5 platform
This is Intel's proprietary IP which controls individual module
reset signals. During each system driver initialization, these
reset signals will be used to bring module out of reset state.

Signed-off-by: Navinkumar Balabakthan <navinkumar.balabakthan@intel.com>
Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
2023-07-25 16:58:01 +00:00
Girisha Dengi 81f0acd5d4 dts: arm64: Add device tree for Intel SoCFPGA Agilex5 platform
Device tree for Intel SoCFPGA Agilex5 initial bring up. This is the
first version of device tree which enable four cores SMP and basic
drivers that needed by 'hello_world' and 'cli' applications.

Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
2023-07-25 16:58:01 +00:00
Girisha Dengi 2ca6ffcd79 drivers: clock_control: clock driver for Intel Agilex5 platform
This is Intel's proprietary IP which supply the clock for all the
system peripherals. Clock manager is initialized only one time
during boot up by FSBL (ATF BL2) based on external user settings.

Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
2023-07-25 16:58:01 +00:00
Fabian Blatz e1e4fcc701 input: remove cap1203 kscan-like state report
Previously the driver was retrofitted to the kscan api, handling it as a
input device with one row and three columns. With the move to the input
subsystem each input can have its proper input code instead.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-07-25 11:25:51 +02:00
Fabian Blatz 1d56b8e2aa input: convert cap1203 from kscan
Convert the CAP1203 driver to the input subsystem, add to build_all tests.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-07-25 11:25:51 +02:00
Carlo Caione 15e84cbfac dts: Move to 'zephyr,memory-attr'
Move to 'zephyr,memory-attr' and use the newly introduced helpers.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-07-25 11:22:10 +02:00
Carlo Caione 7483e43f0c devicetree: Add 'zephyr,memory-attr' and DT helpers
The 'zephyr,memory-region-mpu' property was addede gqas a
convenient way to create and configure MPU regions using information
coming from DT. It has been used a lot since it was introduced so I
guess we can consider it a Zephyr success story ™ .

Unfortunately it has been proved to be a bit limited and with some
important limitations:

1. It was introduced as a property of the compatible
   zephyr,memory-region that is used to create linker regions and
   sections from DT data. This means that we can actually create MPU
   regions only for DT-defined regions and sections.
2. The naming is unfortunate because it is implying that it is used only
   for MPU.
3. It is misplaced being in include/zephyr/linker/devicetree_regions.h
   and still it has nothing to do with the linker at all.
4. It is exporting a function called LINKER_DT_REGION_MPU that again has
   nothing to do with the linker.

Point (1) is also particularly limiting because it is preventing us to
characterize memory regions that are not generated using the
'zephyr,memory-region' compatible, like generic mmio-sram regions.

While we fix all the issues, we also want to extend a bit the range of
usefulness of this property. We are renaming it 'zephyr,memory-attr' and
it is now carrying information about the type of memory the property is
attached to (cacheable, non-cacheable, IO, eXecutable, etc...). The user
can use this property and the DT API coming with it to act on the memory
node it is accompanied by.

We are still providing the DT_MEMORY_ATTR_APPLY() macro that can be used
to create the MPU regions as before, but we are adding also a
DT_MEMORY_ATTR_FOREACH_NODE() macro that can be used to cycle through
the memory nodes and act on those.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-07-25 11:22:10 +02:00
Gerard Marull-Paretas 161d83239a dts: bindings: power: nxp,pdcfg-power: fix YAML formatting
Adjust to the expected YAML formatting (2sp). Issue reported by CI
compliance checks.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-25 09:16:14 +02:00
Daniel DeGrasse 7fe5ce641a drivers: dma: add DMA driver for NXP PXP engine
The NXP Pixel pipeline engine (PXP) is a 2D DMA engine capable of
accelerating display rotation, color space conversion, and limited
2D blending operations. This DMA driver only supports rotation of a
framebuffer, via a set of custom dma_slot values. Only DMA channel 0
is supported or utilized.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-25 09:10:52 +02:00
Manimaran A b4cd531e2c drivers: bbled: pwm: mchp: BBLED low power mode updated
Updated the driver to support low power mode.
Introduced "enable-low-power" flag in device tree to
control(on/off) low power mode.

If flag added in DTS, during sleep BBLED will switch off the LEDs.
Otherwise BBLED will continue the configured blinking pattern on LEDs.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-07-25 09:09:44 +02:00
Daniel DeGrasse 066c40bbb0 drivers: input: ft5336: Add support for reset GPIO and FT3267 IC
Add support for resetting controller at boot, and update FT5336
documentation to indicate that the FT3267 IC is also supported by this
driver.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-25 09:08:59 +02:00
Daniel DeGrasse e692e57c68 drivers: display: add support for RM67162 controller
Add support for RM67162 MIPI display controller. This controller
is configured to run in MIPI command/DBI mode, driving a 400x392 OLED
display.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-25 09:08:59 +02:00
Daniel DeGrasse d1ef34440e drivers: mipi_dsi: dsi_mcux: make DPI mode optional
Only setup DPI input from LCDIF if MODE_VIDEO is set, as this
is the the only case where input from the LCDIF would be required to
drive the display. Do not populate the dpi_config structure unless a
reference the the NXP LCDIF device is provided, since this is the output
device providing DPI data.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-25 09:08:59 +02:00
Daniel DeGrasse 867acef070 drivers: mipi_dsi: make DPI mode optional for dsi_mcux_2l driver
Make DPI mode an optional configuration for the DSI MCUX 2L driver.
DPI mode will only be enabled when the MIPI is attached in video mode,
since this is when DPI formatted packets are expected.

This will enable the DSI driver to also support DBI/command mode, for
displays that use this format.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-25 09:08:59 +02:00
Benedikt Schmidt 6587813ce0 dts: bindings: pwm: add MAX31790
Add binding for the PWM and fan driver MAX37190.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-07-25 09:08:30 +02:00
Daniel DeGrasse 85a41ae88a drivers: led: added support for is31fl3733 led driver
Enabled support for is31fl3733 driver. This driver supports
the full LED API, and enables the following features of the is31fl3733:
- individual LED dimming
- individual LED enable/disable
- bulk writes of LED enabled and dimming states
- global LED current limit
- blanking (via custom API)

Signed-off-by: Daniel DeGrasse <daniel@degrasse.com>
2023-07-21 10:51:18 +00:00
cyliang tw ecbaac60bd drivers: flash: support for Nuvoton numaker series FMC
Add Nuvoton numaker series flash memory controller(FMC) with erase,
 read & write features of soc-flash. Also update Nuvoton manifest
 to include zephyrproject-rtos/hal_nuvoton#6.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-07-21 10:41:40 +00:00
Mulin Chao f34fff91bc driver: flash: npcx: introduce npcx flash driver
This CL attempts to implement npcx's flash driver instead of the
original one (npcx spi driver plus spi_nor flash driver).

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2023-07-20 16:22:47 +02:00
Mulin Chao 7411fbcb5b pinctrl: npcx: add DEV_CTLx configuration support
Add a new pinctrl type to control peripheral modules' specific IO
characteristics such as tri-state, the power supply type selection (3.3V
or 1.8V), and so on. In NPCX series, the corresponding registers/fields
are irregular. This CL wraps these definitions to dt nodes and put them
in pinctrl property if needed.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2023-07-20 16:22:47 +02:00
Felipe Neves 7ca59d7bfe drivers: ipm: added IPM over IVSHMEM driver
This driver is built on top of the IVSHMEM doorbell
notification mechanism providing an unified way
to generate inter VM interrupts.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2023-07-20 10:44:57 +00:00
Guillaume Gautier 5a55a185dd dts: bindings: clock: add specific rcc bindings for stm32f1x and f3x
Add two new bindings for STM32F1x and F3x RCC to add the ADC prescaler
specific to these series.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-07-19 10:13:26 +00:00
Martin Kiepfer 09da4cf89d driver: regulator: Add support for AXP192 power management IC
AXP192 is a small and simple power management IC featuring different
LDOs, DCDCs, AINs and also GPIOs. It also offers functionaltiy for
battery management.
This change includes the basic regulator driver functionaltiy for
LDO2-3 and DCDC1-3 as well as the mfd driver layer. Further drivers
for GPIO and ADC will follow.
Drivers have been developed and tested on M5StackCore2, an ESP32-based
board. Support for M5StackCore2 is still in progress.

Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
2023-07-19 09:52:15 +00:00
Daniel DeGrasse 5862b38e99 drivers: input: gt911: enable fallback to alternate address
GT911 IC uses the INT pin to select the correct I2C address during
reset. However, some boards may not route this pin (or may only support
receiving inputs on it). This results in the I2C address selected by the
GT911 IC being arbitrary based on the state of the (floating) INT pin.

To resolve this, introduce an `alt-addr` property for this device. When
set, the INT pin will not be pulled low. Instead, the I2C address will be
probed at runtime, starting with the devicetree address and falling back to
`alt-addr`.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-18 18:49:13 +00:00
Wojciech Sipak c811a4f430 drivers: adc: add ADC driver for EFM32
This adds a driver for ADCs available on EFM32

Signed-off-by: Wojciech Sipak <wsipak@antmicro.com>
2023-07-18 11:05:39 +00:00
Carlo Caione 9752cbe045 ipc_service: open-amp: Align VRINGs
This patchset is doing three things:

1. It is fixing the bogus algorithm to find the optimal number of
   descriptors for a given memory size.

2. It is changing values for VDEV_STATUS_SIZE and
   IPC_SERVICE_STATIC_VRINGS_ALIGNMENT to better align to a usual cache
   line size.

3. RX/TX VRINGs are now correctly aligned to MEM_ALIGNMENT (and cache
   line alignment).

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-07-18 11:04:46 +00:00
Simon Guinot 8b5ebc010b dts: bindings: pwm-leds: add description for pwms property
This patch adds a description section for the pwms property of the PWM
LED child node. This intends to explain how the period field is used by
the led_pwm driver and to help with its configuration.

Reported-by: Scott Worley <scott.worley@microchip.com>
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2023-07-18 10:45:05 +00:00
Chen Xingyu 770e6dfaef drivers: auxdisplay: Add driver for PTC PT6314 VFD controller
Adds the driver for PT6314 dot character VFD controller/driver IC.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2023-07-14 12:09:03 +02:00
Fabio Baltieri 04e0e458c8 input: convert gt911 from kscan
Convert the GT911 driver to the input subsystem, fix the existing boards
to work in the default config.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-13 14:24:50 +00:00
Benedikt Schmidt fd54a9ab6e dts: bindings: adc: fix description of ADS114S08
Fix the description in the binding of the ADS114S08.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-07-13 09:33:08 -04:00
Florian Grandel 74dcbaba32 dts: ti: cc13xx_cc26xx: align binding file name
Aligns the filename of TI's CC13/26xx system timer peripheral devicetree
binding to its compatible string.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-07-12 19:57:25 -04:00
Ryan McClelland f1a992c87a drivers: sensors: bmi08x: add initial support for bmi08x
This adds support for the bosch bmi085 and bmi088. This also includes
support for data sync mode.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-07-12 14:53:16 -05:00
Andy Sinclair 910d43805b drivers: watchdog: npm1300: Added watchdog driver
Added watchdog driver for nPM1300

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-07-12 14:36:56 +02:00
Anisetti Avinash Krishna d982ea54b6 drivers: pwm: Add support for pch intel blink driver
This patch adds support for PWM blink which is found in intel's
PCH hardwares.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-07-12 14:50:16 +03:00
Alvaro Garcia b7f9fb8f82 drivers: added support for clock PCF8563
Added driver support

Signed-off-by: Alvaro Garcia <maxpowel@gmail.com>
2023-07-11 16:14:49 +02:00
Tim Lin 0960bb3066 ITE: drivers/i2c: Add I2C target driver used buffer mode
Add I2C target driver used buffer mode. The maximum accessible buffer
is 2044 bytes, the default is 256 bytes.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-07-11 15:50:13 +02:00
Erwan Gouriou 2af4d1aa00 dts: bindings: Add stm32wba flash controller binding
Required to compile wba variant of stm32 flash controller

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-07-11 15:05:05 +02:00
Guillaume Gautier 14b4d3ddb2 dts: bindings: clocks: Add st,stm32wba clock bindings
Add bindings for wba specific clocks, osc and controllers:
- hse
- pll
- rcc

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-07-11 15:05:05 +02:00
Bill Waters 541482ff20 driver: i2c: infineon: Adding XMC4 I2C driver
- This includes the driver, test app, and sample app
- Only the boards\arm\xmc47_relax_kit board is supported for now

Signed-off-by: Bill Waters <bill.waters@infineon.com>
2023-07-11 09:43:19 +02:00
Joseph Yates f87a589f5d boards: shields: Adding support for the adafruit can picowbell shield
Adding support for the adafruit can picowbell shield for the
raspberry pi picoi. Also added nodelable for spi0 called 'pico_spi'
as well as an GPIO nexus node 'pico_header'

Signed-off-by: Joseph Yates <joeyatessecond@gmail.com>
2023-07-10 09:26:42 +02:00
Florian Grandel 75c83edc48 dts: ti: cc13xx_cc26xx: devicetree sysclk alignment
This change introduces the "_rtc_timer" suffix for the system tick timer
driver "compatible" property and aligns naming conventions with the
actual CC13/26xx SoC series product policy.

This frees up the "_rtc" namespace to introduce additional APIs based on
the same peripheral in the future (not part of this PR):

rtc: rtc@... {
  compatible = "ti,cc13xx-cc26xx-rtc";
  ...

  timer {
    compatible = "ti,cc13xx-cc26xx-rtc-timer";
    ...
  };

  counter {
    compatible = "ti,cc13xx-cc26xx-rtc-counter";
    ...
  };

  pps {
    compatible = "ti,cc13xx-cc26xx-rtc-pps";
    ...
  };
};

Or alternatively an MFD pattern with similar requirements.

Fixing the namespacing now makes sense standalone as it reduces the
chance of custom drivers being broken in the future.

Redundant extension of the mandatory system clock devicetree node is
replaced with a single `status = "okay"` which seems to be the more
sensible default to avoid user error when defining custom boards.
Knowledgeable users can still override this if really needed.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-07-07 18:46:24 -04:00
Greg Ingram e6d463f8dd doc: Updated description grammar in mikro-bus.yaml file
Fixed some wording within the description section

Signed-off-by: Greg Ingram <shaggygi97@gmail.com>
2023-07-07 22:44:36 +00:00
Dino Li fa49f77973 drivers/crypto/it8xxx2: add support for SHA256 hardware accelerator
Add SHA256 accelerator support for it8xxx2 series.

This driver passes the following test:
tests/crypto/crypto_hash/

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2023-07-07 09:24:47 +02:00
Benjamin Perseghetti 5336e7fd14 drivers: sensor: ina23x: Use micro-ohms for rshunt
Changes rshunt-milliohms to rshunt-micro-ohms allowing for current
sensing of greater than 16.4A (1mOhm resistor). This is commonly
set to 100 uOhm for VMU/FMU boards/applications.

Co-authored-by: James Goppert <james.goppert@gmail.com>
Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
2023-07-07 09:21:23 +02:00
Manuel Arguelles 671d857a60 drivers: intc: nxp_s32: support multiple interrupt handlers
SIUL2 may require multiple interrupt handlers instead of a single one as
currently supported for S32Z/E. This is needed to enable support on
S32K3.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-07-06 14:19:23 -05:00
Manuel Arguelles d2b2996a34 boards: mr_canhubk3: support pinctrl
Support pin control for NXP S32K3 devices and enable it by default on
mr_canhubk3 board configuration.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-07-06 14:19:23 -05:00
Manuel Arguelles 523591a3d5 drivers: clock_control: add NXP S32 driver
The clock controller is a singleton controller for all the system-level
clocks (XOSC, PLL, CGM, etc) to provide run-time information to the
peripheral device drivers about the module's clocks.
Clock configuration is not yet supported.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-07-06 14:19:23 -05:00
Jordan Yates b3f12b430f drivers: bluetooth: hci: spi: add small read delay
Add a small delay between reading the transport header and reading the
HCI data. Failing to do so on a nRF9160<->nRF52832 link was reliably
resulting in the nRF9160 trying to read data before the nRF52832 had
set up the SPI transaction, resulting in the host reading a buffer full
of 0x00 and having to run the entire read result again.

Transceiving a 10 byte packet takes at least 31uS, while 100 byte
packets are around 150uS (duration of `spi_transceive` call). Waiting
1 tick to eliminate the need for most retransmissions is a valid
tradeoff.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-07-05 14:15:18 +02:00
Jordan Yates 21ed808ba1 drivers: wifi: esp_at: handle external reset sources
Add an option that signifies that the ESP modem may be reset at the same
time as the SoC by an external source. When this is the case, we first
wait for an unsolicited "ready" message from the modem, before
attempting to reset the device. This prevents two initialisation
sequences attempting to run at the same time.

We still want to wait for the complete initialisation sequence to
complete before returning in this case.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-07-05 14:14:51 +02:00
Jerzy Kasenberg b896ca5771 drivers: counter: Add Smartbond basic support
This adds support for the TIMER1-4 counter.
Each counter has 24bits and can run on LP_CLK (15-32KHz)
or DIVN clock (32MHz) with prescaler 1-32.
Each counter can have one alarm set.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2023-07-05 13:00:50 +02:00
Andy Sinclair 7e3f6f1290 drivers: sensor: npm1300_charger: Added Ntc threshold config
The NTC thresholds (cold, cool, warm, hot) are now configured
during initialisation

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-07-05 12:59:38 +02:00
Caspar Friedrich 1d61ad8bed dts: bindings: display: st7735r: Remove requirement for reset-gpios
The display controller supports software reset and the driver already
implements it. Therefore it's not necessary to require a reset gpio in
device tree.

Signed-off-by: Caspar Friedrich <c.s.w.friedrich@gmail.com>
2023-07-03 14:08:55 +00:00
Jakub Rzeszutko 4368351917 dts: bindings: add Torex Semiconductor
Add new vendor to the dts bindings list.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@verkada.com>
2023-07-03 13:51:28 +00:00
Moritz Fischer 4828c89fa2 dts: bindings: clock: Fix fixed-clock binding
Remove `clocks` property for fixed-clock binding.
A fixed-clock should not have an input clock, since by
definition it's an always on fixed-rate clock.

Signed-off-by: Moritz Fischer <moritzf@google.com>
2023-07-03 12:49:27 +02:00
Caspar Friedrich 9291c9f7d6 drivers: tla2021: Add driver
This adds a driver for Texas Instruments Cost-Optimized, Ultra-Small,
12-Bit, System-Monitoring ADCs. Currently only TLA2021 is supported,
TLA2022 and TLA2024 may follow based on this driver.

Signed-off-by: Caspar Friedrich <c.s.w.friedrich@gmail.com>
2023-07-03 09:30:54 +02:00
Kevin Wang a9955d3e17 drivers: watchdog: Add Andestech ATCWDT200 driver.
Support the Andes atcwdt200 watchdog driver.

Signed-off-by: Kevin Wang <kevinwang821020@google.com>
2023-06-29 10:13:05 +00:00
cyliang tw 51d57f612d drivers: pinctrl: add pin group for NuMaker pinctrl
Update Nuvoton numaker series pinctrl, let support pin group.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-06-28 06:49:38 +00:00
Fabio Baltieri 9065c2d156 input: convert xpt2046 from kscan
Convert the XPT2046 driver to the input subsystem, change the api,
remove the callback and enable logic.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-06-27 12:17:06 +00:00
Manojkumar Subramaniam e8109f903c dts: bindings: timer: Add efinix,sapphire-timer0
A new timer controller addition

Signed-off-by: Manojkumar Subramaniam <manoj@electrolance.com>
2023-06-27 12:09:57 +00:00
Manojkumar Subramaniam 197cce50d0 dts: bindings: serial: Add efinix,sapphire-uart0
A new UART controller addition, interrupt is optional

Signed-off-by: Manojkumar Subramaniam <manoj@electrolance.com>
2023-06-27 12:09:57 +00:00
Manojkumar Subramaniam 2ec89ba831 dts: bindings: gpio: Add efinix,sapphire-gpio
A new gpio controller addition

Signed-off-by: Manojkumar Subramaniam <manoj@electrolance.com>
2023-06-27 12:09:57 +00:00
Manojkumar Subramaniam 1eb4317d5c dts: bindings: vendor-prefixes: Add efinix prefix
Add efinix manufacturer binding prefix.

Signed-off-by: Manojkumar Subramaniam <manoj@electrolance.com>
2023-06-27 12:09:57 +00:00
Gerard Marull-Paretas a44f61c5f5 tests: lib: devicetree: api: test the 'reserved' status
The `reserved` status, even though supported, was not tested. Add
coverage for it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-06-26 03:10:30 -04:00
Alexander Razinkov b158c52e24 devicetree: support of 64-bit addresses from devicetree
Usage of 64-bit address constants from devicetree without a
UINT64_C wrapping macro results in the following warning and the
cut-off of the address value:

"warning: integer constant is so large that it is unsigned"

This change extends devicetree API adding few wrappers over the
address constant getters which add ULL size suffix to an
address integer literal when the appearance of 64-bit address
values is possible

Signed-off-by: Alexander Razinkov <alexander.razinkov@syntacore.com>
2023-06-25 03:29:54 -04:00
Jason Yuan fcb4c23b95 dts: bindings: afe: add current sense amplifier
Add bindings for a current sensor using a shunt resistor and amplifier.

Signed-off-by: Jason Yuan <jasonyuan@google.com>
2023-06-24 18:54:33 +02:00
Jason Yuan 7b73beab43 dts: bindings: adc: add shunt sensor
Add bindings for a current sensor using a shunt resistor.

Signed-off-by: Jason Yuan <jasonyuan@google.com>
2023-06-24 18:54:33 +02:00
Jason Yuan 67bdd17808 drivers: adc: voltage divider
adds DT macro initializer and scaling function for voltage divider.

Signed-off-by: Jason Yuan <jasonyuan@google.com>
2023-06-24 18:54:33 +02:00
Conor Paxton ea42995f2e dts: riscv: introduce PolarFire SoC I2C interface
Add support for Microchip's PolarFire SoC I2C interface
Signed-off-by: Conor Paxton <conor.paxton@microchip.com>
2023-06-23 12:31:36 -04:00
Andy Sinclair 7bc99e246c drivers: led: npm1300: nPM1300 LED driver
Added LED driver for nPM1300 PMIC

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-06-23 08:55:13 +00:00
Fabio Baltieri 2790106c33 input: add a gpio qdec input driver
Add a GPIO based quadrature decoder driver that reports relative axes
movements using the input subsystem.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-06-22 10:46:15 +02:00
Georgij Cernysiov 5cde75688e dts: bindings: ospi: add ospim io ports
Adds properties to configure OCTOSPI IO
Manager data lines. That allows to use
any `IOLowPort` and `IOHightPort`.

Note: OSPIM requires additional clock to be enabled.
      Please refer to Reference Manual.
      Extra clock can be enabled in devicetree.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2023-06-21 16:06:00 +02:00
cyliang tw 0fd564ef7f drivers: gpio: support for Nuvoton numaker series GPIO
Add Nuvoton numaker series GPIO support, including interrupt mode and
also integrate clock control.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-06-21 09:26:00 +00:00
cyliang tw 6176687c88 drivers: serial: support for Nuvoton numaker series UART
Add Nuvoton numaker series UART support, including interrupt-driven,
also apply pinctrl and clock-control.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-06-21 09:26:00 +00:00
cyliang tw c448dceb57 drivers: reset: add support for NuMaker series reset
Add Nuvoton numaker series reset controller support.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-06-21 09:26:00 +00:00
cyliang tw 4ad399d54d drivers: clock_control: add support for Nuvoton numaker series CLK
Add Nuvoton numaker series clock controller support, including:
1.  Do system clock initialization in z_arm_platform_init().
2.  Support peripheral clock control API equivalent to BSP
    CLK_EnableModuleClock()/CLK_SetModuleClock().

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-06-21 09:26:00 +00:00
cyliang tw 5879810137 drivers: pinctrl: add support for NuMaker series pinctrl
Add Nuvoton numaker series pinctrl support.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-06-21 09:26:00 +00:00
Marko Sagadin 54cbf45c74 drivers: uart: add support for serial ports on native posix
Add support for communication with serial ports on native POSIX platform
via UART driver API. Serial port driver supports polling API,
configuration of the serial ports used via devicetree and command line
options, and runtime configuration with `uart_configure`.
Multiple instances of the driver are supported.
Example use and configuration is also demonstrated in the
`samples/drivers/uart/native_tty` sample.

Closes: #56586

Signed-off-by: Marko Sagadin <marko.sagadin42@gmail.com>
2023-06-21 09:27:22 +02:00
Maciej Baczmanski 9748250e72 dts: vendor-prefixes: Add OpenThread.io vendor prefix
Added OpenThread.io vendor prefix to enable
`openthread,config` dts binding for additional OpenThread configurations.

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2023-06-19 15:03:24 +02:00
Guy Morand 890363a6fb drivers: led: Add lumissil is31fl3216a driver
The IS31FL3216A is a fun light LED controller. The LED current of each
channel can be set in 256 steps by adjusting the PWM duty cycle through
an I2C interface.

Signed-off-by: Guy Morand <guy.morand@bytesatwork.ch>
2023-06-19 11:02:36 +02:00
Jonas Remmert 99751b1d98 drivers: led: Add lp5569 led controller driver
Add a minimal driver for the ti lp5569 led controller. The driver supports
multiple instances. Commands on|off|set_brightness are supported.

Signed-off-by: Jonas Remmert <j.remmert@phytec.de>
2023-06-19 09:17:52 +01:00
Piotr Wojnarowski 2f5ac45e53 dts: bindings: interrupt-controller: GIC: Allow specifying version in DT
Currently, only the presence of a GIC is reflected in the device tree,
and its version must be set separately in each SoC's Kconfig.
This patch adds separate bindings for each GIC version whose presence
in the device tree automatically enables the corresponding Kconfig symbol.

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
2023-06-17 08:01:46 -04:00
Piotr Wojnarowski 88f4353ce1 dts: bindings: interrupt-controller: GIC: Update description
When the GIC driver was originally introduced, it was only used on
Cortex-R SoCs. However, this is not the case anymore. Update the
description to reflect that this driver is not specific to Cortex-R.

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
2023-06-17 08:01:46 -04:00
Daniel DeGrasse 6c10da7957 drivers: sensor: introduce driver for TCN75A temperature sensor
Add driver for TCN75A temperature sensor. The following features are
supported:
- TCN75A oneshot mode, which allows single shot conversions with lower
  power consumtion
- Resolution selection, up to 12 bit resolution (9 bit default)
- Triggering based on temperatue thresholds. If the TCN75A exits a set
  threshold range, the application can be notified via a callback.

Signed-off-by: Daniel DeGrasse <daniel@degrasse.com>
2023-06-17 08:01:16 -04:00
Manimaran A 0f6cb5edcd drivers: ps2: microchip: Low power and wakeup enabled
ps2 driver updated to support low power and wakeup.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-06-17 07:59:07 -04:00
Gerard Marull-Paretas 74b063ed58 boards: cc32(20|35)sf_launchxl: add UART0 pinctrl entries
Add UART0 pinctrl entries, and make them required at bindings level.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-06-17 07:55:43 -04:00
Gerard Marull-Paretas 8654f321e9 boards: cc32(20|35)sf_launchxl: add I2C pinctrl entries
Add I2C pinctrl entries, and make them required at bindings level.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-06-17 07:55:43 -04:00
Gerard Marull-Paretas c0bc9f974f drivers: pinctrl: add TI CC32XX driver
Add a new pinctrl driver for TI CC32XX SoC. The driver has not been
tested, just implemented following datasheet specs and checked that it
compiles. Consider this as a best-effort driver to remove custom pinmux
code in board files.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-06-17 07:55:43 -04:00
Jordan Montgomery a7014d01da drivers: adc: Add support for TI ADS1112 ADCs
This PR adds a custom driver for the ADS1112 ADCs. Unlike ADS1113/4/5
family served by the ADS1x1x driver, the ADS1112 does not use an address
pointer to address config registers. Instead, there is only one writable
register and all i2c writes will set it. The registers resemble the
ADS1119 device, but config bitmap is different, include a distinct data
rate table, gain table, and input multiplexing table. There is also not a
status register to be monitored with the ADS1112, as it uses config bit 7
for the same purpose instead of a separate register.

The driver was tested on hardware using the ADC shell interface. Manual
probing validated the voltages for the MUX_SINGLE configs at datarate 15
in CM_SINGLE. Higher gains were not tested and CM_CONTINUOUS is not
supported in this initial implementation.

The new driver has also been added to the existing ADC test using adc_emul
for completeness.

Origin: original
License: Apache 2.0
Purpose: Adding support for ADS1112 ADCs

Signed-off-by: Jordan Montgomery <jordan.montgomery@getcruise.com>
2023-06-17 07:49:59 -04:00
Zhang Lixu 25ca09ea01 sensing: phy_3d_sensor: add phy_3d_sensor skeleton
Add the sensor phy_3d_sensor skeleton in Sensing Subsystem.

Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
2023-06-17 07:43:25 -04:00
Zhang Lixu 685160b4bf sensing: add Sensing Subsystem skeleton
Add Sensing Subsystem skeleton.

Signed-off-by: Guangfu Hu <guangfu.hu@intel.com>
Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
2023-06-17 07:43:25 -04:00
Henrik Brix Andersen 0f36f1a3ee drivers: can: mcan: use per-instance message RAM configuration
Restructure the Bosch M_CAN driver backend to use per-instance Message RAM
configuration.

This removes the need for a common, artificial "can" devicetree node for
SoCs with multiple Bosch M_CAN-based CAN controllers and allows for
per-instance configuration of the number of e.g. standard (11-bit) and
extended (29-bit) filter elements.

As part of the restructure, software handling of CAN filter flags was moved
from per-flags bitfields to per-filter bitfields, solving an issue when
using more than 32 standard (11-bit) filter elements or more than 16
extended (29-bit) filter elements.

Fixes: #42030, #53417

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-05-29 14:34:19 -04:00
Henrik Brix Andersen 6cd67e67fe dts: bindings: can: mcan: switch to using bosch,mram-cfg property
Switch the Bosch M_CAN devicetree binding to use a bosch,mram-cfg property
for specifying the memory layout of the Bosch M_CAN Message RAM. This is
identical to the Linux kernel devicetree binding for Bosch M_CAN IP core
based CAN controllers.

This introduces an offset cell which can be used for controllers with
shared Message RAM between Bosch M_CAN instances.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-05-29 14:34:19 -04:00
Siyuan Cheng 4babd545cc drivers: pinctrl: add pinctrl driver for ARC emsdp
Add Synopsys ARC EMSDP board Pin controller for its Pmod
and Arduino shield interface.

Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
2023-05-29 09:21:07 -04:00
Andrei Hutanu cf3df2b840 drivers: modem: quectel-bg9x: fix for bg95 pinout
The BG95 pin configuration does not internally ever use the reset pin.
Because of this, there is no need to make reset pin mandatory.
Commit removes reset pin dependency [e.g. in case of BG95].

Signed-off-by: Andrei Hutanu <andrei.hutanu.i@gmail.com>
2023-05-27 06:28:33 -04:00
Nick Ward c5f725e672 drivers: sensor: vl53l0x: fix XSHUT pin as active low
Also utilises gpio_pin_configure_dt() API to configure and set pin
state at the same time.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-05-27 06:19:29 -04:00
Benedikt Schmidt e7759b2a8e dts: bindings: adc: Add IDAC current to ADS114S08
Add the IDAC current magnitude property to ADS114S08

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-05-27 05:33:52 -04:00
Benedikt Schmidt bb679532f4 dts: bindings: adc: Add configurable current source pin for ADCs
Add a property to the ADC channels which allows the configuration
of the current source pin.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-05-27 05:33:52 -04:00
Emilio Benavente 86d63c5cff dts: arm: nxp: lpc55S6X: Added trig bindings for DMA
Added Input/Output trigger mux address's as properties
that can be passed into the DMA driver. This is intended
to send INPUTMUX signals into the DMA.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2023-05-26 17:22:43 -05:00
Mahesh Mahadevan f05bbd09be drivers: usb_dc_mcux: Add Pinctrl defines
Add Pinctrl code

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-05-26 17:53:37 -04:00
Jamie McCrae 212a4857ba drivers: auxdisplay: Add Hitachi HD44780 driver
Adds an auxiliary display driver for Hitachi HD44780-based (and
compatible) LCD displays.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2023-05-26 23:05:58 +02:00
Jamie McCrae 71c727e92e drivers: auxdisplay: Port Jinghua Display JHD1313 driver
Ports the Jinghua Display JHD1313 LCD (with RGB backlight) driver
to use the new auxdisplay driver interface. This driver is used on
the seeed grove LCD RGB display, and replaces it.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2023-05-26 23:05:58 +02:00
Jamie McCrae 7d1c79aa8c drivers: auxdisplay: Add noritake itron VFD auxiliary display
Adds the driver for a Noritake Itron VFD auxiliary display.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2023-05-26 23:05:58 +02:00
Jamie McCrae bdf2e56ce1 drivers: Add auxdisplay (text) interface
Adds the base driver include file and base auxiliary display
dts file.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2023-05-26 23:05:58 +02:00
Abram Early a59c948256 drivers: serial: stm32 uart implements driver enable
Enables the use of the hardware DE pin provided by an stm32 UART using
device tree flags.

Signed-off-by: Abram Early <abram.early@gmail.com>
2023-05-26 14:55:30 -04:00
Madhurima Paruchuri a19d905cc4 USB-C: genVIF: Cleanup and add support to pick static data from input
Removed few VIF properties which are being hardcoded
Updated the script to parse source VIF XML and add information to
the output
Added optional Kconfig option to configure custom source VIF XML path
Cleaned up the code

Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com>
2023-05-26 13:54:43 -04:00
Anisetti Avinash Krishna 5925a4670b drivers: dma: dma_intel_lpss: Added intel LPSS DMA interface
Added intel LPSS DMA interface using dw common to support
usage of internal DMA in LPSS UART, SPI and I2C for
transfer and receive operations.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-05-26 10:06:00 -04:00
Georgij Cernysiov b0acced124 drivers: phy: add adin2111
Adds PHY driver. Works via MDIO API and
exposed ADIN2111 MDIO Clause 45
functions.

Link status detection is triggered by
ADIN2111 driver within offloaded IRQ
handler.

Supports:
  - LED0, LED1 enable/disable
  - Fatal HW error detection
  - AN 2.4V tx mode enable/disable

The initialization order is important.
PHY 2 must be initialized after PHY1.
Therefore, it shall be defined after the 1st one
in the devicetree.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2023-05-26 09:50:09 -04:00
Georgij Cernysiov 943bc1cebc drivers: mdio: add adin2111
Adds MDIO driver. Works via exposed
ADIN2111 functions.

It is possible to access Clause 45 and 22 registers.

Due to MDIO API limitation Clause 45 access
is done using driver specific MDIO functions.

Provides API and functions for PHY driver.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2023-05-26 09:50:09 -04:00
Georgij Cernysiov 9a15d72b32 drivers: ethernet: add adin2111
Adds initial ADIN2111 2-Port 10BASE-T1L (SPE)
switch support. Works over SPI.

The driver creates 2 interfaces, 1 per port (PHY).
Configures multicast and broadcast filters.
The same unicast is applied to both ports.

Supports:
  - Link state detection
  - CRC enable/disable
  - Ports config set
  - Ports ETH stats

Provides functions for MDIO driver.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2023-05-26 09:50:09 -04:00
Tyler Ng f8d62756b0 dts: bindings: power: Add binding for the OpenTitan power manager
The OpenTitan power manager is responsible for changing the OpenTitan's
operation to and from low power state. This patch adds a simple binding
for the power manager's config registers.

This is part of the OpenTitan watchdog patch series. The power manager
HWIP block needs to be configured to enable the watchdog reset
functionality in the OpenTitan Verilator simulation.

Signed-off-by: Tyler Ng <tkng@rivosinc.com>
2023-05-26 09:45:25 -04:00
Tyler Ng 0959bbb21c dts: bindings: watchdog: Add OpenTitan AON Timer binding
The OpenTitan AON Timer is a hardware device that has two features:
the wakeup timer and watchdog timer. This commit series implements the
watchdog feature.

The spec can be found here:
https://opentitan.org/book/hw/ip/aon_timer/index.html

Signed-off-by: Tyler Ng <tkng@rivosinc.com>
2023-05-26 09:45:25 -04:00
BJ Chen 215f180296 ITE: drivers/usb/device: Add USB Device Controller Support
Add USB Device Driver (usb_dc) of ITE IT82xx2

TEST=west build -p always -b it82xx2_evb
1. zephyr/sample/subsys/usb/hid
2. zephyr/sample/subsys/usb/hid-mouse

Signed-off-by: BJ Chen <bj.chen@ite.com.tw>
2023-05-26 12:40:18 +02:00
Niek Ilmer b79d65aaca drivers: usb_device: Add USB driver for smartbond
This adds support for the USB interface for the
Renesas Smartbond DA1469x device family.

Co-authored-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>

Signed-off-by: Niek Ilmer <niek.ilmer.aj@renesas.com>
2023-05-26 10:19:15 +02:00
Fabio Baltieri 3431c1b59d drivers: sensors: add a sensor driver for TCS3400
Add a sensor driver for the TCS3400 color light-to-digital converter.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-05-25 13:30:45 +00:00
Sreeram Tatapudi d9e4f8fa1d drivers: watchdog: Driver for Infineon watchdog
Initial version of the driver for Infineon CAT1 devices

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-05-24 19:42:50 -04:00
Gerard Marull-Paretas 9494981181 drivers: regulator: npm6001: remove common device
Common device part is now handled by the nPM6001 MFD device driver.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-24 19:39:55 -04:00
Gerard Marull-Paretas 753bc2b785 drivers: mfd: npm6001: initial version
Add an API-less MFD driver for nPM6001. In this case, the MFD device
driver doesn't expose any API as plain I2C API is used within other
device drivers (regulator, GPIO, watchdog). This driver just initializes
some device properties.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-24 19:39:55 -04:00
Sreeram Tatapudi b219dcc046 dts: bindings: Update to indicate SCB support
include the infineon,cat1-scb.yaml for I2c and UART bindings to convey
that they are using SCB (Serial Control Block)

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-05-24 16:41:06 +02:00
Gerard Marull-Paretas e05df8faf1 drivers: regulator: adp5360: initial version
Add a new regulator driver for Analog Devices ADP5360. While it is a MFD
device, only support for BUCK/BUCKBOOST regulators is added in this
patch.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-24 11:54:30 +00:00
Maxmillion McLaughlin 477e7264ca drivers: sensor: mcp9600 add intial driver support
Implementation of MCP9600 i2c thermoouple amplifier - K, J, T, N, S, E, B
and R type T

Signed-off-by: Maxmillion McLaughlin <github@maxmclau.com>
2023-05-23 13:33:45 -05:00
Kenneth J. Miller e2c0e220fd drivers: sensor: Add STM32 VREF+ sensor
Add VREF+ sensor driver and DT node definition.

This driver allows determining the actual voltage applied to an SoC's
VREF+ pin, by comparing the VREFINT internal bandgap voltage reference
with its factory calibration data.

In packages where VREF+ is bonded to VDDA, this permits direct measurement
of VDDA voltage.

Signed-off-by: Kenneth J. Miller <ken@miller.ec>
2023-05-23 08:54:20 +02:00
Bansidhar Mangalwedhekar 017ff78466 boards: thingy53: Update DTS files to support expansion boards
- Add SPI4 pin definitions
- Add edge connector node for expansion board

Signed-off-by: Bansidhar Mangalwedhekar <bansidhar.mangalwedhekar@nordicsemi.no>
2023-05-23 08:54:05 +02:00
Siyuan Cheng cbdd2f38da drivers: spi: add Data Fusion Subsystem SPI driver
Introduce DesignWare ARC Data Fusion IP Subsystem(DFSS) SPI
driver for ARC boards, i.e. EMSDP, which uses DW SPI to controll
SPI-Flash and DFSS SPI to connect external devices. Both drivers
share most source code, but DFSS uses ARC auxiliary registers.
Move FIFO depth setting to device tree.

Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
2023-05-22 15:25:19 +02:00
Jerzy Kasenberg ce4018511f drivers: adc: add adc support for Smartbond devices
Renesas Renesas SmartBond(tm) have two ADC blocks:
GPADC and SDADC.
This change adds drivers for both.
Each ADC supports only one channel setup, drivers allow
to have multiply channels in sequence. Switching
between ADC sources in done in software.

GPADC has 10 bit resolution (accuracy can be increase
with oversampling). Values up to 3.6V can be measured
on selected pins. V30 and VBAT1 can also be measured.
SDADC has 14 bit resolution and can take measurements
from 8 pins (single of differential) and VBAT.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2023-05-22 12:41:42 +02:00
Savent Gate 82560017e3 dts: bindings: explains complementary pwms
Since Merge zephyrproject-rtos#57360, user can use ch<x> and ch<x>N
simultaneously, which is beneficial for STM32 users
working in motor control area.

Signed-off-by: Savent Gate <savent_gate@outlook.com>
2023-05-22 10:16:17 +02:00
Kamil Serwus 632704e04b sam: can: CAN driver for SAM0 socs
Driver was based on can_sam. SAMC21 has only 1 interrupt for one
can "output", so can interrupt has to executes two lines of
interrupts.
CAN is configured to use OSC48M clock via GLCK7. GLCK7 is set
by divider configured from dts.

Signed-off-by: Kamil Serwus <kserwus@gmail.com>
2023-05-22 08:03:58 +00:00
Robert Hancock f271a8220d dts: bindings: watchdog: Added Xilinx AXI Timebase WDT driver
Added device tree bindings for the Xilinx AXI Timebase WDT driver.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2023-05-19 16:14:24 +02:00
Mohamed ElShahawi 6a2bfa422c drivers: display: ili9342c display driver
This driver implement basic functions of ili9342c controller
which comes mostly with IPS displays.

Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
2023-05-19 15:24:56 +02:00
Armando Visconti e5b7799ce3 drivers/sensor: add support to LSM6DSV16X IMU sensor
The LSM6DSV16X is a system-in-package featuring a 3-axis digital
accelerometer and a 3-axis digital gyroscope for industrial and IoT
solutions. The LSM6DSV16X embeds advanced dedicated features such as
a finite state machine (FSM) for configurable motion tracking and a
machine learning core (MLC) for context awareness.

https://www.st.com/en/mems-and-sensors/lsm6dsv16x.html

This driver is based on stmemsc HAL i/f v2.02

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-05-18 11:43:36 -05:00
Fabio Baltieri e4780ef02d input: convert the Nuvoton npcx keyboard scan driver to input
Convert the NPCX keyboard scan driver to the input subsystem and add the
input to kscan compatibility driver to maintain functionality with the
current API.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-05-18 09:32:33 +02:00
Johann Fischer 1a30cd8f1c drivers: udc: add USB device controller driver skeleton
Add a USB device controller driver skeleton to use as a starting point
for implementing a specific driver.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-05-17 12:26:48 +02:00
Marcin Niestroj ee17b17c02 dts: bindings: input: fix comments in longpress example
Example configuration uses 'A' and 'X' key codes for longpress events.
Described behavior shows correct key codes (30 and 45), however comments
near those key codes were invalid for 'X' key. Fix that.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2023-05-17 09:24:38 +00:00
Sreeram Tatapudi ea591e2899 drivers: bluetooth: Add Infineon Bluetooth driver
Add initial version of the Bluetooth driver for
the cy8cproto_063_ble board

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-05-17 09:59:36 +03:00
Manimaran A f8c8ee65be drivers: pinctrl: Microchip XEC PINCTRL glitch fix
Glitches were observed if a GPIO pin was configured by
ROM to a non-default state and then Zephyr PINCTRL
reconfigured the pin. The fix involves using the correct
PINCTRL YAML output enable and state flags. Reading the
current spin state and reflecting into new pin configuration
if the pin is output and the drive low/high properties are
not present. We also take advantage of GPIO hardware reflecing
the alternate output value in the parallel output bit before
enabling parallel output mode. Interpret boolean flags with
both enable and disable as do not touch if neither flag is
present. We give precedence to enable over disable if both
flags mistakenly appear. Note, PINCTRL always clears the
GPIO control input pad disable bit.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-05-16 18:52:44 -04:00
Guillaume Gautier 8408de7077 dts: bindings: adc: add two compat for stm32 adc
Add two compat for STM32F4-like (F2, F4, F7 & L1) and STM32F1-like (F1
& F37x) ADCs.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-05-16 18:18:51 +02:00
Manimaran A 3cc7d37b70 drivers: crypto: MEC172x crypto driver supporting hash
Implement zephyr crypto driver hash API's using calls to
MEC172x ROM hash API's. Hardware supports zephyr driver
hash modes: SHA-224, 256, 384, and 512. Driver supports
synchronous (blocking) mode at this time.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-05-16 12:07:24 +02:00
Grant Ramsay 6b5a994068 drivers: ethernet: Add Jailhouse IVSHMEM Ethernet support
Allows Ethernet communication between "cells"
in the Jailhouse hypervisor.

The vring queue deviates from a standard virtqueue
so is implemented separately.

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-05-14 18:17:33 -04:00
Grant Ramsay 244f4f2034 drivers: pcie: Enable filtering PCIe devices by class-rev
This allows finding the correct PCIe device when multiple devices
have the same vendor-id/device-id but differ in the class-rev register

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-05-14 18:17:33 -04:00
Grant Ramsay 4ed404a27f drivers: virtualization: Add interface for ivshmem-v2
ivshmem-v2 is primarily used for IPC in the Jailhouse hypervisor

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-05-14 18:17:33 -04:00
Andreas Sandberg daf9030fa7 drivers: ssd16xx: Add support for the ssd1680
Add support for the SSD1680 EPD driver chip with support for up to
296x176 pixel displays.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
2023-05-11 14:40:50 -07:00
Andreas Sandberg 5ca33e20a8 drivers: ssd16xx: Add support for partial refresh profiles
Add support for partial refresh profiles. This makes it possible to
use partial refresh on generation 2 devices which are able to store
partial refresh LUTs in OTP.

Partial refresh is only enabled if a partial profile has been
provided. The display will use the full refresh profile if in this
case.

Devices that need custom LUTs and voltages can specify them separately
for the full and partial profiles. The controller will be reset when
changing profiles which means that profiles always override the
default reset values. This means that it is, for example, possible to
use default values and LUTs from OTP for a full refresh and a custom
profile for partial refreshes.

For example, to use a GoodDisplay GDEY027T91 with partial refresh
simply use the following device tree fragment:

display: ssd1680@0 {
	compatible = "solomon,ssd1680";

	spi-max-frequency = <4000000>;
	duplex = <SPI_HALF_DUPLEX>;
	reg = <0>;

	dc-gpios = <&arduino_header 15 GPIO_ACTIVE_LOW>;
	reset-gpios = <&arduino_header 14 GPIO_ACTIVE_LOW>;
	busy-gpios = <&arduino_header 13 GPIO_ACTIVE_HIGH>;

	/* Enable the built-in temperature sensor */
	tssv = <0x80>;

	width = <264>;
	height = <176>;

        /* Enable partial refresh using built-in LUT */
	partial {
	};
};

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
2023-05-11 14:40:50 -07:00
Andreas Sandberg 40437c675c drivers: ssd16xx: Update DT bindings for multiple profiles
Update the device tree bindings for the SSD16xx driver to make it
possible to specify multiple refresh profiles.

The only profile currently supported is the 'full' profile.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
2023-05-11 14:40:50 -07:00
Andreas Sandberg 5f781f4b11 drivers: ssd16xx: Use device-specific compatibles
The SSD16xx driver currently provides basic support for most chips in
the Solomon Systech SSD16xx range of e-paper drivers. We currently use
the SSD1608, SSD1673, SSD1675A, and SSD1681 in various boards
supported by Zephyr.

The main user-facing difference between the various SSD16xx chips is
the resolution they support (sources & gates), but there are other
differences as well. For example:

 * 8 or 16 bits used to represent x coordinates
 * 8 or 16 bits used to represent y coordinates
 * Differences in refresh configuration (SSD16XX_CMD_UPDATE_CTRL2)
 * Differences in LUT sizes

The driver currently assumes that the user specifies the number of
bits used to describe coordinates. However, as we add support for more
chips, more of the differences will become apparent and need
workaround.

Comparing data sheets from different chips in the SSD16xx range
suggests that there are (at least) two different generations
present. These differ in the size of the LUTs they expect and the way
they handle partial refresh. This impacts register layout where
SSD16XX_CMD_UPDATE_CTRL2 uses bit 3 selects "mode 2" whereas older
devices uses this for a mode referred to as "initial".

In order to add support for partial refresh in newer devices, we need
to be able to distinguish between the different generations of the
chip. It might be possible to add a DT property to indicate the
revision, but that seems like a bit of an anti-pattern and it would be
hard for users to specify the correct chip generation.

This change introduces chip-specific compatible strings instead of the
generic SSD16xx. There is unfortunately clear pattern that can be used
to distinguish different generations, so the full chip name must be
specified. A benefit of this is that we don't need to specify the
width of the fields describing coordinates in device trees.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
2023-05-11 14:40:50 -07:00
Benedikt Schmidt 53683f6195 dts: bindings: gpio: add binding for GPIOs in ADS114S08
Add binding for the GPIOs within the ADC ADS114S08.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-05-11 12:04:15 -04:00
Marcin Niestroj e4288acd27 dts: bindings: st,lsm6dsl: unify I2C and SPI bindings
Use the same wording in description for both I2C and SPI variants to
improve consistency.

Create st,lsm6dsl-common.yaml to include common binding properties from I2C
and SPI variants.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2023-05-11 07:46:24 -05:00
Georgij Cernysiov 6bb603f4ee drivers: flash: stm32 ospi add ssht property
Allows to enable Sample Shifting Half-Cycle.

It is recommended to be enabled for STR mode.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2023-05-11 07:36:11 -05:00
Guillaume Gautier dba62cd8e5 dts: bindings: adc: add dt properties for stm32 adc sampling time
Add properties for ADC sampling time for STM32.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-05-11 10:25:54 +00:00
Johann Fischer 411d20e0f8 dts: bindings: ethernet: add bindings for CDC ECM ethernet controller
Add bindings for CDC ECM virtual ethernet controller.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-05-11 11:26:54 +02:00
Daniel DeGrasse 7c228c9042 drivers: display: stm32_ltdc: Update LTDC driver to use LCDIF binding
Update LTDC driver to use LCDIF bindings, to simplify bindings
between LCD interface controller IP blocks.

Boards supporting the LTDC are also updated to use the properties as
declared by the new lcd controller binding

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-11 10:04:24 +02:00
Daniel DeGrasse 746758d1f6 drivers: display: update MCUX ELCDIF driver to use new lcdif binding
Update MCUX ELCDIF driver to use new LCDIF bindings. This
update also adds support for configuring the root clock of
the ELCDIF module based on the pixel-clock property to the
RT11xx SOC clock init, as this SOC series has this IP block

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-11 10:04:24 +02:00
Daniel DeGrasse a4afa7d164 drivers: update DCNANO LCDIF IP to use shared LCDIF binding
Update DCNANO LCDIF IP to use shared lcd interface binding. This
requires changes to the RT5xx SOC and RT595 EVK, as this SOC
uses the LCDIF IP, and configures the clock for it based off
the new pixel-clock property.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-11 10:04:24 +02:00
Daniel DeGrasse eed6e893cd dts: bindings: add common LCD interface binding
Add common LCD interface binding. This binding captures the
following properties, which are shared between multiple LCD interface
IP blocks:
- VSYNC/HSYNC pulse width
- Vertical/Horizontal front and back porch
- HSYNC,VSYNC,data enable, and pixel clock polarity flags
- pixel clock frequency

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-11 10:04:24 +02:00
Daniel DeGrasse 98408b1733 dts: mipi_dsi: introduce phy-clock property
Introduce phy-clock property, which is used by MIPI devices to determine
the target clock frequency for the MIPI PHY. This property can vary
depending on the attached display and target framerate.

Update the MIPI DSI MCUX driver to utilize this property to configure
the MIPI host, and update the RT500 clock initialization to configure
the MIPI root clock based on this property.

Remove dphy-clk-div property from the MIPI DSI 2L binding, as it
is redundant with this change.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-11 10:04:24 +02:00
Johann Fischer 104d6dd53b dts: bindings: add new bindings snps,dwc2 and st,stm32f4-fsotg
Although snps,designware-usb bindings already exist, this one is
prolematic. Compatible is too general and does not reflect
the actual controller IP. It has Zephyr-specific properties,
but has no zephyr prefix. It forces properties that are not
necessary for this controller. We start here with new bare minimum
properties for DesignWare OTG USB 2.0 controller.

The STM32F4 SoC family USB controllers, which are also implement
DesignWare OTG USB 2.0 IP, can also be used with existing drivers,
but require certain quirks. To use these we need special compatible.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-05-10 20:07:04 +09:00
Lucas Tamborrino a35dd4b926 drivers: dma: esp32s3: Add DMA support for esp32s3
Add GDMA support for esp32s3.
Remove suspend/resume since they are optional and do
the same as start/stop.
Fix possible null pointer derreference.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-05-10 10:15:05 +02:00
Sreeram Tatapudi 538b4075c8 dts: infineon: SCB declaration
Declare SCB nodes to be used as UART/SPI/I2C by the boards

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-05-10 16:49:59 +09:00
Shawn Nematbakhsh b4c4e56b65 dts: bindings: Add OpenTitan SPI binding
Add binding for OpenTitan SPI Host.

Signed-off-by: Shawn Nematbakhsh <shawn@rivosinc.com>
2023-05-10 16:48:46 +09:00
Mahesh Rao 23df7d2d86 dts: intel: Add dtsi entry for SiP SMC call.
Add SiP SVC driver dtsi entry for smc call in INTEL AGILEX SOC FPGA.

Signed-off-by: Mahesh Rao <mahesh.rao@intel.com>
2023-05-09 08:46:50 -04:00
Dean Sellers 308cec45b0 drivers: spi: esp32xx: Add chip select setup and hold time
Added device tree bindings and implementaion for setting the
spi controllers chip select setup and hold time settings.

Signed-off-by: Dean Sellers <dsellers@evos.com.au>
2023-05-09 14:31:15 +02:00
Ole Morten Haaland 1d8dc008e5 stm32f7, stm32h7: Avoid speculative reads from QSPI
As recommended in AN4760 the memory region where the QSPI flash can be
memory mapped should be configured to be Strongly ordered memory. This
works around an issue where a speculative read from the CPU may cause
later problems with using the QSPI bus.

This avoids #57466.

Signed-off-by: Ole Morten Haaland <omh@icsys.no>
2023-05-09 13:02:32 +02:00
Andrzej Głąbek 0b573a1f38 drivers: spi_flash_at45: Fix erasing of first two sectors
Most available AT45 flash chips have their first two sectors shorter
than the consecutive ones. Usually, the first sector is marked as 0a
and has its size equal to eight pages (one block) and the second one
(usually 0b) is the complement to the size of a regular sector.
This commits modifies the driver so that erasing of these first two
sectors is performed correctly. This modified behavior is configurable
with a new DT property so that it is still possible to also use legacy
AT45 chips that do not feature such sector split. Such legacy chips
usually also do not support the chip erase and sector erase commands,
so two more DT properties are introduced to cover that.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-05-09 12:22:15 +02:00
Armando Visconti 7ea422af84 drivers/sensor: add support to LSM6DSO16IS IMU sensor
The LSM6DSO16IS is a system-in-package featuring a 3-axis digital
accelerometer and a 3-axis digital gyroscope for industrial and IoT
solutions. The LSM6DSO16IS embeds a new ST category of processing,
ISPU (intelligent sensor processing unit) to support real-time applications
that rely on sensor data. The ISPU is an ultra-low-power, high-performance
programmable core which can execute signal processing and AI algorithms
in the edge.

https://www.st.com/en/mems-and-sensors/lsm6dso16is.html

This driver is based on stmemsc HAL i/f v2.02

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-05-09 16:23:15 +09:00
Antonio Tessarolo 4598e6bf0a drivers/adc: imx6sx ADC support.
This commit adds support for adc_vf610 ADC.

Signed-off-by: Antonio Tessarolo <anthonytexdev@gmail.com>
2023-05-08 16:42:40 +02:00
Sreeram Tatapudi 98858f1e6a drivers: flash: Add Infineon CAT1 Flash driver
- Added initial version of Infineon CAT1 Flash driver
- Added binding file for infineon,cat1-flash-controller.yaml
- Added overlays for subsys/nvs and drivers/flash_shell
to support cy8cproto_063_ble, cy8cproto_062_4343w boards
- Defined erase-block-size in PSoC6 MPN dtsi.

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-05-08 11:16:09 +02:00
Keith Short 00733f346b bc12: Add charging mode support
Add chargingg mode support to the BC1.2 API and the PI3USB9201 driver.

Signed-off-by: Keith Short <keithshort@google.com>
2023-05-08 09:57:56 +02:00
Bjarki Arge Andreasen d1bcc90160 drivers/sensor/bmi323: Add BMI323 driver support
This PR adds a driver for the BMI323, which implements
the following features:

* Enable and disable accelerometer and gyroscope respectively
* Set full scale for accelerometer and gyroscope respectively
* Set data rate for accelerometer and gyroscope respectively
* Get samples (x,y,z) from accelerometer and gyroscope respectively
* Get die temperature
* Set trigger to accelerometer data ready, and accelerometer any motion.

The driver implements device and device runtime power management. If
runtime management is used, it is initialized into the suspended state,
which soft-resets the device to achieve the lowest possible power
consumption, otherwise it is resumed when initialized. When resumed,
the bus is initialized, the feature engine is enabled, and INT1 is
initialized.

The driver only implements the SPI bus at this time. The driver is
prepared to be expanded with I2C support in the future.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-05-08 09:57:40 +02:00
TOKITA Hiroshi 5e2cbd5184 drivers: ethernet: enc28j60: Add full-duplex property for devicetree
Add the `full-duplex` property for the `microchip,enc28j60` node.
Replace ETH_ENC28J60_0_FULL_DUPLEX Kconfig option with this property.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-05-05 16:17:29 +02:00
Manimaran A 519477fbf1 drivers: i2c: microchip: I2C reset fix
Updated the code to to invoke reset using PCR block
z_mchp_xec_pcr_periph_reset()  instead of resetting
using I2C Configuration register

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-05-05 16:16:01 +02:00
Laczen JMS d496a17bb6 flash_simulator: add ability to use memory region
Add the ability for the flash simulator to store its contents in a
memory region.

This allows filesystems on the flash simulator to survive a reboot.
And allows subsystems (e.g. coredump) to store their info on ram while
using the (existing) flash partition backend.

Add a example (for nucleo_f411re) that shows how to configure the flash
simulator for hardware (cfg discussion #54166).

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2023-05-04 20:49:57 +02:00
Gerard Marull-Paretas 84fd4e671f drivers: sensor: ntc_thermistor: add support for generic NTC
Add support for a generic NTC, `ntc-thermistor-generic`. In this case,
the compensation table is provided via devicetree. Note that DT property
is prefixed with `zephyr,`, because while hardware related, it is linked
to a particular software implementation.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-04 20:49:48 +02:00
Gerard Marull-Paretas 44f48f6da7 drivers: sensor: zephyr_thermistor: refactor driver
Refactor driver to align a bit more with its Linux counterpart, ie,
ntc_thermistor. This driver did quite a few _unconventional_ things,
like using "zephyr," compatibles, a dedicated node for pre-computed
compensation table (referenced by the actual pseudo-device node), etc.
The comparison helper function should likely be simplified as well (to
avoid the need for custom wrapper for bsearch), but this can be done
later.

In this refactor, each thermistor gets a compatible, e.g. "epcos,xxxx".
Compatibles are known by the driver, so are compensation tables. This
simplifies devicetree files. There's no need to bother about
compensation tables in **every** board file if Zephyr supports a certain
NTC model.

In general we should respect Linux bindings, which in the end influence
how drivers are implemented. In this case, this principle resulted in
simplified, easier to use code.

For future developers, this is how support for a new NTC can be added:

1. Add to the end of the driver:

```c
 #undef DT_DRV_COMPAT
 #define DT_DRV_COMPAT vnd_model

 static __unused const struct ntc_compensation comp_vnd_model[] = {
     { x, y },
     ...,
 };

 #define DT_INST_FOREACH_STATUS_OKAY_VARGS(NTC_THERMISTOR_DEV_INIT,
                                           DT_DRV_COMPAT, comp_vnd_model)
```
3. In driver's Kconfig make sure it depends on
   DT_HAS_$DT_DRV_COMPAT$_ENABLED

Note: $X$ means _value_ of X.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-04 20:49:48 +02:00
Gerard Marull-Paretas c60e4ec989 drivers: sensor: zephyr_thermistor: align connection type with Linux
It looks like the Zephyr thermistor driver bindings were half-copied
from Linux ntc-thermistor. Zephyr principle is to maintain compatibility
with Linux, when possible, so there's no reason to deviate here. Convert
the connection type from a custom enum to a boolean, as Linux does.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-04 20:49:48 +02:00
Benedikt Schmidt 6c191c2b47 dts: bindings: adc: add binding for ADS114S08
Add the binding for the driver of the ADC ADS114S08.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-05-04 10:47:56 +02:00
Filip Kokosinski a30862455e treewide: rename Microsemi to Microchip
Do a treewide Microsemi to Microchip rename and update obsolete links in
the board docs.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-05-04 10:47:07 +02:00
Andy Sinclair d700ab5a88 drivers: sensor: npm1300_charger: NPM1300 charger driver
Initial sensor driver for NPM1300 PMIC charger.
Includes basic configuration of charger voltage and current.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-05-03 15:04:18 +02:00
Gerard Marull-Paretas ecb591161a dts: bindings: add st-morpho-header
All Nucleo boards provide the ST Morpho connector/header, which exposes
all pins of the MCU. It is tipically used in ST shields, so provide a
nexus node to allow creating generic shields.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-05-02 22:43:43 +09:00
Andriy Gelman 4f2b4097af dts: bindings: gpio: gpio-controller: Fix typo
ngpios should be set to max slot number + 1.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-05-02 12:34:55 +02:00
Cong Nguyen Huu cad17ff933 drivers: can: support NXP S32 CANEXCEL
This patch introduces support for NXP S32 CANEXCEL (CANXL) peripheral.

CAN protocol supporting:
- CAN classic
- CAN FD

Remote transmission request is not supported as this feature is not
available on NXP S32 CANXL HAL.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2023-04-29 12:23:40 +02:00
Bill Waters 3e02d48e4e driver: adc: infineon: Adding ADC driver
- This includes the driver, test app, and sample app
- Only the boards\arm\cy8cproto_062_4343w board is supported for now

Signed-off-by: Bill Waters <bill.waters@infineon.com>
2023-04-27 10:16:23 -07:00
Anisetti Avinash Krishna bfeb5043ac drivers: rtc: rtc_mc146818: Added RTC driver for Motorola MC146818B
Added RTC driver that supports Motorola MC146818B
Enabled RTC set/get time and alarm, alarm callback
and update callback.

Counter and RTC uses same hardware in case of
Motorola MC146818, so they can't be used at a time.

Updated stand-alone mc146818 counter dts instances
to support rtc and counter with same compatible
string of "motorola,mc146818" on ia32, atom,
apollo_lake, elhart_lake and raptor_lake platforms.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-04-27 14:15:22 +02:00
Henrik Brix Andersen 51ba050b4d dts: bindings: add binding for the NXP PCF8523 RTC
Add a device tree binding for the NXP PCF8523 Real-Time Clock (RTC)
and calendar.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2023-04-27 09:51:42 +02:00
Maximilian Deubel 3746074073 drivers: sensor: Add driver for TI INA3221
This patch adds support for the TI INA3221 current monitor.
This is the datasheet used for reference:
https://www.ti.com/lit/gpn/ina3221

Since this device has three channels, there is a custom attribute to
select which channel is to be used when getting a sample.
Measurements are done on all enabled channels.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2023-04-26 20:08:04 +02:00
Łukasz Hejnak (LeHack) 1929eb3af7 drivers: sdhc: add support for using CPOL/CPHA SPI clock modes
Make it possible to use CPOL/CPHA SPI clock modes with the SDHC driver.
Some cards require the clock to switch to low when not active.

Signed-off-by: Łukasz Hejnak (LeHack) <lehack-ghub@lehack.pl>
2023-04-26 20:07:53 +02:00
Guillaume Gautier e636d88cd2 dts: bindings: adc: add new dts bindings for stm32 adc resolution
Add a binding for STM32 ADC to specify the resolutions and all associated
register information (through a STM32_ADC_RES macro).

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-04-26 12:53:03 +02:00
Andreas Kilian a665fc0829 drivers: sensor: Vishay VEML7700 ambient light sensor
Added support for Vishay VEML7700 ambient light sensor
See https://www.vishay.com/doc?84286

Signed-off-by: Andreas Kilian <andreas_kilian@gmx.net>
2023-04-26 12:52:46 +02:00
Declan Snyder 9921c59f40 drivers: lpadc: Make DT props match RM
- Remove build asserts in favor of DT enums
- Remove power level property since it is unused by SDK
- Correct voltage ref value in DT to correspond to
  chip specific values documented in reference manuals
  instead of corresponding to SDK enum names.
- Fix SOC devicetrees affected by these changes.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-04-25 19:59:23 +02:00
Francois Ramu a2ab04b679 dts: bindings: lptim stm32 has a prescaler entry for the lptim clock
This is a new parameter to divide the LPTIM input clock
by a prescaler, changing the max reachable timeout of the LP timer.
It will divide the LPTIM input clock by 1 (reset value) up to 128.
The lptim configuration register is written with a 3bit value.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-04-25 10:37:13 -07:00
Yonatan Schachter b5a7949e8a drivers: serial: Added rpi_pico driver over PIO
Implements a UART driver using PIO. Both PIOs are supported.
Only polling API is supported. Only 8N1 mode is supported.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2023-04-25 13:12:02 +02:00
Yonatan Schachter 5abb1b1ec0 drivers: misc: Add driver for RaspberryPi Pico PIO
Added a generic driver for RaspberryPi Pico PIO.
This driver is an intermediate driver for abstracting the PIO
device driver from physical pin configuration.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
Signed-off-by: Ionut Catalin Pavel <iocapa@iocapa.com>
2023-04-25 13:12:02 +02:00
Andriy Gelman 8494b6413a drivers: spi: xmc4xxx: Add DMA support
Adds DMA support for synchronous SPI transfers.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-04-25 12:23:26 +02:00
Gerard Marull-Paretas 8605a8700c tests: lib: devicetree: test DT_ANY_INST_HAS_PROP_STATUS_OKAY
Add test coverage for the recently introduced
DT_ANY_INST_HAS_PROP_STATUS_OKAY.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-24 09:21:36 -05:00
Kenneth J. Miller e78e8d7c3f drivers: lora: sx126x: Support fine-grained STM32WL PA config
Add STM32WL-specific sx126x_set_tx_params function based on the
STM32CubeWL modifications to LoRaMac-node.

Add the "power-amplifier-output" DT property to
"st,stm32wl-subghz-radio" for selecting between the RFO_LP and RFO_HP
output configurations provided by the above mentioned function.

Add the "rfo-lp-max-power" and "rfo-hp-max-power" DT properties for
defining the maximum design power of the respective outputs' matching
networks.

closes #48511

Signed-off-by: Kenneth J. Miller <ken@miller.ec>
2023-04-24 13:33:25 +02:00
Jamie McCrae 64f4404481 retention: Add retention system
Adds a retention system which builds on top of retained_mem
drivers to allow partitioning of areas and data integrity with
magic header prefixes and checksum of stored data.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-04-24 13:27:53 +02:00
Jamie McCrae 7ad855c378 dts: bindings: retained_mem: Add address and size cell values
Adds address and size cell constant values of 1 each.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-04-24 13:27:53 +02:00
Mateusz Sierszulski 0417d38d4d drivers/adc: add Gecko IADC driver
This commit adds the Gecko IADC driver and support for it to the
efr32bg_sltb010a board.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
Signed-off-by: Roman Dobrodii <rdobrodii@antmicro.com>
2023-04-21 16:24:39 +02:00
Roman Dobrodii cb14d8b099 soc/arm/silabs_exx32: fix PM implementation - wake up using BURTC timer
- Add Gecko BURTC sys_clock driver to handle wake up from EM2,3 states
- Remove custom PM policy and dependency on HAL sl_power_manager service
- EM1 supported in all configurations
- EM2,3 supported only if SysTick is replaced by BURTC

Signed-off-by: Roman Dobrodii <rdobrodii@antmicro.com>
2023-04-21 16:24:05 +02:00
Matthias Hauser 73ed8ccb5f drivers: sensor: Added driver for the Würth Elektronik WSEN-PDUS sensor
Added driver for the Würth Elektronik WSEN-PDUS sensor

Signed-off-by: Matthias Hauser <Matthias.Hauser@we-online.de>
2023-04-21 07:16:15 -05:00
Bjarki Arge Andreasen 9eae6fda99 dts/bindings/rtc/rtc-device.yaml: alarms-count optional
This commit makes the alarms-count dts property of the
rtc-device.yaml optional, setting the default to 0.

This simplifies the dts rtc dts node by not requiring
the property to be set to 0 if it is not supported.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-04-20 11:43:35 +02:00
Sreeram Tatapudi 185aa1c2c5 drivers: i2c: Add Infineon CAT1 i2c driver
- Add initial version of Infineon CAT1 i2c driver.
 - Add initial version of binding file for Infineon
   CAT1 I2C driver

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-04-20 10:44:18 +02:00
Ben Lauret 9cdc5d38b2 drivers: spi: Add driver for smartbond
This adds the SPI driver for the Renesas SmartBond(tm) DA1469x MCU family.
The driver only supports controller mode. All four SPI modes are supported.
Note that the lowest supported speed is 2285714Hz.
Requesting speeds higher than 16MHz, will result in a 16MHz SCLK.

Co-authored-by: Stan Geitel <stan@geitel.nl>

Signed-off-by: Ben Lauret <ben.lauret.wm@renesas.com>
2023-04-20 10:32:40 +02:00
Ben Lauret e12cf90a89 dts: binding: Input and output enable bindings
Added bindings for input and output enable

Signed-off-by: Ben Lauret <ben.lauret.wm@renesas.com>
2023-04-20 10:32:40 +02:00
Benjamin Björnsson c506609b34 dts: bindings: move adc devicetree binding to top level
Move the devicetree bindings for Analog-to-Digital Converters (ADCs)
from dts/bindings/iio/adc to dts/bindings/adc as Zephyr does not have
an IIO layer.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-19 10:14:16 -05:00
Tim Lin 491e3e6477 ITE: drivers/gpio: Add gpio_ite_it8xxx2_v2 driver
This driver is made for it82xx2 series.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-04-19 03:48:38 -04:00
Ruibin Chang b9a7340ded ITE drivers/interrupt_controller: add intc_ite_it8xxx2_v2 driver
This driver is made for it82xx2 series.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2023-04-19 03:48:38 -04:00
Hiroki Tada 60f006442e dts: bindings: vendor-prefixes: Add Hamamatsu Photonics K.K. prefix
Add Hamamatsu Photonics K.K. prefix to vendor-prefixes.txt

Signed-off-by: Hiroki Tada <tada.hiroki@fujitsu.com>
2023-04-18 17:07:48 -05:00
Hiroki Tada 943158326c drivers: sensor: Support Hamamatsu Photonics S11059 Color Sensor
DataSheet:
https://datasheetspdf.com/pdf/1323325/Hamamatsu/S11059-02DT/1

Testing Environment:
esp32

Signed-off-by: Hiroki Tada <tada.hiroki@fujitsu.com>
2023-04-18 17:07:48 -05:00
Daniel DeGrasse 36cc74e7e8 drivers: gpio: gpio_mcux_lpc: add support for module interrupts
On iMX.RT devices, the number of GPIO pins exceeds the maximum of
64 that the PINT interrupt controller can support. Therefore, two
interrupt lines are now shared between the GPIO modules.

This patch allows the user to set the interrupt source for a GPIO
peripheral. For most LPC devices, this will always be the PINT. For some
RT devices, the PINT cannot use pins on GPIO modules other than 0 and 1
as input, and thus the INTA and INTB sources should be used.

Since Zephyr does not support sharing these interrupt between all GPIO
controllers, the user must configure a subset of all GPIO controllers to
use the shared module interrupts. An example of how to do so is provided
for the RT595 EVK.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-04-18 16:14:57 -05:00
Daniel DeGrasse 6f938f347b drivers: interrupt_controller: introduce PINT driver
Introduce PINT driver, for NXP pin interrupt and pattern match engine.
The driver currently supports only the pin interrupt feature of the
PINT.

Add DTS entires for the PINT on LPC and RT devices that support this
peripheral, and remove the interrupt defintions that are PINT specific
from the GPIO module on these devices.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-04-18 16:14:57 -05:00
Jaroslaw Stelter b75b4153d6 intel_adsp: ace20_lnl: Add I2S clock source configuration
Add I2CLCTL_MLCS programming in SSP driver.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-04-18 10:48:18 -04:00
Jaroslaw Stelter 66c6b49f38 intel_adsp: ace20_lnl: Add I2S clock source dts
The I2CLCTL_MLCS setting was recently added to MTL
platform. LNL has these registers in separate space, therefore
new field is added to intel,ssp-dai.yaml and appropraite definitions
to LNL device tree.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-04-18 10:48:18 -04:00
Jaroslaw Stelter 99d5d9aaa8 drivers: ssp: Repleace shim2 with hdamlssp
Repleace usage of shim2 device tree field with hdamlssp.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-18 10:48:18 -04:00
Jaroslaw Stelter 5bffe933e6 dts: ssp: Add HDA SSP capabilities.
In current implementation the HDAMLI2SL register is represented by
shim2 field in common SSP device tree file. This could be misleading
since the filed is is different location to I2S IP.

Adding separate device for this register following DMIC case.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-18 10:48:18 -04:00
Hein Wessels 4a13d89c75 dts: bindings: serial: altera uart: remove redundent properties
A recent change added the stop-bits and data-bits to the base
uart-controller binding, meaning it's no longer required to
be added in the Altera specific binding.

This requires no further changes because its only use is in
uart_altera.c where only the index of the enum is used,
which remains the same between the new implementation and
how it was previously implemented in the altera specific binding.

Relevant commit: 0234f12

Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
2023-04-18 09:31:15 +02:00
Andriy Gelman b8244fdabd drivers: sensor: Add adt7310 temperature sensor
Adds adt7310 temperature controlled via spi.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-04-17 10:06:04 -05:00
Matthias Hauser 6789c0d400 drivers: sensor: Added driver for the Würth Elektronik WSEN-PADS sensor
Added driver for the absolute pressure sensor WSEN-PADS

Signed-off-by: Matthias Hauser <Matthias.Hauser@we-online.de>
2023-04-17 11:49:35 +02:00
Robert Hancock 0526fe0575 dts: bindings: i2c: Added Xilinx I2C driver
Added device tree bindings for the Xilinx I2C driver (both 2.00a and 2.1
IP core revisions).

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2023-04-17 11:39:21 +02:00
Amit Kucheria 15191192c9 input: Add header file to the longpress example
Add the header file required for the example to work. Users get the
following error due to unresolved INPUT_BTN_* values otherwise:

parse error: expected number or parenthesized expression

Signed-off-by: Amit Kucheria <amitk@kernel.org>
Signed-off-by: Amit Kucheria <amit@mbedrock.com>
2023-04-17 10:16:07 +02:00
Andy Sinclair 0d68c86c95 drivers: gpio: npm1300: Initial driver for nPM1300 PMIC
Initial GPIO driver for NPM1300 PMIC

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-04-17 10:14:40 +02:00
Andy Sinclair d1e201ccf6 drivers: regulator: npm1300: Initial driver for nPM1300 PMIC
Initial regulator driver for Nordic NPM1300 PMIC.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-04-17 10:14:40 +02:00
Hein Wessels 75c489ae9d dts: bindings: serial: infineon cat1-uart: remove properties
These bindings are removed because they are now handled in the
included base uart-controller.yml.

Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
2023-04-14 08:49:04 -05:00
Jeroen van Dooren 0234f1295a drivers: serial: binding: add devicetree init support
Extend the binding to allow compiletime configuration of
of the stopbits and databits.

Signed-off-by: Jeroen van Dooren <jeroen.van.dooren@nobleo.nl>
2023-04-14 08:49:04 -05:00
Marcus Folkesson e9ee6388f6 dts: bindings: dac: add bindings for ltc1660/ltc1665
Add bindings for LTC1665/LTC1660, which is a 8/10-bit
Digital-to-Analog Converter with eight individual channels.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
2023-04-14 08:21:23 -04:00
Erwan Gouriou f48dfbf0c6 dts: bindings: entropy: stm32: Add description to clock property
This addition should help users to better understand potential issues
with domain clock configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2023-04-14 14:04:26 +02:00
Jaroslaw Stelter 3c54d7efc4 intel_adsp: ace20_lnl: dmic: Add new dmic shims.
In ACE 2.0 platform (LNL) dmic got two new shim register ranges.
DMIC driver need to program them to configure the interface.
This patch adds new shims to device tree.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-04-13 20:51:10 -04:00
Guillaume Gautier 4ec1eed4e7 dts: bindings: sensor: add property for stm32f0x0 temp sensor
The temperature sensor of the STM32F0x0 is similar to C0 (with one value
for calibration) but uses a negative coefficient, so we add it to the
bindings, just like in st,stm32-temp.yaml

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-04-13 09:11:45 -05:00
Georgij Cernysiov 44e4b077ad drivers: flash: stm32 ospi add dlyb bypass prop
Allows to bypass delay block (DLYB).

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2023-04-13 12:15:13 +02:00
Henrik Brix Andersen 764d00ce18 dts: bindings: add binding for NXP FlexCAN CANFD variant
Add a devicetree binding for the CAN-FD capable variant of the NXP FlexCAN
controller. Add example devicetree snippets to both NXP FlexCAN and NXP
FlexCAN-FD binding documentation to limit confusion.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-04-13 10:00:03 +02:00
Henrik Brix Andersen a082565dca dts: bindings: can: rename nxp,kinetis-flexcan binding to nxp,flexcan
Rename the nxp,kinetis-flexcan devicetree compatible to nxp,flexcan as it
is not specific to the NXP Kinetis series.

This is preparation for adding a nxp,flexcan-fd binding.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-04-13 10:00:03 +02:00
Benjamin Björnsson 818738b366 drivers: sensor: stm32_temp: Add support for STM32C0-series
Add new compatible to separate production calibrated sensors
with single and dual calibration temperatures. Also update
stm32_temp driver to support single calibration sensors.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-13 09:59:52 +02:00
Maxmillion McLaughlin 840c976760 drivers: disk: sdmmc_stm32 support for clock divisor
Adds support for a devicetree property that controls the ClockDiv
value provided to the SDIO during init.

Signed-off-by: Maxmillion McLaughlin <github@maxmclau.com>
2023-04-12 17:44:48 +02:00
Franciszek Zdobylak d9adf2249d dts: riscv: sifive: fu740: add memory controller
Add memory controller to devicetree for FU740 chip.

Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
2023-04-12 13:05:55 +02:00
Scott Worley 5c00a83b99 drivers: spi: Microchip XEC QMSPI-LDMA fix spi buffer usage
Zephyr SPI driver model for full-duplex operation assumes
data will be transmitted and received during each clock period.
The QMSPI driver for the XEC family also supported dual and
quad I/O use cases which are inherently half-duplex. To
support dual/quad the driver incorrectly processed spi buffers
as all transmit buffers first then all receive buffers. This
worked if only the SPI driver was used. It did not work with
the Zephyr flash SPI NOR driver which assumes SPI drivers
follow the SPI driver model. This commit implements a QMSPI
driver that follows the Zephyr SPI driver model resulting in
a slightly smaller driver. Dual/quad SPI transactions are
supported if the experimental SPI extended mode Zephyr
configuration flag is enabled. We also remove the QMSPI full duplex
driver added previously to support the flash SPI NOR driver.
Added board to spi loop-back test and spi_flash sample.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2023-04-11 16:57:56 +02:00
Huifeng Zhang 28ff3e1d8c drivers: eth_smsc91x: Add driver for SMSC91C111 aka LAN91C111 chip
Arm fvp_baser_aemv8r and fvp_base_revc_2xaemv8a boards are using
SMSC91C111 as their ethernet adapters.

Portions of the codes are based on FreeBSD code from its
'src/sys/dev/smc/if_smc.c' and 'src/sys/dev/smc/if_smcreg.h'.

This driver has two parts, one is the ethernet controller driver, which
is MAC layer driver. The other is the MDIO driver, which is the PHY
layer driver. Both of them are in the same source file due to that they
need to share the same reading and writing register functions and
the smsc object.

The mdio driver is needed by the existing 'phy_mii' driver, which is
a driver for the generic MII-compliant PHY.

This driver was developed under the fvp_base_revc_2xaemv8a target and
has been tested on the fvp_baser_aemv8r target.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-04-11 11:27:05 +02:00
Weiwei Guo 08ece57b9e sensor: bmm150: Add I2C-base or SPI-base interface in build time
move DT_DRV_COMPAT to bmm150.h. so that can be decide which interface
to use.

define struct bmm150_bus_io interface for bmm150_i2c.c and bmm150_spi.c
in bmm150.h.

redefined bus operation interface in bmm150.c, this allow the driver
to decide which interface to use during construction.

Signed-off-by: Weiwei Guo <guoweiwei@syriusrobotics.com>
2023-04-11 11:26:47 +02:00
Fabio Baltieri b76ac9a851 input: convert the kscan_sdl driver from kscan to input
Convert the SDL driver to use the input subsystem. This is specifically
meant to emulate touchscreen drivers, so it's setup to send triplet of
x, y, touch for touch-on events and just touch off on touch off events.

Renamed the driver to input-sdl-touch since now we can also develop an
sdl driver for simulating key events.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-04-11 09:34:23 +02:00
Al Semjonovs 5d4352f322 sensor: Generic driver for NTC Thermistor
Driver for NTC Thermistors attached to ADC

Signed-off-by: Al Semjonovs <asemjonovs@google.com>
2023-04-07 16:23:17 -05:00
Al Semjonovs 9fa35bc9a0 adc: Add TI ADS7052 SPI driver
Add driver for TI ADS7052.

Signed-off-by: Al Semjonovs <asemjonovs@google.com>
2023-04-07 16:23:17 -05:00
Benjamin Lindqvist 7d23e03566 drivers: sensor: bmi270: Add support for motion, DRDY triggers
This commit adds support for ANY_MOTION and DATA_READY interrupts for
the BMI270. To implement this, a different config blob than the
"max_fifo" blob has to be used.

Signed-off-by: Benjamin Lindqvist <benjamin@eub.se>
2023-04-07 18:58:16 +02:00
Ben Lauret 6cf3fe1d3f drivers: i2c: Add driver for smartbond DA1469x device family
This adds the i2c driver for the Renesas SmartBond(tm) MCU family.
It supports blocking transfers and callback transfers.
Currently only supports controller mode.

Co-authored-by: Stan Geitel <stan@geitel.nl>

Signed-off-by: Ben Lauret <ben.lauret.wm@renesas.com>
2023-04-07 10:09:37 -05:00
Nick Ward 162c47ffc4 drivers: sensor: add mcp970x thermistor IC
Add driver for:
  MCP9700/9700A and MCP9701/9701A
  Low-Power Linear Active Thermistor ICs

http://ww1.microchip.com/downloads/en/devicedoc/20001942g.pdf

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-04-07 13:30:59 +02:00
Tomasz Bursztyka ad4458e3b1 dts: Add bindings for NVMe bus controllers
Under disk bindings. NVMe is a purely PCIe based technology, thus the
relevant includes.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2023-04-07 13:28:47 +02:00
Caspar Friedrich 691228ce01 drivers: ds2482-800: Add driver
This adds a driver for the DS2482-800 1-wire multi channel bus driver.
The driver uses a split architecture in order to share a common lock
among all configured channels of a single IC.

Signed-off-by: Caspar Friedrich <c.s.w.friedrich@gmail.com>
2023-04-07 13:11:54 +02:00
Sung-Chi Li d455b6dee0 tests: drivers: gpio: Add test for GPIO_ENABLE_DISABLE_INTERRUPT
Add test for the experimental feature GPIO_ENABLE_DISABLE_INTERRUPT,
which covers APIs gpio_pin_interrupt_enable() and
gpio_pin_interrupt_disable().

Signed-off-by: Sung-Chi Li <lschyi@google.com>
2023-04-06 11:44:07 -04:00
Rico Ganahl bd5960da1d drivers: display: ltdc: add window property
Allow to use only a part of the display.

Signed-off-by: Rico Ganahl <rico.ganahl@bytesatwork.ch>
2023-04-06 11:51:06 +02:00
Rico Ganahl 4695e141ef boards: stm32h747i_disco: introduce nexus node
Define nexus node for DSI LCD connector.

Signed-off-by: Rico Ganahl <rico.ganahl@bytesatwork.ch>
2023-04-06 11:51:06 +02:00
Rico Ganahl 84fc689d48 drivers: display: introduce otm8009a
Initial support for otm8009a display.

Signed-off-by: Rico Ganahl <rico.ganahl@bytesatwork.ch>
2023-04-06 11:51:06 +02:00
Rico Ganahl 06c58fdcc2 drivers: mipi_dsi: Introduce STM32H7 DSI host driver
Initial STM32 MIPI DSI host driver.

Signed-off-by: Rico Ganahl <rico.ganahl@bytesatwork.ch>
2023-04-06 11:51:06 +02:00
Rico Ganahl a9c59d417e drivers: display: stm32_ltdc: pinctrl optional
Use the LTDC in combination with the DSI HOST makes the pinctrl obsolete.
DSI HOST has dedicated pins.

Signed-off-by: Rico Ganahl <rico.ganahl@bytesatwork.ch>
2023-04-06 11:51:06 +02:00
Fabio Baltieri 091f70b367 input: ft5336: move the ft5336 binding under input
The driver has been recently moved under the input subsystem but the
corresponding driver was left over. Move it from kscan to input.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-04-06 11:41:47 +02:00
Lucas Tamborrino 2c1da15e35 dts: esp32s3: add PCNT device
Add PCNT node device to esp32s3
Update PCNT binding to include esp32s3

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-04-05 11:23:48 -05:00
Jerzy Kasenberg 884d7ea706 drivers: clock_control: smartbond: initial support
This commit adds basic support for the clock controller used in
SmartBond MCUs.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2023-04-05 15:09:04 +02:00
Francois Ramu c6e20d2c4b dts: bindings: stm32 qspi description in case of dmamux
Give precision to the description of the dma phandle in the
quadspi node.
When a DMAMUX is present and enabled, the channel is the dma one
(not dmamux channel) and the request is given by the DMAMUX.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-04-04 10:08:07 -05:00
Bjarki Arge Andreasen ae36da516a boards/posix/native_posix: Add emulated RTC device driver
The emulated RTC device driver is used to emulate a real
RTC device. Note that it is not a replacement for the
native_rtc module, which is used to control simulated time,
get time from the host system, etc.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-04-04 17:03:38 +02:00
Bjarki Arge Andreasen ac697d153d tests/drivers/rtc: Add unit tests for RTC devices
This test suite adds tests for the following:

- Setting and getting time
- Validating time is incrementing correctly
- Validating behavior of alarms with callback disabled
- Validating behavior of alarms with callback enabled
- Validating update callback

The test suite uses the devicetree  alias rtc to find
the device to test.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-04-04 17:03:38 +02:00
Jeppe Odgaard 1ef0649825 drivers: sensor: mcux qdec add filter parameters
Add optional filter value properties. The filter is disabled by default
but can be enabled by setting the filter-sample-period > 0 in the dts
file. A latency is introduced if the filter is enabled. The latency can
be printed by setting sensor log level to debug.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-04-04 08:54:43 +00:00
Pieter De Gendt cd6fe580b0 drivers: gpio: Add NXP SC18IM704 GPIO support
Implement external GPIO controller driver with NXP's SC18IM704 device.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-04-03 20:02:51 +02:00
Pieter De Gendt 9b36e723f4 drivers: i2c: Add NXP SC18IM704 I2C support
Implement external I2C controller driver with NXP's SC18IM704 device.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-04-03 20:02:51 +02:00
Fin Maaß cabc30c725 drivers: sensors: Implement MAX31865 sensor
This commit implements the temperature sensor interface for
the Maxim MAX31865 SPI Temperature Sensor.

Signed-off-by: Fin Maaß <fin.maass@haw-hamburg.de>
Co-authored-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2023-04-03 12:32:50 -04:00
Jaroslaw Stelter b8fb89dc27 intel_adsp: ace20_lnl: ssp: Add new ssp shims
In ACE 2.0 platform (LNL) ssp got new shim registers.
SSP driver need to program them to configure the interface.
This patch adds new shims to device tree.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-04-03 15:17:21 +02:00
Jaroslaw Stelter f5728c298d intel_adsp: ace20_lnl: add initial ace 2.0 (LNL) board definition
This commit adds definition of ACE 2.0 Lunar Lake board.board.

Signed-off-by: Krzysztof Frydryk <Krzysztofx.Frydryk@intel.com>
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-03 15:17:21 +02:00
Peter Fecher 924ac2265d drivers: sensor: Add tmd2620 driver
Adds tmd2620 driver and devicetree bindings to work in
trigger and polling mode supporting Power management.

Signed-off-by: Peter Fecher <p.fecher@phytec.de>
2023-03-31 09:20:36 +02:00
Lucas Tamborrino ed0d242bb7 dts: esp32s3: add LEDC device
Add LEDC device for esp32s3
Update PWM LED binding
Remove invalid comment from driver source file

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-03-31 09:19:56 +02:00
Keith Short e0dd45ba31 bc12: API and 1st driver implementation.
Add portable-device mode to the Diodes PI3USB9201 USB charging detector.

Signed-off-by: Keith Short <keithshort@google.com>
2023-03-30 17:34:36 -04:00
Keith Short 443986159e dts: vendor-prefixes: Add diodes prefix
Needed for the diodes,pi3usb9201 binding.

Signed-off-by: Keith Short <keithshort@google.com>
2023-03-30 17:34:36 -04:00
Anisetti Avinash Krishna 26133e995d drivers: serial: ns16550: Enable simultaneous support of IO, MMIO and PCIe
Enabled simultaneous support by adding a DTS variable named “io-mapped”.
There are 3 possibilities through instance in dtsi file.
Under PCIe, PCIe ns16550.
Under soc and has a variable io-mapped, legacy(IO mapped).
Under soc and don’t have a variable io-mapped, MMIO mapped.
Simultaneous access can be enabled by a Kconfig.
For PCIe instances UART initialization should be done post-kernel as it
depends on PCIe initialization.

Co-authored-by: Najumon BA <najumon.ba@intel.com>
Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-03-30 09:43:29 -04:00
Jordan Yates db3d51bb7d pm: device_runtime: add zephyr,pm-device-runtime-auto
Add the `zephyr,pm-device-runtime-auto` flag to `pm.yaml` and
`struct pm_device`.

This flag is intended to signify to the boot system that device runtime
PM should be automatically enabled on the device after the init function
has run.

Only run `pm_device_runtime_auto_enable` function on a device if
initialisation succeeded. This prevents actions being run on devices
that are not ready.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-03-29 12:21:13 -04:00
Adrian Warecki ea405eb49e drivers: wdt: Add wdt_intel_adsp driver
Added a new watchdog driver which can handle a multiple wdt_dw instances
and can control the pause signal.

The mlt platform has three designware watchdogs, one for each core.
I decided to create a separate intel watchdog driver for the following
reasons:

1. All three devices share the same interrupt number. Each watchdog reports
an interrupt to the core to which it has been assigned. The same interrupt
number cannot be used by multiple devices in the device tree. So, it would
be assigned to only one device. The other dw watchdog devices would use
this assignment, even though it would not be described for them in the dt.
The interrupt handler function in dw watchdog checks the interrupt flag.
If the interrupt was connected to the first watchdog, and the second or
third watchdog signal an interrupt, the interrupt handler of the first
device would ignore it because it would not have set the interrupt flag.
The watchdog device don't knows anything about the existence of the others
devices.

2. The designware watchdog only supports a hardware pause signal. It cannot
be paused programmatically. On the mtl platform, there is a separate group
of control registers for all per-core watchdogs. There are GPIO-like
registers that allows control of a hardware pause signal for subordinate
watchdogs. This separate block is shared by all three watchdogs.

3. The base addresses of the subordinate watchdogs are read from the
aforementioned control registers. As a result, in the device tree we have
only one base address for the intel watchdog, which points to the pause
control registers and containing the base addresses of the subordinate
devices.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-03-29 09:45:49 -04:00
Fabio Baltieri a9735abf84 kscan: input: add input to kscan adapter
Add a driver that listens for input events and reports them on a kscan
API. This allows porting kscan drivers to the input APIs while
maintaining compatibility with the existing kscan based applications.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-28 20:57:53 -04:00
Patryk Duda 417368e63d drivers: flash: Add support for defining custom RDP1 byte value
This patch makes possible to choose custom byte which should be used
to enable non-permanent readout protection (RDP1). Actually, any byte
except 0xAA and 0xCC (which are used by RDP0 and RDP2 respectively)
can be used to enable RDP1 but in multi-image environment, some other
image could check if RDP1 is enabled by comparing it to some hardcoded
value.

If property is not defined, 0x55 will be used to enable RDP1. The
default value comes from STM32 HAL.

Signed-off-by: Patryk Duda <pdk@semihalf.com>
2023-03-28 15:43:16 +00:00
Marc Desvaux 4ed905f19b dts: bindings: Update DMA bindings with DMA config macros
Update DMA bindings with DMA config macros
only for st,stm32-dma-v2.yaml and st,stm32-dma-v2bis.yaml

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-03-28 15:08:06 +02:00
Francois Ramu ea7bf8bab1 dts: bindings: interrupt controller for the new stm32h5 serie
Adds the new stm32h5 serie to the list of st,stm32g0-exti
compatible : now the matching targets is C0/G0/H5/U5/L5/MP1.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-03-28 15:07:51 +02:00
Jeppe Odgaard 40ec70fd2a drivers: sensor: mcux qdec single-phase option
Add binding and sensor attribute to allow single phase
mode where only one signal is required from the encoder.
The signal must be connected to Phase A input.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-03-27 22:13:56 +00:00
Alexander Mihajlovic 9d50b143ae dts: bindings: Add Pmod connector GPIO nexus
Add a GPIO nexus binding for Pmod interface connectors.
This commit also includes a header file with macros
that map signal names in the Pmod specification to
the corresponding indices in the GPIO nexus, meant for
use in devicetree files.

Signed-off-by: Alexander Mihajlovic <alexander@eub.se>
2023-03-27 09:51:08 +02:00
Fabian Blatz 6180f96799 serial: Add driver for emulated UART
The emulated UART controller will aid in automated
integration testing.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-03-27 09:50:44 +02:00
Fabio Baltieri 5b36b4fa16 input: add a longpress device
Add an input device to take input key events as an input and generates
short press or long press devices as output.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-24 13:48:28 +00:00
Fabio Baltieri 12b863067c bindings: test: add a test input device binding
Add a vnd,input-device binding to be used for testing.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-24 13:48:28 +00:00
Gerard Marull-Paretas 92d6df6620 dts: arm: nordic: introduce easydma-maxcnt-bits
The number of available EasyDMA MAXCNT bits is now defined per-instance
in Devicetree.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-03-24 10:31:32 +01:00
Jay Vasanth b0ce525b90 drivers: espi: Microchip MEC172x eSPI VW initialization update
Change device tree VW routing to a form allowing overrides.
Add two new DT optional properties for specifying the reset
source and reset value of each virtual wire. Only virtual
wires that are enabled using the status property are modified.
NOTE: eSPI virtual wires are controlled in groups of 4 by
hardware. The optional reset signal source properties applies
to all four virtual wires in the group. If this field is
changed from the hardware default, it should be changed for
only one virtual wire in the group. If the property exists
in more than one wire in the group it must be set to the
same value.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2023-03-23 11:58:26 -04:00
Jay Vasanth f6619a8688 drivers: espi: Update Microchip MEC172x eSPI virtual wires to use DT
Modify Mircrochip MEC172x eSPI driver to get eSPI virtual wire
hardware routing from device tree.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2023-03-23 11:58:26 -04:00
Manimaran A c42a155988 driver: clock control: Microchip XEC fix missing domain parameter
The clock control driver requires three pieces of information:
PCR register index, bit position, and clock domain. Clock domain
was missing from DT information and MCHP macros.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-03-23 11:55:19 -04:00
Manimaran A c3b2dbd1fb driver: adc: microchip: Keep single adc driver for MEC devices
Deleted adc_mchp_xec.c and microchip,xec-adc.yaml file.
DTSI, yaml, CMakeLists.txt and Kconfig.xec files are
updated for compatible.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-03-23 11:43:30 -04:00
Manimaran A 51b1c5b9d6 driver: adc: microchip: Merged MEC172x and MEC15xx version drivers.
Updated the "adc_mchp_xec_v2.c" adc driver to support both MEC172x and
MEC15xx SOC.
ADC smapling clock configuration updated using DTS.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-03-23 11:43:30 -04:00
Pieter De Gendt 0b45710219 drivers: adc: adc_sam: Introduce Atmel SAM ADC driver
This commit adds support for Atmel SAM ADC driver with up to
16 channels.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-03-23 09:41:00 +01:00
Andy Sinclair a00713bc45 drivers: regulator: Added initial voltage configuration
The regulator driver has a configured min/max range that is used
to limit set values, and to initialise the regulator.

A new init value has been added, so that the startup voltage can
be higher than the lowest permitted value.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-03-22 21:19:51 +01:00
Alvaro Garcia 2380710020 drivers: Added fuel gauge max17048
Added support for fuel gauge max17048

Signed-off-by: Alvaro Garcia <maxpowel@gmail.com>
2023-03-22 14:51:33 -04:00
Nazar Palamar f91e35d447 driver: bluetooth: Added Infineon cyw43xxx BT driver
Added initial version of Infineon cyw43xxx BT (
H4 HCI extension drivers/bluetooth/hci/CMakeLists.txt)

Add initial version of binding file for Infineon CYW43xx BT
HCI extension driver.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-03-22 16:40:55 +01:00
Dean Sellers 8eddd48615 drivers: uart: esp32: Add RS485 half duplex hardware mode
Support for the hardware mode where pin configured as DTR
is asserterted when UART transmits.

Signed-off-by: Dean Sellers <dsellers@evos.com.au>
2023-03-22 13:52:25 +01:00
Andrei Emeltchenko a42ab2729f smbus: Convert to use runtime BDF lookup
Convert PCH SMBus driver, tests and samples to use new dynamic BDF
lookup.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko cb2a10c254 smbus: dts: Add Intel PCH SMBus driver bindings
Add bindings for Intel PCH SMBus driver.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko 0633b8c75c smbus: dts: Add bindings for SMBus peripherals
Add bindings for SMBus peripheral devices on a bus.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko 70f1e83c21 smbus: dts: Add bindings for SMBus controllers
Adds bindings for SMBus controllers.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Johan Hedberg 2fe4a4a218 drivers: watchdog: Add Intel TCO Watchdog driver
This adds a basic Intel TCO watchdog driver. The driver doesn't support
windowed timeouts (a non-zero window.min value) or callbacks. The driver
currently assumes TCO version 6, which can be found e.g. on Elkhart Lake
and Raptor Lake platforms. The driver also expects the TCOBA base
address to be specified through DTS, rather than doing runtime lookup
(using e.g. ACPI or PCIe).

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-03-22 11:38:59 +01:00
Raul Pando a7c011b0be Drivers: I2S: STM32: Mishandling of Master Clock output (MCK)
Remedial rework to handle the enabling of the I2S master clock
output based on the presence of an introduced DT property.
For details see issue/54841.

Signed-off-by: Raul Pando <raul.pando@bytegrity.co.uk>
2023-03-22 10:06:11 +01:00
TOKITA Hiroshi 08606eac44 drivers: dma: rpi_pico: add support for RaspberryPi Pico DMA
Adding RaspberryPi Pico DMA driver.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-03-22 09:33:52 +01:00
Gerson Fernando Budke 1dce3c3ee2 drivers: eefc: sam: Update to use clock control
This update Atmel SAM eefc devicetree to use clock control information.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke 2a24bb263a drivers: wdt: sam: Update to use clock control
This update Atmel SAM wdt devicetree to use clock control information.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke 6634d6b4ff drivers: afec: sam: Update to use clock control
This update Atmel SAM afec driver to use clock control driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke dc45d7a922 drivers: sensors: qdec_sam: Update to use clock control
This update Atmel SAM QDEC driver to use clock control driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke f1b68beca1 drivers: ssc: sam: Update to use clock control
This update Atmel SAM ssc driver to use clock control driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke d2e9b4682c drivers: pwm: sam: Update to use clock control
This update Atmel SAM pwm driver to use clock control driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke 5522e65581 drivers: usb: sam: Update to use clock control
This update Atmel SAM usbhs driver to use clock control driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke 033c7eddec drivers: memc: sam: Update to use clock control
This update Atmel SAM SMC driver to use clock control driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke bf46696057 drivers: dma: sam: Update to use clock control
This update Atmel SAM xdmac driver to use clock control driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke 3bc47d77b2 drivers: dac: sam: Update to use clock control
This update Atmel SAM dac driver to use clock control driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke 41ab680a4f drivers: can: sam: Update to use clock control
This update Atmel SAM can driver to use clock control driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke 4f59d50441 drivers: spi: sam: Update to use clock control
This update Atmel SAM spi driver to use clock control driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke 91e219c644 drivers: entropy: sam/sam0: Update to use clock control
This update Atmel SAM trng driver to use clock control driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke c4f1d98ef6 drivers: i2c: sam: Update to use clock control
This update Atmel SAM twi, twihs and twim drivers to use clock control
driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke 08015c8f57 drivers: hwinfo: sam: Update to use clock control
This update Atmel SAM hwinfo reset cause driver to use clock control
driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke eb2c6d7e2c drivers: timer: sam: Update to use clock control
This update Atmel SAM timer driver to use clock control drivers.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke 3c7988c52a drivers: eth: sam: Update to use clock control
This update Atmel SAM ethernet driver to use clock control drivers.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke c77c1cc197 drivers: gpio: sam: Update to use clock control
This update Atmel SAM gpio and pinctrl drivers to use clock control
drivers.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke f21c936d49 drivers: serial: sam: Update to use clock control
This update Atmel SAM uart and usart  drivers to use clock control
drivers.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke 88cedcf5c5 drivers: clock: Add Atmel SAM PMC driver
Add initial version of clock control for Atmel SAM SoC series. This add
support to Power Management which allows control peripherals clock.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Ramesh Babu B 3d44508c38 drivers: spi: Add Intel SPI penwell driver
Added support for intel pch penwell spi driver.

Signed-off-by: Ramesh Babu B <ramesh.babu.b@intel.com>
2023-03-21 13:39:33 +01:00
Marc Desvaux 7e11533657 dts: arm: st: Introduce a st,stm32g0-exti compatible
Introduce a st,stm32g0-exti compatible
 added to the matching targets:
C0/G0/U5/L5/MP1:

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-03-21 09:37:30 +01:00
Jeppe Odgaard 4d57f64193 drivers: watchdog: Add TI TPS382x driver
Add support for the TI TPS382x series. The IC has an input pin which
should be toggled by the processor and a output pin which should be
connected to the RESET input of the processor. The timeout is not
configurable.

This device can be used by devices which does not have any internal
hardware watchdog device.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-03-21 09:35:58 +01:00
Krzysztof Chruscinski 656b0e6426 drivers: counter: Adapt to use device tree
Modifying counter drivers (rtc and timer) to rely completely on
device tree and not on Kconfig of MDK flags.

Adapting dtsi for all SoCs and adapting test configuration.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-03-20 16:59:40 +01:00
Jamie McCrae 5bae23b891 drivers: retained_mem: Add RAM driver
Adds a non-initialised RAM-based retained memory driver.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 15:02:09 +01:00
Jamie McCrae 9bda013e5d drivers: retained_mem: Add nRF GPREGRET driver
Adds a driver for the Nordic nRF GPREGRET registers and adds
entries to the SoCs for this peripheral.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 15:02:09 +01:00
Armin Brauns 01e8b3445e drivers: gpio: mcp23xxx: add support for reset pin
This allows the device to be reset to a known state before initialization.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2023-03-20 10:43:12 +01:00
Armin Brauns 0db9785892 drivers: gpio: mcp23xxx: support pin interrupts
No single-edge interrupts for now, since they are not supported in
hardware.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2023-03-20 10:43:12 +01:00
Armin Brauns 8f8300d5fe dts: bindings: deduplicate mcp23xxx bindings
The only difference between mcp230xx and mcp23sxx is I2C vs. SPI.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2023-03-20 10:43:12 +01:00
Joel Guittet 00ded3346c bindings: add grove header
Add bindind support for Grove header.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
2023-03-19 17:28:05 -04:00
Evgeniy Paltsev 56572687c7 drivers: serial: add virtual uart over ARC hostlink channel
Add support for virtual UART device that uses ARC Hostlink channels
for data transfers. Due to the Hostlink principle, this driver
supports only polling API.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2023-03-17 11:49:02 +01:00
Nick Ward f3cbd34d3f drivers: sensor: bq274xx: add CONFIG_BQ274XX_PM
This symbol allows users of the driver to disable the
power management feature of just this sensor if they are
not using the int_gpios pin of the BQ274XX.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-03-16 21:40:18 -04:00
Gerard Marull-Paretas 78849e18ff dts: bindings: arm,sbsa-uart: fix dangling entry
interrupts property was previously added with "required: false", but
when required was removed (redundant), the interrupts property was left
dangling.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-03-16 15:42:36 +00:00
Tomáš Beneš 14138d4a34 Bluetooth: Controller: Add coexistence implementation
To enable Bluetooth controller coexistence feature, there is
implementation of ticker task, which aborts any ongoing radio events
during assertion of the grant pin. This solves the co-existence issue
in the role of the subordinate transceiver.

Signed-off-by: Tomáš Beneš <tomas@dronetag.cz>
2023-03-16 14:37:55 +01:00
Joel Guittet 5e44b7ac31 bindings: add raspberrypi gpio header
Add bindind support for Raspberry Pi header.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
2023-03-15 20:43:07 -04:00
Fabio Baltieri b9dabf04f0 dts: bindings: zephyr,gpio-keys require code and add docs
The zephyr,gpio-keys is now emitting input events, so it makes sense to
require a key code to be set. Change the zephyr,code property to be
required and add an example in the binding description.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-14 17:15:09 -04:00
Fabio Baltieri 2815f96440 drivers: move gpio_keys from gpio to input
Port the gpio_keys_zephyr driver from the gpio subsystem with a
dedicated API to the input subsystem reporting input events.

Move the test as well, simplify the cases a bit since the API is simpler
now.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-14 17:15:09 -04:00
Benjamin Björnsson 9818fae522 dts: bindings: clock: Add STM32C0 HSI clock binding
Add binding for HSI clock source in STM32C0 series.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-03-14 17:35:37 +00:00
Armin Brauns d0762e5439 drivers/fpga: ice40: use microsecond resolution for reset time
The 200ns reset time specified in the datasheet are a minimum time; and the
nanoseconds were being rounded to whole microseconds anyway.

Also make it the same type as `config_delay_us` (`uint16_t`).

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2023-03-14 11:17:35 +01:00
Armin Brauns 8aec9dd552 drivers/fpga: ice40: fix minimum config delay
From FPGA-TN-02001-3.3 "iCE40 Programming and Configuration":

> After driving CRESET_B High or allowing it to float High, the AP must
> wait a minimum of 1200 µs, allowing the iCE40 FPGA to clear its internal
> configuration memory.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2023-03-14 11:17:35 +01:00
Gerard Marull-Paretas 65512e9445 boards: arm: nrf5340_audio_dk_nrf5340: add bindings for audio codec
The board embeds an audio codec IC, Cirrus CS42L73. While there is no
in-tree driver for it, we need a binding to describe how it is wired in
the board, e.g. for IRQ/RESET lines.

Following Linux binding for the same IC, create one in
dts/bindings/sound. Note that Linux binding is less complete/outdated.

Ref. https://statics.cirrus.com/pubs/proDatasheet/CS47L63_DS1249F2.pdf

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-03-13 11:45:53 +01:00
Seppo Takalo edae1bed3d drivers: kscan: Add driver for XPT2046
Add driver for Xptek XPT2046 resistive touch controller on SPI.
Only interrupt driven mode supported, does not do polling.

Signed-off-by: Seppo Takalo <seppo.takalo@iki.fi>
2023-03-06 17:21:17 +01:00
Daniel DeGrasse 0105a85ed2 drivers: display: introduce driver for NXP DCNANO LCDIF peripheral
Introduce driver for NXP DCNANO LCDIF (lcd interface) peripheral,
present on iMX.RT500. Currently this driver only supports updating
the primary framebuffer, and does not implement support for the cursor
buffer present on this IP.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-03-04 09:19:26 +01:00
Daniel DeGrasse 5cc33d2a3c drivers: mipi: introduce MCUX MIPI DSI 2L driver
Introduce driver for MCUX MIPI DSI 2L. This IP block differs slightly from
the existing MCUX MIPI peripheral, and uses a different hardware
abstraction layer. For these reasons, a new driver was introduced rather
than extending the existing mcux_dsi implementation.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-03-04 09:19:26 +01:00
Daniel DeGrasse 5455c556f1 drivers: memc_mcux_flexspi: enable configuring AHB RX buffer allocation
Allow configuration of AHB RX buffer allocation. This allows sections
of the AHB RX buffer to be reserved for specific masters, which can
enhance performance.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-03-04 09:19:26 +01:00
Andriy Gelman 33d1792e3d drivers: spi: Add xmc4xxx driver
Adds spi driver for xmc4xxx SoCs.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-03-03 17:20:17 +01:00
Mark Watson 1f178ca935 drivers: sensor: VL53L1X time-of-flight sensor.
The driver utilizes ST Microelectronics library (which
exists in modules\hal\st\sensor\vl53l1x. Platform specific
headers and source files used by the library are included
and adapted for Zephyr.

The driver can be configured in proj.conf to use a
interrupt/polling methods and the use of the XSHUT pin on
the VL53L1X. All uses were tested successfully.

Signed-off-by: Mark Watson <mwatson@prosaris.ca>
2023-03-03 10:01:55 -06:00
Ben Lauret 70c6befa88 drivers: watchdog: implement Smartbond watchdog driver
This patch adds watchdog driver for Renesas Smartbond SOCs.

Co-authored-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>

Signed-off-by: Ben Lauret <ben.lauret.wm@renesas.com>
2023-03-03 11:02:37 +01:00
Ben Lauret 36ac1ee2a2 drivers: entropy: add Renesas SmartBond entropy generator driver
This adds driver for SmartBond TRNG peripheral that with separate
ISR an thread data pools.

Co-authored-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>

Signed-off-by: Ben Lauret <ben.lauret.wm@renesas.com>
2023-03-03 11:01:36 +01:00
Matthias Hauser d4e9e5f46c drivers: sensor: Added driver for the Würth Elektronik WSEN-TIDS sensor
Added sample for the WSEN-TIDS temperature sensor.

Signed-off-by: Matthias Hauser <Matthias.Hauser@we-online.de>
2023-03-03 11:01:10 +01:00
Daniel DeGrasse 01b9a9cdbb drivers: sdhc: add support for configurable power on delay to SPI SDHC
Add support for configuring power on delay when using SPI SDHC. This
allows cards that reliably initialize with a shorter (1ms) delay to
avoid the long initialize delay otherwise imposed.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-03-03 09:18:47 +01:00
Maxmillion McLaughlin 2f9335d20a drivers: i2c: stm32: add bus recovery support
Add I2C bus recovery support to the STM32 v1 and v2 driver. The STM32 i2c
peripheral does not natively support I2C bus recovery so recovery is
performed using GPIO bitbanging. This mirrors the bus recovery
implementation for NXP MCUX LPI2C driver.

Fixes: zephyrproject-rtos#54917

Signed-off-by: Maxmillion McLaughlin <github@maxmclau.com>
2023-03-03 09:18:29 +01:00
TOKITA Hiroshi 47f52bba42 drivers: regulator: add support for RaspberryPi Pico regulator.
Add support for rpi_pico regulator.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-03-02 21:14:34 +01:00
Grant Ramsay 9df37fff79 drivers: serial: Add pinctrl support to the NS16550 driver
This enables configuring pins for the UART

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-03-02 13:50:06 +01:00
Grant Ramsay 026105c883 drivers: pinctrl: Add pinctrl support for TI K3 devices
K3 is a common architecture used between different TI
processor families

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-03-02 13:50:06 +01:00
Hein Wessels e01270793e drivers: dma: stm32: bdma support for H7
Implement STM32H7 BDMA driver.

Co-authored-by: Jeroen van Dooren <jeroen.van.dooren@nobleo.nl>
Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
2023-03-01 15:58:27 +01:00
Nazar Palamar bc638f38db drivers: gpio: Add Infineon CAT1 GPIO driver
Added initial version of Infineon CAT1 GPIO driver.
Added initial version of binding file for Infineon CAT1 GPIO driver.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-03-01 11:44:57 +01:00
Nazar Palamar f956e81bb6 drivers: serial: Add Infineon CAT1 UART driver
Added initial version of Infineon CAT1 UART driver.
Added initial version of binding file for Infineon CAT1 UART driver.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-03-01 11:44:57 +01:00
Nazar Palamar dcf52fd566 drivers: pinctrl: Add Infineon CAT1 Pin controller driver
Added initial version of Infineon CAT1 Pin controller driver.
Added initial version of binding file for Infineon CAT1 Pinctrl driver.
Added initial version of dt header for Infineon CAT1 pinctrl driver.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-03-01 11:44:57 +01:00
Erwan Gouriou 7ae150f948 dts: bindings: clocks: Add binding for F412 PLL I2S
Provide dts binding for F412 PLL I2S.
This I2S dedicated PLL is fully configurable and take same
input as Main PLL

Only one output clock (PLLR) is supported for now.
This PLL could be found on STM32F412 and F413 parts for instance.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2023-03-01 08:56:05 +01:00
Erwan Gouriou cb633ae7de dts: bindings: clocks: Add binding for F4 PLL I2S
Provide dts binding for F4 PLL I2S.
This PLL share input source and input M diviso with F4 Main PLL.

Only one output clock (PLLR) is supported for now.
This PLL could be found on STM32F401 parts for instance.

Additionally, provide related header definitions.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2023-03-01 08:56:05 +01:00
Erwan Gouriou 3c70b7cae7 dts: bindings: clocks: Fix typo stm32f4 pll binding
This is F4 Main PLL description.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2023-03-01 08:56:05 +01:00
Jeff Daly bd1a8141e5 drivers: pwms: pwm_xec: add polarity support to XEC PWM driver.
Polarity support added to XEC PWM driver.  This allows (for example) PWM
controlled LEDs that are active low to actually be turned off when set
to off.

Signed-off-by: Jeff Daly <jeffd@silicom-usa.com>
2023-03-01 08:55:49 +01:00
Jamie McCrae f9fd899da0 drivers: bbram: Add Microchip MCP7940N driver
Adds Microchip MCP7940N battery-backed RAM support.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-01 08:55:39 +01:00
Benedikt Schmidt 50f164f9fe dts: bindings: gpio: add binding for PCAL6416A
Add the binding for the driver of the chip PCAL6416A.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-02-28 20:09:19 -05:00
Gerard Marull-Paretas 1efaa94bc6 drivers: audio: dmic_nrfx_pdm: drop -pin support
Driver will always use pinctrl now.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-02-28 08:42:05 -08:00