Commit graph

361 commits

Author SHA1 Message Date
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
Carlo Caione 85c4111002 memory-attr: Rationalize _MASK and _GET(x) macros
Let's make this official: we use the suffix `_MASK` for the define
carrying the GENMASK for the attributes, and the suffix `_GET(x)` for
the actual macro extracting the attributes.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-09-22 09:27: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
Manuel Argüelles 7fca0aa8a6 nxp_s32: enable clock control for S32ZE
Enable clock control driver for NXP S32ZE SoCs and add clock sources
definitions for devicetree.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-09-20 17:25:44 +01: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
Andy Sinclair 49ef9be4b9 drivers: regulator: npm1300: Add PFM mode
Set regulator mode updated to support forced PFM mode

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-09-13 11:48:33 +02:00
Declan Snyder 97c2ef6666 drivers: clock_control_mcux_syscon: add sctimer
Add SCTIMER key to syscon clock control

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-09-12 09:23:46 +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
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
Guillaume Gautier 702e469e18 include: zephyr: dt-bindings: adc: add macros for stm32 adc clock source
Add macros to help defining the STM32 ADC clock source in device tree.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-08-29 11:27:07 +01:00
Tim Lin ed37374dac ITE: drivers/pwm: Add the flag of PWM output open-drain mode
This flag is used when the PWM output is set to open-drain mode.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-08-25 10:31:42 +02: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
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
Thomas Stranger 2d988879ec dt-bindings: use dt-bindings/dt-util.h instead of sys/util_macro.h
Replaces some usages of <zephyr/sys/util_macro.h> with
<zephyr/dt-bindings/dt-util.h> such that this is done in a uniform way.

The latter being a wrapper around the former, which was introduced in
PR #28779 with the intention to be able to retain the pattern of only
including <zephyr/dt-bindings/foo.h> files in in-tree dts files.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2023-08-16 20:31:07 +02:00
Fabio Baltieri b8e27297fa input: input-event-codes: add few extra definitions
Add few extra definitions used by board DTSs and some that seems to make
sense for potential applications. These match the code and name of the
Linux event codes.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-07 11:26:26 +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
Marcin Niestroj e47175becd dts: bindings: extend st-morpho-header to support Nucleo-144
Nucleo-144 boards have up to 72 pins (there are boards with only 70) on
each ST Morpho header. Extend pin identifiers to support that number.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2023-07-28 08:39:39 +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
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
Wojciech Sipak 40fa96506b drivers: pinctrl: Add pinctrl driver for Gecko Series 1
This adds a new pinctrl driver for EFM32.

Co-authored-by: Todd Dust <Todd.Dust@silabs.com>
Signed-off-by: Wojciech Sipak <wsipak@antmicro.com>
2023-07-26 14:33:03 +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
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
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 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
Marek Matej 5e1b18526c include: dt-bingings: Fix typo
Fix minor typo in esp32s3-gpio-sigmap

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-07-25 18:12:33 +02:00
Benedikt Schmidt 332850a367 drivers: adc: configurable acquisition time for ADS114s0x
Implement a configurable acquisition time for the ADS114s0x.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-07-24 13:21:13 +00:00
Emilio Benavente e12e026c95 dts: arm: nxp: lpc55s3x: Added DMA Nodes in dts files.
Added dts nodes for DMA support on LPC55S3X devices.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2023-07-21 08:58:27 -05: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
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
Benjamin Cabé d8147ce648 input: doc: document event definitions
Added missing documentation to event types, key codes, etc.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-18 21:37:28 +00:00
Emilio Benavente 3531482800 dts: arm: nxp: nxp_rt5xx_common: Added required inputmux bindings
Added required inputmux bindings to support
DMA Channel Chaining for the mimxrt595_evk

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2023-07-18 16:20:21 +02:00
Guillaume Gautier c9461ca783 drivers: clock_control: add support for stm32 hsi14 clock
Add support of the dedicated STM32F0 14 MHz HSI clock for ADC.
Also remove ADC clock source selection as it is obsolete.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-07-18 11:10:17 +00:00
Andy Sinclair 4048348e3e drivers: gpio: gpio_npm1300: Added reset and power loss modes
Added configuration of nPM1300 GPIO pins as reset or
power loss warning.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-07-12 14:36:56 +02:00
Erwan Gouriou 85aa3e1731 include: dt-bindings: reset: Add bindings for stm32WBA
Add reset bindings for STM32WBA SoCs.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-07-11 15:05:05 +02:00
Guillaume Gautier daef7c9d1b drivers: clock_control: stm32: Add stm32wba clock control driver
Add clock control driver on STM32WBA.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-07-11 15:05:05 +02:00
Mykola Kvach 634e73dd21 soc: arm64: add PFC files to Renesas r8a77961 Gen3 SoC
Add Pin Function Controller tables of registers and their bits
for ARM64 Renesas R-Car family. With this changes we can use
Renesas PFC driver for configuring bias and driving capabilities.

Add only needed driver strength and bias pins to PFC,
e.g. SDx and UART TX/RX pins.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2023-07-11 11:17:41 +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
Manuel Arguelles 8a47dd5ff8 soc: nxp: s32k3: enable clock control
Enable clock control by default on S32K344 SoCs and add clock
definitions.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-07-06 14:19:23 -05:00
Lucas Tamborrino e229898caf drivers: pinctrl: esp32xx: allow internal loopback
Provides a way to use pinctrl to allow internal loopback
on a peripheral pin for testing purposes.
This is done by using output-enable on a input pin and
input-enable on a output pin.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-06-22 08:13:36 +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
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
Siyuan Cheng 24efa6720d drivers: pinctrl_emsdp: fix definition location
Mux Control Register Index are internals of driver, now
moved from dt-binding header to driver itself.

Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
2023-06-13 07:02:08 -04:00
Siyuan Cheng 1a6b6e7b84 drivers: pinctrl_emsdp: add dummy mux for unmuxed peripheral
ARC EMSDP board has some peripherals are internal connected,
such as DW spi1 and DFSS i2c0. They are unmuxed and have fix
connection to spi-flash or sensor. For these peripheral, add
dummy mux type to avoid pinctrl ENOENT error.

Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
2023-06-13 07:02:08 -04:00
Gerard Marull-Paretas 28b7a857f7 dt-bindings: display: fix lcd_interface ingroup
s/display_interfaces/display_interface

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-06-05 20:21:09 -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
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
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
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
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
Benjamin Cabé d793764cfa doc: fix NUMICRO_PINMUX bit field documentation
Fix Doxygen documentation by moving @brief just before NUMICRO_PINMUX
definition.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-05-17 09:49:24 +02:00
Benjamin Cabé c28b5d3fca doc: fix STM32_CLOCK bit field documentation
Fix Doxygen documentation by moving @brief just before STM32_CLOCK
definition.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-05-17 09:49:24 +02: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
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 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
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
Gerard Marull-Paretas 8c73f3580a gpio: dt-bindings: add GPIO_DT_FLAGS_MASK
Add a new mask definitio for GPIO DT flags. It can be useful, e.g. in
nexus nodes.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-05-02 22:43:43 +09:00
Guillaume Gautier f825e69d8e include: zephyr: dt-bindings: adc: add macros for stm32 adc resolutions
Define some macros that will help to define the STM32 ADC resolutions in
the dtsi files. The end goal is to simplify the driver by removing code
specific to particular series.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-04-26 12:53:03 +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
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
Rico Ganahl 6c63f3d38f include: dt-bindings: clock: stm32h7: fix missing NO_SEL
Make NO_SEL dummy available for stm32h7 series.

Commit 6cbb3f5eec

Signed-off-by: Rico Ganahl <rico.ganahl@bytesatwork.ch>
2023-04-06 11:51:06 +02:00
Guillaume Gautier 8fbac84402 include: zephyr: dt-bindings: clock: add i2s domain clock to stm32 devices
Add I2S domain clock selection helpers for stm32fx families.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-03-30 13:47:55 +02:00
Francois Ramu 806cfbf365 include: bindings: reset definition for the new stm32h5 serie
Defines the RCC reset registers for the stm32h5cx devices
Note that all stm32h5x do not have all the bus registers.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-03-28 15:07:51 +02:00
Francois Ramu ff1969de3b include: clock: stm32h5 clock definitions for clock scheme
Defines the clocks for  the stm32H5 device.
The PLL is similar to the stm32U5 except for the mul-n from 8 to 420.
The HSI is similar to the stm32h7 with a prediv.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-03-28 15:07:51 +02: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
Daniel DeGrasse e587047dc6 drivers: adc: rewrite mcux LPADC driver
Rewrite MCUX LPADC driver, to better utilize hardware.
the following changes have been applied:
- channel numbers now correspond to hardware channel command slots,
  use "input_positive" and "input_negative" fields along with channel
  definitions in dt-bindings/adc/mcux-lpadc.h to select a channel
- the number of channel command slots available is configurable via
  CONFIG_LPADC_CHANNEL_COUNT
- Side A and side B channels are now supported
- differential channel mode is now supported
- ADC channels now are sampled via hardware, without additional
  software triggering

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-03-23 08:58:44 +00: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 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
Benjamin Björnsson f38a75f753 drivers: clock_control: add STM32C0 support
Add STM32C0 support to clock_control driver.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-03-14 17:35:37 +00:00
Benjamin Björnsson 17f96eba34 dt-bindings: reset: Add STM32C0 reset header
Add header to be included in STM32C0 series dtsi files.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-03-14 17:35:37 +00:00
Armin Brauns 755c0ae748 include: dt-bindings: clock: fix stm32f7 clock selection macros
Sourced from RM0410.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2023-03-07 09:44:00 +01:00
Armin Brauns e349dcd4c7 include: dt-bindings: clock: fix offsets of stm32f7 DCKCFGR registers
All of the following list the registers at 0x8C/0x90:
- RM0431 ('f72x/'f73x)
- RM0385 ('f74x/'f75x)
- RM0410 ('f76x/'f77x)

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2023-03-07 09:44:00 +01:00
Armin Brauns db2b26be1c include: dt-bindings: clock: fix names of stm32f7 DCKCFGR register defines
Short for "Dedicated ClocKs ConFiGuration Register".

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2023-03-07 09:44:00 +01:00
Fabio Baltieri 3386e96515 input: add input subsystem
Initial commit introducing the input subsystem into Zephyr.

Includes the input_event data structure, the input_report_* APIs, an
iterables sections based subscription API and two operation modes:
synchronous, where the listeners are called directly, and asynchronous,
where the listeners are called in a dedicated thread.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-06 11:47:32 -08:00
Daniel DeGrasse d8b8566daf drivers: clock_control: add clock rate definitions for MIPI and LCDIF
Add clock rate definitions for MIPI and LCDIF peripherals, to enable
retrival of these peripheral clock rates at runtime.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-03-04 09:19:26 +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
Jay Vasanth e56721b8f0 dts: gpio: Add Microchip XEC GPIO macros for use in device tree
Microchip XEC devices specify GPIO pin using octal numbering and
organize pins in banks of 32. Chip documentation does not use
bank naming rather naming each pin by its octal number. This has
led to the developer having to calculate the bit position of a pin
in its 32-bit bank when a specifying the pin for GPIO usage. We
created a set of defines for all possible GPIO pins that specify
the DT GPIO bank name used in the chip level DTSI files and the
bit position in that bank.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2023-03-02 13:52:03 +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
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 b934ad8cb9 include: dt-bindings: F4 clocks: Add PLLI2S as source clock
Add PLLI2S R as I2S source clock.
For now I2S_CKIN (fixed clock) is not supported.

This change only consider F401 and compatible PLL I2S implementations.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2023-03-01 08:56:05 +01:00
Sylvio Alves fde5281541 dt-bindings: add esp32s3 signals
Adds esp32s3 related gpio sigmap, intmux and clock related.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-02-27 19:41:33 +01:00
Immo Birnbaum 92a93e7eeb dt-bindings: fix MDC clock divider bindings for Xilinx GEM
The original implementation of the GEM's device tree binding
implied that:
1) on the UltraScale+, the MDC clock divider is applied to
the LPD_LSBUS_CLK. According to the most recent documentation,
this is not the case, instead, the MDC divider is applied to
the IOU_SWITCH_CLK.
2) any MDC divider greater than 32 is reserved to the Zynq-7000
(in the driver itself, accessibility of the larger dividers was
also #ifdef'd), as the Zynq's MDC clock source, the cpu_1x
clock, can have significantly higher frequencies than the
UltraScale's LPD_LSBUS clock.

The respective documentation in the device tree binding header
file is hereby fixed.

Signed-off-by: Immo Birnbaum <Immo.Birnbaum@weidmueller.com>
2023-02-27 11:36:19 +01:00
Andriy Gelman 8a97da056b drivers: dma: Add infineon xmc4xxx dma support
Adds dma drivers for xmc4xxx SoCs.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-02-21 21:15:53 +01:00
Francois Ramu 210e0b76bf dts: bindings: pwm custom macro for STM32 vendor
Change the name of the custom macro defined for the stm32 devices
to fit the VND_PWM_xxx model
Keeping old deprecated macro, though.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-01-24 14:49:53 +01:00
Francois Ramu 48d4e017bd include: bindings: dma macro definition for stm32 dma driver config
Defines DMA macro to help channel configuration and feature for the stm32
devices. Add one default value for most of the usecases
of peripheral DMA settings.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-01-23 09:15:21 -06:00
Erwan Gouriou 86ee2104b3 include: dt-bindings: clock: stm32f410/f427: Fix macros definition
Fix issues in macros definitions.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2023-01-18 09:56:03 +01:00
Dino Li a41a4e5e24 espi: it8xxx2: enable espi transaction interrupt
The interrupt is used to wake up EC from low power mode.
So EC does not defer eSPI bus while transaction is accepted.
Fixes EC host commands slow issue.

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2023-01-18 09:55:44 +01:00
Pawel Czarnecki eb4a0ae225 drivers: pinctrl: silabs: add spi handling
This commit adds pinctrl configuration for SPI on USART.

Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
2023-01-17 15:37:27 -06:00
YuLong Yao bfe085070b dt-bindings: gd32: reset: add support for gd32a50x
add support for gd32a50x

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-12 21:45:38 +01:00
YuLong Yao 4703d8efe5 dt-bindings: clock: gd32: add gd32a50x series support
add gd32a50x series support

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-12 21:45:38 +01:00
Gerard Marull-Paretas 8c73db666c drivers: regulator: npm1100: add initial support
While nPM1100 is to be operated in fixed configuration for some
applications, it has some degree of configuration via GPIOs. For
example, mode (auto/PWM) can be configured via MODE pin. VBUS current
can also be adjusted using ISET pin, even though there is no API yet to
limit the PMIC input current.

This patch adds a new regulator class driver for nPM1100 PMIC, so that
it can be used with the standard regulator API when needed.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-01-12 19:07:05 +01:00
Erwan Gouriou 6cbb3f5eec drivers: clock_control: stm32: Fixed domain clock configuration
In some case, we may need to describe a domain clock for a device
while there is no way to configure it (ex: USB clock set on PLL_Q output
on F405 devices > It is not selectable).
Then, configuring a device clock domain in the clock_control driver
will allow to retrieve its subsys rate.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2023-01-12 12:46:53 +01:00
Erwan Gouriou 7c147ef552 include: dt-bindings: stm32f4_clock.h: Add DCKCFGR registers
Add f4 binding files to provide DCKCFGR registers description
to enable clock selection for F410/F427/F446 variant lines

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2023-01-12 12:46:53 +01:00
Erwan Gouriou c83bc0539c include: dt-bindings: clocks: stm32wb_clock: Add RFWKP_SEL()
Add macros and defines related to the ability to select RFWK domain
clock.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2023-01-08 19:48:27 +01:00
Manuel Arguelles a7743a49aa drivers: pinctrl: rename S32 to NXP S32
Following updates previously done for other drivers, rename all
occurrences of S32 to NXP S32 to avoid ambiguity.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2023-01-04 16:51:38 +01:00
Sylvio Alves 42b33382f7 driver: clock: esp32: retrieve HW clock from DTS
ESP32 and ESP32-S2 HW clock are tied to DTS clock configuration.
This changes updates the default configuration to retrieve
this information from DTS.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-01-03 17:12:06 -05:00
Jay Vasanth ed52729a4b drivers: clock: Microchip MEC172x clock control driver support all modes
Fix Microchip XEC clock control driver single-ended XTAL2 pin
initialization. Add support for external 32KHZ_IN pin as a
clock source including PINTRL to switch the GPIO to 32KHZ_IN
function. Add device tree option to disable internal silicon
oscillator if it is not required by the configuration. Add
device tree tuning options based on crystal and board layout.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-12-28 10:43:03 +01:00
HaiLong Yang 2b72968d7f dts: arm: gigadevice: add gd32l23x series
Add initial support for gd32l23x series. gd32l23x used Cortex-M23, based
on ARMv8-M baseline, implement the System Timer.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2022-12-28 10:37:52 +01:00
TOKITA Hiroshi 59044c6d63 dts: bindings: gd32-dma: add config cell property
Add config cell property to gd,gd32-dma.
For supporting hardware variation, Splitting base definition
to gd,gd32-dma-base.yaml.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2022-12-22 13:43:49 +01:00
Guillaume Gautier aca570ecb3 include: zephyr: dt-bindings: clock: Add separate clock file for STM32F7
Add a new dedicated clock control header file for the STM32F7 series.
It is copied from the STM32F4 file with added clock defines and helpers
to select peripheral clock sources that are specific to F7 series.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>

dt-bindings f7
2022-12-21 12:17:38 +01:00
Filip Kokosinski 6058f4972d drivers: pinctrl: Add Silabs Gecko pin controller
This commit adds initial support for gecko pinctrl driver

Co-authored-by: Mateusz Sierszulski <msierszulski@antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2022-12-20 22:50:19 +01:00
Jiafei Pan d963900dbd drivers: mcux_ccm: add support for lpuart on imx93
Add support for i.MX93 support for CCM driver.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2022-12-20 09:22:40 +01:00
Gerard Marull-Paretas 7568749c8c drivers: regulator: initial driver for nPM6001
Add initial driver for the nPM6001 PMIC.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-12-16 11:26:47 +01:00
Gerard Marull-Paretas 305ce33b77 drivers: regulator: add parent DVS API
PCA9420 PMIC offers of multiple operation states, or DVS (Dynamic
Voltage Scaling). Such states may be automatically changed by hardware
using MODESEL0/1 pins. Certain MCUs allow to automatically configure
certain output pins when entering low power modes so that PMIC state is
changed without software intervention.  This means that application just
needs to configure the voltages for each state using
`nxp,modeN-microvolt`, set `nxp,enable-modesel-pins` in devicetree and
forget about configuring regulators.

This patch introduces a new _parent_ API to expose such functionality in
a vendor agnostic way. Consider this API as experimental for now, until
we have other usecases.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-12-14 17:01:44 +01:00
Marek Matej f86a7d2c25 drivers: dac: esp32: Add support for DAC controller
Initial DAC driver for the ESP32/ESP32-S2 SOCs

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2022-12-13 16:29:38 +00:00
Francois Ramu c7b55b4e39 dts: arm: stm32g0 has a APB peripheral bus clock on 2 registers
The stm32G0 device has a one APB peripheral clock bus
but splitted on two RCC registers: RCC_ABPENR1 and RCC_ABPENR2
Peripherals are on one or the other.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-12-13 10:21:18 -06:00
Andriy Gelman 727e589448 drivers: interrupt_controller: Add XMC4XXX ERU driver
In Infineon XMC4XXX SoCs, gpio interrupts are triggered via an
Event Request Unit (ERU) module. A subset of the gpios are
connected to the ERU. The ERU monitors edge triggers and creates
a SR.

This driver configures the ERU for a target port/pin combination
for rising/falling edge events. Note that the ERU module does
not generate SR based on the gpio level. Internally the ERU
tracks the *status* of an event. The status is set on a positive
edge and unset on a negative edge (or vice-versa depending on
the configuration). The value of the status is used to implement
a level triggered interrupt; The ISR checks the status flag and
calls the callback function if the status is set.

The ERU configurations for supported port/pin combinations are
stored in a devicetree file dts/arm/infineon/xmc4xxx_x_x-intc.dtsi.
The configurations are stored in the opaque array
uint16 port_line_mapping[].

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2022-12-12 10:51:29 +01:00
Patryk Duda 31d3374627 dts: arm: st: mp1: Add reset controller node
Reset controller node is necessary to enable support for resetting
peripherials using RCC.

This patch also includes RCC reset registers offsets used by STM32_RESET
macro.

Signed-off-by: Patryk Duda <pdk@semihalf.com>
2022-12-09 09:43:36 -08:00
Patryk Duda b36f3bc412 dts: arm: st: wb/wl: Add reset controller node
Reset controller node is necessary to enable support for resetting
peripherials using RCC.

This patch also includes RCC reset registers offsets used by STM32_RESET
macro.

Signed-off-by: Patryk Duda <pdk@semihalf.com>
2022-12-09 09:43:36 -08:00
Patryk Duda 0648e0e624 dts: arm: st: u5: Add reset controller node
Reset controller node is necessary to enable support for resetting
peripherials using RCC.

This patch also includes RCC reset registers offsets used by STM32_RESET
macro.

Signed-off-by: Patryk Duda <pdk@semihalf.com>
2022-12-09 09:43:36 -08:00
Patryk Duda a619f024a5 dts: arm: st: l1: Add reset controller node
Reset controller node is necessary to enable support for resetting
peripherials using RCC.

This patch also includes RCC reset registers offsets used by STM32_RESET
macro.

Signed-off-by: Patryk Duda <pdk@semihalf.com>
2022-12-09 09:43:36 -08:00
Patryk Duda df0c9f3cbb dts: arm: st: l0: Add reset controller node
Reset controller node is necessary to enable support for resetting
peripherials using RCC.

This patch also includes RCC reset registers offsets used by STM32_RESET
macro.

Signed-off-by: Patryk Duda <pdk@semihalf.com>
2022-12-09 09:43:36 -08:00
Patryk Duda c79cce57b3 dts: arm: st: g4/l4/l5: Add reset controller node
Reset controller node is necessary to enable support for resetting
peripherials using RCC.

This patch also includes RCC reset registers offsets used by STM32_RESET
macro.

Signed-off-by: Patryk Duda <pdk@semihalf.com>
2022-12-09 09:43:36 -08:00
Patryk Duda 4310d29a46 dts: arm: st: g0: Add reset controller node
Reset controller node is necessary to enable support for resetting
peripherials using RCC.

This patch also includes RCC reset registers offsets used by STM32_RESET
macro.

Signed-off-by: Patryk Duda <pdk@semihalf.com>
2022-12-09 09:43:36 -08:00
Patryk Duda 7dd9f11520 dts: arm: st: h7: Add reset controller node
Reset controller node is necessary to enable support for resetting
peripherials using RCC.

This patch also includes RCC reset registers offsets used by STM32_RESET
macro.

Signed-off-by: Patryk Duda <pdk@semihalf.com>
2022-12-09 09:43:36 -08:00
Patryk Duda e03aba03ec dts: arm: st: f2/f4/f7: Add reset controller node
Reset controller node is necessary to enable support for resetting
peripherials using RCC.

This patch also includes RCC reset registers offsets used by STM32_RESET
macro.

Signed-off-by: Patryk Duda <pdk@semihalf.com>
2022-12-09 09:43:36 -08:00
Patryk Duda 90b20f0e23 dts: arm: st: f0/f1/f3: Add reset controller node
Reset controller node is necessary to enable support for resetting
peripherials using RCC.

This patch also includes RCC reset registers offsets used by STM32_RESET
macro.

Signed-off-by: Patryk Duda <pdk@semihalf.com>
2022-12-09 09:43:36 -08:00
Patryk Duda d6f8e9ae5b drivers: reset: Introduce STM32 reset controller
This driver exposes STM32 RCC reset functionality through reset API.

Information about RCC register offset and bit is encoded just like GD32.
The first 5 least significant bits contains register bit number.
Next 12 bits are used to keep RCC register offset. Remaining bits are
unused.

Signed-off-by: Patryk Duda <pdk@semihalf.com>
2022-12-09 09:43:36 -08:00
Filip Brozovic 3453a3b247 drivers: pinctrl: add numicro pinctrl driver
This commit adds a pinctrl driver for the Nuvoton NuMicro family
of processors.

Signed-off-by: Filip Brozovic <fbrozovic@gmail.com>
2022-12-08 18:46:33 +01:00
Filip Brozovic 8577bb3e84 drivers: gpio: add driver for nuvoton numicro
This commit adds a GPIO driver for the Nuvoton NuMicro family
of processors.

Signed-off-by: Filip Brozovic <fbrozovic@gmail.com>
2022-12-08 18:46:33 +01:00
Francois Ramu c22828ec53 include: bindings: stm32 clock HSI48 defined
The stm32 devices which have a HSI48 clock possibility.
for stm32F0, stm32G0, stm32G4, stm32H7, stm32L0,
stm32L4, stm32L5, stm32U5, stm32WB

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-12-07 10:03:11 +00:00
Gerard Marull-Paretas 649a8195b3 drivers: regulator: pca9420: refactor mode handling
- Similar to what was done for other parts of the driver, remove any
  register specification from Devicetree (modesel-reg/mask)
- Keep all the information in the driver, and define modes as "numbers",
  e.g. PCA9420_MODE0: 0, PCA9420_MODE1: 1, etc.
- Bindings provide IC defaults now (all modes allowed 0/1/2/3 and
  initial mode set to 0).
- When mode is controlled via the MODESEL0/1 pins (ie directly by an iMX
  MCU using the dedicated PMIC_MODE0/1 pins), the driver will not allow
  to select a mode (it is not possible). This mode is now enabled by
  setting `nxp,enable-modesel-pins` in Devicetree. When enabled, all the
  allowed modes are configured to be selectable via pins. When disabled,
  mode can be set via I2C (using TOP_CNTL3 MODE0/1_I2C fields)

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-12-05 19:10:55 +01:00
Dylan Hung 4224732a57 dts: bindings: reset: add binding for Aspeed AST10x0 reset
Add bindings for Aspeed AST10x0 reset driver.  The reset line can be
de-asserted or asserted through the syscon registers.

Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
2022-12-05 14:36:16 +01:00
Jay Vasanth 38ad230aec drivers: pinctrl: Microchip XEC PINCTRL add invert pin
Microchip XEC GPIO pins support inverting the output of
alternate pin functions. This feature may be useful for
those peripherals that do not implement output inversion
in the peripheral. GPIO control register pad input and
parallel input register values are not affected by the
function output invert feature. GPIO interrupt detection
of an output is inverted if the invert polarity is enabled.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-11-30 11:29:22 +01:00
Georgij Cernysiov a8ac1424d8 include: dt-bindings: clock: stm32h7 add PLL2 defines
Uncomments PPL2 defines as it is supported.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2022-11-29 11:54:52 +01:00
Gerard Marull-Paretas a78bdbce89 dt-bindings: regulator: pca9420: reorganize headers/macros
pca9420_i2c.h has neem remamed to pca9420.h (device only has I2C, so
it's kind of redundant to have i2c in the header name).

pmic_i2c.h was again not generic but designed specifically for PCA9420.
All its macros have been renamed, s/PMIC/PCA9420, and moved to the
pca9420.h header.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-29 11:54:31 +01:00
Gerard Marull-Paretas 9219d3d2b5 drivers: regulator: pca9420: fix VIN current limit setting
The driver had a conceptual issue regarding current limitation. PCA9420
is able to limit the current flowing through VIN, ie input current. This
is a global setting, not individual to each regulator. This patch
creates a new DT property: nxp,vin-ilim-microamp to specify such limit.
It is applied when the device is initialized.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-29 11:54:31 +01:00
Gerard Marull-Paretas dcd63d288f drivers: regulator: pca9420: refactor voltage range handling
Voltage ranges were hardcoded in Devicetree, however, things can be
significantly simplified by using the recently introduce linear ranges
API. All values are now computed using information stored in the driver,
so there is no need to store any lookup table in ROM. Code should now
both be faster in average and consume less ROM.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-29 11:54:31 +01:00
Gerard Marull-Paretas 1caedf12dd drivers: regulator: pca9420: do not expose registers in DT
Regulator registers were set for each BUCK/LDO in DT, likely because of
the way the devices were instantiated. When using a generic iterator,
ie, DT_INST_FOREACH_CHILD, there's no way to differentiate the child
being _parsed_. Since instantiation happens now based on child node
names, we are able to know which registers each devices gets assigned at
the driver level. This greatly simplifies Devicetree, and it actually
removes information that is not strictly hardware description from it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-29 11:54:31 +01:00
Gerard Marull-Paretas 85becbb5b3 drivers: regulator: pca9420: remove unused registers
The PCA9420 dt-bindings include file defines all device registers, but
many of them are not used (e.g. battery charger). It is also not the way
to use register definitions. Devicetree is about hardware description
after all. File will be cleaned up in subsequent commits.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-29 11:54:31 +01:00
Mulin Chao 0893ca8c2f driver: gpio: npcx: correct the usage of npcx voltage flags
In npcx ec series, two detection levels, 3.3V (default) and 1.8V are
supported during gpio configuration. But the current implementation
always selects default detection level whether NPCX_GPIO_VOLTAGE_1P8 is
set. This PR is a fix for this issue.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2022-11-28 09:56:33 +00:00
Gerard Marull-Paretas eaadea5508 drivers: gpio: npm6001: initial driver
Add GPIO driver for the GPIO controller embedded in the nPM6001 PMIC.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-22 11:05:19 +01:00
Guillaume Gautier b5f9ea073e include: zephyr: dt-bindings: clock: Add sysclk for STM32F1, F4 & L1
For STM32F1, F4 & L1 series, add the definition of SYSCLK to solve a
regression concerning the RTC counter

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2022-11-21 10:14:41 +01:00
Gerard Marull-Paretas b0dc5eee36 drivers: gpio: remove deprecated drive strength/voltage/debounce flags
Such generic flags were replaced for vendor-specific flags. Zephyr
releases 3.1 and 3.2 have shipped with the flags deprecated, it is now
time to remove them.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-11 11:00:26 +01:00
Gerard Marull-Paretas b1552001bf drivers: gpio: npcx: fix usage of deprecated voltage macros
The NPCX driver did use deprecated voltage macros. Define vendor
specific flags instead.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-11 11:00:26 +01:00
Guillaume Gautier 00504fd585 include: zephyr: dt-bindings: clock: Add RTC clk src defines for STM32
For all STM32 series, add some defines to select the RTC clock source.
This change is necessary to be able to select the RTC clock source in
dts instead of Kconfig

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2022-11-10 11:27:49 +00:00
Sam Hurst a1e6e9dfbe dts: usb-c: Introduce usb-c-connector
A USB TypeC connector has many peripherals associated with
it and the DTS binding in this commit provides a way to group
peripherals and properties in a device tree.
This binding is used with the USB-C Subsytem.

This is based on Linux, documentation:
https://www.kernel.org/doc/Documentation/devicetree/bindings/connector/usb-connector.yaml

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2022-10-22 18:38:35 -04:00
Gerard Marull-Paretas 43b8ee7363 dt-bindings: clock: stm32: fix STM32_CLOCK macro docs location
Doxygen docs for a macro need to be placed together with the macro being
documented (unless using `@def`).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-17 14:40:31 +09:00
Gerard Marull-Paretas 440bbe0820 dt-bindings: pinctrl: stm32: fix STM32*_PINMUX docs location
Documentation for STM32*_PINMUX macros was incorrectly placed above the
macro, so it was in practice documenting the next macro (e.g.
STM32_MODE_SHIFT).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-17 14:40:31 +09:00
Manuel Arguelles 337dc5d651 soc: arm: add pinctrl support for NXP S32Z/E SoC's
Introduce support for Pinctrl driver on NXP S32Z/E SoC's.
The NXP S32 pin controller is a singleton node responsible for
controlling the pin function selection and pin properties, based on the
pin node group approach. The pinmux configuration is encoded in a
32-bit value.

Each S32 SoC implementing Pinctrl must create a `pinctrl_soc.h` header
which define SoC-specific macros to initialize the pinctrl structure.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2022-10-14 09:51:14 +02:00
Daniel DeGrasse 1d50265a2f include: dt-bindings: update regulator defintions for PCA9420 for modes
Update regulator binding definitions for PCA9420 to support mode setting
features. This will allow the 4 voltage modes present on the PCA9420 PMIC
to be utilized.

Note that bindings have also been updated to indicate the default
register value and target voltage for each regulator on the PCA9420.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-10-12 18:40:24 +02:00
Valerio Setti cda7d05ca6 dts: sensor: adding nodes for STM32 quadrature encoder
Nodes for quadrature encoders are added to the STM32F4 devices

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2022-10-03 10:10:31 +02:00
Tim Lin 3474ba919f ITE: drivers/i2c: FIFO2 can be selected to support channel of B or C
FIFO2 can be selected to support channel of B or C by dtsi.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-09-22 14:58:42 +00:00
Daniel Leung 3e8f97009d i3c: add I3C controller driver for MCUX
This adds a very basic driver to utilize the I3C IP block
on MCUX (e.g. RT685). Note that, for now, this only supports
being the active controller on the bus.

Origin: NXP MCUXpresso SDK
License: BSD 3-Clause
URL: https://github.com/zephyrproject-rtos/hal_nxp
Commit: 2302a1e94f5bc00ce59db4e249b688ad2e959f58
Purpose: Enabling the I3C controller on RT685.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-09 17:42:33 -04:00
Andriy Gelman 5feae0eafc drivers: pinctrl: Add pinctrl driver for xmc4xxx
Add pinctrl driver for infineon xmc4xxx devices.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2022-09-09 16:28:41 -04:00
Daniel DeGrasse 03654969aa dts: add binding for LPC SDIF
add binding for LPC SDIF SD host controller

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-09-08 10:06:28 +02:00
TOKITA Hiroshi 4f7201463a dts: bindings: adc: Add RaspberryPi Pico ADC
Define RaspberryPi Pico ADC.

The ADC has internally connected temperature sensor,
Add property to enable this.

The ADC has a single VREF. VCC usually connects to it,
but it may not be in a case.
Add property to make configurable it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-09-06 17:11:19 +02:00
Gerard Marull-Paretas 4aa31b4526 drivers: clock_control: gd32: initial support
This patch adds a clock control driver for GD32 platforms. It is
important to note that the driver is only able to handle peripheral
clocks, but not "system clocks" (e.g. PLL settings, SYS_CK, etc.).  On
some similar platforms (STM32) this task is embedded in the same clock
driver, performed at init time but with no options to do any
manipulation at runtime via the API calls. The clock control API as-is
is really orthogonal to "system clocks", and it is arguably a bad idea
to embed system clock init code in a clock control driver. It can be
done at SoC level still using Devicetree as a source of hardware
description/initial configuration.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-09-06 09:57:25 +02:00
Sylvio Alves 00991bde3d binding: clock: esp32: fix reference values
Both ESP32 and ESP32S2 clock reference were not
correct and this fixes that.

Fixes #49876

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-09-05 15:33:01 +00:00
Gerard Marull-Paretas f7c13df36c include: dt-bindings: reset: gd32f3x0: fix ADDAPT1RST_OFFSET
The ADDAPB1RST_OFFSET was incorrectly set to 0xE0, but it is 0xFC in
this series.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-09-05 09:36:04 +00:00
Vijay Hiremath f262b795b8 eSPI: npcx: Enable platform specific Virtual Wire GPIOs
Added code to enable platform specific Virtual Wire GPIOs. With this
change, able to send the USB-C overcurrent Virtual Wire event to
Meterolake SOC.

Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
2022-09-02 10:36:24 +00:00
Thomas Stranger 705c203f26 include: dt-bindings: pinctrl: stm32f1-afio: fix can & eth pinmap
The bindings for the stm32f105 afio pin remap had defined the wrong
offset for CAN and ETH.
This commit corrects those to the bits specified in RM0008 Rev.21,
but the changes could not be verfied on hw.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-09-01 05:56:47 -05:00
Bartosz Bilas d6cf6e7bb2 dt-bindings: sensor: ina237: rename the operating modes
Adjust the names of the operating modes to match them
with the datasheet and INA230 pattern. While at it add
the missing INA237_OPER_MODE_TEMP_TRIG mode.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2022-08-31 21:51:14 +00:00
Andrzej Kaczmarek f19252567c drivers: pinctrl: Add driver for smartbond
This adds pinctrl driver for Renesas SmartBond(tm) MCU family.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2022-08-31 20:32:03 +02:00
Gerard Marull-Paretas 28b59890a6 drivers: reset: gd32: add initial support
Add a new reset driver for GD32 platforms. This driver controls the
reset registers from the RCU peripheral. It can be used to restore
peripherals to their initial state when initializing a device.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-08-29 10:30:49 +02:00
Gerard Marull-Paretas 223cc3c6bd drivers: pinctrl: nrf: add support for disconnecting a pin
It was not possible to disconnect a pin using the nRF pinctrl driver.
That is, it was not possible to set PSEL to 0xFFFFFFFF (indicating pin
is not connected). This can be useful in certain scenarios, e.g. a
bootloader configures all signals of a certain peripheral but
application then needs to disconnect certain signals.

A new DT macro has been introduced to accomplish this:
NRF_PSEL_DISCONNECT. It can be used like this to explicitely disconnect
a peripheral signal:

```
&pinctrl {
	uart0_default: uart0_default {
		group1 {
			psels = <NRF_PSEL(UART_TX, 0, 1)>,
				<NRF_PSEL_DISCONNECTED(UART_RX)>;
		};
	};
};
```

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-25 14:38:26 -07:00
TOKITA Hiroshi 8a8e893bd2 dts: arm: rpi_pico: Adding spi configurations to rp2040
Add spi0 and spi1 configuration to rp2040.

spi0 and spi1 are declared as compatible with
"raspberrypi,pico-spi" and "arm,pl022".
"raspberrypi,pico-spi" is just inherited from
"arm,pl022" and "reset-device"

spi0 and spi1 declare as compatible with "raspberrypi,pico-spi"
and "arm,pl022".
"raspberrypi,pico-spi" is just inheriting "arm,pl022" and
"reset-device" for declaring the 'reset' property,
with no additional property and implementation.

Add also pinctrl macros to dt-bindings header.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-08-18 10:18:16 +02:00
Erwan Gouriou 7911fc3c35 include: dt-bindings: stm32 clocks: Use "domain" wording when possible
Update stm32 clocks include files to use "domain" when possible.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-08-08 14:17:07 +02:00
Andriy Gelman af6179d567 drivers: gpio: Add xmc4xxx drivers
Adds gpio drivers for xmc4xxx SoCs.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2022-08-05 13:00:21 +02:00
Gerard Marull-Paretas 6de9fcf315 soc: riscv: gd32vf103: use nuclei,systimer compatible
After some analysis I found out that there's no machine timer provided
by the "riscv" vendor. There are some specs for the mtime/mtimecmp
registers (this is why we can have a single driver), but the actual
register layout or implementations differ amongst vendors. GD32 uses the
Nuclei implementation, named "system timer" in their documentation. This
patch aligns with vendor specs.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-02 09:12:31 +02:00
Jun Lin ec4f700202 driver: PECI: npcx: add driver support for Nuvoton npcx family
This commit add the PECI driver for Nuvoton npcx family to support PECI
APIs.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2022-07-29 14:09:17 +02:00
Dylan Hung 662acc277e dts: bindings: clock: add binding for Aspeed AST10x0 clock
Add binding for Aspeed AST10x0 clock driver.  The clocks can be turned
on or off through the syscon registers.

Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
2022-07-28 08:30:27 +02:00
Francois Ramu efa4d2c42a include: clock: stm32h7 helper for this serie
For the stm32h7x3 and stm32h7x5 there is a octospi
clock configuration in the D1CCIPR register

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-07-27 18:46:25 +02:00
Glauber Maroto Ferreira 17c29befc9 esp32: dt-bindings: clock_control: add RTC clock definitions
Add RTC source clock frequency definitions to
clock_control dt bindings.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-07-27 09:48:33 +02:00
Thomas Stranger 1e67957ad9 dts: stm32u5 add pll2 and pll3 nodes and add them as clk sources
This commit adds the pll2 and pll3 clock control nodes
with st,stm32u5-pll-clock compatible.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-07-25 15:57:12 -07:00
Thomas Stranger 4f632b0ca2 dt-dindings/clock: add HSE as clock source for stm32g0 and stm32g4
HSE is a valid alternate clock source for these series,
therefore STM32_SRC_HSE is added in this commit.

Both series can use HSE as an alternate clock source for USB and FDCAN.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-07-25 15:17:00 +02:00
Mulin Chao 24fb705cdd npcx: scfg: psl: cleanup unused functions and DT files
Clean up unused psl functions in scfg.c, unused DT macros, unused psl DT
nodes and related yaml files. Currently, PSL pad configurations are made
by pinctrl mechanism. Please refer
https://issuetracker.google.com/234861079 for more detail.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2022-07-15 10:00:15 +02:00
Gerard Marull-Paretas 2533b13cd2 drivers: gpio: nrfx: add custom drive flags
Now that we have 8 bits reserved for vendor specific GPIO flags,
introduce a new set of flags for nRF platforms to configure pins drive
mode. These new flags are equivalent to the previous existing ones, but
use a naming scheme the fits better with vendor hardware capabilities.

The table below shows the equivalence between old and new flag

| Old flags                 | New flags             |
|---------------------------|-----------------------|
| `NRF_GPIO_DS_DFLT_LOW`    | `NRF_GPIO_DRIVE_S0`   |
| `NRF_GPIO_DS_DFLT_HIGH`   | `NRF_GPIO_DRIVE_S1`   |
| `NRF_GPIO_DS_ALT_LOW`     | `NRF_GPIO_DRIVE_H0`   |
| `NRF_GPIO_DS_ALT_HIGH`    | `NRF_GPIO_DRIVE_H1`   |
| `NRF_GPIO_DS_DFLT`        | `NRF_GPIO_DRIVE_S0S1` |
| `NRF_GPIO_DS_ALT`         | `NRF_GPIO_DRIVE_H0H1` |
| `NRF_GPIO_DS_DFLT_LOW \|` | `NRF_GPIO_DRIVE_S0H1` |
| `NRF_GPIO_DS_ALT_HIGH`    |                       |
| `NRF_GPIO_DS_ALT_LOW \|`  | `NRF_GPIO_DRIVE_H0S1` |
| `NRF_GPIO_DS_DFLT_HIGH`   |                       |

Documentation has been written to explain in more detail the meaning of
the flags and how they can be used.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-11 13:22:24 +02:00
Gerard Marull-Paretas e29055a225 drivers: gpio: nrfx: remove custom DS flags
The naming of the custom DS flags is not clear for nRF platforms. This
patch removes all the NRF_GPIO_DS* flags. New flags will be
re-introduced in a follow-up commit.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-11 13:22:24 +02:00
Erwan Gouriou 8d32c98043 include: dt-bindings: clocks: stm32f4: Source clocks cleanup
For now, on stm32f4 series, we only define PLL_P, PLL_Q and PLL_R
source clocks are they are required by the driver to allow configuration
of respective PLL outputs.
No other source clock are supported yet.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-07-08 20:04:36 +00:00
Yuriy Vynnychek 53c6983442 dts: riscv: add Telink B91 ADC driver support
Added ADC driver DTS support for Telink B91 platform.

Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
2022-07-08 11:07:18 +02:00
Francois Ramu d1b80bf010 dt-bindings/clock: stm32f4 peripheral clock source
The STM32_SRC_xxx definitions which are needed
for some peripherals of the stm32f4 soc.
Only the minimum clock sources are listed.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-07-08 10:48:54 +02:00
Joep Buruma 2e3d446c6e dts: arm: rpi_pico: add dt bindings for pwm
Add devicetree bindings for pwm peripheral using pinctrl

Signed-off-by: Joep Buruma <burumaj50@gmail.com>
2022-07-07 15:17:26 +02:00
Thomas Stranger 61e2c29e9f dts: clock: stm32 common: bindings for pllp, pllq, pllr clock sources
This commit introduces bindings that allow socs compatible with the
stm32 common driver to use the pll outputs pll_p, pll_q, pll_r,
to be used as a clock source for peripherals.
These are to be used instead of the, now removed, STM32_SRC_PLLCLK.
Applies to: STM32G0, STM32G4, STM32L4, STM32L5, STM32WB, and STM32WL.

STM32F2, and STM32F4 are not considered: very similar but only very limited
configuration possible. Only I2S(EXTclock,PLL_R), MC01, MCO2,
PLL_Q for 48MHz clock, and PLL_P as PLLCLK.

Doesn't apply to STM32L0, and STM32L1 which only have PLLMUL and PLLDIV.

Doesn't apply to STM32F0, STM32F1, STM32F3 only having a PLLMUL,
and no divider.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-07-04 16:41:24 +02:00
Thomas Stranger d5146e65c7 dt-bindings/clock: remove STM32_SRC_CLOCK_MIN / MAX definitions
The STM32_SRC_CLOCK_MIN and STM32_SRC_CLOCK_MAX defines
are not really needed because non valid clock sources are already
filtered out by the precompiler.

Only STM32_SRC_CLOCK_MIN was used once in code and can be replaced.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-07-04 16:41:24 +02:00
HaiLong Yang 9bb8ae9f13 dts: introduce gd32 adc
Add support for gd32 adc.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2022-07-04 09:48:32 +02:00
Thomas Stranger 87ed12d796 dts: bindings: clock: Fix STM32G4 device clk src selection definitions
Some device clock sources selection helpers were not correctly defined.

With this commit the definitions are updated to match the desciption
in the reference manual RM0453.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-06-30 10:34:51 +02:00
Henrik Brix Andersen 1ff7c224a0 dts: bindings: pinctrl: add Xilinx Zynq-7000 pinctrl devicetree binding
Add devicetree binding for the Xilinx Zynq-7000 series pinctrl.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-06-28 20:46:11 +02:00
Aymeric Aillet d8f66b7343 dts: rcar: Rework clock definition
This commit is reworking clock definition in
order to match linux filetree and definition
as much as possible.

- dt-bindings: rework renesas clocks dt-bindings
  - regroup renesas related dt-bindings in a folder
  - rename renesas rcar common dt-binding to match linux name
  - add soc specific dt-binding matching linux name
  - soc dt-bindings are defining clocks matching linux names

- dts: use new clocks names
  - move clocks definitions in SoC layer for each core clock entry

- driver: use new clocks names

As seen in this commit, we are declaring clocks for "R8A7795" SoC
to match linux names.
Linux is not declaring "R8A77951" SoC specific files because
its also supporting the first H3 SoC version numbered "R8A77950".

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2022-06-28 18:11:44 +02:00
Thomas Stranger 2bd80c6fb1 dts/arm/st: fix stm32g0 STM32_PERIPH_BUS_MAX
All STM32G0 SoCs have two sets of APB registers(APB1 and APB2).
Therefore set STM32_PERIPH_BUS_MAX to 0x40 (STM32_CLOCK_BUS_APB2)
for this series.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-06-21 10:48:46 +02:00
Georgij Cernysiov 8a237848b0 include: bindings: ospi flash add dual, quad modes
Adds dual and quad mode defines.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2022-06-16 10:29:15 +02:00
Chay Guo b47a8a428f drivers: clock_control: mcux_lpc_syscon_clock: Add flexcomm16 suppport
Added FlexCOMM16(HS SPI1) clock for MIMXRT5xx.

Signed-off-by: Chay Guo <changyi.guo@nxp.com>
2022-06-13 12:10:57 +02:00
Fabio Baltieri 449516c135 doc: add pwm_interface tag to dt-bindings/pwm/pwm.h
Add Doxygen tags to dt-bindings/pwm/pwm.h so that the binding macros
show up on the documentation page.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-05-25 17:16:55 -07:00
Andrzej Głąbek 77edc2c852 dts: Include ADC DT binding headers from nRF SoC dtsi files
Add inclusions of header files with devicetree related ADC definitions
to the nRF SoC dtsi files so that those definitions can be used also
for nRF SoC based boards.
Provide definitions of nRF ADC and SAADC analog inputs suitable
for use in devicetree.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-05-13 12:46:06 -07:00
Francois Ramu c16de1580f include: bindings: new bindings for the ospi flash controller
The new octoSPI flash controller driver
requires parameter to configure the peripheral
especially matching the data mode and the transfer rate

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-05-12 14:56:25 -05:00
Gerard Marull-Paretas 83cfd295b9 drivers: mipi_dsi: initial support for MIPI-DSI drivers
Add initial support for MIPI-DSI drivers.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-05-12 09:26:50 -05:00
Daniel DeGrasse f354e00a2c include: dt-bindings: add lpc pin control definitions
add pin control definitions for LPC11u6x to LPU11u6x pinctrl binding.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-10 17:27:44 -05:00
Erwan Gouriou 988fe8d5a2 include/dt-bindings/clock: stm32: Add clock sources bindings
Add clock sources bindings on F0/F3/G0/G4/L0/L1/L4/WB/WL series.
Due to inconsistencies, some common bindings are now split:
F1 -> F0/F1/F3
L4 -> L4/G4/WB
Update .dtsi files when required

In a first step, allowed sources are limited to already supported
clocks: LSI/LSE/HSI/HSE/MSI/PCLK/PLLCLK/SYSCLK
Support for other clocks such as HSI48, SAIXCLK, ... is left for a
next step.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-05-10 18:42:30 +02:00
Erwan Gouriou e579027d20 include/dt-bindings/clock: stm32: Factorize Clock source binding accessors
Rename and factorize clock source bindings accessors by moving them
in common header file stm32_clock_control and remove them from
include/dt-bindings/clock/stm32XY_clock.h files

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-05-10 18:42:30 +02:00
Erwan Gouriou 424f937c2b drivers/clock_control: stm32u5: Add support for optional clocks config
This change updates stm32u5 driver to support configuration of
optional clocks on peripherals.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-05-10 18:42:30 +02:00
Erwan Gouriou c9f5113d80 include/dt-bindings/clock: Add stm32u5 clock bindings
This new binding allows to work on providing stm32u5 specific
alternate and complementary device clocks.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-05-10 18:42:30 +02:00
Erwan Gouriou ceb6ecc740 dts/arm/st: stm32h7: Add perck clock-mux node
Add perck clock-mux node as disabled by default and
the include bindings helping to select it.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-05-10 18:42:30 +02:00
Erwan Gouriou 833eda84d3 drivers/clock_control: stm32h7: Add support for alt clocks
Add support for alternate clocks configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-05-10 18:42:30 +02:00
Gerard Marull-Paretas fb9b3bcd93 include: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all includes within
include directory to the new prefix <zephyr/...>. Note that the
conversion has been scripted, refer to zephyrproject-rtos#45388 for more
details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 20:03:00 +02:00
Tim Lin 4cf45f4770 ITE: drivers/pinmux: Remove it8xxx2 pinmux driver
Remove the driver related it8xxx2 pinmux.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-05-06 11:32:40 +02:00
Tim Lin efaeed6cb2 ITE: drviers/pinctrl: Add pinctrl driver for IT8XXX2
Add pinctrl driver for ITE IT8XXX2.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-05-06 11:32:40 +02:00
Henrik Brix Andersen 1dc3b237fa drivers: pinctrl: add OpenISA RV32M1 pinctrl driver
Add OpenISA RV32M1 pinctrl driver.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-05-05 13:34:39 -05:00
Jan Peters 253cec5c95 drivers: counter: add driver for NXP QTMR counters
The driver is implemented using the MCUXpresso SDK.

Signed-off-by: Jan Peters <peters@kt-elektronik.de>
2022-05-03 20:41:23 -05:00