Commit graph

3664 commits

Author SHA1 Message Date
Mulin Chao
8efc935288 drivers: uart: add pinctrl driver support
Replace soc-specific pin functions with Zephyr pinctrl api functions for
pin-mux configuration in uart driver.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2022-05-12 14:24:03 -05:00
Mulin Chao
d53d574bf0 drivers: pinctrl: npcx: add initial pin-controller driver
This CL is the initial version for npcx pinctrl driver and introduces
pinctrl nodes for both IO-pads and peripheral devices for each npcx
series. Users can set pin configuration via these nodes in the board
layout DT file. It also wraps all configurations related to pin-muxing
in pinctrl_soc.h. Regarding the other pin properties, we will implement
them later.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2022-05-12 14:24:03 -05:00
Mahesh Mahadevan
450a1c0982 drivers: display: Add support for Raydium RM68200
Add support for the Raydium RM68200 MIPI DSI panel.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-05-12 09:26:50 -05:00
Mahesh Mahadevan
27800c2fd7 drivers: mipi: Add MIPI DSI driver for MXRT devices
Add a MIPI DSI driver for the MIPI controller on
NXP MXRT SoC'sUpdate MIPI_DSI

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-05-12 09:26:50 -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
Gerard Marull-Paretas
9678bd6970 pinctrl: nrf: prefix custom drive-mode property
The drive-mode property is nRF specific, so prefix it with `nordic,`,
same as the `nordic,invert` property.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-12 09:22:12 +02:00
Daniel DeGrasse
7e89ce9f19 drivers: serial: enable pin control for lpc11u6x serial driver
Enable pin control api for lpc11u6x serial driver, and remove pinmux api
usage.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-10 17:27:44 -05:00
Daniel DeGrasse
069280c8a4 drivers: i2c: i2c_lpc11u6x: enable pin control
Enable pin control for lpc11u6x i2c driver, and remove pinmux usage from
board level DTS files.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-10 17:27:44 -05:00
Daniel DeGrasse
8e07e21424 drivers: clock_control: convert lpc11u6x syscon driver to pinctrl
convert lpc11u6x syscon clock driver to pin control, and remove all
pinmux usage from driver and syscon dts node.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-10 17:27:44 -05:00
Daniel DeGrasse
1916fb21dd drivers: pinctrl: update lpc pinctrl driver for lpc11u6x
Update pin control driver for lpc11u6x. This SOC does not have a HAL,
so fsl_clock is not available. It also lacks a slew-rate field in the
IOCON register, so this property must be optional.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-10 17:27:44 -05:00
Daniel DeGrasse
81c209dc2d drivers: gpio_lpc11u6x: use pio nodes to configure pin mux for gpio
switch gpio driver to use pio nodes to configure pin control settings,
and stop using pinmux driver within gpio driver.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-10 17:27:44 -05:00
Erwan Gouriou
d9b9e12cd3 dts/bindings/clocks: stm32: 'clock-names' optional for source clock setting
Since implementation of clock source selection in consumer device drivers
could be achieved without usage of a clock-names property and no
example of usage is provided up to now, remove this property from existing
examples.
Additionally, make it clear in stm32 clock control binding that it is
driver's responsibility to correctly access clock source information
and use it as required.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-05-10 18:42:30 +02:00
Erwan Gouriou
e79fea3b78 dts/bindings/clocks: Add stm32 clock mux binding
Add STM32 clock mux binding.
Only property of a node using such compatible is to
select a clock input.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-05-10 18:42:30 +02:00
Henrik Brix Andersen
ebbb4b67b9 drivers: can: sam: use UPLL clock instead of PLLA clock
Use the UPLLCK clock for the CAN controller as recommended by the Atmel SAM
E70 data sheet.

Move the configuration of the clock prescaler from Kconfig to devicetree
and limit it to the values recommended by the SAM E70 datasheet.

Fixes: #45012

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-05-09 09:27:40 +02:00
Naga Sureshkumar Relli
bfbcb3973a dts: riscv: introduce Polarfire SOC QSPI interface
Add support for the Microchip Polarfire SOC QSPI interface.

Signed-off-by: Naga Sureshkumar Relli <nagasuresh.relli@microchip.com>
2022-05-06 11:32:54 +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
bd8afe7ef0 ITE: drivers/kscan: Use pinctrl instead of pinmux driver
Use pinctrl instead of pinmux driver.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-05-06 11:32:40 +02:00
Tim Lin
3670977158 ITE: drivers/peci: Use pinctrl instead of pinmux driver
Use pinctrl instead of pinmux driver.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-05-06 11:32:40 +02:00
Tim Lin
5551872047 ITE: drivers/sensor: Use pinctrl instead of pinmux driver
Use pinctrl instead of pinmux driver.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-05-06 11:32:40 +02:00
Tim Lin
8ecd5bb2f7 ITE: drivers/pwm: Use pinctrl instead of pinmux driver
Use pinctrl instead of pinmux driver.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-05-06 11:32:40 +02:00
Tim Lin
64ff1a8efe ITE: drivers/i2c: Use pinctrl instead of pinmux driver
Use pinctrl instead of pinmux driver.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-05-06 11:32:40 +02:00
Tim Lin
74321f11d6 ITE: drivers/adc: Use pinctrl instead of pinmux driver
Use pinctrl instead of pinmux driver.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-05-06 11:32:40 +02:00
Tim Lin
07d9a4292d ITE: drivers/serial: Use pinctrl instead of pinmux driver
Use pinctrl instead of pinmux driver.

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
64c9fadc7c drivers: pwm: rv32m1: tpm: add pinctrl support
Add pinctrl support to the OpenISA RV32M1 TPM PWM driver.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-05-05 13:34:39 -05:00
Henrik Brix Andersen
c83a0d5d1f drivers: spi: rv32m1: lpspi: add pinctrl support
Add pinctrl support to the OpenISA RV32M1 LPSPI SPI driver.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-05-05 13:34:39 -05:00
Henrik Brix Andersen
7b33d4af6c drivers: i2c: rv32m1: lpi2c: add pinctrl support
Add pinctrl support to the OpenISA RV32M1 LPI2C I2C driver.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-05-05 13:34:39 -05:00
Henrik Brix Andersen
738e9f57f9 drivers: serial: rv32m1: lpuart: add pinctrl support
Add pinctrl support to the OpenISA RV32M1 LPUART serial driver.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-05-05 13:34:39 -05:00
Henrik Brix Andersen
db643ea610 dts: bindings: pinctrl: add pinctrl binding for OpenISA RV32M1
Add pinctrl devicetree bindings for the OpenISA RV32M1.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-05-05 13:34:39 -05:00
Arsen Eloglian
0a2df833f9 dts: add binding for intel ssp
Add ssp (sspbase) node for Intel ssp.

Signed-off-by: Arsen Eloglian <ArsenX.Eloglian@intel.com>
2022-05-05 08:47:03 -05:00
Daniel Leung
3d10381118 dts: bindings: counter: add motorola,mc146818
Add DTS binding for Motorola MC146818 compatible Real Time Clock.
This is being used for the RTC/CMOS timer on x86 PC-compatible
platforms.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-05-04 09:42:26 -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
Jay Vasanth
b7f60b2354 drivers: ps2: Microchip XEC PS2 driver add PINCTRL support
Add optional PINCTRL support to the Microchip XEC PS2 driver
shared between MEC15xx and MEC172x families.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-05-03 14:13:20 -05:00
Jay Vasanth
bacf4ff730 drivers: ps2: Standarize device tree and structure
Standardize PS2 device tree properties. Standardize device
structure usage. Abstract GIRQ and PCR register access.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-05-03 14:13:20 -05:00
Bernardo Perez Priego
cfe4d51b4f drivers: sensor: Add adc-comparator binding and implementation for NPCX
Comparator will monitor signal though ADC channel, based on
user configuration, callback will be triggered.
This will enable comparator functionality for nuvoton MCU utilizing its
ADC threshold detection feature. Implementation is exported through
sensor trigger API. Use of CONFIG_ADC_CMP_NPCX is required.

Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
2022-05-03 08:51:53 -05:00
Daniel DeGrasse
bca321ceb6 dts: bindings: add rt600/500 iocon pin control binding
add dts binding for RT600/RT500 pin control peripheral.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-02 13:28:10 -05:00
Daniel DeGrasse
19cc2f6ec2 drivers: pinctrl: update pin control driver for lpc54xxx
update pin control driver with bindings and header for lpc54xxx

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-02 09:41:42 -05:00
Daniel DeGrasse
102f4c25f8 drivers: disk: remove legacy SDMMC SPI driver
remove existing SDMMC SPI driver, since it is replaced by the SPI mode
SD host controller driver.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-04-29 14:21:36 -05:00
Daniel DeGrasse
c91d473ead drivers: imx_usdhc: change DT_COMPAT string to imx-usdhc
with the legacy USDHC driver fully removed from the tree, the
nxp,imx-usdhc binding can now be used for the new SD host controller
driver.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-04-29 14:21:36 -05:00
Daniel DeGrasse
409cc23022 drivers: disk: remove legacy nxp USDHC driver
all in tree SOCs with the USDHC peripheral have now been converted to
use the new SD host controller USDHC driver, so remove legacy NXP disk
USDHC driver.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-04-29 14:21:36 -05:00
Daniel DeGrasse
a3182ced7a drivers: sdhc: add SD SPI mode host controller driver
Add SDHC driver implementing spi mode support for SD cards. This driver
implements the standard SD host controller APIs, and sets the host
property "is_spi" to indicate to the SD subsystem the card will be
running in SPI mode.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-04-29 14:21:36 -05:00
Daniel DeGrasse
792cae9f7d dts: sdhc: Add SDHC DTS bindings
Add generic SDHC dts binding, as well as DTS binding for NXP USDHC.
Update iMX.RT DTS binding to use USDHC compatible

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-04-29 14:21:36 -05:00
Benedikt Schmidt
86469b1d0b drivers: clock_control: Make LSE driving configurable
Make the LSE driving capability configurable for the STM32 series.
Fixes #44737.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2022-04-29 16:11:34 +02:00
Henrik Brix Andersen
270dea717c dts: bindings: can: stm32*: fix descriptions
Fix the descriptions for the ST STM32 FDCAN devicetree bindings. These
are derivates of the Bosch M_CAN, but they target specific SoC
implementations.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-29 05:04:42 -07:00
Henrik Brix Andersen
f1d1153543 dts: bindings: can: rename base Bosch M_CAN binding and compatible
Rename the base Bosch M_CAN CAN-FD controller devicetree binding to
match the product name and the upstream Linux devicetree binding.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-29 05:04:42 -07:00
Henrik Brix Andersen
44817099ad dts: bindings: can: mcan: fold the simple binding into front-end bindings
Fold the simple bosch,m-can devicetree binding into the front-end
devicetree bindings. The bosch,m-can compatible is not used in Zephyr.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-29 05:04:42 -07:00
Leonard Pollak
35b55175cc drivers: sensor: bme680: Add SPI interface
This enables the SPI interface for the BME680 sensor driver.

Signed-off-by: Leonard Pollak <leonardp@tr-host.de>
2022-04-28 18:11:50 +02:00
Marek Janus
6505cbc085 drivers: dac: add mcp4728 driver
MCP4728 is a 12-bit, Quad Digital-to-Analog Converter with EEPROM Memory.
Controlled via I2C interface.

Signed-off-by: Marek Janus <marek.janus@grinn-global.com>
2022-04-28 14:17:34 +02:00
Carlo Caione
7f51907fda ipc_service: static_vrings: Set WQ default type to PRIO_COOP
In 92d8329d5b a new DT property was introduced to set the WQ priority
of the instance. The fallback value when the property was not present
was arbitrarily set to <0 PRIO_PREEMPT>.

The problem is that this value is actually changing the behaviour for
the code that is not explicitly setting the DT property, breaking in
some cases the existing code.

Move the default value to <0 PRIO_COOP> to give the old code a
consistent behaviour before and after the 92d8329d5b commit.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-04-28 10:27:10 +02:00
Glauber Maroto Ferreira
8ff873edef esp32: doc: pinctrl: fixes URL typo
Fixes URL typo and other minor typos.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-04-27 10:08:13 +02:00
Andrzej Głąbek
7c5cc99eb0 dts: bindings: nordic,nrf-qdec: Remove requirement for a-pin and b-bin
This is a follow-up to commit 1a01ca2adf.

Since support for pinctrl has been added to the qdec_nrfx driver,
the related binding can no longer require the `a-pin` and `b-pin`
properties to be defined.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-27 10:07:23 +02:00
Maxime Vincent
307a60e217 drivers/sensor: lis2dw12: add drdy pulsed/latched config
Add DT option to configure the data ready interrupt mode.
Latched is the default; pulsed can be enabled through
the drdy-pulsed DT, if desired.

Signed-off-by: Maxime Vincent <maxime@veemax.be>
2022-04-26 15:53:58 -04:00
Maxime Vincent
652ab7f2d4 drivers/sensor: lis2dw12: add fds + hp_ref support
Add FDS (Filtered Data Type Selection) + High-Pass reference mode support
(FDS in CTRL6, HP_REF_MODE in CTRL7)
Values are configurable through DT per instance.

Signed-off-by: Maxime Vincent <maxime@veemax.be>
2022-04-26 15:53:58 -04:00
Maxime Vincent
2d2a708bc8 drivers/sensor: lis2dw12: add low_noise support
Add low_noise support. (LOW_NOISE in CTRL6)
Value is configurable through DT per instance.

Signed-off-by: Maxime Vincent <maxime@veemax.be>
2022-04-26 15:53:58 -04:00
Maxime Vincent
47021a608d drivers/sensor: lis2dw12: add bw_filt support
Add bandwidth filter support. (BW_FILT in CTRL6)
Value is configurable through DT per instance.

Signed-off-by: Maxime Vincent <maxime@veemax.be>
2022-04-26 15:53:58 -04:00
Gerard Marull-Paretas
6a0deb09a8 dts: bindings: pwm: nxp,imx-pwm: add PWM period cell
The PWM period cell will soon be required by the pwm_dt_spec facilities,
this patch adds support for it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-25 09:00:03 -05:00
Gerard Marull-Paretas
731e068dfb dts: bindings: pwm: snps,designware-pwm: remove unused binding
The binding has no corresponding driver and it is not referenced
anywhere, so drop it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:55 +02:00
Gerard Marull-Paretas
12bcebfa6c dts: bindings: pwm: microchip,xec-pwm: add missing PWM cells
The binding did not define the PWM cells. Only channel and period have
been added as they are the minimum required ones (flags are not supported).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:55 +02:00
Gerard Marull-Paretas
fbc2c5d334 dts: bindings: pwm: litex,pwm: add missing PWM cells
The PWM cells were not specified in the bindings file.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:55 +02:00
Gerard Marull-Paretas
bc0e425324 dts: bindings: pwm: telink,b91-pwm: add PWM period cell
The PWM period cell will soon be required by the pwm_dt_spec facilities.
This patch adds support for it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:49 +02:00
Gerard Marull-Paretas
f2cf96ef71 dts: bindings: pwm: ite,it8xxx2-pwm: add PWM period cell
The PWM period cell will soon be required by the pwm_dt_spec facilities.
This patch adds support for it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:43 +02:00
Gerard Marull-Paretas
9f8e33573e dts: bindings: nxp,sctimer-pwm: add PWM period cell
The period cell will soon be required by the pwm_dt_spec facilities,
this patch adds support for it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:36 +02:00
Gerard Marull-Paretas
71d8d9d9bb dts: arm: silabs: add period cell to PWM
The PWM period cell will soon be required by the pwm_dt_spec facilities,
this patch adds support for it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:22 +02:00
Gerard Marull-Paretas
8f135d525e dts: bindings: pwm: nuvoton: add period cell to PWM
The period cell will soon be required by the pwm_dt_spec facilities,
this patch adds it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:16 +02:00
Gerard Marull-Paretas
ff6924c17b dts: bindings: pwm: atmel,sam0-tcc-pwm: add period cell
The period cell will soon be required by the pwm_dt_spec facilities,
this patch adds it. Note that flags have not been added as they are
optional and not supported anyway.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-24 19:48:01 +02:00
Xavier Chapron
bfcb181b49 drivers: gpio: pca95xx: Add support for PCAL95xx
Introduce has-interrupt-mask-reg DTS property for nxp,pca95xx driver.
This additionnal property allow to specify that the gpio expander has an
interrupt mask register that must be configured by the driver.
This allow to use this driver with PCAL95xx.
This fixes issue #44834.

Signed-off-by: Xavier Chapron <xavier.chapron@stimio.fr>
2022-04-22 14:19:21 -05:00
Daniel DeGrasse
557a0c766c drivers: lpuart: enable loopback mode
NXP LPUART IP supports loopback mode, where TX is internally connected
to RX input. Allow setting loopback mode up via the "nxp,loopback" dts
property.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-04-22 09:44:19 +02:00
Andrzej Głąbek
7760e7c02d boards: bbc_microbit: Update dts and add edge connector node
Align the board dts with the recent changes in the "nordic,nrf-sw-pwm"
binding (remove the no longer existing `channel-count` property) and
add a node representing the edge connector for convenient referring
to SoC pins connected to it.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-22 09:43:26 +02:00
Andrzej Głąbek
afbc6a86c9 dts: bindings: pwm: nordic: Extend pwm-cells with period and flags
... to align with what is used in most other PWM bindings.

Update PWM nodes in SoC .dtsi files accordingly.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-22 09:43:26 +02:00
Andrzej Głąbek
c23a449bfb drivers: pwm_nrf5_sw: Treat pwm parameter as PWM channel, not SoC pin
Align with other PWM drivers and treat the `pwm` parameter (described
ambiguously as "PWM pin") of the `pwm_pin_set_cycles` function as a PWM
channel, not an SoC pin. This will also make the driver consistent with
the `pwm-cells` property definition in the "nordic,nrf-sw-pwm" binding
and with related `DT_PWMS_*` macros.
The change described above requires also providing a way to specify
SoC pins that are to be assigned to the PWM channels. Hence, the commit
introduces in the "nordic,nrf-sw-pwm" binding the `channel-gpios`
property that replaces the `channel-count` one.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-22 09:43:26 +02:00
Erwan Gouriou
12a39dffea dts/bindings/clock: st-stm32(wb)-rcc: Clarify 'clock-frequency' meaning
Rework bindings documentation to clearly illustrate the role of ahb
(and cpu1) prescaler which defines the actual core clock frequency,
and not only a bus frequency.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-04-21 14:09:44 +02:00
Erwan Gouriou
84e1ea0ce1 dts/bindings/clocks: stm32l0-msi-clock: Use enum for allowed values
Use enum to describe the range of allowed MSI values.
This will help to detect configuration issues earlier.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-04-21 14:09:44 +02:00
Erwan Gouriou
8af5e41f91 dts/bindings/clocks: st,stm32f105-pll-clock.yaml: previd is required
"prediv" property should be required and explicitly set as part of board
clock configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-04-21 14:09:44 +02:00
Erwan Gouriou
693ba04796 dts: stm32: Add rcc prop undershoot-prevention
On some parts,  it could be required to use steps before applying
highest frequencies.
This was previously done as part of LL_PLL_ConfigSystemClock_FOO
utility functions which are no more used.
Use device tree to mention when this is required and implement it
in stm32_clock_control_init().

Additionally, fix the calls tp LL_RCC_SetAHBPrescaler, which require
use of ahb_prescaler helper.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-04-21 14:09:44 +02:00
Carlo Caione
1dcea253d2 shared_multi_heap: Rework framework
Entirely rework the shared_multi_heap framework. Refer to the
documentation for more information.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-04-21 13:15:26 +02:00
Mateusz Sierszulski
06e4f36b4b fpga controller: drivers: add ZynqMP driver
This commit adds support for fpga driver on ZynqMP SoC.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2022-04-21 13:00:57 +02:00
Glauber Maroto Ferreira
188e92e531 esp32/s2/c3: dts: uart: remove peripheral property
The pinctrl support made usage of the 'peripheral'
property no longer required.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-04-20 13:27:47 +02:00
Glauber Maroto Ferreira
b53a0db777 esp32: dts: bindings: removal of pinmux bindings
those bindings are no more needed since pinmux was
deprecated in favor of pinctrl.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-04-20 13:27:47 +02:00
Glauber Maroto Ferreira
5353f86af9 esp32: dts: bindings: i2c: update pin properties
After pinctrl's subsystem support, I2C pin properties are
no longer required for pin muxing, however, this information
is still valuable in an eventual FSM failure if the target
SoC has no harwared mechanisms to support bus recovery.

In this case, bus recovery uses pin information to restore
the I2C bus state.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-04-20 13:27:47 +02:00
Glauber Maroto Ferreira
7fb8fe7c13 esp32: dts: bindings: i2c: add pinctrl properties
and removes bindings previously used by the
pinmux driver.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-04-20 13:27:47 +02:00
Glauber Maroto Ferreira
f4c3b12ad2 dts: bindings: spi: esp32: add pinctrl properties
and removes bindings previously used by the
pinmux driver.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-04-20 13:27:47 +02:00
Glauber Maroto Ferreira
70d4a6c25e dts: esp32: add pinctrl bindings and definitions
to support implementation and peripheral usage of the pinctrl
driver API.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-04-20 13:27:47 +02:00
Glauber Maroto Ferreira
1fc2d8f4d3 dts: bindings: serial: esp32: add pinctrl properties
and removes bindings used by pinmux.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-04-20 13:27:47 +02:00
Georgij Cernysiov
778f1d7d72 dts: bindings: memc: stm32: support FMC NOR/PSRAM
Adds STM32 FMC NOR/PSRAM controller bindings.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2022-04-19 11:47:06 +02:00
Tom Burdick
2f320730a1 dma/cavs_hda: Adds link in/link out compatibles
Adds hda link in and out drivers. The link in and link
out channels of HDA have small differences
with the host channels. Updates the existing
cavs_hda drivers and code to account for these
differences.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-04-18 19:19:40 -04:00
Vaishnav Achath
98f1a98cf5 drivers: pinmux: remove cc13xx_cc26xx pinmux driver
all the consumers of the obsolete pinmux driver is
updated to use pinctrl API, this commit removes
the pinmux driver and assosciated sections.

Signed-off-by: Vaishnav Achath <vaishnav@beagleboard.org>
2022-04-18 18:19:46 -04:00
Vaishnav Achath
ace77c71e9 drivers: CC1XX/CC26XX based boards: transition to pinctrl driver
This commit has the necessary changes to update the consumers
of pinmux driver(SPI, I2C, UART) and update the board specific
files to use the pinctrl interface.

Signed-off-by: Vaishnav Achath <vaishnav@beagleboard.org>
2022-04-18 18:19:46 -04:00
Vaishnav Achath
e2ed8cf130 drivers: pinctrl: add CC13XX/CC26XX pinctrl driver
Add pinctrl driver for CC13XX/CC26XX family of SoCs
to facilitate transition from pinmux to pinctrl.

`IOCPortConfigureSet()` from TI hal driverlib used to
implement the generic pinctrl driver.

Signed-off-by: Vaishnav Achath <vaishnav@beagleboard.org>
2022-04-18 18:19:46 -04:00
Georgij Cernysiov
063e9447e0 dts: bindings: timer: stm32: lptim exclude countermode
LPTIMER has a different `countermode` meaning.
We shall exclude introduced property from lptim bindings.

Alternative property (e.g. `external-mode`) can be added
later on to support external counter mode.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2022-04-15 11:59:16 -07:00
Georgij Cernysiov
20dfae9cfd dts: bindings: timer: stm32: add countermode
Adds `countermode` property. That allows to
configure timer counter mode.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2022-04-15 11:59:16 -07:00
Jaska Uimonen
fa1eb1d774 dts: add bindings and definitions for intel ssp
Add ssp (i2s) nodes for Intel ssp. Use them in intel_adsp15
and intel_adsp25.

Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
2022-04-14 11:42:08 -04:00
Georgij Cernysiov
88aee54d54 dts: bindings: memc: stm32: fmc: add st,mem-swap
Introduces H7 FMC bindings with support for
memory remap or swap configuration.

The following values are supported:

* disabled - default mapping (reset state).
* sdram-sram - swaps the NOR/PSRAM and SDRAM banks.
* sdramb2 - remaps SDRAM bank 2.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2022-04-09 12:58:57 +02:00
Konstantinos Papadopoulos
5e519fef40 drivers: ILI9341 add interface control registers
This enables the option through dts to drive the display
with RGB interface.

Signed-off-by: Konstantinos Papadopoulos <kostas.papadopulos@gmail.com>
2022-04-08 15:49:42 -07:00
Mikkel Jakobsen
0b0c2e78e0 drivers: sensor: add icm42670 6-axis accelerometer driver
the icm42670 from Invensense/TDK is a 6-axis accelerometer with
gyroscope and temperature sensing capabilities.

this initial driver does not support the devices 2K FIFO or many of the
other advanced features. Instead, only basic features are implemented.

Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@escolifesciences.com>
2022-04-08 15:49:08 -07:00
Gerard Marull-Paretas
02aec77f77 dts: pwm: gd,gd32-pwm: add period to PWM cells
Add the period cell to GD32 PWM compatible and update all boards
accordingly. A period of 20 ms (50 Hz) has been set for all PWM LEDs.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-07 09:35:22 +02:00
Daniel DeGrasse
415b2bdac0 drivers: pwm: pwm_mcux_sctimer: Add pinctrl support for lpc pwm
add pinctrl support for lpc sctimer pwm driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-04-06 20:57:22 -07:00
Daniel DeGrasse
58008b3085 drivers: serial: Add pinctrl support to usart flexcomm driver
Add pinctrl support to LPC USART flexcomm driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-04-06 20:57:22 -07:00
Daniel DeGrasse
18d70cb20e dts: bindings: add lpc-iocon-pinctrl binding for LPC pinctrl
Add LPC pinctrl binding, for LPC IOCON pinctrl DTS node.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-04-06 20:57:22 -07:00
Shawn Nematbakhsh
c74526919d soc: riscv: sifive-freedom: Get coreclk and peripheral clock from DTS.
Rather than specify input clock for each peripheral individually, instead
specify the relevant clocks in DTS.

This will enable easier support for non-default coreclk on fe310 in a
follow-up CL.

Signed-off-by: Shawn Nematbakhsh <shawn@rivosinc.com>
2022-04-05 12:00:03 +02:00
Shawn Nematbakhsh
3cf0081e60 dts: bindings: riscv: Add and use bindings for sifive CPUs.
No relevant bindings exist for previous CPU compatible properties, so
add new ones.

Signed-off-by: Shawn Nematbakhsh <shawn@rivosinc.com>
2022-04-05 12:00:03 +02:00
Shawn Nematbakhsh
dbe783f5c4 dts: bindings: riscv: Remove unused CPU property.
riscv,pmpregions is marked as required but is never defined or used
throughout the codebase.

Signed-off-by: Shawn Nematbakhsh <shawn@rivosinc.com>
2022-04-05 12:00:03 +02:00
Jay Vasanth
bbec77c982 drivers: peci: Microchip XEC PECI driver add PINCTRL support
Add PINCTRL support to Microchip XEC PECI driver shared by
MEC172x and MEC15xx families.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-04-05 11:16:41 +02:00
Jay Vasanth
822e3bb612 drivers: peci: Microchip XEC PECI driver standardize
Standarize device structure usage for mchp peci driver

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-04-05 11:16:41 +02:00
Carlo Caione
b91d21d32c dt: mpu: Generate MPU regions from DT nodes
Currently the only way for a BOARD/SOC to configure at compile time the
MPU regions is to add, in a soc-specific file, the 'mpu_config' struct
adding static entries for the new regions with the needed attributes
(cacheable, non-cacheable, etc...). This exported struct is then read by
the MPU driver at boot time and used to properly setup the MPU regions.

At the same time it is now possible to introduce new memory regions in
the DT using the newly introduced 'zephyr,memory-region' attribute.

What is missing is the link between these two solutions: that is how to
declare the memory regions in the DT and automatically configure these
regions in the MPU with the correct attributes.

This patch is trying to address exactly this problem.

It is now possible to declare the memory regions in the DT and define
the MPU attributes for the regions using the 'zephyr,memory-region-mpu'
property. When this new property is present together with the
'zephyr,memory-region' property and a the 'zephyr,memory-region'
compatible, the 'mpu_config' struct is automatically extended at
compile-time to host the DT defined regions with the correct MPU
attributes.

So for example in the DT we can now have:

       sram_cache: memory@20200000 {
                compatible = "zephyr,memory-region", "mmio-sram";
                reg = <0x20200000 0x100000>;
                zephyr,memory-region = "SRAM_CACHE";
                zephyr,memory-region-mpu = "RAM";
        };

and a new region will be created called "SRAM_CACHE" and a new MPU
region will be configure at boot time with the attribute
"REGION_RAM_ATTR".

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-04-05 11:16:31 +02:00
Alexander Mihajlovic
4ff4991e16 drivers: uart_stm32: Add support for tx/rx swap
Add a new boolean devicetree property `tx-rx-swap` to the
st,stm32-usart binding, used to control TX/RX swap during
device initialization.

Signed-off-by: Alexander Mihajlovic <a@abxy.se>
2022-04-04 13:44:23 -07:00
Andrzej Głąbek
f80e572750 dts: nordic: Add properties indicating certain peripheral features
Add boolean properties to the binding for the nRF RADIO peripheral
to indicate whether the following features are supported:
- IEEE 802.15.4 mode
- 2 Mbps BLE mode
- coded BLE PHY
- high TX power settings
Set these properties appropriately in devicetree radio nodes for all
nRF SoCs.

Add also such properties and set them in appropriate nodes for nRF
flash controllers to indicate whether they support partial erase.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-02 15:14:38 +02:00
Andrzej Głąbek
bc26629ba8 dts: nrf: Rename "nordic,nrf-watchdog" compatible to "nordic,nrf-wdt"
For consistency with the scheme used for other nRF peripherals,
use the peripheral name that nRF Product Specifications use.
In this case, it is WDT, not WATCHDOG.

Also remove the requirement for the label property in the binding.
It is no longer needed.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-02 15:14:38 +02:00
Andrzej Głąbek
56a1ac3817 dts: Add missing nodes and bindings for peripherals present in nRF SoCs
Add missing devicetree nodes representing the following peripherals
in nRF SoCs:
- ACL
- BPROT
- CCM
- COMP/LPCOMP
- CTRLAP
- DCNF
- MPU (nRF MPU peripheral in nRF51 Series, not ARM MPU)
- MUTEX
- MWU
- NFCT
- OSCILLATORS
- POWER (in nRF51 and nRF52 Series)
- PPI
- RESET
- SWI
- USBREG
Add also corresponding bindings and validation of base addresses of
these nodes.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-02 15:14:38 +02:00
Tom Burdick
e018a3dff7 dma/cavs_hda: DMA driver for HDA on cAVS
Adds an initial driver for HDA streams on cAVS. A common code base is
provided for all HDA streams while the drivers are identified
differently as they have small behavior differences.

Uses dma_status to describe the positions for read/write. Uses dma_reload
to inform when to move the read/write positions. This closely follows
how HDA is being used in SoF

Simple test case is provided for both drivers.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-04-01 09:12:20 -04:00
Jay Vasanth
a94760d9b4 drivers: tach: Microchip XEC TACH driver add PINCTRL support
Add build time optional PINCTRL support to the Microchip XEC TACH
driver shared by MEC15xx and MEC172x families.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-03-31 10:30:17 +02:00
Jay Vasanth
b0cfaa44cd drivers: tach: Microchip XEC TACH driver add MEC172x support
Update Microchip XEC TACH driver to support MEC172x.
Standardize device tree properties between chips.
Standardize device structure usage.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-03-31 10:30:17 +02:00
Francois Ramu
5eb4df1d91 dts: bindings : explains the flag for stm32 complementary channel
Depending on the stm32 mcus and the timer instance, several channels
can enable the complementary output for the PWM signal.
Example of a DTS <&pwm1 2 4 (PWM_POLARITY_NORMAL | PWM_COMPLEMENTARY)>;
Note that the timer channel must support the complementary output
on that channel : usually channels 1-3 + channel 4 on stm32g4x.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-03-31 10:28:47 +02:00
Tomislav Milkovic
52807584fb dts: bindings: display: add bindings for STM32 LTDC peripheral
Add properties for specifying display on/off GPIO, backlight
control GPIO, external SDRAM and LCD RGB timing parameters

Signed-off-by: Tomislav Milkovic <tomislav.milkovic95@gmail.com>
2022-03-29 18:30:02 -07:00
Maciej Zagrabski
3202dc1a87 dts/bindings: stm32-otg: Set pinctrl-[0/names] properties as required
Follow up on commit 37bf7cb
("dts/bindings: stm32: Set pinctrl-[0/names] properties as required")
Report lack of those fields soon at build to avoid cryptic
DT api build error messages.

Signed-off-by: Maciej Zagrabski <maciej.zagrabski@grinn-global.com>
2022-03-29 18:12:57 -07:00
HaiLong Yang
2e53071006 dts: arm: introduce gd32 spi interface
Add gd32 spi initial support.

Signed-off-by: HaiLong Yang <cameledyang@pm.me>
2022-03-29 10:21:15 -05:00
Carlo Caione
92d8329d5b ipc_service: static_vrings: Move to one WQ per instance
Instead of having one single WQ per backend, move to one WQ per
instance instead and add a new "zephyr,priority" property in the DT to
set the WQ priority of the instance. Fix the sample as well.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-03-28 12:46:15 +02:00
Marco Peter
43453e3075 dts: bindings: gpio: Introduce Arduino Nano header
Add Nano header connector defined by Arduino. This allows
hardware with compatible headers to define the related GPIOs.

Signed-off-by: Marco Peter <marco.peter@joylab.ch>
2022-03-25 17:55:32 -07:00
Erwan Gouriou
f017d7b7e7 dts/bindings: st,stm32(f1)-pinctrl: Add plain GPIO configuration
Add description for a plain GPIO configuration using
st,stm32-pinctrl and st,stm32f1-pinctrl  bindings.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-03-25 15:52:02 -07:00
Erwan Gouriou
b4c2e9ef68 dts/bindings/pinctrl: stm32f1: Make binding inheriting from pincfg-node
For more simplicity, st,stm32f1-pinctrl binding can inherit
from pincfg-node binding.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-03-25 15:52:02 -07:00
Ruibin Chang
a21d043f5b ITE drivers/sensor: add voltage comparator driver
Add voltage comparator driver for ITE it8xxx2 chip.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2022-03-25 15:00:35 -07:00
Daniel DeGrasse
0f939d350d drivers: ethernet: eth_mcux: add support for resetting phy
add support for resetting phy at boot via GPIO reset pin.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-25 15:47:54 -05:00
Daniel DeGrasse
9824721680 drivers: display: display_mcux_elcdif: add backlight-gpios property
Add backlight gpios property to mcux display driver, so that the driver
can correctly initialize the backlight gpio control.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-25 15:47:54 -05:00
Daniel DeGrasse
61b83c88b8 drivers: gpio: gpio_mcux_igpio: enable pinmuxing in gpio driver
In order for pinctrl support to be complete, RT series GPIO driver must
support pinmuxing within the driver level. RT series pinmux settings do
not correspond directly to gpio port/pin numbers, so use DTS mappings to
pinctrl nodes to select and apply pinmux settings in the gpio driver.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-25 15:47:54 -05:00
Daniel DeGrasse
54eb607392 drivers: disk: usdhc: enable pinctrl for usdhc driver
Enable pinctrl driver for usdhc. USDHC driver uses custom pinctrl states
for fast, slow, and medium signal frequencies, as well as pin pull for
SD detection.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-25 15:47:54 -05:00
Daniel DeGrasse
5ec576fb04 drivers: display: display_mcux_elcdif: add pinctrl support
add pinctrl support for display_mcux_elcdif driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-25 15:47:54 -05:00
Daniel DeGrasse
108188312d drivers: video: video_mcux_csi: enable pinctrl
Enable pinctrl for mcux_csi video driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-25 15:47:54 -05:00
Daniel DeGrasse
459495aa84 drivers: memc: enable pinctrl for flexspi driver
Enable pinctrl for flexspi driver. Note that when flexspi is being using
in XIP mode, pinctrl settings are not required and will not be applied.
Pinctrl settings are only required when the flexspi device being used is
not the one used for XIP.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-25 15:47:54 -05:00
Daniel DeGrasse
dbb4ad8eb1 drivers: pwm: enable pinctrl for nxp imx_pwm driver
Enable pinctrl for nxp imx_pwm driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-25 15:47:54 -05:00
Daniel DeGrasse
053eaf7545 drivers: lpc_lpadc: enable pinctrl for lpadc driver
enable pinctrl for mcux lpc lpadc driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-25 15:47:54 -05:00
Daniel DeGrasse
6c0bcdc6e9 drivers: mcux-12b1-adc: enable pinctrl for mcux-12b1 adc
Enable pinctrl for mcux_12b1msps_sar adc driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-25 15:47:54 -05:00
Daniel DeGrasse
1cee7be552 drivers: pinctrl: Enable pinctrl for RT11xx series
RT11xx series has similar pin configuration peripheral to RT10xx, with
some differences in register layout. Create new pinctrl definition
header file, and reuse existing driver code for RT10xx.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-25 15:47:54 -05:00
Daniel DeGrasse
3a6919e3aa drivers: pinctrl: update rt pinctrl to support GPR register
iMX.RT parts use a GPR register for some pinmux settings. Update pinctrl
driver to support this GPR register definition.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-25 15:47:54 -05:00
Gerson Fernando Budke
be387aa1c2 drivers: eth: Update sam/sam0 eth drivers to use pinctrl
This update Atmel sam and sam0 ethernet gmac and mdio drivers to use
pinctrl driver and API. It updates all boards with new pinctrl groups
format.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
4c5e94317c drivers: rtc: Add sam0 support to pinctrl
This add support to pinctrl at Atmel sam0 rtc driver. It allows to
define pins to be used for tamper detection.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
8427f5e9b1 drivers: timer: Add sam0 tc32 support to pinctrl
This add support to pinctrl at Atmel sam0 timer tc32 driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
171440b029 drivers: adc: Add sam0 support to pinctrl
This add support to pinctrl at Atmel sam0 adc driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
978e578008 drivers: dac: Add sam0 support to pinctrl
This add support to pinctrl at Atmel sam0 dac driver. It updates all
boards with new pinctrl groups format and drop pinmux entries.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
8961172e6d drivers: usb: Add sam0 support to pinctrl
This add support to pinctrl at Atmel sam0 usb dc driver. It updates
all boards with new pinctrl groups format and drop pinmux entries.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
8c51ad6c6f drivers: pwm: Add sam0 support to pinctrl
This add support to pinctrl at Atmel sam0 tcc pwm driver. It updates
all boards with new pinctrl groups format and drop pinmux entries.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
63b2a38f16 drivers: i2c: Add sam0 support to pinctrl
This add support to pinctrl at Atmel sam0 i2c driver. It updates all
boards with new pinctrl groups format and drop pinmux entries.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
fbddf7847d drivers: spi: Add sam0 support to pinctrl
This add support to pinctrl at Atmel sam0 spi driver. It updates all
boards with new pinctrl groups format and drop pinmux entries.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
9b40960926 drivers: serial: Update sam0 drivers to use pinctrl
This update Atmel sam0 serial drivers to use pinctrl driver and API. It
updates all boards with new pinctrl groups format.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
10aa57857d drivers: pinctrl: Update Atmel sam0 driver to new API
This update current Atmel sam0 pinctrl initiative to current Zephyr
pinctrl API. It update current devicetree bindings and add the sam0
pinctrl driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
3a940cea79 drivers: dac: Add sam support to pinctrl
This add support to pinctrl at Atmel sam dac driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
0f472f6d1b drivers: sensors: Update sam qdec driver to use pinctrl
This update Atmel sam qdec sensor driver to use pinctrl driver and API.
It update board and sample with new pinctrl groups format.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
dc172849fa drivers: pwm: Update sam pwm driver to use pinctrl
This update Atmel sam pwm driver to use pinctrl driver and API. It
updates all boards with new pinctrl groups format. In addition this
remove all remaining manual pinmux at board level.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
d7c37d1f12 drivers: can: Update sam canfd driver to use pinctrl
This update Atmel sam canfd driver to use pinctrl driver and API. It
updates all boards with new pinctrl groups format. In addition this
add missing entries to run automated tests for can/canfd drivers.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
e1d88706bb drivers: i2s: Update sam ssc driver to use pinctrl
This update Atmel sam ssc driver to use pinctrl driver and API. It
updates all boards with new pinctrl groups format. In addition this
remove DEV_NAME macro at sam xdma driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
bd485ea960 drivers: adc: Update sam afec driver to use pinctrl
This update Atmel sam afec driver to use pinctrl driver and API. It
updates all boards with new pinctrl groups format. In addition, it
add overlay files to allow run samples/drivers/adc example.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
3c4a9ef47d drivers: usb: Update sam usb drivers to use pinctrl
This update Atmel sam usb drivers to use pinctrl driver and API. It
updates all boards with new pinctrl groups format.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
986388453f drivers: counter: Update sam driver to use pinctrl
This update Atmel sam counter driver to use pinctrl driver and API. It
updates all boards with new pinctrl groups format.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
a27304b658 drivers: i2c: Update sam drivers to use pinctrl
This update Atmel sam i2c drivers to use pinctrl driver and API. It
updates all boards with new pinctrl groups format. This add missing
i2c-0 alias into sam4l_ek board.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
38d0659931 drivers: spi: Update sam driver to use pinctrl
This update Atmel sam spi driver to use pinctrl driver and API. It
updates all boards with new pinctrl groups format.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
bfaf027dde drivers: serial: Update sam drivers to use pinctrl
This update Atmel sam serial drivers to use pinctrl driver and API. It
updates all boards with new pinctrl groups format.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
cb201430cf drivers: pinctrl: Update atmel sam driver to new api
This update current Atmel sam pinctrl initiative to current Zephyr
pinctrl API. It update current devicetree bindings and add the sam
pinctrl driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Filip Kokosinski
38f38e0be8 boards: FE310-based boards: transition to pinctrl driver
This commit makes the transition from the pinmux driver to the pinctrl
driver. It also modifies UART, SPI and I2C drivers used in FE310-based
boards to use the new pinctrl API.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2022-03-24 10:46:34 +01:00
Filip Kokosinski
a5cc185b9b drivers: pinctrl: add SiFive pinctrl driver
Add a pinctrl driver used in FE310-based boards.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2022-03-24 10:46:34 +01:00
Avi Green
fad1d950ea bmi160: Added yaml support for both i2c and spi
bmi160 driver code supports i2c, but yaml forces spi selection

Signed-off-by: Avi Green <avigreen1978@yandex.com>
2022-03-23 10:01:47 -07:00
Francois Ramu
9f7eba2044 dts: bindings: clock stm32g4 has a PLL P divider
The PLL div-p for the stm32g4x has more possible value than stm32l4
possible ra nge is from 2 to 31

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-03-23 09:25:47 -05:00
Jordan Yates
80e7ad7a23 entropy: bt_hci: driver added
Adds an entropy driver that uses Bluetooth HCI commands as its source
of randomness. As this method is blocking, the ISR API is not supported.

As this method will range from relatively slow (same core Bluetooth HCI
controller) to extremely slow (UART HCI Bluetooth controller), use the
xoshiro PRNG by default for RNG generation.

Implements #37186

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-03-23 13:38:47 +01:00
Andrei-Edward Popa
cf8e214cd9 dts: bindings: serial: added reset bindings for Raspberry Pi Pico
added reset controller bindings for Raspberry Pi Pico board

Signed-off-by: Andrei-Edward Popa <andrei.popa105@yahoo.com>
2022-03-23 12:51:39 +01:00
Andrei-Edward Popa
a4e762b1fd dts: bindings: reset: added bindings for Raspberry Pi Pico
added reset bindings for Raspberry Pi Pico board

Signed-off-by: Andrei-Edward Popa <andrei.popa105@yahoo.com>
2022-03-23 12:51:39 +01:00
Andrei-Edward Popa
eeaf115291 dts: bindings: test: added bindings for devicetree test reset
added bindings for vnd,reset used for devicetree test reset
added adc temp sensor as supporting reset

Signed-off-by: Andrei-Edward Popa <andrei.popa105@yahoo.com>
2022-03-23 12:51:39 +01:00
Andrei-Edward Popa
ae3d53a491 dts: bindings: added bindings for Reset Controller Driver
added bindings and compatible for reset controller nodes
added bindings for devices that use the reset controller

Signed-off-by: Andrei-Edward Popa <andrei.popa105@yahoo.com>
2022-03-23 12:51:39 +01:00
Mikkel Jakobsen
959afcc93a drivers: led_strip: add tlc5971 driver
the tlc5971 driver uses spi for controlling the global brightness
and individiual pixel brightness of a daisy chain of tlc5971
devices.

Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@escolifesciences.com>
2022-03-23 12:50:11 +01:00
Håkon Øye Amundsen
7aeef175e8 dts: nrf_qspi_nor: add option for specifying size in bytes
If a user has a 1GB external flash it is currently not possible
to configure this through DTS. To allow for such a configuration
we add an option which specifies the size in bytes not bits.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2022-03-23 12:48:08 +01:00
Emil Obalski
40b28ab51e ipc_service: Add new backend based on custom messaging buffer
This commit adds ipc backend, that relies on simple
inter core messaging buffer also added by this commit.

This backend is configurable with DT overlay. Each
ipc instance could be defined with ipc-icmsg commpatible.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2022-03-22 12:36:39 +01:00
Daniel DeGrasse
c29b602675 drivers: pwm: add pinctrl support to kinetis tpm driver
add pinctrl support for kinetis tpm driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-22 12:36:04 +01:00
Daniel DeGrasse
9e12d23f11 drivers: dac: add pinctrl support to dac_mcux_dac32 driver
add pinctrl support to dac_mcux_dac32 driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-22 12:36:04 +01:00
Daniel DeGrasse
31406c13f2 drivers: sensor: Add pinctrl support for mcux acmp sensor
Add pinctrl support for mcux acmp sensor driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-22 12:36:04 +01:00
Daniel DeGrasse
a9587deaa4 drivers: adc: adc_mcux_adc12: enable pinctrl for adc12 driver
enable pinctrl for adc12 driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-22 12:36:04 +01:00
Daniel DeGrasse
9b9450d8f3 drivers: pwm: add pinctrl support for mcux PWT driver
Enable pinctrl support for mcux pwm capture pwt driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-22 12:36:04 +01:00
Daniel DeGrasse
6545a3d0fa drivers: spi: enable pinctrl for spi_mcux_lpspi
Enable pinctrl for lpspi driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-22 12:36:04 +01:00
Daniel DeGrasse
756abe308c drivers: i2c: enable pinctrl for mcux lpi2c driver
Enable pinctrl for mcux lpi2c driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-22 12:36:04 +01:00
Daniel DeGrasse
00793592eb drivers: serial: Enable pinctrl for kinetis lpsci driver
Enable pinctrl for kinetis lpsci uart driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-22 12:36:04 +01:00
Daniel DeGrasse
180a9d221e drivers: adc: enable pinctrl for kinetis adc_16 mcux driver
Enable pinctrl for kinetis adc16 mcux driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-22 12:36:04 +01:00
Daniel DeGrasse
a7f85f1ca1 drivers: can: Enable pinctrl for mcux_flexcan
Enable pinctrl support for mcux flexcan driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-22 12:36:04 +01:00
Daniel DeGrasse
55f1d5ba73 drivers: enet: Enable pinctrl for eth_mcux driver
Enable pinctrl for ethernet mcux driver, and update kinetis DTS node to
include labelling for PTP node, to enable driver to access pinctrl
properties.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-22 12:36:04 +01:00
Daniel DeGrasse
f90c356025 drivers: spi: enable pinctrl for kinetis dspi driver
Enable pinctrl unconditionally for kinetis dspi driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-22 12:36:04 +01:00
Daniel DeGrasse
e11bed5ff2 drivers: i2c: enable pinctrl for kinetis i2c
Enable pinctrl for kinetis i2c mcux driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-22 12:36:04 +01:00
Daniel DeGrasse
6537a867e3 drivers: pwm: Enable pinctrl for kinetis ftm PWM driver
Enable pinctrl for kinetis ftm PWM driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-22 12:36:04 +01:00
Daniel DeGrasse
02352e9b7c drivers: pinctrl: Fix kinetis pinctrl slew rate
kinetis pinctrl driver had swapped values for slew rate
(fast slew rate should set bit to zero). Fix slew rate values.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-22 12:36:04 +01:00
Gerard Marull-Paretas
dd1449bff6 boards: arm: 96b_wistrio: refactor board init code
- Move the SX oscillator control pins to a regulator node
- Create a board level compatible for the RF switch
- Use gpio_dt_spec to simplify board pins.c (now rf.c)
- Cleanup include list

For reference:
https://downloads.rakwireless.com/
LoRa/RAK811/Hardware_Specification/RAK811_HF_Schematics.pdf

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-22 12:34:47 +01:00
Jay Vasanth
7c65268f3e drivers: pwm: Microchp XEC PWM driver add PINCTRL support
Add build time optional PINCTRL support to common PWM driver
for Microchip XEC MEC15xx and MEC172x families.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-03-21 21:49:50 -04:00
Jay Vasanth
845c1185a2 drivers: pwm: Microchip XEC PWM add MEC172x support
Add support for MEC172x series to Microchip XEC PWM driver.
Standardize device tree properties for both SoC families.
Standardize device structure usage.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-03-21 21:49:50 -04:00
Ruibin Chang
cebcaeed55 ITE drivers/kscan: use wakeup interface for WUC pins
Use wakeup interface for WUC pins in it8xxx2 kscan driver.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2022-03-21 16:35:03 -07:00
Ruibin Chang
4b75cf8f47 ITE drivers/interrupt_controller: add wuc interface
Add wakeup controller interface for ITE it8xxx2 chip.

Signed-off-by: Ruibin Chang <ruibin.chang@ite.com.tw>
2022-03-21 16:35:03 -07:00
Nazar Kazakov
f483b1bc4c everywhere: fix typos
Fix a lot of typos

Signed-off-by: Nazar Kazakov <nazar.kazakov.work@gmail.com>
2022-03-18 13:24:08 -04:00
Francois Ramu
1b2f273655 dts: binding: stm32adc set the VREf as a property
Add the Vref reference voltage in the DTS, so that the adc driver
can retrieve the value for conversion.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-03-18 10:21:13 +01:00
Tim Lin
f2c42663b4 ITE: drivers/i2c: I2C driver divided into two compatibles
As mentioned in #42882, the I2C of IT8XXX2 is designed for two different
IP blocks, so this PR divides this I2C driver into two compatibles.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-03-17 15:53:34 -05:00
Georgij Cernysiov
7fa2033852 dts: bindings: pinctrl: stm32: add SWJ CFG to F1
Adds 'swj-cfg' property to the F1 pinctrl. It is an optional
property that allows to control Serial Wire JTAG
configuration.

Different configurations allow to free certain IO
pins that can be used in remap or standalone.

That replaces previously used Kconfig approach.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2022-03-16 10:26:37 +01:00
Henrik Brix Andersen
5e8399f84b devicetree: add devicetree/can.h
This contains accessor macros for getting the maximum bitrate supported
by a CAN controller/transceiver combination.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-15 14:32:29 -05:00
Henrik Brix Andersen
71c3e4c369 dts: bindings: add devicetree bindings for CAN transceivers
Add generic devicetree bindings for simple CAN transceivers.

Always-on CAN transceivers are considered passive and just provide a
maximum supported bitrate.

Active CAN controllers can typically be controlled by the MCU via either
SPI, I2C, or GPIO. Common GPIO controlled CAN transceivers provide
either a stand-by or an enable pin (or both) for controlling the state
of the CAN transceiver.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-15 14:32:29 -05:00
Andrzej Głąbek
44feb7d527 drivers: pwm_nrfx: Add support for pinctrl
Add support for the new pinctrl API to the nRF PWM driver.
Update code of the driver and the related devicetree binding.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-03-15 18:38:01 +01:00
Andrzej Głąbek
1a01ca2adf drivers: sensor: qdec_nrfx: Add support for pinctrl
Add support for the new pinctrl API to the nRF QDEC driver.
Update code of the driver and the related devicetree binding.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-03-15 18:38:01 +01:00
Andrzej Głąbek
7d0a2ffcb7 drivers: flash: nrf_qspi_nor: Add support for pinctrl
Add support for the new pinctrl API to the nRF QSPI NOR flash driver.
Update code of the driver and the related devicetree binding.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-03-15 18:38:01 +01:00
Andrzej Głąbek
fd7633126e drivers: pinctrl: nrf: Add support for PWM, QDEC, and QSPI peripherals
Add support for configuring pins to be used by the nRF PWM, QDEC, and
QSPI peripherals.
A new custom property "nordic,invert" is added to the pin configuration
group binding to allow configuring PWM channel outputs as inverted.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-03-15 18:38:01 +01:00
Andrzej Głąbek
1c20443ce0 drivers: audio: dmic_nrfx_pdm: Add support for pinctrl
Add support for the new pinctrl API to the DMIC driver that handles
the nRF PDM peripheral. Update code of the driver and the related
devicetree binding.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-03-15 18:38:01 +01:00
Andrzej Głąbek
3966a33c5c drivers: i2s_nrfx: Add support for pinctrl
Add support for the new pinctrl API to the nRF I2S driver. Update code
of the driver and the related devicetree binding.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-03-15 18:38:01 +01:00
Immo Birnbaum
bbf16d7bd2 dts: bindings: gpio: Bindings for Xilinx PS GPIO controller
Bindings for the Xilinx Processor System GPIO controller, both for the
parent controller device as well as the GPIO pin bank child devices.

Signed-off-by: Immo Birnbaum <Immo.Birnbaum@weidmueller.com>
2022-03-15 08:44:46 -07:00
Hake Huang
084e6dfbd2 dts: binding: rename pinmux to gpr
rename pinmux to gpr
different from pinmux and io settings gpr will do more IO
settings.

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2022-03-15 10:12:57 -05:00
Hake Huang
c93689db2f dts: bindings: add pinctrl node to sai and lpuart
enable pinctrl in i2s and lpuart driver bindings

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-15 10:12:57 -05:00
Hake Huang
a6e8c3d3e1 dts: bindings: add pinctrl binding for nxp mcux rt1xxx
Add dts binding for rt1xxx pinctrl driver settings. A binding file is
present for the pinctrl node itself, and for the pinctrl child node that
defines all pinmux options

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-15 10:12:57 -05:00
Benedikt Schmidt
0907e35bef dts: arm: stm32: introduce ADC properties for temp and vref channel
Introduce ADC properties which indicated if the ADC instances have
dedicated channels for the internal temperature sensor or voltage
reference.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2022-03-15 10:50:52 +01:00
Julien Massot
59aae63f51 arch: arm: Add support for Cortex-R52
Cortex-R52 is an ARMv8-R processor with AArch32 profile.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2022-03-11 10:59:48 +01:00
Bernardo Perez Priego
9964414655 include/devicetree.h: Add DT_STRING_TOKEN_OR macro
This macro expands to DT_STRING_TOKEN if property exists, otherwise
falls back to default value.
Helpful when a non-required enum binding doesn't mention a default
value, but a default value makes sense to be set in the code.

Including DT_INST_STRING_TOKEN_OR and test code.

Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
2022-03-10 19:42:59 -08:00
Andrzej Głąbek
b2a4a3672f drivers: i2c: nrfx: Add support for pinctrl
Add support for the new pinctrl API to the I2C drivers that handle
the nRF TWI and TWIM peripherals. Update code of the drivers and
related devicetree bindings.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-03-09 12:05:22 +01:00
Andrzej Głąbek
32b9e65e4b drivers: spi: nrfx: Add support for pinctrl
Add support for the new pinctrl API to the SPI drivers that handle
the nRF SPI, SPIM, and SPIS peripherals. Update code of the drivers
and related devicetree bindings.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-03-09 12:05:22 +01:00
Jay Vasanth
3034693509 drivers: i2c: MEC15xx: Improved error handling
1. Check I2C Clock and Data is high through GPIO driver instead
of the I2C bitbang registers
2. i2c_xec_poll_write() and i2c_xec_poll_read() will poll to
check I2C clock and data lines are high before initiating the
transaction. The polling will be every 25us for a cumulative
max of 2.5ms
3. wait_completion() will not call recover_from_error() to reset
the controller. Instead will poll for 10ms for the PIN bit to
clear before returning error.
4. wait_completion() will send STOP if the 9th bit is NACK
5. If any errors with current transaction:
(a) Set error_seen flag.
(b) In the next transaction do the recovery process (reset the
i2c controller) if the clk and data lines are high.
Note: error_seen flag is set for Address NACK with Repeated
Start as well.
6. If timeout error occurs in wait_completion():
(a) Set timeout_seen flag;
(b) Wait till the slave will release the clock.
(c) Once slave releases clock send STOP on the bus. If the
timeout occurred while master read, read the I2C DATA register
for the hardware to proceed.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-03-07 14:13:34 -05:00
Jay Vasanth
73f24056d5 kscan: update mchp keyscan module to use pinctrl
Changes to keyscan module to support pinctrl

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-03-07 11:03:06 +01:00
Jay Vasanth
9138d81365 adc: updates to MEC172x adc to support pinctrl
Changes to adc module to support pinctrl.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-03-07 11:03:06 +01:00
Jay Vasanth
99c89ebb78 qmspi: update MEC172x qmspi module for pinctrl
Changes to qmspi module to support pinctrl

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-03-07 11:03:06 +01:00
Jay Vasanth
156440f3f0 serial: update mchp uart module to use pinctrl
Changes to uart module to support pinctrl

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-03-07 11:03:06 +01:00
Jay Vasanth
f8130d5ce3 espi: updated MEC172x espi module for pinctrl
Changes to espi module to support pinctrl

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-03-07 11:03:06 +01:00
Jay Vasanth
63ac835988 i2c: update MEC172x i2c module for pinctrl
Changes to i2c module to support pinctrl

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-03-07 11:03:06 +01:00
Jay Vasanth
5917ab9009 dts: Update MEC172x pinctrl dts
Update dtsi and dts bindings for pinctrl driver

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-03-07 11:03:06 +01:00
Andrew Hedin
c64783f29d drivers: sensors: lis2dh: Allow any movement on interrupt 1
Allow movement detection to be used on hardware
that only has one interrupt line connected.
Change hardware configuration to a bitmask.

Signed-off-by: Andrew Hedin <andrew.hedin@lairdconnect.com>
2022-03-07 10:46:17 +01:00
Daniel DeGrasse
2fdd276d35 dts: bindings: Add pinctrl node group binding for kinetis
Add pinctrl node group bindings for kinetis MCUs

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-03 13:00:20 -06:00
Qingsong Gou
b0eb3207a9 drivers: kscan: add support for cst816s touch panel driver
Add touch panel driver support for pinetime

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
2022-03-01 14:24:27 -06:00
Bryce Wilkins
15b2b35992 dts: Update GPIO port numbers
Add GPIO port 7 for NXP MXRT685

Signed-off-by: Bryce Wilkins <bryce.wilkins@gmail.com>
2022-03-01 14:18:12 -06:00
Carlo Caione
b9df9043fb mbox: yaml: Relocate mailbox-controller.yaml
mailbox-controller.yaml is in the wrong directory. Move it.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-03-01 10:57:49 -05:00
Pieter De Gendt
1e747eca0d drivers: hwinfo: sam: Introduce RSTC driver
Add a new hwinfo driver to get the reset cause on
SAM4S/SAME70/SAMV71 SoC series.

The user-nrst dts property has been added to enable external user
resets.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-02-28 10:53:57 +01:00
Mahesh Mahadevan
9b7fbc624a dts: Update NXP LDCIF to add display properties
Add properties to specify panel properties

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-02-25 13:35:58 -06:00
Mahesh Mahadevan
3489a39631 dts: Rename NXP LCDIF dts node
Rename fsl,imx6sx-lcdif to nxp,imx-elcdif as it
used by imxrt and imx platforms.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-02-25 13:35:58 -06:00
Pete Dietl
5dddf9f0f8 drivers: sensors: Implement MAX31875 sensor
This commit implements the temperature sensor interface for
the Maxim MAX31875Low-Power I2C Temperature Sensor.

Signed-off-by: Pete Dietl <petedietl@gmail.com>
2022-02-24 08:49:40 -06:00
Jedrzej Ciupis
a0c868d94b dts: add binding for nrf-gpio-forwarder
In nRF53 family of SoCs, GPIO pins must be explicitly forwarded by the
application core to the network core if the latter should drive them.
Add a binding of a generic GPIO pin forwarder.

Signed-off-by: Jedrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2022-02-22 15:00:35 -08:00
Gerard Marull-Paretas
0bb486aa29 drivers: misc: grove_lcd: port to Devicetree
The driver was never migrated to Devicetree, this patch converts the
driver to a proper Devicetree based device.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-22 11:58:33 -08:00
Ryan McClelland
2eaede53af drivers: adc: add ads1x1x driver
This adds support for the ads101x (ads1013, ads1014, ads1015) and
ads111x (ads1113, ads1114, ads1115) family of i2c adc devices.

Signed-off-by: Ryan McClelland <ryanmcclelland@fb.com>
2022-02-22 10:49:39 +01:00
Jay Vasanth
9f3d90e283 drivers: bbram: Add bbram driver for mec device
Add bbram driver for Microchip mec device

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-02-21 22:17:52 -05:00
Carlo Caione
18ffcdcf74 linker: Introduce zephyr,memory-region compatible
Introduce a new "zephyr,memory-region" compatible to be used when a new
memory region must be created in the linker script from the devicetree
nodes using the compatible.

Remove also the LINKER_DT_REGION_FROM_NODE macro and add a new
LINKER_DT_REGIONS macro to cycle through all the compatible regions.

In the same PR modify the DTS files and the linker scripts.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-02-21 22:02:04 -05:00
Tom Burdick
1e9ada4eb9 dma: cavs: Add gpdma derivative of dw dma for cavs
Intel's adsp needs to set, at a minimum, a clocking bit before the driver
can initialize the designware dma controller. In many ways it is the
designware dmac IP but with additional registers and functionality added
on top of it. So the code structure here follows how the hardware
appears to be designed, layered on top of the designware driver.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-02-21 20:59:08 -05:00
Jay Vasanth
f6394e0d54 Microchip: MEC172x: kscan driver
Update keyscan driver to support MEC172x device

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-02-21 20:44:17 -05:00
Jay Vasanth
4120a889a4 Microchip: MEC172x: watchdog driver
Update wdt driver to support MEC172x device

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-02-21 20:42:18 -05:00
BJ Chen
59cd9fd551 ITE: drivers/peci: Add PECI driver module of ITE IT8xxx2
Added the PECI driver tested with the samples/drivers/peci.

Signed-off-by: BJ Chen <bj.chen@ite.com.tw>
2022-02-21 19:43:40 -05:00
Andrei-Edward Popa
4ae0c84c49 dts: bindings: i2c: added pinctrl include for DW
added pinctrl include support for I2C designware chip

Signed-off-by: Andrei-Edward Popa <andrei_edward.popa@upb.ro>
2022-02-21 19:42:07 -05:00
Yuriy Vynnychek
4747f3ac3d dts: riscv: telink_b91: replace pinmux by pinctrl
Replaced pinmux by new pinctrl driver for Telink B91.

Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
2022-02-21 19:41:44 -05:00
Henrik Brix Andersen
1563b2c990 dts: bindings: can: remove unused bus from CAN controller binding
Remove the unused bus statement from the common CAN controller devicetree
binding.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-02-21 19:39:14 -05:00
Martí Bolívar
c0cc6c7ba2 dts: bindings: gpio-leds: improve description
This is the compatible which is used in the blinky sample, so
it's worth trying to add a better example for what you can do with it
in general in the main description.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-02-04 11:20:46 +01:00
Yonatan Schachter
a2aa02dbc8 drivers: gpio: Added support for raspberry pi
Added GPIO support for the RP2040 SoC. Only one
core is supported.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2022-02-02 16:23:35 +01:00
Yonatan Schachter
cd7bd5f450 drivers: serial: Added support for raspberry pi
Added a serial driver for the RP2040. Only polling
API is supported.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2022-02-02 16:23:35 +01:00
Yonatan Schachter
fd59038312 drivers: pinctrl: Added pinctrl driver for RPi Pico
Added a pinctrl driver for the Raspberry Pi Pico series

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2022-02-02 16:23:35 +01:00
Marius Scholtz
38d684f8f1 drivers: counter: sam: expose RC reg to DT
Exposes the RC register so that the initial value can be set in
the device tree. This is useful in the case where the timer
generates an event but an interrupt is not required.
e.g generate event to sample adc on RC register match.

Tested on Atmel SMART SAM E70 Xplained Ultra board

Signed-off-by: Marius Scholtz <mariuss@ricelectronics.com>
2022-01-21 14:25:49 -05:00
Sylvio Alves
c409a4656f drivers: uart: esp32: use DEVICE_DT_INST_DEFINE()
Current uart driver implementation is incompleted regarding the
usage of DT_INST_FOREACH_STATUS_OKAY. If uart0 and uart2 are selected,
build breaks due to peripheral number ordering, which would be
0 and 1 in this case. This fix PR fix this by re-working the macros
and setting proper uart peripheral instances in DTSI, required for signal
routing configuration.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-01-21 13:16:55 -05:00
Sylvio Alves
eec068b8a5 soc: esp32c3: fix cpu vendor name
Build shows warning due to incompatible
CPU vendor name. This fixes it and applies
necessary changes in files.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-01-20 13:33:29 -05:00
Jeremy Wood
c13ff7505c dts: add stm32h7 can binding and node
* Add can peripheral to stm32h7.dtsi.
* Add binding for m_can stm32h7 driver.

Signed-off-by: Jeremy Wood <jeremy@bcdevices.com>
2022-01-19 16:07:54 -05:00
Mahesh Mahadevan
f4163ba596 dts: Update GPIO port numbers
Add more GPIO port numbers to the enum list

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-01-19 13:35:09 -06:00
Antony Pavlov
c2c5727bf8 dts/bindings: Add binding for mti,cpu-intc
Add a simple binding for MIPS CPU interrupt controller.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
2022-01-19 13:48:21 -05:00
Jordan Yates
ccdc009077 drivers: power_domain: gpio controlled domain
Initial implementation of a simple GPIO controlled power domain.
It exposes no API of its own, all functionality is contained inside
the runtime power management callbacks.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-01-19 13:35:32 -05:00
Flavio Ceolin
ddfa048058 pm: Add power domain infra structure
Add support for power domains on Zephyr. Power domains are implemented
as simple devices so they can use the existent Zephyr API, for resume
and suspend sync and async and also reference count.

The pm subsystem will ensure that domains are resumed before and
suspended after devices using them. For device runtime power
management, every time the device is got or released the same actions
is done to the domain it belongs.

As domains are implemented as simple devices, it is totally acceptable
a domain belongs to another domain.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-01-19 13:35:32 -05:00
Daniel Leung
9e688e3956 drivers: mm: add driver for Intel Audio DSP
This adds the driver for the memory mapping hardware
on Intel Audio DSP.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-01-18 19:18:30 -05:00
Daniel Leung
213fccbfe4 dts: add base binding for memory management drivers
This adds a simple base binding for memory management drivers.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-01-18 19:18:30 -05:00
Yasushi SHOJI
2e3aeaaac8 dts: Add Space Cubics as "sc"
Add Space Cubics, LLC as "sc".

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
2022-01-18 13:21:50 -05:00
Aymeric Aillet
37f5fe5e82 drivers: serial: RCar add pinctrl support
Get pin configuration from device tree to
set alternate pin function.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2022-01-18 13:04:53 -05:00
Daniel DeGrasse
594e11a540 drivers: eth_mcux: Enable specifying PHY addr for enet module
PHY addr is not always 0 on boards with multiple PHYs. Allow specifying
via devicetree.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-01-18 12:13:24 -05:00
Alexander Wachter
6e5c8a339d drivers: can: Add frontend for Atmel SAM M_CAN controller
This commit adds a frontend for the generic Bosch m_can driver
for Atmel SAM series.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2022-01-18 10:39:55 -05:00
Henrik Brix Andersen
b6f6069b99 drivers: can: stm32: add support for disabling automatic retransmissions
Add support for disabling automatic retransmission of CAN frames
(similar to CAN "one-shot" mode in the Linux kernel).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-17 21:09:17 -05:00
Julien Massot
15f4bbf86b drivers: can: RCar add pinctrl support
Get pin configuration from device tree to
set alternate pin function.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2022-01-17 21:00:58 +01:00
Julien Massot
b06862ca11 dts: bindings: pinctrl: add Renesas R-Car Pinmux
Renesas R-Car series contains a PFC (Pin Function Controller).
This module consists of registers for selecting the function of
the multiplexed pins and controls the pull-up resistor on each pin.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2022-01-17 21:00:58 +01:00
Henrik Brix Andersen
71525b9c21 dts: bindings: can: remove can-device.yaml binding
Remove the unused base binding for CAN bus devices (as in devices
present on a CAN bus). This binding should have been removed in
2269408572

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-17 11:46:58 -05:00
Daniel Leung
44462723f5 timer: hpet: make legacy interrupt routing optional
On some platforms, HPET is not wired to trigger IRQ 2.
This would make HPET non-functional if the legacy
interrupt routing bit is set in the global config
register. This adds a DTS flag so the driver won't
set the bit to enable legacy interrupt.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-01-14 14:46:21 -05:00
HaiLong Yang
48af32d3d8 dts: i2c: introduce gd32 i2c interface
Add gd32 i2c interface support.

Signed-off-by: HaiLong Yang <cameledyang@pm.me>
2022-01-14 10:42:24 -06:00
TOKITA Hiroshi
306128799f dts: bindings: timer: Correct compatible name of riscv,machine-timer
dts/bindings/timer/riscv,machine-timer must have compatible name
riscv,machine-timer. nuclei,machine-timer is wrong, correct it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2022-01-14 09:49:53 -06:00
Dominik Chat
3e6ab47455 sensors: Implement MPU9250 driver
MPU9250 driver for 9-axis
gyroscope, accelerometer, magnetometer

Signed-off-by: Dominik Chat <dominik.chat@nordicsemi.no>
2022-01-14 12:33:04 +01:00
Wouter Cappelle
c3ca3aa27d sensors: STM32: Add support for L5 die temp sensor
This PR adds the different handling of temperature sensor for the
STM32L5 soc. In this soc, there are some calibration settings which
need to be applied for temperature conversion.

Signed-off-by: Wouter Cappelle <wouter.cappelle@crodeon.com>
2022-01-13 10:34:10 +01:00
Armando Visconti
474fe6b55c dts/bindings: lps22hh: Fix the odr property description
The dts binding general rules document states that the property
description should explain why the default value was selected
(e.g. "default is the value at power-on").

See comment in #41143

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2022-01-13 10:32:57 +01:00
Dawid Niedzwiecki
d361b8e30d adc: add io-channel-cells to use io-channels
Add fragment:
io-channel-cells:
    - input
to binding of the "ite,it8xxx2-adc" and "zephyr,adc-emul" compatible.
It is necessary to use io-channels property.

Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
2022-01-11 14:47:16 -06:00
Jonathan Hahn
32f9dcf328 drivers: uart: Add support for st single wire mode
An additional devicetree poperty `single-wire` is added
to uart and usart bindings of stm32. The driver checks this value
during initialization and enables the single wire mode when set.

Signed-off-by: Jonathan Hahn <Jonathan.Hahn@t-online.de>
2022-01-11 11:47:47 +01:00
Gerard Marull-Paretas
4f11a1907e dts: sparc: add cpus node to leon3
The leon3 SoCs were missing definitions of the CPU node. This node is
now required for PM, so that power states can be defined.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-01-11 10:46:20 +01:00
Gerard Marull-Paretas
1efefeea54 dts: bindings: cpu: add compatible for native_posix
Create a CPU compatible for native_posix builds. It can be useful when
testing.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-01-11 10:46:20 +01:00
Henrik Brix Andersen
78075457ba dts: bindings: can: add NXP LPC MCAN devicetree binding
Add devicetree binding for the NXP LPC MCAN CAN-FD controller.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-01-10 12:00:20 +01:00
Henrik Brix Andersen
ed94862c81 dts: bindings: can: remove requirement for label property
Make the label property for CAN controller devicetree nodes optional.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-10 11:24:51 +01:00
Tomasz Bursztyka
ba6e9cd682 dts: Set a default value for SPI device's duplex property
Better setting a default value there so DT_PROP() will return something
relevant whether the property is set or not.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2022-01-08 06:28:57 -05:00
Gerard Marull-Paretas
07d3d0ea43 dts: bindings: pwm: add gd,gd32-pwm
Add bindings for GigaDevice GD32 PWM.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-01-07 14:58:27 -06:00
Gerard Marull-Paretas
384f360989 dts: bindings: timer: add gd,gd32-timer
Add bindings for GigaDevice GD32 timers.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-01-07 14:58:27 -06:00
Wealian Liao
7add8f7fa0 drivers: adc: npcx: Fix register offset
NPCX7/9 has a different ADC register structure. NPCX7 has 3 threshold
detectors from offset 0x14 & has 10 input channels. NPCX9 has 6
threshold detectors from offset 0x60 & has 12 input channels.

This commit fixes the NPCX ADC register structure.

Signed-off-by: Wealian Liao <WHLIAO@nuvoton.com>
2022-01-07 11:21:29 -05:00
Immo Birnbaum
05b5a234bc dts: bindings: arm: YAML description for Zynq OCM
YAML description file for the On-Chip Memory of the Xilinx
Zynq-7000, DT identifier "xlnx,zynq-ocm".

Signed-off-by: Immo Birnbaum <Immo.Birnbaum@weidmueller.com>
2022-01-06 11:56:48 -05:00
Gerard Marull-Paretas
4ec5983b22 dts: bindings: misc: add gd32 syscfg
Add support for GigaDevice SYSCFG.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-01-04 20:49:00 -05:00
Gerard Marull-Paretas
adf350dc04 dts: bindings: interrupt-controller: add gd32 exti
Add binding for the GigaDevice EXTI interrupt controller.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-01-04 20:49:00 -05:00
Lukasz Majewski
e28e98a72f dts: stm32: Introduce spi-bus-width property for stm32 QSPI
The spi-bus-width property provides information if the target system
has all SIO[0123] pins connected to NOR flash memory.

It must be equal to 4 to enable QSPI 4 IO operation.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2022-01-04 20:47:29 -05:00
Lukasz Majewski
07be9301b9 qspi: stm32: Add support for 'reset-gpios' property in 'stm32-qspi-nor'
Some flash memories connected to QUADSPI IP block on stm32[fh]7 devices
require proper reset pulse before configuration.

This patch adds two new properties - the 'reset-gpios' phandle,
which allows specifying GPIO pin for RESETn pulse and
'reset-gpios-duration', which provides the time (in ms) for reset
duration.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2022-01-04 20:47:29 -05:00
Lukasz Majewski
44676a9d3e qspi: stm32: Add support for 'flash-id' property in 'stm32-qspi' banks
The 'flash-id' property defines the number of QSPI's dedicated GPIO
bank (and flash ID), which will be used to communicate with flash
memory.

For example, on stm32h7xx it is possible to use 'quadspi_bk1_*' and
'quadspi_bk2_*' set of pins, so one may need to select between them
when required.

By default - pins from 'quadspi_bk1_*' bank are used, so the
'flash-id = <2>;' property, when your use case (e.g. PCB design)
requires it, forces usage of 'quadspi_bk2_*' pins.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2022-01-04 20:47:29 -05:00
Henrik Brix Andersen
99a310b29b drivers: can: loopback: convert the CAN loopback driver to dts
Convert the CAN loopback driver from being configured via Kconfig to
multi-instance configured via devicetree.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-04 15:13:40 -06:00
Gerard Marull-Paretas
32bea9a7fb tests: lib: devicetree: use vnd,gpio-device
The vnd,gpio-device compatible is now used by the test GPIO driver
(CONFIG_GPIO_TEST) introduced in #41387. This means that we can't define
new devices with this compatible when CONFIG_GPIO=y.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-01-04 14:44:07 -05:00
Gerard Marull-Paretas
c0fff657c5 pinctrl: use groupN instead of pinsN for groups
The pinsN group name can be a confusing in some circumstances, so change
it to groupN. Some platforms (e.g. nrf or gd32) are already using
groupN. Documentation and API tests have been updated.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-01-01 07:39:08 -05:00
Tim Lin
f9bf14f79a ITE: drivers/serial: add console input expired
If there are no console messages input at an interval of 15
seconds, the system will be able to enter suspend mode.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2021-12-24 20:54:16 -05:00
Aditya Bhutada
31de8caa9c dts: bindings: adc: microchip: Introduced clk_time field
Added clk_time field to configure Microchip ADC config register.
This allows programming ADC_CLK_HIGH_TIME & ADC_CLK_LOW_TIME register
values.

Signed-off-by: Aditya Bhutada <aditya.bhutada@intel.com>
2021-12-22 13:47:18 -05:00
Krzysztof Chruscinski
22c4c888a5 drivers: gpio: nrfx: Use mask to determine if sense is used
So far driver was using SENSE mechanism for all or none edge
interrupts. This was not convenient since in some modules may
require IN event to be used and other did not. Converting it to
use a mask specified in the device tree. Pins indicated in the
mask will use sensing.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-12-22 12:03:00 +01:00
Andrzej Głąbek
4dfab40cac drivers: display_nrf_led_matrix: Add option to light LEDs in groups
Add a new DT property named "pixel-group-size" that allows users to
configure the driver to refresh the matrix by illuminating multiple
LEDs in particular rows simultaneously. This way the maximum possible
brightness of the LEDs can be increased (as they can be lit longer)
and the timer interrupt handler is executed less frequently, what
results in decreased CPU load, but more GPIOTE/PPI channels needs to
be allocated if the PWM peripheral cannot be used. Thus, it is left
to users to select the configuration that suits them best.

Update definitions of both the bbc_microbit boards with this new
property, using the maximum available group size (to achieve maximum
possible brightness). For v2, no new resources are used (only all
channels in the already used PWM peripheral are now utilized).
For v1, two more GPIOTE and PPI channels are allocated.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-12-21 17:53:38 +01:00
Alexandre Bourdiol
893304ba60 dts: bindings: rng: stm32 add the support of health test configuration
Some STM32 series need to configure health test register
for proper RNG behavior.
In addition, some also require to write a Magic number
before writing the configuration.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-12-21 17:09:02 +01:00
Yong Cong Sin
26f7b9c1ea drivers: sensor: Add MH-Z19B CO2 sensor driver
Add MH-Z19B CO2 sensor driver.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Co-Authored-By: Azamlukman <azamlukmanabdullah@gmail.com>
2021-12-20 18:47:47 +01:00
Michael Schmidt
557870c05f drivers: virt_ivshmem: Allow multiple instances of ivShMem devices.
- Supporting multiple instances of ivShMem virtual devices.
- Introduces DT based configuration for ivShMem devices.
- Add DTS overlay file to test new multiple ivshmem instance capability.
- Enable BDF unspecified device initialization.
  (limited to one instance. An improved version of pcie_bdf_lookup()
  will come soon that fixes this limitation)
- Make PCIE DTS file macros available for a proper ivshmem device
  properties parsing.

Sample for dts file:
pcie0 {
	label = "PCIE_0";
	#address-cells = <1>;
	#size-cells = <1>;
	compatible = "intel,pcie";
	ranges;
    ivshmem0: ivshmem@800 {
	    compatible = "qemu,ivshmem";
	    reg = <PCIE_BDF_NONE PCIE_ID(0x1af4,0x1110)>;
	    label = "IVSHMEM";
	    status = "okay";
    };
};

Signed-off-by: Michael Schmidt <michael1.schmidt@intel.com>
2021-12-20 19:42:27 +02:00
TOKITA Hiroshi
5c7a0ef888 drivers: interrupt-controller: add Nuclei ECLIC driver
Add support for the ECLIC interrupt controller
which is used with the Nuclei processor core.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2021-12-20 17:51:30 +01:00
TOKITA Hiroshi
c9c04e491e soc: riscv: Add initial support for GigaDevice GD32V SoC
Add GigaDevice GD32V SoC.
GD32V has non-standard CSR. It doesn't use common startup code.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2021-12-20 17:51:30 +01:00
TOKITA Hiroshi
d79d4f0bea riscv_machine_timer: Enable to use divided clock for the machine timer
GD32V SoC uses divided clock from core-clock for machine timer clock.
Add config of clock divide factor to support GD32V.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2021-12-20 17:51:30 +01:00
TOKITA Hiroshi
3167a9e5e7 dts: bindings: vendor-prefixes: Add nuclei prefix
Add nuclei manufacturer binding prefix.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2021-12-20 17:51:30 +01:00
Lukas Gehreke
53dea67733 drivers: modem: Added simcom sim7080 modem driver.
Implemented driver for the simcom sim7080 modem.
This driver features Socket offloading, TCP, UDP, DNS,
SMS, GPS and FTP.

Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
2021-12-20 17:48:47 +01:00
Henrik Brix Andersen
2269408572 dts: bindings: can: remove #address-cells and #size-cells
Remove the requirement for specifying #address-cells and #size-cells
properties for CAN controller devicetree nodes.

CAN controllers do not have a common concept of devicetree child nodes
and thus have no need for these properties. This is in line with
upstream Linux kernel devicetree bindings.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-12-20 17:45:05 +01:00
Armando Visconti
34fed86b2b drivers/sensor: lsm6dso: Add power mode properties to DTS
Add power mode properties for bot accelerometer and gyrometer
to Device Tree.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-12-18 07:58:50 -05:00
Armando Visconti
18e8cadaf9 drivers/sensor: lsm6dso: Move odr/range Kconfig property into dts
Move odr and range properties for both accelerometer and gyro
from Kconfigs to Device Tree.
Fixes #41117

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-12-18 07:58:50 -05:00
Armando Visconti
df4e87f973 dts/bindings: lsm6dso-common: Fix multi line description
Fix the yaml dts multi-line property description in the following
(expected) way:

    description: |
       PUT_TEXT_HERE

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-12-18 07:58:50 -05:00
Jimmy Johnson
5c28b218fa drivers: sensor: add ti tmp108 driver support
Adding support for the TI TMP108 temperature sensor. This includes
over/under temp interrupt support as well as one shot, continuous
conversion and power down modes.

Signed-off-by: Jimmy Johnson <catch22@fastmail.net>
2021-12-17 21:15:25 +01:00
Andrzej Głąbek
e7f7e955b3 drivers: display: Add support for LED matrix driven by nRF SoC GPIOs
Add a display driver and the corresponding devicetree binding for a LED
matrix with rows and columns driven by nRF SoCs GPIOs. Such matrix can
be found, for example, in the BBC micro:bit boards.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-12-17 15:48:08 +01:00
HaiLong Yang
222f42f2e8 dts: arm: gigadevice: introduce dac for gd32 series soc
Add DAC for gd32f4xx and gd32f350xx.

Signed-off-by: HaiLong Yang <cameledyang@pm.me>
2021-12-16 10:13:56 +01:00
Bartosz Bilas
0bd304f9d9 drivers: sensor: ina23x: add support for INA237
Add the new driver for INA237 variant which is
quite similar to the already supported INA230.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2021-12-14 13:48:54 -06:00
Bartosz Bilas
2df7140947 drivers: sensor: ina230: driver refactoring
Create an explicit ina230 driver which is supposed to
work with 230 and 231 variants. While at it switch
to i2c_dt_spec helpers and change device-tree node
names to use - instead of _ in order to follow
convention.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2021-12-14 13:48:54 -06:00
Bartosz Bilas
f50c7ab542 drivers: sensor: ina23x: add ina23x common module
That's needed to not duplicate code between INA230/231
and the upcoming INA237 variant.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2021-12-14 13:48:54 -06:00
Armando Visconti
56b435f2bf drivers/sensor: lps22hh: Move odr Kconfig property into dts
Move odr options from Kconfigs to Device Tree.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-12-14 09:11:15 -06:00
Armando Visconti
9c98d2c615 dts/bindings: lps22hh: create a common DT binding file
Create a common properties file that will be included by all bindings
(as i2c and spi) handled by lps22hh driver.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-12-14 09:11:15 -06:00
Aymeric Aillet
903c78c207 driver: i2c: TCA954X: Add support for TCA9548A
Add support for the 8 channels TCA9548A I2C mux.
Added a new binding ti,tca9548a binding inheriting
properties from ti,tca954x-base and defining its own compatibles fields.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2021-12-13 18:07:08 +01:00
Aymeric Aillet
ee1d849c4e driver: i2c: TCA954X: Add support for "reset-gpios"
Add an optional "reset-gpios" phandle-array
field to the driver common yaml.
The reset GPIO channel and pin can be defined
in device tree as a node property.
The driver then deassert the reset signal at mux
initialization if a "reset-gpios" has been specified.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2021-12-13 18:07:08 +01:00
Aymeric Aillet
50540ed594 driver: i2c: TCA9546A: Rename to TCA954x
Prepare the driver to upcoming support of more mux references.
Rename all TCA9546A related files to TCA954x.
Keep ti,tca9546a and ti,tca9546a-channel compatible
for backward compatibility reasons.
New tca954x-base binding embedding common properties,
tca9546a binding inherits from it and define its own compatibles fields.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2021-12-13 18:07:08 +01:00
Kent Hall
ba37d5935e drivers: counter: Counter API implementation for STM32F4 Series (TIMER).
- Shim for counter API using LL_TIM driver.
- Supports all general-purpose (TIMx) timers.

Signed-off-by: Kent Hall <kjh2166@columbia.edu>
2021-12-11 14:20:17 -05:00
Fabio Baltieri
a87ce2ddde dts: bindings: stm32-ccm: use the mem-region property
Include the mem-region bindings for the stm32 ccm nodes and set the name
in the current dtsi files.

Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
2021-12-10 07:14:00 -06:00
Fabio Baltieri
4c937fd16d boards: stm32: set compatible and name for sdram nodes
Add the compatible property to the board level sdram nodes in few stm32
dts files so that the zephyr,memory-region name is used correctly in the
linker script.

Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
2021-12-10 07:14:00 -06:00
Johann Fischer
2d175d14f3 drivers: display_dummy: rework to obtain configuration from devicetree
Add bindings for dummy display controller.
Rework dummy display controller driver to obtain
configuration from devicetree. Remove unnecessary casts,
add multi-instance support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-12-10 12:47:30 +01:00
Johann Fischer
dee50e9aae drivers: display_sdl: rework to obtain configuration from devicetree
Add bindings for SDL based display controller.
Rework SDL based display controller driver to obtain
configuration from devicetree. Remove unnecessary casts,
add multi-instance support.

Add display controller node and chosen property
to native_posix devicetree.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-12-10 12:47:30 +01:00
Johann Fischer
9d61669906 dts: display: include common display controller bindings
Include common display controller bindings.
Add required height and width properties to "ilitek,ili9340"
and "ilitek,ili9488" users.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-12-10 12:47:30 +01:00
Johann Fischer
48c248a2b2 dts: add bindings for display controller
Add bindings for display controller, where a controller
is a fixed part of the display.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-12-10 12:47:30 +01:00
Jordan Yates
3894066f79 dts: bindings: zephyr,linker-region property
Introduce optional `zephyr,linker-region` property which signifies that
the node should result in a linker memory region and what the name of
that region should be. Property added to compatibles likely to result
in a linker memory region; 'mmio-sram', 'arm,itcm`, `arm,dtcm`,
`nxp,imx-itcm`, `nxp,imx-dtcm` and `fixed-partitions`.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-12-09 16:23:03 +01:00
Peter Johanson
a5ad94f20f driver: gpio: mcp23xxx: Refactor to generic.
Refactor the mcp230xx driver to generically also support
SPI IO expanders, renaming it to mcp23xxx in the process.

Signed-off-by: Peter Johanson <peter@peterjohanson.com>
2021-12-08 08:55:28 -05:00
Guillaume Lager
972e5d0274 sensor: eeprom: Add TMP116 EEPROM access
eeprom access is supported by using
either custom or eeprom API

Signed-off-by: Guillaume Lager <g.lager@innoseis.com>
2021-12-08 07:51:46 -06:00
Jay Vasanth
fd43c725d2 drivers: spi: Add MEC172x QMSPI-LDMA driver
Add driver for MEC172x QMSPI with local DMA(LDMA). The driver
support SPI asynchronous operation.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2021-12-08 08:43:05 -05:00
Daniel DeGrasse
cae297d917 drivers: pca9420: added support for current limit setting on PCA9420
Added ability to set VIN current limit when using the pca9420 PMIC

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-12-08 08:27:44 -05:00
Daniel DeGrasse
130f6eb816 drivers: regulator: add i2c regulator driver
This commit adds a generic i2c regulator driver, and enables the NXP
PCA9420 PMIC IC using this driver. The regulator driver also exposes an
additional API in include/drivers/regulator/consumer.h, which allows
drivers to implement support for adjusting voltage levels and current
limits, if their device supports it.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-12-08 08:27:44 -05:00
Martí Bolívar
fc2756cf18 dts: nordic: add QSPI XIP area registers for nordic devices
There is currently no information available about the XIP
addresses for the nRF52840 and nRF5340.

Add this via a new 'reg' block in the relevant QSPI nodes, along with
names for the register blocks so they are easier to retrieve.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-12-07 20:25:40 -06:00
Pieter De Gendt
4d161a3b23 drivers: counter: NXP SNVS rtc: Add support for NXP imx SNVS RTC
Adds a driver using the SNVS high power and optionally low power
RTC instances. A device specific function `mcux_snvs_rtc_set` is
provided to update the current counter value.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2021-12-07 09:45:43 -06:00
Daniel DeGrasse
57f35bbf5a drivers: USDHC: Enable detection using DAT3 pulldown
Enable USDHC host to detect inserted SD card via DAT3 line pulldown.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-12-06 15:27:25 -05:00
Dominik Ermel
675a113cb4 dts: Add "disk-access" property to fstab bindings
The commit adds "disk-access" property to fstab bindings to allow
selecting FS_MOUNT_FLAG_USE_DISK_ACCESS while defining file
systems in DTS.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-12-06 08:08:26 -05:00
Marc Reilly
54b6d26242 drivers: spi: add spi-bitbang driver
This adds an spi master mode driver via bitbanged gpio. Only syncronous
transfers are implemented. Clock signal timing is accomplished via busy
waits, the gpios are manipulated via the standard gpio interface; these
two factors limit the frequency at which it can operate - but here
a simple and generic implementation was chosen over performance.

The driver supports the various clock polarity and phase
configurations, and can also work with word sizes which are non
multiples of 8bits, currently up to 16 bits.

A sample program is also added demonstrating basic use of the driver
with 9bit data words.

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
2021-12-06 07:29:45 -05:00
Bryce Wilkins
219bf88fe8 drivers: spi: Add optional delays to mcux flexcomm spi driver
Adds optional device tree properties to insert delays between spi chip
select assert/deassert and the clock edges, and also between spi
frames and transfers to the mcux flexcomm spi driver. If the properties
are not set, no additional delay is inserted.

Verified expected behavior on mimxrt685_evk and check with a scope
that the pre- and post-delay could be changed from the device tree
properties.

Signed-off-by: Bryce Wilkins <bryce.wilkins@gmail.com>
2021-12-03 16:42:10 -06:00
Hake Huang
f417678e6d dts: bindings: add audio related dts bindings for imx-rt
add anatop, i2s and pinmux dts

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-12-02 10:50:21 +01:00
Antonio Tessarolo
cc1cd4d65b arm: Nxp imx6sx added PWM support
This commit adds support for IMX6SX PWM.
The PWM module is the same module present on the IMX7D and so dts
bindings has been renamed following the one present on linux.

Signed-off-by: Antonio Tessarolo <anthonytexdev@gmail.com>
2021-11-30 11:54:11 -06:00
Tomasz Bursztyka
1c1a2ccdbd dts/bindings: Add a dedicated frame format property on SPI device
Most of the time SPI devices use TI's frame format. But some may use
Motorola's. This is already taken care of in the SPI API and now it will
be possible to select the right format from DTS. Like:

    ...
    frame-format = <SPI_FRAME_FORMAT_MOTOROLA>;
    ...

This is only meant to be used for devices supporting both formats (so
the format is not hard-coded in the driver) and selected by hardware
configuration or else.  Which, in such case, it will need to use
DT_INST_PROP(<instance number>, frame-format) macro call to retrieve
the property value. Others can fully ignore it.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2021-11-29 17:17:36 +01:00
Casper Meijn
85ba056af9 drivers: display: st7789v: Fix software reset
Software reset is already implemented in the driver when the
`reset_gpio` is not defined. However it could not be activated
because the `reset_gpio` is a required field in the DTS
binding.

Signed-off-by: Casper Meijn <casper@meijn.net>
2021-11-29 16:29:33 +01:00
Ruibin Chang
fad78a2c07 ITE drivers/sensor: add tachometer driver for it8xxx2_evb
Add tachometer driver for it8xxx2_evb.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2021-11-29 08:25:19 -05:00
Gerard Marull-Paretas
3b7215e160 drivers: serial: nrfx_uarte: add support for pinctrl
This patch adds support for the new pinctrl API to the UARTE driver. The
old pin property based solution is still kept so that users have time to
transition to the new model.

Notes:

- Some build assertions cannot be performed since the driver does not
  have direct access to pin settings anymore. As a result user will not
  be notified if HWFC is enabled but RTS/CTS pins are not configured.
- Hardware flow control can be enabled regardless of pin configuration,
  it is now up to the user to configure RTS/CTS pins in DT.
- Some RX enable checks that were performed using pin information has
  been replaced with a DT property that informs if RX is enabled or not.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-26 14:20:51 +01:00
Gerard Marull-Paretas
22c8c02145 drivers: pinctrl: nrf: initial support
Add initial support for nRF pin controller driver. The implementation in
this patch does not yet support any peripheral. Only states
representation and basic driver functionality is introduced.

Note:
The nrf_pin_configure function has been marked as __unused since it may
not be used in certain scenarios until all peripherals are supported by
the pinctrl driver. For example, if only UART/E is supported but the
board does not enable UART, the function will never get called. However,
that board will likely have other peripherals that will gain support in
the future.

Thanks to Marti Bolivar for bindings documentation.

Co-authored-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-26 14:20:51 +01:00
Erwan Gouriou
37bf7cbe4f dts/bindings: stm32: Set pinctrl-[0/names] properties as required
Now that STM32 drivers are using pinctrl API, set pintrl-0 and
pintrl-names properties as required in order to report malformed
nodes description soon at build stage and avoid cryptic
DT api build error messages.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-26 11:36:42 +01:00
Erwan Gouriou
eff3ad6df7 drivers/pwm: stm32: use new pinctrl API
Use the new pinctrl API to configure pins.
Since STM32F1 series require pinctrl option and required register
address is parent timer address in place of own node register address,
use PINCTRL_DT_INST_CUSTOM_REG_DEFINE in place of usual
PINCTRL_DT_INST_DEFINE for this specific series.

Additionally, remove the automatic selection of PINMUX API.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-26 11:36:42 +01:00
Erwan Gouriou
90b0e92540 drivers/usb/device: stm32: use new pinctrl API
Use the new pinctrl API to configure pins.

Additionally, rename usb_pinctrl to usb_pcfg to better fit
new pinctrl API.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-26 11:36:42 +01:00
Erwan Gouriou
8bd410a589 drivers/spi: stm32: use new pinctrl API
Use the new pinctrl API to configure pins.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-26 11:36:42 +01:00
Erwan Gouriou
ab893d5fef drivers/memc: stm32: use new pinctrl API
Use the new pinctrl API to configure pins.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-26 11:36:42 +01:00
Erwan Gouriou
79943f647f drivers/i2s: stm32: use new pinctrl API
Use the new pinctrl API to configure pins.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-26 11:36:42 +01:00
Erwan Gouriou
f21de9dfe6 drivers/i2c: stm32: use new pinctrl API
Use the new pinctrl API to configure pins.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-26 11:36:42 +01:00
Erwan Gouriou
dfbaa4149d boards: arm: stm32: add pinctrl state name for I2C peripheral
Add the pinctrl state name (default) for the I2C peripherals.
Changes performed based on the script proposed in
"boards: arm: stm32: add pinctrl state name for UART peripheral"

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-26 11:36:42 +01:00
Erwan Gouriou
cec2cb69dd drivers/flash: qspi stm32: use new pinctrl API
Use the new pinctrl API to configure pins.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-26 11:36:42 +01:00
Erwan Gouriou
87438e4587 drivers/ethernet: stm32_hal: use new pinctrl API
Use the new pinctrl API to configure pins.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-26 11:36:42 +01:00
Erwan Gouriou
d55905b2f7 drivers/disk: sdmmc: stm32: use new pinctrl API
Use the new pinctrl API to configure pins.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-26 11:36:42 +01:00
Erwan Gouriou
956afc3a08 drivers/dac: stm32: use new pinctrl API
Use the new pinctrl API to configure pins.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-26 11:36:42 +01:00
Erwan Gouriou
65d222b0ab drivers/fdcan: stm32: use new pinctrl API
Use the new pinctrl API to configure pins.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-26 11:36:42 +01:00
Erwan Gouriou
337c9b96e9 drivers/can: stm32: use new pinctrl API
Use the new pinctrl API to configure pins.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-26 11:36:42 +01:00
Erwan Gouriou
93956b2073 drivers/adc: stm32: use new pinctrl API
Use the new pinctrl API to configure pins.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-26 11:36:42 +01:00
Gerard Marull-Paretas
21a271962c drivers: serial: stm32: use new pinctrl API
Use the new pinctrl API to configure pins.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-26 11:36:42 +01:00
Krzysztof Chruscinski
9886bdc0c8 drivers: pwm: pwm_nrf5_sw: Use runtime resources allocation
Use nrfx_gpiote and nrfx_ppi allocators to allocate channels
at runtime instead of fixed, device-tree based allocation which
is harder to maintain.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-11-26 09:31:54 +01:00
Neil Armstrong
3f68124c56 bindings: pcie: add pci-host-ecam-generic bindings
Add bindings for a generic PCIe Controller in ECAM mode.

ECAM stands for PCI Express Enhanced Configuration Access Mechanism
where the PCIe config space is flat memory-mapped.

An optional msi-parent phandle is added to link to an optional
MSI/MSI-X Interrupt Message Translation HW component.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-11-25 18:37:15 +01:00
Sam Hurst
cc1cedb82e dts: bindings: Add yaml file for STM32 TCPC support to DT
Add yaml files to DT for initial support of STM32 TypeC
Port Controller (TCPC)

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2021-11-24 14:21:04 -05:00
HaiLong Yang
5e035b0f4e drivers: serial: gd32 usart add interrupt support
Add interrupt support for gd32 usart driver.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2021-11-23 13:25:43 -05:00
Guillaume Lager
4c986a266f drivers: sensor: tmp112: Add default device initialization
This allow to have a smaller driver footprint when a single
configuration is required.

Signed-off-by: Guillaume Lager <g.lager@innoseis.com>
2021-11-23 13:12:39 +01:00
Carlo Caione
983d4606ff ipc_service: Add new RPMsg with static VRINGs backend
Introduce a new RPMsg with static VRINGs backend. This new backend makes
easy to generate and use IPC instances backed by OpenAMP using the DT.

Each instance is defined in the DT as (for example):

  ipc: ipc {
          compatible = "zephyr,ipc-openamp-static-vrings";
          shm = <&sram_ipc0>;
          mboxes = <&mbox 0>, <&mbox 1>;
          mbox-names = "tx", "rx";
          role = "primary";
          status = "okay";
  };

It is then possible to register an send data through endpoints using the
IPC service APIs.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-11-22 23:03:23 -05:00
Peter Johanson
d99de305ce dts: bindings: Add generic Xiao interconnect
* With existence of Adafruit Qt Py boards, and upcoming wireless
  Xiao from Seeeduino, define nexus node and peripheral node
  labels for use with shields that accept any Xiao format board.
* Adds `&xiao_d`, `&xiao_spi`, `&xiao_i2c` and `&xiao_serial` generic
  node labels.
* Add new 'seeed-xioa-header.yaml` to document new nexus node.

Signed-off-by: Peter Johanson <peter@peterjohanson.com>
2021-11-22 22:25:20 -05:00
Gerard Marull-Paretas
285f55899b drivers: serial: gd32: use pinctrl
Use the pinctrl API to configure peripheral pins.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2021-11-22 16:30:28 -05:00
Gerard Marull-Paretas
f8017dc5ad drivers: pinctrl: gd32: initial support for AFIO based SoCs
Add a pin control driver for GD32 SoCs using the AFIO model.

Thanks to Gerson Fernando Budke for testing and implementation
suggestions.

Co-authored-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2021-11-22 16:30:28 -05:00
Gerard Marull-Paretas
543a3843ff drivers: pinctrl: gd32: initial support for AF based SoCs
Add a pin control driver for GD32 SoCs using the AF model.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2021-11-22 16:30:28 -05:00
Wealian Liao
5a9bc389f0 driver: gpio: nct38xx: Add NCT38XX gpio driver support
NCT38XX series, which are i2c-based chips, support a different number
of GPIO functionality. For NCT3807, it has 2 GPIO ports on the same i2c
device address. For NCT3808, it has 2 GPIO ports on different i2c
device addresses. This commit adds NCT38XX GPIO driver support &
provides the interrupt handler for the share alert pin.

The following is NCT3807 devicetree node example:
```
&i2c0_0 {
	nct3807_0: nct3807@70 {
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "nuvoton,nct38xx-gpio";
		reg = <0x70>;
		label = "NCT3807_0";

		gpio@0 {
			compatible = "nuvoton,nct38xx-gpio-port";
			reg = <0x0>;
			label = "NCT3807_0_GPIO0";
			gpio-controller;
			#gpio-cells = <2>;
			ngpios = <8>;
			pin_mask = <0xff>;
			pinmux_mask = <0xf7>;
		};

		gpio@1 {
			compatible = "nuvoton,nct38xx-gpio-port";
			reg = <0x1>;
			label = "NCT3807_0_GPIO1";
			gpio-controller;
			#gpio-cells = <2>;
			ngpios = <8>;
			pin_mask = <0xff>;
		};
	};
};
```

Signed-off-by: Wealian Liao <WHLIAO@nuvoton.com>
2021-11-20 08:00:38 -05:00
Ruibin Chang
3ab081efe9 ITE drivers/pwm: cleanup it8xxx2 pwm driver
1.Putting the PWM_CHANNEL_X, PWM_PRESCALER_CX information
  in the description.
2.Use the common definition EC_FREQ.
3.Use the common macro IT8XXX2_DT_ALT_ITEMS_LIST.
4.Stop using DRV_CONFIG, DRV_REG macro.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2021-11-19 10:24:11 -06:00
Tomasz Bursztyka
4bd5935302 dts/bindings: Add a dedicated property for duplex mode on SPI device
Users will have to include dt-bindings/spi/spi.h in order to use the
relevant flags fol this property. For instance:

    ...
    duplex = <SPI_HALF_DUPLEX>;
    ....

By default all SPI device are configured to be full duplex so the
property is optional. This property makes sense only for devices that
can be configured on either modes. Which, in such case, it will need to
use DT_INST_PROP(<instance number>, duplex) macro call to retrieve the
property value. Others can fully ignore it.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2021-11-19 11:50:38 +01:00
Tomasz Bursztyka
20b8d74d42 dts/bindings: Update HTS221 bindings to enable both i2c and SPI bus
HTS221 is now supported on both buses so let's make DTS aware of it.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2021-11-19 11:50:38 +01:00
Gerard Marull-Paretas
1832d68e01 tests: lib: devicetree: add tests for DT_INST_ENUM_IDX(_OR)
Add tests for the instance based enum macros DT_INST_ENUM_IDX and
DT_INST_ENUM_IDX_OR.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-18 19:12:07 -05:00
Tim Lin
e29a15c0e3 ITE: drivers/serial: add the UART driver for the PM callback function
IT8XXX2 uses shared ns16550.c driver which does not provide a power
management callback(pm_action_cb), so create driver to handle
IT8XXX2 specific UART features.

note: pm_action_cb(old name: pm_control_fn)

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2021-11-16 21:23:42 -05:00
Alexandre Bourdiol
37175e8643 dts: bindings: stm32: move "st,prescaler" to timers instead of pwm
Prescaler was misplaced in pwm binding, instead of timers binding.
For example, TIM6/TIM7 doesn't have PWM capability,
but have a prescaler.
Also prescaler is common to all PWM channels of the same timer.
This change also prepares the introduction of timer based counter
(which requires prescaler at timer level)
For compatibility reason temporarily keep pwm binding to avoid
breaking boards out of tree.
Block st,prescaler property in lptim binding
as lptim doesn't use this property for now.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-11-16 09:55:30 -06:00
Lukas Gehreke
0544f5dbc3 drivers: gpio: Added mcp230xx GPIO driver.
Added driver for the mcp230xx series I2C-based GPIO chips.

Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
2021-11-16 10:13:14 -05:00
Martí Bolívar
d2ba94bbea dts: nordic,nrf-radio: add fem property
This will be used to take a phandle to a FEM device, either a generic
two pin device or an nRF21540. Keep the nRF21540 binding example up to
date.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-11-11 21:52:24 +01:00
Martí Bolívar
a930bebb42 dts: bindings: improve nordic,nrf21540-fem docs
The way the nRF21540 device is configured makes sense once you
understand it, but it's quite unusual: a single peripheral is
configured with two separate devicetree nodes linked by a phandle.

Since this risks entering "exploding head" territory for beginners, it
deserves a thorough example. Add one to the binding's description.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-11-11 21:52:24 +01:00
Martí Bolívar
9bbaccc8ed dts: bindings: add generic-fem-two-ctrl-pins
This is a helper binding for radio front-end modules that have a
two-pin control interface, where one pin is used to turn on an power
amplifier (PA) for TX, and another is used to turn on a low-noise
amplifier (LNA) for RX.

Such hardware is already supported by the Bluetooth subsystem, but via
PA/LNA Kconfig settings. Since this is hardware configuration, it is
better to move this to devicetree instead.

Add a binding that makes it possible to define nodes which contain the
same information, along with a bit of extra information related to the
gain in dB of each amplifier not currently available from Kconfig.
This is similar to the existing binding for the nordic,nrf21540-fem
compatible.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Andrzej Kuros <andrzej.kuros@nordicsemi.no>
2021-11-11 21:52:24 +01:00
Martí Bolívar
3eb2377c58 dts: sitronix,st7789v: fix binding whitespace
Clean up multi-line strings so they will show up properly in the
bindings index in the HTML documentation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-11-10 17:28:17 -05:00
Carlo Caione
74b701065d bindings: nrf-ipc: Enable DT helpers
Make the MBOX NRF IPC instances referenceable using the MBOX DT helpers.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-11-10 10:28:14 -06:00
Jonathan Rico
4f2762d7da dts: Add external coexistence pointer to nrf-radio
This is to support upcoming external radio coexistence implementations,
see binding documentation for more info.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2021-11-10 16:11:41 +01:00
Neil Armstrong
2825481747 devicetree: add tests for devicetree ranges API macros
Test cases for new APIs.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-11-10 08:23:00 -05:00
Nick Ward
fa94be591d drivers: spi_nrfx_spim: workaround for nRF52832 errata anomaly 58
See:
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fstruct_nrf52%2Fstruct%2Fnrf52832_errata.html
https://infocenter.nordicsemi.com/pdf/nRF52832_Rev_3_Errata_v1.0.pdf

Code derived from the example PAN 58 workaround code.

Adds a new nRF SPIM Devicetree binding property called
anomaly-58-workaround that allows the workaround to be enabled
if required per SPIM instance.

Signed-off-by: Nick Ward <nick.ward@setec.com.au>
2021-11-09 20:04:45 -05:00
Andrei-Edward Popa
5413661a81 boards: xtensa: add ledc support to the esp32 board
add ledc to board dtsi file,
change compatible and device define in pwm driver,
add yaml for board ledc support,
fix missing include for board in gpio include

Signed-off-by: Andrei-Edward Popa <andrei_edward.popa@upb.ro>
2021-11-07 05:36:42 -05:00
Sylvio Alves
ab91612a6d driver: esp32: I2C code refactoring
Use i2c_hal functions to enable support for
multiple SoCs.

Use DT compat to enable I2C from device
tree configuration

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-11-05 14:07:09 -04:00
Sylvio Alves
27e44acda1 clock: esp32: unify clock control for all espressif socs
This joins all clock control handling to same source
by using hal clock functions. It also brings ESP32C3
clock support.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-11-04 15:21:26 -04:00
Tomasz Bursztyka
e854950219 dts/pcie: Add PTM root device specification
It only requires a proper reg property to be filled-in.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2021-11-04 11:06:02 -04:00
Sylvio Alves
d5aa5c2a77 drivers: esp32: uart: use hal functions
In order to have Espressif SoCs working with
the same uart drivers, all low level functions
are now replaced to hal_espressif HAL calls.

This also changes pinmux, gpio and uart
init order to meet its dependencies.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-11-03 16:47:32 -04:00
Erwan Gouriou
1a73c39dfc dts/bindings: clock: cpu2-prescaler is optional on stm32wl
STM32WL could be either single core (stm32wlex) or
dual core (stm32wl5/4x).
Make CPU2 prescaler an optional property (while it will
be required if inherited from st,stm32wb-rcc.yaml.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-03 16:19:06 -04:00
Erwan Gouriou
bbe47ee529 dts/bindings/clocks: stm32: Set RCC properties as mandatory
Now that Kconfig option for STM32 clocks configuration has been
removed, set rcc properties as required.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-03 16:19:06 -04:00
Krzysztof Chruscinski
9174cd8dbc drivers: watchdog: Add software watchdog based on counter
Added watchdog implementation which is using counter device
to implement watchdog driver API. Watchdog timeout is called from
counter interrupt context. Some counter implementations support
using ZLI interrupt level which can be use here as well. Watchdog
like this can be used along hardware watchdog to cover for its
limitations, i.e. Nordic watchdog resets unconditionally after
62uS after triggering watchdog interrupt. It is not enough time
to dump logging data.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-11-02 13:22:58 +01:00
Jun Lin
5d72417df4 drivers: spi: npcx: add SPI support to access the SPI flash
The FIU/UMA module in the NPCX chip provides an dedicated SPI interface
to access the SPI flash. This commit adds the driver support for it.
With this commit, the application can call the flash APIs
(via spi_nor.c) to access the internal flash of NPCX EC chips.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Change-Id: I32bbf09f6e014b728ff8e4692e48151ae759e188
2021-11-01 21:48:20 -04:00
Gerson Fernando Budke
45d60c4d4c drivers: serial: Add gd32 uart driver
Introduce minimal serial driver support for gigadevice soc.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-10-28 11:17:25 +02:00
Gerson Fernando Budke
c22d36fb42 dts: bindings: vendor-prefixes: Add gigadevice prefix
Add gigadevice manufacturer binding prefix.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-10-28 11:17:25 +02:00
Carlo Caione
012591c4a5 mbox: Introduce MBOX NRFX IPC driver
Rewrite the NRFX IPC driver to properly support multi-channel addressing
leveraging the newly introduced MBOX APIs.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-10-27 18:27:21 +02:00
Carlo Caione
1976f33e87 drivers: mbox: Introduce MBOX driver class
One limitation of the current IPM API is that it is assuming that the
hardware is only exporting one single channel through which the data can
be sent or signalling can happen.

If the hardware supports multiple channels, the IPM device must be
instantiated (possibly in the DT) several times, one for each channel to
be able to send data through multiple channels using the same hw
peripheral. Also in the current IPM API only one callback can be
registered, that means that only one driver is controlling all the
signalling happening on all the channels.

This patch is introducing a new MBOX API that is supporting
multi-channel signalling and data exachange leveraging and extending the
previous (and outdated) IPM API.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-10-27 18:27:21 +02:00
Nicolas Pitre
bc41234104 ethernet: Synopsys DesignWare MAC driver
This is a driver for the Synopsys DesignWare MAC. It should work
with the "DesignWare Cores Ethernet Quality-of-Service" versions 4.x
and 5.x.

This driver uses a zero-copy strategy, meaning that the hardware
reads and writes data directly from/to packet fragment buffers
provided by the network subsystem without first copying the data into
a dedicated DMA bounce buffer.

Platform specific setup is necessary for the hardware to work.
Currently, only the STM32H7X series is implemented and tested.
While this part needs refinement, this driver performs better and uses
far less code space than the HAL-based alternative.

Not yet implemented:

- MDIO (it is WIP, currently relying on default PHY config)
- PTP support
- VLAN support
- various hardware offloads (when available)

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2021-10-27 10:43:05 -04:00
Henrik Brix Andersen
ed041e30e7 dts: bindings: rng: add binding for the neorv32 trng
Add devicetree binding for the NEORV32 True Random Number Generator
(TRNG).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-10-26 17:53:15 -04:00
Jay Vasanth
c214c59548 Microchip: MEC172x: eSPI driver
MEC172x eSPI driver, eSPI pin programming, interrupt updates related
to eSPI and other updates for MEC172x eSPI driver.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2021-10-26 09:27:20 -04:00
Gerard Marull-Paretas
a578bb70b6 tests: drivers: pinctrl: add tests for API
Add a set of tests to check the API behavior. The API tests can only run
on a platform that does not have an actual pinctrl driver, e.g.
native_posix. The test itself implements a pinctrl mock driver and
provides the required "pinctrl_soc.h" header with required types/macros.
The implementation is used in the tests to verify the behavior of the
API or Devicetree macros.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-25 15:26:47 -05:00
Gerard Marull-Paretas
c871317e8f dts: bindings: pinctrl: add pincfg-node-group
When using group based representation on pinctrl nodes, the pin
configuration properties end up being at the grand-children level, so
the `pincfg-node.yaml` file can't be used.

Having a common file that can be used for both cases would require
tooling changes, so for now a copy that operated at the grand-children
level has been created.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-25 15:26:47 -05:00
Gerard Marull-Paretas
4040df096f drivers: pinctrl: initial skeleton
Initial skeleton for pinctrl drivers. This patch includes common
infrastructure and API definitions for pinctrl drivers.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-25 15:26:47 -05:00
Andrei Auchynnikau
3b3a30612f drivers: add adc driver for the NXP RT series
adc driver is based on the NXP MCUX hal library

Signed-off-by: Andrei Auchynnikau <ovchinnikov@strim-tech.com>
2021-10-22 15:43:36 -05:00
Armando Visconti
ea6ad7337c drivers/sensor: lis2ds12: Move odr Kconfig property into dts
Move odr options from Kconfigs to Device Tree. Moreover add
in DT a power-mode option to select among 4 possible values
(PD, LP, HR, HF). The power mode cannot be currently set from
sensor APIs.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-10-22 09:06:07 -05:00
Armando Visconti
e0f06e23ef drivers/sensor: lis2ds12: Move range Kconfig property into dts
Converts lis2ds12 range options (2g, 4g, 8g, 16g) from Kconfig
to Device Tree.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-10-22 09:06:07 -05:00
Armando Visconti
2a48d497a0 dts/bindings: lis2ds12: create a common DT binding file
Create a common properties file that will be included by all DT
bindings (as i2c and spi) handled by lis2ds12 driver.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-10-22 09:06:07 -05:00
Erwan Gouriou
6757fae188 dts/arm: stm32mp1: Add compatible for mp1 rcc node
Add a dedicated compatible for STM32MP1 clock control node.
Since, on such platform, clock configuration is done on A9
side, only the clock-frequency property is available.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-10-21 13:14:37 -04:00
Martí Bolívar
f259790bf8 dts: bindings: fix file names
Make sure binding file names match their compatibles.

Done with a script.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-10-20 07:33:04 -04:00
Kumar Gala
3c6b8e5736 devicetree: Add mailbox bindings
Add general mboxes, mbox-names to base.yaml to be utilized by any
clients that use mailboxes.

Additionally add mailbox-controller.yaml for common properties shared
by all mailbox controller devices.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-10-17 11:47:59 -04:00
Henrik Brix Andersen
3e70c4fcc9 drivers: gpio: add neorv32 gpio driver
Add GPIO driver for the open-source NEORV32 RISC-V compatible processor
system (SoC).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-10-15 09:46:53 -04:00
Henrik Brix Andersen
c6ada02210 drivers: serial: add neorv32 uart driver
Add UART driver for the open-source NEORV32 RISC-V compatible processor
system (SoC).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-10-15 09:46:53 -04:00
Henrik Brix Andersen
a281dbfb6d soc: riscv: privilege: add neorv32 processor suppport
Add support for the open-source NEORV32 RISC-V compatible processor
system (SoC).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-10-15 09:46:53 -04:00
Carlo Caione
42105ed882 dts: Add support for specifier-space property.
Currently all the *-names and *-cells properties are derived from the
name of the base <name>s property. This is a limitation because:

- It forces the base property name to be plural ending in -s
- It doesn't allow the english exception of plural words ending in -es

With this patch we add one additional property 'specifier-space' that
can be used to explicitly specify the base property name.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Suggested-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-10-13 09:56:46 -05:00
Carlo Caione
43cb00df08 multi_heap: Introduce shared multi-heap memory pool manager
The shared multi-heap memory pool manager uses the multi-heap allocator
to manage a set of reserved memory regions with different capabilities /
attributes (cacheable, non-cacheable, etc...) defined in the DT.

The user can request allocation from the shared pool specifying the
capability / attribute of interest for the memory (cacheable /
non-cacheable memory, etc...)

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-10-12 07:44:46 -04:00
Glauber Maroto Ferreira
26131ba5d4 esp32: drivers: spi: driver refactoring
in preparation to support other esp32-family socs

on top of existing driver.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-10-10 14:52:41 -04:00
Erwan Gouriou
19a40a15b6 drivers/usb: stm32: Deprecate 'enable-pin-remap'
'enable-pin-remap' is deprecated in favor of 'remap-pa11-pa12' from
'st-stm32-pinctrl'.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-10-07 15:38:53 -04:00
Erwan Gouriou
76505cff9f dts/bindings/pinctrl: stm32: Add properties for PA11/PA12 pin remaps
Add specific properties to enable remap for PA11/PA12, which is a
possibility on STM32G0/F0 SoCs.
These properties only have effect when defined.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-10-07 15:38:53 -04:00
Tim Lin
e8366689d1 ITE: dts: cpu/yaml: fix the name of compatible
This name should be the same as cpus node in dtsi. After the power
policy is added, the cpu-power-states in the CPU properties can
be used.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2021-10-07 06:09:45 -05:00
Francois Ramu
8eb050caf9 dts: clock: stm32 configure ahb prescaler for HCLK
AHB prescaler is a value which divides the SYSCLOCK
to provide the HCLK. The HCLK supplies the core, AHB bus, memory.
On the stm32wb and stm32wl, the HCLK for CPU1 is HCLK1
with cpu1-prescaler.
By default the value is 1, else the HCLK must be correctly set.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-10-04 20:37:09 -04:00
Felipe Neves
16be75b68f dts: added dts binding for esp32c3
interrupt controller, also places its relevant
peripheral sources allowing drivers to use the
DT macros instead of espressif headers.

Signed-off-by: Felipe Neves <felipe.neves@espressif.com>
2021-10-02 14:33:24 -04:00
Martí Bolívar
736f2add71 Revert "dts: bindings: vendor-prefixes: Add gigadevice prefix"
This reverts commit d3a558591f.

We shouldn't be adding vendor prefixes for things we don't have
upstream bindings for unless we've inherited them from Linux.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-10-01 17:55:29 -04:00
Christopher Friedt
137594c666 Revert "dts: stm32 spi can configure the frame-format"
This reverts commit 394996313a.

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-09-30 16:04:37 -04:00
Francois Ramu
394996313a dts: stm32 spi can configure the frame-format
If supported by the SPI instance and soc, this property will
configure the frame-format to be compliant with the TI mode.
By default, if supported, the frame-format is Motorola mode.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-09-29 14:47:31 -04:00
Gerson Fernando Budke
d3a558591f dts: bindings: vendor-prefixes: Add gigadevice prefix
Add gigadevice manufacturer binding prefix.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-09-28 20:07:47 -04:00
Ruibin Chang
d16ae76d30 ITE drivers/kscan: add keyboard scan driver for it8xxx2_evb
Add keyboard scan driver for board it8xxx2_evb.

Signed-off-by: Ruibin Chang <ruibin.chang@ite.com.tw>
2021-09-28 19:53:15 -04:00
Neil Armstrong
ca849af5ea dts: add GIC v3 ITS bindings
Add DT bindings for the optional Interrupt Translation Service module
of the ARM GICv3 Interrupt Controller.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-09-28 19:45:29 -04:00
Jonathan Hahn
c9f87969c2 drivers: sensor: add I3G4250D Gyro driver
Implements a shim layer driver using st hal for
I3G4250D gyro, mounted for example on stm32f3_disco_E.
No support for triggers included yet.

Signed-off-by: Jonathan Hahn <Jonathan.Hahn@t-online.de>
2021-09-28 19:44:26 -04:00
Glauber Maroto Ferreira
e605efc698 esp32s2: drivers: clock_control: add support
add clock control driver support for esp32s2 SoC.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-09-27 22:02:08 -04:00
Yuval Peress
a1f6d97978 drivers: syscon: Add support for multiple regions
1. Add support for multiple syscon entries (as a side effect, this also
   fixed syscon.c implementations which weren't being linked to their
   syscon.h counterparts).
2. Add support for different width registers in syscon.
3. Add tests for syscon

Signed-off-by: Yuval Peress <peress@chromium.org>
2021-09-22 10:32:11 -04:00
Andrzej Głąbek
5601805695 drivers: i2c_nrfx_twim: Add handling of buffers located in flash
TWIM peripherals cannot perform write transactions from buffers
located in flash. The content of such buffers needs to be copied
to RAM before the actual transfer can be requested.
This commits adds a new property (zephyr,flash-buf-max-size) that
informs the driver how much space in RAM needs to be reserved for
such copying and adds proper handling of buffers located in flash.
This fixes an issue that caused that e.g. the DPS310 sensor driver
did not work on nRF SoCs that only have TWIM, not TWI peripherals.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-09-21 13:44:06 +02:00
Andrzej Głąbek
99ce264df7 drivers: i2c_nrfx_twim: Use concatenation buffer by default
Issue an error logging message when the i2c_nrfx_twim driver lacks
a concatenation buffer big enough to properly handle a call to
i2c_burst_write() function, to give the user a hint what is wrong.

Also use by default a 16-bytes long concatenation buffer for every
instance of the i2c_nrfx_twim driver. Such value should cover most
of the simple uses of the i2c_burst_write() function, like those
in the stmemsc sensor drivers, and when a longer buffer is needed,
the user will be provided with the above message pointing to the
property that should be adjusted.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-09-21 13:44:06 +02:00
Ryan Erickson
2dcd5b44e1 DTS: modem: HL7800: remove DTR binding
Remove the HL7800 DTR device tree binding because the
DTR IO is not needed for operation of the HL7800
modem.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2021-09-20 12:24:40 -04:00
Ron Smith
dd3a3318ec dts: atmel: sam0: Add clarification on dma-cells property
Add clarification to the dma-cells property explaining the purpose
of each cell.

Signed-off-by: Ron Smith <rockyowl171@gmail.com>
2021-09-19 19:31:25 -04:00
Andrzej Głąbek
1bf7c391b8 drivers: audio: dmic: Add support for nRF PDM peripherals
Add a shim that allows using the nrfx PDM driver via the Zephyr API.
Add also missing devicetree nodes representing the PDM peripherals
in the nRF52 Series SoCs.
Extend the "nordic,nrf-pdm" binding with a new property that allows
specifying the clock source to be used by the PDM peripheral (so that
it is possible to use HFXO for better accuracy of the peripheral clock
or, in the nRF53 Series SoCs, to use the dedicated audio oscillator).

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-09-03 09:34:06 -04:00
Hake Huang
de56fdb3d8 dts: update nxp kinetis dspi to support edma
add necessary features for edma into dts for kinetis DSPI

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-09-02 15:50:52 -05:00
Yuriy Vynnychek
587304836d dts: riscv: add Telink B91 I2C driver support
Added I2C driver DTSI support for Telink B91 platform.

Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
2021-09-01 06:36:56 -04:00
Yong Cong Sin
9d2f8a1124 drivers: modem: gsm_ppp: Use DTS
Convert the gsm_ppp driver to use DTS.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2021-08-31 17:33:34 -04:00
Martí Bolívar
7a77a31436 dts: fix location of stm32-specific property
The max-erase-time property was introduced for the STM32 flash driver,
but it was inserted as an optional property in the generic
soc-nv-flash binding which is used by other SoCs.

Make it a required property in a new st,stm32-nv-flash binding
instead, since it is at present a vendor specific property.

Update the DTS files accordingly. Keep the existing "soc-nv-flash"
value in the compatible list in each case, so that DT_HAS_COMPAT(...
soc_nv_flash) tests on these nodes will still succeed, but put it
after a newly added "st,stm32-nv-flash" compatible, so that the
SoC-specific binding will be used as it is discovered first by the DT
tooling.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-30 13:40:30 -04:00
Jim Shu
e4cb3469d6 dts: riscv: add DTS and related bindings of andes_ae350 soc
Add DTSI file of andes_ae350 SoC and bindings of GPIO driver.

Signed-off-by: Jim Shu <cwshu@andestech.com>
2021-08-30 13:40:14 -04:00
Yuval Peress
74b9a607b4 drivers: bbram: Add it8xxx2 BBRAM driver implementation
Note that the it8xxx2 does not support a status register so that
functionality is omitted.

This change also adds driver tests that build both the npcx and it8xxx2
drivers.

Signed-off-by: Yuval Peress <peress@chromium.org>
2021-08-30 11:35:23 -04:00
Arvin Farahmand
f845cddcf7 drivers: Add Ethernet PHY API
This commit adds support for Ethernet PHY drivers via a PHY API.

It also includes a driver for a generic MII compliant PHY
which supports most PHYs on the market.

Separating PHY driver from the SoC specific Ethernet driver
simplifies the Ethernet driver code and enables code re-use.
Drivers for specific PHYs with more advanced features, such as
RGMII delay in PHY can be developed independent of the Ethernet
MAC driver.

Signed-off-by: Arvin Farahmand <arvinf@ip-logix.com>
2021-08-27 11:43:48 -04:00
Arvin Farahmand
c4cb45eaac drivers: mdio: add Atmel SAM MDIO driver
MDIO driver for ATSAM platform with Ethernet.

Signed-off-by: Arvin Farahmand <arvinf@ip-logix.com>
2021-08-27 11:43:48 -04:00
Arvin Farahmand
419b103dd6 drivers: Add mdio API
This commit adds support for MDIO bus. The bus is used by Ethernet
MACs to communicate with PHYs.

Signed-off-by: Arvin Farahmand <arvinf@ip-logix.com>
2021-08-27 11:43:48 -04:00
Piotr Mienkowski
2f17bd8e6b drivers: Add Atmel SAM DAC (DACC) driver
Add Digital-to-Analog Converter driver (based on DACC module) for Atmel
SAM MCU family. Only SAME70, SAMV71 series devices are supported in
this version.

Tested on Atmel SMART SAM E70 Xplained board.

Origin: Original

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2021-08-26 16:46:16 -04:00
Gerson Fernando Budke
f53fce30b2 dts: usb: Add atmel USBC device ctrl
Add atmel USBC device controller dts entries.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-08-26 14:03:44 -04:00
Martí Bolívar
aa8fc3d7ff devicetree: add tests for devicetree/pinctrl.h macros
Test cases for new APIs.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-25 18:09:00 -04:00
Martí Bolívar
d85118fde9 dts: test: fix vnd,adc-temp-sensor binding path
This isn't following the <compatible>.yaml naming convention; fix it.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-25 18:09:00 -04:00
Scott Worley
145673d57a Microchip: MEC172x: I2C driver
Microchip MEC172x series I2C driver implementing controller
and target modes. The driver implemenents its own I2C port
pin control functions and does not depended upon pinmux. Future
updates will make use of PINCTRL when that subystem is finalized.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2021-08-25 13:07:45 -04:00
Toby Firth
893bfc0fc1 drivers: counter: added ctimer driver for lpcexpresso55s69
Added shim driver for the CTIMERs for the lpcexpresso55s69 board.

Fixes: #22705

Signed-off-by: Toby Firth <tobyjfirth@gmail.com>
2021-08-24 17:13:22 -04:00
Aurelien Jarno
698a28663c drivers/sensor: Add basic Silabs Si7210 support
This adds basic support for the Silabs Si7210 hall effect magnetic
position and temperature sensor. It is able to get magnetic field and
temperature in the default scale of the sensor (depending on the
variant). It also supports going into sleep mode without measurements
through the device power management infrastructure.

It is most notably missing support for scale change, measurement
averaging and filtering, and alert pin configuration (threshold,
hysteris, tamper).

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2021-08-24 10:16:19 -05:00
Erwan Gouriou
7406ad8553 dts/bindings: Add binding for STM32WL HSE Clock
STM32WL features a specific HSE clock with dedicated properties.
Add a dedicated binding and update STM32 clock control driver
header to take it into account.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-08-24 07:19:12 -04:00
Johann Fischer
5e3319f091 usb: cdc_acm: allow to configure CDC ACM UART device from devicetree
Add hidden Kconfig option to Kconfig.cdc and allow
to configure CDC ACM UART device from devicetree.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-23 18:53:47 -04:00
Johann Fischer
5ee0f6bd8e boards: native_posix: add USB device controller binding and node
Current USB device controller drivers (drivers/usb/device)
do not use DEVICE_DT_GET but the properties from devicetree,
and USB device controller node is parent for CDC ACM UART and
AUDIO children nodes.

Add USB device controller binding and node to keep the samples
building for native_posix driver.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-23 18:53:47 -04:00
Martí Bolívar
f5a3deaad3 dts: vendor-prefixes: add everlight
We have an everlight,b1414 binding.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-23 17:10:01 -04:00
Leonard Pollak
d6eb80ac27 drivers: sensor: INA219: added support
This adds support for the TI INA219 Zero-Drift, Bidirectional
Current/Power Monitor with I2C Interface

Signed-off-by: Leonard Pollak <leonardp@tr-host.de>
2021-08-23 10:32:07 -05:00
Mahesh Mahadevan
e62e949f37 dts: usb: Add MCUX USB driver
This USB driver is used for both NXP MXRT and LPC SoC
families that use the MCUX SDK.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-08-19 17:19:11 -04:00
Yuriy Vynnychek
77df331cc2 dts: riscv: add Telink B91 SPI driver support
Added SPI driver DTSI support for Telink B91 platform.

Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
2021-08-19 17:18:23 -04:00
Mahesh Mahadevan
77f05e3b7e dts: rt6xx: Add GPIO 2
Add GPIO Port 2

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-08-17 17:53:31 -04:00
Martí Bolívar
041099f67c Bluetooth: Controller: clean up nRF DFE
The way we currently handle direction finding extension (DFE) support
on Nordic nRF5 controllers relies on required devicetree properties
related to DFE in the "nordic,nrf-radio" node.

That doesn't make sense on radios without DFE support, though.
Any .dtsi for an SoC without DFE support which has such a node would
require extraneous DFE related properties like dfe-antenna-num.

Instead of making the properties required, mark them optional. We
indicate the presence of DFE support via a new 'dfe-supported' boolean
property which the SoC .dtsi files can set (or not) depending on
support.

This gives us the opportunity to do some cleanup in the Kconfig,
removing CONFIG_HAS_HW_NRF_RADIO_BLE_DF since we know from the
devicetree whether DFE support is available.

Handle that change appropriately in radio_df.c. This gives us an
opportunity to improve readability in the devicetree-related macro
magic in that file.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:52:43 -04:00
Martí Bolívar
ef54f3d5ce doc: samples: bluetooth: DFE fixes
The documentation for Bluetooth Direction Finding Extension (DFE)
samples has various issues:

- references to 'child' images, which do not exist in mainline zephyr

- invalid RST syntax: there are missing ` characters to end arguments
  to :zephyr_file: roles, creating unintelligible output

- incorrect RST usage:

   - using :zephyr_file: instead of :file: when referring to a file
     that the user must create, creating broken links to nonexistent
     files in the zephyr tree

   - using :code: instead of :kconfig: to refer to kconfig options,
     creating output without links to the help for those options

- redundant or duplicated information

- grammar, typos, various bits and pieces

Clean this up. As part of that, move various common bits and pieces of
information to the devicetree bindings index so they can just be
linked to from the sample docs.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-08-17 17:52:43 -04:00
Martí Bolívar
7cf99aa2f2 dts: use 'cdns,' instead of 'cadence,' consistently
The Linux vendor prefixes list uses 'cdns'. Match it, especially since
we have that prefix in our own list as well.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Martí Bolívar
f5a91d7a3f dts: use 'cdns' instead of 'xtensa' vendor prefix
These IP blocks' vendor is Cadence, whose proper vendor prefix is
'cdns' if we are going to match the Linux vendor prefixes list.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Martí Bolívar
30de558824 dts: rename 'vexriscv,intc0' compatible to 'vexriscv-intc0'
As far as I can tell, 'vexriscv' does not name a vendor:

https://github.com/SpinalHDL/VexRiscv

It also doesn't seem entrenched enough to merit a special case
exception to the de factor rule 'the "vnd,foo" namespace is for
vendors'. This is open to debate and we can revise as needed in the
future, but for now let's just rename the compatible to avoid
triggering warnings/errors about unknown vendors.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Martí Bolívar
bcf8e560c5 dts: rename 'nios2,i2c' compatible to 'altr,nios2-i2c'
The original NIOS-II developer and former vendor is Altera, which is
now part of Intel. Let's not add a new vendor prefix for something
that already exists and has been acquired; move it to use the existing
'altr,' prefix instead.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Martí Bolívar
f78d4be329 dts: fix 'grove,foo' compatibles by using 'seeed,grove-foo'
Rename:

- grove,light to seeed,grove-light
- grove,temperature to seeed,grove-temperature

The "grove" brand applies to a family of products by Seeed (sic):

https://www.seeedstudio.com/category/Grove-c-1003.html

Therefore we should use the existing vendor seeed.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Martí Bolívar
b4042154bf dts: fix 'colorway' compatibles
I can't find any reference anywhere showing that the manufacturer of
the LPD8803 or LPD8806 LED scripts is a company called 'colorway'.

Use 'greeled' instead; these seem to actually be manufactured by
GreeLed corporation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Martí Bolívar
98f43ba0be dts: fix max30101 compatible
It should be "maxim,max30101", because the vendor prefix for this
company is "maxim", not "max".

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Martí Bolívar
3910c35193 dts: fix u-blox sara r4 compatible
It should be "u-blox,sara-r4", because the vendor prefix for this
company is "u-blox", not "ublox".

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Martí Bolívar
7594676a26 dts: vendor-prefixes: add ftdi
We have a ftdi,ft800 binding, and it's easy to imagine additional
bindings coming in the future since their USB/UART chips are very
commonly used.

I didn't find anything in Linux for this vendor.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Martí Bolívar
819a926de0 dts: vendor-prefixes: add wolfson
This is now Cirrus.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Martí Bolívar
72e682d1d3 dts: vendor-prefixes: add arc
The vendor by that name was acquired by Synopsis.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Martí Bolívar
962fa25719 dts: vendor-prefixes: add telink
We have various bindings. I couldn't find anything in Linux.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Martí Bolívar
ae69a6c321 dts: vendor-prefixes: add microsemi
This has been acquired by Microchip.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Martí Bolívar
718910dbcd dts: vendor-prefixes: add decawave
This is now Qorvo.

https://www.decawave.com/decawave-to-be-acquired-by-qorvo/

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Martí Bolívar
ba1fcea67d dts: vendor-prefixes: add microbit
This is used for microbit,edge-connector. I couldn't find anything in
Linux, which is not surprising given these boards have constrained
Cortex-M chips.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Martí Bolívar
abc43e73cd dts: vendor-prefixes: add starfive
We have various compatibles matching this in a DTSI file.

Linux tracks this vendor too:

4071883fd8

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Martí Bolívar
6000881d37 dts: vendor-prefixes: add aosong
We have a aosong,dht binding. I see the vendor mentioned in Linux but
there's no vendor prefix and no confirmation that's actually the
vendor:

https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/iio/humidity/dht11.yaml

I guess that's probably fine. We can always fix the binding later if
we need to.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Martí Bolívar
babfa93ce8 dts: vendor-prefixes: add worldsemi
We have various bindings. I can't find a vendor in Linux.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Martí Bolívar
ab21bac599 dts: vendor-prefixes: add inventek
We have a inventek,eswifi binding. I can't find anything in Linux.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Martí Bolívar
c57b3b2acc dts: vendor-prefixes: add gooddisplay
We have a gooddisplay,gd7965 binding. I can't find anything by this
company in Linux.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Martí Bolívar
30fa81a2ae dts: vendor-prefixes: add apa
We have a binding for apa,apa102 in zephyr.

I can't find any bindings for this vendor in Linux.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Martí Bolívar
e741053f92 dts: vendor-prefixes: add quectel
We have a binding for compatible "quectel,bg9x".

I can't find any bindings for this vendor in Linux.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Martí Bolívar
0853a0958f dts: vendor-prefixes: add wiznet
We have a binding for wiznet,w5500 in zephyr.

Linux has a binding for this device, too:

d5ad8ec3cf/Documentation/devicetree/bindings/net/wiznet,w5x00.txt

But 'wiznet' is not present in the Linux vendor prefixes file for some
reason.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Martí Bolívar
e1e3ee83da dts: vendor-prefixes: add wnc
I can't find any bindings in Linux, but we have a binding for
wnc,m14a2a in Zephyr.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Martí Bolívar
7e15c4f348 dts: vendor-prefixes: add hoperf
This is present in Linux too:

https://lore.kernel.org/linux-devicetree/20201031134110.724233-9-jic23@kernel.org/

But for some reason is not present in own Linux's vendor prefixes
file.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:51:57 -04:00
Tim Lin
6a1262198a ITE: drivers/i2c: it8xxx2: move pinctrls macro to soc_dt.h
This PR will change accessing the related pinctrl macro from soc_dt.h
And the pinctrl of SCL and SDA were got from pinctrl-0 and pinctrl-1,
respectively. Change it to get from pinctrl-0 only.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2021-08-17 17:51:17 -04:00
Robert Szczepanski
55e3c732d0 drivers: video: ov2640: add driver for ov2640 image sensor
This adds the driver for Omnivision OV2640 image sensor.

The driver provides support for 10 different resolutions in range from
160x120 to 1600x1200 in both JPEG and RGB565 pixel formats. There are
also mutliple configuration options, e.g. hflip, vflip, saturation and
brightness control.

Signed-off-by: Robert Szczepanski <rszczepanski@antmicro.com>
2021-08-17 09:18:38 -04:00
Gerson Fernando Budke
dca54e69f2 dts: bindings: riscv: Add sifive-e24 cpu
Add sifive-e24 cpu binding.  This introduce riscv,cpu binding to
be used as riscv cpu base and riscv,sifive, which define specific
properties for this vendor.  Both are necessary to create the e24
core.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-08-14 20:31:44 -04:00
Kumar Gala
1deb3cff9b dts: bindings: Add missing binding for SI7055 sensor
Add missing dts binding for sensor, this was causing build errors with
CONFIG_PM set on bt510/bt6x0 boards.

Fixes #37675

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-08-13 11:46:38 -05:00
Scott Worley
19dd46ef68 Microchip: MEC172x: ADC driver
Add ADC driver version 2 for MEC172x using new in-tree headers
and device tree properties. Update the ADC shell for the new driver.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2021-08-11 19:44:31 -04:00
Flavio Ceolin
8eceeee798 pm: device: Add wakeup source API
Introduce a new API to allow devices capable of wake up the system
register themselves was wake up sources. This permits applications to
select the most appropriate way to wake up the system when it is
suspended.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-08-11 19:39:13 -04:00
Henrik Brix Andersen
f72d4f898e dts: bindings: sensor: add binding for the LM77 temperature sensor
Add devicetree binding for the LM77 temperature sensor.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-08-09 19:50:29 -04:00
Scott Worley
ad19104f28 Microchip: MEC172x: Add UART driver
Microchip XEC has been using the standard NS16550 driver.
Using the standard NS16550 driver requires extra HW programming
for XEC UART in board level and did not support XEC GIRQ interrupt
programming. We add an XEC specific driver and remove UART specific
register programming from the board level and implement interrupt
support. Also, by implementing a SoC specific driver we can add
driver PM in the future.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2021-08-09 16:21:33 -04:00
Scott Worley
7075b700b7 Microchip: MEC172x: Device tree constant property cleanup
Microchip XEC two custom DT properies girqs and pcrs cell sizes
are defined as constants. There is no need to replicate these
is the chip DTSI since the value cannot be changes. Fix the syntax
of the cell size constant to match the naming convention used
thoughout DT.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2021-08-09 13:06:01 -04:00
Glauber Maroto Ferreira
8e865a7a88 esp32s2: drivers: serial: add minimal uart driver
based on uart rom functions, also enable console driver
on top of this driver, which enables logging

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-08-09 13:03:14 -04:00
Imre Lagas
ee3f50fdeb drivers: gpio: Add fxl6408 driver
Add a driver for the fxl6408 gpio-expander using gpio api.

Origin: original

Signed-off-by: Imre Lagas <Imre_Lagas@hotmail.com>
2021-08-09 13:02:20 -04:00
Aurelien Jarno
117090c1a2 drivers: sensors: ti_hdc20xx: add support for DRDY/INT pin
Add optional support for the DRDY/INT pin. This avoids waiting a fixed
time for the temperature and humidity conversion to finish.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2021-08-09 11:32:43 -04:00
HaiLong Yang
85ac062096 dts: stm32h7: define mailbox controller based on stm32 hsem
The ipm_stm32_hsem driver is a virtual mailbox based on STM32 HSEM.
Since we already have LL_HSEM(low-level HSEM) API on the hal_stm32
module, looks there is no need to implement a new HSEM driver.
But there are still have some limitations, the HSEMx interrupt is
not shareable. If another HSEM user wants to use the HSEMx interrupt,
the ipm_stm32_hsem mailbox needs to be disabled.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2021-08-09 16:11:28 +02:00
Yuval Peress
268f9bf163 nuvoton: battery-backed ram
Add bindings and entry for the battery-backed ram in the nuvoton
npcx. This commit is an upstream port of
https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/dts/bindings/cros_bbram/nuvoton,npcx-cros-bbram.yaml;l=1;drc=e9af813c36b7b411bf2a01cbc1b09d5fdec49b8a

Along with a bit of cleaning up and an emulator.

Signed-off-by: Yuval Peress <peress@chromium.org>
2021-08-07 20:32:33 -04:00
Andrzej Głąbek
3842babc79 drivers: serial: nrf: Make pull-ups on UART pins configurable
This is a follow-up to commit 3656ba5ae9.

Do not enforce pull-up resistors to be enabled on RXD and CTS pins
in nRF UART drivers, as in certain hardware designs this may be
undesirable or may even make certain hardware not working.
Instead, provide devicetree properties that allow enabling of those
resistors when it is actually needed.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-08-06 19:17:26 -04:00
Yuriy Vynnychek
0830738975 dts: riscv: add Telink B91 PWM driver support
Added PWM driver DTSI support for Telink B91 platform.

Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
2021-08-05 16:11:41 +02:00
Guillaume Lager
ca5921845d driver: i2c: Add TCA9546a I2C switch driver
The driver only support use case where the channels are used in mutual
exclusion.
Origin: Original

Signed-off-by: Guillaume Lager <g.lager@innoseis.com>
2021-08-05 11:48:30 +02:00
Yuriy Vynnychek
2b1548d05d dts: riscv: add Telink B91 Entropy driver support
Added Entropy driver DTSI support for Telink B91 platform

Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
2021-08-04 15:45:32 +02:00
Yuriy Vynnychek
d011e782c7 dts: riscv: add Telink B91 IEEE802154 driver support
Added IEEE802154 driver DTSI support for Telink B91 platform.

Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
2021-08-04 11:58:02 +02:00
Scott Worley
2070c0997f Microchip: MEC172x: Update pinmux driver
Update the Microchip XEC pinmux driver to use system I/O
routine for read/write of registers instead of direct use
of volatile and CMSIS defines. Add GPIO port number to
bindings instead of using hard coded value from chip headers.
Modify SoC DTSI pinmux syntax, requires "pinmux: pinumx {..."
or the DT macros will not work. Since pinmux is used by MEC152x
we update its chip pinmux DT.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2021-08-03 19:04:56 -04:00
John Kjellberg
f452a086fb drivers: led: Add LED driver support for TLC59108
Add support for TI TLC59108 an I2C 8-bit LED driver.
Supported blinkink period: 41ms to 10730ms
Supported brightness value: 0 to 100%

This driver supports the following APIs:

1. led_blink
2. led_set_brightness
3. led_on
4. led_off

This is a modified version of the NXP PCA9633 driver.

Signed-off-by: John Kjellberg <kjellberg.john@gmail.com>
2021-08-03 19:03:29 -04:00
Martí Bolívar
043304bf7e dts: vendor-prefixes.txt: add 'arduino'
This is a common Zephyr addition.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-03 12:21:45 -05:00
Martí Bolívar
57c4a4dec6 dts: tweak vendor-prefixes.txt format
Use a comment syntax instead of a separator. This is a bit cleaner
and is prep work for moving the parsing code to a more generic place,
namely edtlib.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-03 12:21:45 -05:00
Martí Bolívar
2a241f6ef9 dts: bindings: update vendor-prefixes.txt
Update our vendor-prefixes.txt file to match the data in upstream
Linux's vendor-prefixes.yaml file as of Linux commit
8ac91e6c6033ebc12c5c1e4aa171b81a662bd70f.

(We can't easily switch to using the Linux YAML file directly because
our documentation tooling depends on this plain text format.)

The changes were done using a script and then cleaned up by hand in
order to not throw away any Zephyr-only prefixes, and to manually
override Linux in some cases.

List of Zephyr-only prefixes, all of which were kept:

    asmedia
    cadence
    gaisler
    lairdconnect
    ovti
    openisa
    particle
    quicklogic
    ruuvi
    segger
    vnd
    weact
    zephyr

Other things to note:

- keep Espressif as 'espressif', overriding Linux's 'esp'
- 'gw' is deprecated in Linux and is unused here; just remove it
- ROCKTECH DISPLAYS LIMITED SHOULD HAVE BEEN ALL CAPS;
  HOW COULD WE POSSIBLY HAVE MISSED THIS BEFORE?
- Did not include '70mai' from upstream, as that violates the legal
  compatible regexp

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-03 12:21:45 -05:00
Martí Bolívar
97eea281cf dts: fix vendor-prefixes.txt whitespace
This line is here to satisfy the commit message linter.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-03 12:21:45 -05:00
Felipe Neves
d368087fc0 drivers: serial: added minimal uart driver for esp32c3
based on uart rom functions, also enable console driver
on top if this driver enabling logging

Signed-off-by: Felipe Neves <felipe.neves@espressif.com>
2021-08-03 11:20:06 -05:00
Jun Lin
b804956a7d dts: misc: npcx: add new DT node for booter variant
The booter (bootloader) behavior may be different in different NPCX
chip series. One example is that the booter sets host interface type in
NPCX7 series but leave the firmware to set it in NPCX9 series.
This commit adds a new DT node to record variants in its properties.
NPCX drivers can understand if they need to configure the related
setting by checking the node's properties.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2021-08-03 13:59:42 +02:00
Kieran Mackey
19f7af11fa drivers: gpio: Add PCA953X driver (gpio port expander)
The Texas Instruments TCA9538 is an 8 pin GPIO port expander.
It operates on an I2C bus with 2 configurable address pins. The
device has an interrupt output pin that is asserted when any pin
configured as an input changes state.

Added under the PCA953X name to allow other similar parts to
use the same driver.

Signed-off-by: Kieran Mackey <kieran.mackey@lairdconnect.com>
2021-07-31 14:56:34 -04:00
Yuriy Vynnychek
313e29b87d dts/bindings: add Telink B91 Flash driver support
Added Flash driver dts bindings support for Telink B91 platform.

Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
2021-07-30 19:53:04 -04:00
Kieran Mackey
94e006f0fc drivers: counter: add driver for Microchip MCP7940N RTCC
Microchip MCP7940N is a Real-Time Clock/Calendar. It operates on a I2C
bus. It can be used to set a calendar time and has two alarm channels.
When an alarm is asserted the state of the MPF pin of the MCP7940N will
change (depending on gpio active high/active low setting) to trigger an
interrupt.

Signed-off-by: Kieran Mackey <kieran.mackey@lairdconnect.com>
2021-07-30 19:51:29 -04:00
Gerson Fernando Budke
62ba4723d4 drivers: serial: uart_sam0: Add pinctrl support
Add Atmel sam0 sercom[uart] pinctrl bindings and implements pinctrl at
driver level.  It changes all sam0 boards to use new feature and remove
pinmux driver dependency for sercom[uart].  The samples that require a
binding were update to keep consistency and avoid errors.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-07-30 14:37:20 -05:00
Gerson Fernando Budke
c9879a58f7 dts: atmel_sam0: Add pinctrl structure
Add Atmel sam0 MCU series pinctrl devicetree bindings and
infrastructure.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-07-30 14:37:20 -05:00
Mahesh Mahadevan
5f636286d3 drivers: pwm: Add PWM support for NXP LPC devices
Add PWM support using the LPC SCTimer module

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-07-30 13:08:03 -05:00
Krzysztof Chruscinski
ffc4a6c928 testsuite: Add busy simulator module
Busy simulator is using counter device and entropy device to
generate random cpu load. Counter device cofiguration can be
used to set cpu load interrupt priority and optional pin that
can be set during the load.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-07-29 10:59:00 -04:00
Erwan Gouriou
69c37a73b9 dts/bindings: flash_controller: Add u5 flash controller binding
Just do it.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-07-29 07:28:32 -05:00
Erwan Gouriou
93c005de3e dts/arm/st: Add stm32u5 base and initial device
Add initial basic description for Cortex-M33 based
stm32u5 soc series.
This encompass description for base nodes, such as:
- cpu
- flash
- clocks
- sram

Additionally, provide description for variant stm32u575Xi.

Related to clocks nodes, added bindings for stm32u5 specific
rcc node as well as msi and pll clocks.

Header file stm32_clock_control.h was also updated to support
these new bindings.
Note that for compatibility with existing definitions, clock
node describing main pll clock, known as "PLL1", was given two
labels: "pll" and "pll1".

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-07-29 07:28:32 -05:00
Francois Ramu
718c77a4cd dts: arm: stm32f0 soc serie has dma of type V2bis
The type of DMA for the stm32f0 devices was wrong
Its DMA is of type V2bis where the peripheral request is fixed.
The corresponding DMA cell has 2 elements.
The stm32f091 has two DMA instances.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-07-28 21:11:06 -04:00
Andrzej Głąbek
32da1078da drivers: i2s: Add support for nRF I2S peripherals
Add a shim that allows using the nrfx I2S driver via the Zephyr API.
Add also missing devicetree nodes representing the I2S peripherals
in the nRF52 Series SoCs.
Extend the "nordic,nrf-i2s" binding with a new property that allows
specifying the clock source to be used by the I2S peripheral (so that
it is possible to use HFXO for better accurracy of the peripheral clock
or, in the nRF53 Series SoCs, to use the dedicated audio oscillator).

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-07-28 18:41:26 -04:00
Scott Worley
6976800cf0 Microchip: MEC172x GPIO driver version 2
Create version 2 of the MEC GPIO driver to support MEC172x to not
interfere with MEC152x. When the MEC172x ECIA interrupt aggregator
driver is ready, this driver will use ECIA for registering GPIO
interrupt callbacks instead of maintaining its own interrupt table.
Add V2 DT binding.
Add the Kconfig configuration settings for the MEC172x GPIO
V2 driver at the SoC and board level.
Add port id to DT allowing use of DT FOR EACH macro in the driver.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2021-07-27 18:01:55 -04:00
Sam Hurst
1382d64ed5 drivers: sensor: Add driver for TI INA23x
This driver supports the TI INA230 and INA231 Bidirectional Current
and Power Monitors. The devices work on the I2C interface and are
created from DT nodes with a compatible property matching "ti,ina23x".

The following datasheets were referenced while developing the driver:
https://www.ti.com/product/INA230
https://www.ti.com/product/INA231

Twister passed:
twister -T tests/drivers/build_all/sensor/

Testing was performed on the stm32g071b_disco board with the following:
Load:    ~170 ohms
Voltage: 5V

Measured Values:
Voltage: 5.1 V
Current: 0.032 A
Power:   0.157 W

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2021-07-27 17:59:23 -04:00
Scott Worley
dd1a9559be Microchip: XEC RTOS timer: Add MEC172x support to driver
Update Microchip XEC RTOS timer driver adding MEC172x support and
using more device tree properities in the driver. We must also update
the XEC counter driver to use the new GIRQ DT properties.
Add new properties to RTOS timer and RTC timer YAML. These two timers
are linked due to option using a high speed timer for kernel busy wait.
Add Kconfig logic for XEC RTOS timer to MEC172x SoC.
Enable the Microchip XEC RTOS timer in the MEC172x evaluation board.
Add device tree nodes for most peripeherals.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2021-07-27 09:29:34 -04:00
Arvin Farahmand
b0e4886dfa dts: ksz8974: add support for ksz8863
Add DSA support for KSZ8863 chip.

Signed-off-by: Arvin Farahmand <arvinf@ip-logix.com>
2021-07-26 19:37:22 -04:00
Scott Worley
6b3749d2ff Microchip: MEC172x Add aggregated interrupt driver
Add driver implementation and header files for a MEC172x
aggregated interrupt driver. Enable the parent(ECIA) node
to have the driver initialize interrupt hardware for use.
Enable child nodes for those GIRQs used for aggregation.
Refer to chip documention for the list of GIRQs restricted
to aggregation and those which support direct mode.
Add chip level device tree node for MEC172x EC interrupt
aggregator parent and GIRQ children. Each child node contains
a list of sources representing the source bit position in the
GIRQ registers.
Add DT bindings for ECIA and GIRQ nodes.
Add build file(s) and configuration items for the MEC172x ECIA
aggregated interrupt driver. Add and enable the MEC172x interrupt
driver on the MEC172x evaluation board(EVB). Enable parent node to
initialize ECIA hardware. Child nodes are left disabled until a
future driver needs them.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2021-07-26 12:24:52 -04:00
Piotr Mienkowski
1145986096 drivers: Add Atmel SAM counter (TC) Driver
Add basic counter driver based on Timer Counter (TC) module for Atmel
SAM family.

Remarks:
- The driver is not thread safe.
- The driver does not implement guard periods.
- The driver does not guarantee that short relative alarm will trigger
  the interrupt immediately and not after the full cycle / counter
  overflow.

Tested on Atmel SMART SAM E70 Xplained board

Origin: Original

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2021-07-26 05:13:40 -04:00
Thomas Stranger
04f208e48e dts: bindings: add ST STM32 AES accelerator
This commit adds bindings for the STM32 AES accelerator.
Common properties of st,stm32-cryp are moved into
st,stm32-crypto-common.yaml.

The accelerator supports ECB, CBC, CTR, GCM, GMAC, and CCM
chaining modes.
128 bit bit data blocks with cipher key lengths of 128 and 256 bit are
supported.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2021-07-23 16:25:27 -04:00
Leonard Pollak
2d0fd2554a drivers: sensor: SHT4X Added support
This adds support for Sensirion's SHT4X temperature and
humidity sensor.

Signed-off-by: Leonard Pollak <leonardp@tr-host.de>
2021-07-22 10:17:13 -04:00
Leonard Pollak
0d7cb32c58 drivers: sensor: SGP40 Added support
This adds support for Sensirion's SGP40 multipixel gas sensor.

Signed-off-by: Leonard Pollak <leonardp@tr-host.de>
2021-07-22 10:17:13 -04:00
Luka Lopotar
7b67e239fe sensor: bq274xx: Add power management and shutdown mode
Add support for power management and the shutdown mode for bq274xx fuel
gauge sensor. This now allows boards that have any kind of low power
mode to turn on or off the sensor.

Tested on a Company's custom board with bq27421 sensor on it.

Signed-off-by: Luka Lopotar <luka.lopotar@greyp.com>
2021-07-22 06:21:25 -04:00
Francois Ramu
9b1d21f0b8 dts: bindings: dma for stm32 is repackaged with generic dts
This will define a new bindings for any stm32 dma feature
Depending on the soc family, the DMA is of V1 or V2 or Vbis type
And give a factored definition for feature
The difference is on the dma-cell structure.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-07-22 04:52:53 -04:00
Scott Worley
d3f6b54f8e Microchip: MEC172x clock control driver
Implement a clock control driver for Microchip MEC172x handling
configuring the 32 KHz input sources for the PLL and peripheral-32k
clock domains. MEC172x differs from MEC152x. MEC152x had one 32K source
for both PLL and peripherals. MEC172x allows the two domains to use
independent 32 KHz sources. Device tree updated to provide addresses
of hardware used by the driver.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2021-07-21 17:46:07 -04:00
Yuriy Vynnychek
77bd56f9b1 dts: riscv: add basic dts support for new Telink B91 platform
CPU, Power, GPIO, Serial and Pinctrl dtsi support for new
Telink B91 RISC-V platform.

Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
2021-07-21 05:37:12 -04:00
Alexander Wachter
2daad1dab9 drivers: sensors: Add driver for LM75
This commit adds a driver implementation for the LM75 I2C temperature
sensor.

Signed-off-by: Alexander Wachter <alexander.wachter@leica-geosystems.com>
2021-07-20 16:15:32 -05:00
Simon Guinot
4de1b6be21 led_strip: ws2812: claim compatibility with Everlight B1414
This patch states that the Everlight B1414 LED controller is compatible
with the Worldsemi WS2812. Some information about it is added to the
WS2812 DT binding and driver Kconfig files.

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2021-07-20 13:35:02 +02:00
Simon Guinot
17c0ddfe9c led_strip: ws2812: allow to configure reset delay
Some devices compatibles with the WS2812 IC have a different reset/latch
delay.

This patch introduces the "reset-delay" optional property for the WS2812
DT binding and adds support to the ws2812_spi driver. This new property
allows to configure the reset/latch delay of a WS2812 compatible LED
strip controller from its DT node.

If omitted the driver uses 8 microseconds by default (which is good for
the WS2812 IC).

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2021-07-20 13:35:02 +02:00
Simon Guinot
4ada0bbd6e led_strip: ws2812: allow to configure channel mapping
Some devices compatibles with the WS2812 IC have a different channel to
color mappings (e.g. RGB, BGR, RGBW, etc).

This patch introduces the "color-mapping" required property for the
WS2812 DT binding and adds support to the ws2812_gpio and ws2812_spi
drivers. This new property allows to configure the color to channel
mapping of a WS2812 compatible LED strip controller from its DT node.

Since this property also allows to know if a white channel is available,
then this patch removes the "has-white-channel" property.

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2021-07-20 13:35:02 +02:00
Andrzej Głąbek
7cae49d22c drivers: clock_control_nrf: Add configuration of HFCLKAUDIO frequency
Add a new property to the "nordic,nrf-clock" binding to allow
configuration of the HFCLKAUDIO frequency.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-07-20 10:13:56 +03:00
Marcin Niestroj
ad44e47475 dts: bindings: nordic,qspi-nor: fix comment about write opcode
'pp4o' is a quad data line SPI operation.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2021-07-19 12:22:28 -05:00
Gerson Fernando Budke
3771b968f0 drivers: eth: sam: Replace constants by devicetree values
The zephyr sam gmac driver don't get register address and, in some
cases, peripheral id from devicetree.  This replace headers constants
in favor of devicetree values.

This fix wrong Atmel SAME7x/SAMV7x gmac register address and add
missing peripheral id property for SAM family.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-07-16 21:34:43 -04:00
Gerson Fernando Budke
49eb184ea4 dts: eth: sam: Split generic GMAC compatible
The current GMAC compatible not allow especialize properties by SoC
family.  Split current generic Atmel GMAC compatible into two new
compatibles which are defined by SoC families.  This increase the
freedom and avoid odd situations.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-07-16 21:34:43 -04:00
Gerson Fernando Budke
a9180f1b2c drivers: eth: sam: Fix style and documentation
This fixes properties documentation and two devicetree styles:

 - properties with wrong code identation and
 - property description tag style

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-07-16 21:34:43 -04:00
Carlo Caione
bc30598456 drivers: syscon: Add generic syscon API
A syscon device is a device managing a memory region containing a set of
registers that are not cohesive enough to represent as any specific type
of device. We need a driver for that because several other drivers could
use the same region at the same time and we need to io-map the region at
boot for MMU enabled platforms.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-07-16 21:31:38 -04:00
Glauber Maroto Ferreira
9ae5fd1b34 esp32: drivers: interrupt_controller: add interrupt allocation support
Add interrupt allocation support for ESP32.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-07-16 07:19:28 -04:00
Fabio Baltieri
624886156a drivers: spi_ll_stm32: add SUBGHZSPI support
This adds support for controlling the SUBGHZSPI NSS line in STM32WL
devices. This is a special dedicated SPI port only connected to the
radio device internally, chip select happens through a bit in the PWR
module. Adding a special dt-property to identify the port, it all gets
built out on non-WL devices.

Deduplicate the existing dts bindings in the process, and add the new
one for the special spi with the new property.

Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
2021-07-15 21:30:28 -04:00
Fabio Baltieri
434d31d1a9 dts: bindings: sx12xx: add ST stm32wl-subghz-radio node
Add a dts node for st,stm32wl-subghz-radio. The device is integrated in
STM32WL series SoCs, and based on the sx1262, but it does not use any
gpio as all the necessary signals are internally connected to various
SoC units.

To account for that, make the redundant gpio optional in the template
files, but mark them as required in the sx1261 and sx1262 definitions,
to match with what's used in the driver.

Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
2021-07-15 21:30:28 -04:00
Titouan Christophe
8e3ab9248f drivers: gpio: add new driver for STMPE1600 gpio expander
The STMPE1600 is an I2C based GPIO expander. This initial patch
only supports reading from/writing to the pins on the STMPE1600,
and there is currently no support for interrupts.

Signed-off-by: Titouan Christophe <moiandme@gmail.com>
2021-07-15 19:23:16 -04:00
Carlo Caione
ae2be2db8a reserved-memory: Introduce support for reserved-memory node
Introduce a set of header files to be able to define and declare
sections and regions in the linker script. Introduce also DT helpers to
retrieve data back.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-07-15 18:12:51 -05:00
Dino Li
3511f75249 dts: gpio: it8xxx2: Remove unused property
Property of port-is-output is not used anymore, so let's remove it.

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2021-07-15 13:53:54 -05:00
Thomas Stranger
22c8d9973b drivers: sensor: shtcx: add driver supporting shtc1 and shtc3
Add driver for sensirion consumer humidity sensor line.
Supports shtc1 and shtc3, but only shtc3 is tested.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2021-07-15 06:44:34 -04:00
Aymeric Aillet
7abb676697 dts: bindings: i2c: add Renesas R-Car I2C
Third generation R-Car series products have up to
seven I2C bus interfaces conformant with the
Philips Semiconductors (now NXP Semiconductors) I2C bus
(Inter-IC bus) specification.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2021-07-14 20:58:50 -04:00
Tim Lin
abe27c5bca ITE: driver/i2c: add I2C recovery function
Use GPIO output high and low to simulate I2C start and stop
conditions to restore i2c to normal.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2021-07-14 07:32:16 -04:00
Tim Lin
8fdcc11d6b ITE: drivers/i2c: create pinmux phandle to the I2C driver node
Create the pinmux phandle to the I2C driver node in the
devicetree. When the pinmux_pin_set function in
i2c_it8xxx2_init can refer to the setting of this phandle.
It is more flexible to use.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2021-07-14 07:32:16 -04:00
Watson Zeng
1103402e90 driver: gpio: add initial support for synopsys creg gpio
Add single-register MMIO GPIO driver for complex cases where
only several fields in register belong to GPIO lines and each GPIO
line owns a field with different length and on/off value.

Such CREG GPIOs are used in Synopsys em_starterkit and HSDK boards.

Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
2021-07-13 09:42:59 -04:00
Marcin Niestroj
c28d372d33 drivers: pwm: nrf_sw: drop deprecated 'timer-instance' DT prop
This property has been marked as deprecated in 2.5.0 and was replaced by
'generator' property.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2021-07-12 08:20:47 -05:00
Marcin Niestroj
287b7c497f dts: bindings: jedec,jesd216: remove deprecated 'has-be32k' prop
This property has been marked as deprecated in 2.5.0 and was not
actually used for even longer time.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2021-07-12 08:19:52 -05:00
Abram Early
bdae64279e drivers: flash: nrf_qspi_nor: Configurable RXDELAY
The nRF QSPI has a configurable delay from the rising
clock signal to the actual sample point measured in
clock cycles. This commit exposes that delay as a DTS
parameter without modifying existing behavior.

Signed-off-by: Abram Early <abram.early@gmail.com>
2021-07-09 12:23:45 -05:00
Aurelien Jarno
0d543f1742 drivers/sensor: Add basic TI HDC20XX support
Add basic support for TI HDC20XX series (e.g. HDC2010, HDC2021, HDC2022,
HDC2080). It is able to get temperature and humidity in the default
14-bit resolution. Triggers, resolution selection, interrupt line, auto
measurement mode are currently not supported.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2021-07-09 07:48:15 -04:00
Wealian Liao
ce36a05953 misc: npcx: Add soc id node
Nuvoton provides different series MCU. The NPCX series has a specific
id, which can identify the real chip part number. This CL adds soc id
for the NPCX series.

Signed-off-by: Wealian Liao <WHLIAO@nuvoton.com>
2021-07-07 21:00:42 -04:00
Krishna Mohan Dani
21c74c6a50 dts/bindings: Adding max-erase-time for dt usage
This commit defines max-erase-time element inside flash-controller
to be part of device tree.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-07-06 19:02:19 -04:00
Jun Lin
ba39c47187 driver: PS/2: npcx: add driver support for Nuvoton npcx family
The PS/2 module in npcx provides a hardware accelerator mechanism
including an 8-bit shift register, a state machine, and control logic
that handle both the incoming and outgoing data. The hardware
accelerator mechanism is shared by 4 PS/2 channels. To support it,
this CL separates the PS/2 driver into channel and controller drivers.
The controller driver is in charge of the PS/2 transaction. The channel
driver is in charge of the connection between the Zehpyr PS/2 API
interface and controller driver.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2021-07-02 15:41:28 -04:00
Ruibin Chang
d0ce9bb877 ITE drivers/pwm: add PWM for it8xxx2
Add pulse width modulator (PWM) for it8xxx2.

Signed-off-by: Ruibin Chang <ruibin.chang@ite.com.tw>
2021-07-01 13:21:06 -04:00
Krivorot Oleg
1d55d929db drivers: display: ili9xxx: add support for ILI9341 controller
Add support for the ILI9341 display controller.

Signed-off-by: Krivorot Oleg <krivorot.oleg@gmail.com>
2021-06-29 16:02:44 -04:00
Armando Visconti
344e06025d drivers/sensor: lis2dw12: Move range Kconfig property into dts
Converts lis2dw12 range options (2g, 4g, 8g, 16g) from Kconfigs
to Device Tree.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-06-29 11:31:06 -04:00
Armando Visconti
a783a062f8 drivers/sensor: lis2dw12: Move power Kconfig property into dts
Move lis2dw12 power-mode option from Kconfigs to Device Tree.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-06-29 11:31:06 -04:00
Armando Visconti
56ce558094 drivers/sensor: lis2dw12: Move trigger pulse Kconfig property into DT
Move lis2dw12 trigger pulse configurations from Kconfigs to Device Tree.
Moreover the dts properties have been renamed as 'tap', which sounds a
better name to immediately catch the feature behind it. Since tap
threshold cannot be zero, this value (which is the default in dts
binding) is used to enable/disable the device feature per each axis.
The event can be generated on INT1 only.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-06-29 11:31:06 -04:00
Armando Visconti
351b28e122 drivers/sensor: lis2dw12: move int-pin in DTS binding
Take the int-pin information (i.e. what pin between INT1
and INT2 the drdy is attached to) directly from DT.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-06-29 11:31:06 -04:00
Armando Visconti
87ab2086a2 dts/bindings: lis2dw12: create a common st,lis2dw12-common.yaml
Create a common binding file that will be included by all bindings
handled by lis2dw12 driver.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-06-29 11:31:06 -04:00
Mahesh Mahadevan
c2e79bcfa1 dt-bindings: clock: Update for i.MX CCM Rev 2
- update clock macro for CCM
- Add a dts bindings file for CCM Rev 2

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-06-29 11:30:00 -04:00
Mahesh Mahadevan
344e8822a3 dts: bindings: imx-gpio: Do not require interrupts
Some SoC's do not have interrupts connected to the GPIO module

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-06-29 11:30:00 -04:00
Watson Zeng
a6cc3f1838 dts: designware-gpio: remove reduplicative property bits
bits property indicates the number of in-use slots of available slots
for GPIOS. We have a similar property ngpios in gpio-controller.yaml,
we will use ngpios to calculate port_pin_mask. Let's remove bits and
only use ngpios.

Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
2021-06-28 13:53:57 -05:00
Mahesh Mahadevan
6dbffcb2a8 hwinfo: Support NXP LPC family
add hwinfo driver support for NXP's LPC family.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-06-23 18:24:08 -05:00
Immo Birnbaum
dabe728eef drivers: ethernet: add support for Xilinx GEM controller
Add support for the Xilinx GEM Ethernet controller, which is integrated
in both the Xilinx Zynq and ZynqMP (UltraScale) SoC families. The driver
supports the management of a PHY attached to the respective GEM's MDIO
interface.

This driver was developed with ultimately the Zynq-7000 series in mind,
but at the time being, it is limited to use in conjunction with the
ZynqMP RPU (Cortex-R5) cores. The differences are minor when it comes
to the adjustment of the TX clock frequency derived from the current
link speed reported by the PHY, but for use in conjunction with the
Zynq-7000, some larger adjustments will have to be made when it comes
to the placement of the DMA memory area, as this involves the confi-
guration of the MMU in Cortex-A CPUs.

The driver was developed under the qemu_cortex_r5 target. The Marvell
88E1111 PHY simulated by QEMU is supported by the driver.

Limitations currently exist when it comes to timestamping or VLAN
support and other minor things. Those haven't been implemented yet,
although they are supported by the hardware. In order to be fully
supported by the ZynqMP APU, 64-bit DMA address descriptor format
support will be added.

Signed-off-by: Immo Birnbaum <Immo.Birnbaum@weidmueller.com>
2021-06-21 20:11:00 -04:00
Mulin Chao
fbf5b8e8de dts: pcc: npcx: add properties of pcc node to configure clock settings
This CL introduces six properties, clock-frequency, core-prescaler,
apb1/2/3/4-prescaler in pcc (Power and Clock Controller) node to
configure clock settings. It also removed the original Kconfig options
used for the same purpose.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2021-06-21 18:47:31 -04:00
Aurelien Jarno
9d0169deaf drivers/sensor: ms5607: Add I2C support
Add I2C support to the MS5607 driver, which mostly consist in adding the
I2C transfer functions.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2021-06-18 11:23:07 +02:00
Henrik Brix Andersen
588d22a755 drivers: ht16k33: convert keyscan driver from gpio API to kscan API
Convert the keyscan portion of the Holtek HT16K33 driver to adhere to
the kscan API instead of the GPIO API.

When this driver was introduced the kscan API was not present. The
keyscan driver was therefore implemented as a GPIO interrupt driver.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-06-18 11:22:40 +02:00
Ruibin Chang
d45668480a ITE driver/watchdog: add watchdog timer for it8xxx2
Add watchdog timer for it8xxx2.

Signed-off-by: Ruibin Chang <ruibin.chang@ite.com.tw>
2021-06-18 11:21:53 +02:00
Parthiban Nallathambi
dac8a6ef7d ethernet: w5500: reset_gpio isn't mandatory
reset_gpio pin isn't mandatory for function w5500.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2021-06-17 18:38:15 -05:00
Martí Bolívar
7819ee00fa dts: bindings: usb: fix up multi-line strings
Clean up multi-line strings so they will show up properly in the
bindings index in the HTML documentation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-06-14 21:49:57 -04:00
Martí Bolívar
1f1beadeff dts: bindings: timer: fix up multi-line strings
Clean up multi-line strings so they will show up properly in the
bindings index in the HTML documentation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-06-14 21:49:57 -04:00
Martí Bolívar
8285f2b04e dts: bindings: serial: fix up multi-line strings
Clean up multi-line strings so they will show up properly in the
bindings index in the HTML documentation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-06-14 21:49:57 -04:00
Martí Bolívar
fb41046e9b dts: bindings: sensor: fix up multi-line strings
Clean up multi-line strings so they will show up properly in the
bindings index in the HTML documentation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-06-14 21:49:57 -04:00
Martí Bolívar
73055c8592 dts: bindings: pinctrl: fix up multi-line strings
Clean up multi-line strings so they will show up properly in the
bindings index in the HTML documentation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-06-14 21:49:57 -04:00
Martí Bolívar
51cfdbc45d dts: bindings: net: fix up multi-line strings
Clean up multi-line strings so they will show up properly in the
bindings index in the HTML documentation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-06-14 21:49:57 -04:00
Martí Bolívar
b2732ec5be dts: bindings: mtd: fix up multi-line strings
Clean up multi-line strings so they will show up properly in the
bindings index in the HTML documentation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-06-14 21:49:57 -04:00
Martí Bolívar
d6d9fe19dc dts: bindings: mmc: fix up multi-line strings
Clean up multi-line strings so they will show up properly in the
bindings index in the HTML documentation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-06-14 21:49:57 -04:00
Martí Bolívar
74c985c934 dts: bindings: ieee802154: fix up multi-line strings
Clean up multi-line strings so they will show up properly in the
bindings index in the HTML documentation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-06-14 21:49:57 -04:00
Martí Bolívar
aaa5e59c83 dts: bindings: gpio: fix up multi-line strings
Clean up multi-line strings so they will show up properly in the
bindings index in the HTML documentation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-06-14 21:49:57 -04:00
Martí Bolívar
e18c9dfc58 dts: bindings: dma: fix up multi-line strings
Clean up multi-line strings so they will show up properly in the
bindings index in the HTML documentation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-06-14 21:49:57 -04:00
Martí Bolívar
a43050059c dts: bindings: display: fix up multi-line strings
Clean up multi-line strings so they will show up properly in the
bindings index in the HTML documentation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-06-14 21:49:57 -04:00
Martí Bolívar
6b8243d65a dts: bindings: cpu: fix up multi-line strings
Clean up multi-line strings so they will show up properly in the
bindings index in the HTML documentation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-06-14 21:49:57 -04:00
Martí Bolívar
5a4b1d4dbd dts: bindings: can: fix up multi-line strings
Clean up multi-line strings so they will show up properly in the
bindings index in the HTML documentation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-06-14 21:49:57 -04:00
Luc Viala
7105875ff4 driver/uart: add enum parity element on devicetree bindings
It helps configurations of the parity mode for uart interfaces

Signed-off-by: Luc Viala <lviala@zaack.io>
2021-06-11 08:53:10 -05:00
Tim Lin
8ea58d4389 ite: drivers/adc: create pinmux phandle to the ADC driver node
Create the pinmux phandle to the ADC driver node in the
devicetree. When the pinmux_pin_set function in
adc_it8xxx2_channel_setup can refer to the setting of
this phandle. It is more flexible to use.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2021-06-11 15:47:25 +02:00
Jose Alberto Meza
d86636fcdc dts: bindings: mchp: Convert vw_irq to array
Micropchip eSPI controller can generate 2 different IRQ for
virtual wires.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2021-06-07 23:52:17 -04:00
Mulin Chao
b674047004 dts: pcc: npcx: add ram-pd-depth property in npcx-pcc node
Since the valid bit-depth of RAM_PDn registers are different, this CL
introduces a 'ram-pd-depth' property in 'nuvoton,npcx-pcc' node if the
application needs to turn off the partial ram blocks for better power
consumption.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2021-06-07 12:07:36 +02:00
Julien Massot
02b788cd62 dts: bindings: can: Add support for Renesas R-Car
This is classic CAN bindings tested on Renesas R-Car
gen3 series.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2021-06-07 12:06:21 +02:00
Armando Visconti
fcb0953309 drivers/sensor: lis2mdl: Add multi-instance support
Add multi-instance support and make use of the stmemsc i2c/spi
read/write routine that has been introduced to simplify the ST
sensor drivers code.

Moreover, move spi-full-duplex property from Kconfig inside Device
Tree, so that each LIS2MDL instance can be configured selectively
in accordance to how it is used in h/w.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-06-04 16:29:45 -05:00
Kumar Gala
5fcbe5e099 dts: arm: nxp: Add port property to nxp,lpc-gpio nodes
Add a port property to describe which hardware port a GPIO device node
is describing since we can't tell from the registers (as the registers
are interleaved in the same MMIO space).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-05-31 17:45:05 +02:00
Piotr Mienkowski
a323a41fc2 sensor: qdec_sam: use compatible atmel,sam-tc-qdec
Change the drivers's compatible from atmel,sam-tc to atmel,sam-tc-qdec.
The atmel,sam-tc should be reserved for the future counter driver.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2021-05-26 18:13:10 -05:00
Martí Bolívar
b6fbc20de4 dts: add 'linaro,' prefix to 96b-lscon-1v8, 96b-lscon-3v3
These compatibles don't match the dt-schema regular expression for
compatible properties that we'd like to support in Zephyr because they
do not begin with a letter.

Use linaro, as a vendor prefix to make them compliant. Update the
release notes since out of tree users will need to keep up.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-19 22:18:25 -05:00
Simon Guinot
1adbe8b65f dts: bindings: fix label properties for gpio-leds node
This patch adds a label property to the GPIO LED parent node and fixes
the label property description of the child node. Indeed it is the label
of a parent node which can be used as device_get_binding() parameter to
retrieve the LED device, and not the one of a child node.

In addition, this patch sets both this properties as not required
because they are not.

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2021-05-19 11:56:01 +02:00
Simon Guinot
0530ece6b8 dts: bindings: fix label properties for pwm-leds node
This patch adds a label property to the PWM LED parent node and fixes
the label property description of the child node. Indeed it is the label
of a parent node which can be used as device_get_binding() parameter to
retrieve the LED device, and not the one of a child node.

Fixes #34275

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2021-05-19 11:56:01 +02:00
Eug Krashtan
05d798e3a9 drivers: sensor: STM32 die temperature driver
STM32 internal temperature sensor driver.
This sensor can be used to measure the temperature of the CPU
and its surroundings.

Signed-off-by: Eug Krashtan <eug.krashtan@gmail.com>
2021-05-08 10:18:09 -05:00
Saurabh Jagdhane
eb205ebe68 boards: arm: Enable FlexSPI driver on mimxrt685_evk.
Enable FlexSPI NOR flash driver with XIP build options.
Configure FlexSPI pins, update board documentation.
Add FlexSPI NOR flash dts node for mimxrt685_evk.

Enable flash storage by adding partition to dts file.
Using last 1MB for storage, and reserving 63MB for code.

Signed-off-by: Saurabh Jagdhane <saurabh.jagdhane@nxp.com>
2021-05-07 15:44:19 -05:00
Eug Krashtan
793e2c1891 drivers: flash: at45: Add Reset and WP pins
Adding Reset and Write-protect pins initialization during AT45 driver
start-up. Usually these pins are driven high when not used.
The AT45 device incorporates an internal power-on reset circuit, so
there is no initial on-off reset sequence.

Signed-off-by: Eug Krashtan <eug.krashtan@gmail.com>
2021-05-07 14:57:08 -05:00
Alexander Wachter
f1754b19eb drivers: can: Implement stm32fd driver
This driver is the SoC specific implementation of the
Bosch M_CAN IP.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2021-05-07 12:36:10 -05:00
Alexander Wachter
1c50ef6c43 drivers: can: Implement Bosch M_CAN driver
Implementation of the Bosch M_CAN IP driver.
This driver is just the base for a specific SoC implementation.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2021-05-07 12:36:10 -05:00
U Divya
86fa606a0c drivers: gpio: Add GPIO driver for Intel Elkhart Lake
Added support for GPIO driver for Intel Elkhart Lake
board.
The GPIO driver will support pin value read/write operations,
pin direction and interrupt configuration. ACPI enumeration
support and support for different GPIO communities is also
present.

Verified on ehl_crb.

Signed-off-by: U Divya <u.divya@intel.com>
2021-05-07 09:45:50 -04:00
U Divya
f6436a14d8 drivers: gpio: Generic GPIO driver for Intel SoC
Modified GPIO driver for Intel APL SoC to have a
generic driver for all Intel SoC.

Signed-off-by: U Divya <u.divya@intel.com>
2021-05-07 09:45:50 -04:00
Tomasz Michalec
d83647dea6 drivers: adc: add ADC emulator
ADC emulator is designed to be used in tests on native_posix board. It
supports 1-16 bit resolution range and all GAINs from enum adc_gain.
Reference voltages and number of emulated channels are set through dts.
Using special API from drivers/adc/adc_emul.h it is possible to set
constant voltage value returned by given ADC channel or set custom
function which allows to simulate complex output.
Also reference voltages can be changed in runtime using the API.

The CL also includes:
- Add adc definitions of ADC emulator in
  tests/drivers/adc/adc_api/src/test_adc.c for supporting test suites.
- Add test for ADC emulator API in tests/drivers/adc/adc_emul/

Signed-off-by: Tomasz Michalec <tm@semihalf.com>
2021-05-07 15:27:37 +02:00
Hake Huang
b336579cbb dts: add edma related in dts bindings
add dts bingings for dma usage
add dts support for adc with edma and hwtrigger
add a periodic_trigger feature to dts

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-05-07 08:23:49 -05:00
MORGER Patrick
0e1d16bf03 drivers: sensors: smart-battery with SBS 1.1 compliant fuel gauge
Implementation of a SBS 1.1 compliant fuel gauge driver

Signed-off-by: MORGER Patrick <patrick.morger@leica-geosystems.com>
2021-05-07 07:55:23 -05:00
Aymeric Aillet
9a90dffc3c dts: bindings: serial: add Renesas R-Car SCIF
Renesas has Serial Communication Interface with
FIFO (SCIF) hardware block which allow asynchronous and
synchronous serial communication. The SCIF has 16-stage FIFO
buffers separately for transmissions and reception.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2021-05-07 13:08:48 +02:00
Marcin Niestroj
b4854debd1 drivers: wifi: esp_at: rename driver from esp
Recently WiFi ESP32 driver (utilizing WiFi radio in ESP32 SoC) was
introduced into drivers/wifi/esp32/ and it already caused confusion as
there was existing drivers/wifi/esp/ directory for ESP-AT
driver (utilizing external WiFi chip, by communicating using AT commands
from any serial capable platform). So question has arisen whether it is
good to merge both, while they are totally different drivers.

Rename ESP-AT driver to be placed in drivers/wifi/esp_at/, so that it is
easier to figure out difference between "esp32" and "esp_at" just by
looking at driver name. Rename also DT compatible and all Kconfig
options for the same reason.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2021-05-06 13:21:39 -04:00
Kieran Mackey
38ed9c885e drivers: dac: added driver for Microchip MCP4725
The MCP4725 is a single channel 12 bit DAC. It is controlled via I2C.

Signed-off-by: Kieran Mackey <kieran.mackey@lairdconnect.com>
2021-05-06 11:07:33 -05:00
Emil Lindqvist
f3f8af4cc2 drivers: modem: ublox-sara-r4: make reset pin optional
Remove reset pin requirement from devicetree as this
is not required for modem functionality, and is not
used in the driver anyways.

Signed-off-by: Emil Lindqvist <emil@lindq.gr>
2021-05-06 09:44:19 -05:00
Gerson Fernando Budke
3155b762a6 dts: spi: Add cypress PSoC-6 controller
Add Cypress PSoC-6 SPI controller and pinctrl nodes.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-05-05 16:01:28 +02:00
Matija Tudan
d2c503f202 sensor: add MAX17262 fuel gauge driver and sample application
The MAX17262 is an ultra-low power fuel-gauge IC which implements the
Maxim ModelGauge m5 algorithm. The IC monitors a single-cell battery
pack and supports internal current sensing for up to 3.1A pulse
current. The IC provides best performance for batteries with 100mAhr
to 6Ahr capacity.

Signed-off-by: Matija Tudan <mtudan@mobilisis.hr>
2021-05-05 15:54:29 +02:00
Tim Lin
caa3328cc7 ite: drivers/pinmux: modify pinmux driver
Modify the pinmux control method and add support the fun3
& fun4 alternation function.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2021-05-05 08:45:16 -04:00
Kumar Gala
d8299e3a5a dts: bindings: nxp: Add pinctrl-0 as a required property
Add pinctrl-0 as being required on NXP Kinetis DTS bindings for I2C,
FTM, UART, and DSPI related devices.

Other devices like ethernet and CAN are utilized outside of just the
Kinetis family and thus we can not require pinctrl-0 property for them
at this time.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-05-04 13:03:00 -05:00
Erwan Gouriou
fc9e72c528 dts/bindings: clocks: Fix stm32f105 pll mul range
PLL mul could be set up to 9.
Fix this.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-05-04 13:02:26 -05:00
Erwan Gouriou
c19c1cc961 dts/bindings: clocks: Add binding for stm32f100 pll
Add specific binding for stm32f100 pll which differs from existing
stm32f1 and stm32f105 specific pll binding.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-05-04 13:02:26 -05:00
Arvin Farahmand
a687610b80 drivers: uart_sam0: add support for collision detection error
Automatic collision detection for half-duplex mode can be enabled
by setting `collision-detection` proprety for uart hardware
in the dts file. If the transmitted bit does not match the received
bit an error is raised. This is useful in RS-485 half-duplex mode.

Signed-off-by: Arvin Farahmand <arvinf@ip-logix.com>
2021-05-03 19:57:07 -04:00
Erwan Gouriou
28c3cfacfe dts/bindings: clocks: Add clocks bindings for stm32h7 series
Add clocks related stm32h7 specific bindings:
- stm32h7-hsi-clock
- stm32h7-pll-clock
- stm32h7-rcc

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-05-03 10:56:05 +02:00
Mahesh Mahadevan
5fa4876d2b dts: Add support for I2S driver for LPC devices
Add support for I2S driver for LPC devices

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-04-30 12:02:55 -05:00
Erwan Gouriou
4978e2032f dts/bindings: clocks: Add stm32wl-rcc and fix stm32wb-pll-clock
Add binding fro stm32wl-rcc.yaml that derivates from stm32wb-rcc.
Additionally update stm32wb-pll-clock.yaml to be used as well
for stm32wl series and add missing div-m property.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
bc4567e2fe dts/bindings/clock: Add bindings for STM32F7
Add F7 clocks bindings.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
5396f154da dts/bindings/clock: Add bindings for L0/L1
Add L0 clocks bindings valid for L0 and L1 based socs.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
c71bf36266 dts/bindings/clock: Add bindings for STM32F2
Add F2 clocks bindings.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
01337645d9 dts/arm/st: l5: Add clocks node to stm32l5.dtsi
Add clocks node and clocks to stm32l5 series.
PLL binding is reused from stm32l4 series.
Matching binding is updated to document that.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
068589db2d dts/bindings: clocks: Add bindings for F0/F3/G0/G4
Add bindings for F0/F3/G0/G4 clocks.

Introduce new rcc binding "st,stm32f0-rcc" binding
that describes RCC hardware blocks that don't have
"apb2-prescaler".
This binding also applies to G0.

Binding "st,stm32f0-pll-clock" is used for both F0
and F3 series.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Erwan Gouriou
5baffdf182 dts/bindings: clocks: Add STM32F1 PLL bindings
Add PLL bindings for STM32F1 devices.
- Main PLL binding for STM32F1 non connectivity lines
- Main and PLL2 binding for Connectivity lines (F105/F107)

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-29 16:41:26 +02:00
Watson Zeng
8c8afa82b9 drivers: gpio: add initial support for cy8c95xx I/O expander
add initial support for cy8c95xx I/O expander,
no interrupt support currently.

Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
2021-04-28 10:53:52 -04:00
Gerson Fernando Budke
e6cba8d9c8 drivers: serial: psoc6: Rework to support pinctrl
The current serial driver uses hard code configuration.  Rework driver
to use pinctrl and enable full configuration from device tree.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-04-27 09:27:45 -05:00
Peter Bigot
c26cdb7409 drivers: flash: spi-nor: add support for 4-byte addressing
Add a function that uses the JESD216 SFDP BFP DW16 Enter 4-Byte
Addressing parameter to put the device into 4-byte addressing mode if
one of the entry modes that's supported by the driver is available on
the device.

Perform the transition if SFDP data is provided (either by devicetree
or at runtime), or if a special devicetree property provides the entry
mode descriptor.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-04-27 14:21:15 +02:00
Erwan Gouriou
f4b130ae29 dts/bindings: clocks: Add new STM32 clock bindings
Add dts bindings for new STM32 clock nodes.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-27 11:53:37 +02:00
Mulin Chao
2368aeae61 dts: pwm: npcx: add override mechanism for pwm input clock assignment.
This CL adds a override mechanism for pwm module's input clock source
assignment. If the 'clock-bus' property exists, the NPCX_DT_PROP_ENUM_OR
macro function will return an enum upper token value. Otherwise, it
expands to default value in 'clocks' property.

For example, if the users want to select LFCLK as pwm0's input clock,
ths node can be overridden by adding 'clock-bus' property with an enum
string, "NPCX_CLOCK_BUS_LFCLK".

&pwm0 {
	status = "okay";
	clock-bus = "NPCX_CLOCK_BUS_LFCLK";
};

Signed-off-by: Keith Short <keithshort@google.com>
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2021-04-26 21:51:24 -04:00
Flavio Ceolin
247ba20fb4 dts: power: Add exit-latency-us field
Exit latency is the maximum time required by a CPU to transition from
a specific idle state to active state. This information is going to be
used to properly configure the wake up event in order to the system be
able to execute the next scheduled task.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-04-26 08:21:30 -04:00
Flavio Ceolin
16d3c83f2b dts: power: More information about min-residency-us
Make it clear that min-residency-us includes the time required to
entry in the state.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-04-26 08:21:30 -04:00
Mulin Chao
f16f37f86a driver: pwm: npcx: Add output open drain support
NPCX PWM supports output buffet select to push-pull or open-drain. Add
output buffer select option 'drive-open-drain' in devicetree for NPCX
PWM. If set, the PWM output will be configured as open-drain. If not
set, defaults to push-pull.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Signed-off-by: Wealian Liao <WHLIAO@nuvoton.com>
2021-04-22 18:03:38 -04:00
Julien Massot
3ac0b35bc4 dts: bindings: gpio: add definition for Renesas RCar gpio
Renesas RCar gpio controller can manage up to 32 gpio
per bank.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2021-04-22 10:38:45 +02:00
Julien Massot
860cfcbde4 dts: bindings: add binding for Renesas RCar CMT timer
Add device tree binding for Compare Match Timer that can
be found on various Renesas RCar SoC.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2021-04-22 10:38:45 +02:00
Julien Massot
09b61b018e dts: bindings: clock: add Renesas clock control
This add bindings for Renesas CPG, MSSR clock control
driver.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2021-04-22 10:38:45 +02:00
Martí Bolívar
15f9ae0e0b dts: nrf: revert i2c sda-gpios, scl-gpios changes
These changes turn out to have been incompatible with the way pinctrl
drivers are going to work, so we need to go back to what we had before
until we can agree on a better approach.

Squash of the following reverts:

Revert "boards: nrf: fix deprecated I2C properties"

This reverts commit 2a4ac9ac02.

Revert "samples: switch nrf overlays to sda-gpios, scl-gpios"

This reverts commit 01bb08e7d8.

Revert "boards: nrf: switch to sda-gpios, scl-gpios"

This reverts commit 17a66304c4.

Revert "i2c: nordic: switch to phandle arrays for pinmux"

This reverts commit 821c03a14a.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-04-20 18:32:04 +02:00
Frank Li
42333dc282 driver: usdhc: add option to disable 1.8v
When 1.8V is disabled, sdhc can only
communicate at low speed. But this can
save the external circuit for switching
between 3.3V and 1.8V, which is very
practical in costdown scenarios.

Signed-off-by: Frank Li <lgl88911@163.com>
2021-04-19 08:25:55 -05:00
Peter Bigot
67808279fb drivers: flash: spi_nor: support devices that default to protect blocks
Some SPI NOR devices, particularly Atmel and SST, power-up with block
protect bits set in the status register.  These bits must be cleared
before any erase or program operation can succeed.  However, blindly
clearing bits in SR is wrong as some of these are non-volatile and
control chip behavior, including quad-enable.

Add a devicetree flag to identify device-specific BP bits in the status
register that should be cleared on startup only for devices that need
them, and when set do the clear during initialization.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-04-16 12:23:06 +02:00
Pieter De Gendt
f5f502893d dts: add erase/write block sizes for imx rt1064 internal flash
This allows signing the binary for use with mcuboot

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2021-04-15 16:26:39 -05:00
Tim Lin
cd96046bee ite: drivers/adc: add adc drivers on it8xxx2_evb platform
This commit is about the it8xxx2 analog to digital converter
driver. Support 8 channels ch0~ch7 and 10-bit resolution.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2021-04-13 13:01:56 -04:00
Mulin Chao
c22df17be3 dts: npcx: Fixed the name of nodes in vw, miwu-wui, and miwu-int files.
Fixed the name of nodes in in espi-vw, miwu-wui, and miwu-int
device-tree node. This CL fixed missing nodes in CL d3a94fa8ab.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2021-04-13 13:00:19 -04:00
Jeremy Bettis
757cd12e66 dts: Add description of reg
For i2c-devices, reg is the address. This took me way to long to
discover and I wanted to leave a breadcrumb for the next Zephyr newbie.

Signed-off-by: Jeremy Bettis <jbettis@chromium.org>
2021-04-13 10:32:52 -05:00
Jaxson Han
8f46bc97a3 dts: arm64: Add dtsi and dts binding for cortex-R82
Add armv8-r dtsi.
Add dts binding yaml file for cortex-R82.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2021-04-13 07:47:44 -04:00
Kim Bøndergaard
6adafaeb02 driver: display: Add support for st7735r based LCDs
First version of a driver for the st773r LCD controller.
Based on st7789v

Signed-off-by: Kim Bøndergaard <kim@fam-boendergaard.dk>
Signed-off-by: Kim Bøndergaard <kibo@prevas.dk>
2021-04-12 16:42:00 -04:00
Kumar Gala
95f866ef15 dts: bindings: nxp,kinetis-pinmux: Update binding for pin data
Update the binding for how we represent pin data to support child
nodes with a nxp,kinetis-pins property that has the pin data.

For example:

      UART0_CTS_PTA0: uart0_cts_pta0 {
           nxp,kinetis-port-pins = < 0 2 >;
      };

Also pull in pincfg-node.yaml to get various common pin flags like
"bias-pull-up", "drive-open-drain", etc.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-04-08 17:08:33 -05:00
Erwan Gouriou
e4ba0ff2bc dts/bindings: pinctrl: Include pincfg-node in st,stm32-pinctrl.yaml
Make use of bindings filtering to inlcude pincfg-node.yaml in
st,stm32-pinctrl.yaml

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-08 16:58:33 -05:00
Mulin Chao
d3a94fa8ab dts: npcx: Fixed the name of nodes in device-tree files.
Fixed the name of nodes in device-tree files by following rules:

If object is 'phandles', use underscores for object name.
If not, such as 'node' or 'property', use hyphens for object name.

This CL also applies normal style for all nodes in npcx device-tree
files.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2021-04-08 16:35:20 +02:00
Armando Visconti
36eceba7e4 drivers/sensor: lsm6dso: move int-pin in DTS binding
Take the int-pin information (i.e. what pin between INT1
and INT2 the drdy is attached to) directly from DT.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-04-06 15:34:01 +02:00
Armando Visconti
946bd44b96 dts/bindings: lsm6dso: create a common DT binding file
Create a common properties file that will be included by all bindings
(as i2c and spi) handled by lsm6dso driver.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-04-06 15:34:01 +02:00
Hayden Ball
64995e2a54 max17055: Set battery parameters from device tree
Currently the MAX17055 driver assumes that a battery matching the
default characteristics is used.

This change allows battery characteristics to be specified in device
tree and writes them to the MAX17055 on initialization.

Existing default values are maintained for backwards compatibility.

Initialization routine taken from MAX17055 Software Implementation
Guide, document UG6365.

Signed-off-by: Hayden Ball <hayden@playerdata.co.uk>
2021-04-05 15:29:00 -05:00
Sun Amar
cc43b9c648 gecko pwm: add bindings files
Add bindings files for the pwm and the timer for the
efr32 soc family

Signed-off-by: Sun Amar <sun681@gmail.com>
2021-04-02 18:45:33 -04:00
Pieter De Gendt
7f46a59a42 drivers: memc: Introduce i.MX RT FlexSPI HyperRAM driver
Add the FlexSPI HyperBUS driver to support HyperRAM external
devices.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2021-04-02 10:36:22 -05:00
Corey Wharton
e3c94d381a driver: sensor: Add support for BMP388 pressure sensor
Adds support for Bosch's BMP388 pressure sensors connected either
by a I2C or SPI bus.

Signed-off-by: Corey Wharton <coreyw7@fb.com>
2021-04-02 08:06:46 -05:00
Henrik Brix Andersen
a865b1bb49 soc: arm: nxp: ke1xf: use clock nodes for NXP Kinetis SCG clocks
Use a combination of fixed-clock and fixed-factor-clock devicetree
nodes for describing the clock dividers/multipliers of the NXP Kinetis
System Clock Generator (SCG) present in the KE1xF SoC series.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-03-31 11:56:13 -05:00
Masoud Shiroei
ef2a590281 drivers: sensor: lis2mdl: Add single mode operation
Support single mode operation by enabling it and
making the driver to use the interrupt to findout
when the data is ready for fetch. The sample fetch
will be blocked for a specified maximum time untill
the interrupt happens.

* Make operation mode configurable in DTS file
* Make offset cancellation configurable in DTS file
* Use single common .yaml file for both i2c and spi
* Store above configurations in dev->config_info

Signed-off-by: Masoud Shiroei <masoud.shiroei@assaabloy.com>
2021-03-31 08:08:35 -04:00
Martí Bolívar
efa654b67c dts: bindings: improve zephyr,bt-hci-spi-slave docs
Improve the description.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-03-29 16:33:51 +02:00
Mulin Chao
12a30dce19 dts: psl: npcx: add PSL pads support for ultra-low-power mode.
This CL introduces the Power Switch Logic (PSL) pads which detect the
wake-up events and turn on/off core power supply (VCC1) for ultra-low
-power consumption in npcx device-tree file.

By adding PSL input-pad objects, psl_in1, psl_in2, and so on, into
'psl-in-pads' property and configuring their 'flag' properties, the
related driver will configure them via soc specific functions later.

For example, if PSL input 1 pad that is plan to detect a 'falling edge'
event, this property should be:
	vsby-psl-in-list {
		psl-in-pads = <&psl_in1>;
	};

And the flag property in psl_in1 should change to
	&psl_in1 {
		flag = <NPCX_PSL_FALLING_EDGE>;
	};

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2021-03-26 07:11:59 -04:00
Martí Bolívar
b2cc526061 tests: dts: test child bindings with compatibles
Make sure that child bindings with their own compatibles are treated
as first-class bindings. Do this by making sure that nodes whose
bindings are defined via 'child-binding:' are picked up as bus nodes,
instead of a parent bus node of the same type.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-03-25 09:37:42 -05:00
Kumar Gala
52d15d21bc arm: mps3_an547: Add SoC support for the AN547 on MPS3
The AN547 is a Soft Macro Model implementation of the SSE-300 subsystem
with Ethos-U55 and Cortex-M55 components targeting the MPS3 board.

The SoC support is based on the AN521 MPS2+ support that already exists
in Zephyr.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-23 13:13:32 -05:00
Kumar Gala
95e4b3eb2c arch: arm: Add initial support for Cortex-M55 Core
Add initial support for the Cortex-M55 Core which is an implementation
of the Armv8.1-M mainline architecture and includes support for the
M‑profile Vector Extension (MVE).

The support is based on the Cortex-M33 support that already exists in
Zephyr.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-23 13:13:32 -05:00
Peter Niebert
6d34d6be8c dts: added constraints for baudrates of UARTs in Nordic SOCs
UARTs in Nordic devices only support a specified list of baud rates.
Choosing a different baud rate without this patch will cause a runtime
error, whereas with the constraint, this mistake is already found in
dts construction with a useful error message.

Signed-off-by: Peter Niebert <peter.niebert@univ-amu.fr>
2021-03-19 19:17:03 +01:00
Hubert Miś
7d8f78a08b drv: display: Initial FT800 display driver
This patch includes initial support for FT800 display driver.
It includes basic features. It can be easily extended with more
FT800 display list and co-processor features.

Signed-off-by: Hubert Miś <hubert.mis@gmail.com>
2021-03-19 19:05:53 +01:00
Johann Fischer
c96aeff785 modbus: add control for DE/nRE RS-485 transceiver signals
Add support to control DE/nRE RS-485 transceiver signals
over GPIO pins. Useful if the UART controller does not
support RS-485 mode.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-03-19 15:50:21 +01:00
Johann Fischer
07ab652c6c modbus: add MODBUS RTU subsystem
Add MODBUS RTU (over serial line) subsystem.
MODBUS RTU implementation supports booth server and
client roles. Some components of the implementation are based
on the uC/Modbus stack, which was published under Apache license,
(https://github.com/SiliconLabs/uC-Modbus
 fdd1218a28e313c1212fed5ed42e5c65d3056a2c).

Resolves: #2854

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2021-03-19 15:50:21 +01:00
Piotr Mienkowski
d6f2ba8011 dts: add support for Atmel SAM Timer Counter (TC)
Add support for Timer Counter (TC) on SAM E70/V71 series.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2021-03-18 10:20:17 +01:00
Jun Lin
2638f2ecc4 npcx: move scfg driver from pinctrl to soc/arm/nuvoton_npcx/common
In NPCX chips, System Configuration module can configure not only
pinctrl but also misc. functionality such as glue and flash write
protection. This change moves the scfg driver from the pinctrl folder
to soc/arm/nuvoton_npcx/common and renames it to avoid confusion.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2021-03-17 18:47:32 -04:00
Igor Knippenberg
79a3d1b85a drivers: sensors: fdc2x1x: Add driver for Texas Instruments FDC2X1X
Adds support for the Texas Instruments FDC2X1X Capacitance-to-Digital
Converter for Proximity and Level Sensing Applications.

Signed-off-by: Igor Knippenberg <igor.knippenberg@gmail.com>
2021-03-17 11:35:17 +01:00
Gerson Fernando Budke
68dcac3be6 dts: arm: cypress: Introduce PSoC-6 pinctrl
Introduce PSoC-6 pinctrl infraestructure and definitions.  This add
files to handle devicetree entries and following modifications:

 - add pinctrl bindings
 - update gpio bindings with pin-cells
 - add pinctrl node and move gpio nodes inside
 - declare pinctrl for current uart entries

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-03-16 13:36:15 -05:00
Krzysztof Chruscinski
489042d538 dts: bindings: cpu: Add cortex-m common properties
Added file with common properties for cortex-m cores.
Added optional swo-ref-frequency property.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-03-15 10:23:10 +01:00
Wojciech Tatarski
bd6617ddf8 dts: add EOS S3 GPIO definitions
Add GPIO definitions to QuickLogic EOS S3 devicetree.

Co-authored-by: Jan Kowalewski <jkowalewski@antmicro.com>

Signed-off-by: Wojciech Tatarski <wtatarski@antmicro.com>
Signed-off-by: Jan Kowalewski <jkowalewski@antmicro.com>
2021-03-11 08:58:20 -05:00
Mikkel Jakobsen
ec349f6f0d dts: bindings: clock: add fixed-factor-clock binding
Allows for adding in fixed factor clock that are derived
from a parent clock.

Based on:
https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git/tree/Bindings/clock/fixed-factor-clock.yaml

Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@prevas.dk>
2021-03-08 12:18:33 -06:00
Glauber Maroto Ferreira
d8f6e66588 esp32: drivers: spi_flash: add host flash support
Add support for ESP32 host flash chip

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-03-06 09:34:35 -05:00
Carlo Caione
0f9406277d aarch64: pm_cpu_ops: Introduce pm_cpu_ops subsystem
AArch64 has support for PSCI. This is especially useful for SMP because
PSCI is used to power on the secordary cores.

When the PSCI driver was introduced in Zephyr it was designed to rely on
a very PSCI-centric subsystem / interface.

There are two kinds of problems with this choice:

1. PSCI is only defined for the non-secure world and it is designed to
   boot CPU cores into non-secure state (that means that PSCI is only
   supposed to work if Zephyr is running in non-secure state)

2. There can be other ways or standards used to start / stop a core
   different from PSCI

This patch is trying to fix the original wrong assumption by making the
interface / subsystem a generic one, called 'pm_cpu_ops', and using PSCI
only as an actual driver that is a user of this new interface /
subsystem.

For now the new subsystem is only exposing two methods: cpu_on and
cpu_off, others will probably follow according to the needs.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-03-04 06:53:19 -05:00
Kumar Gala
295349afb1 dts: bindings: Fix duplicate description in ARM PL330 DMA bindings
The DMA bindings had duplicate description: keys.  Merge the two
descriptions into one to fix the issue.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-03 17:42:12 -06:00
Kumar Gala
403e6e3517 drivers: i2c: nios2: get IRQ and IRQ priority from DTS
Move the I2C IRQ information to devicetree similar to what most all
other drivers are doing.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-03 11:55:03 -06:00
Gerson Fernando Budke
bc9b9a0689 dts: pinctrl: atmel: sam-pinctrl: Switch to pincfg-node
Add pincfg-node compatibility.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-03 10:12:57 -06:00
Gerson Fernando Budke
2e15665cad dts: pinctrl: Introduce pincfg-node
Many data items that are represented in a pin configuration node are
common and generic.  Pin control bindings should use the properties
defined on a standard way when are applicable; not all of these
properties are relevant or useful for all hardware or binding
structures.  Each individual binding document should state which of
these generic properties, if any, are used, and the structure of the
DT nodes that contain these properties.

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

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-03 10:12:57 -06:00
Andrzej Głąbek
1314ab5404 drivers: gpio: Add support for PCAL6408A I/O expander
Add GPIO driver and devicetree binding for the PCAL6408A 8-bit I2C-bus
I/O expander.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-03-03 11:38:03 +03:00
Kumar Gala
b60b4be4e3 drivers: dma: nios2_msgdma: Conver to devicetree
Conver the NIOS-II mSGDMA driver to be devicetree based.  Add node for
dma controller into nios2f.dtsi.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-02 08:36:58 -06:00
Kumar Gala
686968b16a dts: arm: nxp: lpc: Add dts nodes for IOCON
Add binding and dts nodes for the IOCON and IOCON ports on the LPC
family of SoCs.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-01 12:04:53 -06:00
Martí Bolívar
821c03a14a i2c: nordic: switch to phandle arrays for pinmux
Deprecate the scl-pin and sda-pin properties in the devicetree.
Provide new scl-gpios and sda-gpios properties instead.

This lets the user specify SCL and SDA like this:

   &i2c0 {
         scl-gpios = <&gpio0 1 0>;
         sda-gpios = <&gpio1 4 0>;
   };

Instead of having to use:

   &i2c0 {
         scl-pin = <1>;
         sda-pin = <36>;
   };

Provide error checking and understandable error messages for invalid
configurations.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-03-01 16:59:56 +01:00
Armando Visconti
79c709bf02 drivers/sensor: ism330dhcx: Move INT_PIN Kconfig attr into DT
Convert ism330dhcx INT_PIN attribute from Kconfigs to Device
Tree binding properties. Here int-pin has been defined as
enum with two possible values: 1 and 2.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-02-28 16:47:15 -05:00
Armando Visconti
e97424e23d drivers/sensor: ism330dhcx: Move accel/gyro odr Kconfig attr into DT
Convert ism330dhcx accel and gyro odr attributes from Kconfigs to Device
Tree binding properties.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-02-28 16:47:15 -05:00
Armando Visconti
404ab86cb5 drivers/sensor: ism330dhcx: Move accel/gyro range Kconfig attr into DT
Converts ism330dhcx accel and gyro range attributes from Kconfigs to
Device Tree binding properties.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-02-28 16:47:15 -05:00
Armando Visconti
a6795f5f9b dts/bindings: ism330dhcx: create a common DT binding file
Create a common properties file that will be included by all bindings
(as i2c and spi) handled by ism330dhcx driver.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-02-28 16:47:15 -05:00
Ilya Tagunov
735d2fe7d1 dts: bindings: lora: sx127x: add SX1272 binding
Refactor out common parts and add SX1272 support to SX127x bindings.

Signed-off-by: Ilya Tagunov <tagunil@gmail.com>
2021-02-28 16:36:35 -05:00
Ilya Tagunov
a97d3aebe7 dts: bindings: lora: sx126x: fix reset signal name
Reset signal on the SX126x is called NRESET, not NRST.

Signed-off-by: Ilya Tagunov <tagunil@gmail.com>
2021-02-28 16:36:35 -05:00
Piotr Pryga
8dcf8c111f dts: bindings: net: wireless: Change dfe-ant-num property name
Change dfe-ant-num propert name to dfe-antenna-num.
The change is conde to keep the same naming style
for all properies, like dfe-pdu-antenna property.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-02-25 14:53:27 +01:00
Piotr Pryga
64cb4bbc37 Bluetooth: controller: LLL: DF add initialization of ant switching GPIOs
Add initialization of GPIOs that are used for antenna switching.
GPIOs provided to DFE extension in Radio peripheral, to drive
antenna switching, should be initialized in GPIO peripheral beforehand.
The initialization is optional and may be disabled by Kconfig.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-02-25 14:53:27 +01:00
Pavlo Hamov
5ae781d7d0 drivers: watchdog: cc32xx: Add support
Impelement watchdog for ti_cc32xx family

Signed-off-by: Pavlo Hamov <pasha.gamov@gmail.com>
2021-02-24 08:35:27 -06:00
Bosch Sensortec
0cc640d27b dts: bindings: sensor added dts binding bmi270
Added device tree binding for the BMI270 IMU

Signed-off-by: Bosch Sensortec <github@bosch-sensortec.com>
2021-02-22 17:58:00 -05:00
Mulin Chao
7c9d3f44f0 driver: sensor: npcx: add tachometer sensor support.
In NPCX7 series, it contains two tachometer (TACH) modules that contains
two Independent timers (counter 1 and 2). They are used to capture a
counter value when an event is detected via the external pads (TA or
TB).

The CL also includes:
— Add npcx tachometer device tree declarations.
— Zephyr sensor api implementation for tachometer.
— Enable "tach1" device in npcx7m6fb.dts for testing.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2021-02-22 17:56:19 -05:00
Glauber Maroto Ferreira
74922049ba drivers: spi: esp32: add basic SPI master support
Include SPI master support for blocking and asynchronous calls.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-02-22 08:17:04 -05:00
Mulin Chao
e5caae8e0a driver: timer: npcx: add system kernel timer support.
This CL introduces a kernel device driver implemented by the internal
64/32-bit timers in Nuvoton NPCX series. Via these two kinds of timer,
the driver provides an standard "system clock driver" interface.

It includes:
 - A system timer based on an ITIM64 (Internal 64-bit timer) instance,
   clocked by APB2 which freq is CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC.
 - Its prescaler is set to 1 and provide the kernel cycles reading
   without handling overflow mechanism.
 - A event timer based on an ITIM32 (Internal 32-bit timer) instance,
   clocked by LCLK which frequency is 32KHz and still activated when ec
   entered "idle/deep idle" power state for better power consumption.
 - Its prescaler is set to 1 and provide timeout event mechansim.
 - Compensate system timer which clock is gating for better power
   consumption after ec left"idle/deep idle" power state.

This CL passed starve, timer_api, and timer_monotonic test suites.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2021-02-19 22:39:53 -05:00
Daniel Leung
78837c769a soc: x86: add Lakemont SoC
This adds a very basic SoC configuration for Intel Lakemont SoC.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-02-19 18:51:04 -05:00
Pavlo Hamov
ee6ec8d4f3 drivers: adc: cc32xx: Add support
Support 4 channels in IRQ mode. Sync/Async

Signed-off-by: Pavlo Hamov <pasha.gamov@gmail.com>
2021-02-19 10:43:58 -06:00
Laczen JMS
decf521660 drivers: eeprom: add emulated eeprom in flash
Modifications to incorporate latest write to new flash area
Modification to avoid writing garbage to new flash area when compactor
is called during init.
Modifications to allow erase at partition size instead of eeprom
pagesize.
Modifications to better separate rambuf usage from flash usage.
Corrected some errors in compactor

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2021-02-19 14:06:15 +01:00
Laczen JMS
232272cff8 drivers: eeprom: EEPROM emulation in flash memory
This driver emulates a EEPROM device in flash.

Reworked implementation with modified flash layout.

The emulation represents the EEPROM in flash as a region that is a
direct map of the eeprom data followed by a region where changes to
the eeprom data is stored. Changes are written as address-data
combinations. The size of such a combination is determined by the
flash write block size and the size of the eeprom (required address
space), with a minimum of 4 byte.
The eeprom page needs to be a multiple of the flash page. Multiple
eeprom pages is also so supported and increases the number of writes
that can be performed.

The eeprom size, pagesize and the flash partition used for the eeprom
are defined in the dts. The flash partition should allow at least two
eeprom pages. For fast read access a rambuffer can be enabled for the
eeprom (by setting the option rambuf in the dts).

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2021-02-19 14:06:15 +01:00
Erwan Gouriou
e987d51815 dts: stm32: Add exti nodes to stm32 series
Add exti node for each stm32 series and matching binding description.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-02-17 14:26:23 -06:00
Gerard Marull-Paretas
cbc340c10c drivers: sensor: add support for MAX6675
Add support for MAX6675 cold-junction-compensated K-thermocouple to
digital converter.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2021-02-17 14:33:29 +01:00
Kumar Gala
ca5272f239 pinctrl: cc13x2_cc26x2: drop label property from pinmux node
We've removed the need for label properties from the pinmux devicetree
nodes on all other controllers and its not required for the TI one, so
remove it from the .dts and drop label being required in the binding.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-16 16:46:31 -06:00
Kumar Gala
942916e691 arm: nxp: kinetis: Rework device_get_binding for pinmux
Switch to use DEVICE_DT_GET instead of device_get_binding for pinmux
device.  As part of this change drop the "label" property from
the pinmux devicetree node and update the binding and dts files to
reflect that.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-16 16:45:02 -06:00
Kumar Gala
c54005235c riscv: ite: it8xxx2: Rework device_get_binding for pinmux
Switch to use DEVICE_DT_GET instead of device_get_binding for pinmux
device.  As part of this change drop the "label" property from
the pinmux devicetree node and update the binding and dts files to
reflect that.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-16 09:45:57 -05:00
Tomasz Bursztyka
32638183fd dts/bindings: Fixing x86 CPU compatibles by providing proper yaml files
Make compatible name following the rule as well.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2021-02-15 09:43:30 -05:00
Kumar Gala
f6b7dd09ec pinmux: sifive: Convert SiFive pinmux to be devicetree based
Add a simple pinctrl node for the IOF registers under the GPIO
controller node to be used by the pinmux driver.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-15 08:33:00 -05:00
Kumar Gala
d6b4995d6a riscv: rv32m1: Rework device_get_binding for pinmux
Switch to use DEVICE_DT_GET instead of device_get_binding for pinmux
device.  As part of this change drop the "label" property from
the pinmux devicetree node and update the binding and dts files to
reflect that.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-15 08:32:41 -05:00
Kumar Gala
6e8eb53b51 arm: atmel: sam0: Rework device_get_binding for pinmux
Switch to use DEVICE_DT_GET instead of device_get_binding for pinmux
device.  As part of this change drop the "label" property from
the pinmux devicetree node and update the binding and dts files to
reflect that.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-15 08:31:29 -05:00
Kumar Gala
4276d7d247 pinmux: hsdk: Convert ARC HSDK pinmux to be devicetree based
Add a simple pinctrl node for the CREG GPIO MUX register to be used
by the pinmux driver.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-15 08:29:56 -05:00
Kumar Gala
147bb6b9f3 arm: microchip: mec1501hsz: Rework device_get_binding for pinmux
Switch to use DEVICE_DT_GET instead of device_get_binding for pinmux
device.  As part of this change drop the "label" property from
the pinmux devicetree node and update the binding and dts files to
reflect that.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-15 08:29:34 -05:00
Guillaume Paquet
143a776657 boards: arm: nordic: Add BG96 to RAK5010 board
Add BG96 in board description
Add W Disable Pin in BG96 descriptor

Signed-off-by: Guillaume Paquet <guillaume.paquet@smile.fr>
2021-02-15 08:25:46 -05:00
Scott Worley
2b926db4e1 drivers: espi: Microchip eSPI add SAF support
Add ESPI SAF features to the Microchip eSPI driver as
a separate file. ESPI SAF depends upon the core eSPI
driver adding the ability to attach the system SPI
flash to the EC eSPI endpoint instead of the host
eSPI controller.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2021-02-15 08:22:01 -05:00
Steven Daglish
5427d6bbc7 sensor: mcp9808: Adding temperature resolution to MCP9808 sensor driver
During the driver init, the function will set the sensor resolution
based on the driver's dts variable "resolution"

The driver's device tree has been updated to include the value
"resolution".

The default is set to the highest resolution of 0.0625C.

Moved mcp9808_reg_write from mcp9808_trigger.c to mcp9808.c

This allows resue of the same function in both the trigger and
resolution functions.

Function name changed to xxx_16bit to distinquish it from the 8
bit write function that will added.

Signed-off-by: Steven Daglish <s.c.daglish@gmail.com>
2021-02-15 08:13:17 -05:00
Gerard Marull-Paretas
10532a5310 soc: arm: st_stm32: add support for STM32 backup SRAM
Add support for backup SRAM initialization found in multiple STM32
microcontrollers. Linker script facilities are also provided to make it
easy to define variables in the backup SRAM.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2021-02-15 08:04:24 -05:00
Armando Visconti
d2c5664ff1 drivers/sensor: iis2iclx: modify int-pin type in DT
Change int-pin property type to enum, as it may only
accept 1 or 2 as possible values.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-02-15 07:58:36 -05:00
Armando Visconti
69269c52e8 drivers/sensor: iis2iclx: Move odr Kconfig property into dts
Move iis2iclx odr options from Kconfigs to Device Tree.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-02-15 07:58:36 -05:00
Armando Visconti
5ebada58a7 drivers/sensor: iis2iclx: Move range Kconfig property into dts
Converts iis2iclx range options (500mg, 1g, 2g, 3g) from Kconfigs
to Device Tree.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-02-15 07:58:36 -05:00
Armando Visconti
2a6517bd7b dts/bindings: iis2iclx: create a common st,iis2iclx-common.yaml
Create a common binding file that will be included by all bindings
handled by iis2iclx driver.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-02-15 07:58:36 -05:00
Kumar Gala
1cb2dceeb4 xtensa: intel_s1000: Rework device_get_binding for pinmux
Switch to use DEVICE_DT_GET instead of device_get_binding for pinmux
device.  As part of this change drop the "label" property from
the pinmux devicetree node and update the binding and dts files to
reflect that.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-14 22:12:07 -05:00
Andrei Emeltchenko
c0dd472cd7 edac: Do not use BDF and PCI IDs from DTS
Use autoconfiguration instead of DT hardcoding.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-02-04 09:37:42 -05:00
Kumar Gala
3fff3852fa dts: Rename compatible arm,arm-timer to arm,armv8-timer
The compatible for the ARMv8 timer should have been arm,armv8-timer and
not arm,arm-timer.  The dts binding file name was correct, just the
compatible was wrong.  Rename dts, binding, and associated code to use
arm,armv8-timer.

Fixes #31946

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-04 07:04:28 -05:00
Kumar Gala
f44a6c6f85 dts: Cleanup litex,clk binding
Rework the litex,clk to use the clock-controller.yaml and remove
address-cells/size-cells as they aren't needed for the binding.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-03 13:41:47 -05:00
Kumar Gala
cbd9608441 dts: bindings: remove default usage in gaisler,irqmp
Use of default for eirq is not needed, the property is explicitly
set when needed.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-03 13:41:47 -05:00
Kumar Gala
f8b7aabd12 dts: bindings: Remove defaults for cache lines from cpu binding
The default values for i/d-cache line size doesnt make sense.  These
shouldn't use defaults.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-03 13:41:47 -05:00
Henrik Brix Andersen
8cf62f119e dts: bindings: mtd: rename SPI/I2C EEPROM base binding
Rename the SPI/I2C EEPROM devicetree binding to reflect that it only
covers AT24 and AT25 EEPROMs).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-01-25 12:32:54 -05:00
Matija Tudan
1463596205 drivers: dac: added driver for TI DACx3608
The DAC53608 and DAC43608 (DACx3608) are lowpower, eight-channel,
voltage-output, 10-bit or 8-bit digital-to-analog converters (DACs)
respectively. They support I2C with a wide power supply range
from 1.8 V to 5.5 V, and a full scale output voltage range of
1.8 V to 5.5 V. The DACx3608 also includes per channel, user
programmable, power down registers.

Signed-off-by: Matija Tudan <mtudan@mobilisis.hr>
2021-01-24 14:28:05 -05:00
Volodymyr Babchuk
4fb1ee771a drivers: pl011: add SBSA mode
ARM Server Base System Architecture defines Generic UART interface,
which is subset of PL011 UART.

Minimal SBSA UART implementation does not define UART hardware
configuration registers. Basically, only FIFOs and interrupt management
operation are defined.

Add SBSA mode to PL011 UART driver, so it can be used at SBSA-compatible
platforms, like Xen guest.

Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
2021-01-24 13:59:55 -05:00
Maureen Helm
52b77ac956 dts: boards: arm: Rework FlexSPI bindings on i.MX RT boards
Reworks the NXP FlexSPI device tree bindings to configure controller and
device properties needed for an upcoming FlexSPI flash driver.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-01-22 11:11:54 -05:00
Hake Huang
38c53b6347 dts-binding: dts/bindings/timer: add gpt freq in dts binding
add gpt freq in dts binding

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-01-22 08:34:49 -06:00
Flavio Ceolin
c5e82ecec3 power: Add substate-id property for a power state
There are platforms that have multiple states that maps to a specific
Zephyr power state. To accommodate this sort of situation this commit
adds an additional property to a power state that can be used by the
platform.

The power state now consists of two properties, a category and a
substate-id. The former property is the current power state.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-01-22 09:31:20 -05:00
Flavio Ceolin
47e3577ff2 dts: power: Change pm state properties
Making it looks more Linux alike

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-01-22 09:31:20 -05:00
Peter Bigot
feb0179d81 dts: bindings: test: complete bindings for gpio expander
These need to be gpio controllers and have the necessary specifier
properties for use in gpio specifiers.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-21 14:49:04 -06:00
Gerson Fernando Budke
84d6a78ad1 drivers: gpio: Add Cypress PSoC-6 gpio driver
Introduce PSoC-6 GPIO support.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-01-21 17:33:11 +01:00
Rohit Gujarathi
6910725ad9 drivers: display: Added Sharp memory display drivers.
Added support for sharp memory displays of the series
LS0XX.

Signed-off-by: Rohit Gujarathi <gujju.rohit@gmail.com>
2021-01-21 17:26:37 +01:00
Andrei Emeltchenko
abe6cb9428 edac: Add DTS bindings for IBECC
Add bindings for EDAC/IBECC. At the moment we can pass BDF and Vendor
ID.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-01-21 08:34:07 -05:00
Gerson Fernando Budke
f93ee9508b soc: arm: cypress: psoc6: Add Cortex-M0+ int mux support
PSoC-6 SoC needs that user define the nvic interrupt number to bind
with the peripheral interrupt line for the Cortex-M0+ CPU.  It uses
a multiplex before any NVIC interrupt line.  The interrupt vector is
selected using interrupt-parent property with the intmux_chN number
reference.

Note: The PSoC-6 SoC allows that both CPUs receive the same interrupt.
A tipical use is GPIO interrupt handle and user is responsable to
define interrupt line, priority and take care of enable same peripheral
instance on both CPUs only when appropriated.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-01-20 17:54:09 -06:00
Dawid Niedzwiecki
d1948dc164 emul: espi: Add support for eSPI emulators
Add an emulation controller which routes eSPI traffic to attached
emulators depending on the selected chip(mostly host).
This allows drivers for eSPI peripherals to be tested on systems
that don't have that peripheral attached, with the emulator handling
the eSPI traffic.

Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
2021-01-20 17:49:19 -05:00
Francisco Munoz
7c3504b1c9 dts: bindings: microchip,xec-i2c: Add GIRQ fields
Add the girq and girq-bit fields to the binding. This allows
encoding GIRQ related information inside device tree.

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2021-01-20 14:16:27 -05:00
JuHyun Kim
cc56fb5247 drivers: sensor: Initial driver of Invensense ICM42605
Initial driver and sample application of
TDK Invensense ICM42605 6-axis motion sensor.
This driver provide DTS for nRF52 DK board DTS setting.

Providing features are below.

Sensor data streaming - Accel, gyro
Tap, Double tap triggering.
Set/Get FSR, ODR by set attr API
Support multi instance feature.

Signed-off-by: JuHyun Kim <jkim@invensense.com>
2021-01-20 10:41:04 -06:00
Henrik Brix Andersen
aecb38bc3d dts: bindings: pwm: add binding for the NXP Kinetis Pulse Width Timer
Add devicetree binding for the NXP Kinetis Pulse Width Timer (PWT).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-01-20 08:05:57 -06:00
Piotr Pryga
41c4af1ba3 dts: arm: nordic: Add radio peripheral with DFE antenna config
Add radio peripheral to nrf52833 DTS including antenna matrix
congiuration for Direction Finding extennsion.
Add appropriate binding file for nRF radio peripheral.

There is no default antenna matrix configuration. Antennas number
and GPIOS mapping to DFEGPIOS is project specific.
Complete configuration must be provided by end user as overaly.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-01-20 14:55:24 +01:00
Lukasz Majewski
471280922e dsa: dts: Add microchip,ksz8794.yaml file describing DSA switch properties
The ksz8794 yaml file provides information regarding device tree's
properties for this particular DSA switch IC.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2021-01-20 10:03:42 +02:00
Johan Hedberg
704ddaa9c3 drivers: i2c_dw: User proper PCIe DT hierarchy
Move all PCIe-based DT nodes under a PCIe bus and take advantage of
the DT_ANY_INST_ON_BUS_STATUS_OKAY() and DT_INST_ON_BUS() macros.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2021-01-19 14:52:29 -05:00
Carlo Caione
e77c841023 cache: Expand the APIs for cache flushing
The only two supported operations for data caches in the cache framework
are currently arch_dcache_flush() and arch_dcache_invd().

This is quite restrictive because for some architectures we also want to
control i-cache and in general we want a finer control over what can be
flushed, invalidated or cleaned. To address these needs this patch
expands the set of operations that can be performed on data and
instruction caches, adding hooks for the operations on the whole cache,
a specific level or a specific address range.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-01-19 14:31:02 -05:00
Antonio Tessarolo
f4acdc2729 NXP: Enable I2C for imx6sx
This commit add support for i2c on imx6sx.
I2C support is based on imx7d and requires NXP HAL.
The Device Tree binding is also changed to better reflect that i2c
driver support both imx6sx and imx7d.

Signed-off-by: Antonio Tessarolo <anthonytexdev@gmail.com>
2021-01-18 17:01:34 -05:00
Raveendra Padasalagi
e10ce51d92 dts: bindings: Add documentation for PAXDMA driver
Add documentation for PAXDMA driver

Signed-off-by: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
2021-01-18 16:58:55 -05:00
Peter Bigot
3e46ae1acb drivers: flash: nrf_qspi: rework handling of quad-enable bit
Kconfig allowed selecting any bit in the status register as the QE
bit, and defaulted it to 6.  Devices need not require a QE bit at all,
and where JESD216 defines QE bit location the only place in first SR
byte that it can be is bit 6.  Further, the code unconditionally wrote
the value 0x40 without respecting configuration of other bits.  Some
of those bits control write protection of block-protected areas and
should not be changed.

Remove the Kconfig, instead using the jedec,jesd216-controlled
devicetree property.  Allow the driver to recognize whether or not
setting the bit is required, and when it is only use bit 6.  Only
update if the setting does not match the configuration.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-18 16:58:09 -05:00
Peter Bigot
52545411d2 drivers: flash: jesd216: add support for DW15 decoding
DW15 provides information on entry and exit from QSPI modes.  In
particular, it specifies whether and how the status register must be
updated for this feature.

Add a JESD216 devicetree property for the Quad Enable Requirements
value.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-18 16:58:09 -05:00
Johan Hedberg
1d5d5fcf49 drivers: uart: ns16550: Move all PCIe-using nodes to a PCIe bus in DTS
The existing method of testing for any of the first four DT instances
having the pcie property feels a bit clumsy and will get more so when
support for more than four UARTs is added. A much more cleaner way to
do this (and more correct probably as well) is to list any PCIe-based
UART nodes under a pcie bus in the Device Tree hierarchy.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2021-01-18 15:45:58 -05:00
Johan Hedberg
7a2bddd75a dts: bindings: Add binding for PCIe bus
Add a binding to represent a PCIe bus. This way PCIe devices can be
ordered under a parent PCIe bus object and make help of DT BUS macros
for conditional code.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2021-01-18 15:45:58 -05:00
Mulin Chao
b7ec2cd5de driver: gpio: add 1p8v level detection support in npcx series.
Part of GPIO pads in npcx series support low-voltage (1.8V) level
detection. In order to introduce this feature, this CL adds a new
NPCX-specific controller property, lvol_io_pads, in devicetree file.
For example, here is devicetree fragment which turn on low-voltage
support of i2c1_0 port.

/ {
      def_lvol_io_list {
          compatible = "nuvoton,npcx-lvolctrl-def";
          lvol_io_pads = <&lvol_io90   /* I2C1_SCL0 1.8V support */
                          &lvol_io87>; /* I2C1_SDA0 1,8V support */
     };
  };

Then these pads will turn on 1.8V level detection during initialization.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2021-01-18 19:09:34 +01:00
Carlo Caione
57f7e31017 drivers: PSCI: Add driver and subsystem
Firmware implementing the PSCI functions described in ARM document
number ARM DEN 0022A ("Power State Coordination Interface System
Software on ARM processors") can be used by Zephyr to initiate various
CPU-centric power operations.

It is needed for virtualization, it is used to coordinate OSes and
hypervisors and it provides the functions used for SMP bring-up such as
CPU_ON and CPU_OFF.

A new PSCI driver is introduced to setup a proper subsystem used to
communicate with the PSCI firmware, implementing the basic operations:
get_version, cpu_on, cpu_off and affinity_info.

The current implementation only supports PSCI 0.2 and PSCI 1.0

The PSCI conduit (SMC or HVC) is setup reading the corresponding
property in the DTS node.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-01-18 19:06:53 +01:00
Armando Visconti
e4f95863f9 drivers/sensor: iis2dlpc: Move trigger pulse Kconfig property into DT
Move iis2dlpc trigger pulse configurations from Kconfigs to Device Tree.
Moreover the dts properties have been renamed as 'tap', which sounds a
better name to immediately catch the feature behind it. Since tap
threshold cannot be zero, this value (which is the default in dts
binding) is used to enable/disable the device feature per each axis.
The event can be generated on INT1 only.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-01-18 09:21:00 -06:00
Armando Visconti
d2e8b0cc6e drivers/sensor: iis2dlpc: Move drdy_int info into DT
The IIS2DLPC drdy interrupt can be routed to either INT1 or
INT2 pin. Currently the selection is done by Kconfig configuration.
This commit is instead moving it into Device Tree as 'drdy-int'.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-01-18 09:21:00 -06:00
Lingao Meng
649cc167a8 boards: Add BBC MicroBit V2 support
The BBC micro:bit v2 is a mini-computer that has been
designed to make the coding fun and easy to learn.

The micro:bit v2 is completely programmable so you can
easily bring your ideas to life! From making games to
creating music and even controlling robots.

The micro:bit comes with neat hardware such as a 25 LED
display, buttons, in-built speakers, Bluetooth 5 & Mesh
connectivity and sensors for temperature, motion & light.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2021-01-16 23:06:23 +01:00
Martí Bolívar
e031bc4b48 dts: nordic,nrf-gpio: add port property
This property is required information for extracting PSEL bits relevant
to peripheral pinmux from this node.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-01-16 07:59:27 -06:00
Martí Bolívar
0861b5ba11 dts: bindings: improve documentation for Nordic IPs
Add some details to help new users learn how to manage the nodes
for compatibles corresponding to IP blocks on Nordic SoCs.

The focus is on IP blocks where the pinmux is configured in
devicetree. These typically have individual properties for each pin,
like a SCK pin on a SPI peripheral, which correspond directly to a
PSEL register value. These violate the usual devicetree convention of
using a 'foo-gpios <&gpioX ...>' phandle property and work in ways
that only make sense if you understand the underlying register map, so
it's worth explaining them a bit more carefully.

Skip these two bindings, which have no drivers: nordic,nrf-i2s.yaml,
nordic,nrf-pdm.yaml.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-01-16 07:59:27 -06:00
Martí Bolívar
cd8d2b4921 dts: bindings: spi-controller.yaml documentation
Add more explanations etc.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-01-16 07:59:27 -06:00
Mulin Chao
1c21ca829b drivers: wdt: add watchdog driver support for NPCX7 series.
In npcx7 series, the Timer and Watchdog module (TWD) generates the
clocks and interrupts used for timing periodic functions in the system.
It also provides watchdog reset signal generation in response to a
failure detection.

The CL also includes:
    — Add npcx watchdog device tree declarations.
    — Zephyr watchdog api implementation.
    — Add Watchdog definitions for npcx7 series in
      tests/drivers/watchdog/wdt_basic_api/src/test_wdt.c for
      supporting test suites.

Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
2021-01-15 11:27:10 -05:00
Tim Lin
981166eb8e drivers/i2c: add i2c driver on it8xxx2 platform
This commit is about the it8xxx2 i2c master driver which
includes six SMBus channels. The enhanced channel i2c3,
i2c4, i2c5 are controller which are designed to support
the I2C protocol.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2021-01-15 11:22:57 -05:00
Erwan Gouriou
dc110506d9 drivers/flash: flash_stm32_qspi: Set DMA as optional
In order to ease reuse on other series, set DMA as optional
and use IT if no DMA channel is specified in the qspi node.

Tested on disco_l475_iot1

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-01-15 10:29:30 -05:00
Erwan Gouriou
93ced15ef8 dts/bindings: flash_controller: Add stm32 qspi-nor flash controller
Add a binding to describe stm32 qspi-nor flash controller

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-01-15 10:29:30 -05:00
Erwan Gouriou
afc3f3ae31 dts/bindings: qspi: Add stm32 qspi binding
qspi bus controller bindings for stm32 family.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-01-15 10:29:30 -05:00
Fabio Baltieri
9c67b4dad2 dts: npcx7m6fb: make clock-frequency required, drop redundant fields
Setting clock-frequency as required (the driver does not build without
it) and dropping definitions that are already specified in
i2c-controller.yaml.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2021-01-15 08:32:53 -06:00
Fabio Baltieri
be7b5eb060 dts: cleanup few cases of space before colon
Replace few instances of space before colon in the binding files, not
functional, just for coherency.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2021-01-15 08:32:53 -06:00
Katsuhiro Suzuki
bbc563f5ac boards/dts: riscv: add SiFive FE310 watchdog driver bindings
This patch adds watchdog driver bindings and enable it for SiFive
HiFive1 rev.B board.

Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
2021-01-15 07:19:38 -06:00
Katsuhiro Suzuki
32f23059a2 dts: bindings: add IRQ priority support for SiFive PLIC
This patch adds IRQ priority support for SiFive PLIC by device-tree.
Some IRQ sources of plic use Kconfig to set priority of their IRQ.

- AON: no driver
- I2C, SPI, PWM: not use IRQ
- GPIO, UART: default 1

So this patch specifies IRQ priority 1 for all sources.

Currently these drivers (gpio and uart) do not support that they get
and use IRQ priority from device-tree. We need more patches.

Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
2021-01-14 12:43:58 -06:00
Fabio Baltieri
0b6e77db99 dts: npcx7m6fb: define the port as i2c bus rather than the controller
The npcx7m6fb dts defines i2c controller and ports, where the controller
is a property in the port node definition and the device nodes should be
defined as subnodes of the port.

This changes the binding definitions to reflect that, defining the port
as an i2c-controller so that in can inherit sub-nodes for i2c devices,
and the controller as a generic node.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2021-01-14 08:11:17 -06:00
Peter Bigot
72998f07e6 dts: mtd: refactor JESD216 support
jedec,jesd216.yaml has properties for any memory device that conforms
to the JESD216 specification.  This file at a minimum should be
included in the binding for any driver that interacts with such a
device.

jedec,spi-nor-common.yaml extends jedec,jesd216 with additional
parameters useful for memory devices that are not available from
standard JESD216 parameter tables.  This file may be included instead
of jedec,jesd216.yaml if a driver is able to support additional
functionality related to the extended description.

jedec,spi-nor.yaml remains the binding for the Zephyr SPI_NOR driver
alone.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-13 11:58:37 -06:00
Julien Massot
e396fd77a6 dts: bindings: Add CPU device bindings for Cortex-R7.
This commit adds device bindings for Cortex-R7.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2021-01-13 15:04:43 +01:00
Andrzej Głąbek
203b4c3832 dts: Add binding and nodes representing Nordic ECB peripheral
Add binding for the Nordic ECB (AES electronic codebook mode
encryption) peripheral and corresponding devicetree nodes for
nRF SoCs that feature this peripheral.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-01-13 12:57:13 +01:00
Erwan Gouriou
4c514b39df dts/arm: st: Fix use of "st,mem2mem" dma property
"st,mem2mem" property is supposed to be limited to dma-v1.
Remove its use in dma-v2 components.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-01-11 16:49:39 -05:00
Erwan Gouriou
a214f41992 dts/arm/st: Split "st,stm32-dma" compatible into -v1 and -v2
2 versions of DMA hardware blocks could be found across stm32 series.
In order to simplify the handling of matching Kconfig symbols,
make this visible in dts files by creating "st,stm32-dma-v1" and
"st,stm32-dma-v2" and set them accordingly in dtsi files.

Duplicate and update related bindings to reflect that new state.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-01-11 16:49:39 -05:00
Armando Visconti
34a677d05a drivers/sensor: iis2dlpc: Move power Kconfig property into dts
Move iis2dlpc power-mode option from Kconfigs to Device Tree.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-01-08 09:16:35 -06:00
Armando Visconti
e8bbcb9284 drivers/sensor: iis2dlpc: Move range Kconfig property into dts
Converts iis2dlpc range options (2g, 4g, 8g, 16g) from Kconfigs
to Device Tree.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-01-08 09:16:35 -06:00
Armando Visconti
cb6f665717 dts/bindings: iis2dlpc: create a common st,iis2dlpc-common.yaml
Create a common binding file that will be included by all bindings
handled by iis2dlpc driver. For now this includes optional drdy-gpios
property and it is shared by the i2c and spi version of the driver.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-01-08 09:16:35 -06:00
Frank Li
e80506b754 drivers: video: ov7725: add sensor driver for ov7725
This patch adds the driver for Omnivision OV7725
Color CMOS VGA Sensor.

The driver currently provides a simple capture
function, the output format only provides
RGB565,640x480.

Signed-off-by: Frank Li <lgl88911@163.com>
2021-01-06 08:33:38 -06:00
Daniel Leung
2962d5370d dts: add binding for intel,gna
This adds the binding needed for the Intel GNA neural net
driver.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-01-06 05:59:21 -06:00
Daniel Leung
ab4a1238e3 dts: add a binding for Intel DMIC node
This adds a new binding for Intel Digital PDM Microphone node.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-01-05 12:08:51 -06:00
Fabio Baltieri
3cc5ae6405 drivers: display: add inversion support for ili9xxx displays
Add a new display-inversion property to ili9xxx based display drivers to
send a "Display Inversion ON (0x21)" command during initialization.

This seems to be required for some ILI9xxx based displays to work
correctly, such as BuyDisplay ER-TFT028A2-4 (ILI9341 basd IPS display).

Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
2021-01-04 16:24:06 +01:00
Peter Bigot
0ea3272c2f dts: mtd: add support for a file system table in devicetree
Define a binding for zephyr,fstab which contains multiple child nodes
each of which identifies a file system type and configuration
parameters and associates it with a fixed partition.  The base entry
properties specify the mount point and other generic fs mount options,
while bindings specific to a file system type provide the
configuration parameters necessary to describe the file system.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-12-27 18:16:20 +01:00
Christopher Friedt
c0a2e41a75 gpio: emul: support configurable interrupt capabilities
This change adds support for configurable interrupt capabilities
in the emulated GPIO controller via Devicetree bindings.

Fixes #26477

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2020-12-27 18:15:33 +01:00
Christopher Friedt
724ee49173 gpio: add driver for emulated GPIO
The emulated GPIO controller will aid in automated
integration testing.

Fixes #26477

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2020-12-27 18:15:33 +01:00
Mulin Chao
f3ea7f5819 driver: i2c: add i2c support in npcx series.
The NPCX SMB modules provides full support for a two-wire SMBus/I2C
synchronous serial interface. Each SMBus/I2C interface is a two-wire
serial interface that is compatible with both Intel SMBus and Philips
I2C physical layer. There are 8 SMBus modules and 10 buses in NPCX7
series.

In NPCX7 series, the SMB5 and SMB6 modules contain a two-way switch to
support two separate SMBus/I2C buses (ports) with one SMB module
(controller) Please refer Section 4.7.2 in the datasheet. In order to
support it, this CL seperates the i2c driver into port and controller
drivers. The controller driver is in charge of i2c module operations
and internal state machine. The port driver is in charge of pin-mux
and connection between Zehpyr i2c api interface and controller driver.

All of modules have separate 32-byte transmit FIFO and 32-byte receive
FIFO buffers. These FIFO buffers reduce firmware overhead during long
SMBus transactions by allowing the Core to write or read more than one
data byte at a time to/from the SMB module.

The CL also includes:
— Add npcx i2c port/controller device tree declarations.
— Zephyr i2c api implementation.
— Add "i2c-0" aliases in npcx7m6fb.dts for i2c test suites.

Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
2020-12-27 18:15:14 +01:00
Daniel Leung
7ed6cf09f5 dts: add a binding for Synopsys DesignWare PWM node
This adds a new binding for Synopsys DesignWare PWM controller.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-12-20 13:32:15 -05:00
Kumar Gala
673a81eabb pinmux: Convert drivers to be devicetree based
Convert drivers to use pinmux devicetree node to create pinmux device
object.

On intel S1000 we add 'label' as a required property and set it to
'PINMUX' to match CONFIG_PINMUX_NAME.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-12-19 20:04:23 -05:00
Daniel Leung
87fb2cd645 dts: add binding for intel,cavs-i2s
This adds the binding needed for the Intel CAVS I2S controller.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-12-18 09:29:20 -05:00
Daniel Leung
498e33ed39 dts: bindings: snps,designware-dma to have dma-cells of 1
Currently, the only user of the Designware DMA controller
only needs the channel property. So make dma-cells to be
constant of 1.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-12-18 09:29:20 -05:00
Kumar Gala
09c401fba6 dts: arm: nxp: Add label to pinmux ports for Kinetis SoCs
Add 'label' as a required property for nxp,kinetis-pinmux devices.  In
addition we cleanup the kw2xd node labels for the pinmux devices to
match the SoC docs and use 'port' instead of 'pinmux_'.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-12-18 07:52:52 -06:00
Jedrzej Ciupis
ad47b59e27 dts: complete binding for nRF21540
Apart from the previously added pins, nRF21540's GPIO interface includes
also MODE pin. This commit adds it to the relevant binding.

Signed-off-by: Jedrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2020-12-17 10:28:00 -05:00
Peter Bigot
95068ab2f6 dts: add binding for nrf21540-fem-spi
The nRF21540 radio front-end-module can optionally be controlled by a
SPI interface.  Add a binding and property to link the SPI bus
configuration data to the FEM node.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-12-17 10:28:00 -05:00
Peter Bigot
8ef272a065 dts: move nordic,nrf21540-fem binding to net/wireless
This device is not an ARM MCU, it's a radio front-end module.  Based
on existing Linux practice it belongs in net/wireless.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-12-17 10:28:00 -05:00
Henrik Brix Andersen
66d1bce948 dts: bindings: sensor: add binding for the NXP MCUX ACMP
Add devicetree binding for the NXP MCUX Analog Comparator (ACMP) IP.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-12-17 08:54:33 -06:00
Alexander Wachter
8b6c1bd4b7 drivers: can: Rework can_configure API
The previous API can't change the sampling-point and only allowed
bitrates that fit the time segments.
The new API allows for shifting the sampling-point and adjusts the
number of time quantum in a bit to all more possible bitrates.
The functions to calculate the timings are moved to the can_common file.
They can be used for all drivers.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2020-12-17 11:07:53 +01:00
Cheryl Su
f060540b33 dts: it8xxx2 device tree and binding
This commit is about it8xxx2 platform device tree.
Add driver's binding files, and one device tree as sample.

Signed-off-by: Cheryl Su <cheryl.su@ite.com.tw>
2020-12-16 08:47:36 -05:00
Marcin Niestroj
bc5a6164c9 drivers: pwm: nrf_sw: support generating PWM based on RTC
So far nRF's TIMER was used for generating PWM signal. Add support for
generating PWM based on RTC, which is sourced by 32KHz low frequency
crystal. This allows to use low frequency PWM with much lower power
consumption, because high frequency clock path can be disabled.

Don't support RTC clock prescaler, because maximum 512s period covers
most use cases. This allows to adjust pulse and period cycles to the
fact that CLEAR task event is generated always one LFCLK cycle after
period COMPARE value is reached.

Also update hal_nordic revision, as it contains updated check for PPI
channels conflict when RTC is used to generate PWM.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-12-15 15:19:43 +01:00
Marcin Niestroj
0d58960abb drivers: pwm: nrf_sw: convert to timer phandle instead instance number
So far 'timer-instance' DT property was the way to configure TIMER which
was used for generating PWM signal. Replace that by using 'generator'
phandle, so we get prepared for supporting RTC instances as PWM signal
generator.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-12-15 15:19:43 +01:00
Peter Bigot
ade3ef3ef7 devicetree: fix base power supply-gpios
This should have been a phandle-array since it's a full GPIO specifier
including pin and flags.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-12-15 11:19:26 +01:00
Flavio Ceolin
3ec2cb5cb1 tests: devicetree: Add DT_PROP_BY_PHANDLE_IDX_OR test
Test macro DT_PROP_BY_PHANDLE_IDX_OR. There are two tests, one when
the property exists and other when the property is not set.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-12-09 16:39:33 -05:00
Flavio Ceolin
2ca2a34669 dts: power: Add power states support
Add power state property binding and include this property in cpu.
The pm-state attribute is a enum that matches with enum pm_state right
now the only timing attribute is the minimum residency that is the
minimum time for a power state be worthwhile.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-12-09 16:39:33 -05:00
Mulin Chao
c45e7f3c96 driver: host_uart: Add host-uart device in npcx.
In order to prevent user turns on the pin-mux of devices has io-pads
unexpectedly, this CL added a new device definition for host uart
device. The pin-mux of host uart interface is enabled only if we set its
status as "okay" in dts file of board folder.

The following npcx7 drivers will meet:
1. Default status property of npcx devices with io-pads such as espi,
   pwm, uart, host uart and so on should be "disabled".
2. Switch pin-mux by changing status property to "okay" in dts file of
   board folder.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2020-12-09 00:46:57 -05:00
Tomasz Bursztyka
e7be411d7b dts: Add bindings for Intel VT-D interrupt remapper device
It is put into interrupt controller since it expands some capabilities
of existing interrupt controllers.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-12-08 09:29:20 -05:00
Mulin Chao
a279b4cfb7 drivers: adc: add adc support in npcx7 series
NPCX7 includes a 10-bit resolution Analog-to-Digital Converter (ADC). Up
to 10 voltage inputs can be measured and a internal voltage reference
(VREF), 2.816V (typical) is used for measurement. It can be triggered
automatically in Autoscan mode. Each input channel is assigned a
separate result register, which is updated at the end of the conversion.

The CL also includes:
— Add npcx adc device tree declarations.
— Zephyr adc api implementation.
— Add adc definitions of npcx7 in
  tests/drivers/adc/adc_api/src/test_adc.c for supporting test suites.

Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
2020-12-07 12:11:17 -05:00
Pawel Czarnecki
a9bdf38d03 dts: bindings: clock: add LiteX clock control bindings
This adds bindings for the LiteX clock control driver.

Signed-off-by: Pawel Czarnecki <pczarnecki@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2020-12-06 12:35:16 -05:00
Gerson Fernando Budke
6e38c678af dts: gpio: Add atmel sam4l GPIO bindings
Add required bindings to enable SAM4L GPIO driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-12-02 11:48:43 -06:00
Bilal Wasim
503a70a40a drivers: modem: Add support for quectel bg95
Adding support for Quectel BG95 Modem offloaded driver
to zephyr.

The driver currently implements only the
client side functions of the "socket_op_vtable", and
so cannot be used for cases where Zephyr acts as a
server. Moreover the driver only supports TCP for now.

Looking through the guides, the same driver should be
usable for BG96 (and other modems) except for the modem
boot-up sequence. Hence its named as "bg9x" instead of
"bg95".

Tested extensively with Zephyr acting as MQTT endpoint
and publishing / subscribing data to / from an MQTT
broker.

Signed-off-by: Bilal Wasim <bilalwasim676@gmail.com>
2020-12-01 17:43:59 -05:00
Abhishek Shah
0ffea47bca dts: bindings: pl330: add dma-cells property
Add dma-cells property in pl330 dma binding document.
Currently only one integer cell with "channel" name is
added in order for the client to specify channel id
to be used for data transfer out of available channels.

Signed-off-by: Abhishek Shah <abhishek.shah@broadcom.com>
2020-12-01 14:56:59 -05:00
Gerard Marull-Paretas
e671d363b8 drivers: memc: stm32: initial support for stm32 FMC
This commit adds a new driver category for memory controller
peripherals. There is no API involved for now, as it has not been found
necessary for first implementation.

STM32 Flexible Memory Controller (FMC) is the only controller supported
for now. This peripheral allows to access multiple types of external
memories, e.g. SDRAM, NAND, NOR Flash...

The initial implementation adds support for the SDRAM controller only.
The HAL API is used, so the implementation should be portable to other
STM32 series. It has only been tested on H7 series, so for now it can
only be enabled when working on H7.

Linker facilities have also been added in order to allow applications to
easily define a variable in SDRAM.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-11-24 16:33:17 +01:00
Francois Ramu
da614fccd6 dts: dma : stm32 soc with dmamux has a special offset
The offset value in the dma config is required when the
soc has dmamux like the stm32wb series

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-11-19 17:04:25 -05:00
Jakub Pegza
19a93a3c68 boards: arm: nordic: Update DTS for nrf21540
Update nrf21540 DTS to support FEM configuration and update other pins
according to te board datasheet

Signed-off-by: Jakub Pegza <Jakub.Pegza@nordicsemi.no>
2020-11-19 17:02:00 -05:00
Katsuhiro Suzuki
2b42efeb8e dts/bindings: Add binding for riscv,clint0
Currently there is no binding for RISC-V Core-Local Interruptor.
This patch add a simple binding.

Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
2020-11-19 17:00:46 -05:00
Gerson Fernando Budke
2d3ef0c902 dts: i2c: Add atmel sam TWIM controllers
Add Atmel SAM I2C Two-wire Master Interface (TWIM).  The SAM
i2c controller have specifics regs depending of operation mode
Master/Slave and the bindings are for Master only.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-11-19 10:52:49 -06:00
Henrik Brix Andersen
de53643e56 dts: bindings: add bindings for the Xilinx AXI Timer
Add devicetree bindings for the Xilinx AXI Timer IP. This timer can
either be used as a counter or as a PWM controller.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-11-17 19:30:20 -05:00
Maureen Helm
84cc60e53c drivers: sensor: Convert fxos8700 vector mag Kconfigs to dts properties
Converts fxos8700 magnetic vector magnitude options from Kconfigs to
optional device tree properties.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-11-17 16:51:50 -05:00
Maureen Helm
cb98e9aa11 drivers: sensor: Convert fxos8700 power mode Kconfigs to dts property
Converts fxos8700 power mode options (normal, low noise low power, high
resolution, low power) from Kconfigs to an optional device tree
property.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-11-17 16:51:50 -05:00
Maureen Helm
6199de14c4 drivers: sensor: Convert fxos8700 range Kconfigs to dts property
Converts fxos8700 range options (2g, 4g, 8g mode) from Kconfigs to an
optional device tree property.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-11-17 16:51:50 -05:00
Maureen Helm
d4b9d197f3 drivers: sensor: Convert fxos8700 pulse Kconfigs to dts properties
Converts fxos8700 pulse detection options from Kconfigs to optional
device tree properties.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-11-17 16:51:50 -05:00
Armando Visconti
df2ca14df3 dts/bindings: Fix lis2dh12 and lis3dh
LIS3DH and LIS2DH12 devices share the same driver with
LIS2DH device. So, the bindings are reusing the same
common structure (as LSM30AGR-ACCEL and LSM303DLHC-ACCEL
devices are already doing)

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-11-17 14:44:18 -06:00
Martin Åberg
bf28bbbcec soc: LEON3 SPARC V8 Processor
This is a generic SOC description applicable to common LEON3 systems.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2020-11-13 14:53:55 -08:00
Martin Åberg
bb5a565aaa timer: Add support for GRLIB GPTIMER
This adds support for GRLIB GPTIMER general purpose timer used in
LEON3/4/5 systems.

One of the GPTIMER subtimers is used to generate periodic interrutps
for announcing ticks. Another subtimer is used as upcounter for the
cycle_get_32() service.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2020-11-13 14:53:55 -08:00
Martin Åberg
4888afd793 serial: Add support for GRLIB APBUART
This adds support for the GRLIB APBUART UART peripheral commonly used in
LEON3/4/5 systems.

Driver features:
- Auto-detecting debug FIFO, if configured by GRMON
- Setting and getting UART transfer attributes
- Hardware FIFO if available
- Any number of APBUART devices based on devicetree
- Error status indication
- Polled operation

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2020-11-13 14:53:55 -08:00
Martin Åberg
1a3784d6b7 intc: Add support for GRLIB IRQMP
This adds support for the GRLIB IRQMP interrupt controller commonly used
in LEON3/4/5 systems.

The driver supports the 15 SPARC interrupts and 16 extended interrupts.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2020-11-13 14:53:55 -08:00
Peter Bigot
ae6b236d26 dts: nordic: add CC count to RTC and TIMER nodes
The number of capture/compare registers available on a peripheral
should be exposed in devicetree.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-11-11 13:20:25 +01:00
Armando Visconti
c380142920 drivers/sensor: iis2iclx: add multi-instance
Make this driver multi-instance and use the new API.

Notes for sensorhub mode:
In case of multiples devices it is possible that some of them
has i2c slaves attached to it (sensorhub mode) but not the
others. Since the driver is configured in the same way for
all the instances (CONFIG_SENSORHUB=y), the routine that initialize
the sensorhub part does not fail anymore in case no slaves
are found for a particular instance. Instead, those non-sensorhub
driver instances will set the shub_inited flag to false and
will totally ignore the feature.

Notes for triggers:
In case of multiples devices the device pin the interrupt wire is
attached to can be different (INT1 or INT2 pin). So, this
information has been moved in DTS and then stored in the
specific instance config structure.
Currently the driver is able to handle a sngle interrupt line
at a time attached to either INT1 or INT2.
MOreover, the interrupt initialization for a driver instance proceed
only if the drdy has been configured in its DT, else it returns ok.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-11-11 13:17:18 +01:00
Gerard Marull-Paretas
4812bb5175 drivers: display: ili9xxx: add support for ILI9488 controller
Add support for the ILI9488 display controller.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-11-10 15:52:12 -06:00
Gerard Marull-Paretas
acb0cd65ca drivers: display: ili9xxx: generalize ILI display driver
Make driver generic for multiple ILI displays. The adopted strategy is
to share all driver code except register initialization, which has been
found to have some specific registers/values depending on the
controller.

The driver has been adjusted to support multiple compatibles.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-11-10 15:52:12 -06:00
Gerson Fernando Budke
d8c9cb8d89 drivers: wifi: eswifi: Add uart bus interface
Add uart bus interface to extended esWIFI driver.  This enables all
Inventek modules with IWIN AT Commands firmware.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2020-11-03 11:05:43 +01:00
Martí Bolívar
5d74da4681 dts: update vendor-prefixes.txt
Make the formatting consistent and add a missing prefix we are using.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-11-02 14:26:33 -05:00
Gerard Marull-Paretas
c8687bc2e4 drivers: ethernet: stm32: add support for DT pinctrl
Add support for configuring Ethernet pins using DT pinctrl entries. Note
that F1 series pinctrl support is not handled as the driver does not
support F1.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-10-30 15:54:13 +01:00
Andreas Dröscher
a812f3d7b6 adc-mcux: add support for adc16 channel multiplex
Channels 4..7 are multiplexed on adc16. The NXP HAL exposes
ADC16_SetChannelMuxMode but this function is not yet included
in Zephy. The following patch adds channel-mux-b to the dts
enabling the use of the alternate channels of 16 bit adc.

Signed-off-by: Andreas Dröscher <github@anticat.ch>
2020-10-29 13:43:24 -05:00
Erwan Gouriou
4c9925bcd3 dts/bindings/mmc: stm32: Add pinctrl-0 support
Update binding to support pinctrl-0 property.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-29 09:21:27 +01:00
Erwan Gouriou
9f6ffccda3 dts/bindings/i2s: stm32: Add pinctrl-0 property
Aim is to enable dt based pinctrl on stm32 i2s driver

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-28 09:29:56 -05:00
Peter A. Bigot
f951566e56 drivers: regulator: add GPIO-controlled regulator driver
This provides structure for the regulator device hierarchy and a
driver for GPIO-controlled regulators along with its binding.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-10-28 15:22:53 +01:00
Peter A. Bigot
b7639551ee drivers: add infrastructure for regulator devices
This PR follows Linux in defining devicetree content for generic
voltage and current regulators, and an initial driver API for
controlling them.

A regulator itself may depend on a power source, so it needs to
support the properties that enable that power source.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-10-28 15:22:53 +01:00
Peter Bigot
6d3859aece devicetree: add properties for power supply control
Provide a common set of properties for various ways of controlling
power:
* supply-gpios for a GPIO specifier acting like a switch
* vin-supply for a reference to a regulator device

Document the behavior expected when these properties are present.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-10-28 15:22:53 +01:00
Kumar Gala
8a8d38e054 dts: bindings: Fix duplicate description in STM32 DMA bindings
The DMA bindings had duplicate description: keys.  Merge the two
descriptions into one to fix the issue.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-10-27 07:56:20 -05:00
Kumar Gala
e5eeb9d2f8 dts: bindings: test: Update vnd,serial to not require interrupts
We aren't using vnd,serial for anything currently.  Remove requiring
interrurpts property as that requirement isn't needed.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-10-23 08:53:38 -05:00
Kumar Gala
033d82460a dts: bindings: Fix some YAML issues
Fix a few duplicated key issues in a small handful of binding files.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-10-23 08:02:19 -05:00
Bent Ove Stinessen
72d5dee2e3 drivers: gpio_pca95xx: Add GPIO driver enable interrupt support
Allows the use of pin interrupt and callbacks for pca95xx family
GPIO expander chips with an interrupt line.

Enable config flag and define a gpio pin for the expander interrupt-
line (INT) in devicetree and the driver will accept pin interrupt
configurations for the expander gpio pins.

Level triggering is supported through emulation.
A worker is used to avoid waiting for I2C in ISR.

Example devicetree node:
	gpioext0: tca9539@77 {
		compatible = "nxp,pca95xx";
		label = "GPIO_EXT_0";
		reg = <0x77>;
		interrupt-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
		gpio-controller;
		#gpio-cells = <2>;
		ngpios = <16>;
	};

Fixes: #27561

Signed-off-by: Bent Ove Stinessen <bent@norbit.no>
2020-10-23 13:47:41 +02:00
Crist Xu
237b34ef2d watchdog: Add watchdog driver
Add watchdog driver for the RT1050/60

Signed-off-by: Crist Xu <crist.xu@nxp.com>
2020-10-23 12:52:13 +02:00
Erwan Gouriou
c586f84602 dts/bindings/usb: Add pinctrl-0 property to STM32 USB bindings
Add pinctrl-0 prop to enable support of USB pinctrl in STM32
USB driver.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-22 10:34:14 -05:00
Kumar Gala
a8a92ce592 dts: rename altera binding files
In fixing up the altera vendor prefix, we forgot to rename the binding
files to match the compatible.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-10-21 13:13:27 -05:00
Kumar Gala
2a4d3bb6f2 dts: Fix altera vendor prefix
There are a few cases in which "altera" was used instead of "altr" as
the vendor prefix.  Update DTS and bindings in those cases to use "altr"

Fixes #29373

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-10-21 12:48:34 -04:00
Peter Bigot
7d89cf2e0a dts: nordic,qspi-nor: correct opcode for fastread
The opcode is 0x0B not 0x08.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-10-21 17:53:51 +02:00
Gerson Fernando Budke
ea54b00f4c dts: hwinfo: Add cypress psoc6 unique serial id
Add Cypress PSoC-6 hwinfo bindings to get unique 88 bits serial id.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2020-10-21 07:20:13 -05:00
Mulin Chao
173704859a dts: npcx7: rename pinctrl property to pinctrl-0
rename 'pinctrl' property to 'pinctrl-0' in device-tree files

Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
2020-10-21 06:33:20 -05:00
Mahesh Mahadevan
451e7b862a dts: Update NXP LPC DMA configuration to get channel number
The DMA channel number used for the DMA transfer can now
be specified from the device tree config files

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2020-10-21 06:26:40 -05:00
Marcin Niestroj
668cbe19a3 drivers: wifi: esp: support power-gpios to enable ESP module
Add power-gpios device-tree binding property to power on module before
communicating with it. This pin is called CHIP_PU in case of ESP32{,-S2}
and CHIP_EN in case of ESP8266. Dedicated reset pin is available only on
the latter, however Espressif recommends (in ESP8266 Hardware Design
Guidelines) to use CHIP_EN instead. Follow those recommendations and use
power-gpios to reset chip if that is provided over device-tree.

Configure power-gpios and reset-gpios as inactive by default, so that
chip becomes ready after executing esp_reset() function, either if one
or both are provided over device-tree.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-10-20 07:32:01 -05:00
Marcin Niestroj
2e648d4872 drivers: wifi: esp: rename wifi-reset-gpios to reset-gpios
Most DT bindings use reset-gpios name when there is a pin to reset whole
chip. Rename wifi-reset-gpios to reset-gpios to be more consistent
between various drivers. Additionally this prevents confusion, as
somebody might think that this pin resets only WiFi, which is not true.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-10-20 07:32:01 -05:00
Erwan Gouriou
d4e390ce63 drivers/spi: stm32: Convert to devicetree pinctrl generation
Convert STM32 SPI driver to device pinctrl configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-19 10:24:01 -05:00
Mahesh Mahadevan
c2a40a8c66 dts: Clock control for RT600, LPC54xxx, LPC55xxx
Use the clock control driver to get flexcomm clock
frequency

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2020-10-15 11:17:24 -05:00
Armando Visconti
1921a2d84e drivers/sensor: add support to IIS2ICLX accelerometer
The IIS2ICLX is a high-accuracy. ultra-low noise, low-power
two-axis linear accelerometer which can be interfaced through
either I2C or SPI bus.
Its high accuracy, stability over temperature and repeatability
make IIS2ICLX particularly suitable for inclination measurement
for industrial applications (inclinometers).

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

This driver is based on stmemsc i/f v1.03.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-10-15 09:57:47 -05:00
Kumar Gala
c22e34397e drivers: serial: stm32: set default parity in driver
Have the driver default to UART_CFG_PARITY_NONE if no parity property
exists rather than using default in binding.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-10-15 04:01:22 -05:00
Martin Jäger
72d395a897 drivers: adc: stm32: add support for pinmux
Add support for DT based pinmux configurations.

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-10-14 07:15:12 -05:00
Martin Jäger
109a624c85 drivers: can: stm32: add support for pinmux
Add support for DT based pinmux configurations.

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-10-13 13:13:08 +02:00
Toby Firth
dc37f988e0 drivers: adc: added support adc driver for lpcexpresso55s69
Added shim driver for the LPADC for lpcexpresso55s69 board.

Fixes #22703.

Signed-off-by: Toby Firth <tobyjfirth@gmail.com>
2020-10-12 14:59:40 -05:00
Martin Jäger
1de10bdb9b drivers: dac: stm32: add support for pinmux
Add support for DT based pinmux configurations.

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-10-12 08:49:36 -05:00
Erwan Gouriou
b38d84fef4 drivers/i2c: stm32: Add pinctrl configuration at driver init
Convert driver to pcintrl configuration using pcintrl helper
macros.
Pinctrl init sequence has to be done before bus_mutex initialization.

Driver dts bindings are updated to reflect usage of pinctrl-x
properties

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-09 11:52:59 +02:00
Kumar Gala
4d60b75588 sensor: vcnl4040: Update dts binding for defaults
* Add comments about the default settings
* Change proximity-trigger default to match POR of 'disabled'
* Added reference to datasheet

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-10-09 11:48:12 +02:00
Kumar Gala
11966e599e dts/bindings: Update gpio-controller to add additionl properties
Add gpio-reserved-ranges & gpio-line-names properties.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Co-authored-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2020-10-07 14:33:27 -05:00
Kumar Gala
6b3529d24e dts/bindings: Update gpio-controller to clarify ngpios
Provide more docs on ngpios and try and clarify the case if there are
holes in the GPIO slot range how ngpios should work.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-10-07 14:33:27 -05:00
Gerard Marull-Paretas
af1b9442ca drivers: pwm: stm32: add support for pinmux
Add support for DT based pinmux configurations.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-10-07 12:27:37 -05:00
Mulin Chao
dd99fbebe6 drivers: pwm: add pwm driver support in NPCX7 series
In npcx7 series, there're 8 Pulse Width Modulator (PWM) modules and each
one support generating a single 16-bit PWM output. A 16-bit clock
prescaler (PRSCn) and a 16-bit counter (CTRn) determine the cycle time,
the minimal possible pulse width, and the duty-cycle steps.

Beside introducing pwm driver for Nuvoton NPCX series, this CL also
includes:

1. Add PWM device tree declarations.
2. Zephyr PWM api implementation.
3. Add aliases in npcx7m6fb_evb board device tree file for supporting
   samples/basic/blinky_pwm application and pwm test suites

Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
2020-10-06 18:16:02 -05:00
Erwin Rol
eb54f86755 boards: arm: Add support for SEGGER TRB STM32F407
Add support for the STM32F407 based SEGGER Trace Reference Board.

Signed-off-by: Erwin Rol <erwin@erwinrol.com>
2020-10-06 12:17:26 -04:00
Simon Glass
a1d8e55cad emul: spi: Add support for SPI emulators
Add an emulation controller which routes SPI traffic to an attached
emulator. Only one emulator is supported per bus at present, since
chip-selction functionality is not present.

This allows drivers for SPI peripherals to be tested on systems that
don't have that peripheral attached, with the emulator handling the SPI
traffic.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-10-05 15:33:00 -04:00
Erwan Gouriou
c3eef7744a include/devicetree.h: Add DT_ENUM_IDX_OR macro
In case a "required: False" enum binding doesn't mention a
default value, but a default value makes sense to be set in the code,
DT_ENUM_IDX_OR could be used to provide the default idx to be used.

New macro comes with appropriate tests.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-05 10:15:32 -05:00
Erwan Gouriou
c82bd74237 dts/bindings/pinctrl: Remove usage of c comments within bindings
Reused Linux bindings were using /*  */ in some property description
fields.
This is not compatible with legacy device tree api which expands
these fields in commented sections of generated file
devicetree_legacy_unfixed.h resulting in compilation issue.
Seen when running tests/lib/devicetree/legacy_api.

Remove /* */ for now, waiting legacy api to be removed.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-02 08:36:26 -05:00
Henrik Brix Andersen
0e7a76e462 dts: bindings: move io-channels and io-channel-names to base.yaml
Generalize io-channels and io-channel-names devicetree node properties
and move their definitions to base.yaml. Keep binding specific
description where relevant.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-10-02 11:50:30 +02:00
Kumar Gala
8ddd7f0f23 drivers: sensors: itds: Remove dts defaults
We should not be using defaults for enum properties, this should be
required: true instead.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-10-02 11:46:57 +02:00
Parthiban Nallathambi
c2ee9f5c3e drivers: eth: add driver for w5500 Ethernet Controller
Add driver for w5500 Ethernet Controller

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2020-10-02 11:34:57 +02:00
Marco Peter
03f256505c drivers: ssd1306: Add SPI support
This change allows to use SSD1306 based displays to be used on the
SPI bus as well.
Adding SPI shield.
Tested on SSD1306 and SSD1309 based displays using I2C.
Tested on SSD1309 based display using SPI.

Signed-off-by: Marco Peter <marco@peter-net.ch>
2020-10-02 11:33:26 +02:00
Mulin Chao
99c208f36a soc: npcx7: add comments for macro funcs used for device tree files.
This CL adds more comments for each macro functions used for device tree
file for better explanations. It also changes all hex values in soc.c to
lower case.

Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
2020-10-02 11:33:15 +02:00
Mulin Chao
e42a3a5a96 drivers: espi: add host sub-modules support for NPCX7 series.
This CL contains the drivers of NPCX Host Sub-Modules that serve as an
interface between the Host and Core domains. For most of them, the Host
can configure these modules via eSPI(Peripheral Channel)/LPC by
accessing 'Configuration and Control register Set' which IO base address
is 0x4E as default. And the interrupts in core domain help handling any
events from host side.

In this commit, we introduced six host sub-modules. It includes:
 1. Keyboard and Mouse Controller (KBC) interface.
 2. Power Management (PM) channels.
 3. Shared Memory mechanism (SHM).
 4. Core Access to Host Modules (C2H).
 5. Mobile System Wake-Up functions (MSWC).
 6. Serial Port (Legacy UART)

The tasks in application layer such as 8042, ACPI and host command can
cooperation with this driver by connecting api or callback functions.

Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
2020-10-02 11:33:15 +02:00
Mulin Chao
be217e4a3a drivers: eSPI: add eSPI driver support for NPCX7 series.
In npcx7 series, all of them support the Intel Enhanced Serial
Peripheral Interface (eSPI) Revision 1.0. This specification provides a
path for migrating host sub-devices via LPC to a lower pin count, higher
bandwidth bus. In addition to Host communication via the peripheral
channel, it provides virtual wires support, out-of-band communication,
and device mastering option over the Chipset SPI flash.

Becisdes introducing eSPI device in npcx7, this CL also includes:

1. Add eSPI device tree declarations.
2. Add npcx7-espi-vws-map.dtsi to present the relationship between eSPI
   Virtual-Wire signals, eSPI registers, and wake-up input sources.
3. Zephyr eSPI api implementation.
4, Add OOB (Out of Band tunneled SMBus) support.
5. Add configuration files for eSPI test suites.

Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
2020-10-02 11:33:15 +02:00
Erwan Gouriou
c534bbaafa dts/bindings: Add yaml binding for st,stm32f1-pinctrl
Provide yaml bindings for st,stm32f1-pinctrl copmpatible.
It differs from generic stm32 pinctrl bindings on the following points:
- Pinmux "function" parameter: Alternate, General output, Input, Analog
- Pinmux supports an additional "remap" parameter to encode potential
remapping configuration
- Bias configs only apply to input modes
- Drive and speed configs only apply to output modes

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 11:08:42 -05:00
Erwan Gouriou
252a623ca2 drivers/serial: stm32: Enable use of dt pinctrl as serial signals
When available, use dt pinctrl to configure a variable number of
serial signals.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 11:08:42 -05:00
Erwan Gouriou
14be1f3cd7 dts/bindings: stm32: provide st,stm32-pinctrl binding
Remove unused st,stm32-pinmux binding.
Provide st,stm32-pinctrl binding, equivalent to Linux stm32 one.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 11:08:42 -05:00
Marcin Niestroj
c083548f80 drivers: wifi: esp: support reconfiguration of UART baudrate
Allow to reconfigure UART baudrate on ESP and on host MCU, so a
non-default baudrate can be used for communication. This option helps
for example to increase network bandwidth without touching ESP chip
firmware.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-09-30 17:05:22 +03:00
Gerard Marull-Paretas
afc63664f2 drivers: display: ili9340: move display function control to DT
Move display function control (DISCTRL) register settings to DT.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-09-29 14:18:05 -05:00
Gerard Marull-Paretas
6a76ae82c0 drivers: display: ili9340: move frame rate control register to DT
Move FRMCTR1 register settings to DT.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-09-29 14:18:05 -05:00
Gerard Marull-Paretas
4895620eb0 drivers: display: ili9340: move VCOM parameters to DT
Move VCOM control 1/2 register values to DT.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-09-29 14:18:05 -05:00
Gerard Marull-Paretas
a1ce0c851d drivers: display: ili9340: move gamma parameters to DT
Move gamma curve and correction registers GAMSET, PGAMCTRL and NGAMCTRL
to DT.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-09-29 14:18:05 -05:00
Gerard Marull-Paretas
c02e50a09d drivers: display: ili9340: add support for pwctrl in DT
Add support for setting PWRCTRL1/2 registers via DT.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-09-29 14:18:05 -05:00
Gerard Marull-Paretas
8593959ccf drivers: display: ili9340: add support for rotation
Add support for setting display rotation (0, 90, 180 and 270) using
DeviceTree.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-09-29 14:18:05 -05:00
Gerard Marull-Paretas
347e0f2bdc drivers: display: ili9340: add support for configuring pixel format
Move pixel format setting (RGB565/RGB888) to DeviceTree. Add support for
changing pixel format at runtime.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-09-29 14:18:05 -05:00
Nicolai Glud
bc72b67a5d dts: clocks: kinetis: set pllfll and er32k clock settings from dts
Setup osc clock settings from dts.

Signed-off-by: Nicolai Glud <nicolai.glud@prevas.dk>
2020-09-29 14:05:50 -05:00
Henrik Brix Andersen
6e959d0fe3 dts: bindings: move ADC devicetree bindings 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: Henrik Brix Andersen <hebad@vestas.com>
2020-09-28 09:46:40 -05:00
Ryan Erickson
1faeab4d54 boards: add Pinnacle 100 DVK
Add Laird Connectivity Pinnacle 100 modem.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-09-16 14:21:41 -05:00
Ryan Erickson
5ac21bd604 drivers: modem: hl7800: fix dts binding
Fix hl7800 vendor prefix to match existing Sierra Wireless entry.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-09-16 14:21:41 -05:00
Gerson Fernando Budke
4e1d6af8f8 dts: hwinfo: Add atmel sam4l unique serial number
Add ATMEL SAM4L hwinfo bindings to get unique 120 bits serial number.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-09-04 16:29:19 -05:00
Jett Rink
703fe86220 ec_host_cmd_periph: add device API
The host command peripheral device API abstracts how an embedded
controller sends and receives data from a host on a bus. Each bus like
eSPI, SPI, or I2C would implement their own host command peripheral
device. Each hardware device would then handle the necessary hardware
access to send and receive data over that bus.

The chosen host command peripheral device will be used by the host
command handler framework to send and receive host data correctly.

Signed-off-by: Jett Rink <jettrink@google.com>
2020-09-04 14:50:45 -04:00
Jan Kowalewski
ff0ff464b9 dts: add EOS S3 devicetree
Add basic devicetree for EOS S3 SoCs.

Signed-off-by: Jan Kowalewski <jkowalewski@antmicro.com>
2020-09-04 14:48:49 -04:00
Richard Osterloh
0a0026afe2 drivers: sensor: Add VCNL4040 driver
Add support for Vishay VCNL4040 proximity and light sensor

Signed-off-by: Richard Osterloh <richard.osterloh@gmail.com>
2020-09-04 13:03:12 -05:00
Andrei Emeltchenko
2c7aa82509 dts: Add binding for IPM console
Add IPM console DTS binding.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-09-04 07:55:52 -04:00
Andreas Sandberg
78cc7df60c drivers: lora: sx126x: Support software-managed RF switches
The SX126x supports using DIO2 to control an TX switch, but only if
the switch can be operated using a single control signal. Add support
for RF switches that are wired to a GPIO instead of the radio chip
itself. This makes it possible to use RF switches that require two
control signals (one for the RX port and one for the TX port) by
wiring them to two GPIOs on the MCU.

Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
2020-09-04 12:36:53 +02:00
Marin Jurjevic
5b7c008781 drivers: flash: Add sector-size property to at45.yaml
Add sector-size property to at45.yaml binding.
Different at45 flash memories have different sector sizes.

Signed-off-by: Marin Jurjevic <marin.jurjevic@hotmail.com>
2020-09-04 11:58:22 +02:00
Kumar Gala
e4dd77ed72 soc: arm: atmel_sam: Add support for pinctrl flags
Add devicetree support to specify bias-pull-up, bias-pull-down, and
drive-open-drain for pin configuration.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-09-03 18:09:24 -05:00
Jordan Yates
3e33d73381 drivers: serial: uart_rtt converted to devicetree
Instantiate RTT UART instances from devicetree nodes instead of from
Kconfig symbols. While RTT is implemented using software, not hardware,
it is emulating a hardware device, and thus should be configured through
devicetree. This allows the simulated UART device to be selected via
devicetree aliases and chosen nodes.

The following devicetree snippet will instantiate RTT channels 0 and 2
as UART devices.
```
/ {
	rtt0: rtt_terminal {
		compatible = "segger,rtt-uart";
		label = "rtt_terminal";
		status = "okay";
	};

	rtt2: rtt_secondary {
		compatible = "segger,rtt-uart";
		label = "rtt_app_specific";
		status = "okay";
	};
};
```

Fixes the RTT portion of #10621.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2020-09-03 21:51:28 +02:00
Simon Glass
49f2167974 emul: i2c: Add support for I2C emulators
Add an emulation controller which routes I2C traffic to attached
emulators depending on the I2C address selected. This allows drivers
for I2C peripherals to be tested on systems that don't have that
peripheral attached, with the emulator handling the I2C traffic.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-09-01 14:30:46 -04:00
Mulin Chao
288e35ab1a driver: uart: add wake-up support for uart device.
This CL configures the UART wake-up event triggered from a falling edge
(START condition) on CR_SIN pin. It also includes:

1. Introduce wui_maps property in yaml file to present relationship
   between Wake-Up Input (WUI) and UART device.
2. Implement wake-up mechanism by MIWU api functions.

Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
2020-09-01 13:35:25 +02:00
Mulin Chao
6deb68a517 driver: gpio: add gpio driver support in NPCX series
Add gpio support for Nuvoton NPCX series. This CL includes:

1. Add GPIO device tree declarations.
2. Introduce wui_maps property in yaml file to present relationship
   between Wake-Up
   Input (WUI) and 8 IOs belong to the device.
3. Zephyr GPIO api implementation.
4. GPIO callback functions implementation with MIWU api functions.
5. Overlay file for gpio basic tests

Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
2020-09-01 13:35:25 +02:00
Mulin Chao
84d90e456a driver: intc: add MIWU driver support in NPCX series.
The device Multi-Input Wake-Up Unit (MIWU) supports the embedded
controller (EC) to exit 'Sleep' or 'Deep Sleep' power state which allows
chip has better power consumption. Also, it provides signal conditioning
such as 'Level' and 'Edge' trigger type and grouping of external
interrupt sources of NVIC. The NPCX series has three identical MIWU
modules: MIWU0, MIWU1, MIWU2. Together, they support a total of over 140
internal and/or external wake-up sources.

In this CL, we use device tree files to present the relationship bewteen
MIWU and the other devices in different npcx series. For npcx7 series,
it include:
1. npcx7-miwus-int-map.dtsi: it presents relationship between MIWU group
   and NVIC interrupt in npcx7. Please notice it isn't 1-to-1 mapping.
2. npcx7-miwus-wui-map.dtsi: it presents relationship between input of
   MIWU and its source device such as gpio, timer, eSPI VWs and so on.

This CL also includes:
1. Add MIWU device tree declarations.
2. MIWU api function declarations and implementation to configure signal
   conditions and callback function mechanism. They can be be classified
   into two types. One is for GPIO which connects original gpio callback
   implemetation and the other is for generic devices such as timer,
   eSPI, and so on.

Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
2020-09-01 13:35:25 +02:00
Ryan Erickson
eca8842b67 drivers: modem: add Sierra Wireless HL7800 Modem Driver
The driver utilizes the CONFIG_NET_OFFLOAD setting to avoid the
normal handling of IP packets, and instead uses a socket-like
UART interface to handle incoming and outgoing data via AT commands.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-08-31 10:46:33 +02:00
Mahesh Mahadevan
f75f8bec20 MXRT600: Add DMA support
Add DMA support for MCUX LPC SoC's

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2020-08-28 14:24:21 -05:00
Maxime Bittan
808e9b1d58 boards: arm: faze: add ASM2364 node
This commit adds a node for the ASMedia 2364 controller that acts as an
I2C master on the I2C0 bus. This node contains the GPIO used by the MCU
to notify the ASM2364 that data are available to read.

Signed-off-by: Maxime Bittan <maxime.bittan@seagate.com>
2020-08-28 16:36:19 +02:00
Simon Guinot
4f591e5a8a dts: add binding for TI LP503x LED controllers
This patch adds a DTS binding for the Texas Instruments LP5030 and
LP5036 I2C LED controllers. They are respectively providing up to 30
and 36 channels (i.e. 10 or 12 RGB LEDs).

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2020-08-28 15:04:35 +02:00
Simon Guinot
9d729acc37 dts: introduce binding for LED controllers
The led-controller DT binding gathers some common properties for LED
controllers and for the LED child nodes.

One notable property is "color-mapping" which allows to define a channel
to color mapping for multicolor LEDs.

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
Signed-off-by: Maxime Bittan <maxime.bittan@seagate.com>
2020-08-28 15:04:35 +02:00
Laurent Meunier
ea491b3a9f dts: bindings: Add optional timings capability
By default the I2C timing (I2C_TIMINGR register) of I2C V2 peripheral is
computed depending on clocks at runtime with relatively low precision.

This optional property allows to provide a list of pre-computed values
(typically computed from STM32CubeMX SW tool) instead of using runtime
algorithm.

The precomputed value is only valid for a given clock configuration and
I2C speed setting, so this valid configuration is provided with each
value entry.

Signed-off-by: Laurent Meunier <laurent.meunier@st.com>
2020-08-28 11:36:58 +02:00
Peter Bigot
77aa89bcb5 drivers: flash: remove W25QXXDV driver
The spi_flash_w25qxxdv driver has been superseded by the generic
spi_nor driver for over a year.  The only non-refactoring change to
the W25Q driver in the last 18 months was done to support a backport
to 1.14.

All devices supported by spi_flash_w25qxxdv driver are expected to be
supported by the spi_nor driver, using the standard `jedec,spi-nor`
devicetree compatible.  No in-tree devicetree files make use of this
driver.

Remove the confusion about which driver to select by removing the
unmaintained redundant driver.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-27 17:39:21 +02:00
Pawel Sagan
cc30fb871b drivers: i2s: Add LiteX I2S controller driver
This introduces LiteX I2S driver supporting the following features:
    - 8,16,24,32 bit sample width,
    - mono/stereo sound,
    - different sample frequencies
    - big/little-endian data format,
    - concatenated channels mode (for selected sample widths only),
    - slave/master mode operation.

Signed-off-by: Pawel Sagan <psagan@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2020-08-26 08:17:42 -04:00
Henrik Brix Andersen
c9de28d5e4 dts: bindings: add Xilinx Quad SPI devicetree binding
Add devicetree binding for the Xilinx Quad SPI v3.2 IP.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-08-26 12:32:27 +02:00
Kwon Tae-young
2aeed81202 drivers: dac: Added driver for TI DACx0508
TI's DACx0508 is a DAC chip that supports SPI.
Gain and Reference can be set through the register.

Signed-off-by: Kwon Tae-young <tykwon@m2i.co.kr>
2020-08-26 12:24:43 +02:00
Jamie McCrae
4cf1832fa8 drivers: sensors: sm351lt: Add new driver
Adds sm351lt magnetoresitive sensor driver.

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2020-08-24 16:48:47 -05:00
Peter Bigot
c789ea87ef dts: nordic,nrf-twim: rename non-hardware property
As a general rule devicetree properties should correspond to hardware
description or configuration.  In cases where a Zephyr driver receives
instance-specific configuration data from a devicetree property that
property should be marked as being Zephyr-specific.  Rename
concat-buf-size to zephyr,concat-buf-size to follow this guideline.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-24 16:35:29 -05:00
Peter Bigot
afdb98a4a9 drivers: i2c_nrfx_twim: restore previous behavior without concat buffer
The Nordic TWIM peripheral generates a start condition for each bus
transaction.  Devices such as the SSD1306 display and some NXP sensors
can only tolerate the presence of a start condition and device address
after a stop condition.  Those devices will not operate correctly when
these signals are observed while the bus is already active.  This
motivated the addition of a RAM buffer into which message fragments
could be collected so TWIM can transmit them without injecting
unnecessary start conditions.

However many I2C devices interpret these signals as a repeated start
and ignore them and so function properly without a buffer
concatenating the message fragments.

There is no default for the concat-buf-size property, and the previous
strict requirement for one when performing scatter/gather I/O
transactions broke working drivers for devices that tolerate the
repeated starts.  Allow those drivers to work by respecting the
property description and attempting to concatenate messages only if a
buffer in which to place them has been provided.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-24 16:35:29 -05:00
Andrei Emeltchenko
198709245f dts: Add intel ADSP mailbox bindings
Add bindings for ADSP mailbox.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-08-24 13:38:33 -04:00
Hake Huang
7fb938710b dts: add pit as counter
add dts for kinetis pit counter driver

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2020-08-21 14:27:59 -05:00
Timo Dammes
751efe1f6d drivers: uart_gecko: added support for hardware flow control
Added support for hardware flow control in EFM32 UART driver.

Signed-off-by: Timo Dammes <timo.dammes@lemonbeat.com>
Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
2020-08-19 11:33:39 -05:00
Peter A. Bigot
810920f8d5 drivers: flash: spi_nor: read erase support and page size from SFDP
Use the new SFDP infrastructure to read the supported erase type sizes
and commands from the Basic Flash Parameters block.  This removes the
need for explicit reference to most block sizes from this driver.

We're also seeing devices where the page size is not 256 bytes.
Accommodate them.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-08-17 13:38:14 -04:00
Peter A. Bigot
d316f9d907 dts: mtd: jedec,spi-nor-common: make some properties optional
With SFDP support we no longer need to get the JEDEC ID or device size
from devicetree.  Make them optional in drivers that have been
converted to support SFDP.  When runtime SFDP is not enabled the
presence of the required properties will be verified at build-time.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-08-17 13:38:14 -04:00
Peter A. Bigot
d213706e99 dts: mtd: jedec,spi-nor: support SFDP Basic Flash Parameters
Allow the devicetree binding for a jedec,spi-nor device to provide the
device capabilities by encoding the Serial Flash Discoverable
Parameters Basic Flash Parameters table in the devicetree node.  This
supports applications where a specific flash device will be used and
runtime discovery of device capabilities is not desired.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-08-17 13:38:14 -04:00
Manivannan Sadhasivam
0533d4eae1 drivers: serial: Add NXP IUART driver
Add IUART driver based on MCUX SDK. This driver is used to provide
serial console support on i.MX8M Mini SoC.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2020-08-14 14:51:50 -05:00
Henrik Brix Andersen
d8b5a81c67 dts: bindings: gpio: add bindings for Xilinx AXI GPIO IP
Add devicetree bindings for the Xilinx AXI GPIO v2 IP. This GPIO
controller has an optional "GPIO2" port, which is not always present.

The Xilinx specific devicetree property names and their meaning match a
subset of what can automatically be generated based on the FPGA logic
design using https://github.com/Xilinx/device-tree-xlnx. These
properties are also used by the Linux kernel.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-08-14 13:35:39 -05:00
Henrik Brix Andersen
a3758eceae dts: bindings: serial: add devicetree binding for the Xilinx UART Lite IP
Add devicetree binding for the Xilinx UART Lite IP.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-08-14 13:35:39 -05:00
Henrik Brix Andersen
8c8d2d4b40 dts: bindings: arm: itcm: add devicetree binding the ARM ITCM
Add devicetree binding for the ARM Cortex-M Instruction Tightly Coupled
Memory (ITCM).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-08-14 13:35:39 -05:00
Henrik Brix Andersen
12205abd53 dts: bindings: arm: dtcm: ARM DTCM is not Cortex-M7 specific
Change the documentation for the arm,dtcm (Data Tightly Coupled Memory)
to reflect that it is not specific to the Cortex-M7 (but also present
on e.g. the Cortex-M1).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-08-14 13:35:39 -05:00
Henrik Brix Andersen
661f2d49f2 dts: bindings: add devicetree binding for the ARM Cortex-M1 CPU
Add devicetree binding for the ARM Cortex-M1 CPU.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-08-14 13:35:39 -05:00
Mulin Chao
1162747574 driver: serial: Add UART support in NPCX series.
Add UART support for Nuvoton NPCX series. This CL includes:

1. Add UART controller device tree declarations.
2. UART controller driver implementation.

Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
2020-08-13 16:42:20 +02:00
Mulin Chao
9cb73abbdc driver: pinctrl: Add pin control support in NPCX series.
Add pin controller support for Nuvoton NPCX series
Add pin-mux controller support for Nuvoton NPCX series.

This CL includes:
1. Add pin controller device tree declarations and introduce alt-cells
   to select pads' functionality.
2. Add npcx7-alts-map.dtsi since the mapping between IO and controller
   is irregular and vary in each chip series.
3. Add nuvoton,npcx-pinctrl-def.yaml and its declarations to change all
   pads' functionality to GPIO by default.
4. Pinmux controller driver implementation.

Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
2020-08-13 16:42:20 +02:00
Mulin Chao
0245a27bc5 driver: clock: Add clock controller support in NPCX series.
Add clock controller support for Nuvoton NPCX series. This CL includes:

1. Add clock controller device tree declarations.
2. Introduce clock-cells in yaml file clock tree to get module's source
clock and turn off/on the its clock
3. Clock controller driver implementation.

Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
2020-08-13 16:42:20 +02:00
Gerard Marull-Paretas
ca9dce0d7d drivers: kscan: generalize and improve FT5336 driver
The FT5336 driver has been improved and generalized so that multiple
Focaltech touch controllers can be supported using the same single
driver. According to specifications the following list of controller
variants should be supported: FT5x06, FT5606, FT5x16, FT6x06, Ft6x36,
FT5x06i, FT5336, FT3316, FT5436i, FT5336i and FT5x46.

Tested using ER-TFTM028-4 display module (FT6X06).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-08-12 12:35:04 +02:00
Steven Lemaire
fc64f2c522 drivers: watchdog: gecko: Add support for Gecko Series 2 SoC
The EFR32MG21 uses a different kind of clock for watchdogs.
It requires an additional peripheral-id parameter in the dts to get the
proper clock as it is based on the watchdog's ID i.e., cmuClock_WDOG#.

Signed-off-by: Steven Lemaire <steven.lemaire@zii.aero>
2020-08-06 11:49:16 +02:00
4a716c6eae dts: dac: add a new binding for the SAM0 DAC
The Atmel SAM0 DAC is a single channel 10 bit DAC with selectable
reference.

Signed-off-by: Michael Hope <mlhx@google.com>
2020-08-04 16:08:48 -05:00
Lukasz Majewski
5c41b668f1 dts: Support 'fixed-link' property in nxp,kinetics-ethernet.yaml
This commit enables support for parsing 'fixed-link' node when it
is added to node described in 'ethernet,fixed-link.yaml'.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2020-08-04 15:54:26 -05:00
Lukasz Majewski
a8d548df1e dts: Add binding description for ethernet fixed link PHY operation
This patch adds description for 'fixed-link' node in ethernet DTS
node. It supports setting speed and duplex.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2020-08-04 15:54:26 -05:00
Jiří Keresteš
3a87517c5e drivers: watchdog: mcux_wwdt: add driver for NXP LPC 55xxx WWDT
Adds shim driver for LPC 55xxx Windowed Watchdog Timer (WWDT).

Also updates the "Supported features" table in LPCXpresso55S69
board documentation page.

Fixes #22704.

Signed-off-by: Jiří Keresteš <jiri@kerestes.cz>
2020-08-04 15:13:25 -05:00
Maxime Bittan
adb5dd920b dts: arm: Add I2C nodes for LPC11U6X soc series
This commit adds the device tree nodes and bindings for the I2C
controllers of the LPC11U6X MCUs

Signed-off-by: Maxime Bittan <maxime.bittan@seagate.com>
2020-07-29 20:12:24 +02:00
Simon Guinot
75a2f3e484 dts: lpc11u6x: add node and binding for on-chip EEPROM
This patch adds the DT nodes and binding for the on-chip EEPROM found
on the LPC11U6x MCUs.

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2020-07-29 20:12:24 +02:00
Maxime Bittan
5675136eb1 dts: arm: Add UART node and binding for LPC11U6X soc series
This commit adds the UART nodes in the LPC11U6X device tree,
as well as its binding.

Signed-off-by: Maxime Bittan <maxime.bittan@seagate.com>
2020-07-29 20:12:24 +02:00
Simon Guinot
18e4e5c1e2 dts: lpc11u6x: add GPIO node and binding
This patch adds the DT nodes and binding for the GPIO registers found
on the LPC11U6x MCUs.

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2020-07-29 20:12:24 +02:00
Maxime Bittan
ed4511ea8c drivers: clock_control: lpc11u6x: Add support for clock controller
This commit adds basic support for the clock controller used in
lpc11u6x MCUs.

Signed-off-by: Maxime Bittan <maxime.bittan@seagate.com>
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2020-07-29 20:12:24 +02:00
Maxime Bittan
1724bf49be dts: arm: nxp: Add node and bindings for lpc11u6x clock controller
This commit adds a bindings for the clock controller used in lpc11u6x
MCUs. It also adds a clock-controller node for the lpc11u6x soc series.

Signed-off-by: Maxime Bittan <maxime.bittan@seagate.com>
2020-07-29 20:12:24 +02:00
Simon Guinot
6eb7841bf3 dts: lpc11u6x: add pinmux node and binding
This patch adds the DT nodes and binding for the pinmux registers,
aka IOCON (I/O control), found on the LPC11U6x MCUs.

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2020-07-29 20:12:24 +02:00
Erwan Gouriou
254536cf5b dts/bindings: Add st,stm32-ethernet binding
Add binding for stm32 ethernet controller.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-07-24 12:03:33 +02:00
Raveendra Padasalagi
a25c30ddd7 dts: bindings: Add documentation for pl330 driver
Add documentation for pl330 dma driver.

Signed-off-by: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
2020-07-24 11:54:31 +02:00
Simon Glass
ee34aced6a sensor: max17055: Add MAX17055 driver
Add support for the Maxim MAX17055 fueld-gauge sensor.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-07-23 12:12:09 -04:00
Saravanan Sekar
9ac3c9d42a drivers: sensors: itds: Add support for WSEN-ITDS 3-axis accel sensor
Add support for wsen-itds 3-axis accel sensor, provides acceleration,
temperature data reading and supports configuring of output data rate,
operating mode and scale.

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
2020-07-20 12:45:56 +02:00
Saravanan Sekar
57e7148613 dts: bindings: vendor-prefixes: add Würth Elektronik
WE is used as vendor for Würth Elektronik sensor drivers.

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
2020-07-20 12:45:56 +02:00
Brian Bradley
8ec1cbc95d boards: arm: stm32: Add WeAct Black Pill V2.0 definitions
Includes support for spi, usb, i2c, uart, pwm, adc, dfu,
and onboard led and switch.

Signed-off-by: Brian Bradley <brian.bradley.p@gmail.com>
2020-07-17 16:54:22 +02:00
Peter Bigot
5f68b63896 dts: ti,bq274xx: remove default properties
The parameters for this fuel gauge depend on the hardware design and
the expected battery.  These should not be defaulted to a value that
may be inappropriate.  Require that they be explicitly provided.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-07-17 13:35:52 +02:00
Emil Obalski
045d12a9f2 usb: audio: Correct typos in USB audio bindings.
This patch corrects misspells in USB audio bindings.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2020-07-14 13:03:04 +02:00
Gerson Fernando Budke
048439b76e dts: bindings: gpio: Introduce atmel xplained pro header
Add Xplained-Pro header connector defined by Atmel. This allows
hardware with compatible headers to define the related GPIOs.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-07-13 11:54:29 +02:00
Gerson Fernando Budke
340416d05c dts: bindings: gpio: Introduce atmel xplained header
Add Xplained header connector defined by Atmel. This allows hardware
with compatible headers to define the related GPIOs.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-07-13 11:54:29 +02:00
Armando Visconti
485f2d410c drivers/sensors: Add iis2dh accelerometer sensor support
Add support to STM IIS2DH the ultra-low-power highperformance
three-axis linear accelerometer.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-07-10 11:49:40 -05:00
Mieszko Mierunski
5d00616bf3 drivers: nrf: Add concatenation buffer to i2c nrfx TWIM driver.
Add option to concatenate i2c transfers. If concatenation buffer size is
provided then transfers will be concatenated as long as there is space
left in buffer.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2020-07-10 15:40:26 +02:00
Arnaud Mouiche
a7f1e1c399 dts: bindings: Add bindings for ARM M33F
compatible = "arm,cortex-m33f" was already used for some time
(lpc55S6x, nrf9160...) without any related bindings.
Every works fine until you need to access one CPU node property
(eg. clock-frequency)...

Signed-off-by: Arnaud Mouiche <arnaud.mouiche@invoxia.com>
2020-07-08 13:45:33 +02:00
Andreas Sandberg
3d1fa70e80 dts: bindings: Add bindings for Semtech SX126x
Add device tree bindings for the Semtech SX1261 and SX1262
radios. These will be used by Zephyr's LoRa drivers.

Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
2020-07-02 08:32:37 -04:00
Maureen Helm
10c1ded452 drivers: spi: Add optional delays to mcux dspi and lpspi drivers
Adds optional device tree properties to set delays between spi chip
select assert/deassert and clock edges in the mcux dspi and lpspi
drivers. If these properties are not set, then the minimum supported
delays are used.

Verified that tests/drivers/spi/spi_loopback/ still passes on
mimxrt1050_evk (lpspi driver) and frdm_k64f (dspi driver).

Measured with a scope that the pcs-sck-delay and sck-pcs-delay times on
the first spi transaction in the test are reduced from 7.82 us to 20 ns
on mimxrt1050_evk.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-07-02 07:57:36 -04:00
Saravanan Sekar
bda358a64f drivers: serial: add support for Nuvoton series UART
Add Nuvoton numicro series UART support, currently supports
only poll mode.

UART0 clock and pincontrol are directly configured, will be
replace when clock and gpio support is added.

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
2020-07-01 21:09:25 +02:00
38cfd6c2e6 dts: pwm: add a binding for the SAM0 TCC in PWM mode
The SAM0 Timer/Counter for Control Applications can act as a counter
or generator.  Add a binding for the TCC in PWM mode and helper to
check the compat mode.

Signed-off-by: Michael Hope <mlhx@google.com>
2020-07-01 08:10:59 -05:00
Martí Bolívar
1904d24b7c dts: bindings: fix up 'label' property description
The value of a label property isn't really the name of an API. It's
the name of a device, as passed to device_get_binding().

Let's just say that directly so people know what this means in
practice instead of what's currently used as the description, which is
harder to understand and not really accurate.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-06-23 17:35:54 +02:00
Marcin Niestroj
af67b297a3 drivers: lora: sx1276: support antenna power enable
RF SPDT switches used for RX/TX selection have often power enable pin
connected to MCU's GPIO, so it is possible to disable it to save power
when not doing any data transfers. Add 'antenna-enable-gpios' property
to support such designs.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-06-23 13:08:06 +02:00
Marcin Niestroj
35328cc537 drivers: lora: sx1276: support TCXO power control
Add support for TCXO power control using GPIO pin. Some boards
(including B-L072Z-LRWAN1 already supported in Zephyr) need delay
applied after powering on TCXO, so add device-tree property allowing to
configure that as well. Cache information about TCXO power status, so
subsequent requests to enable it will not result in unnecessary delays.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-06-23 13:08:06 +02:00
Marcin Niestroj
2aa161a121 drivers: lora: sx1276: support RFI/RFO/PA_BOOST antenna selection
There are several antenna path designs on SX1276 compatible boards in
the wild. B-L072Z-LRWAN1 board has dedicated enable pins for RFI, RFO
and PA_BOOST. This is exactly what this patch allows to
configure. Second variant of antenna selection is done with a single
GPIO pin, which controls RF SPDT switches (input or output). This is
also supported, when either 'rfo-enable-gpios' or
'pa-boost-enable-gpios' property is provided alone (RFO/PA_BOOST is
selected only when transmitting, so there is no need for explicit
'rfi-enable-gpios' configuration).

Drop requirement for 'power-amplifier-output' DT property when there is
either 'rfo-enable-gpios' or 'pa-boost-enable-gpios' configured. Fail
using BUILD_ASSERT() when neither is specified.

Make the SX1276SetAntSw() logic similar to loramac-node examples
implementation, so RFO/PA_BOOST is enabled only in
RFLR_OPMODE_TRANSMITTER.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-06-23 13:08:06 +02:00
Marcin Niestroj
f08ef736a0 drivers: lora: sx1276: select PA output by dts property
PA selection mainly depends on board design. So it looks like
device-tree is a better mechanism than Kconfig in this case. Use string
property with two possible values: "rfo" and "pa-boost".

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-06-23 13:08:06 +02:00
Dominik Ermel
6ea6321586 drivers/flash: Add support for flash_get_parameters to drivers
With addition of flash_get_parameters API call, it is needed to provide
support for the API to flash drivers.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-06-22 14:35:03 +02:00
Gerard Marull-Paretas
76f0d72e5d drivers: pwm: stm32: add support for polarity
Add support for the polarity flag in the STM32 PWM driver.

STM32 boards using PWM have been updated accordingly.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-06-19 15:18:50 +02:00
Johann Fischer
3f19918041 drivers: ssd16xx: add temperature sensor support
Appropriate WS can be loaded automatically if
the display controller has integrated temperature
sensor or an external sensor is connected.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-06-17 12:31:20 +02:00
Johann Fischer
ac19e0f263 drivers: ssd16xx: support to load default WS from OTP
Add support to load default WS from OTP.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-06-17 12:31:20 +02:00
the BASTION
3f5a32a7d4 boards: arm: add ruuvi_ruuvitag
Adds ARM based Ruuvtag baord. This board is based on the nRF52832.

Signed-off-by: the BASTION <thebasti0ncode@gmail.com>
2020-06-17 12:29:41 +02:00
Mohamed ElShahawi
4acac3e9ef drivers: esp32/clock_control: Add Clock Driver
- Support PLL for Higher Frequencies 80,160,240 MHz
- Support XTAL Frequencies 26MHz, 40MHz
- Clock Driver can't be disabled, because all of the other drivers
will depend on it to get their operating Frequency based on chosen
clock source (XTAL/PLL).

- Add needed references to BBPLL i2c bus ROM functions.
- Add `rtc` node to Device Tree.
- Since All Peripherals Frequency is depending on CPU_CLK Source,
`clock-source` property added to CPU node

Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
2020-06-16 09:00:51 -05:00
Abhishek Shah
455663dbf2 dts: bindings: Add binding for iProc PCIe EP node
Add device tree binding for the iProc PCIe EP present on
Broadcom Valkyrie/Viper SoC series.

Signed-off-by: Abhishek Shah <abhishek.shah@broadcom.com>
2020-06-13 01:35:19 -07:00
Hake Huang
5582c2f00b dt-bindings: dts/arm/nxp : add MCUX EDMA Support
add MCUX EDMA support for dts binding

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2020-06-12 13:03:28 -05:00
Krzysztof Chruscinski
176d2d9f85 drivers: serial: nrfx_uarte: Use hw-flow-control from device tree
Cleaned up flow control configuration. Added support for using only
cts or only rts.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-06-09 19:06:16 +02:00
Peter Bigot
8e2e7aee51 dts: bindings: combine adc bindings under iio subdirectory
These should have been added in the existing iio/adc subdirectory.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-06-09 10:26:03 -05:00
Henrik Brix Andersen
8b5b7fcf8d test: lib: devicetree: add tests for DT_ macros for retrieving PWM period
Add tests for DT_ macros for retrieving the 'period' cell value.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-05-29 14:48:12 +02:00
Francois Ramu
7545b7888a dts: stm32: timer define a new DT binding for LPTIM
Adds a new LPTIM binding for stm32 soc,
based on the timer binding. This will makes a specific filter
on dt_compat_enabled("stm32,lptim")

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-05-29 14:13:05 +02:00
Martí Bolívar
e4a761cffe devicetree: add migration guide documentation and tests
Add test cases that verify various bits and pieces of the legacy
devicetree macros match the new APIs.

Writing these test cases without giving rise to deprecated macro
warnings which might break people's CI if they build with -Werror
requires turning off the __WARN() generation in
devicetree_legacy_unfixed.h. The entire file is deprecated at this
point and must be explicitly enabled with an opt-in Kconfig option, so
there isn't any harm in doing this.

Nevertheless, take a minimally invasive approach to avoiding __WARN()
generation in gen_legacy_defines.py, to avoid the possibility of
breakage. This code is basically frozen anyway, so hacks like this
won't cause maintainability problems since it isn't being actively
maintained.

Use the new tests as fodder for a migration guide from the old API in
the documentation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-28 22:12:38 +02:00
Martí Bolívar
930c5807d5 tests: devicetree: test great-grandchild bindings
At some point, "child-binding:" apparently only worked up to 2 levels
deep. That's not the case anymore, but add a regression test to make
sure that doesn't break. 3 levels deep ought to be enough for anyone.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-28 22:12:38 +02:00
Martí Bolívar
c0fcff9b7d dts: nrf5340_cpuapp: add cryptocell node
Add the missing node and bindings. This is a secure-mapped peripheral,
so do not add it to the common include file
nrf5340_cpuapp_common.dtsi.

Fixes: #25493
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-21 20:09:44 +02:00
Henrik Brix Andersen
784c4728b5 drivers: pwm: mcux_ftm: allow configuring the clock prescaler
Allow configuring the clock prescaler divider for the NXP Kinetis
FlexTimer. Setting the prescaler to a lower value allows for much
higher resolution/accuracy for the generated PWM waveforms.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-05-20 19:03:14 +02:00
Andrei Gansari
2a75139b7c dts: mikro-bus definition
Adds new Mikro-BUS interface defined by MikroElectronica used
by some expansion boards.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-05-20 19:02:36 +02:00
Marcin Niestroj
a40e8b510d dts: bindings: nordic qspi: fix documentation for writeoc
writeoc is obviously an opcode for writing. Fix that copy-paste type of
bug.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-05-18 19:12:18 +02:00
Christoph Reiter
d49e7da7da sensor: add sensor driver for Infineon DPS310
Add driver for Infineon DPS310 temperature and pressure sensor.

Signed-off-by: Christoph Reiter <christoph.reiter@infineon.com>
2020-05-14 11:02:29 +02:00
Gerard Marull-Paretas
b35152ed4b devicetree: add DT_INST_FOREACH_CHILD macro
The macro iterates through the list of child nodes in a DT_DRV_COMPAT
instance and invokes provided macro for each node.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-05-13 21:22:06 +02:00
Kumar Gala
ce0d50c2b0 dts: bindings: ethernet: Add zephyr,random-mac-address property
Add definition of zephyr,random-mac-address property that conveys to a
driver to utilize a random MAC address if the driver supports this
feature.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-09 16:29:57 +02:00
Parthiban Nallathambi
f4adfd52cb drivers: serial: add XMC seris UART support
Add infineon XMC4 series UART support. Driver supports
only poll mode using XMCLib.

Out of 4 available UART's on SoC, only UART1 is confgired
by default in UART mode until GPIO & pinctrl support.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2020-05-09 14:21:44 +02:00
Anthony Brandon
4aab0464c3 dts: bindings: st,stm32-sdmmc: remove unneeded type
The label property does not need to have its type set
explicitly to string, so remove it.

Signed-off-by: Anthony Brandon <anthony@amarulasolutions.com>
2020-05-08 17:49:32 +02:00
Emil Obalski
8d2f13c203 usb: Add USB audio implementation
By this commit USB audio class implementation is introduced
to Zephyr.

The Zephyr USB audio device class follows bellow
documentations:

- Universal Serial Bus specification rev2.0 (usb20.pdf)
- Universal Serial Bus Device Class Definition for Audio Devices
  (audio10.pdf)
- Universal Serial Bus Device Class Definition for Audio Data Formats
  (frmts10.pdf)
- Universal Serial Bus Device Class Definition for Terminal Types
  (termt10.pdf)

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2020-05-08 15:12:27 +02:00
Johann Fischer
7e95a45222 dts: rename solomon,ssd1673fb.yaml to solomon,ssd16xx.yaml
Rename solomon,ssd1673fb.yaml to more generic solomon,ssd16xx.yaml.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-05-08 15:11:10 +02:00
Anthony Brandon
631cad428b disk: add stm32 sdmmc disk access driver
Add a disk access driver for the stm32 sdmmc component. The driver is
based around the stm32 cube HAL and uses the blocking API.

Signed-off-by: Anthony Brandon <anthony@amarulasolutions.com>
2020-05-08 10:53:10 +02:00
Arjun Jyothi
d18ae2e9fb soc: arm: Add Broadcom Viper SoC support
Add initial support for Broadcom Viper SoC.
It has ARM Cortex-M7 and Cortex-A72 cores.

Signed-off-by: Arjun Jyothi <arjun.jyothi@broadcom.com>
Signed-off-by: Abhishek Shah <abhishek.shah@broadcom.com>
2020-05-08 10:46:23 +02:00
Erwan Gouriou
25ac59685f dts/arm/st: Add l5 device tree basics and stm32l552x socs
Add l5 secure and non secure device tree files

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-08 00:34:34 -05:00
Johann Fischer
8f983c3654 drivers: ieee802154: add Decawave DW1000 driver
Add initial support for Decawave DW1000
IEEE 802.15.4-2011 UWB transceiver.

Driver has basic functionality. Additional functions such
as reading out timestamps and delayed TX were implemented
for test purposes, but also require support in the 802154
subsystem.

Register, sub-register, and defaults defines in the file
ieee802154_dw1000_regs.h are taken from the Decawave's
DW1000 driver for the Mynewt OS.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-05-07 23:30:58 -05:00
Andrei Gansari
bfbbf92ad5 dts: nxp,lpc-rng binding and lpc55xxx RNG node
Binding used for LPC random number generator hardware.
Describes RNG device node in LPC5xxx SoCs device tree peripherals.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-05-07 23:25:31 -05:00
Kumar Gala
6ae8664889 drivers: i2s: i2s_sam_ssc: Convert to devicetree
Convert i2s_sam_ssc driver to utilize devicetree.  We replace Kconfig
options for specifying the DMA configuration (channel, DMA device name)
with getting that from devicetree.  We also get pincfg from devicetree,
however we still have Kconfig sybmols to specify if the RF or RK pin is
enabled.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-07 22:24:58 -05:00
Kumar Gala
49bab484df drivers: dma: sam_xdmac: Convert to devicetree
Convert sam_xdmac driver to utilize devicetree.  As part of the
controller binding we specify that dmas should contain a channel and the
perid for the DMA transaction.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-07 22:24:58 -05:00
Peter A. Bigot
e444274e95 drivers: counter: add Maxim DS3231 support
The DS3231 is an I2C real-time clock with internal temperature
compensated oscillator, maintaining civil time to 1 s precision with
nominal 2 ppm accuracy from 0-40 Cel.

The basic functionality is exposed as a counter that is always running
at 1 Hz.  Much more functionality is exposed as driver-specific API,
including the ability to translate between the time scale of the DS3231
and the time scale of the Zephyr uptime clock.  This allows correlation
of events in the system clock to UTC, TAI, or whatever time scale is
used to maintain the DS3231.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-05-07 19:45:06 +02:00
Andrzej Głąbek
8ee12207ff drivers: flash: Add driver for AT45 compatible SPI flash chips
Add a driver that can handle several instances of AT45 family chips,
which are enabled by specifying DT nodes for them with the "compatible"
property set to "atmel,at45" and other required properties like JEDEC
ID, chip capacity, block and page size etc. configured accordingly.

The driver is only capable of using "power of 2" binary page sizes in
those chips and at initialization configures them to work in that mode
(unless it is already done).

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-05-07 14:51:10 +02:00
Peter A. Bigot
99495af802 dts: gpio: add Particle Gen3 header binding
This header is physically related to the Adafruit Feather, but uses a
different pin numbering and exposes a slightly different set of pins.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-05-07 14:49:49 +02:00
Peter A. Bigot
6b04499331 dts: bindings: add particle vendor identifier
Supports the Particle Gen3 feather header nexus map.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-05-07 14:49:49 +02:00
Alex Porosanu
f4c36b7beb drivers: pwm: add driver for NXP Kinetis TPM module
The TPM (Timer/PWM Module) is a 2- to 8-channel timer which supports
input capture, output compare, and the generation of PWM signals to
control electric motor and power management applications.

This patch adds the driver and the binding necessary for instantiating
the driver. The work is based on the RV32M1 driver for TPM done by
Henrik Brix Andersen. A later patch will enable this driver to be used
for the KW41Z SoC, if PWM support is requested.

Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
2020-05-06 11:33:37 -05:00
Pauli Salmenrinne
30003ffb86 drivers: serial: stm32: Support for parity in DTS for STM32 uart.
Add support for devicetree property 'parity' for stm32 serial devices.

Signed-off-by: Pauli Salmenrinne <susundberg@gmail.com>
2020-05-06 11:00:12 -05:00
Francois Ramu
5d57404c54 dts: bindings: dma add support for dmamux controller
This patch introduces the periph to/from memory dma transfer
using the dmamux feature and define new values
for dma cells on client side

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-05-05 11:51:25 -05:00
Henrik Brix Andersen
ea61a6e3fd dts: bindings: add gpio-i2c devicetree binding
Add devicetree binding for GPIO bit banging I2C controller.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-05-05 10:17:23 -05:00
Kumar Gala
dff8715615 drivers: ethernet: sam_gmac: rework pin config
Reworked sam_gmac driver to get pin ctrl/mux configuration information
from the device tree instead of via Kconfig and defines in soc_pinmap.h

We remove defines from soc_pinmap.h that are no longer needed due to
getting all that information from devicetree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-04 11:32:10 -05:00
Francois Ramu
4c5d9da02e dts: bindings: define the bindings for SPI dma client on stm32 series
This includes the dma cells as client for the spi
An example of the client part is defined in the dma.yaml
Consequently, bindings for the dmas property becomes then 'not required'
Including dma.yaml is not needed as dma properties
are now part of base.yaml

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-05-04 09:46:07 -05:00
Henrik Brix Andersen
6f05ecfb48 dts: bindings: add NXP Kinetis DAC binding
Add device tree binding for the NXP Kinetis Digital-to-Analog
converter module (DAC).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-05-01 12:35:50 -05:00
Henrik Brix Andersen
1a2e87e3c8 dts: bindings: add NXP Kinetis DAC32 binding
Add device tree binding for the NXP Kinetis Digital-to-Analog
converter module (DAC32).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-05-01 12:35:50 -05:00
Henrik Brix Andersen
9ceb29ac56 dts: introduce shared binding for the NXP FlexTimer
Do not assume in the SoC level device trees that NXP Kinetis FlexTimer
nodes will always be configured as PWM. Instead, configure FlexTimer
nodes for PWM at the board level for NXP Kinetis boards.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-04-30 08:28:48 -05:00
Kumar Gala
689f93bc33 devicetree.h: pwms: Add DT_PWMS_ macros
Add DT_PWMS macros to be used in pwm clients drivers.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-29 13:11:22 -05:00
Kumar Gala
a918d301fe drivers: adc: adc_sam0: rework devicetree support
Rework the devicetree to utilize new DT_INST macros and extract per
instance data for clocks from devicetree.

We add a property ('calib-offset') for the SAM{D,E}5x family of SoCs
that is the bit position offset from ADC0 BIASCOMP in the NVM Software
Calibration Area Mapping.  For ADC0 this is typically 0 and for ADC1
this will be 14.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-29 08:02:36 -05:00
Erwan Gouriou
46649f9224 dts/bindings: st,stm32-can: Add optional master-can property
In STM32 can driver CAN2 instance need to know the base address
of CAN1 instance which is referenced as master can.
Add this information as an optional property to stm32 can binding.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-28 14:49:55 -05:00
Daniel Leung
5692702248 drivers: pinmux: mchp_xec: Convert to using new device tree macros
Convert driver to use the new device tree macro's instead of
dts_fixup.h based macros. This moves us closer to removing both
dts_fixup.h and per instance Kconfig symbols.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-04-28 07:43:31 -05:00
Gerson Fernando Budke
c755821608 drivers: ieee802154: rf2xx: Add local-mac-address
Add local-mac-address on DT and enable it on rf2xx driver. If user
define local-mac-address this value will be used as default mac address.
Otherwise driver automatically add a random mac address.

On application level user can change default mac address using net_mgmt
command with NET_REQUEST_IEEE802154_SET_EXT_ADDR parameter defined on
include/net/ieee802154_mgmt.h header.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-04-28 10:30:55 +03:00
Kumar Gala
8eafcc32db drivers: counter: sam0_tc32: rework devicetree support
Rework the devicetree to utilize new DT_INST macros and extract per
instance data for clocks from devicetree.  Move the prescaler setting
from Kconfig to devicetree as well.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-25 13:33:56 -05:00
Kumar Gala
fe573b6e23 dts: atmel: sam0: Add clocks for ADC and TCn devices
Add clock references for ADC and TC devices.  Update the bindings for
these devices to require clocks property and update the dtsi files to
have the clock info.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-25 13:33:56 -05:00
Kumar Gala
aa63b07019 drivers: spi: spi_sam0: rework devicetree support
Rework the devicetree to utilize new DT_INST macros and extract per
instance data for clocks and dma from devicetree.  We update the
atmel,sam0-spi binding for dma to replace the rxdma and txdma
properties with proper 'dmas' property.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-25 09:30:16 -05:00
Kumar Gala
b8ade7856d drivers: i2c: i2c_sam0: rework devicetree support
Rework the devicetree to utilize new DT_INST macros and extract per
instance data for clocks and dma from devicetree.  We update the
atmel,sam0-i2c binding for dma to replace the dma property with
proper 'dmas' property.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-25 09:30:16 -05:00
Kumar Gala
cb8ee73692 dts: atmel sam: Add pinctrl support for SAM SPI
Add pinctl support for the SAM SPI device.  We update the SPI
binding to have pinctrl-0 bindings that are expected to have
at least phandles for MISO, MOSI, and SPCK, but might also have
various chip selects as well.

The pinctrl nodes will have an 'atmel,pins' property that describes the
GPIO port, pin and periphal configuration for that pin.

We update sam*-pinctrl.dtsi files with all the various pin ctrl
configuration operations supported by the given SoC family.  These
files are based on data extracted from the Atmel ASF HAL
(in include/sam<FAMILY>/pio/*.h).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-25 09:29:54 -05:00
Vincent Wan
984988285b dts: bindings: cc13xx-cc26xx: add port info for uart tx and rx pins
Adding port information for uart tx and rx pins in dts, so that it can
be more systematically retrieved in the uart driver.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2020-04-23 17:29:53 -05:00
Kumar Gala
94fcf2efa1 drivers: adc: adc_sam_afec: rework device tree support
Reworked adc_sam_afec driver to utilize new DT_INST macros as part of
this rework we also now get pin ctrl/mux configuration information
from the device tree instead of via Kconfig and defines in soc_pinmap.h

We remove defines from dts_fixup.h and soc_pinmap.h and associated
Kconfig symbols that are no longer needed due to getting all that
information from devicetree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-23 06:11:26 -05:00
Kumar Gala
bd639fc332 drivers: serial: uart_sam0: rework devicetree support
Rework the devicetree to utilize new DT_INST macros and extract per
instance data for clocks and dma from devicetree.  We update the
atmel,sam0-uart binding for dma to replace the rxdma and txdma
properties with proper 'dmas' property.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-22 21:34:21 -05:00
Kumar Gala
170d09b448 dts: atmel: sam0: Update dmac to be a proper dma controller
Move the atmel,sam0-dmac binding under the dma binding dir and add
cell information for channel and trigger source.  Update the associated
dtsi files to match these changes.

This is in prep of ATMEL SAM0 SERCOMM devices like UART, I2C, and SPI to
user proper 'dmas' property to specify the dma info to use.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-22 21:34:21 -05:00
Kumar Gala
8357005ba1 dts: atmel: sam0: Add initial clock devicetree support
Add support for the GCLK, MCLK, and PM clock controllers.  Add bindings
and devicetree nodes associated with these clock controllers.  Also add
clock references for the SERCOM peripheral set to allow those drivers
(i2c, spi, uart) to utilize this information.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-22 21:34:21 -05:00
Sven Herrmann
bded58cee5 Sensor: mpr: Add Honeywell MPR driver
The Honeywell MPR sensor is a piezoresistive silicon pressure sensor,
which can be accessed via i2c.

https://sensing.honeywell.com/micropressure-mpr-series

Signed-off-by: Sven Herrmann <sven.herrmann@posteo.de>
2020-04-22 17:39:31 +02:00
Kumar Gala
492fbf7bba intc: intc_cavs: Use DTS labels for device names
Replace Kconfig device names with one's that come from device tree like
most all other devices do.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-22 04:59:22 -05:00
Kumar Gala
1b0e4124da dts: atmel sam: Add pinctrl support for SAM TWI and TWIHS I2C
Add pinctl support for the SAM TWI and TWIHS I2C devices.  We update
the TWI and TWIHS I2C bindings to have pinctrl-0 bindings that are
expected to have 2 phandles to the TWCK & TWD pinctrl nodes.

The pinctrl nodes will have an 'atmel,pins' property that describes the
GPIO port, pin and periphal configuration for that pin.

We update sam*-pinctrl.dtsi files with all the various pin ctrl
configuration operations supported by the given SoC family.  These
files are based on data extracted from the Atmel ASF HAL
(in include/sam<FAMILY>/pio/*.h).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-21 15:46:30 -05:00
Kumar Gala
c28a3e82bb dts/bindings: Add clock-names as a supported property
We've had clocks in base.yaml but didn't have clock-names.  Add it to
base.yaml with similar functionality to interrupt-names, reg-names, etc.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-21 15:39:36 -05:00
Viraaj Somayajula
e850ced155 gpio: gpio_sx1509b: add support for interrupt functionality
enable the interrupt functionality for sx1509b gpio expander,
when the CONFIG_GPIO_SX1509B_INTERRUPT config is enabled.
The gpio pin used for interrupt should be configured in the
device tree sx1509b node before enabling the interrupt
configuration.

Signed-off-by: Viraaj Somayajula <sviraaj@zedblox.com>
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-04-20 18:51:59 +02:00
Martin Jäger
414527926d drivers: dac: Add support for STM32L0 series
First implementation for STM32L0 series MCUs to be used for testing.

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-04-20 17:41:48 +02:00
Martin Jäger
33228f516b drivers: dac: Add API for DAC peripherals
DAC (digital to analog converter) peripheral driver with a generic API
suitable for most MCUs (only basic DAC features considered).

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-04-20 17:41:48 +02:00
Martí Bolívar
cd1387d6cf drivers: sensor: qdec_nrfx: move to new DT API
And add "quadrature decoder" to the binding description just have it
written down.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-20 15:43:01 +02:00
Erwan Gouriou
c2833af1af dts: stm32: Add generic compatible for flash controller
Add "st,stm32-flash-controller" as stm32 generic flash controller.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-20 03:51:36 -05:00
Kumar Gala
bdf58d11f0 dts: atmel sam: Add pinctrl support for SAM UART and USART
Add pinctl support for the SAM UART and SAM USART devices.  We update
the UART and USART bindings to have pinctrl-0 bindings that are expected
to have 2 phandles to the RX & TX pinctrl nodes.

The pinctrl nodes will have an 'atmel,pins' property that describes the
GPIO port, pin and periphal configuration for that pin.

We add sam*-pinctrl.dtsi files with all the various pin ctrl
configuration operations supported by the given SoC family.  These
files are based on data extracted from the Atmel ASF HAL
(in include/sam<FAMILY>/pio/*.h).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-18 17:04:08 -05:00
Kumar Gala
ebbb92d330 dts: atmel sam: gpio: Add support for atmel,pins property
The atmel,pins property will be utilized to describe pin mux
configuration.  The property will be a phandle-array in which the
phandle points to the given GPIO port the pin is on, the pin number, and
the mux configuration.

This change updates the atmel,sam-gpio binding to support that
phandle-array and updates the associated SoC dtsi files as well.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-18 17:04:08 -05:00
Richard Osterloh
f5695ca45c dts: gpio: Add Adafruit Feather header binding
Add dts support for the headers on Adafruit Feather boards.
This will allow adding FeatherWing boards as shields.

Signed-off-by: Richard Osterloh <richard.osterloh@gmail.com>
2020-04-17 10:37:22 -05:00
Kumar Gala
d58cbb78f7 dts: arm: Add binding for armv6m mpu
Add a binding for the ARM v6m MPU.  Similar to the v7m and v8m bindings.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-17 15:17:43 +02:00
Sean Nyekjaer
ca3457c792 gpio: add driver for MCP23S17 GPIO chip
Adds a new gpio driver that can be used for all boards

Signed-off-by: Sean Nyekjaer <sean@geanix.com>
2020-04-17 05:56:05 -05:00
Francois Ramu
32851a402f dts: bindings: dma controller for stm32 soc series
Complete documentation for STM32 DMA binding

Signed-off-by: Francois Ramu <francois.ramu@st.com>
Signed-off-by: Erwan Gouiou <erwan.gouriou@linaro.org>
2020-04-17 03:13:02 -05:00
Gerson Fernando Budke
2470292613 dts: bindings: eth: Add GMAC options
This add the following options to GMAC device tree bindings:
 - max-frame-size
 - max-speed
 - phy-connection-type

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-04-17 09:23:33 +03:00
Parthiban Nallathambi
e65b14c2b6 sensor: bq274xx: Add BQ27421 driver
Add support for TI BQ27421 fuel gauge sensor

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
Signed-off-by: NavinSankar Velliangiri <navin@linumiz.com>
2020-04-13 11:50:41 -05:00
Erwan Gouriou
f4e832d9e9 tests/lib: device tree: Add dma binding tests
Add dma nodes and dma clients tests.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-13 07:37:11 -05:00
Erwan Gouriou
f1977aebc4 dts/bindings: Add optionnal dmas and dma-names to base.yaml
dmas and dma-names properties could be used by a wide range
of potential dma client, hence put them in base.yaml, as
optional properties.
Since current stm32-i2s driver implementation only support
dma, set these properties as required.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-13 07:37:11 -05:00
Kumar Gala
2880a0ef7b dts: openisa: rv32ma: Update openisa,rv32m1-gpio binding for ports
Add a property to the openisa,rv32m1-gpio binding that relates the GPIO
node to the pinmux PORT node.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-10 14:38:04 -05:00
Kumar Gala
8f0018663f drivers: pinmux: rv32m1: Convert driver to new DT_INST macros
Convert driver to use DT_INST macros and remove related board per
instance Kconfig symbol usage.

Updated the openisa,rv32m1_vega-pinmux binding to require the label
property and updated the rv32m1.dtsi to add label properties for the
pinmux nodes.

Also update gpio_basic_api test to use DT_NODELABEL.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-10 14:38:04 -05:00
Maureen Helm
fafdfba6bb dts: Introduce shared binding for nxp flexcomm peripheral
The flexcomm peripheral on lpc socs can be configured into uart, spi,
i2c, or i2s mode. Introduce a shared device tree binding that gets
included by the more specific driver type bindings.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-04-10 07:21:41 -05:00
Kumar Gala
ab15602b79 dts: ti: lm3s6965: Add flash controller node and binding
Add a flash controller node and place the soc-nv-flash under that node.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-09 15:19:21 -05:00
Kumar Gala
7ab2f98684 dts: bindings: Remove zephyr,native-posix-flash-controller binding
Nothing uses the zephyr,native-posix-flash-controller binding so
remove it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-09 15:19:21 -05:00
Kumar Gala
6bb3ff9088 dts: bindings: add missing binding for st,stm32l0-flash-controller
The st,stm32l0-flash-controller did not have a binding, add one for it.

Also made a comment in stm32l0.dtsi that the driver doesn't currently
support this controller.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-09 15:19:21 -05:00
Kumar Gala
90f0217543 dts: soc: atmel: sam: Add pinctl container node
Group all the GPIO controllers under a pinctl node so that we have a
container for pinmux configuration data.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-09 13:34:46 -05:00
Maureen Helm
f1a8f6dd7b dts: Add i2c bindings and nodes for lpc socs
Adds i2c device tree bindings and nodes for the lpc54xxx and lpc55s6x
socs in preparation for adding a new i2c driver.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-04-09 08:52:13 -05:00
Erwan Gouriou
760849646d dts: stm32: Add rng node
Add rng node when supported by stm32 entropy driver in stm32 dtsi
Also add matching compatible binding.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-06 09:14:33 -05:00
Tobias Svehagen
ac53a8788e drivers: wifi: esp: Use UART settings from bus node
With the introduction of the new device-tree macros it is now possible
to use the settings for speed and flow-control from the bus node instead
of having the same properties on the esp node itself.

Signed-off-by: Tobias Svehagen <tobias.svehagen@gmail.com>
2020-04-06 09:12:58 -05:00
Kumar Gala
527f526f15 dts: cmsdk_gpio: Update binding and .dts to make label required
Make the label property required for "arm,cmsdk-gpio" compatible
nodes.  Update binding to mark the 'label' property required and updated
associated .dts files to add a 'label' property if it didn't exist.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-03 04:11:36 -05:00
Kumar Gala
7879b67796 drivers: entropy: Add DTS support to native-posix fake entropy driver
Add a YAML and DTS node for fake entropy driver.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-02 06:42:26 -05:00
Kumar Gala
0be9d2b18d drivers: entropy: rv32m1_trng: Add DTS support to rv32m1_trng driver
Add a YAML, DTS node and driver support to utilize data from devicetree
for register address and driver name.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-02 09:30:58 +02:00
Martí Bolívar
a3fae2f153 devicetree: add DT_COMPAT_ON_BUS()
And implement DT_ANY_INST_ON_BUS() in terms of it.

This makes some error messages quite a bit shorter by avoiding
UTIL_LISTIFY(), which has a nasty temper and tends to explode if not
treated gently.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-31 21:11:13 -05:00
Stephanos Ioannidis
1f9c8b79b5 dts: bindings: Add Atmel SAM-family GMAC binding
This commit adds the missing Atmel SAM-family GMAC Ethernet device
binding.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-03-31 08:08:29 -05:00
Trond Einar Snekvik
1f6e6933a6 dts: bindings: Remove duplicate in partition.yaml
The label property of the fixed-partitions child binding was duplicated
with two different values. This is invalid yaml, but went unnoticed by
pyYAML. Removed first entry to preserve value produced by pyYAML
behavior of overwriting duplicates.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2020-03-31 13:55:50 +02:00
Kumar Gala
4192254ef2 dts: nios2: Add interrupt controller support in dts
Added properties to support the core interrupt controller on the NIOS2
cpu cores and enable that support for the NS16550 UART.

We rename some compatibles so that the cpu core compatibles is unique.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-03-27 15:16:53 -05:00
Henrik Brix Andersen
120ef76a6a dts: bindings: add binding for NXP Kinetis LPTMR
Add device tree binding for the NXP Kinetis Low Power Timer (LPTMR)
module. This module can either act as a 16 bit counter or a 16 bit
pulse counter.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-03-27 11:17:58 -05:00
Henrik Brix Andersen
bc4a472a14 dts: bindings: add bindings for Microchip MCP320x
Add devicetree bindings for the Microchip MCP3204/MCP3208 12 bit ADCs
with SPI interface.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-03-27 16:17:06 +01:00
Daniel Leung
eb7b0884ea dts: ipm: add binding for intel,cavs-idc
This adds the DTS binding for the CAVS Intra-DSP Communication (IDC)
driver for the DSP on Intel SoC.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-03-25 19:07:28 -04:00
Piotr Mienkowski
8a9df52943 drivers: gpio_gecko: convert to DT_INST defines
Convert the driver to use DT_INST_ defines, update all dependent dts,
soc and board files.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2020-03-24 10:14:21 -05:00
Martí Bolívar
c3ec5db6d2 devicetree.h: add accessor API for nodes and properties
This is joint work with Kumar Gala (see signed-off-by).

Add helper macros which abstract the "true names" of each of the four
types of node identifier we intend to support (e.g. DT_ALIAS(),
DT_INST()).

These can be passed to a new DT_PROP() macro which can be used to read
the value of a devicetree property given a node identifier from one of
these four other macros, and the as-a-c-token name of the property.
Add other accessor macros and tests as well.

Add some convenience APIs for writing device drivers based on instance
numbers as well. Drivers can "#define DT_DRV_COMPAT driver_compatible"
at the top of the file, then utilize these DT_INST_* macros to access
various property defines.

For example, the uart_sifive driver can do:

  #define DT_DRV_COMPAT sifive_uart0

Then use DT_INST macros like:

  .port         = DT_INST_REG_ADDR(0),
  .sys_clk_freq = DT_INST_PROP(0, clock_frequency),

For convenience working with specific hardware, also add:

  <devicetree/gpio.h>
  <devicetree/adc.h>
  <devicetree/spi.h>

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-03-24 10:11:20 -05:00
Martí Bolívar
2a91a0d8c7 dts: bindings: add fake 'vnd' vendor
This is useful for devicetree documentation, examples, and tests,
where we need to put something for the vendor but we can't use an
actual piece of hardware for some reason.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-24 10:11:20 -05:00
Stephanos Ioannidis
dd75bccaca dts: bindings: Fix xlnx,ttcps binding compat
The `xlnx,ttcps` binding, despite having the file name of
`xlnx,ttcps.yaml`, had the compatible property of `cdns,ttc`.

While it is true that the Xilinx ZynqMP platform embeds the Cadence
Triple Timer Counter (TTC) IP core, its TTC differs from the original
Cadence core in that it implements 32-bit counters, instead of the
16-bit counters defined in the original; hence, the Xilinx variant is
not compatible with the original Cadence version and should be treated
as a different device.

This commit changes the `xlnx,ttcps.yaml` compatible property to
`xlnx,ttcps` for the above reasons.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-03-21 14:20:17 -04:00
Tobias Svehagen
7b5f6bc660 drivers: wifi: Add ESP8266 and ESP32 wifi modem driver
This adds support for the Espressif ESP8266 and ESP32 devices to be used
as peripherals on a UART.

There are two main AT command versions that can be selected, 1.7 and
2.0. Since they behave a bit different it is important to select the
one that matches the used in the firmware on your device.

When downloading large amounts of data it is highly recommended to
enable CONFIG_ESP_PASSIVE_TCP and flow control on the UART so that
data is not lost due to UART speed or receive buffer size.

Currently unsupported:
- Changing UDP endpoint with a sendto()
- Bind to a specific local port
- Server socket operations, ie listen() and accept()

Official AT firmware for ESP8266 and ESP32 can be found at:
https://github.com/espressif/esp-at

Signed-off-by: Tobias Svehagen <tobias.svehagen@gmail.com>
2020-03-21 19:08:02 +02:00
Armando Visconti
a302786e9b drivers/sensor: add support to IIS2MDC magnetometer sensor
The IIS2MDC is a 3D digital magnetometer ultra-low power sensor
for industrial applications, which can be interfaced through
either I2C or SPI bus.

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

This driver is based on stmemsc i/f v1.02.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-03-20 14:53:42 -05:00
Piotr Mienkowski
bdcfa4f375 soc: silabs_exx32: Add support for SiLabs EFR32BG13P SoC
This commit adds support for Silicon Labs EFR32BG13P (Blue Gecko) SoC.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2020-03-20 14:40:42 -05:00
Krzysztof Chruscinski
6a6063b57a drivers: serial: nrfx_uart: Allow TX only mode
Extended nrf_uart driver to support TX only.
When RX pin is not provided then RX is not started at all. This
allows to achieve low power with logging/console enabled.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-03-20 14:36:29 -05:00
Pooja Karanjekar
b49501e3c9 drivers: entropy: gecko: add entropy driver based on GECKO TRNG
Add entropy driver based on GECKO TRNG module along with device
tree support for EFM32PG and EFR32MG SOCs.

Signed-off-by: Pooja Karanjekar <pooja.karanjekar@lemonbeat.com>
2020-03-19 15:45:01 -05:00
Armando Visconti
c0f7a1ac6f drivers/sensor: add support to ISM330DHCX IMU sensor
The ISM330DHCX is a ultra-low power IMU with a 3D digital accelerometer
and 3D digital gyroscope tailored for Industry 4.0 applications, which
can be interfaced through either I2C or SPI bus.

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

This driver is based on stmemsc i/f v1.02.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-03-18 16:14:47 -05:00
Kumar Gala
3f2bee6013 dts: nxp: kinetis: Update nxp,kinetis-gpio binding for port connection
Add a property to the nxp,kinetis-gpio binding that related the GPIO
node to the pinmux PORT node.

For the kl25z we add the pinmux nodes as well since they didn't exist.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-03-16 14:54:23 -05:00
Armando Visconti
e13205b256 drivers/sensor: add support to IIS2DLPC accelerometer sensor
The IIS2DLPC is a 3D digital accelerometer ultra-low power sensor
for industrial applications, which can be interfaced through either
I2C or SPI bus.

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

This driver is based on stmemsc i/f v1.02

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-03-16 10:42:28 -05:00
Jose Alberto Meza
07fc457444 dts: peci: Add dts bindings for PECI
Add generic device tree bindings for PECI devices

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2020-03-13 18:53:04 +02:00
Kamil Rakoczy
687d1040ac Sensor: ADXL345: Add ADXL345 driver
Add support for Analog Devices ADXL345 3-axis I2C accelerometer.

Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
2020-03-13 08:53:43 -05:00
Francisco Munoz
98bef9a08c dts: bindings: tach: Add nodes and bindings for tachometer
Introduction of tachometer device nodes for the Microchip
MEC1501 SOC. In addition, dts bindings for are also introduced.

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2020-03-13 08:49:21 -05:00
Daniel Leung
dbe69d9031 dts: bindings: microchip,xec-rtos-timer: add GIRQ fields
Add the girq and girq-bit fields to the binding. This allows
encoding GIRQ related information inside device tree.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-03-11 21:16:16 -04:00
Kumar Gala
22246f89dc dts: microchip,xec-ps2: Add properties for GIRQ info
Add girq and girq-bit to encode per device information.  This allows the
driver to get any device unique info from device tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-03-11 07:59:38 -06:00
Kumar Gala
9ed4f39110 dts: microchip,xec-timer: Add properties for GIRQ info
Add girq and girq-bit to encode per device information.  This allows the
driver to get any device unique info from device tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-03-11 07:59:38 -06:00
Kumar Gala
d6b6ebe522 drivers: counter: mchp_xec: Fix dts prop type for max-value
The max-value should just be an int and not an array.  Change the type
to 'int' in the binding and fixup the driver to match.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-03-11 07:59:38 -06:00
Kumar Gala
18a30e9184 sensor: pms7003: Convert to DTS
Convert pms7003 sensor driver to utilize device tree.

DTS would look something like the following for the pms7003:

uart {
	pms7003: pms7003 {
		 status = "okay";
		 compatible = "plantower,pms7003";
		 label = "pms7003";
	};
};

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-03-10 14:15:22 -05:00
Kumar Gala
94322e503c sensor: ak8975: Convert to DTS
Convert ak8975 sensor driver to utilize device tree.

This also supports the ak8975 embedded in a invensense MPU9150.  In such
a case the device tree node should look something like, where the ak8975
is a child of the mpu9150.

        mpu9150@68 {
                compatible = "invensense,mpu9150";
                reg = <0x68>;
                label = "mpu9150";
                #address-cells = <1>;
                #size-cells = <0>;
                ak8975@c {
                        compatible = "asahi-kasei,ak8975";
                        reg = <0xc>;
                        label = "ak8975";
                };
        };

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-03-10 14:13:40 -05:00
Peter Bigot
a8d15c1279 sensors: grove_light: convert to devicetree bindings
Replace Kconfig configuration data with devicetree bindings using
(ADC) io channels.  Rework the sample to document expectations about
the relationship between the reference voltage and the divider input
voltage, and update the sensor configuration to support Nordic SAADC.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-12 10:31:26 -06:00
Peter Bigot
bc60245787 sensors: grove_temperature: convert to devicetree bindings
Replace Kconfig configuration data with devicetree bindings using
(ADC) io channels.  Rework the sample to document expectations about
the relationship between the reference voltage and the divider input
voltage, and update the sensor configuration to support Nordic SAADC.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-12 10:31:26 -06:00
Peter A. Bigot
ba686f5794 devicetree: add nexus map for Arduino analog input header
This maps the ordinal analog inputs to the board-specific ADC
channels.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-02-12 10:31:26 -06:00
Andrei Emeltchenko
f6ad1239f9 dts: Move IPM bindings to the right place
Move nxp,lpc-mailbox.yaml to dts/bindings/ipm/.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-02-12 10:00:47 -06:00
Markus Fuchs
53e3c310b5 dts: arm: stm32f4: Add CRYP support for STM32F4xx SoC series
Add Cryptographic Accelerator support for STM32F415/417 and STM32F43x
devices.

Signed-off-by: Markus Fuchs <markus.fuchs@de.sauter-bc.com>
2020-02-07 10:45:51 -06:00
Daniel Leung
969ca3b60b dts: cpu: add binding for Cadence Tensilica Xtensa LX4 CPU
This adds a simple binding for the Cadence Tensilica Xtensa LX4
CPU. File originally from the LX6 binding.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-02-05 10:43:25 -05:00
Johann Fischer
8f09c42b2c drivers: gd7965: convert to new GPIO API
Convert GD7965 controller driver to new GPIO API.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-02-05 12:00:36 +01:00
Tomasz Bursztyka
62b2cae2ae drivers/ieee802154: Adapt cc1200 driver to new GPIO API
Update to use new API for GPIO pin configuration and operation.  Fix
invalid arithmetic on void pointer.  Convert to support devicetree.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Tomasz Bursztyka
3587fe2fe3 drivers/ieee802154: Adapt cc2520 driver to new GPIO API
Update to use new API for GPIO pin configuration and operation.  Fix
invalid arithmetic on void pointer.  Mark all CC2520 GPIOs as required
in binding.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Peter Bigot
78f8f84517 drivers: lora: update for new GPIO API
Update the lora/sx1276 driver to the new GPIO API, using configured
active level and the replacement interrupt and active-sensitive set
APIs.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Peter Bigot
ce6ffd21dc drivers: eeprom_at2x: update for new GPIO API
Document and assign write-protect signal as active low, and use the
active-sensitive API to control it.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Johann Fischer
2748a23c61 drivers: ssd16xx: convert to new GPIO API
Convert SSD16XX sensor driver to new GPIO API.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-02-05 12:00:36 +01:00
Johann Fischer
3eecab88e6 drivers: ieee802154_mcr20a: convert to new GPIO API
Convert MCR20A 802154 controller driver to new GPIO API.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-02-05 12:00:36 +01:00
Johann Fischer
9ed9969a66 dts: ili9340: update gpio property description
Update gpio property description.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-02-05 12:00:36 +01:00
Johann Fischer
c671b75e13 drivers: st7789v: convert to new GPIO API
Convert ST7789V display driver to new GPIO API.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-02-05 12:00:36 +01:00
Peter Bigot
2c9425fe77 drivers: sensor: tmp007: convert to new GPIO API
Use the new pin and interrupt configuration API.

NOTE: Because hardware is not available this has been build-tested only.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Johann Fischer
91fad730a6 drivers: enc28j60: convert to new GPIO API
Convert ENC28J60 controller driver to new GPIO API.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-02-05 12:00:36 +01:00
Johann Fischer
d3da608535 drivers: enc424j600: convert to new GPIO API
Convert ENC424J600 controller driver to new GPIO API.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-02-05 12:00:36 +01:00
Peter Bigot
6980a04e8c drivers: sensor: sx9500: convert to new GPIO API
Use the new pin and interrupt configuration API.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Johann Fischer
573b322633 usb: convert VBUS control to new GPIO API
Use DT for VBUS control and convert it to new GPIO API.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-02-05 12:00:36 +01:00
Peter Bigot
acb43b66da sensors: ccs811: update to new API
Update devicetree sources and bindings, switch to new GPIO API.  Use
devicetree property name to identify interrupt signal.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Johann Fischer
988a681a16 drivers: ssd1306: convert to new GPIO API
Convert SSD1306 sensor driver to new GPIO API.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-02-05 12:00:36 +01:00
Peter Bigot
3154627a97 drivers: sensor: lis2dh: convert to new GPIO API
Use the new pin and interrupt configuration API.  Update all
devicetree bindings to add INT signal active level.  Document active
level.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Peter Bigot
50d1bb16e3 sensor: adt7420: update for new GPIO API
Update sample overlays.  Add GPIO flags to configuration state.
Refactor to split out setup/handle/process phases.  Switch to new API
replacing callback dis/enable with interrupt dis/enable.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Peter Bigot
808a88abd4 dts: binding: gpio: add default for ngpios property
Almost all drivers support 32 pins, though some support less.
Eventually this should be specified in every SOC binding, but until
then provide a default so GPIO drivers can be updated to use this.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Peter Bigot
c273b5d885 drivers: sensor: mcp9808: update to new GPIO API
Since this was converted to the setup/handle/process idiom in master
the conversion is straightforward.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Armando Visconti
3fdcbe5a79 driver/sensor: lis2ds12: update to use new GPIO API
Get rid of all the deprecated functions and definitions
replacing them with the new ones.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-02-05 12:00:36 +01:00
Peter Bigot
6afbd053e4 drivers: sensor: isl29035: update to new GPIO API
Document alert pin behavior, switch to new API.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Johann Fischer
664a1cf0db drivers: amg88xx: convert to new GPIO API
Convert AMG88XX sensor driver to new GPIO API.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-02-05 12:00:36 +01:00
Johann Fischer
afe53230b3 drivers: ti_hdc: convert to new GPIO API
Convert TI HDC sensor driver to new GPIO API.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-02-05 12:00:36 +01:00
Kevin Townsend
f800c7266e drivers: hmc5883l: update to new GPIO API
This commit updates the HMC5883L driver to use the new GPIO API.

Also add a note explicitly describing the active state of the DRDY
pin in the binding file.

Tested on frdm_k64f.

Signed-off-by: Kevin Townsend <kevin@ktownsend.com>
2020-02-05 12:00:36 +01:00
Armando Visconti
7fa48d4d6e driver/sensor: lis2mdl: update to use new GPIO API
Get rid of all the deprecated functions and definitions
replacing them with the new ones.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-02-05 12:00:36 +01:00
Peter Bigot
4b5393c228 sensor: adxl372: update for new GPIO API
Update sample overlay for missing chip select and to deconflict with
UART TXD.  Add GPIO flags to configuration state.  Replace callback
enable with interrupt enable.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Peter Bigot
de7e3e7693 sensor: adxl362: update for new GPIO API
Add a sample overlay.  Add GPIO flags to configuration state.  Replace
callback enable with interrupt enable.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Armando Visconti
a08aec9999 driver/sensor: stts751: update to use new GPIO API
Get rid of all the deprecated functions and definitions
replacing them with the new ones.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-02-05 12:00:36 +01:00
Peter Bigot
c44290f75d drivers: sensor: dht: update to new GPIO API
Document IO signal behavior, switch to new API.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Maureen Helm
0f38786889 drivers: sensor: Convert fxas21002 to new gpio api
Converts the fxas21002 sensor driver to the new gpio api. Updates device
trees for all boards with this sensor to active low gpio interrupts by
default.

Tested on the hexiwear_k64 board.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-02-05 12:00:36 +01:00
Armando Visconti
b0ad7bb594 driver/sensor: lis3mdl: update to use new GPIO API
Get rid of all the deprecated functions and definitions
replacing them with the new ones.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-02-05 12:00:36 +01:00
Peter Bigot
6dd1f66a3c drivers: sensor: bmi160: convert to new GPIO API
Document interrupt signal and replace legacy calls with new API.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Peter A. Bigot
44cf206c2e x86: apollo_lake: add nexus map for GPIO nodes
This maps devicetree GPIO phandle arrays from the full controller pin
range to the sub-controllers required by Zephyr's limit of 32 pins per
controller device.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-02-05 12:00:36 +01:00
Daniel Leung
07cb01b079 x86: apollo_lake: changes GPIO definition in DTS
This breaks down the GPIO controller definition in DTS into
multiple entries. This allows these controllers to be
referenced by other DTS, and test board overlay files.
And also we can remove the entries in the dts fixup file.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-02-05 12:00:36 +01:00
Peter Bigot
1cf43985e9 drivers: sensor: lsm6dsl: update to new GPIO API
Correct IRQ active level to default active-high, switch to new
interrupt configuration.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Johann Fischer
2a117748f6 drivers: apds9960: convert to new GPIO API
Convert APDS9960 sensor driver to new GPIO API.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-02-05 12:00:36 +01:00
Maureen Helm
cadbc96d66 drivers: sensor: Convert fxos8700 to new gpio api
Converts the fxos8700 sensor driver to the new gpio api. Updates device
trees for all boards with this sensor to active low gpio interrupts by
default.

Tested on frdm_k64f and rv32m1_vega_ri5cy boards. The latter verifies
that the reset output works correctly.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-02-05 12:00:36 +01:00
Maureen Helm
4b29b9faec disk: Convert usdhc driver to new gpio api
Converts the usdhc driver to the new gpio api. Updates the
device tree for the mimxrt1050_evk board to set appropriate active
high/low polarity for the power and card detect pins.

Note that the driver doesn't actually support interrupts yet. It
initializes a gpio callback for the card detect pin, but never actually
enables the gpio interrupt. This incomplete behavior is left as-is,
since the purpose of this patch is only to convert the driver to the new
gpio api, not to add new features.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-02-05 12:00:36 +01:00
Armando Visconti
0ae55c7ce9 driver/sensor: iis3dhhc: update to use new GPIO API
Get rid of all the deprecated functions and definitions
replacing them with the new ones.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-02-05 12:00:36 +01:00
Armando Visconti
f5dc6580a0 driver/sensor: lsm6dso: update to use new GPIO API
Get rid of all the deprecated functions and definitions
replacing them with the new ones.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-02-05 12:00:36 +01:00
Armando Visconti
cde71b4f75 driver/sensor: lps22hh: update to use new GPIO API
Get rid of all the deprecated functions and definitions
replacing them with the new ones.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-02-05 12:00:36 +01:00
Armando Visconti
e690fab6b1 driver/sensor: lis2dw12: update to use new GPIO API
Get rid of all the deprecated functions and definitions
replacing them with the new ones.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-02-05 12:00:36 +01:00
Robert Winkler
94b8832585 boards: litex_vexriscv: Enable LiteX GPIO driver
Enable LiteX GPIO driver in litex_vexriscv board.

Signed-off-by: Robert Winkler <rwinkler@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
2020-02-05 12:00:36 +01:00
Robert Winkler
e8d0eb1db1 drivers: gpio: Add LiteX GPIO driver
This commits adds GPIO driver for LiteX SoC builder.

Due to the fact that GPIO in LiteX is unidirectional and can be
configured with different pins amount per port, additional entries
were added to the dts file.

Signed-off-by: Robert Winkler <rwinkler@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
2020-02-05 12:00:36 +01:00
Peter Bigot
7821104ee9 drivers: gpio_sx1509b: add support for pin configuration on device init
IO extenders may provide input signals to LEDs or sensors where
leaving the signal undriven may result in increased power consumption
or misbehavior.  The SX1509B powers up with all signals configured as
inputs.  Provide a way to indicate which pins should be set as output,
and their initial signal level, when the device is configured.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Peter Bigot
a49b364244 drivers: sensor: sht3xd: convert to new GPIO APIO
Update ALERT active level in all devicetree files.  Capture GPIO flags
in static configuration.  Add internal API to enable and disable
interrupt, to release the handlers when an alert occurs, and to
re-enable the signal when the handler completes.  Check for alerts
received during periods when the interrupt was disabled.

Extend the example to handle both above and below range triggers and
alerts that are present on startup.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Martí Bolívar
1d2a551c65 drivers: led_strip: modernize and fix up ws2812 drivers/sample
Convert the GPIO based driver to the new GPIO API. (Only the
gpio_configure() call is affected).

Move configuration to DT where appropriate for both SPI and GPIO
drivers, only leaving the SPI vs. GPIO decision in Kconfig (in
addition to the basic enable for the driver.) Move some files around
to clean up as a result of this change.

led_ws2812 sample changes:

- make the pattern easier to look at by emitting less light

- use led_strip alias from DT to get strip device, allocate
  appropriate struct led_rgb buffer, etc.

- move the pins around and remove 96b_carbon support (I have no board
  to test with)

GPIO driver specific changes:

- str is required to write OUTSET/OUTCLR, not strb. The registers
  are word-sized.

- the str[b] registers must all be in r0-r7, so "l" is the correct GCC
  inline assembly constraint for both "base" and "pin"

SPI driver specific changes:

- match the GPIO driver in not supporting the update_channels API
  method, which never made sense for this type of strip

- return -ENOMEM when the user tries to send more pixel data
  than we have buffer space for instead of -EINVAL

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Karsten Koenig
4897c95462 drivers: can: mcp2515: Switch to new GPIO API
Mark the INT signal to be active low and use the new functions to get
gpio state and configure the gpio interrupt flanks.

Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
2020-02-05 12:00:36 +01:00
Daniel Leung
7b9cc3198f dts: add binding for PCA95xx series I2C-based GPIO expanders
This adds the DTS binding for the PCA95xx series I2C-based GPIO
expanders.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-02-05 12:00:36 +01:00
Peter Bigot
ff4294a7fe drivers: sensor: hts221: update to new GPIO API
Correct DRDY active level to default active-high, switch to new
interrupt configuration.

Also fix a common bug where an already-active DRDY signal is not
properly handled.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Oane Kingma
fff0a2b5e7 dts / boards / soc: Add support for SiLabs Gecko watchdog
This commit adds the following:
- device tree bindings for Gecko watchdog driver
- EFM32PG SOC support for the watchdog driver
- EFM32PG board support for the watchdog driver
- DTS aliases for testing with default watchdog driver test

Signed-off-by: Oane Kingma <o.kingma@interay.com>
2020-02-03 11:25:40 -08:00
Peter A. Bigot
6438195701 devicetree: add voltage-divider binding
Define a binding for a voltage divider circuit with one or more analog
input channels.  Add devicetree nodes for several boards that have
battery voltage measurement support.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-02-03 16:26:51 +01:00
Maureen Helm
ca43b7ceb4 dts: Add bindings for ft5336 touch panel controller
Adds device tree bindings for the focaltech ft5336 touch panel
controller, which will be used on several i.mx rt evk boards.

Moves address-cells and size-cells properties from the base kscan
bindings to the specific microchip,xec bindings since they are not
required for the ft5336.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-02-01 08:50:16 -05:00
Carlo Caione
a61290e1a3 arch: arm64: Add support for qemu_cortex_a53 board
This patch introduces support for the qemu_cortex_a53 board emulated
using QEMU (virt platform) adding SoC, board and DTS files.

| ./scripts/sanitycheck -p qemu_cortex_a53
|
| Total complete:  190/ 190  100%  skipped:   40, failed:    0
| 150 of 150 tests passed (100.00%), 0 failed,
|     40 skipped with 0 warnings in 580.93 seconds

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2020-02-01 08:08:43 -05:00
Carlo Caione
6f36300219 drivers: timer: Add per-core ARM architected timer
ARM cores may have a per-core architected timer, which provides per-cpu
timers, attached to a GIC to deliver its per-processor interrupts via
PPIs. This is the most common case supported by QEMU in the virt
platform.

This patch introduces support for this timer abstracting the way the
timer registers are actually accessed. This is needed because different
architectures (for example ARMv7-R vs ARMv8-A) use different registers
and even the same architecture (ARMv8-A) can actually use different
timers (ELx physical timers vs ELx virtual timers).

So we introduce the common driver here but the actual SoC / architecture
/ board must provide the three helpers (arm_arch_timer_set_compare(),
arm_arch_timer_toggle(), arm_arch_timer_count()) using an header file
imported through the arch/cpu.h header file.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2020-02-01 08:08:43 -05:00
Johann Fischer
c68ac431cc drivers: display: add support for GD7965 display controller
Add support for GD7965 display controller.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-01-31 11:37:35 -05:00
Carles Cufi
8129a78a51 dts: bindings: qspi-nor: Replace tabs with spaces
YAML doesn't support tabs, replace them with spaces.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-01-30 13:05:12 -06:00
Krzysztof Chruscinski
dcdc61cfdb drivers: serial: nrf_uarte: Allow TX only instance
Extended nrf_uarte driver to support TX only UARTE instances.
When RX pin is not provided then RX is not started at all. This
allows to achieve low power with logging/console enabled.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-01-29 12:03:05 -06:00
Kamil Lazowski
5b4f4253c1 drivers: flash: add Nordic JEDEC QSPI NOR flash driver
Most JEDEC NOR flash devices uses not only typical SPI mode
(MISO,MOSI,SCK and CS), but also QSPI mode (IO0,IO1,IO2,IO3,SCK and CS).
QSPI mode uses more data lines and as a result provide higher
throughput. If this were not enough, Nordic chips provide
hardware acceleration for read/write/erase functions, what
gives significant performance boost.
It does a lot of things "behind the scene", i.e when user has written
some data to the flash and would like to read them back, it has to wait
until the flash is ready by reading WIP bit in Status Register.
This driver does it automatically.

Signed-off-by: Kamil Lazowski <Kamil.Lazowski@nordicsemi.no>
2020-01-29 15:15:49 +01:00
Tomasz Bursztyka
c7cf2bc5f0 dts/bindings: Adding DesignWare USB node description
Corresponding driver will be configured via DTS.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-01-28 18:18:18 -05:00
Tomasz Bursztyka
8d10e66371 drivers/interrupt-controller: Make irqs DT configured in DW
DesignWare driver can manage different amount of irqs so let's make it
configurable via DTS.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-01-28 18:18:18 -05:00
Tomasz Bursztyka
e39571f331 dts: Add the bindings for DesignWare DMA node
This is the first step to enable the relevant driver to be configured
via DTS.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-01-28 18:18:18 -05:00
Francois Ramu
b7a3e7dc31 dts: bindings: dma add support for controller
This patch introduces the periph to/from memory dma transfer
define new values for dma cells on client side

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-01-28 12:58:44 -06:00
Francois Ramu
82799d2ae4 dts: bindings: dma controller supports mem2mem transfer
This checks if the DMA controller supports or not
the memory-to-memory transfers. For DMA Version1,
in the stm32f2xx, stm32f4xx, stm32f7xx series,
only DMA instance 2 is able to transfer mem-to-mem.
For other series, with DMA Version2, there is no such a limitation.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-01-28 12:58:44 -06:00
Ulf Magnusson
52e0dd748f dts: bindings: ps2: Replace 'should be 1/0' comments with 'const: 1/0'
Check with 'const:' that #address-cells is 1 and #size-cells is 0. That
way other values will get flagged by edtlib.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-28 12:48:53 -06:00
Ulf Magnusson
8e476ab692 dts: bindings: semtech,sx1276: Remove redundant document separator
Not needed. Bindings are never concatenated together.

Makes the https://github.com/zephyrproject-rtos/ci-tools/pull/123 check
clean, though it only looks at changed files in PRs.

Clean up the header too.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-27 10:41:31 -06:00
Oane Kingma
437587af20 drivers/ethernet: Add support for SiLabs Giant Gecko GG11
Ethernet MAC present in Silicon Labs EFM32GG11B4xx and
EFM32GG11B8xx SoCs.

DMA based driver with support for link up/down detection.

Signed-off-by: Oane Kingma <o.kingma@interay.com>
2020-01-24 10:28:33 -06:00
Peter Bigot
1a5368a07b drivers: sensor: bma280: convert from Kconfig to devicetree
Define a binding for the Bosch BMA280 sensor.  Remove the Kconfig
settings and update the driver to use the devicetree information.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-24 15:52:09 +01:00
Ulf Magnusson
e25394bca9 dts: bindings: nxp,lpc-iap: Remove deprecated 'title' field
Merge all the information into 'description:' and remove 'title:'.
Gets rid of a deprecation warning.

See commit 2934ee2cda ("dts: bindings: Remove 'title:' and put all info.
into 'description:'").

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-24 10:53:36 +01:00
Kumar Gala
b1602c8e39 arm: Removed support for CC2650
The SoC, driver, and board support for the CC2650 and CC2650 Sensortag
aren't currently supported and we are removing them as such.  If anyone
is interesting in supporting this platform we can easily recovery it
from git.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-01-18 09:27:55 -06:00
Henrik Brix Andersen
30e1a7f7c1 dts: bindings: add binding for the NXP Kinetis SoC temperature sensor
Add device tree binding for the internal temperature sensor found on
the NXP Kinetis SoC series.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-16 17:30:42 -06:00
Andrei Gansari
1cebd314c2 dts: nxp,lpc-iap.yaml
New IAP Flash device for LPC SoC.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-01-16 08:19:46 -06:00
Kumar Gala
5a911ec47f dts: gpio: ti,boosterpack: Remove title as its deprecated
Move title info into description as we've deprecated the title field.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-01-15 11:37:28 -06:00
Kumar Gala
50a23de5af dts: silabs,gecko-spi-usuart: Remove title as its deprecated
Move title info into description as we've deprecated the title field.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-01-15 11:37:28 -06:00
Kumar Gala
ae77fe1369 dts: dht: Remove title as its deprecated
Move title info into description as we've deprecated the title field.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-01-15 11:37:28 -06:00
Peter A. Bigot
11dd504f2a drivers: sensor: ccs811: use device tree for control GPIOs
Replace Kconfig GPIO pin configuration with device tree gpios.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-01-14 15:44:09 -06:00
Benjamin Valentin
fc7f458ab3 flash: sam0: Define LOCK_REGIONS in dts
The amount of lock regions differs between different sam0 MCUs.

	saml10:  2
	saml11:  4
	samd2x:	16
	saml2x: 16
	samd5x: 32

ASF does not provide a definition for this, so create a new one
in dts.

Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2020-01-14 11:12:33 -05:00
Brett Witherspoon
a563247af6 dts: bindings: add GPIO binding for BoosterPack header
This header is found on TI LaunchPad development kits and BoosterPack
expansion modules. This binding allows boards to define mappings from
header pins to device GPIOs.

Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
2020-01-14 15:45:35 +01:00
Henrik Brix Andersen
c989ab8b05 dts: bindings: add binding for RV32M1 Timer/PWM module
Add device tree binding for the Timer/PWM module (TPM) present on the
OpenISA RV32M1 SoC.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-01-13 09:12:34 -06:00
Christian Taedcke
6da94af847 drivers: spi: Add Gecko SPI driver
This commit adds SPI driver and its bindings using the USART peripheral
for Silicon Labs EFM32 and EFR32 MCUs.

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2020-01-10 07:14:35 -06:00
Laczen JMS
ab3ed439c8 drivers: eeprom: Unified simulator and native_posix
EEPROM simulator and native_posix have been unified to one solution,
the old eeprom,native_posix is removed.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2020-01-09 20:28:19 +01:00
Laczen JMS
20623dfa4c drivers: eeprom: Add support for eeprom simulator
Add support for a eeprom simulator. The PR limits the addition to
qemu_x86 but it can easily be added to other devices by defining the
eeprom simulator in the dts and setting 'CONFIG_EEPROM_SIMULATOR=y'

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-09 20:28:19 +01:00
Henrik Brix Andersen
bc2113bd46 drivers: adc: add LMP90xxx ADC driver with GPIO
Add driver for the Texas Instruments LMP90xxx series of multi-channel,
low-power 16-/24-bit sensor analog frontends (AFEs).

The functionality is split into two drivers; an ADC driver and a GPIO
driver.

Tested with LMP90080 and LMP90100.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-09 17:27:52 +01:00
Peter Bigot
fe018f51a2 drivers: sensor: mpu6050: convert to devicetree
Add a binding for the sensor and replace all Kconfig selection of
hardware parameters with devicetree property values.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-08 16:40:04 +01:00
Robert Winkler
56db098a55 drivers: pwm: Add driver for LiteX PWM peripherial
PWM driver for LiteX SoC builder was created.
Because LiteX supports only one channel for each PWM device,
an appropriate restriction was made.

Signed-off-by: Robert Winkler <rwinkler@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2020-01-08 11:04:36 +01:00
Robert Winkler
7f8a70a74b drivers: i2c: Add driver for LiteX I2C controller
This adds I2C bitbang driver for LiteX SoC builder with its bindings.

Signed-off-by: Robert Winkler <rwinkler@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2020-01-07 20:55:43 +01:00
Henrik Brix Andersen
85e1117e94 dts: nxp: kinetis-ftm: add PWM flags cell
Add support for specifying PWM flags for the NXP Kinetis FlexTimer
(FTM) PWM driver through the device tree.

All in-tree clients of this PWM controller are active-low LEDs.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-07 18:13:18 +01:00
Pawel Czarnecki
894b488b06 drivers: entropy: Add driver for LiteX PRBS module
This adds PRBS ranom number generator driver for
LiteX SoC builder with its bindings.

Signed-off-by: Pawel Czarnecki <pczarnecki@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2020-01-06 13:33:25 -05:00
Ulf Magnusson
e9dca5560b dts/bindings: ti,tmp116: Remove unused 'alert-gpios' property
Johann Fischer pointed out that the driver for this sensor
(master/drivers/sensor/tmp116/tmp116.c) doesn't use GPIOs, in
https://github.com/zephyrproject-rtos/zephyr/pull/21605, though there
seems to be an ALERT pin from looking at the datasheet
(http://www.ti.com/lit/ds/symlink/tmp116.pdf).

Remove the unused property declaration.

I was originally just going to change a 'category: optional' to
'required: false' (and 'type: compound' to 'type: phandle-array').
Either solution is fine with me. Could keep the declaration if people
are planning to use it soon.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-04 09:22:38 -05:00
Ulf Magnusson
ac09bb33cf dts/bindings: ti,tmp116: Use 'required' instead of 'category' key
'category' is deprecated. See commit fcd665a26c ("dts: bindings: Have
'required: true/false' instead of 'category: ...'").

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-03 09:43:33 -06:00
Johann Fischer
f6807df469 drivers: display_st7789v: obtain panel settings and parameters from DT
Obtain panel settings and parameters from DT.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-01-02 17:00:06 -05:00
Manivannan Sadhasivam
e47b5f7a65 drivers: lora: Add SX1276 LoRa Modem support
Add support for Semtech SX1276 LoRa Modem.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2019-12-21 12:20:24 +01:00
Ulf Magnusson
86dc23a15d dts: bindings: Remove "provides a base representation" from bindings
Newly-introduced stuff. See
https://github.com/zephyrproject-rtos/zephyr/pull/20793.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-20 19:45:06 -05:00
Ulf Magnusson
0ac6e6bf36 dts: bindings: Remove redundant document separators
Not needed. Prevent them from being copy-pasted.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-20 19:45:06 -05:00
Peter Bigot
0cfac519cc sensor: dht: convert from Kconfig to devicetree
Define a binding for the Aosong DHT family of temperature/humidity
sensors.  Remove the Kconfig settings, and update the driver to use
devicetree information.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-12-19 06:43:37 -06:00
Peter Bigot
bb106390a2 dts: bindings: generalize JEDEC SPI NOR descriptions
Currently most SPI NOR serial flash devices are accessed through the
spi-nor flash driver, but there are pending enhancements that will
access these devices through other driver implementations.  Several of
the descriptive properties of the flash memories are common regardless
of the interface selected.  Pull those out to a separate yaml file to
be included into the bindings for interface-specific node descriptions.

Also revise the documentation to note that the jedec,spi-nor
compatible depends on a commands set compatible with the Micron M25P80
serial nor flash; there is no JEDEC standard for these commands.
These devices do generally provide descriptive structures defined by
JESD216, but currently Zephyr doesn't make use of these structures.
The JEDEC CFI standard previously referenced in the description is not
relevant to these devices.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-12-19 12:37:31 +01:00
Ulf Magnusson
527343dfce dts: bindings: Replace 'child-bus:'/'parent-bus:' with 'bus:'/'on-bus:'
'child-bus:'/'parent-bus:' have been deprecated.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-19 11:02:28 +01:00
Ulf Magnusson
2934ee2cda dts: bindings: Remove 'title:' and put all info. into 'description:'
Add any useful information from 'title:' to the 'description:' strings
(e.g. explanations of acronyms), and remove 'title:' as well as any
copy-pasted "this binding gives a ..." boilerplate.

Also clean some description strings up a bit.

Some other things could probably be cleaned up (replacing 'GPIO node'
with 'GPIO controller' on controllers for consistency, for example), but
I kept things close to the original to avoid accidentally messing up.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-18 11:52:45 +01:00
Gerson Fernando Budke
1a0e8a2e04 dts: ieee802154: rf2xx: Add DTS support
Add a dts binding file for the ATMEL AT86RF23x/212x transceivers.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2019-12-13 11:23:23 +02:00
Kwon Tae-young
a6f5c1bbf6 dts: arm: stm32: add dts support for EEPROM of STM32L1
Add eeprom to STM32L1 series.
Currently supported L1 series EEPROM size is 4Kbyte.

Signed-off-by: Kwon Tae-young <tykwon@m2i.co.kr>
2019-12-12 07:57:33 -06:00
Feng Cheng
ee57c8e749 drivers: flash: Add the flash driver of the stm32f1x family
Most of the code is copied from the stm32f0x family
Tested on stm32f103ze soc

Signed-off-by: Feng Cheng <i@fengch.me>
2019-12-11 12:40:33 -06:00
Ulf Magnusson
984bfae831 global: Remove leading/trailing blank lines in files
Remove leading/trailing blank lines in .c, .h, .py, .rst, .yml, and
.yaml files.

Will avoid failures with the new CI test in
https://github.com/zephyrproject-rtos/ci-tools/pull/112, though it only
checks changed files.

Move the 'target-notes' target in boards/xtensa/odroid_go/doc/index.rst
to get rid of the trailing blank line there. It was probably misplaced.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-11 19:17:27 +01:00
Maureen Helm
30415e9246 dts: Add spi bindings and nodes for lpc socs
Adds spi device tree bindings and nodes for the lpc54xxx and lpc55s6x
socs in preparation for adding a new spi driver.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-12-10 08:48:56 -06:00
Carlo Caione
7baf3f74a9 interrupt_controller: gic: Support PPIs
The GIC-400 driver currently only supports SPIs because the (32) offset
for the INTIDs is hard-coded in the driver. At the driver level there is
no really difference between PPIs and SPIs so we can easily extend the
driver to support PPIs as well.

This is useful if we want to add support for the ARM Generic Timers that
use INTIDs in the PPI range.

SPI interrupts are in the range [0-987]. PPI interrupts are in the range
[0-15].

This commit adds interrupt 'type' cell to the GIC device tree binding
and changes the 'irq' cell to use interrupt type-specific index, rather
than a linear IRQ number.

The 'type'+'irq (index)' combo is automatically fixed up into a linear
IRQ number by the scripts/dts/gen_defines.py script.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2019-12-10 06:59:55 +01:00
Henrik Brix Andersen
94b509ba9f dts: bindings: nxp: lpi2c: add bus idle timeout property
Add property for specifying the bus idle timeout for the NXP
i.MX/Kinetis LPI2C I2C controller.

Enabling the bus idle timeout helps the controller to recover from
e.g. EMC causing false clock pulses/spikes on the SCL line.

Without a timeout the LPI2C controller will assume that another bus
master took over the I2C bus and thus refuses to issue a I2C START
condition.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-12-09 16:01:38 -06:00
Thomas Schmid
9a06428244 sensor: add ms5607 sensor
Implement a driver for the te connectivity ms5607 pressure and
temperature sensor.

Signed-off-by: Thomas Schmid <tom@lfence.de>
2019-12-09 12:22:25 -06:00
Ulf Magnusson
fc5cd772da scripts: dts: Accept 'status = "ok"'
Erroring out for 'status = "ok"' broke backwards compatibility for a
downstream project. Accept it instead.

Maybe the error could be selectively re-enabled later.

The rest of the code only checks for 'status = "disabled"' (like the old
scripts), so no other updates are needed.

(It's a bit weird that we duplicate the property check in base.yaml.
Thinking of including base.yaml implicitly. Could clean things up then.)

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-09 12:49:32 -05:00
Olof Kindgren
754d56891e drivers: interrupt_controller: Add SweRV PIC support
Add support for the built-in Programmable Interrupt Controller
found in the SweRV EH1 RISC-V CPU

Signed-off-by: Olof Kindgren <olof.kindgren@gmail.com>
2019-12-09 12:46:56 -05:00
Andrzej Głąbek
69c75c7267 drivers: spi: nrfx: Move MISO lines pull configuration to DT
After switching to nrfx 2.0.0, the Kconfig choice options that allowed
enabling of pull-up or pull-down for MISO lines in SPIs and SPIMs are
not properly supported, they are simply ignored. This commit restores
the possibility of applying pull configuration for MISO lines.

In earlier nrfx versions, the MISO pull configuration could be only
set globally, in nrfx_config files, for all SPI and SPIM instances
together. Since nrfx 2.0.0, this configuration can be applied per
instance. This commit takes advantage of this possibility and instead
of using a common Kconfig option as a global setting for all instances,
allows applying individual instance settings via devicetree.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-12-09 16:08:39 +01:00
Marcin Niestroj
ea0b6a80a8 dts: bindings: lsm303agr: add new bindings based on lis2dh
Add new bindings for already supported (by lis2dh.c driver) lsm303agr
accelerometer. Using st,lsm303agr-accel compatible will allow in
subsequent commit to apply different sensitivity scale.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2019-11-13 14:43:25 -06:00
Andrei Gansari
2e27363e67 dts: NXP LPC gpio updates
NXP's LPC family of MCU's GPIOs parameters is udated.
Boards LPC54xxx and LPC55xxx have updated values according
pin and interrupt layout.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2019-11-13 12:05:48 -06:00
Peter A. Bigot
4107bdd264 dts: improve documentation for arduino-header-r3
Provide a clear description of the how the binding maps nexus parent
pin indexes to header pin locations.  Also use the standard name "Uno"
when identifying the header physical layout, contrasted with Mega/Due
which is a different physical layout.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-11-13 09:12:14 -06:00
Peter A. Bigot
920d477264 dts: jedec,spi-nor: add support for deep-power-down specification
Provide information required to allow the driver to put the flash chip
into a deep power down mode.  This can reduce standby current by as
much as 90%.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-11-09 15:26:06 +01:00
Peter A. Bigot
e4c3729ba7 drivers: spi_nor: generalize support for ULBPR instruction
Replace the hard-coded check for JEDEC IDs with a property that must
be set in the devicetree entry.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-11-09 15:26:06 +01:00
Peter A. Bigot
f83ad78261 dts: jedec,spi-nor: require size property
The SPI NOR driver requires that the size (in bits) be provided in the
devicetree node.  Update the binding to make the property required,
and update all nodes based on the memory chip identified.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-11-09 15:26:06 +01:00
Ioannis Glaropoulos
b15ce8800d dts: arm: nordic: nRF5340 Application MCU DTS structure
- Adding nRF5340 Application (CPU APP) common (Secure/Non-Secure)
peripheral DTS representation.
- Adding nrf5340 Application (CPU APP) default (Secure)
 .dtsi headers
- Adding nrf5340 Application (CPU APP) Non-Secure
 .dtsi headers
- Added nRF53 flash controller binding

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-08 19:26:35 +01:00
Kevin Townsend
740f6868a5 sensor: hmc5883l: convert to device tree
This commit converts the existing hcm5883l 3-axis magnetometer
driver to use device tree for the I2C and GPIO selection.

It also adds a basic sample application for this sensor, using the
frdm-k64f development board to demonstrate how the interrupt
GPIO pin and I2C bus can be selected.

Signed-off-by: Kevin Townsend <kevin@ktownsend.com>
2019-11-08 12:12:38 -06:00
Francois Ramu
0ae7023405 driver: timer: st_stm32: add lptimer management to stm32xx series
This patch introduces the support of the LowPower Timer
 for the STM32xx from STMicroelectronics.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2019-11-08 10:04:21 -06:00
Alex Porosanu
2a1dab5664 dts: bindings: add modem binding for RV32M1 Generic FSK node
The Generic FSK controller enables radio operation
using a custom GFSK/GMSK or MSK modulation format
achieved by programming a set of PHY variables such
as BT product

This binding describes the devices and its associated properties.

Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
2019-11-08 15:38:57 +01:00
Kumar Gala
36c94ddd36 sensor: bmc150_magn: Convert to DTS
Convert bmc150_magn sensor driver to utilize device tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-08 07:44:54 -06:00
Kumar Gala
62f5ac1ad4 sensor: bmg160: Convert to DTS
Convert bmg160 sensor driver and sample app to utilize device tree.

Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-08 07:44:54 -06:00
Kumar Gala
7b8b5524be sensor: bmm150: Convert to DTS
Convert bmm150 sensor driver and sample app to utilize device tree.

Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-08 07:44:54 -06:00
Kumar Gala
3700a46632 sensor: hp206c: Convert to DTS
Convert hp206c sensor driver to utilize device tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-08 07:44:54 -06:00
Kumar Gala
c2aa25b358 sensor: isl29035: Convert to DTS
Convert isl29035 sensor driver to utilize device tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-08 07:44:54 -06:00
Kumar Gala
ddddbf9f84 sensor: max44009: Convert to DTS
Convert max44009 sensor driver and sample app to utilize device tree.

Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-08 07:44:54 -06:00
Kumar Gala
30ea840eb1 sensor: mcp9808: Convert to DTS
Convert mcp9808 sensor driver and sample app to utilize device tree.

Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-08 07:44:54 -06:00
Kumar Gala
03c7cb4f46 sensor: sx9500: Convert to DTS
Convert sx9500 sensor driver and sample app to utilize device tree.

Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-08 07:44:54 -06:00
Kumar Gala
c7fae66952 sensor: tmp007: Convert to DTS
Convert tmp007 sensor driver to utilize device tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-08 07:44:54 -06:00
Kumar Gala
b388b178a0 sensor: tmp112: Convert to DTS
Convert tmp112 sensor driver and sample app to utilize device tree.

Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-08 07:44:54 -06:00
Kumar Gala
0e9e67297e sensor: th02: Convert to DTS
Convert th02 sensor driver and sample app to utilize device tree.

Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-08 07:44:54 -06:00
Henrik Brix Andersen
cd6739b9b2 dts: bindings: eeprom: add binding for zephyr native posix EEPROM
Add device tree binding for representing a Zephyr native POSIX EEPROM
device.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-11-07 16:32:15 -05:00
Henrik Brix Andersen
6d18f095d6 dts: bindings: eeprom: add EEPROM device tree bindings
Add device tree binding for Atmel AT25 (and compatible) SPI
EEPROMs. Update the curent Atmel AT24 I2C EEPROM binding to match.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-11-07 16:32:15 -05:00
Kumar Gala
7185055b38 sensor: lis3mdl-magn: Convert GPIO INT to device tree
Update lis3mdl-magn dts binding to include GPIO interrupt pin and change
driver code to get the GPIO pin and controller info from DT instead of
Kconfig.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-06 17:10:49 +01:00
Song Qiang
f0d3ee52fb drivers: i2s: change the stm32 DMA in the driver to use dts
This commit moves DMA parameters previously hard coded in the driver
to the dts.

Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-06 14:14:39 +01:00
Song Qiang
8fa9fecd8c dt-bindings: add support for parsing stm32 dma consumer cells
Add support for parsing stm32 dma consumer cells, format of which
follows dma dts format declared in the Linux Kernel for the dma of
stm32:
https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git/plain/Bindings/dma/stm32-dma.txt

Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
2019-11-06 14:14:39 +01:00
Song Qiang
399c847865 dt-bindings: add generic dma controller description support
Add a yaml file for help describing generic dma controllers.

Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-06 14:14:39 +01:00
Kumar Gala
819276e082 sensor: ccs811: Convert GPIOs to device tree
Update ccs811 dts binding to include GPIO pins for wakeup, reset, and
interrupt and change driver code to get the GPIO pin and controller
info from DT instead of Kconfig.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-06 11:13:04 +01:00
Kumar Gala
cd35a4a753 sensor: vl53l0x: Convert GPIO XSHUT to device tree
Update vl53l0x dts binding to include GPIO XSHUT pin and change
driver code to get the GPIO pin and controller info from DT instead of
Kconfig.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-05 15:07:18 -06:00
Kumar Gala
b09b773bb5 sensor: nrf5: Convert name to come from device tree
Update the binding for nordic,nrf-temp to require the label property and
use the generated define (DT_INST_0_NORDIC_NRF_TEMP_LABEL) instead of
Kconfig symbol (CONFIG_TEMP_NRF5_NAME).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-05 19:56:28 +01:00
Marcin Niestroj
afa5183ee3 sensors: lis2dh: support disabling SDO/SA0 pull-up during init
Some chips supported by lis2dh driver (such as LIS2DH12 and LIS3DH)
contain CTRL_REG0 (1Eh) register to control internal pull-up on SDO/SA0
line (enabled by default). Add disconnect-sdo-sa0-pull-up boolean
device-tree property to allow disconnecting pull-up during driver
initialization. This allows to save around 180uA at 3.6V in
accelerometer power-down mode.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2019-11-05 19:40:12 +01:00
Marcin Niestroj
320755b783 dts: bindings: lis2dh: create a common st,lis2dh-common.yaml
Create a common binding file that will be included by all bindings
handled by lis2dh.c driver. For now this includes optional irq-gpios
property.

Use introduced st,lis2dh-common.yaml in st,lsm303dlhc-accel.yaml in
order to support defining irq-gpios.

Also improve description of st,lis2dh-i2c.yaml to better match what can
be found in st,lis2dh-spi.yaml.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2019-11-05 19:40:12 +01:00
Karsten Koenig
ee2dd7322f drivers: spi: rv32m1: Add driver for RV32M1 LPSPI
Add SPI driver and bindings for LPSPI peripheral for the RV32M1 SOC.
Based heavily on the existing mcux LPSPI driver.

Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
2019-11-04 14:11:18 -06:00
Karsten Koenig
e031477892 dts: bindings: vendor-prefixes: add openisa
OpenISA is used as vendor for drivers for the rv32m1 cores.

Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
2019-11-04 14:11:18 -06:00
Mohamed ElShahawi
21096b0316 esp32: pinmux: Add Device tree support
- Add PINMUX module to esp32.dtsi

Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
2019-11-04 19:45:50 +01:00
Mohamed ElShahawi
2d2f4de5b8 drivers: watchdog: esp32: Add Watchdog Device tree support
- Add WDT(0,1) to esp32.dtsi
- Extend the module to be able to use WDT(0,1)
- Some minor refactoring due to usage of device tree

Tests:
- samples/drivers/watchdog
- tests/drivers/watchdog/wdt_basic_api

Note:
- timer module interrupt registers shall be removed when
timer driver implemented.

Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
2019-11-04 18:00:36 +01:00
Peter Bigot
51d19cbbee dts: bindings: semtech,sx1509b: add fixed ngpios property
Unlike most other GPIO controllers which support 32 pins this device
only supports 16.  (There is an SX1508B that has 8 pins, but the
driver doesn't support it.)

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-11-01 07:37:29 +01:00
Manivannan Sadhasivam
38d72df5d4 dts: bindings: gpio: Add binding for 96Boards Low speed 1.8v header
All 96Boards complying to the IE spec exposes either 40pin or 30pin
standard low speed connectors for peripheral connectivity. These
connectors are well defined and available in the IE spec. So, lets
create a devicetree binding for the 40pin header for the 1.8v IE
96Boards. This binding will be utilized by the 96Boards
for exposing the GPIO pins as nexus node as per the devicetree spec.

This will allow the shields and applications to use board independent
GPIO mapping.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2019-10-30 08:31:46 +01:00
Manivannan Sadhasivam
5aab339c33 dts: bindings: gpio: Add binding for 96Boards Low speed 3.3v header
All 96Boards complying to the IE spec exposes either 40pin or 30pin
standard low speed connectors for peripheral connectivity. These
connectors are well defined and available in the IE spec. So, lets
create a devicetree binding for the most commonly used 30pin header
for the 3.3v IE 96Boards. This binding will be utilized by the 96Boards
for exposing the GPIO pins as nexus node as per the devicetree spec.

This will allow the shields and applications to use board independent
GPIO mapping.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2019-10-30 08:31:46 +01:00
Ulf Magnusson
b9240a3cbc dts: bindings: Preserve newlines in descriptions
With https://github.com/zephyrproject-rtos/zephyr/pull/20185, multi-line
descriptions will be formatted nicely, but using '>' breaks it, because
it removes internal newlines (including between paragraphs).

See https://yaml-multiline.info/.

Replace 'description: >' with 'description: |' to encourage '|'. That'll
prevent '>' from getting copied around and messing up long descriptions.

This will lead to some extra newlines in the output, but it's fine.
Line-wrapping messes up any manual formatting.

The replacement was done with

    $ git ls-files 'dts/bindings/*.yaml' | \
          xargs sed -i 's/description:\s*>/description: |/'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-30 07:55:51 +01:00
Andrzej Głąbek
27481a7dc0 dts: Add bindings for Nordic nRF family IPC and RNG peripherals
Add bindings for Nordic nRF family peripherals:
- IPC (Interprocessor Communication)
- RNG (Random Number Generator)

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-10-28 15:36:25 +01:00
Loic Poulain
92ee992e7c drivers: video: Add Aptina MT9M114 driver
MT9M114 is a CMOS digital image sensor.
Implement video interface.
Only VGA (640x480) supported for now.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-10-25 15:13:53 -05:00
Loic Poulain
a019e92d23 soc: nxp: rt: Add CSI video support
Add CSI node to generic nxp rt dtsi.
Add corresponding dts binding.
Add CSI capability for rt MCUs.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-10-25 15:13:53 -05:00
Peter Bigot
e0aad0c94d boards: nrf52_pca20020: add missing accelerometer support
The Thingy:52 has a LIS2DH12 low-power accelerometer on the external
I2C bus.  Add the necessary description to devicetree.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-10-25 11:02:58 -05:00
Henrik Brix Andersen
e92b108c70 dts: nxp: kinetis-ke1xf-sim: make clkout properties optional
Make the clkout properties of the NXP Kinetis SIM module device tree
bindings optional since not all boards rely on this clock signal for
clocking external peripherals.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-10-24 12:43:48 -05:00
Mohamed ElShahawi
55471982f6 esp32: drivers: Add Entropy Device tree support
- Add TRNG module to esp32.dtsi
- Updated the note about TRNG register address

Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
2019-10-24 09:09:41 -05:00
Scott Worley
c8b1eb79a1 drivers : spi : mec1501 : XEC SPI driver
SPI driver for MEC1501 QMSPI supporting synchronous only.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2019-10-23 19:18:32 -07:00
Kumar Gala
28d060513c arm: mps2: Convert gpio to use device tree
Add binding for arm,mps2-fpgaio-gpio and update device tree and change
FPGA GPIO init code to utilize device tree defines.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-10-23 10:26:56 -05:00
Kumar Gala
ff031032bf dts: binding: gpio: add ngpios property
Add ngpios property that conveys the number of gpios supported on a
given controller.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-10-23 10:26:56 -05:00
Olof Kindgren
d09614ab59 drivers: spi: Add simple_spi driver
Add support for the OpenCores simple_spi controller

Signed-off-by: Olof Kindgren <olof.kindgren@gmail.com>
2019-10-22 15:54:03 -05:00
Carles Cufi
485e22b4f0 dts: bindings: Fix u-blox misspelling
Spell ublox correctly.

Fixes #19867.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-10-22 14:34:09 -05:00
Mohamed ElShahawi
566d07e00c [ESP32] drivers: Add I2C Device tree support
- Add I2C modules to esp32.dtsi
- I2C Pins and bitrate config moved to esp32.dts

Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
2019-10-22 08:01:24 -05:00
Henrik Brix Andersen
e4f191aaf6 soc: nxp: ke1xf: set ip clock in dts
Move the selection of the IP clock source for the modules in the NXP
Kinetis KE1xF SoCs from being hardcoded in soc.c to being specified in
the device tree.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-10-21 15:40:04 -05:00
Daniel Craviee
256c5c4e17 drivers: spi: Add LiteX SPI driver
This commit adds LiteX SPI drivers and its bindings.

Signed-off-by: Daniel Craviee <dcraviee@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2019-10-21 08:40:09 -05:00
Pawel Czarnecki
51b009d045 dts: litex: add LiteX SoC builder vendor
Add LiteX SoC builder vendor with prefix "litex".

Signed-off-by: Pawel Czarnecki <pczarnecki@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2019-10-21 08:40:09 -05:00
Ulf Magnusson
f79fbac101 dts: bindings: Fix typo'd nxp,kinetis-ptp.yaml name
Had a period after "nxp" instead of a comma.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-17 23:29:40 +02:00
Francisco Munoz
8a12d40a72 dts: bindings: kscan: Add dts entries and bindings for kscan
Indtroduction of generic device tree bindings for keyboard scan devices.
In addition, device tree node entries and dt specific bindings where
also implemented for Microchip MEC1501

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2019-10-16 13:29:21 -07:00
Iosif Macesanu
24508a777d drivers: sensor: Add OPT3001 light sensor driver
Add OPT3001 light sensor driver

Signed-off-by: Iosif Macesanu <iosif@actinius.com>
2019-10-16 14:51:07 -05:00
Iosif Macesanu
884485667d drivers: sensor: Add SI7060 temperature sensor driver
Add SI7060 temperature sensor driver

Signed-off-by: Iosif Macesanu <iosif@actinius.com>
2019-10-16 14:48:12 -05:00
Stephanos Ioannidis
2a613c4699 dts: bindings: Add CPU device bindings for Cortex-R.
This commit adds device bindings for Cortex-R4(F) and Cortex-R5(F).

These were supposed to be added during the initial development of
Cortex-R port, but it was not due to an incorrect device tree
specification.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2019-10-11 16:27:14 +02:00
Kumar Gala
df311fc36a dts/bindings: Remove intel,intel-spi.yaml
There is no code that utilizes this binding so remove it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-10-10 10:52:32 -05:00
Alexander Wachter
8b214117ec drivers: CAN: MCP2515: Move OSC frequency definition to device-tree
Move the oscillator frequency definition from Kconfig to device-tree.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-10-09 06:27:53 -05:00
Krzysztof Chruscinski
a3ff7f54ab drivers: counter: nrf_rtc: Add detection of late alarm request
Implemented latest extensions to the counter API related to
detection of alarms being set too late and short relative alarms.
Implementation could not be realized on nrfx_rtc driver thus
driver has been reimplemented based on nrf_rtc hal.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-10-09 13:25:36 +02:00
Richard Osterloh
c68e027c28 drivers: flash: Add STM32G4X flash support
Add flash driver support for STM32G4X SoC series.

Signed-off-by: Richard Osterloh <richard.osterloh@gmail.com>
2019-10-04 18:44:24 -07:00
Ioannis Konstantelias
83d4dc8b5e dts: bindings: sensor: Support TMP116
Added support for TMP116 in dts.

Signed-off-by: Ioannis Konstantelias <ikonstadel@gmail.com>
2019-10-04 15:31:56 -05:00
Andrzej Głąbek
e2ac56f55b dts: nordic: Add #pwm-cells property to Nordic PWM nodes
Add #pwm-cells property in bindings for Nordic PWMs and add this
property with a suitable value assigned to all PWM nodes in dts
files for Nordic SoCs.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-10-04 17:21:32 +02:00
Ulf Magnusson
ecf2563b47 bindings: nordic,nrf-rtc.yaml: Do not require 'ppi-wrap' property
Looking at the code, this flag was probably made 'required: true' by
mistake. Combining 'type: boolean' with 'required: true' for 'ppi-wrap'
means that all nodes that use this binding are required to have a
'ppi-wrap;' property.

The mistake was hidden by a bug in edtlib (failing to flag missing
'required: true' booleans).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-03 05:41:23 -07:00
Ulf Magnusson
567c348167 scripts: dts: Generalize '#cells' to allow multiple sources
Implement a nice generalization suggested by Bobby Noelte.

Instead of having a generic #cells key in bindings, have source-specific
*-cells keys. Some examples:

    interrupt-cells:
        - irq
        - priority
        - flags

    gpio-cells:
        - pin
        - flags

    pwm-cells:
        - channel
        - period

This makes bindings a bit easier to read, and allows a node to be a
controller for many different 'phandle-array' properties.

The prefix before *-cells is derived from the property name, meaning
there's no fixed set of *-cells keys. This is possible because of the
earlier 'phandle-array' generalization.

The older #cells key is supported for backwards compatibility, but
generates a deprecation warning.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-02 11:49:58 -07:00
Ulf Magnusson
b97ed9e4b4 scripts: dts: Generalize handling of phandle-array types
Generating generic information for 'type: phandle-array' properties in
edtlib was difficult due to defining phandle-array as just a list of
phandles and numbers. To make sense of a phandle-array property like
'pwms', you have to know that #pwm-cells is expected to appear on
each referenced controller, and that the binding for the controller has
a #cells.

Because of this, handling of various 'type: phandle-array' properties
was previously hardcoded in edtlib and exposed through properties like
Node.pwms, instead of through the generic Node.props (though with a lot
of shared code).

In practice, it turns out that all 'type: phandle-array' properties in
Zephyr work exactly the same way: They all have names that end in -s,
the 's' is removed to derive the name of related properties, and they
all look up #cells in the binding for the controller, which gives names
to the data values.

Strengthen the definition of 'type: phandle-array' to mean a property
that works exactly like the existing phandle-array properties (which
also means requiring that the name ends in -s). This removes a ton of
hardcoding from edtlib and allows new 'type: phandle-array' properties
to be added without making any code changes.

If we ever need a property type that's a list of phandles and numbers
but that doesn't follow this scheme, then we could add a separate type
for it. We should check if the standard scheme is fine first though.

The only property type for which no information is generated is now
'compound'.

There's some inconsistency in how we generate identifiers for clocks
compared to other 'type: phandle-array' properties, so keep
special-casing them for now in gen_defines.py (see the comment in
write_clocks()).

This change also enabled a bunch of other simplifications, like reusing
the ControllerAndData class for interrupts.

Piggyback generalization of *-map properties so that they work for any
phandle-array properties. It's now possible to have things like
'io-channel-map', if you need to.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-26 15:30:23 -07:00
Yannis Damigos
53c790e79a bindings/gpio: Add missing property "gpio-cells"
Add missing property "gpio-cells".

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2019-09-26 12:35:28 -07:00
Andrzej Głąbek
f43bae38e8 dts: Use separate compatibles for Nordic SPI/SPIM/SPIS peripherals
This commit introduces separate "compatible" strings for DTS nodes
representing different types of Nordic SPI peripherals. Previously
"nordic,nrf-spi" was used for both SPI and SPIM. SPIS was already
handled separately.

Quite a few files need to be touched by this commit but the changes can
be divided into groups of related or very similar ones, distinguishable
by the initial part of the path to the modified file:

* dts/bindings/spi/
  new binding for "nordic,nrf-spim" is added and common fields for all
  3 types of Nordic SPI peripherals are extracted to a shared file

* dts/arm/nordic/
  "compatible" properties in spiX nodes are updated (when there is no
  choice as only one type of SPI peripheral is available) or replaced
  with a comment pointing out that the proper type of peripheral needs
  to be picked at some upper layer

* drivers/spi/
  spi_nrfx_spim driver is updated with the new form of macros generated
  from dts

* boards/
  all spiX nodes in dts files for boards equipped with an nRF chip are
  updated with the proper "compatible" property, according to the type
  of SPI peripheral that is currently selected for the board by the
  corresponding Kconfig choice option (SPI_x_NRF_SPI*)

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-09-26 19:13:17 +02:00
Andrzej Głąbek
dd4c57d564 dts: Use separate compatibles for Nordic TWI/TWIM/TWIS peripherals
This commit introduces separate "compatible" strings for dts nodes
representing different types of Nordic TWI peripherals. Previously
"nordic,nrf-i2c" was used for both TWI and TWIM, and TWIS was not
supported.

Quite a few files need to be touched by this commit but the changes can
be divided into groups of related or very similar ones, distinguishable
by the initial part of the path to the modified file:

* dts/bindings/i2c/
  new bindings for "nordic,nrf-twim" and "nordic,nrf-twis" are added
  and the one for "nordic,nrf-i2s" is renamed to "nordic,nrf-twi",
  common fields for all these bindings are extracted to a shared file

* dts/arm/nordic/
  "compatible" properties in i2cX nodes are updated (when there is no
  choice as only one type of TWI peripheral is available) or replaced
  with a comment pointing out that the proper type of peripheral needs
  to be picked at some upper layer

* drivers/i2c/
  both flavors of i2c_nrfx drivers are updated with the new names of
  macros generated from dts

* boards/
  all i2cX nodes in dts files for boards equipped with an nRF chip are
  updated with the proper "compatible" property, according to the type
  of TWI peripheral that is currently selected for the board by the
  corresponding Kconfig choice option (I2C_x_NRF_TWI*)

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-09-26 19:13:17 +02:00
Ulf Magnusson
ef0283b604 bindings: hwinfo: Remove deprecated syntax in LiteX DNA binding
Use the new 'compatible:' and 'include:' syntaxes, and clean it up like
for other bindings.

Shorten the description, because it appears in the output as a comment
above the generated macros, and it looks neater. I asked Mateusz what
kind of device it is.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-26 05:54:50 -07:00
Ulf Magnusson
d8705656db dts: bindings: Remove deprecated syntax for ESP32 GPIO and NRF PWM
Use the new 'compatible:', 'include:', and 'required:' keys, and clean
it up like other bindings.

Shorten the 'description:' text, because it appears in the output as a
comment above the generated macros, and it looks neater.

Fixes: #19385

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-25 20:57:08 -07:00
Jim Paris
4aaa08acfd drivers: pwm_nrfx: Add support for center-aligned mode
Add support for up-and-down counter mode, which aligns the center of
each channel's pulses instead of their initial edges.  This is enabled
on a PWM periphral by adding the "center-aligned" property to the
device tree, e.g.:

    &pwm0 {
        status = "okay";
        center-aligned;
        ch0-pin = <15>;
        ch1-pin = <17>;
        ch1-inverted;
    };

Signed-off-by: Jim Paris <jim@jtan.com>
2019-09-25 17:42:53 +02:00
Yannis Damigos
efec7f73b7 dts: esp32: Add GPIO support in DT
Add GPIO support in DT

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2019-09-25 17:39:42 +02:00
Oane Kingma
536e785b93 drivers: (le)u(s)art_gecko: use DT defined clock identifiers
Use the device tree to assign the correct peripheral clock to each
UART/USART/LEUART. Previously, the clock identifier was determined
through the sequence number of the instantiated UART. This meant
configuring all UARTs when only one of the later UARTs was required.

Signed-off-by: Oane Kingma <o.kingma@interay.com>
2019-09-25 03:43:47 -07:00
Tomasz Bursztyka
82bbf5c319 dts/bindings: Add the representation for Microchip's XEC ADC
Found on MEC1501.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-09-25 06:12:52 -04:00
Jakub Wegnerowski
ab1ba3d4cf drivers: hwinfo: Add LiteX DNA driver
This commit adds driver supporting reading DNA ID value for LiteX SoC
builder.

Signed-off-by: Jakub Wegnerowski <jwegnerowski@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2019-09-21 21:36:00 +02:00
Jose Alberto Meza
ac16bf7f4c dts: espi: Cleanup eSPI block device tree
Move MCHP-defined NVIC interrupts to interrupts field.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2019-09-20 14:30:40 -04:00
Tomasz Bursztyka
6a56b868a5 dts/bindings: Adding Microchip's XEC PWM
Found on MEC1501.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-09-19 20:45:37 -04:00
Vincent Wan
aeb8d017b5 drivers: timer: add RTC support as system clock for CC13X2/CC26X2
Add RTC timer driver for CC13X2/CC26X2, and use it instead of systick
as system clock. It is necessary to use this timer for power
management support, so that the system can exit from deep sleep upon
expiry of timeouts.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-09-19 13:43:10 -05:00
Ulf Magnusson
0b1ab4ab09 scripts: dts: Replace 'sub-node:' with more general 'child-binding:'
Deprecate 'sub-node:' and add a more general 'child-binding:' mechanism
to bindings. Keep supporting 'sub-node:', but print a deprecation
warning when it's used.

Like 'sub-node:', 'child-binding:' gives a binding to child nodes, but
the binding is required to be a complete binding, and is treated (and
checked) like a normal binding.

'child-binding:' can in turn contain another 'child-binding:', up to any
number of levels. This is automatic from treating it like a normal
binding, and from the code initializing parent Devices before child
Devices.

This lets nodes give bindings to grandchildren.

For example, take this devicetree fragment:

    parent {
            compatible = "foo";
            child-1 {
                    grandchild-1 {
                            ...
                    };
                    grandchild-2 {
                            ...
                    };
            };
            child-2 {
                    grandchild-3 {
                            ...
                    };
            };
    };

The binding for 'foo' could provide bindings for grandchild-1/2/3 like
this:

    compatible: "foo"

    # Binding for children
    child-binding:
        title: ...
        description: ...

        ...

        # Binding for grandchildren
        child-binding:
            title: ...
            description: ...

            properties:
                ...

Due to implementation issues with the old devicetree scripts, only two
levels of 'child-binding:' is supported for now. This limitation will go
away in Zephyr 2.2.

Piggyback shortening 'description:' and 'title:' in some bindings that
provide child bindings. This makes the generated header a bit neater.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-19 08:39:22 -05:00
Kumar Gala
89f92ab0f8 arc: Remove bogus references to intel,qmsi-ss-{gpio,i2c}
The arc_iot.dtsi used "intel,qmsi-ss-gpio" and "intel,qmsi-ss-i2c"
compatiables, however we have no drivers for these and it seems wrong
that the ARC platform would utilize such compatiables.  Remove the
compatiable fields for now (proper one's can be added when there are I2C
and GPIO drivers for this platform).

Also remove the binding files associated with "intel,qmsi-ss-gpio" and
"intel,qmsi-ss-i2c" as nothing in tree utilizes them.

Fixes: 19227

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-18 22:32:01 -04:00
Francisco Munoz
1b341433ce dts: ps2: Fix yaml warning for PS/2
Use the new child-bus: field

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2019-09-18 22:25:18 -04:00
Johann Fischer
8dcd06ff7c drivers: ssd16xx: use bytestring property for LUT and parameters
Use bytestring property for LUT, gdv, sdv and
softstart parameter.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-18 15:00:38 -05:00
Anas Nashif
f9fd831195 dts: remove unused QMSI bindings
QMSI bindings are not being used anymore, no platforms using QMSI.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-18 11:06:18 -05:00
Francisco Munoz
623f99199b dts: bindings: ps2: Add dts bindings for PS/2
Introduction of generic device tree bindings for PS/2 devices

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2019-09-18 13:23:52 +08:00
Ulf Magnusson
1ebe945643 scripts: dts: Change 'child/parent: bus: ...' to 'child/parent-bus:'
Instead of

    child:
        bus: foo

    parent:
        bus: bar

, have

    child-bus: foo

    parent-bus: bar

'bus' is the only key that ever appears under 'child' and 'parent'.

Support the old keys for backwards compatibility, with a deprecation
warning if they're used.

Also add 'child/parent-bus' tests to the edtlib test suite. It was
untested before.

I also considered putting more stuff under 'child' and 'parent', but
there's not much point when there's just a few keys I think. Top-level
stuff is cleaner and easier to read.

I'm planning to add a 'child-binding' key a bit later (like 'sub-node',
but more flexible), and child-* is consistent with that.

Also add an unrelated test-bindings/grandchild-3.yaml that was
accidentally left out earlier.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-17 14:37:43 -05:00
Charles E. Youse
3038209695 drivers/timer/hpet.c: migrate to devicetree
This driver was still using CONFIG_* values to determine its address,
IRQ, etc. Add a binding for an "intel,hpet" device and migrate this
driver to devicetree.

Fixes: #18657

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-17 22:37:09 +08:00
Johann Fischer
2388e3169c drivers: ssd1306: add DT properties to support 128x32 display
Add DT properties to support 128x32 display.

Fixes: #13725

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-17 06:49:37 -05:00
Johann Fischer
feef83d864 drivers: amg88xx: rework sensor driver to use DT
Rework sensor driver to use DT.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-17 06:27:21 -05:00
Armando Visconti
871d132577 driver/sensor: add IIS3DHHC accelerometer sensor
Add support to STM IIS3DHHC the ultra-low noise, high-stability
three-axis linear accelerometer.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-09-16 14:07:56 -05:00
Tomasz Bursztyka
0c8f9e3284 dts/bindings: Adding Microchip's XEC basic timer
4 instance are for instance found on the MEC150x.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-09-14 12:13:49 +08:00
Armando Visconti
b7944510a4 dts/bindings: sensors: remove '-magn' extension from lis2mdl name
The LIS2MDL is not a combo device, but pure magnotemeter.
Hence, '-magn' extension is not adding information and can
be removed from dts compatible name as well as binding filename.

Instead specify '-i2c' or '-spi' to distinguish between the names.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-09-12 07:58:34 -05:00
Johann Fischer
d8d7782790 drivers: eth: add driver for ENC424J600 Ethernet Controller
Add driver for ENC424J600 Ethernet Controller.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-12 11:30:19 +03:00
Ioannis Konstantelias
1db2685b57 dts: stm32: Add WWDG in STM32 dtsi files
Added System WWDG support for STM32 devices.

Signed-off-by: Ioannis Konstantelias <ikonstadel@gmail.com>
2019-09-11 22:13:36 -05:00
Kumar Gala
57b10d0922 dts: nxp: ke1xf: Introduce nxp,kinetis-ke1xf-sim
The KE1xF SoC family SIM unit differs from the other Kinetis family
SoCs.  Add a unique compatiable and binding for it.

Fixes #18160

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-11 11:18:35 -05:00
Mohamed ElShahawi
2fa48c879a dts: uart: move hw-flow-control to uart.yaml
- hw-flow-control added to uart.yaml as it is a common feature
- cleanup other related yaml files
- change property 'category' to 'rquired' in yaml files

Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
2019-09-11 07:50:20 -05:00
Mohamed ElShahawi
0705be344c drivers: esp32: UART Fix yaml/dts binding name
replace "xtensa" with "espressif", as the latter is the correct
vendor name.

Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
2019-09-11 07:50:20 -05:00
Mohamed ElShahawi
2d035c4191 drivers: esp32: Add UART Driver with FIFO/Interrupt support
- Fixes #3981
- Implement UART Polling functions
- Implement UART Interrupt APIs
- Remove dependency on esp32_rom_uart_xxx functions
- Update Device tree with UART addresses and pin config
- Update ESP32 UART KConfig

Notes about implementation:
- Interrupts now defined as a local macros, and should be removed
later on, when interrupts for esp32 are supported in dts

- Threshold interrupts are used for TX/RX
- Reseting FIFOs using _RST bit will corrupt FIFO of UART2 when used for
UART1 and vice-versa, so a generic way is used for all three UARTs

- Old Silicon rev is not supported

Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
2019-09-11 07:50:20 -05:00
Andrzej Głąbek
a19356d79b dts: nordic: nrf9160: Add missing peripheral nodes
For quite a few peripherals that are currently supported by nrfx HALs
or drivers there are no definitions of corresponding CMSIS-Core
peripheral accessing symbols that would provide their base addresses
in the proper domain (secure or non-secure), accordingly to the build
target. This commits adds devicetree nodes for these peripherals so
that their base addresses can be used in definitions of the accessing
symbols mentioned above.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-09-10 22:47:43 +02:00
Kumar Gala
14ef05f93f dts/bindings: st: sensors: Mark 'irq-gpios' as optional
The 'irq-gpios' property is optional as the drivers work fine if this
property isn't set.  The property is only required if "TRIGGER" mode is
enabled in the drivers.

As such mark 'irq-gpios' as 'required:false`.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-10 14:38:50 -05:00
Daniel Leung
3ad1fe8dec dts/watchdog: microchip,xec: fix cmake warnings
With the change to "compatible", and deprecation of "inherit"
and "category: required", there are multiple warnings when
running cmake. So fix those by updating the DTS YAML file.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-09-09 17:54:11 -05:00
Kumar Gala
80433e218a dts: rv32m1: Rework interrupt mux dts descriptions
Each intmux block acts like 8 interrupt controllers in which we can
have multiple device interrupts on a single channel and that channel
than interrupt than chained to another interrupt controller (in the
case of the RISC-V cores, it is the event unit).

So to describe things better to properly be able to walk the interrupt
chain in the device tree we treat each channel in the interrupt mux as
an interrupt controller rather than the intmux as a single interrupt
controller.

In the future this will allow the device tree generation code to walk
the interrupt chain from the device and up through any interrupt
controllers to generate the IRQ value that Zephyr expects (rather than
us hard coding this into the DTS).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-09 13:47:20 -05:00
Ulf Magnusson
6e46a64a48 dts: bindings: Shorten license headers
Shaves a bunch of lines.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -05:00
Ulf Magnusson
a0fceff1a2 scripts: dts: Simplify and improve 'compatible' matching
Instead of

    properties:
        compatible:
            constraint: "foo"

, just have

    compatible: "foo"

at the top level of the binding.

For backwards compatibility, the old 'properties: compatible: ...' form
is still accepted for now, and is treated the same as a single-element
'compatible:'.

The old syntax was inspired by dt-schema (though it isn't
dt-schema-compatible), which is in turn a thin wrapper around
json-schema (the idea is to transform .dts files into YAML and then
verify them).

Maybe the idea was to gradually switch the syntax over to dt-schema and
then be able to use unmodified dt-schema bindings, but dt-schema is
really a different kind of tool (a completely standalone linter), and
works very differently from our stuff (see schemas/dt-core.yaml in the
dt-schema repo to get an idea of just how differently).

Better to keep it simple.

This commit also piggybacks some clarifications to the binding template
re. '#cells:'.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -05:00
Ulf Magnusson
2c1f15c45b dts: nordic,nrf-uarte: Declare hw-flow-control in binding
Fixes an upcoming error:

    device tree error: 'hw-flow-control' appears in /soc/uart@40028000
    in nrf52840_pca10056.dts.pre.tmp, but is not declared in
    'properties:' in .../dts/bindings/serial/nordic,nrf-uarte.yaml

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -05:00
Kumar Gala
da9859533e dts/bindings: Convert bindings to new include syntax
Convert from:

inherits:
    !include spi-device.yaml

to:

include: spi-device.yaml

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-07 10:25:02 -05:00
Ulf Magnusson
fcd665a26c dts: bindings: Have 'required: true/false' instead of 'category: ...'
The 'category: required/optional' setting for properties is just a
yes/no thing. Using a boolean makes it clearer, so have
'required: true/false' instead.

Print a clear error when 'category:' is used:

    edtlib.EDTError: please put 'required: true' instead of 'category:
    required' in 'properties: foo: ...' in
    test-bindings/sub-node-parent.yaml - 'category' has been removed

The old scripts in scripts/dts/ ignore this setting, and only print a
warning if 'category: required' in an inherited binding is changed to
'category: optional'. Remove that code, since the new scripts already
have the same check.

The replacement was done with

    git ls-files 'dts/bindings/*.yaml' | xargs sed -i \
        -e 's/category:\s*required/required: true/' \
        -e 's/category:\s*optional/required: false/'

dts/binding-template.yaml is updated as well.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -05:00
Kumar Gala
e8524965c5 dts: Add io-channel details to ADC nodes/bindings
Update the ADC bindings to include #io-channel-cells and update the
related dts files to set #io-channel-cells.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-07 10:25:02 -05:00
Kumar Gala
0e3f6aa885 dts/bindings: Remove snps,dw-adc binding
Remove binding as we don't have any users from either dts files or
drivers for this.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-07 10:25:02 -05:00
Kumar Gala
c24a791d0c dts/bindings: move template out of YAML dir
As we parse for valid yamls, the template shouldn't get parsed

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-07 10:25:02 -05:00
Ulf Magnusson
80a80d0405 dts: bindings: Rename adc.yaml to adc-controller.yaml
Renaming bindings to consistently be called foo-controller.yaml for
controllers and foo-device.yaml for devices (last one mostly makes sense
for devices on buses and the like).

I was thinking of having a plain foo.yaml be the controller as well, but

    !include interrupt.yaml

reads much worse than

    !include interrupt-controller.yaml

Another advantage of this approach is that no binding changes meaning
(which could be risky). It's just adding suffixes to filenames.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -05:00
Ulf Magnusson
2098bf6e92 dts: bindings: Rename pwm.yaml to pwm-controller.yaml
Renaming bindings to consistently be called foo-controller.yaml for
controllers and foo-device.yaml for devices (last one mostly makes sense
for devices on buses and the like).

I was thinking of having a plain foo.yaml be the controller as well, but

    !include interrupt.yaml

reads much worse than

    !include interrupt-controller.yaml

Another advantage of this approach is that no binding changes meaning
(which could be risky). It's just adding suffixes to filenames.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -05:00
Ulf Magnusson
1ce8769d27 dts: bindings: Rename phy.yaml to phy-controller.yaml
Renaming bindings to consistently be called foo-controller.yaml for
controllers and foo-device.yaml for devices (last one mostly makes sense
for devices on buses and the like).

I was thinking of having a plain foo.yaml be the controller as well, but

    !include interrupt.yaml

reads much worse than

    !include interrupt-controller.yaml

Another advantage of this approach is that no binding changes meaning
(which could be risky). It's just adding suffixes to filenames.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -05:00
Ulf Magnusson
5d8833e2f9 dts: bindings: Rename uart.yaml to uart-controller.yaml
Renaming bindings to consistently be called foo-controller.yaml for
controllers and foo-device.yaml for devices (last one mostly makes sense
for devices on buses and the like).

I was thinking of having a plain foo.yaml be the controller as well, but

    !include interrupt.yaml

reads much worse than

    !include interrupt-controller.yaml

Another advantage of this approach is that no binding changes meaning
(which could be risky). It's just adding suffixes to filenames.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -05:00
Ulf Magnusson
b877876008 dts: bindings: Rename usb.yaml to usb-controller.yaml
Renaming bindings to consistently be called foo-controller.yaml for
controllers and foo-device.yaml for devices (last one mostly makes sense
for devices on buses and the like).

I was thinking of having a plain foo.yaml be the controller as well, but

    !include interrupt.yaml

reads much worse than

    !include interrupt-controller.yaml

Another advantage of this approach is that no binding changes meaning
(which could be risky). It's just adding suffixes to filenames.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -05:00
Ulf Magnusson
f51c384ed3 dts: bindings: Rename spi.yaml to spi-controller.yaml
Renaming bindings to consistently be called foo-controller.yaml for
controllers and foo-device.yaml for devices (last one mostly makes sense
for devices on buses and the like).

I was thinking of having a plain foo.yaml be the controller as well, but

    !include interrupt.yaml

reads much worse than

    !include interrupt-controller.yaml

Another advantage of this approach is that no binding changes meaning
(which could be risky). It's just adding suffixes to filenames.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -05:00
Ulf Magnusson
d82e7da794 dts: bindings: Rename i2s.yaml to i2s-controller.yaml
Renaming bindings to consistently be called foo-controller.yaml for
controllers and foo-device.yaml for devices (last one mostly makes sense
for devices on buses and the like).

I was thinking of having a plain foo.yaml be the controller as well, but

    !include interrupt.yaml

reads much worse than

    !include interrupt-controller.yaml

Another advantage of this approach is that no binding changes meaning
(which could be risky). It's just adding suffixes to filenames.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -05:00
Ulf Magnusson
fc887a80ca dts: bindings: Rename i2c.yaml to i2c-controller.yaml
Renaming bindings to consistently be called foo-controller.yaml for
controllers and foo-device.yaml for devices (last one mostly makes sense
for devices on buses and the like).

I was thinking of having a plain foo.yaml be the controller as well, but

    !include interrupt.yaml

reads much worse than

    !include interrupt-controller.yaml

Another advantage of this approach is that no binding changes meaning
(which could be risky). It's just adding suffixes to filenames.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -05:00
Ulf Magnusson
c137f28333 dts: bindings: Rename espi.yaml to espi-controller.yaml
Renaming bindings to consistently be called foo-controller.yaml for
controllers and foo-device.yaml for devices (last one mostly makes sense
for devices on buses and the like).

I was thinking of having a plain foo.yaml be the controller as well, but

    !include interrupt.yaml

reads much worse than

    !include interrupt-controller.yaml

Another advantage of this approach is that no binding changes meaning
(which could be risky). It's just adding suffixes to filenames.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -05:00
Ulf Magnusson
07ba3c2f28 dts: bindings: Rename clock.yaml to clock-controller.yaml
Renaming bindings to consistently be called foo-controller.yaml for
controllers and foo-device.yaml for devices (last one mostly makes sense
for devices on buses and the like).

I was thinking of having a plain foo.yaml be the controller as well, but

    !include interrupt.yaml

reads much worse than

    !include interrupt-controller.yaml

Another advantage of this approach is that no binding changes meaning
(which could be risky). It's just adding suffixes to filenames.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -05:00
Ulf Magnusson
35c316fdec dts: bindings: Rename can.yaml to can-controller.yaml
Renaming bindings to consistently be called foo-controller.yaml for
controllers and foo-device.yaml for devices (last one mostly makes sense
for devices on buses and the like).

I was thinking of having a plain foo.yaml be the controller as well, but

    !include interrupt.yaml

reads much worse than

    !include interrupt-controller.yaml

Another advantage of this approach is that no binding changes meaning
(which could be risky). It's just adding suffixes to filenames.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -05:00
Ulf Magnusson
1480ad9ce7 dts: edtlib: Sanity-check the final merged binding only
Sanity-checking each !included file separately was inherited from the
old scripts. It makes it messy to check that combinations of fields make
sense, e.g. to check 'const:' or 'default:' against 'type:', since those
fields might come from different files (this is handy, since it makes
sense to just add/change a 'const:' value, for example).

Drop the requirement that each !included file is a complete binding in
itself, and treat them as binding fragments instead. Only check the
final merged binding.

This also means that !included files no longer need to have a
'description:' or 'title:' (those have always been unused for !included
files), so remove those, and add comments that explain what the
fragments are for instead. That should demystify bindings a bit.

Also fix the descriptions of i2c.yaml, i2s.yaml, spi.yaml, and
uart.yaml. They're for controllers, not devices. These are copy-paste
error from the corresponding device .yaml files.

Piggyback some indentation consistency nits in binding-template.yaml.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -05:00
Kumar Gala
57c0ea3acd dts/bindings: Convert compound to phandle-array type
Convert type from compound to phandle-array for various bindings that
have properties like like <FOO>-gpios, pwms, clocks,
interrupt-extended, etc. that are phandle-array's.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-07 10:25:02 -05:00
Ulf Magnusson
c42873fbe7 dts: dtlib/edtlib: Add phandle and phandle+nums array types
Add two new type-checked property types 'phandles' and 'phandle-array'
to edtlib.

'phandles' is for pure lists of phandles, with no other data, like

    foo = < &bar &baz ... >

'phandle-array' is for lists of phandles and (possibly) numbers, like

    foo = < &bar 1 2 &baz 3 4 ... >

dt-schema also has the 'phandle-array' type.

Property.val (in edtlib) is set to an array of Device objects for the
'phandles' type.

For the 'phandle-array' type, no Property object is created. This type
is only used for type checking.

Also refactor how types that do not create a Property object
('phandle-array' and 'compound') are handled. Have _prop_val() return
None for them.

The new types are implemented with two new TYPE_PHANDLES and
TYPE_PHANDLES_AND_NUMS types at the dtlib level. There is also a new
Property.to_nodes() functions for fetching the Nodes for an array of
phandles, with type checking.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -05:00
Kumar Gala
fae3b16cea dts/bindings: add several properties to base.yaml
* Add "#address-cells" and "#size-cells" to base.yaml as properties
  that can exist on any node.  Cleanup other bindings that inherit
  from the base.yaml.
* Add "status" property with an enum of valid options.
* Add "interrupt-parent" to base.yaml.  It's a phandle to the node
  which is the interrupt controller for the interrupt.
* Add "interrupt-extended" to base.yaml.  Provides a way to specify
  an interrupt-parent and specifier in a single property.  Useful if
  a device has multiple interrupts in which different interrupts go
  to different interrult controllers.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-07 10:25:02 -05:00
Kumar Gala
b012034519 dts/bindings: use const to validate #<FOO>-cells
In most cases #<FOO>-cells should be a constant.  For example in spi
controller #address-cells should be 1, and #size-cells should be 0.

Use the const attribute to specify such single known values.  Add const
value to missing bindings which have cells.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-07 10:25:02 -05:00
Kumar Gala
3d14374c5e scripts/dts/edtlib.py: add 'const' support to bindings
Add a 'const' property to bindings for any properties that are expected
to have a specifi known value.  For example, #address-cells for an I2C
bus should always be '1'.  So we can do something like the following in
the I2C bus binding:

    "#address-cells":
      type: int
      category: required
      const: 1

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -05:00
Kumar Gala
2db8518c9d dts/binding/sensor: Fix ST sensors irq-gpios property being required
Change binding for ST sensors property 'irq-gpios' to optional for the
cases of in which its obvious from the driver that the property is
optional (there's an ifdef based on the #define
DT_INST_0_ST_LIS2DH_IRQ_GPIOS_*).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-07 10:25:02 -05:00
Tomasz Bursztyka
bed0e2203b dts/bindings: Add the representation for Microchip's XEC watchdog timer
Such watchdog is found on MEC150x for instance.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-09-07 09:56:58 -04:00
Carles Cufi
c1d87a5be9 dts: bindings: spi: nrf: Set license to Apache 2.0
The file contained an invalid license which came from a Nordic custom
repository. Switch it to Apache 2.0.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-09-06 23:35:39 +02:00
Ulf Magnusson
e5974f72ac dts: binding-template.yaml: Fix 'parent/child: bus:' description
'child: bus:' should be in the binding for the bus node, and
'parent: bus:' in the binding for devices that appear on the bus.

The description accidentally swapped them. Fix it.

Fixes: #18821
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-01 08:58:58 -05:00
Karsten Koenig
758c461252 drivers: can: mcp2515: fix devicetree bindings
Adding required fields to the devicetree overlay of the CAN sample as
this is often used as a reference. Also use these fields instead of the
KConfig entries.

Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
2019-08-18 09:56:42 +02:00
Kumar Gala
ecb75acca0 dts/bindings: Fix ilitek,ili9340 reset-gpios property being required
Mark the 'reset-gpios' property as optional.  It was incorrectly set
as required and its not required for the driver to function.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-14 09:49:19 -05:00
Ulf Magnusson
06b746cc58 dts: dtlib/edtlib: Add a syntax-based type-checking system
Property type-checking has been pretty rudimentary until now, only
checking things like the length being divisible by 4 for 'type: array',
and strings being null-terminated. In particular, no checking was done
for 'type: uint8-array', letting

  jedec-id = < 0xc8 0x28 0x17 >;

slip through when

  jedec-id = [ 0xc8 0x28 0x17 ];

was intended.

Fix it by adding a syntax-based type checker:

  1. Add Property.type, which gives a high-level type for the property,
     derived from the markers added in the previous commit.

     This includes types like TYPE_EMPTY ('foo;'),
     TYPE_NUM ('foo = < 3 >;'), TYPE_BYTES ('foo = [ 01 02 ];'),
     TYPE_STRINGS ('foo = "bar", "baz"'),
     TYPE_PHANDLE ('foo = < &bar >;'), and TYPE_COMPOUND (everything not
     recognized).

     See the Property.type docstring in dtlib for more info.

  2. Use the high-level type in
     Property.to_num()/to_string()/to_node()/etc. to verify that the
     property was assigned in an expected way for the type.

     If the assignment looks bad, give a helpful error:

       expected property 'nums' on /foo/bar in some.dts to be assigned
       with 'nums = < (number) (number) ... >', not 'nums = "oops";'

Some other related changes are included as well:

  - There's a new Property.to_bytes() function that works like accessing
    Property.bytes, except with an added check for the value being
    assigned like 'foo = [ ... ]'.

    This function solves problems like the jedec-id one.

  - There's a new Property.to_path() function for fetching the
    referenced node for assignments like 'foo = &node;', with type
    checking. (Strings are accepted too, as long as they give the path
    to an existing node.)

    This function is used for /chosen and /aliases.

  - A new 'type: phandle' type can now be given in bindings, for
    properties that are assigned like 'foo = < &node >;'.

  - Property.__str__() now displays phandles and path references as they
    were written (e.g. '< &foo >' instead of '< 0x1 >', if the
    allocated phandle happened to be 1).

  - Property.to_num() and Property.to_nums() no longer take a 'length'
    parameter, because it makes no sense with the type checking.

  - The global dtlib.to_string() and dtlib.to_strings() functions were
    removed, because they're not that useful.

  - More tests were added, along with misc. minor cleanup in various
    places.

  - Probably other stuff I forgot.

The more strict type checking in dtlib indirectly makes some parts of
edtlib more strict as well (wherever Property.to_*() is used).

Fixes: #18131

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-08-13 07:41:45 -05:00
Kumar Gala
cc2c64b15e dts/bindings: Fix build issues with bindings
the microchip,mcp2515 and microchip,enc28j60 bindings would hit the
following build error:

device tree error: dts/bindings/can/microchip,mcp2515.yaml (in 'reg'):
'category' from !included file overwritten
('required' replaced with 'optional')

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-13 07:04:46 -05:00
Kumar Gala
10ffef93e6 dts/bindings: add docs for enum to binding-template
The 'enum' field was not documented, add some details about it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-12 16:57:38 -05:00
Wayne Ren
dbc29fe77e boards: hsdk: add initial support of ARC HS Development Kit
This commit includes the initial support of ARC HS Development Kit:
* hsdk soc support
* hsdk board support
* no mmu support, so no userspace
* smp support

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2019-08-10 20:11:29 +02:00
Michael Scott
ee92cf4d68 drivers: modem: ublox-sara-r4: Support SARA-U2 modems, sense VINT
This adds support for SARA-U2 modems. They have different timings on
the PWR_ON pin, don't support AT+CESQ and require a manual GPRS
connection setup.

The VINT pin is used as a more reliable and faster way to power on the
modem.

Based on work by Göran Weinholt <goran.weinholt@endian.se>

Signed-off-by: Michael Scott <mike@foundries.io>
2019-08-10 00:03:39 +02:00
Wendy Liang
4ef9d4b6bf timer: Add Xilinx ZynqMP PS ttc timer
Add Xilinx PS ttc timer for Xilinx ZynqMP platform.

Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
2019-08-09 22:50:50 +02:00
Wendy Liang
5364a389e5 serial: Add Xilinx ZynqMP PS uart driver
Add ZynqMP PS uart driver for Xilinx ZynqMP platform

Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
2019-08-09 22:50:50 +02:00
Bradley Bolen
571d3b54db interrupt_controller: gic: Add support for the GIC400
The GIC400 is a common interrupt controller that can be used with the
Cortex A and R series processors.  This patch adds basic interrupt
handling for the GIC, but does not handle multiple routing or
priorities.

Signed-off-by: Bradley Bolen <bbolen@lexmark.com>
2019-08-09 22:50:50 +02:00
Kumar Gala
2c5fb4051c dts/bindings: cleanup partition binding
Add "#address-cells" and "#size-cells" to the fixed-partition binding as
these are properties that may existing in the fixed-partition node.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-09 14:56:20 -05:00
Kumar Gala
48c7cdb075 dts/bindings: Update pwm base binding
* Change pwm device bindings to include both base and pwm.yaml.  This
  allow for flexibility for any nodes that might not need/utilize the
  base binding.

* Added pwm.yaml to a few device bindings that were missing it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-09 14:10:40 -05:00
Kumar Gala
17f12ce2b4 dts/bindings: Add required #pwm-cells property to pwm base
All pwm controllers should have #pwm-cells so add it to the base pwm
binding.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-09 14:10:40 -05:00
Kumar Gala
7cd4985793 dts/bindings: Add base clock controller to dts bindings
Introduce a clock.yaml that clock controller bindings should inherit
from.  clock.yaml defines the properties "#clock-cells" which all
clock controllers should have.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-09 14:10:40 -05:00
Kumar Gala
1fe41c169a dts/bindings: Add gpio-nexus base binding
Add a base binding for GPIO nexus nodes.  This will get used by an GPIO
connectors.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-09 14:10:40 -05:00
Kumar Gala
d2c758b49d dts: Add base gpio-controller to dts bindings
Introduce a gpio.yaml that GPIO controller bindings should inherit
from.  gpio.yaml defines the properties "gpio-controller" and
"#gpio-cells" which all gpio controllers should have.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-09 14:10:40 -05:00
Kumar Gala
786ecf629b dts: Add base interrupt-controller to dts bindings
Introduce a intc.yaml that interrupt controller bindings should inherit
from.  intc.yaml defines the properties "interrupt-controller" and
"#interrupt-cells" which all interrupt controllers should have.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-09 14:10:40 -05:00
Jim Paris
ca8d038e2d dts/bindings: add '#cells' to nrf-saadc
This is to support e.g. "<&adc 3>" in the device tree to create e.g.

  DT_FOO_IO_CHANNELS_CONTROLLER = "ADC_0"
  DT_FOO_IO_CHANNELS_INPUT = 3

Signed-off-by: Jim Paris <jim@jtan.com>
2019-08-09 13:16:09 -05:00
Kumar Gala
61e4b06937 dts/bindings: Mark #clock-cells as optional in nxp,kinetis-sim.yaml
The nxp,kinetis-sim is shared by 2 SoC familes and on one of them
its not used for clocks.  As such that SoC will not have a #clock-cells
property so mark it optional.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-09 11:49:16 -05:00
Kumar Gala
87bf1a4e53 dts/bindings: Remove #{addr,size}-cell props from st,stm32-timers
The binding for st,stm32-timers specifies #address-cells and #size-cells
as required but no dts files that have st,stm32-timers specify these
properties.  Remove them from the binding.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-09 11:49:16 -05:00
Kumar Gala
a3318a4583 gpio: arm: cmsdk-gpio: Fixup dts binding / nodes
Add missing gpio-cells and gpio-controller properties to arm,cmsdk-gpio
binding and dts nodes.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-09 11:49:16 -05:00
Henrik Brix Andersen
a9a839179f drivers: clock_control: mcux_mcg: add driver for NXP Kinetis MCG
Add driver shim for the NXP Kinetis Multipurpose Clock Generator (MCG)
module.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-08-09 07:32:43 -05:00
Loic Poulain
2be13ca850 dts: bindings: pwm: nxp: Fix missing copyright/license
Fix nxp,flexpwm and imx-pwm yaml files.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-08-09 00:07:15 -05:00
Marc Reilly
b0203ac95b display: Add support for an ST7789V based LCD
This adds a driver for st7789v lcd controller, and TL019FQV01 lcd.
The bulk of the driver is based on the existing ili9340 driver.

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
2019-08-08 10:11:47 -05:00
Ioannis Glaropoulos
3f5aae9d24 soc: arm: nrf9160: add missing NRF_UICR definition
NRF_UICR needs to be defined for nRF9160 SoC in
nrfx_config_nrf9160.h, because it is not defined
in nrfx/hal/mdk/nrf9160.h (as it is a Secure-only
peripheral).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-08-08 08:50:39 -05:00
Kumar Gala
27d8a639e2 dts/bindings: Remove unused snps,num-irq-priority-bits prop
The snps,designware-intc.yaml and xtensa,intc.yaml define a required
property snps,num-irq-priority-bits that isn't defined in any .dts

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-07 17:12:15 -04:00
Kumar Gala
15700ff43b dts/bindings: Change clock type to compound
The clock property should be a compound type as that matches uses like
FOO-gpios, pwms, etc.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-07 13:15:51 -04:00
Ulf Magnusson
b945b1041f drivers: sensors: Remove 'version:' field in Si7006 binding
Breaks CI, because it's flagged as an error. See
https://github.com/zephyrproject-rtos/zephyr/pull/17681.

Also remove a redundant document separator.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-08-07 18:46:21 +02:00
Kumar Gala
ade6cc633c dts: pwm: nxp: Fixup bindings and dtsi so they build
With the new DT checks the dts bindings for "nxp,flexpwm" and
"nxp,imx-pwm" had old conventions that we now treat as build errors.

Additionally fix the number of #pwm-cells for "nxp,imx-pwm" to be 1.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-07 11:08:28 -04:00
Loic Poulain
630e0c7a6e dts: arm: nxp: rt: Add PWM nodes
i.MX RT10XX processors have four eFlexPWM modules, each containing
four 2-channels PWM submodules.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-08-07 07:38:40 -05:00
Vaishali Pathak
0923ae4172 drivers: sensors: Add Si7006 temperature/humidity sensor driver
Adds driver for Silicon Labs Si7006 chip.

Signed-off-by: Vaishali Pathak <vaishali@electronut.in>
2019-08-06 15:05:25 -05:00
Armando Visconti
d841908e08 dts: bindings: st,stts751-i2c.yaml: (FIX) Remove unused 'version' field
This dts binding file remained out from 0ec0c84808 commit, because
it was still in the pre-merging status.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-08-06 05:01:48 -04:00
Ulf Magnusson
5d0db517b9 dts: riscv: Add sifive,plic-1.0.0 binding and fix riscv,ndev values
Add a new sifive,plic-1.0.0 binding that inherits from the riscv,plic0
binding. The new binding adds a required riscv,ndev property, which
gives the number of external interrupts supported.

Use the new binding for microsemi-miv.dtsi (with a value of 31 for
riscv,ndev, from http://www.actel.com/ipdocs/MiV_RV32IMAF_L1_AHB_HB.pdf)
and riscv32-fe310.dtsi (which already assigns riscv,ndev).

Also remove a spurious riscv,ndev assignment from
riscv32-litex-vexriscv.dtsi.

Also make edtlib and the old scripts/dts/ scripts replace '.' in
compatible strings with '_' when generating identifiers.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-08-02 11:44:09 +02:00
Armando Visconti
9e5c97edae driver/sensor: add STTS751 temperature sensor
Add support to STM STTS751 temperature sensor.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-07-31 10:32:10 -04:00
Ulf Magnusson
0294f826a6 dts: bindings: Rename binding template to binding-template.yaml
More guessable than device_node.yaml.template.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-30 11:01:51 -04:00
Ulf Magnusson
850e3626da dts: bindings: Add lots more documentation
Add some information that would've saved me a lot of time:

 - Give an overview of how device tree nodes and bindings fit together,
   with examples. Assume people might be coming at it without knowing
   anything about device tree.

 - Explain how 'inherits' works in more detail

 - Explain what 'parent/child: bus: ...' does more concretely, and what
   problem it solves

 - Add more examples to show what things look like in the .dts file

 - Clean up the language a bit and make things more consistent

Also fix some errors, like 'properties: compatible: ...' being wrong
(missing 'constraint:' and compatible strings in the wrong place).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-30 11:01:51 -04:00
Kumar Gala
18d35cc52c dts/bindings: Cleanup st,stm32-ipm-mailbox binding
* Remove version field
* Utilize base.yaml to reduce duplication (clocks)

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-26 10:37:19 -04:00
Ulf Magnusson
fff240e7a7 dts: bindings: Clean up microchip,xec-espi.yaml and espi.yaml
- Remove 'generation:'

 - Remove 'version:' (see
   https://github.com/zephyrproject-rtos/zephyr/pull/17681)

 - Remove redundant document separators (see
   https://github.com/zephyrproject-rtos/zephyr/pull/16913)

 - Use base.yaml to define common properties and property settings

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-26 09:44:35 -04:00
Arnaud Pouliquen
725a3c9a15 drivers: introduce ipm driver for stm32
IPM driver relies on STM32 IPCC internal peripheral.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2019-07-26 14:38:43 +02:00
Jose Alberto Meza
1810d10386 dts: espi: mchp: Add dts bindings for XEC eSPI driver
Add device for eSPI driver for MEC family

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2019-07-25 08:23:38 -07:00
Jose Alberto Meza
24df22887a dts: espi: Add dts bindings for eSPI
Add generic device tree bindings for eSPI devices

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2019-07-25 08:23:38 -07:00
Kumar Gala
3837a545f2 dts/bindings: Cleanup microchip,xec-rtos-timer binding
* Remove version field
* Utilize base.yaml to reduce duplication
* Remove document separators

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-25 10:57:55 -04:00
Scott Worley
bdaab8cfa0 drivers : timer : Add MEC1501 32KHz kernel timer driver
Add a kernel timer driver for the MEC1501 32KHz RTOS timer.
This timer is a count down 32-bit counter clocked at a fixed
32768 Hz. It features one-shot, auto-reload, and halt count down
while the Cortex-M is halted by JTAG/SWD. This driver is based
on the new Intel local APIC driver. The driver was tuned for
accuracy at small sleep values. Added a work-around for RTOS
timer restart issue. RTOS timer driver requires board ticks per
second to be 32768 if tickless operation is configured.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2019-07-24 14:58:41 -07:00
Peter A. Bigot
fa10a9640b dts/spi-nor: use bytestring for JEDEC ID
This was always intended to be a bytestring rather than an array, but
full support was missing.  Since that has been addressed switch it to
the preferred format.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-24 09:20:56 -04:00
Peter A. Bigot
50550e02c0 drivers/spi_nor: remove write-block-size devicetree property
Devices using this driver do not require any special alignment for
writes.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-24 09:20:56 -04:00
Peter A. Bigot
2a590d3fa5 drivers/spi_nor: remove configurability of page/sector/block sizes
The JEDEC API defines the hardware page, sector, and block sizes.
Deprecate the Kconfig settings, remove the `erase-size-block` property,
and add `has-be32k` to indicate that 32K-byte erase is supported.
Rework the driver to use the constants instead of configured values.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-24 09:20:56 -04:00
Kumar Gala
ce4aa11395 dts/bindings: Make pwm-leds label optional
The label property in the pwm-leds sub-node is optional, so mark it as
such.

Fixes: #17665

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-23 04:09:19 -04:00
Kumar Gala
1e64648668 dts/bindings: Remove version from litex,eth0.yaml
We've remove version from all other bindings, so cleanup
litex,eth0.yaml to match.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-23 04:08:44 -04:00
Ulf Magnusson
2224d55c58 dts: bindings: Remove some YAML document separators
Same deal as in commit eba81c6e54 ("yaml: Remove redundant document
separators"), for some newly added stuff.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-23 04:08:16 -04:00
Ulf Magnusson
0ec0c84808 dts: bindings: Remove unused 'version' field
No binding has anything but 'version: 0.1', and the code in scripts/dts/
never does anything with it except print a warning if it isn't there.
It's undocumented what it means.

I suspect it's overkill if it's meant to be the binding format version.
If we'd need to tell different versions from each other, we could change
some other minor thing in the format, and it probably won't be needed.

Remove the 'version' fields from the bindings and the warning from the
scripts/dts/ scripts.

The new device tree script will give an error when unknown fields appear
in bindings.

The deletion was done with

    git ls-files 'dts/bindings/*.yaml' | xargs sed -i '/^\s*version: /d'

Some blank lines at the beginning of bindings were removed as well.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-22 09:28:07 -04:00
Mariusz Glebocki
35edfedf68 drivers: ethernet: Add LiteEth driver
Add LiteX Ethernet driver with bindings for this device.

Signed-off-by: Mariusz Glebocki <mglebocki@antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2019-07-22 15:28:54 +03:00
Piotr Zięcik
e7ed47966a dts: bindings: fixed-clock: Make label optional
In most of the cases the fixed-clock node is not referenced by the
Zephyr code, making the label property just a burden.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-07-20 17:22:21 -04:00
Ulf Magnusson
4bf7ceaa11 dts: bindings: Do not require 'interrupts' on STM32 GPIO nodes
I'm guessing STM32 GPIO nodes don't generate interrupts, because I can't
find any device tree nodes with 'compatible = "st,stm32-gpio"' and an
'interrupts' property.

Remove the required 'interrupts' property from the binding. This fixes a
bunch of errors in
https://github.com/zephyrproject-rtos/zephyr/issues/17532.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-19 10:59:46 -04:00
Kumar Gala
fd62a50255 dts/bindings: Fix category field for microchip,xec-i2c
The port_sel property had the category set to 'define' which isn't a
valid option.  Change it to be 'required'.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-19 10:43:50 -04:00
Ulf Magnusson
b9ef4a2546 dts: bindings: simplify !include in jedec,spi-nor
No need to use an array when !including a single binding.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-19 10:39:19 -04:00
Piotr Zięcik
33c9acf114 dts: bindings: nxp,kinetis-usbd: Make clocks property optional
This commit makes the clock property optional (through base.yaml),
as clock reference is not used in the code.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-07-19 10:35:54 -04:00
Alexander Wachter
b4c5f4b32b linker: Add dtcm section for Cortex M7 MCUs
This commit adds a DTCM (Device Tightly Coupled Memory) section for
Cortex F7 MCUs. The Address and length is defined in the corresponding
device tree file.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-07-19 10:05:46 +02:00
Kumar Gala
ad183ce6af dts/bindings: Mark 'rdc' as optional in nxp,imx-gpio
Since the nxp,imx-gpio binding is shared between i.MX and i.MX-RT SoC
the 'rdc' property needs to be optional (as it doesn't make sense on the
RT SoCs).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-18 11:02:23 -04:00
Kumar Gala
333ca64260 dts/bindings: Remove generation property from st,stm32-usb
We've removed the need for the 'generation:' property in the binding
files.  Remove use in st,stm32-usb.yaml.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-18 11:27:09 +03:00
Kumar Gala
f7bef11830 dts/bindings: Mark uart current-speed as optional
Not all serial devices need the current-speed property so mark it as
optional.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-17 23:30:43 -04:00
Kumar Gala
ba49051034 dts/bindings: Fix 'required' for interrupts
A number of dts bindings mark 'interrupts' as a required property when
in fact they are not for those devices.  Remove the 'required' setting
and just have 'interrupts' as 'optional'.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-17 23:30:08 -04:00
Kumar Gala
53d3e37bd9 dts/bindings: Mark rtc prescale as optional
Not all rtc/counter devices need the prescale property so mark it as
optional.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-17 23:29:19 -04:00
Kumar Gala
a69f070bca dts/bindings: remove required clock from intel,qmsi-watchdog
The dts that have intel,qmsi-watchdog don't sent a clock property so its
not required.  Change it from being required to optional.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-17 23:29:03 -04:00
Piotr Zięcik
e4bd11b3f3 dts: Add information about system bus frequency to the dts
This commit adds a fixed clock node (representing clock driving
system bus). The added node is then referenced by peripherals requiring
information about driving clock frequency.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-07-17 21:53:36 +02:00
Ulf Magnusson
9a3f674afb dts: bindings: Make 'clocks' optional in nxp,{imx-uart,lpc-usart}.yaml
These bindings override the 'category: optional' for 'clocks' from
uart.yaml with 'category: required', but none of the nodes that use the
bindings set 'clocks'.

Maybe it's a copy-paste error. Remove the 'clock' overrides.

Fixes some errors in
https://github.com/zephyrproject-rtos/zephyr/issues/17532.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-17 11:27:24 -04:00
Ulf Magnusson
c023495df0 dts: bindings: Make 'clocks' optional in adc.yaml
These bindings !include adc.yaml, but their device tree nodes never set
'clocks':

    dts/bindings/iio/adc/atmel,sam-afec.yaml
    dts/bindings/iio/adc/atmel,sam0-adc.yaml
    dts/bindings/iio/adc/nordic,nrf-adc.yaml
    dts/bindings/iio/adc/nordic,nrf-saadc.yaml

The nodes for these bindings do set it (think it's consistent for
st,stm32-adc.yaml):

    dts/bindings/iio/adc/nxp,kinetis-adc12.yaml
    dts/bindings/iio/adc/st,stm32-adc.yaml

Make 'clocks' optional in adc.yaml. Maybe it should be changed to
required on some platforms (!including bindings can change 'optional' to
'required').

Fixes a bunch of errors in
https://github.com/zephyrproject-rtos/zephyr/issues/17532.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-17 11:26:40 -04:00
Ulf Magnusson
9d02aa0382 dts: bindings: Make 'clocks' optional in pwm.yaml
Looks like no nodes with bindings that inherit pwm.yaml might be setting
'clocks'.

Fixes some errors in
https://github.com/zephyrproject-rtos/zephyr/issues/17532.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-17 11:26:27 -04:00
Ulf Magnusson
3b9853d6a2 dts: bindings: Make 'clocks' optional in i2c.yaml
Setting it seems rare. Maybe it could be changed to required on just
some platforms (!including bindings can change 'optional' to
'required').

Fixes a bunch of errors in
https://github.com/zephyrproject-rtos/zephyr/issues/17532.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-17 11:26:09 -04:00
Kumar Gala
6e8c155cfa dts/binding: Move clocks into base.yaml
Add clocks as optional in base.yaml and cleanup other yamls

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-17 09:13:01 -04:00
Ulf Magnusson
8e6266adde dts: bindings: Do not require a 'reg' property for snps,arcv2-intc
None of the interrupt controller nodes that use this binding in the
device tree files set 'reg' (or have a unit address).

Fixes a bunch of errors in
https://github.com/zephyrproject-rtos/zephyr/issues/17532.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-17 09:11:57 -04:00
Francois Ramu
474c99c9ef drivers: usb/stm32: use dts information to populate clock settings
This patch populates "clocks" property in stm32 usb nodes
for clock related usb configuration code of each  dtsi files

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2019-07-16 09:08:51 -04:00
Kumar Gala
fbb21beedd dts/bindings: Remove unused required dts props from st,stm32-can
The st,stm32-can binding specified several required properties that were
never set in actual .dts files and not used by the code.  Remove them at
this time since they aren't being used.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-16 08:35:56 -04:00
Kumar Gala
da02634778 dts/bindings: remove stale cell_string
We removed support for cell_string some time ago, so we have some stale
references in a number of bindings that we can remove.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-16 08:35:13 -04:00
Ulf Magnusson
d4b33813d8 dts: bindings: Remove dead 'label:' keys on properties
Note that these appear as

  properties: {erase,write}-block-size: label: ...

rather than as

  properties: label: ...

I can't see anything looking at 'label' for individual properties in
bindings, so it's probably dead code. Labels are fetched from the device
tree in extract/flash.py.

Piggyback removal of some 'generation: define's and a redundant pair of
YAML document separators.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-16 08:34:54 -04:00
Kumar Gala
f79de4c05e dts/bindings: Remove unused property num-irq-priority-bits
We define "arc,num-irq-priority-bits" and "intel,num-irq-priority-bits"
as required properties in the bindings for the interrupt controllers
however we never specify these properties in any .dts files or use them
in any code.

Remove them as stale properties in the binding files.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-16 11:49:17 +03:00
Kumar Gala
8e1d3f3328 dts/bindings: Remove generation from binding
Now that the generation script doesn't look at the "generation" in the
YAML, we can remove it from the binding files.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-11 06:51:17 -04:00
Peter A. Bigot
79765b8ad7 scripts/dts: fix support for uint8-array property values
uint8-array is the name for what the devicetree specification calls a
bytestring.

The original parsing code treated square brackets as equivalent to
quotes or angle brackets, failing to interpret elements as hex-encoded.
This was a bug, corrected in this patch by processing content as a
sequence of hex-encoded bytes with arbitrary whitespace.

The original generating code emitted the property as individual
elements.  Replace that with generation of a single structure
initializer, which is more useful in cases where the length of a
property value may vary between nodes.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-11 06:50:27 -04:00
Jun Yang
46106ece25 dts/sdhc: support mmc dts and usdhc dts
1) dts/bindings/mmc/mmc.yaml: specifies common mmc.

2) dts/bindings/mmc/nxp,imx-usdhc.yaml: specifies
   nxp usdhc module which inherits mmc.

3) dts/arm/nxp/nxp_rt.dtsi: usdhc support on RT chip.

4) boards/arm/mimxrt1050_evk/mimxrt1050_evk.dts:
   usdhc slot support on mimxrt1050_evk board.

Signed-off-by: Jun Yang <jun.yang@nxp.com>
2019-07-10 11:58:15 -05:00
Kumar Gala
77d143ac5c dts/bindings: Add missing clock-cells property
A number of bindings were missing the #clock-cells property in their
bindings.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-10 05:23:07 -05:00
Kumar Gala
e5d838081c dts: Fix handling of fixed-clock
A number of minor issues with the 'fixed-clock' support:
* Fix the #clock-cells to be 0
* Fix nxp_ke1xf.dtsi to set #clock-cells 0 and the clock reference to
  only be a phandle.
* Fix the generation script to only generate what it should for a
  'fixed-clock'

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-10 05:23:07 -05:00
Kumar Gala
22806d2d23 dts/bindings: Fixup some clock bindings to match reality
A few clock bindings only have a single clock cell defined, but the
binding described more than one cell.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-10 05:23:07 -05:00
Ulf Magnusson
8977d5b317 dts/bindings: Clarify #cells in template
Add a device tree example to make it easier to see how things fit
together.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-10 03:45:05 -05:00
Francois Ramu
bfc2ea6dd5 drivers: flash: Add STM32G0XX flash support
Add flash support for STM32G0X SoC series.

Signed-off-by: Philippe Retornaz <philippe@shapescale.com
Signed-off-by: Francois Ramu <francois.ramu@st.com>
2019-07-05 10:35:55 -05:00
Erwan Gouriou
ecd23f4fa3 dts: STM32H747 basic device tree description
Initiate stm32h7 device tree description, with stm32h747 single core
configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-07-04 08:50:04 -04:00
Johann Fischer
fc57ea8d3c drivers: ssd1673: rename driver to ssd16xx
ssd1673 driver supports different controllers,
rename it to more generic ssd16xx.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-07-04 07:27:09 -04:00
Armando Visconti
72ae24d8d5 driver/sensor: lsm6dso: Add support
Add support to STM LSM6DSO 6-axis IMU sensor driver.
This driver supports communication with device though both
I2C and SPI bus and both polling and drdy trigger mode.

This driver supports also the sensorhub mode with the possibility
to connect a maximum of two external devices, typically a
magnetometer and an environmental sensor, currently selected among
following devices: lis2mdl magnetometer, lps22hh or lps22hb
pressure and temperature sensors, HTS221 humidity sensor.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-07-03 12:17:43 -05:00
Armando Visconti
9dbdd81abe driver/sensor: add LPS22HH sensor support
Add support to STM LPS22HH pressure and temperature sensor.
The driver support I2C and SPI bus communication and both
polling and drdy trigger mode.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-07-03 11:59:17 -05:00
Henrik Brix Andersen
7cb92552f3 drivers: watchdog: mcux_wdog32: add driver for the NXP Kinetis WDOG32
Add driver shim for the NXP Kinetis WDOG32 module.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-07-02 18:00:16 -05:00
Loic Poulain
304c5fd196 dts: arm: nxp_rt: Add GPT nodes
i.MX RT chips have two GPT modules.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-07-01 11:53:07 -05:00
Piotr Zięcik
fb898e3532 dts: bindings: Add fixed-clock DTS binding
This commit adds binding for clock provider with fixed frequency.

Signed-off-by: Derek Hageman <hageman@inthat.cloud>
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-06-28 07:32:01 -05:00
Piotr Zięcik
ca8ca03c72 dts: bindings: Add bindings for ARM, ARC, Xtensa CPUs
This commit adds YAML files providing bindings for the
ARM, ARC and Xtensa CPUs.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-06-28 07:32:01 -05:00
Kumar Gala
2c499a7363 dts/bindings: remove 'use-prop-name' from bindings
Now that the generation code doesnt look at 'use-prop-name' we can
remove it from the binding files.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-27 07:01:10 -05:00
Yannis Damigos
ae781bd9bd dts: Restructure xtensa dts directory
Restructure xtensa dts directory

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2019-06-27 07:21:11 -04:00
Charles E. Youse
3dc7c7a6ea drivers/interrupt_controller/mvic.c: remove MVIC interrupt controller
The Quark D2000 is the only x86 with an MVIC, and since support for
it has been dropped, the interrupt controller is orphaned. Removed.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-06-25 08:06:43 -04:00
Charles E. Youse
c6c9dcf28c drivers/adc/adc_intel_quark_d2000: remove Quark D2000 ADC driver
Remove orphaned driver (Quark D2000 SoC no longer supported).

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-06-25 08:06:43 -04:00
Henrik Brix Andersen
13847a315d drivers: clock_control: mcux_scg: add NXP MCUX SCG clock control driver
Add clock controller driver for the NXP Kinetis System Clock Generator
(SCG) clock module.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-06-24 14:33:46 -05:00
Henrik Brix Andersen
652fdfe3a1 drivers: can: add support for the NXP Kinetis FlexCAN controller
Add MCUX driver shim for the NXP Kinetis FlexCAN CAN bus controller.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-06-24 14:33:46 -05:00
Henrik Brix Andersen
dded1d076a dts: can: allow individual specification of prop seg and phase seg1 quanta
Allow individual specification of the time quanta used for the CAN bus
propagation segment and phase segment 1.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-06-24 14:33:46 -05:00
Kumar Gala
bf0f6d911d dts: Add concept of sub-nodes to YAML and generator
Several bindings have an expectation of sub-nodes that describe the
actual infomation.  The sub-nodes don't have any compatiable so we can't
key on that.

So we can add the concept of a sub-node to the YAML to handle cases like
'gpio-keys', 'gpio-leds', 'pwm-leds', etc..

The sub-node in the YAML is effective the "binding" params that describe
what properties should exist in the sub-node.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-21 15:34:28 +02:00
Kumar Gala
de3d808280 dts/bindings: Add binding for riscv,cpu-intc
The RISC-V CPU interrupt controller didn't have a binding.  Add a simple
one for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-21 07:52:12 -05:00
Kumar Gala
e83b8c313b dts/bindings: Fix openisa,rv32m1-intmux binding
The binding specified 2 cells for an interrupt, but in reality we only
have an IRQ number.  Remove the 'pri' cell from the binding to match
what the dts files are doing.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-20 16:44:38 -05:00
Kumar Gala
b023fbf938 dts/bindings: Remove pinctrl from bindings
The pinctrl property in the bindings is meaningless, lets remove it and
add a proper pinctrl property when we are ready.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-19 15:53:24 -04:00
Ulf Magnusson
eba81c6e54 yaml: Remove redundant document separators
YAML document separators are needed e.g. when doing

  $ cat doc1.yaml doc2.yaml | <parser>

For the bindings, we never parse concatenated documents. Assume we don't
for any other .yaml files either.

Having document separators in e.g. base.yaml makes !include a bit
confusing, since the !included files are merged and not separate
documents (the merging is done in Python code though, so it makes no
difference for behavior).

The replacement was done with

    $ git ls-files '*.yaml' | \
        xargs sed -i -e '${/\s*\.\.\.\s*/d;}' -e 's/^\s*---\s*$//'

First pattern removes ... at the end of files, second pattern clears a
line with a lone --- on it.

Some redundant blank lines at the end of files were cleared with

    $ git ls-files '*.yaml' | xargs sed -i '${/^\s*$/d}'

This is more about making sure people can understand why every part of a
binding is there than about removing some text.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-06-19 10:40:10 +02:00
Kumar Gala
6758e065ae dts/bindings: Cleanup phy bindings
* Fix white space in phy.yaml
* Fix property name in st,stm32-usbphyc.yaml and usb-nop-xceiv.yaml to
  use "#phy-cells" and not "phy-cells"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-16 10:09:51 -04:00
Yannis Damigos
aa8901c332 dts: xtensa: Fix compatible for xtensa lx6
Fix compatible for xtensa lx6

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2019-06-16 10:07:29 -04:00
Kumar Gala
6589286717 dts/bindings: Add uint8-array type for ethernet mac address
Introduce uint8-array type for local-mac-address as we need to
distinguish it from 'array' meaning a uint32 array.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-15 13:29:41 -07:00
Kumar Gala
b28abf9e90 dts/binding: Update compatible type in base.yaml
compatible should have the type of string-array not string.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-14 17:38:17 -04:00
Kumar Gala
eb00774c87 dts/bindings: Rename stringlist to string-array
* Rename stringlist to string-array to be closer inline with upstream
  dtschema definitions.
* Add string-array to the device_node.yaml.template

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-14 17:38:17 -04:00
Kumar Gala
c450e75c8a dts/binding: Cleanup a few new bindings for base.yaml
A few new bindings needed update to remove common info that comes out of
base.yaml.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-14 05:47:36 -04:00
Kumar Gala
29a661833e dts/bindings: Update soc-nv-flash to use base.yaml
Now that we sort the instance id's we can update soc-nv-flash to use
base.yaml.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-14 05:47:36 -04:00
Yaël Boutreux
6e2631c4f1 dts: bindings: Fix missing "zephyr" vendor name
Fix missing "zephyr" vendor name, currently used with
zephyr,sim-flash; zephyr,bt-hci-spi and zephyr,bt-hci-spi-slave.
This avoid checkpatch warning :
"DT compatible string vendor "zephyr" appears un-documented".

Signed-off-by: Yaël Boutreux <yael.boutreux@st.com>
2019-06-13 14:10:56 -05:00
Nikos Oikonomou
080e71c908 sensors: ti_hdc driver wait conversion support
TI_HDC Driver now also supports waiting for conversion to finish instead
of waiting for GPIO interrupt.

Signed-off-by: Nikos Oikonomou <nikoikonomou92@gmail.com>
2019-06-11 10:17:11 -05:00
Nikos Oikonomou
4a38cae2af sensors: renamed hdc1008 driver into ti_hdc
Hdc1008 driver is renamed into ti_hdc to prepare it to support all
available Texas Instruments HDC sensors (e.g. hdc1080, hdc2080).

Signed-off-by: Nikos Oikonomou <nikoikonomou92@gmail.com>
2019-06-11 10:17:11 -05:00
Piotr Mienkowski
abbd952d2b drivers: Add counter driver (RTCC) for SiLabs Gecko SoCs
This commit adds counter driver based on RTCC module for SiLabs Gecko
SoCs.

Tested with SLWSTK6061A / BRD4250B wireless starter kit.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-06-10 22:27:25 -04:00
Kumar Gala
48100df875 dts/bindings: Move common properties into a base.yaml
Move common properties like 'compatible', 'reg', 'reg-names',
'interrupts', 'interrupt-names', and 'label' into one common base.yaml
that all the other yaml's can inherit from.  This removes both
duplication and inconsistent definition.

The device specific yamls just need to say if a property is 'required'
or not.

NOTE: due to some generation conflicts we did not covert
'soc-nv-flash.yaml' to use base.yaml.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-10 11:17:41 -05:00
Henrik Brix Andersen
683ca77620 drivers: adc: mcux_adc12: add driver for the NXP ADC12 module
Add MCUX driver shim for the NXP Kinetis 12-bit ADC module (ADC12).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-06-07 14:30:59 -05:00
Kumar Gala
5c53ad430b dts/bindings: Remove generation from pinmux properties
We've never propertly generated any pinmux info, so remove generation
from the binding yaml files for pinmux properties.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-07 10:35:58 -06:00
Kumar Gala
53dbe88cee dts/bindings: Fix nxp,kinetis-ptp.yaml
The binding for the PTP should not inherit from ethernet.yaml is its not
an ethernet controller.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-07 06:50:35 -06:00
Kumar Gala
125b231ecf dts/bindings: Fix type in spi-device.yaml
Change type field in yaml binding to a valid choice.  Should be 'int'

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-07 06:50:35 -06:00
Kumar Gala
7168d4c2f4 dts/bindings: Fix types in solomon,ssd1673fb.yaml
Change type field in yaml binding to a valid choice.  Should be 'int'

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-07 06:50:35 -06:00
Lyle Zhu
01b22900d5 dts: riscv32: update flash controller compatibility property
- Change flash controller compatibility property from nxp,kinetis-ftfe
to openisa,rv32m1-ftfe.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2019-06-03 10:43:47 -05:00
Erwan Gouriou
d777413b19 drivers/flash: stm32wb: Add driver for stm32wb
Add flash driver for stm32wb

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-06-03 09:38:19 -04:00
Bosch Sensortec
86643ecec3 dts : bindings : sensor : bme680 Added support for BME680
Added support to the dts for the BME680 Environmental sensor

Signed-off-by: Bosch Sensortec <github@bosch-sensortec.com>
2019-05-31 10:27:13 -05:00
Nathaniel Graff
3093f5cd2f drivers/gpio: Remove DTS fixups for SiFive GPIO
Change the DT macros used by the SiFive GPIO driver so that fixups
are no longer required.

Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
2019-05-30 18:40:26 -04:00
Nathaniel Graff
34ad4f01e1 dts/i2c: Remove id field from sifive,i2c0
Resolves warning generated by extract_dts_includes.py

Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
2019-05-30 18:40:26 -04:00
Derek Hageman
55bb37e35c drivers: serial: sam0: Implement DMA async API
This adds support for the async API for SAM0 SERCOM USARTs using
DMA to drive the device.

Tested on SAMD21 with a few trivial programs and with
tests/drivers/uart/uart_async_api.

Signed-off-by: Derek Hageman <hageman@inthat.cloud>
2019-05-30 17:18:44 -04:00
Peter A. Bigot
190c43ee5f dts: misc: add SKY13351 SPDT switch description
This devices is used on Particle boards to select between PCB and
external antennas.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-05-30 09:46:55 -04:00
Jan Van Winkel
7a246c30bd dts: posix: Add DTS support for POSIX architecture
Added device tree support for POSIX architecture based boards.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-05-28 21:14:19 -04:00
Derek Hageman
a4f3e628e5 drivers: counter: Add SAM0 basic counter support
This adds support for the basic timer counter (TC) found on SAM0
series parts.  This driver only supports running the counter
in 32 bit wide mode.  Since this mode explicitly slaves the odd
counters to the even ones, only instances of the even ones are
defined.

Tested with tests/drivers/counter/counter_basic_api on SAMD21.

Signed-off-by: Derek Hageman <hageman@inthat.cloud>
2019-05-28 09:23:44 -04:00
Brett Witherspoon
7713c85519 dts: add CC13xx / CC26xx SPI bindings and nodes
Add bindings and device tree nodes for TI CC13xx / CC26xx SPI support.

Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
2019-05-27 09:21:19 -04:00
Antony Pavlov
8245195306 dts: import vendor-prefixes.txt from linux kernel
import linux-v5.1:Documentation/devicetree/bindings/vendor-prefixes.txt

Use vendor-prefixes.txt to check vendor prefixes
used in compatible strings and property names.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
2019-05-22 12:40:20 -04:00
Brett Witherspoon
6eb0cb0d85 drivers: add CC13xx / CC26xx I2C driver
Add I2C driver for the TI CC13xx / CC26xx series SoCs.

Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
2019-05-21 15:37:22 -04:00
Charles E. Youse
309dfef511 drivers/i2c/i2c_dw.c: rewrite for PCI(e) support
The legacy PCI support in the DesignWare I2C driver is replaced with
the new PCIe support. The Intel Quark X1000 SoC and the galileo board
configurations are updated accordingly.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-05-21 08:23:22 -04:00
Michael Scott
769b65ef98 dts: bindings: add modem binding for u-blox SARA-R4
The SARA-R4 series modules from U-Blox are size-optimized LTE-M /
NB-IoT and EGPRS modules designed for low power consumption and
longer battery life.

The binding identifies the UART device, power GPIO and reset GPIO
lines.

Signed-off-by: Michael Scott <mike@foundries.io>
2019-05-21 08:17:20 -04:00
Michael Scott
cf5b08131d dts/bindings: introduce Arduino-header-R3 GPIO binding
This allows HW with compatible headers to define the related GPIOs

Signed-off-by: Michael Scott <mike@foundries.io>
2019-05-21 08:17:20 -04:00
Michael Scott
11b3b22652 dts-binding: modem: wnc-14a2a: add label binding
The label binding was missed during initial development of the
WNC-M14A2A modem.  Let's add the binding so that during the
migration to a shield, we can update the DTS correctly.

Signed-off-by: Michael Scott <mike@foundries.io>
2019-05-21 08:17:20 -04:00
Ioannis Glaropoulos
0a08c4e1e9 dts: arm: add DTS binding for ARM MPU peripheral
Add DTS binding files for the ARM MPU, for both ARM
MPU architecture variants, ARMv7-M and ARMv8-M.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-05-20 14:06:10 -05:00
Kumar Gala
2cac70e099 dts: bindings: usb: Add enum to maximum-speed property
Add enum to list what values of maximum-speed are exceptable since
enum's get represented as strings in DT.  This also allows us to
generate a code enum to correspond to the string.

We also introduce include/dt-bindings/usb/usb.h which is a hand coded
definition of the enum.  We don't have a great way to generate this
right now, however it would be better if we did.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-05-17 09:53:20 -05:00
Karl Zhang
2a7824a8b0 drivers: ipm: mhu: Add MHU driver for V2M Musca
MHU (Message Handling Unit) enables software to raise interrupts to
the processor cores. It is enabled in SSE 200 subsystems.

This patch aims to implement inter processor communication.

Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
2019-05-15 15:37:50 -05:00
Filip Kokosinski
b054517ce7 drivers: interrupt_controller: add LiteX interrupt controller driver
Add LiteX interrupt controller driver and bindings for this device.

Signed-off-by: Filip Kokosinski <fkokosinski@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2019-05-15 12:52:16 -05:00
Filip Kokosinski
c0c3cdfc57 drivers: timer: add LiteX timer driver
Add LiteX timer driver with bindings for this device.

Signed-off-by: Filip Kokosinski <fkokosinski@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2019-05-15 12:52:16 -05:00
Filip Kokosinski
b3739169cb drivers: serial: add LiteUART driver
Add LiteX UART driver with bindings for this device.

Signed-off-by: Filip Kokosinski <fkokosinski@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2019-05-15 12:52:16 -05:00
Krzysztof Chruscinski
6d4a5200bc drivers: counter: Move nRF TIMER and RTC configuration to device tree
Reduced Kconfig for counter with nRF TIMER and RTC. Added overlays
for TIMER and RTC configuration in the counter test.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-05-15 10:11:02 +02:00
Krzysztof Chruscinski
a5f36427d2 dts: bindings: Document missing property boolean type
Boolean type was not mentioned in the documentation.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-05-15 10:11:02 +02:00
Henrik Brix Andersen
918579ebbf soc: arm: ke1xf: add NXP Kinetis KE1xF SoC series support
Add initial support for the NXP Kinetis KE1xF SoC series (MKE14F16,
MKE16F16, and MKE18F16).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-05-14 15:00:11 -05:00
Henrik Brix Andersen
d4b9c0d600 drivers: clock_control_mcux_sim: add support for clkout
Add support for CLKOUT source selection and divider as found on the
NXP Kinetis KE1xF SoC series.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-05-14 15:00:11 -05:00
Henrik Brix Andersen
168e129175 clock_control: introduce mcux pcc driver
Add a new clock control driver for NXP Kinetis SoCs that have the
Peripheral Clock Controller module (PCC).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-05-14 15:00:11 -05:00
Brett Witherspoon
2bee500f06 drivers: add CC13xx / CC26xx entropy driver
Add driver for the TRNG entropy source on the TI CC13xx / CC26xx
series SoCs.

Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
2019-05-14 06:10:52 -05:00
Filip Kokosinski
ff16799509 dts: bindings: sram: add SiFive dtim0 bindings
Add bindings for SiFive Data Tightly-Integrated Memory.

Signed-off-by: Filip Kokosinski <fkokosinski@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2019-05-10 10:34:31 -05:00
Francisco Munoz
2452b84c89 dts : Introduce gpio node entries for Microchip MEC
Dts Nodes for all the GPIO portswere defined. In addition,
a new binding file was created for the gpio driver.

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2019-05-08 16:39:54 -07:00
Jose Alberto Meza
291e1289a0 dts: mchp: Add Microchip I2C SoC device tree
Expose MEC1501 5 I2C/SMB  controllers
Add Microchip specific I2C device tree properties

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2019-05-08 15:02:26 -07:00
Song Qiang
da56cad3a4 dts: arm: stm32: add dts support for ADC1 of stm32
All series of stm32 have at least one ADC instance and this commit adds
one ADC node to the root dts file of each soc, and also adds fixing up
mappings to them.

Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
2019-05-07 23:15:58 -04:00
Henrik Brix Andersen
98cecb3681 drivers: gpio: ht16k33: add GPIO driver for Holtek HT16K33 LED driver
The HT16K33 is a memory mapping, multifunction LED controller
driver. The controller supports up to 128 LEDs (up to 16 rows and 8
commons) and matrix key scan circuit of up to 13x3 keys.

This commit adds support for the keyscan functionality of the HT16K33.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2019-05-07 22:33:06 -04:00
Henrik Brix Andersen
ac9356ade3 drivers: led: ht16k33: add LED driver for Holtek HT16K33 LED driver
The HT16K33 is a memory mapping, multifunction LED controller
driver. The controller supports up to 128 LEDs (up to 16 rows and 8
commons) and matrix key scan circuit of up to 13x3 keys.

This commit add support for the LED driver functionality of the
HT16K33.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2019-05-07 22:33:06 -04:00
Derek Hageman
4462069d74 drivers: gpio: sam0: Add interrupt support
This adds interrupt support to the SAM0 GPIO driver.  This is heavily
inspired by @nzmichaelh work in #5715.  The primary difference
from that implementation is that here the External Interrupt
Controller (EIC) is separated out into an interrupt controller driver
that is less tightly coupled to the GPIO API.  Instead it implements
more of a conversion from the EIC's own odd multiplexing to a more
traditional port and pin mask IRQ-like callback.  Unfortunately,
through the EIC on the SAMD2x are relatively well behaved
in terms of pin to EIC line mappings, other chips that share the
peripheral interface are not.  So the EIC driver implements a
per-line lookup to the pin and port pair using definitions extracted
from the ASF headers.

The EIC driver still makes some assumptions about how it will be used:
mostly it assumes exactly one callback per port.  This should be fine
as the only intended user is the GPIO driver itself.

This has been tested with some simple programs and with
tests/drivers/gpio/gpio_basic_api on a SAMD21 breakout and an
adafruit_trinket_m0 board.

Signed-off-by: Derek Hageman <hageman@inthat.cloud>
2019-05-07 08:43:56 -04:00
Derek Hageman
46730e1f57 drivers: i2c: Add SAM0 I2C driver
This adds a SERCOM I2C driver for SAM0 series chips.

Tested with a SAMD21 chip on a SSD1306 display and a MLX90393
sensor.  Only compile tested for SAMD20 and SAMR21.

Signed-off-by: Derek Hageman <hageman@inthat.cloud>
2019-05-07 08:42:24 -04:00
Derek Hageman
1d64a46501 drivers: adc: Add SAM0 ADC driver
This adds a driver for the SAM0 series ADC.

Tested with /tests/drivers/adc/adc_api on SAMD21.

Signed-off-by: Derek Hageman <hageman@inthat.cloud>
2019-05-07 08:41:27 -04:00
Brett Witherspoon
f101b77db2 soc: ti_simplelink: add support for TI CC13x2 / CC26x2 series
Add initial support for the TI CC13x2 / CC26x2 series with the CC2652R
and CC1352R SoCs. The UART and GPIO peripherals are supported. Drivers
use the driverlib HAL from the TI CC13x2 / CC26x2 SDK.

Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
2019-05-04 09:13:43 -05:00
Henrik Malvik Halvorsen
11295c190b drivers: sensor: Add ADXL362 interrupt handling
The ADXL362 driver is expanded to support interrupt handling.

Signed-off-by: Henrik Malvik Halvorsen <henrik.halvorsen@nordicsemi.no>
2019-05-03 09:11:51 -05:00
ba21de582b drivers: dma: Add SAM0 DMAC driver
This adds support for the SAM0 DMA Controller (DMAC).  Chained
transfer are not currently implemented.

Tested with tests/drivers/dma/loop_transfer and custom modifications
to that test using three parallel reloading channels.  Also tested
with a trivial program that did memory->serial.

Signed-off-by: Michael Hope <mlhx@google.com>

[hageman@inthat.cloud: Rebased and updated commit message]
Signed-off-by: Derek Hageman <hageman@inthat.cloud>
2019-05-02 19:20:12 -05:00
Derek Hageman
d68666fc08 drivers: spi: sam0: Implement DMA async API
This adds support for the async API for SAM0 SERCOM SPI using
DMA to drive the device.  This implementation does the reload
for both transmit and receive in the receive DMA handler.
Doing this simplifies the implementation but means that the
transmit drains completely, resulting in the SPI clock pausing
between buffers while both are reloaded in the receive handler.

Tested with tests/drivers/spi/spi_loopback and several simple
programs monitored with a logic analyzer.

Signed-off-by: Derek Hageman <hageman@inthat.cloud>
2019-05-01 10:27:42 -04:00
Kamil Piszczek
968d3a9ef4 dts: flash simulator cleanup
Moved the DT node description for Flash simulator to the board dts file.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2019-04-26 04:04:19 -07:00
Kamil Piszczek
c837d85c2b drivers: flash: add flash_simulator driver
This commit adds a flash driver implementation that writes to RAM and
exports statistics through stats.h. It can be used to simulate flash
memory for testing purposes.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2019-04-24 13:05:11 -07:00
Charles E. Youse
6fc655351c drivers/gpio/gpio_intel_apl: remove dependency on shared interrupts
The GPIO driver for the Intel Apollo Lake has so many pins it has to
export ten devices to shoehorn its one device into the GPIO API. The
current implementation uses the shared IRQ driver because these
pseudodevices all share one IRQ. However, since the GPIO driver is
aware of all the possible interrupt sources, it's smaller and faster
(and not even messy) to handle it internally, so this patch eliminates
the dependency on the shared IRQ driver.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-04-23 09:10:00 -07:00
Manivannan Sadhasivam
92ac6d8fc6 soc: arm: st_stm32: Add STM32L1 SoC series
Add STM32L1 SoC series support with STM32L15XXB as the target
SoC.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2019-04-22 08:54:18 -05:00
Alexander Wachter
f29ec12f21 drivers: sensor: ens210: Implement AMS ens210 Sensor
Implementation of AMS (Austria Micro Systems) ENS210 temperature and
relative humidity sensor.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-04-19 08:37:17 -05:00
Alexander Wachter
3c70a3832d drivers: sensor: ams_iAQcore: Implemented ASM Indoor Air Quality Sensor
Implementation of AMS (Austria Micro Systems) Indoor Air Quality Sensor

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-04-19 08:37:17 -05:00
Benjamin Valentin
c43067047c drivers: hwinfo: add driver support for Atmel SAM0 device ID
Add driver support for Atmel SAM0 device ID, which is 16-bytes long.
The device ID can simply be read from memory at a known location, but
the location is only described in the data sheet, not in ASF.

For SAMD2x it's 0x0080A00C, 0x0080A040, 0x0080A044 & 0x0080A048.
For SAMD5x it's 0x008061FC, 0x00806010, 0x00806014 & 0x00806018.

This adds a new property to the device tree to define the device ID
registers for this SoC family.

Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2019-04-18 17:54:30 -04:00
Henrik Brix Andersen
8a4dbb5b03 drivers: i2c: rv32m1: add I2C driver for the RV32M1 RI5CY SoC
Add driver and device tree binding for the Low Power Inter-Integrated
Circuit (LPI2C) controllers found in the RV32M1 RI5CY SoC.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2019-04-18 16:04:23 -05:00
Henrik Brix Andersen
917cb432ee sensor: fxos8700: add support for hardware reset pin
Add support for pulsing the hardware reset pin of the FXOS8700 high
during initialization.

According to the datasheet, this is required for the I2C/SPI bus
auto-detection logic to work properly if the VDD/VDDIO power
sequencing order cannot be guaranteed.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2019-04-18 09:22:56 -04:00
Georgij Cernysiov
04da64db76 drivers: serial: stm32: dts binding, and fixup for flow control
Allows to enable initial RTS/CTS hardware flow control
in the dts.

Co-authored-by: Benoit Leforestier <benoit.leforestier@gmail.com>
Signed-off-by: Georgij Cernysiov <g.cernysiov@elco-automation.de>
2019-04-17 16:09:54 -05:00
Karsten Koenig
4f7761047b drivers: can: mcp2515: Rework for DTS SPI bindings
Adjusted the MCP2515 driver to switch from KConfig SPI configuration to
DTS based configuration.

Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
2019-04-17 16:12:30 -04:00
Karsten Koenig
35b9308488 drivers: can: mcp2515: Add driver for MCP2515 CAN controller
The MCP2515 is a CAN controller that can be connected via SPI to an
host MCU. This driver adds support for the MCP2515 as a new driver in
the CAN subsystem.
As it is a SPI peripheral it uses a thread for its interrupt
handling and the received message filtering is done inside this
interrupt thread, as the MCP2515 filter capabilities are not sufficient
for the Zephyr CAN interface.
The driver was validated with an external CAN logger and the adjusted
CAN sample application.

Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
2019-04-17 16:12:30 -04:00
Charles E. Youse
e039053546 uart/ns16550, drivers/pcie: add PCI(e) support
A parallel PCI implementation ("pcie") is added with features for PCIe.
In particular, message-signaled interrupts (MSI) are supported, which
are essential to the use of any non-trivial PCIe device.

The NS16550 UART driver is modified to use pcie.

pcie is a complete replacement for the old PCI support ("pci"). It is
smaller, by an order of magnitude, and cleaner. Both pci and pcie can
(and do) coexist in the same builds, but the intent is to rework any
existing drivers that depend on pci and ultimately remove pci entirely.

This patch is large, but things in mirror are smaller than they appear.
Most of the modified files are configuration-related, and are changed
only slightly to accommodate the modified UART driver.

Deficiencies:

64-bit support is minimal. The code works fine with 64-bit capable
devices, but will not cooperate with MMIO regions (or MSI targets) that
have high bits set. This is not needed on any current boards, and is
unlikely to be needed in the future. Only superficial changes would
be required if we change our minds.

The method specifying PCI endpoints in devicetree is somewhat kludgey.
The "right" way would be to hang PCI devices off a topological tree;
while this would be more aesthetically pleasing, I don't think it's
worth the effort, given our non-standard use of devicetree.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-04-17 10:50:05 -07:00
Henrik Brix Andersen
36ff55cba0 gpio: rv32m1: enable GPIO port clocks
Enable the clock for GPIO ports on the RV32M1 SoC before attempting to
access the port controller registers.

Fixes: #15339

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2019-04-17 10:40:37 -05:00
Josef Gajdusek
29ffcae80c drivers: usb_dc_stm32: Make pin remapping part of the device tree
The SYSCFG_CFGR1_PA11_PA12_RMP define is present even on packages where
the remap isn't strictly required. This commit makes the remap optional
based on a DT property.

Also fixes syntax error caused by a missing );.

Signed-off-by: Josef Gajdusek <atx@atx.name>
2019-04-17 09:58:09 -05:00
Jim Paris
9a0d113260 dts: flash: add missing DT properties to jedec,spi-nor
The erase-block-size and write-block-size are needed for the spi_nor
driver to compile.

scripts/dts/extract/flash.py automatically adds these properties if
this flash device is part of the "chosen" flash node, but they're
otherwise missing.

Signed-off-by: Jim Paris <jim@jtan.com>
2019-04-11 10:02:44 +02:00
Mieszko Mierunski
7700322961 dts: nrf: Add DPPIC to device tree.
Add DPPIC to dts. Add HAS_HW_NRF_DPPIC to nrf91 soc.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2019-03-28 09:30:57 -04:00
Gaute Gamnes
88f099c3a1 dts: nrf: SW PWM device node added to nRF5 devices with yaml binding
1. SW PWM device node added to common nrf5_common.dtsi
2. SW PWM node set in all nRF5x DTSI files.
   Different initial settings for nRF51 and nRF52 devices.
   Status is ok by default for nRF51.
3. Added yaml binding for Nordic SW PWM node.
4. Set codeowner of nordic dts bindings to @anangl

Signed-off-by: Gaute Gamnes <gaute.gamnes@nordicsemi.no>
2019-03-12 13:34:01 +01:00
Gaute Gamnes
281e251690 dts: nrf: Temp device node added to nRF5 devices with yaml binding
1. Temp device node added to all nRF5 DTSI files.
2. Added yaml binding for Nordic Temp node.
3. Set codeowner of nordic dts bindings to @anangl

Signed-off-by: Gaute Gamnes <gaute.gamnes@nordicsemi.no>
2019-03-12 13:33:36 +01:00
Ulf Magnusson
3513c260c0 dts/bindings: Remove 'generate: define' from 'interrupt-names' bindings
After commit 'scripts/dts: Never ignore properties in
generate_node_defines()', pointless entries for 'interrupt-names'
properties show up in generated_dts_board.conf and
generated_dts_board_fixups.h, because many bindings specify
'generate: define' for 'interrupt-names'.

If 'generation: define' is taken as "generate #define's for this
particular property", then only the 'interrupts' property ought to have
'generation: define'. Having it on both 'interrupts' and
'interrupt-names' makes you wonder what it would mean to only have it on
one of them.

Things get a bit confusing since 'interrupt-names' is still used when
determining the macro names generated for 'interrupts', but it's
probably best to have 'generation: define' work in a consistent way
still (and never be a no-op).

Remove 'generation: define' from all 'interrupt-names' bindings.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-27 10:02:35 -06:00
Piotr Zięcik
d30c9aeafd drivers: nrf_power_clock: Migrate to DTS.
This commit migrates the nrf_power_clock driver to DTS.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-02-25 17:51:24 +01:00
Ulf Magnusson
8455d5f900 dts/bindings/mtd: Remove dead definitions from partition binding
The 'partition\d+:' definition might be a leftover from an older way of
handling partitions. There are no 'partition[0-9]' properties anywhere
in the DTS files.

The reason I want to get rid of this is that it's the only place where
you get a 'properties:' nested inside inside a 'properties:'. That's an
undocumented feature, and removing it will make generate_node_defines()
much simpler (non-recursive).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-19 07:44:44 -06:00
Ulf Magnusson
c559825ed2 doc: dts: bindings: Document regex support and clean up a bit
- Regexes (e.g. 'pinctrl-.*') are supported in property names in
   bindings, but it was undocumented

 - Remove the mention of 'generation: structure'. The only implemented
   output format is #define's.

 - Clean up the language a bit and move related stuff so that it appears
   together

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-19 07:44:44 -06:00
Song Qiang
4ca8395c9e doc: dts: bindings: Fix a spell mistake
Fix a spell mistake in device node yaml template.

Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
2019-02-13 06:49:17 -06:00
Armando Visconti
208f565bce driver/sensor: add LIS2DW12 sensor support
Add support to STM LIS2DW12 3-axis accelerometer driver.
The driver support I2C and SPI bus communication and both
polling and drdy trigger mode.

Co-authored-by: Mario Tesi <mario.tesi@st.com>
Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-02-08 15:22:42 -06:00
Kumar Gala
c7606609be dts: Remove base_label support
We've removed all references to base_label in dts bindings and are
removing the functionality.  We should depend on DT_ prefixed defines
going forward.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 14:44:42 -06:00
Kumar Gala
c3eafb9c90 dts: bindings: mtd: partition: remove base_label
We don't need base_label as we special case handle the flash partition
define generation.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 14:44:42 -06:00
Kumar Gala
b339844c95 dts: bindings: openisa,rv32m1-event-unit: remove base_label
We aren't using the defines generated by base_label for this device and
we should use DT_ prefixed ones if/when we do.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 14:44:42 -06:00
Johann Fischer
f7495ef8eb drivers: ssd1673: add DT properties for configuration registers
The values for the registers like GDV, SDV and Boarder Waveform
depend on the panel and display controller. Add DT properties
and obtain such values from DT.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-02-08 14:57:36 -05:00
Kumar Gala
774a6c31b3 dts: bindings: ccm: Drop base_label setting
We don't need base_label set as we don't use the defines it generates
for CCM.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 10:29:57 -06:00
Nathaniel Graff
1dc3cc7fc6 drivers/pwm: Driver for SiFive PWM peripheral
The PWM driver can only control channels 1-3 of the PWM peripheral, not
channel 0. This is an artifact of the peripheral's design.

Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
2019-02-08 09:09:35 -06:00
Aurelien Jarno
2168d80987 drivers: add Atmel SAM PWM driver
This patch adds basic support for the PWM devices available on the Atmel
SAM family. Beside enabling the driver, everything is selected through
the device tree, including enabling the PWM0 and PWM1 devices. Thus
CONFIG_PWM_0 and CONFIG_PWM_1 are ignored.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2019-02-08 06:55:14 -06:00
Erwan Gouriou
3074e393db drivers/counter: stm32 rtc: Use dts to get RTC clock information
RTC clock information should be provided by dts files

Fixes #10451

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-02-07 16:14:00 -05:00
Kumar Gala
3edafc2517 dts: arm_cmsdk_(d)timer: Add label property to (d)timer
Add a label property so we can use that in drivers rather than getting
from Kconfig.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-07 16:14:00 -05:00
Stanislav Poboril
f51ef0551c imx: Add IMX EPIT driver for i.MX socs
Add shim driver for i.MX EPIT (Enhanced Periodic Interrupt Timer)
peripheral which can be used for i.MX6SoloX, i.MX7D and other i.MX socs.

Origin: Original

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2019-02-07 16:14:00 -05:00
Maureen Helm
54047dc59a dts: boards: Add bindings and nodes for the rocktech lcd module
Adds device tree bindings and nodes for the rocktech lcd module used on
imx rt boards. The use of port, endpoint, and remote-endpoint properties
follow what is currently done in linux, but they are not yet used in
zephyr because some additional plumbing is needed in the
extract_dts_includes.py script.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-02-07 14:28:55 -06:00
Maureen Helm
19167a402b dts: Add bindings for the imx lcd display controller
Adds device tree bindings for the imx enhanced LCD interface (eLCDIF)
controller. The compatible is reused from linux.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-02-07 14:28:55 -06:00
Nathaniel Graff
b0844959f6 drivers/i2c: I2C driver for SiFive Freedom
Driver for the I2C peripheral in the SiFive Blocks RTL
Repository (https://github.com/sifive/sifive-blocks).

Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
2019-02-07 10:47:48 -06:00
Nathaniel Graff
5dbb147993 drivers/spi: Generate clock-frequency for SPI bus
Use DTS to generate the clock frequency driving the SPI peripheral.

Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
2019-02-06 09:00:00 -06:00
Daniel Leung
f7a42a70f8 gpio: intel_apl: rework driver for pin_mask callback
To avoid confusion, callbacks using ordinal pin numbers
is going to be reverted. So the driver has to be re-worked
to expose multiple devices so each device has 32 pins.

Also fixes #12765

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-02-06 07:18:15 -05:00
Daniel Leung
7695a72e3c drivers/interrupt_controller: shared_irq: configure by device tree
This allows the shared_irq driver to be configured by device tree.
With previous implementation, only the board configuration can
override the IRQ trigger, as the trigger config is a "choice" rather
than "config". With this patch, the driver can be fully configued at
the SoC level.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-02-06 07:18:15 -05:00
Aurelien Jarno
0b7e790250 display: ssd1673: add support for ssd16xx monochrome controllers
From the driver point of view, monochrome controllers from the ssd16xx
family mostly differ by the amount of row and columns that are
supported. If they support more than 256 rows and/or columns the
corresponding size or position is sent using 2 bytes instead of 1 byte.

This patch therefore adds the width-bits and height-bits DT properties
to make this configurable.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2019-02-02 10:28:11 -05:00
Erwan Gouriou
12166b61ee dts: stm32: Add watchdog nodes to STM32 dtsi files
Provide watchdog node definition to stm32 dtsi files to enable
watchdog configuration by device tree.
Add matching st,stm32-watchdog binding.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-02-01 19:16:59 -05:00
Andrzej Głąbek
1dbcd0affa samples: bluetooth: hci_spi: Use DT instead of Kconfig to get HW params
Convert the hci_spi sample to get the SPI and GPIO settings from Device
Tree instead of Kconfig.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-02-01 19:12:57 -05:00
Andrzej Głąbek
f6e42a3ecf dts: bindings: Add separate binding for Nordic nRF Family SPI Slave
Use separate bindings for nRF Family SPI Slaves and SPI Masters so that
the properties "csn" and "def-char" can be made required for Slaves
(for Masters such settings are not applicable), and to avoid confusion
between the properties "csn" and "cs-gpios" for Master nodes.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-02-01 19:12:57 -05:00
Andrzej Głąbek
c047e8e469 drivers: bluetooth: hci_spi: Use DT instead of Kconfig to get HW params
Convert the HCI SPI driver to get the SPI and GPIO settings from Device
Tree instead of Kconfig. The "zephyr,bt-hci-spi" binding is used as
a common one for this purpose ("st,spbtle-rf" is removed), to take
advantage of the new DT_<COMPAT>_<INSTANCE> generated macros and get
rid of related fixups and aliases.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-02-01 19:12:57 -05:00
Piotr Mienkowski
bca692ee8c drivers: i2c_gecko: use DT_<COMPAT>_<INSTANCE>_<PROP> defines
Use the new DT_<COMPAT>_<INSTANCE>_<PROP> defines to instantiate
devices. This commit adds also ability to define individual pin
locations on SoC series that support the feature. Definitions of GPIO
pins assigned to a given location have been moved from soc_pinmap.h file
to board DTS file.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-02-01 19:09:06 -05:00
Peter A. Bigot
05f411523d dts: bindings: cleanup mtd descriptions
spi,flash has been superseded by jedec,spi-nor so remove it.
atmel,at24 belongs in mtd rather than slave, so move it.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-02-01 04:21:40 -06:00
Peter A. Bigot
1a763e3c65 dts: flash: add bindings for jedec,spi-nor
Device tree bindings for serial flash chips that support the JEDEC
Common Flash Interface.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-02-01 04:21:40 -06:00
Piotr Mienkowski
91786e96aa drivers: leuart_gecko: use DT_<COMPAT>_<INSTANCE>_<PROP> defines
Use the new DT_<COMPAT>_<INSTANCE>_<PROP> defines to instantiate
devices. This commit adds also ability to define individual pin
locations on SoC series that support the feature. Definitions of GPIO
pins assigned to a given location have been moved from soc_pinmap.h file
to board DTS file.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-02-01 04:18:50 -06:00
Anas Nashif
a93651085e boards: remove pulpino board
This board is unmaintained and unsupported. It is not known to work and
has lots of conditional code across the tree that makes code
unmaintainable.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-31 22:47:18 -05:00
Piotr Mienkowski
a148e11e2a drivers: uart_gecko: use DT_<COMPAT>_<INSTANCE>_<PROP> defines
Use the new DT_<COMPAT>_<INSTANCE>_<PROP> defines to instantiate
devices. This commit adds also ability to define individual pin
locations on SoC series that support the feature. Definitions of GPIO
pins assigned to a given location have been moved from soc_pinmap.h file
to board DTS file.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-01-31 03:14:51 -06:00
Kumar Gala
1d210dc2d8 sensor: adxl372: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert adxl372 sensor driver to use new defines so we can remove the
dts_fixup.h code for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-30 17:51:25 -06:00
Kumar Gala
352234e0b6 drivers: uart_nsim: Add device tree support
Add Device Tree support for uart nsim ARC driver.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-30 12:27:37 -06:00
Michael Scott
a4361ffe44 dts: bindings: nxp-uart: add hw-flow-control binding
Support for HW flow control was recently enabled in the NXP MCUX
HAL layer.  Let's add a DTS binding definition for "hw-flow-control".
The MCUX uart driver shim can use this to enable HW flow control.

Signed-off-by: Michael Scott <mike@foundries.io>
2019-01-30 02:53:12 -06:00
Kumar Gala
fe8edc2884 display: ssd1306: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert ssd1306 display driver to use new defines so we can remove
the dts_fixup.h code for it.  Also dropped "-i2c" from compatible.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-29 14:21:32 -06:00
Kumar Gala
3b42943fe7 display: ssd1673: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert ssd1673 display driver to use new defines so we can remove
the dts_fixup.h code for it.  Also dropped "-spi" from compatible.

Fix up references in reel_board dts and sample.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-29 14:21:06 -06:00
Kumar Gala
003bdb5fb6 led_strip: lpd880x: Add Device Tree support
Convert the lpd880x driver to use device tree and new DT_<COMPAT>
defines.  Support both LPD8803 & LPD8806 device tree compats.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-29 12:04:07 -06:00
Martin Benda
9653e15139 drivers: timer: Add RTC-based system timer for Atmel SAM0 series MCU
Add sam0_rtc_driver that implements system timer API on top of the RTC
and can be used as a replacement for the default systick timer.

Signed-off-by: Martin Benda <martin.benda@omsquare.com>
2019-01-29 17:58:05 +01:00
Peter A. Bigot
492787268b boards: nrf52_pca20020: add hts221 drdy-gpios
Enables asynchronous sampling on Thingy:52.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-01-29 17:50:02 +01:00
Savinay Dharmappa
3bec750268 dts: xtensa: esp32: Add device tree support.
add device tree support for esp32

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2019-01-29 09:47:17 -06:00
Armando Visconti
7c32f3091b dts/bindings: audio: add binding for ST MPXXDYYY pdm microphones on I2S
Provide dts yaml bindings for ST MPXXDYYY microphones family on I2S.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-01-28 11:57:25 -06:00
Armando Visconti
f322c0b0ab dts/i2s: Extend the I2S dts binding with subnodes capability
This commit introduces the possibility to have multiple
device nodes attached to the same I2S controller. For this
purpose a new i2s-device.yaml description has been introduced
with the a 'reg' property to define the logic number of the
device. For example, if two microphones are attached to the
same I2S port (say 1) to achieve stereo audio, the two microphones
might be described in dts as:

    &i2s1 {
        status = "ok";

        mic@0 {
            compatible = "...";
            reg = <0>;
            label = "...";
        };
        mic@1 {
            compatible = "...";
            reg = <1>;
            label = "...";
        };
    };

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-01-28 11:57:25 -06:00
Ioannis Glaropoulos
daa22c4aca dts: nordic: adding FICR binding file and macro define
Adding a binding .yaml file for Nordic FICR and the
corresponding macro definition for NRF_FICR in
nrfx_config_nrf9160.h header file.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-01-28 15:32:51 +01:00
Ioannis Glaropoulos
b2d13af480 dts: nordic: correct binding file names
Correct the names of the binding files, so they comply
with binding file naming nomenclature.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-01-28 14:00:53 +01:00
Ioannis Glaropoulos
bd4d1e7ba9 dts: nordic: add binding and macro mapping for SPU
This commit contributes a binding .yaml file for Nordic nRF
SPU peripheral and defines the macro for the peripheral base
register address in file ext/hal/nordic/nrfx_config_nrf9160.h.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-01-28 14:00:38 +01:00
Michael Scott
13c794bc1c serial: RV32M1: introduce lpuart driver / DT bindings
Add a UART driver.

Signed-off-by: Michael Scott <mike@foundries.io>
Signed-off-by: Marti Bolivar <marti@foundries.io>
2019-01-25 11:59:46 -05:00
Michael Scott
0f314ebdda gpio: RV32M1: introduce gpio driver / DT bindings
Add a GPIO driver.

Signed-off-by: Michael Scott <mike@foundries.io>
2019-01-25 11:59:46 -05:00
Michael Scott
cdb1714c6c pinmux: RV32M1: introduce pinmux driver / DT bindings
Add a pinmux driver.

Signed-off-by: Michael Scott <mike@foundries.io>
Signed-off-by: Marti Bolivar <marti@foundries.io>
2019-01-25 11:59:46 -05:00
Marti Bolivar
58d8afb476 interrupt_controller: RV32M1: add intmux driver / DT bindings
Add a level 2 interrupt controller for the RV32M1 SoC. This uses the
INTMUX peripheral.

As a first customer, convert the timer driver over to using this,
adding nodes for the LPTMR peripherals. This lets users select the
timer instance they want to use, and what intmux channel they want to
route its interrupt to, using DT overlays.

Signed-off-by: Marti Bolivar <marti@foundries.io>
Signed-off-by: Mike Scott <mike@foundries.io>
2019-01-25 11:59:46 -05:00
Michael Scott
521f4778a1 clock_control: RV32M1: introduce PCC driver / DT bindings
Add a Peripheral Clock Controller (PCC) driver. This gates and ungates
clocks to various peripherals on the SoC.

Signed-off-by: Michael Scott <mike@foundries.io>
Signed-off-by: Marti Bolivar <marti@foundries.io>
2019-01-25 11:59:46 -05:00
Kumar Gala
f41a979df5 dts: bindings: smsc,lan9220: Fix warning related to id field
We get the following warning:

	extract_dts_includes.py: WARNING: id field set in
	'SMSC/Microchip LAN9220 Ethernet controller', should be
	removed.

Removed the id: field to fix.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-24 08:38:31 -06:00
Armando Visconti
e35f36966b driver/sensor: lis2dh: align driver to auto-generated dts macros
Use auto-generated device tree macros in LIS2DH driver to avoid
usage of dts.fixup files. The triggered interrupt part has been
slightly hacked to automatically understand whether only int1 is
configured or both int1 and int2.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-01-24 07:26:16 -06:00
Armando Visconti
8d352f5882 dts: sensor: lsm6dsl-i2c: Add irq-gpios property
Add the irq-gpios property to LSM6DSL sensor yaml description
file for I2C case.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-01-23 04:07:16 -06:00
Armando Visconti
fdce786c07 driver/sensor: add LIS2DS12 sensor support
Add support to STM LIS2DS12 3-axis accelerometer driver.
The driver support I2C and SPI bus communication and both
polling and drdy trigger mode.
Currently it uses high resolution only as power mode.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-01-22 08:48:40 -06:00
Andrzej Głąbek
59f4daf585 dts: nrf: Add bindings for CLOCK, POWER, RTC, and TIMER peripherals
Add dts bindings for nRF CLOCK, POWER, RTC, and TIMER peripherals.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-01-21 10:13:34 +01:00
Paul Sokolovsky
5548b25863 boards: arm: mps2_an385: Add DTS node for Ethernet controller
The board has SMSC LAN9220 (actually as an "IP core" in an
FPGA-emulated SoC). The patch includes DTS bindings for this device.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-01-19 11:59:29 -05:00
Kumar Gala
8b691f50ca led_strip: ws2182: Add Device Tree support
Convert the ws2812 driver to use device tree and new DT_<COMPAT>
defines.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-18 12:47:45 -06:00
Maureen Helm
ce5926aa6d dts: Add bindings for imx lpi2c
Adds device tree bindings for the imx lpi2c peripheral.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-01-18 06:49:35 -05:00
Kumar Gala
689ad43b62 sensor: hts221: Move GPIO to device tree
Move how we configure the DRDY gpio line to device tree from Kconfig.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-17 11:06:38 -06:00
Andrei Gansari
4118b8843f drivers: eth_enc28j60: moved to dts
Driver for networking device Microchip ENC28J60 is used as SPI slave,
moved to DTS type definition. Samples echo_client and echo_server use
this device on Arduino 101 board.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-16 21:28:23 -05:00
Kumar Gala
be2b6f870d sensor: bme280: Converting to using device tree
Convert the BME280 driver to use device tree and new DT_<COMPAT>
defines.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-16 12:39:37 -06:00
Savinay Dharmappa
81d3a4ff97 dts: binding: Add i2c binding for nios2
patch add i2c ymal file for nios2 arch.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2019-01-16 12:35:30 -06:00
Karl Zhang
80a9fc3fa1 arm: v2m musca: Add support for v2m musca SoC and board
Support musca board as a variant, it is a Cortex-M33 based SoC.

Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-15 15:40:37 -06:00
Andy Gross
9cc4b59069 serial: Add Support for ARM PL011 UART
This patch adds a serial driver for the ARM PL011 IP block.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-15 15:40:37 -06:00
Peter A. Bigot
83773ecc19 dts: correct compatible name for I2C EEPROM devices
Zephyr has been using "i2c,eeprom" for the compatible property.  This is
inconsistent with the property documentation which expects
"manufacturer,model" to be used.

The Linux standard compatible name for I2C EEPROMs is "atmel,at24".  The
standard for SPI EEPROMS is "atmel,at25".  We don't have support for the
latter, but change the name for the former.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-01-15 08:29:52 -06:00
Ioannis Glaropoulos
4fccdaf5dd dts: nordic: add missing nRF91 flash controller binding
This commits adds the binding for nRF9160 flash controller.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-01-15 08:17:50 -06:00
Kumar Gala
0891ad4362 dts: nordic: Fix vendor prefix for flash controller
The vendor prefix for the flash controller should be "nordic," not
"nrf,".

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-15 08:17:26 -06:00
Kumar Gala
a4c3feced4 dts: flash: w25qxxdv: Add Device Tree Support for SPI FLASH w25qxxdv
Convert the w25qxxdv driver to use device tree for SPI device params.
Updated the Arduino 101 config to use device tree to specify the SPI
flash.  Update the arduino_101_sss to drop Kconfig support for the
w25qxxdv flash.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-09 10:26:10 -06:00
Christian Taedcke
e6d5c4e3da soc: silabs_exx32: Add SWO logger support to EFM32PG12B
By default, after reset SWO signal is not connected to GPIO pin.

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-01-09 15:30:59 +01:00
Piotr Mienkowski
8bed2d5e27 soc: silabs_exx32: Add SWO logger support
By default, after reset SWO signal is not connected to GPIO pin. This
commit adds required initialization code to enable support for SWO
logger. Not all SoC series support the feature.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-01-09 15:30:59 +01:00
Ashokkumar B
3c00d955f3 drivers: gpio: Add DTS support for Stellaris gpio driver.
* Add DTS support for gpio controller driver

Signed-off-by: Ashokkumar B <ashokkumar@zilogic.com>
Signed-off-by: Subash G <subash@zilogic.com>
Signed-off-by: Vishnu K <vishnu@zilogic.com>
Signed-off-by: Vaishnavi D <vaishnavi.d@zilogic.com>
2019-01-08 13:30:26 -06:00
42accf2e64 disk: add a SDHC card over SPI driver.
Features:

- Uses the SPI bus to communicate with the card
- Detects and safely rejects SDSC (<= 2 GiB) cards
- Uses the optional CRC support for data integrity
- Retries resumable errors like CRC failure or temporary IO failure
- Works well with ELMFAT
- When used on a device with a FIFO or DMA, achieves >= 310 KiB/s on a
  4 MHz bus

Tested on a mix of SanDisk, Samsung, 4V, and ADATA cards from 4 GiB to
32 GiB.

Signed-off-by: Michael Hope <mlhx@google.com>
2018-12-30 16:24:10 -05:00
Armando Visconti
b75a05cae6 driver: sensors: convert lsm9ds0_gyro to use information coming from dts
Convert lsm9ds0_gyro driver to get the device name as well as
i2c slave information and gpio info for triggers from device tree.
Updates the build_all test accordingly.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2018-12-20 12:35:46 +01:00
Kumar Gala
f7a8ed75ae dts: Rename imx-rt-{i,d}tcm compatible
The imx-rt-{i,d}tcm bindings can actually be utilized on the i.MX6/7 as
well for the TCM{L,U} regions of memory as they are specific to
instruction or data.

So let's rename imx-rt-{i,d}tcm to imx-{i,d}tcm.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-12-19 08:14:33 -06:00
Armando Visconti
4446b16e24 driver: sensors: convert lsm9ds0_mfd to use information coming from dts
Convert lsm9ds0_mfd accel/magn driver to get the device name as well
as i2c slave information from device tree. Updates the build_all
test accordingly.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2018-12-19 07:31:18 -06:00
Aurelien Jarno
6752b5df3f drivers: flash: add driver for STM32F7x series
This patch adds a flash driver for the STM32F7x series, inspired from
the STM32F4x one. It has been tested on the STM32F723, but should also
work on other SoCs of the family.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-12-17 08:15:59 -06:00
Kumar Gala
3bc4ec9a24 dts: binding: Add mmio-sram binding
Add mmio-sram binding so we generate defines for on-chip SRAMs

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-12-13 07:25:51 -06:00
Gaute Gamnes
7b1ebb2116 dts: nrf: PWM device node added to nRF52 devices with yaml binding
1. PWM device node added with alias to all
   nRF52x DTSI files. 1 instance for
   nRF52810, 3 instances for nRF52832, and
   4 instance for nRF52840.
2. Added yaml binding for Nordic PWM node.

Signed-off-by: Gaute Gamnes <gaute.gamnes@nordicsemi.no>
2018-12-11 15:18:14 +01:00
Kumar Gala
4a038d7fce dts: Add binding for NXP i.MX RT itcm/dtcm memories
Add comptiable into the device tree and associated binding files for NXP
i.MX RT ITCM/DTCM memory regions.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-12-10 10:44:11 -06:00
Armando Visconti
7dbbb07f07 sensors: convert lis3dh to use information coming from dts
Convert lis3dh accelerometer driver to get the device name as well
as i2c slave information from device tree. Updates the build_all
test accordingly.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2018-12-07 10:43:13 -05:00
Kumar Gala
a24770bd12 sensor: lsm6dsl: Update DTS support
Now that we can support the same compatible but different bus types,
update the LSM6DSL support to utilize the same compatible for either I2C
or SPI.  We rename the i2c binding file to st,lsm6dsl-i2c.yaml just to
be a bit more clear.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-12-07 09:08:04 -06:00
Kumar Gala
1fe9a5b8d8 dts: ieee802154: cc1200: Add DTS support
Add a dts binding file for the cc1200 and move the Kconfig options for
SPI and GPIOs to DTS for the CC1200 driver.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-12-05 10:13:23 -06:00
Vijay Kumar B
392be3a8b3 drivers: ethernet: Add DTS support for Stellaris Ethernet controller.
* Add DTS support for Stellaris ethernet controller.
  * Add base DTS binding definition for Ethernet.
  * Add DTS binding definition for Stellaris ethernet controller.

Signed-off-by: Fadhel Habeeb <fadhel@zilogic.com>
Signed-off-by: Nirav Parmar <niravparmar@zilogic.com>
Signed-off-by: Vijay Kumar B <vijaykumar@zilogic.com>
2018-12-04 09:36:51 -06:00
Jan Tore Guggedal
f291a520c2 dts: bindings: Add binding for ADXL372 using SPI
This patch adds dts/bindings/adi,adxl372-spi.yaml for
using ADXL372 on SPI bus instead of I2C which is used
in dts/bindings/adi,adxl372.yaml.

Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
2018-12-04 08:58:35 -06:00
Nathaniel Graff
c48c94c9e6 dts/plic: Remove base_label from PLIC binding
Generate the fully-qualified DTS output. We'll fixup the defines on a
per-soc basis.

Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
2018-12-04 07:48:27 -06:00
Peter A. Bigot
5313d4fb51 drivers: sensor: sht3xd: migrate GPIO from Kconfig to device tree
Replace Kconfig ALERT signal GPIO device and pin information with device
tree bindings.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2018-11-30 08:30:13 -08:00
Peter A. Bigot
b7dc23984d drivers: sensor: sht3xd: migrate I2C from Kconfig to device tree
Replace Kconfig I2C bus and address information with device tree
bindings.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2018-11-30 08:30:13 -08:00
Armando Visconti
73a6f58dd4 sensors: convert lis2dh to use information coming from dts
Convert lis2dh accelerometer driver to get the device name as well
as i2c/spi slave information from device tree. Updates the build_all
test accordingly. (issue #11605)

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2018-11-30 08:36:29 -06:00
Sathish Kuttan
1b1c80256f dts: intel_s1000: add pinctrl to device tree
Add pinctrl node to Intel S1000 SoC device tree for I/O MUX selection

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2018-11-29 14:23:24 -08:00
Aurelien Jarno
6194b7676c drivers: flash: add flash driver support for Atmel SAM E70
This patch adds a flash driver for the Atmel SAM E70 SoC. The driver has
been kept simple by considering that the flash is only composed of 8-KiB
blocks. Indeed an area at the beginning of the flash might be erased
with a smaller granularity, and the other blocks can also be erased with
a higher granularity. It also only handles the global read/write
protection, not the 128-KiB lock regions. A write error is returned if
a region is locked.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-11-20 14:11:07 -05:00
Stanislav Poboril
ba3ed24f3d imx: Add IMX IPM driver for i.MX socs
Add driver for i.MX Messaging Unit peripheral which can be used for
i.MX6SoloX, i.MX7D and other i.MX socs.

Origin: Original

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2018-11-19 08:38:38 -06:00
Michael Scott
7f6fcf2198 dts-binding: modem: wnc-14a2a: remove base_label to fix build errors
When the WNC-14A2A modem binding was originally introduced, I thought
the base_label would shorten the define keeping the result short and
easily portable.  Turns out with the latest changes, it has a side
effect of removing the "DT_*" prefix which is breaking the build.

Let's remove "base_label" from the modem binding and adjust all of
the dts_fixups referring to the WNC14A2A defines.

NOTE: This commit moves the left-over WNC14A2A dts_fixup defines from
the nRF52 soc into samples/net/lwm2m_client as the new values.
They will stay there until the modem can be re-configured as a shield.

Signed-off-by: Michael Scott <mike@foundries.io>
2018-11-17 00:50:15 -05:00
Andrei Gansari
db7d1da896 dts: added nxp.kinetis-ptp interrupts
Kinetis device K64F's PTP interrupt crashed the system becase it was not
generated from dts. Device interrupt correctly set now.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2018-11-17 00:44:28 +01:00
Kumar Gala
25d17db96b ieee802154: cc2520: quark_se_c1000_devboard: Move all GPIOs to DTS
Added support to the ti,cc2520 binding for optional GPIO signals and
moved the quark_se_c1000_devboard to define those signals in the DTS.
This lets us remove board.h and some #defines & fake Kconfig symbols
from the quark_se_c1000_devboard board.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-16 14:02:00 -05:00
Yannis Damigos
31ae43d024 dts/bindings/usb: Add phys property to STM32 USB yaml
Add phys property, which specifies USB PHY provider,
to STM32 USB yaml files.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-11-15 07:27:23 -06:00
Yannis Damigos
68dc1125dc dts: bindings: Add yaml files for PHY subsystem
Add yaml file for initial support of USB PHYs.
It adds also yaml files for STM32 USBPHYC and
USB controllers with embedded PHY.

PHY refers to the physical layer which is used
to connect a device to the physical medium e.g.
USB controller.

Origin: original

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-11-15 07:27:23 -06:00
Maureen Helm
f2d8d93269 drivers: sensor: Convert adxl362 to device tree
Converts the adxl362 sensor driver to get the device name and spi slave
properties from the device tree rather than Kconfig. Updates the
build_all test accordingly.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-11-14 23:54:57 -05:00
Aurelien Jarno
16994088fd drivers: entropy: add Atmel SAM entropy generator driver
Tested on the Atmel SAM E70 Xplained board.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-11-14 12:58:49 -05:00
Savinay Dharmappa
8c65c1f18c dts: bindings: slave: Add yaml file to support spi flash
add yaml file to support spi flash

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2018-11-13 18:49:03 -05:00
Kumar Gala
9730ca1852 wifi: winc1500: Add Device Tree support
Add a dts binding for the Atmel WINC1500 WIFI chip.  Update the
quark_se_c1000_devboard to utilize this binding as well as the wifi
sample app.

We now get all the GPIOs related to the Atmel WINC1500 from the device
tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-13 14:12:18 -05:00
Kumar Gala
a134438840 sensors: bmi160: Add DTS support
Convert the BMI160 to use Device Tree to get SPI and GPIO params instead
of Kconfig.  Updated samples, tests, and arduino_101_sss board support
for this.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-13 10:23:22 +01:00
Kumar Gala
540405c44e dts: Update sifive PWM device tree binding/nodes for #pwm-cells
Add #pwm-cells to the sifive PWM binding and dts files.  This is to
support have a pwms clients work properly.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-13 10:00:38 +01:00
Kumar Gala
c0faa8a9f4 dts: Update i.MX PWM device tree binding/nodes for #pwm-cells
Add #pwm-cells to the i.MX PWM binding and dts files.  This is to
support have a pwms clients work properly.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-10 10:46:04 -06:00
Kumar Gala
944f3a90ec dts: Update STM32 PWM device tree binding/nodes for #pwm-cells
Add #pwm-cells to the STM32 PWM binding and dts files.  This is to
support have a pwms clients work properly.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-10 10:42:51 -06:00
Tomasz Bursztyka
41cc60be90 dts: Add YAML bindings for Intel SPI driver
Currently found on Galileo board.

Fixes #11064

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-11-09 05:25:11 -06:00
Tomasz Bursztyka
24e86d6b16 dts/bindings: Add YAML bindings for the CC2520 15.4 device
This is found on quark_se_c1000_devboard but can also be wired on
any boad with SPI bus.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-11-09 05:25:11 -06:00
Piotr Mienkowski
d9e2171aa9 drivers: flash_gecko: Add flash driver for SiLabs Gecko SoCs
Tested with SLWSTK6061A / BRD4250B wireless starter kit.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2018-11-08 17:56:44 -05:00
Aurelien Jarno
6b6e54321a drivers: usb: add usb device driver for Atmel SAM E70 family
This patch adds a USB device driver for the USBHS device that can be
found on Atmel SAM E70 SoC family. Only the FIFO mode is supported
(as opposed to DMA). It supports LS, FS and HS modes, but defaults to
FS mode as Zephyr does not fully support HS mode yet.

Tested examples on an Atmel SMART SAM E70 Xplained Board:
* usb/cdc_acm
* usb/hid-mouse
* usb/mass

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-11-06 16:32:35 -05:00
Kumar Gala
bfc4281cc0 arm: kinetis: Add basic DTS support for TRNG
Add dts binding and info for TRNG device and enable basic support to
get the device name from DTS.  We leave for now the base addresses
coming from the MCUX HAL.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-06 08:49:50 -06:00
Kumar Gala
727a9a7f99 arm: kinetis: Add basic DTS support for RNGA
Add dts binding and info for RNGA device and enable basic support to
get the device name from DTS.  We leave for now the base addresses
coming from the MCUX HAL.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-06 08:49:50 -06:00
Kumar Gala
6fd3fbbd22 dts/extract_dts_includes.py: Rework flash partition extraction
Reworked flash partition extraction so we call it when we see a
node that is 'partiton@' instead of per property.  We also handle the
'read-only' property in the flash partition extraction function which
lets us remove 'use-property-label' handling.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-06 07:42:39 -06:00
Kumar Gala
cfbde52a2c dts/bindings: Add binding for pwm-leds
Add a binding file to descript an LED connected via a PWM.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-05 14:01:21 -06:00
Kumar Gala
d857d2fac2 arm: soc: kinetis: Update PWM dts support
Add #pwm-cells properties to kinetis dts files and update the yaml
binding to spec the two cells as pin and period (in nanosecond to match
Linux Kernel binding spec).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-05 14:01:21 -06:00
Kumar Gala
ac7da0b65c gpio: ti cc32xx: Add device tree support for GPIO
Convert gpio_cc32xx driver over to using device tree. Added binding
files, updates to dts for various SoCs that use cc32xx.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-05 11:08:35 -06:00
Kumar Gala
98dff36250 dts/bindings: Fix warning in ti,cc32xx-i2c.yaml
A missing version field was causing a warning, add the version field to
fix the issue.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-05 10:51:54 -06:00
Anas Nashif
c2c6a6a245 qemu_riscv32: use hifive1 configuration
Use hifive1 configuration for this qemu and set
SYS_CLOCK_HW_CYCLES_PER_SEC to 10000000

Fixes #10043

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-05 11:00:38 -05:00
Kumar Gala
ddc2a3d9df drivers: spi_sam0: move sercom pad info to dts
Move the setting of the SERCOM PAD for dipo/dopo for the spi driver
into device tree out of board.h

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-05 10:05:47 -05:00
Kumar Gala
6d08958ad5 drivers: uart_sam0: move sercom pad info to dts
Move the setting of the SERCOM PAD for rxpo/txpo for the uart driver
into device tree out of board.h

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-05 10:05:47 -05:00
Kumar Gala
365dc19bc4 dts: bindings: remove setting use-prop-label in st,stm32-ccm
We set 'use-prop-label' incorrectly in the st,stm32-ccm binding file.
This property is meant to generate names based on there being a label
property set in the node.  For st,stm32-ccm nodes we don't ever set
labels and the binding file doesn't specify a label.  So remove setting
'use-prop-label'.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-05 10:05:11 -05:00
Kumar Gala
719c9e7b92 dts/bindings: Remove id field from atmel,sam-watchdog
atmel,sam-watchdog..yaml had the old id field that we have removed.
Remove it so we stop getting a warning about it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-03 22:56:01 -04:00
Kumar Gala
11cb8778c7 riscv: Add min dts support for miv SoC & m2gl025_miv board
Add minimal DTS support for the m2gl025_miv.  The dts just has the core,
SoC, PLIC, and UART described.  We still get memory related info from
Kconfig.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-03 06:58:23 -04:00
Subramanian Meenakshi Sundaram
4e1179bba5 drivers: watchdog: Adding watchdog support for sam SOC
Adding watchdog driver for sam SoC. The current implemntation just
diables the watchdog on device boot.
This PR adds the following support for SAM3X, SAM4S and SAME70
1. Activate processor reset
2. Activate all reset
3. Generate interrupt on watchdog timer expiration.

Signed-off-by: Subramanian Meenakshi Sundaram <subbu147@gmail.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-02 15:09:22 -05:00
Kumar Gala
b683480f18 dts/bindings: Remove id field from inventek,eswifi
inventek,eswifi.yaml had the old id field that we have removed.  Remove
it so we stop getting a warning about it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-31 16:58:16 -04:00
Kumar Gala
58058ee425 dts/bindings: document use of value 'base_label'
'base_label' is not documented.  Update device_node.yaml.template to
fix this.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-30 19:09:34 -04:00
Kumar Gala
20b8b751d0 dts: bindings: cleanup soc-nv-flash binding
Remove setting of base_label and use-property-label from soc-nv-flash
binding file.  We don't really need to set either of these properties
in the binding and it just goes to make things more complicated than
they need to be.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-30 15:12:28 -05:00
Jan Van Winkel
a466154dcc drivers: display: Added DTS support for ili9340
Added device tree support for ili9340 display driver

Part of #10894

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2018-10-29 22:19:58 -04:00
Loic Poulain
38080c8d93 dts/bindings: Add bindings for es-WiFi module
This WiFi module is supported by the es-WiFi driver.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2018-10-29 16:38:02 +02:00
Kumar Gala
1becbfcb8b drivers: display: ssd1673: Fixup dts support
There were several issues in the dts binding for the ssd1673 display:
* binding file mixed description & generation up together
* Use of BASE_LABEL
* orientation-flipped should have been of type boolean

Update the binding file to reflect these changes, and made associated
changes to dts_fixup.h and driver as needed.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-26 08:13:04 +01:00
Kumar Gala
060b8c1512 drivers: ssd1306: fixup dts support
A few issues with the dts support for the SSD1306 display driver:
1. binding file mixed description & generation up together
   - rename most uses of generation to description and add proper
     generation field into yaml
2. Drop use of BASE_LABEL, this shouldn't be used by most bindings
3. dts defines that are being assumed in driver aren't correct.  We
   should be using a dts_fixup.h in the sample to map the generated
   defines to those used in the driver.  We remove the incorrect
   defines that the driver assumes right now.
4. Fixup 'segment-remap' and 'com-invdir' properties that are booleans
   in the binding file and associated code changes.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-24 16:42:35 +01:00
Diego Sueiro
537798db0d soc: arm: exx32: Add Silabs EFR32MG12P soc files
The Silicon Labs EFR32MG12P Mighty Gecko MCU includes:
* Cortex-M4F core at 40MHz
* up to 1024KB of flash and 256KB of RAM
* integrated Sub-GHz and/or 2.4GHz radio
* multiple low power peripherals

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
Signed-off-by: Endre Karlson <endre.karslon@gmail.com>
2018-10-19 13:47:49 -05:00
Andrei Gansari
02e217df50 drivers: eth_mcux: kinetis networking device Tree
Partially replaces Kinetis MCUX driver configuration from Kconfig to
Device Tree. Interrputs moved from defines configuration to DT.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2018-10-19 07:57:20 -05:00
Michael Hennerich
be9780c617 drivers: sensors: adxl372: Add missing dts bindings
This patch adds the required dts/bindings/sensor/adi,adxl372.yaml file.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
2018-10-18 08:02:59 -05:00
Johann Fischer
ba4239f5f8 Revert "drivers: sensor: Add support for MMA8451Q (3-axis accelerometer)"
Driver fxos8700 can also be used for the MMA8451
accelerometer and offers more functionality.
Revert the commit to avoid duplicate code.

This reverts commit 9c0d7813e5.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2018-10-17 14:16:02 -05:00
Pawel Dunaj
ecae736e0b dts: Add support for Nordic QDEC
Add QDEC binding and entry in Nordic SoC DTSI files.

This closes issue #9364

Jira:DESK-259

Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
2018-10-17 13:45:51 -05:00
Kumar Gala
e99b4235c5 dts: yaml: remove unused id field
Some new yaml bindings that got committed added back in the 'id:' field
which we have removed.  Remove it from those dts binding files.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-16 23:20:03 -04:00
Diego Sueiro
0c7a28c4cc drivers: serial: Rework Silabs Gecko UART Driver
Introduces the location property and adds the ability to use values
generated by the device tree configuration.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-16 15:59:37 -05:00
Johann Fischer
3a66b86544 drivers: add SSD1673 EPD controller driver
Add SSD1673 electrophoretic display controller driver.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2018-10-16 14:54:47 -04:00
Johann Fischer
419f4b7801 drivers: add SSD1306 display controller driver
Add SSD1306 OLED display controller driver.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2018-10-16 14:54:47 -04:00
Philémon Jaermann
c3aff28abc bindings: sensor: Add binding for LSM303DLHC
Add yaml binding for st,lsm303dlhc-accel
and st,lsm303dlhc-magn

Signed-off-by: Philémon Jaermann <p.jaermann@gmail.com>
2018-10-15 12:47:13 -05:00
Savinay Dharmappa
bf389e0853 drivers: watchdog: Add dts support for QMSI based watchdog.
patch adds the device binding for qmsi watchdog and device node
for socs which are using wdt qmsi driver.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-14 14:16:03 -04:00
Jan Van Winkel
db9403def5 drivers: sensors: Added MS5837 driver
Added MS5837 pressure sensor driver

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2018-10-12 14:28:32 -05:00
Mario Tesi
5d8834bee4 driver: sensor: Add support for LIS2MDL Mag sensor
Added support to LIS2MDL Magnetometer sensor provided
with following features:
	- I2C interface
	- Mag data
	- Temperature data
	- ODR configurable by config or at runtime
	- Trigger mode selectable by menuconfig
	- IRQ pin configurable (by dts or Kconfig)
	- Hard Iron offset setting at runtime
	- Include yaml file

Tested on ST MEMS IKS01A2 + NUCLEO STM32F411RE board.
LIS2MDL connected to I2C master interface (SPI 3 wire not
supported yet).
Test run with all ODR {10, 20, 50, 100} Hz in poll and
trigger mode.

GPIO IRQ dts configuration has been tested by adding
to boards/arm/nucleo_f411re/nucleo_f411re.dts file
this patch:

&i2c1 {
        status = "ok";
        clock-frequency = <I2C_BITRATE_FAST>;
+
+       /* ST Microelectronics LIS2MDL mag sensor */
+       lis2mdl-magn@1e {
+               compatible = "st,lis2mdl-magn";
+               reg = <0x1e>;
+               irq-gpios = <&gpioa 4 0>;
+               label = "LIS2MDL";
+               status = "ok";
+       };
};

and adding boards/arm/nucleo_f411re/dts.fixup with following
content:

	ST_STM32_I2C_V1_40005400_ST_LIS2MDL_MAGN_1E_LABEL
	ST_STM32_I2C_V1_40005400_ST_LIS2MDL_MAGN_1E_BASE_ADDRESS
	ST_STM32_I2C_V1_40005400_ST_LIS2MDL_MAGN_1E_BUS_NAME
	ST_STM32_I2C_V1_40005400_ST_LIS2MDL_MAGN_1E_IRQ_GPIOS_CONTROLLER
	ST_STM32_I2C_V1_40005400_ST_LIS2MDL_MAGN_1E_IRQ_GPIOS_PIN

For more info on this LIS2MDL please follow this link:
http://www.st.com/en/mems-and-sensors/lis2mdl.html

Signed-off-by: Mario Tesi <mario.tesi@st.com>
2018-10-12 14:13:50 -05:00
Armando Visconti
ab10f417d8 dts/arm/st/stm32f4: Add I2S support to DTS
Add I2S bus initial support to stm32f4 SOC family.
On stm32f4 the I2S shares same controller as SPI, so
the declarations have been adapted from SPI ones.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2018-10-11 16:55:00 +02:00
Kumar Gala
011b93011e dts: yaml: remove unused id field
The 'id' field was never used and tended to just have the compat of the
node.  Lets remove it and removed some code in extract_dts_includes.py
related to it.  Added a warning if 'id' is set in a yaml so we can
remove it going forward.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-11 08:03:44 -05:00
qianfan Zhao
5a07a1215d dts: Add spi node for atmel sam series soc
Add SPI1 and SPI2 support

Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
2018-10-10 11:29:49 -05:00
Tomasz Bursztyka
256c75a653 dts/bindings: Add YAML bindings for the E1000 Ethernet controller
This is a very common Intel Ethernet controller found in various
targets.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-10-10 04:17:15 -04:00
Kumar Gala
c3076d6eb2 gpio: silabs gecko: Add device tree support for GPIO
Convert gpio_gecko driver over to using device tree. Added binding
files, updates to dts for various SoCs that use gpio_gecko.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-09 22:34:56 -04:00
Yannis Damigos
90fcdfabd2 dts: bindings: usb: Add maximum-speed property
Add maximum-speed property to usb node.
It configures USB controllers to work up to a specific speed.
Valid arguments are "super-speed", "high-speed", "full-speed"
and "low-speed".

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-10-09 12:59:34 -04:00
Kumar Gala
db74c62398 gpio: sx1509b: Add device tree support for GPIO generation
Add the missing bits to the yaml & dts to enable GPIO pin generation
based on device tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-08 12:53:18 -04:00
Kumar Gala
da7ac50683 gpio: sifive: Add device tree support for GPIO generation
Add the missing bits to the yaml, dts, and Kconfig to enable GPIO pin
generation based on device tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-05 13:21:49 -05:00
Kumar Gala
f331cc5c09 dts: atmel: Add missing GPIO properties
The gpio controllers on SAM4S, SAME70, and SAMD were missing properties
related to GPIO pin generation.  Add the missing details into the yaml
and dts files to allow boards to specific gpio pins.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-04 07:49:03 -05:00
Kumar Gala
68edf341c2 dts: atmel: gpio: rename dts binding file
File was named atmel.sam-gpio.yaml, rather than our convention of
atmel,sam-gpio.yaml.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-04 07:49:03 -05:00
Kumar Gala
db2ca70a23 dts: pulpino: Add device tree support for GPIO controller
Add the needed bits to get device tree support for the GPIO controller
on the Zedboard-Pulpino.  This will allow us to move LED & button info
into the board.dts.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-04 07:48:32 -05:00
Kumar Gala
be4f53fa50 riscv: Add device tree support to pulpino
Add simple device tree support for the Pulpino SoC and Zedboard-Pulpino
board port.  This gets the UART info from device tree instead of soc.h

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-10-04 07:48:32 -05:00
Mieszko Mierunski
1dd5dc63c1 drivers: i2c: Add dts support for i2c slaves.
Adding i2c slave requires overlay with node definitions and
proper aliases depending on driver implementation.

Modified i2c_slave_api test to use information from dts.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-09-24 07:26:07 -05:00
Nazar Chornenkyy
edd6c7df41 drivers: serial: Add Cypress PSoC6 UART driver
Added basic PSoC6 UART driver and added two UART nodes in the PSoC6
device tree to have output from CM0+ and CM4 cores.

Signed-off-by: Nazar Chornenkyy <nazar.chornenkyy@cypress.com>
Signed-off-by: Oleg Kapshii <oleg.kapshii@cypress.com>
2018-09-21 18:50:59 -04:00
Nazar Chornenkyy
93f938c44e arm: Add Cypress PSoC6 SoC support
Added initial support and created the corresponding device tree part for
building PSoC6 SoC as part of Zephyr.

Signed-off-by: Nazar Chornenkyy <nazar.chornenkyy@cypress.com>
Signed-off-by: Oleg Kapshii <oleg.kapshii@cypress.com>
2018-09-21 18:50:59 -04:00
Dominik Kilian
67ca29a0e7 dts: nrf: Expand nRF DTS to support ARM TrustZone CryptoCell 310
Commit introduces support for ARM TrustZone CryptoCell 310
for Nordic Semiconductor nRF SoCs in device tree.

Signed-off-by: Dominik Kilian <Dominik.Kilian@nordicsemi.no>
2018-09-21 00:29:58 -07:00
Daniel Leung
8d18ebde9b gpio: add driver for Intel Apollo Lake SoC
This adds a driver for GPIO controller on the Intel
Apollo Lake SoC.

Origin: Original

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-09-19 21:36:16 -04:00
Erwan Gouriou
abf54a54e3 dts/bindings: document use of value 'use-prop-name'
'use-prop-name' is not documented.
Update dts/bindings/device_node.yaml.template to fix this.
Document that 'type' attribute is not used.

Fixes #9971

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-09-19 09:16:28 -04:00
Maureen Helm
e4aacd31d6 dts: Add lpspi yaml bindings and dts nodes
Adds yaml bindings and dts nodes for the nxp lpspi peripheral.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-09-19 09:15:29 -04:00
Erwan Gouriou
1b394d6e14 dts/arm/st: Add missing properties to stm32f2 fash controller node
Flash controller-node for stm32f2 based SoCs was missing basic
properties such as compatible, labeln reg and interrupts.
Fix this and add matching yaml binding file;

Fixes #10057

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-09-18 16:13:57 -07:00
Erwan Gouriou
1755cf6582 dts/bindings: Add 'generation' directive on for 'compatible' property
Add 'generation: define' directive to 'compatible' property.
When existing for a type of device, move compatible property
description in device base structure (eg: i2c.yaml)

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-09-14 08:02:53 -05:00
Bobby Noelte
00603bfa6b dts: bindings: consolidate binding for flash controller
All flash controllers have a mandatory compatible property.

Add it to the generic binding that is included by all.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2018-09-11 23:56:29 -05:00
Paweł Zadrożniak
7c2197f2d8 boards: nrf: uart: Moved UART pin configuration to DTS (nRF boards)
UART pins (TX, RX, RTS, CTS) are now configured in DTS files.
RTS and CTS definitions are optional. If flow control is enabled
and RTS/CTS pins are not defined, then compiler will issue
an error message.

Signed-off-by: Paweł Zadrożniak <pawel.zadrozniak@nordicsemi.no>
2018-09-11 23:29:50 -05:00
Filip Kubicz
990a0e8c71 dts: add SPI bindings for nRF family
This change adds DTS definition of SPI device for nRF chips.
It also removes SPI pin configuration from Kconfig and moves it to
chip DTS.

Signed-off-by: Filip Kubicz <filip.kubicz@nordicsemi.no>
2018-09-11 11:41:37 +02:00
Filip Kubicz
5c3992f34f dts: update I2C bindings for nRF chips
Change 'nRF5' family names to 'nRF' in I2C DTS.

Signed-off-by: Filip Kubicz <filip.kubicz@nordicsemi.no>
2018-09-11 11:41:37 +02:00
Daniel Leung
8708611fab adc: add native driver for Quark D2000
This adds a native ADC driver for Quark D2000.

Original: origin

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-09-05 18:38:57 -04:00
Punit Vara
c995c4b42b dts: arc: Use dts tree for designware driver
Get required data from dts tree.

Signed-off-by: Punit Vara <punit.vara@intel.com>
2018-08-29 13:46:57 -04:00
Andrzej Głąbek
0a97b5bf35 dts: nrf: Add ADC nodes and bindings for nRF SoCs
This commit adds ADC nodes to DTS files for nRF SoCs and introduces
corresponding  bindings for these nodes.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-08-29 13:46:57 -04:00
Diego Sueiro
a25c273f07 dts: Fix cmake warning about missing id field for fsl,imx7d-i2c
Adds the id field in fsl,imx7d-i2c.yaml file

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-08-21 18:54:41 -05:00
Sathish Kuttan
03da2f5c07 dts: audio: device tree support for audio devices
Added device tree directory for audio devices
Added an YAML file for TLV320DAC audio codec

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
2018-08-19 11:04:32 -07:00
Johann Fischer
7a507d3ea5 drivers: apds9960: add dt bindings
Add dt bindings.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2018-08-17 13:19:20 -07:00
Johann Fischer
6c9eb734a7 drivers: hdc1008: add dt bindings
Add dt bindings for HDC1008 sensor.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2018-08-17 13:19:20 -07:00
Mieszko Mierunski
4f6aac1a67 dts: nrf5: Changed GPIO and GPIOTE define names
Changed names using nrf5 to nrf for consistency with other drivers.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-08-17 07:29:14 -07:00
Olivier Martin
945ef745e0 dts/rtc: Introduce binding for STM32 RTC
This commit adds rtc fixup and dts blocks for RTC hardware
on STM32L4.

Signed-off-by: Olivier Martin <olivier.martin@proglove.de>
2018-08-16 13:38:43 -07:00
Johannes Hutter
41b7e7aa19 drivers: led: Add LED driver support for TI LP5562
Add support for TI LP5562 I2C 4-channel LED driver.

Supported blinking period: 1ms - 1000ms
Supported brightness value: 0% - 100%

This driver supports the entire currently available API.

Signed-off-by: Johannes Hutter <johannes@proglove.de>
2018-08-16 06:28:53 -07:00
Nathaniel Graff
45d5d5db48 boards: riscv: Convert HiFive1 to DTS
Adds DTS bindings for sifive,pwm0, sifive,uart0, sifive,spi0, and
riscv,plic0.

Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2018-08-13 18:35:38 -05:00
Diego Sueiro
9283ee7acc arch: i.MX add RDC peripheral permission setting for applications cores
This patch adds the RDC (Resource Domain Controller) peripheral
permissions settings for the i.MX applications cores (Cortex A9 on
i.MX6 and Cortex A7 on i.MX7).

This will enable both Linux (on application's core) and Zephyr (on M4
core) to share the peripherals and coexist.

The settings are defined at devicetree level and applied in the soc.c.

A complete solution should involve the SEMA4 to control the peripherals
access and prevent resource deadlocking and misusage.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-08-09 10:17:32 -05:00
Michael Scott
042d79e86c drivers: modem: add Wistron WNC-M14A2A LTE-M Modem Driver
The WNC-M14A2A (LTE / LTE-M) modem is presented as an Arduino-
compatible shield via AT&T's IoT Starter Kit v1.0.  It was
originally intended to work with the FRDM-K64F board, but
in theory as long as the right pins are configured it can
work with any board that supports Arduino-compatible headers.

The driver utilizes the CONFIG_NET_OFFLOAD setting to avoid the
normal handling of IP packets, and instead uses a socket-like
UART interface to handle incoming and outgoing data.

Signed-off-by: Michael Scott <mike@foundries.io>
2018-08-06 10:43:46 +03:00
Michael Scott
4016136b24 dts: bindings: add generic yaml description for uart-devices
Provide generic yaml description for uart-devices such as modems.

Signed-off-by: Michael Scott <mike@foundries.io>
2018-08-06 10:43:46 +03:00
Lars Knudsen
9c0d7813e5 drivers: sensor: Add support for MMA8451Q (3-axis accelerometer)
Only basic features supported initially but more could be added from:
https://www.nxp.com/docs/en/data-sheet/MMA8451Q.pdf

fixes #9006

A sample app will be provided in a separate PR.

Signed-off-by: Lars Knudsen <larsgk@gmail.com>
2018-07-31 09:07:54 -05:00
Yannis Damigos
8f338ecaa0 dts/bindings/usb: Add yaml files for STM32 OTG HS
Add yaml file to DT for initial support of STM32 OTG HS

Origin: original

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-07-24 22:27:17 -04:00
Wayne Ren
3bda93a3aa dts: arc: fixes the warning msgs during cmake
fixes the warning msgs during cmake which are
caused by the missing info in dts files

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-07-19 09:20:38 -05:00
Diego Sueiro
d99f6ada84 arch: Add support for i.MX PWM
Adds definitions, devicetree entries and clock controller
configurations for PWM peripheral.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-07-17 16:08:22 -05:00
Diego Sueiro
ecc891b296 drivers: Fix asserts in i.MX UART Driver
After running some tests which enable assert macro I found some issues
with the i.MX UART configuration.

This patch configures the Tx Fifo Watermark and Modem Mode accordingly.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-07-16 11:04:18 -05:00
Maureen Helm
6693537c54 dts: yaml: Align spi driver clocks bindings
The common spi.yaml defines an optional clocks property that can be
overridden by specific spi driver bindings to be required. The
description and generation attributes are duplicated.

This fixes build warnings:
extract_dts_includes.py: Merge of 'description': 'Clock gate control
	information'  overwrites 'Clock gate information'.
extract_dts_includes.py: Merge of 'generation': 'structures' overwrites
	'define'.

And introduces a different build warning, which is intended behavior:
extract_dts_includes.py: Merge of 'category': 'required'  overwrites
	'optional'.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-07-13 09:41:34 -05:00
Maureen Helm
4433d9d3d2 dts: yaml: Align serial driver clocks bindings
The common uart.yaml defines an optional clocks property that can be
overridden by specific serial driver bindings to be required. The
description and generation attributes are duplicated.

This fixes build warnings:
extract_dts_includes.py: Merge of 'description': 'Clock gate control
	information'  overwrites 'Clock gate information'.
extract_dts_includes.py: Merge of 'generation': 'structures'  overwrites
	'define'.

And introduces a different build warning, which is intended behavior:
extract_dts_includes.py: Merge of 'category': 'required'  overwrites
	'optional'.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-07-13 09:41:34 -05:00
Maureen Helm
bbda4455e4 dts: yaml: Add missing id property to nxp bindings
Fixes build warnings:

extract_dts_includes.py: 'id' property missing in 'Kinetis GPIO'
	binding. Using '<unknown id>'.
extract_dts_includes.py: 'id' property missing in 'Kinetis I2C
	Controller' binding. Using '<unknown id>'.
extract_dts_includes.py: 'id' property missing in 'Kinetis Pinmux'
	binding. Using '<unknown id>'.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-07-13 09:41:34 -05:00
Maureen Helm
f76f7585ab dts: yaml: Remove unused nxp,kw41z-sim.yaml
Kinetis SoCs were updated to use nxp,kinetis-sim.yaml in commit
3291735d11.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-07-13 09:41:34 -05:00
Michael Hennerich
21fd91e11e drivers: sensors: adt7420: Add driver for ADT7420 Temperature Sensor
This patch adds support for the Analog Devices ADT7420 High-Accuracy
16-bit Digital I2C Temperature Sensors. Optionally sensor threshold
events are supported.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
2018-07-12 13:03:24 -05:00
Diego Sueiro
970c4f9cf3 arch: Add imx7d_m4 i2c definitions
Adds all necessary i2c definitions and configurations for imx7d_m4 soc.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-07-06 15:55:57 -05:00
Kumar Gala
db1075e4e5 dts: Fix warning related to arm,v{6,7,8}m-nvic yaml files
The nvic yaml files were missing an id property.  So we'd get a warning
like:

extract_dts_includes.py: 'id' property missing in 'ARMv7-M NVIC Interrupt Controller' binding. Using '<unknown id>

Add the id to fix this warning.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-07-05 15:24:31 -05:00
Erwan Gouriou
9b046ec08a dts/stm32: add clock property to spi nodes
For test purpose, add clocks property to (some) spi nodes

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-07-05 11:16:38 -05:00
Sebastien Bourdelin
ac1a9c4ef2 drivers: led: Add LED driver support for NXP PCA9633
Add support for NXP PCA9633 an I2C 4-bit LED driver.
Supported blinkink period: 41ms to 10667ms
Supported brightness value: 0 to 100%

This driver supports the following APIs:

1. led_blink
2. led_set_brightness
3. led_on
4. led_off

Signed-off-by: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
2018-07-02 10:25:47 -05:00
Erwan Gouriou
37028baf38 dts/bindings: Remove redundant clock properties in st,stm32-i2c...
Clock property is is provided in i2c.yaml binding,
remove it from st,stm32-i2c-vX.yaml

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-06-22 12:30:33 -04:00
Mieszko Mierunski
dc1c2742b6 boards: nrf: Moved SDA and SCL pin configuration to DTS for nRF boards
SDA and SCL pins can now be configured through DTS.
Pins on development kits have been assigned according to arduino
headers.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-06-20 13:38:18 +02:00
Alexander Wachter
c601f3be67 can: Add can support for STM32L432
This commit enables CAN on the STM32L432.
Tested on nucleo l432ck with external transceiver and loopback mode.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2018-06-18 15:23:29 -04:00
Alexander Wachter
ebc31f6235 drivers: can: Prepare STM32 driver for other series than STM32F0
This commit splits the common interrupt into rx and tx parts because
only STM32F0 series has a common interrupt.
Moved clock source definition to device-tree.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2018-06-18 15:23:29 -04:00
Marc Reilly
6c60abb03b drivers: gpio: add dts support for nrf52 gpio
This adds basic support for declaring gpio nodes in dts for nrf52.
The dts.fixup provides mapping for the generated defines to the config
defines currently used by the nrf gpio driver.

Existing boards that use nrf52 are updated.

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
2018-06-14 15:56:39 +02:00
Savinay Dharmappa
b7c4c0302c dts: riscv32: riscv32-qemu: Add device tree support
add device tree support for riscv32-qemu

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2018-06-13 08:47:52 -04:00
Florian Vaussard
71e66f06b4 dts: stm32: Add Timer and PWM binding
Add new device tree bindings for STM32 Timer and PWM IPs.

Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
2018-06-12 03:54:26 -04:00
Rajavardhan Gundi
e5b0e9ac07 DTS: interrupt controller: Define IRQ priorities for CAVS & DW ICTL
IRQ priorities for CAVS and DW were previously defined in Kconfig.
They are now defined via DTS and removed from Kconfig.

Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
2018-06-11 17:27:58 -04:00
Alexander Wachter
b97dd472fb drivers: can: Move bit timing and clock to device tree
This commit moves the bit timing (PROP, BS1, BS2 segments and SWJ)
from Kconfig to the device-tree and fixes issue #7933

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2018-06-01 12:59:42 -05:00
Erwan Gouriou
922490d3bb dts/bindings: Remove superfluous property definition
"clocks" property is defined in st,stm32-u(s)art.yaml
files while aslo defined in uart.yaml.
Remove redundant information.

Fixes #7974

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-05-29 07:43:12 -07:00
Ilya Tagunov
1e6d827a53 drivers: serial: stm32: add LPUART support for L0/L4 series
LPUART (Low-power UART) peripheral is just like ordinary U(S)ART
which lives in a separate clock/power domain.
Therefore already existing code could be reused as is
almost entirely.

Signed-off-by: Ilya Tagunov <tagunil@gmail.com>
2018-05-25 11:54:42 -05:00
Bobby Noelte
58967c7d3c scripts: extract_dts_includes.py: fix multiple include in bindings
Correctly process multiple include files given to the
!include command of the YAML loader.

The fix only targets the sequential definition of include files.

Fixes #7067

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2018-05-25 10:59:12 -05:00
Savinay Dharmappa
76676651f4 dts: intel_s1000: Enable generating IRQ priority.
patch enable generating IRQ priority for designware
interrupt controller used in intel_s1000

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2018-05-22 09:30:14 -04:00
Tomasz Bursztyka
2223160144 dts/bindings: Make use of RTC base in QMSI bindings
QMSI bindings were created prior to this base, and unfortunately not
updated to latest changes on last rebase.

Fixes #7694

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-05-22 08:28:55 -05:00
Alexander Wachter
50f8296baa drivers: can: Add dts bindings for CAN
This commit adds generic device tree bindings for can devices.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2018-05-19 20:19:30 +02:00
Armando Visconti
36b0c321a7 dts: bindings: Add SPI yaml file for LSM6DSL sensor
The LSM6DSL accel/gyro sensor can be accessed through
SPI bus. So the required configuration can be passed through
dts file.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2018-05-18 13:10:33 -05:00
Tomasz Bursztyka
17a2c1e699 dts: Add yaml descriptor for the QMSI SS GPIO driver
Used in Intel Quark SE ARC core.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-05-18 20:18:50 +03:00
Tomasz Bursztyka
43878fd8b6 dts/bindings: Remove useless attribute in QMSI uart node descriptor
Clock gate is set on driver level through QMSI API.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-05-18 20:18:50 +03:00
Tomasz Bursztyka
1f2553ba5c dts: Add yaml descriptor for the QMSI RTC driver
Used in Intel Quark SE/D2000 SoCs.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-05-18 20:18:50 +03:00
Tomasz Bursztyka
878d0fb877 dts: Add yaml descriptor for the QMSI GPIO driver
Used in Intel Quark SE/D2000 SoCs.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-05-18 20:18:50 +03:00
Tomasz Bursztyka
b8e8077cbe dts: Adding priority cell to Intel's IOAPIC IRQ controllers descriptor
Zephyr exposes the ability to set IRQ priority on IOAPIC.
To keep compatibility with Linux, let's add the priority at the end
after sense. So imported dtsi with interrupt-cells set to 2 will work as
usual.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-05-18 20:18:50 +03:00
Savinay Dharmappa
2948924655 dts: nios2-qemu: add device tree support
Add device tree support for nios2-qemu

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2018-05-17 14:09:15 -07:00
Stanislav Poboril
5477ee4531 mcux: Add MCUX IPM driver for lpc and kinetis socs
Add driver for MCUX mailbox which can be used for lpcxpresso54114
and other lpc and kinetis socs.

Origin: Original

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2018-05-17 15:07:48 -05:00
Maureen Helm
7960f79134 dts: Add kinetis watchdog bindings and update k64, kw2xd soc nodes
Adds dts bindings for the kinetis watchdog peripheral, and updates the
watchdog nodes for the k64 and kw2xd socs.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-05-17 15:00:55 -05:00
Andy Gross
d75291ef93 yaml: rtc: Add yaml definitions for RTC
This patch adds the YAML descriptions for a generic RTC block and
also for NXP Kinetis based RTCs.

Signed-off-by: Andy Gross <agross@kernel.org>
2018-05-17 13:45:08 -05:00
Johann Fischer
9c27ae7162 dts: bindings: add yaml file for Kinetis USBD support
Add yaml file for Kinetis USBD support.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2018-05-17 07:00:49 -05:00
Yannis Damigos
d8983e6d11 dts/st,stm32-usb: Add use-prop-name to disconnect-gpios
Add use-prop-name to disconnect-gpios property in st,stm32-usb
yaml, in order to generate friendly name for the definitions.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-05-16 10:27:04 -05:00
Yannis Damigos
8cf04a18fd dts/bindings: Add reset/irq gpios to zephyr,bt-hci-spi yaml
Define reset-gpio and irq-gpio in zephyr,bt-hci-spi yaml, to
generate GPIO definitions for control pins of Bluetooth HCI
SPI module.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-05-15 15:11:12 -05:00
Wayne Ren
532e4d22ee dts: optimize and bug fixes the dts of em_starterkit
* add gpio, i2c, spi definitions
* optimize and bug fix the dts.fixup
* optimize and bug fix the em_starterkit related definitions
  in dts folder

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-05-15 09:48:11 +02:00
Karol Lasończyk
83e4947cf1 dts: nrf: Expand nRF DTS to support watchdog
Commit introduces support for watchdog configuration for Nordic
Semiconductor nRF SoCs in device tree.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2018-05-14 10:28:23 -05:00
Yannis Damigos
b3107fd120 dts/bindings/usb: Add disconnect gpio in st,stm32-usb.yaml
Add disconnect-gpio property in st,stm32-usb.yaml.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-05-11 16:53:12 -04:00
Maureen Helm
0d1beb2f9e boards: dts: Add mcr20a bindings and fix networking samples
Adds dts bindings for the mcr20a wireless transceiver. The frdm_k64f
board supports the mcr20a via an Arduino shield, therefore the dts node
is added to the board dts. The kw2xd is a SiP and thus the mcr20a dts
node is added to the soc dts.

The networking samples using prj_frdm_k64f_mcr20a.conf have been broken
since the refactoring of the mcux gpio driver to dts in commit
4e8f29f319. The sample is now fixed.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-05-10 15:43:42 -05:00
Maureen Helm
d2d4cea02d dts: nxp_kinetis: Add spi bindings for kinetis dspi and update soc nodes
Adds dts spi bindings for the kinetis dspi controller, and updates the
k64, kw2xd, kw40z, kw41z dts nodes accordingly.

Updates the dts interrupt priorities to match the board defconfigs
(e.g., boards/arm/frdm_k64f/Kconfig.defconfig)

For k64, fixes an error in the spi1 interrupt number and adds a third
instance (spi2).

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-05-10 15:43:42 -05:00
Maureen Helm
9cd36c7bd2 boards: dts: Add fxas21002 interrupt bindings and fix sensor sample
Adds dts bindings for the fxas21002 interrupt pins to all boards that
have this sensor.

The fxas21002 driver is currently only aware of one sensor interrupt
pin, therefore the routing of INT1 or INT2 to the driver is handled in
each board's dts.fixup.

The fxas21002 sample application has been broken since the refactoring
of the mcux gpio driver to dts in commit
4e8f29f319. The sample is now fixed.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-05-10 15:43:42 -05:00
Maureen Helm
90ac25f736 boards: dts: Add fxos8700 interrupt bindings and fix sensor sample
Adds dts bindings for the fxos8700 interrupt pins to all boards that
have this sensor. The frdm_k64f and hexiwear_k64 connect both sensor
interrupt pins to the mcu, but the frdm_kw41z connects only one.

The fxos8700 driver is currently only aware of one sensor interrupt pin,
therefore the routing of INT1 or INT2 to the driver is handled in each
board's dts.fixup.

The fxos8700 sample application has been broken since the refactoring of
the mcux gpio driver to dts in commit
4e8f29f319. The sample is now fixed.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-05-10 15:43:42 -05:00
Erwan Gouriou
00376f08ca dts/bindings: Add reset and irq gpios to "st,spbtle-rf" yaml
In order to generate GPIO definition for control pin of BlueNRG module
define reset-gpio and irq-gpio in st,spbtle-rf yaml binding.

Add HAS_DTS_SPI_PINS kconfig symbol to control use of the '#define'

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-05-10 14:21:16 -05:00
Kumar Gala
11a70647cf dts: spi: Add optional cs-gpios to the spi bus controller binding
Now that we can generate gpio info from dts lets add optional support
fot the cs-gpios property in the bus controller node.  This matches the
binding spec from Linux on how cs-gpios are handled.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-05-10 14:21:16 -05:00
Erwan Gouriou
93d3a42776 scripts: extract_includes_dts: Remove usage of cell_string yaml attribute
'cell_string' yaml attribute has been introduced in order to
help enforcement of specific string during defines generation.
This adds complexity in understanding script behavior as a black
box and create additional dependency which is not strictly required.

For node specific generation functions (pinctrl and interrupts),
this could be replaced directly by an hardcoded version
(as everyone used the same 'cell_string' anyway).
For extract_cells functions, string could be replaced by extracted
property name. As a consequence, we're now able to generate defines
for properties refering to these controllers via phandle.
For instance, in following node
 	spbtle-rf@0 {
 		compatible = "st,spbtle-rf";
 		reg = <0>;
		reset-gpios = <&gpioa 8 0>;
 	};
We'll be able to generate:
 #define ST_STM32_SPI_...LE_RF_0_RESET_GPIOS_CONTROLLER	"GPIOA"
 #define ST_STM32_SPI_...PBTLE_RF_0_RESET_GPIOS_FLAGS_0		0
 #define ST_STM32_SPI_..._SPBTLE_RF_0_RESET_GPIOS_PIN_0		8

Only impact for this whole change is for NXP clocks which were the
only ones using 'cell_string' attribute with a value different than
the default one.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-05-10 10:38:23 -05:00
Maureen Helm
16399a6479 dts: mimxrt1050_evk: Add external memory nodes
Adds flexspi and semc memory controllers to the i.MX RT SoC. Adds
hyperflash, qspi, and sdram external memories to the mimxrt1050_evk
board.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-05-08 17:39:28 -05:00
Savinay Dharmappa
7be3236ca4 dts: interrupt_controller: Add dts support for DesignWare controller
Add dts support for multilevel DW interrupt controller

Change-Id: Ia16d6870bd3a46fca933c906aedc6ba78ed5131a
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2018-05-01 16:46:41 -04:00
Manivannan Sadhasivam
bb394bbafb drivers: led: Add LED driver support for TI LP3943
Add support for Texas Instruments LP3943 - 16 channel LED driver.
Supported blinking period: 0 to 1600ms
Supported brightness value: 0 to 100%

This driver supports the following APIs:

1. led_blink
2. led_set_brightness
3. led_on
4. led_off

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2018-04-27 10:46:53 -05:00
Maureen Helm
22955b83fd dts: Add gpio labels to all kinetis socs
Adds gpio labels to all kinetis socs in preparation for refactoring the
mcux gpio driver to dts. The kl25z was missing gpio nodes altogether, so
they are added.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-04-20 08:54:11 -05:00
Erwan Gouriou
2b4cb5a7ad dts: provide yaml bindings for led and gpio keys
Provide yaml bindings for led and gpio keys (buttons).
These are based on gpio bindings.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-04-13 13:36:45 -05:00
Erwan Gouriou
6c92e55635 dts: bindings: add bindings for stm32 gpio
Provide yaml bindings for gpio nodes properties generation

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-04-13 13:36:45 -05:00
Erwan Gouriou
93318f9f00 yaml: rename cell_string clocks
Use capital letters, as this seems to be the norm for this field

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-04-13 09:01:25 -05:00
Diego Sueiro
346165b2e8 serial: Add imx uart driver shim
Adds a shim layer around the imx uart driver to adapt it to the Zephyr
serial interface.

Modem mode was introduce to control it as DCE and DTE and can be
configured in the device tree:
    modem-mode:
        type: int
        category: required
        description: Set the UART Port to modem mode 0 (dce) 1 (dte)
        generation: define

For now only the UART 2 was tested.

Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
2018-04-11 08:27:05 +02:00
Tomasz Bursztyka
a913ba038a dts: Add yaml descriptor for the QMSI SS i2c driver
Used in Intel quark_se's ARC core.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-03-23 10:42:33 +08:00
Tomasz Bursztyka
f98382a901 dts: Add yaml descriptor for the QMSI i2c driver
Used in some Intel quark SoC.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-03-23 10:42:33 +08:00
Tomasz Bursztyka
1ad56e3cee dts: Add yaml descriptor for the DW i2c driver
Shared irq is not managed there as it is a very SoC specific issue.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-03-23 10:42:33 +08:00
Tomasz Bursztyka
7789f9acb3 dts/i2c: Fixing copyright headers
Some yaml files were missing there copyright header.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-03-23 10:42:33 +08:00
Sundar Subramaniyan
d963762184 dts: bindings: Add yaml file for nRF52840 USBD support to DT
Add yaml files to DT to support nRF52840 USBD

Origin: Original

Signed-off-by: Sundar Subramaniyan <sundar.subramaniyan@gmail.com>
2018-03-15 12:39:53 +01:00
Aapo Vienamo
dd9719bf46 gpio: Add a driver for SX1509B
Adds a driver for SX1509B I2C GPIO chip. This driver only supports the
basic GPIO features and does not currently implement the LED driver and
keypad matrix features.

Signed-off-by: Aapo Vienamo <aapo.vienamo@iki.fi>
2018-03-13 12:31:16 -05:00
Aapo Vienamo
0b9ad29a40 dts: bindings: i2c: Add bindings for i2c_nrf5
A device tree bindings description is added for nRF5 I2C controller.

Signed-off-by: Aapo Vienamo <aapo.vienamo@iki.fi>
2018-03-13 14:14:13 +01:00
Kumar Gala
40b7be5197 drivers: i2c: Add DTS support to ARM SBCon I2C controller
Added device tree support to the ARM SBCon I2C controller.  We utilize
the compatiable "arm,versatile-i2c" the binding from Linux for the some
peripheral block.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-03-10 11:42:25 -06:00
Justin Watson
b9c65e1882 drivers: GPIO Added GPIO for SAM family.
Added GPIO driver for SAM family of SoCs.

Signed-off-by: Justin Watson <jwatson5@gmail.com>
2018-03-10 11:42:25 -06:00
a8a36a23fc spi: sam0: use Device Tree for configuration.
Switch the SoC device tree to define a single entry per SERCOM instead
of one per mode.

Define a Device Tree binding for the SAM0 SPI and use it instead of
Kconfig for enabling / disabaling instances

Switch the Arduino Zero, Adafruit Feather M0 Basic Proto, and
Trinket M0 to use the new defintion.

Add the APA102 LED that's on the Trinket as a test.

Signed-off-by: Michael Hope <mlhx@google.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-03-10 11:42:25 -06:00
f2651d0cc7 usb: sam0: add a USB device driver.
Implements a USB device driver for the SAM0 series.

Signed-off-by: Michael Hope <mlhx@google.com>
2018-03-10 08:41:39 -05:00
Yannis Damigos
c431152147 dts: bindings: Add yaml files for STM32 USB support to DT
Add yaml files to DT for initial support of STM32 USB

Origin: original

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-02-21 09:17:12 -06:00
8ee282e319 led_strip: add a APA102 driver.
The APA102 is a RGB LED with integrated controller.  LEDs can be
daisy-chained and use SPI for communication.  The SPI port is
configured via Device Tree.

Tested on the Adafruit Trinket M0.

Signed-off-by: Michael Hope <mlhx@google.com>
2018-02-17 08:53:23 -05:00
Erwin Rol
eaf74f71ed dts: arm: stm32: Add ccm address and size configurations
Configure ccm size and address via dts. According to the DT
specification, the unit-address of a node must match the
first address specified in the reg property of the node.

Signed-off-by: Erwin Rol <erwin@erwinrol.com>
2018-02-13 12:36:22 -06:00
Ioannis Glaropoulos
cf36cb2cdb arch: arm: minor style fixes in dts binding .yaml files
This commit updates the title and the description of the
ARMv6-M, ARMv7-M NVIC dts bindings, so that both the title
and the description reference the respective ARM architecture
and not the Cortex M cores.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-02-08 12:07:38 -06:00
Ioannis Glaropoulos
a0a03d7597 arch: arm: common Armv8-M support
This PR includes the required changes in order to support
conditional compilation for Armv8-M architecture. Two
variants of the Armv8-M architecture are defined:
- the Armv8-M Baseline (backwards compatible with ARMv6-M),
- the Armv8-M Mainline (backwards compatible with ARMv7-M).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-02-08 12:07:38 -06:00
Kumar Gala
8a6381d8e8 dts: flash: Add support for flash labels
Added a label for soc-nv-flash nodes.  Made some updates to the
generation to maintain creating defines for properties like
erase-block-size and write-block-size so they we get both
FLASH_ERASE_BLOCK_SIZE and FLASH_${LABEL}_ERASE_BLOCK_SIZE (same for
WRITE_BLOCK_SIZE).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-02-07 11:28:28 -06:00
Erwan Gouriou
2ede6c67ff sensors: move lps25hb and lsm6ds0 to dts
Introduce yaml binding files for sensors LPS25HB and LSM6DS0.
Fix description issue in lps22hb yaml file

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-02-07 10:30:36 -06:00
Manivannan Sadhasivam
9e88120fdf drivers: sensor: Add support for CCS811 Digital Gas Sensor
Add support for AMS CCS811 Digital Gas Sensor for monitoring
indoor air quality. This sensor reports the following parameters:

1. Co2 concentration
2. VOC concentration
3. Sensor voltage
4. Sensor current

This driver only supports polling mode as of now.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2018-02-06 11:16:26 -05:00
0a5725e858 pinmux: sam0: add a pinmux driver for the SAM0 series.
Pin multiplexing is a function of the PORT peripheral.  This change
defines a separate pinmux device at the same address as the PORTs
themselves.

Signed-off-by: Michael Hope <mlhx@google.com>
2018-02-05 06:31:35 -08:00
Maureen Helm
f633c0f997 dts: bindings: Introduce flash erase-block-size property
Adds a new optional dts property to define the erase block size of a
flash device. This will be used by the mcux flash driver to implement
the flash page layout function.

The value is set for all kinetis devices to match
FSL_FEATURE_FLASH_PFLASH_BLOCK_SECTOR_SIZE.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-01-31 16:43:40 -06:00
Maureen Helm
641aa5c58a dts: sensor: Add dts yaml bindings for the max30101 sensor
Adds dts yaml bindings for the max30101 sensor to allow the sensor
driver name, i2c driver name, and i2c address to be extracted from dts
instead of kconfig.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-01-31 10:17:58 -06:00
Maureen Helm
fd8a9ae89c dts: sensor: Add dts yaml bindings for the fxas21002 sensor
Adds dts yaml bindings for the fxas21002 sensor to allow the sensor
driver name, i2c driver name, and i2c address to be extracted from dts
instead of kconfig.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-01-31 10:17:58 -06:00
Maureen Helm
88d5949b94 dts: sensor: Add dts yaml bindings for the fxos8700 sensor
Adds dts yaml bindings for the fxos8700 sensor to allow the sensor
driver name, i2c driver name, and i2c address to be extracted from dts
instead of kconfig.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-01-31 10:17:58 -06:00
Kumar Gala
b8173d960e drivers: flash: NXP KL2X/KW4xZ: Add device tree support
Add device tree support for the "nxp,kinetis-ftfa" flash controller used
on the NXP KL2X and KW4xZ SoCs.

Fixes: #5788

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-29 16:34:49 -06:00
Kumar Gala
a394693d2f drivers: flash: NXP k6x/kw2xd: Convert to use device tree
Convert NXP k6x and kw2xd flash driver to use device tree to get the
flash controller name from device tree.  We introduce yaml bindings for
the "nxp,kinetis-ftfe" and "nxp,kinetis-ftfl" devices.

Fixes: #5788

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-29 16:34:49 -06:00
Kumar Gala
2dfee62a5e drivers: flash: atmel sam0: Convert to use device tree
Convert Atmel SAM0 flash driver to use device tree to get the flash
controller name and base address.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-27 21:09:28 -06:00
Kumar Gala
4ddb81f803 dts: arm: st: Add Flash Controller Nodes for STM32{F0,F3,F4,L4}
Introduce flash controller nodes for STM32 SoCs that are supported in
the flash driver.  This is a precusor to converting the flash driver on
stm32 over to using device tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-25 09:02:52 -06:00
Andrzej Puzdrowski
ff7dfc4fb4 dts: bindings: add support for the flash driver name
So far, DT did not support the flash driver name.
Any flash-controller should have the appropriate
flash driver that should be identified by its name.

This path adds generic support for extract the description
from the flash-controller node,
adds implementation of this property for all nrf5x targets.


Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2018-01-23 12:29:50 -06:00
Vincent Veron
73c52d74c3 boards: disco_l475_iot1: Enable vl53l0x sensor
Add all files related to the board and sensor.

Signed-off-by: Vincent Veron <vincent.veron@st.com>
2018-01-23 10:14:49 -06:00
Shiksha Patel
53cbfd3fd3 lpc: Add usart shim driver for lpcxpresso54114
Add usart-yaml in dts.

Build fsl_lpc_usart and fsl_lpc_flexcomm in
ext/hal/nxp/mcux/drivers/Makefile.

Only polling mode is implemented in usart now. Interrupt can be added in
future.

Signed-off-by: Shiksha Patel <shiksha.patel@nxp.com>
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-01-23 09:18:32 -06:00
Yannis Damigos
6f3779f738 dts: bindings: add binding for bluetooth modules
Provide dts yaml bindings for bluetooth modules
used by 96b_carbon and disco_l475_iot1 boards.

Devices are denoted as spi-devices and inherit from
spi-device.yaml

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-01-22 18:08:51 -06:00
Yannis Damigos
58c842934a dts: bindings: provide generic yaml description for spi-devices
Provide generic yaml description for spi-devices such as sensors.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-01-22 18:08:51 -06:00
Yannis Damigos
e10e324be9 dts: bindings: Add yaml files for STM32 SPI support to DT
Add yaml files to DT for initial support of STM32 SPI

Origin: original

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-01-17 11:51:48 -06:00
Gil Pitney
e5cef70abd drivers: i2c: Add support for cc32xx I2C bus
This was validated on the cc3220sf_launchxl board
using the Zephyr thermometer sample program
adapted to call the i2c driver directly, and fetching
samples from the on-board TMP006 temperature sensor.

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2018-01-09 08:39:59 -06:00
b85b676ba9 serial: add a serial driver for the SAM0 family.
Signed-off-by: Michael Hope <mlhx@google.com>
2018-01-04 13:18:25 -05:00
54c6fbdca7 gpio: add a GPIO driver for the SAM0 family.
Signed-off-by: Michael Hope <mlhx@google.com>
2018-01-04 13:18:25 -05:00
be8cba4bad watchdog: add a watchdog driver for the SAM0 family.
Signed-off-by: Michael Hope <mlhx@google.com>
2018-01-04 13:18:25 -05:00
Savinay Dharmappa
54239d50a4 dts: x86: Add interrupt controller node
patch adds interrupt controller node and interrupt
property for device nodes.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-12-15 11:22:55 -06:00
Marti Bolivar
b7e89940f7 dts: bindings: compatible properties are required
Any node which needs to generate defines from DTS must have a
"compatible" property, because the corresponding "constraint" is what
extract_dts_includes.py uses to match nodes with YAML files.

There are a few YAML files in the tree that list compatible as
"optional".  Fix them.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-12-15 09:57:30 -05:00
Erwan Gouriou
c0773cf381 dts: bindings: add bindings for 4 sensors
Provide dts yaml bindings for 4 sensors supported by disco_l475_iot1
board:
-hts221, lis3mdl, lps22hb and lsm6dsl
Devices are denoted as i2c-devices and, as such, inherits from
i2c-device.yaml

Signed-Off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-12-14 11:30:44 -06:00
Erwan Gouriou
b0568ad592 dts: bindings: provide generic yaml description for i2c-devices
Provide generic yaml description for i2c-devices such as sensors

New yaml binding category 'parent/child' is added.
It aims at binding two types of related node such as bus master and
bus slave.
In case of i2c-device object, parent property is 'bus' with value 'i2c'.
In the mean time, i2c node gets child property bus. Master and slave bus
values should match.
As such, 'i2c' node is bus master and 'i2c-devices' nodes are bus slaves

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-12-14 11:30:44 -06:00
Erwan Gouriou
104553d93f yaml: fix properties syntax to 'mapping' instead of 'series'
According to yaml syntaxic rules, 'properties' described in dts
bindings yaml files could be seen as 'mapping'(key/value couple),
instead of 'series' (list of single elements).
yaml 'mappings' will then be converted by yaml python library as
python 'dict' which will ease treatment (instead of current list
as were before this commit).
Same treatment is applied to 'inherits'.

script extract_dts_inlcude is updated to take change of yaml_list
structre into account. This allows some code simplification. Largest
impact is yaml_collapse function which works now allow complete
overload method on all the attributes of a yaml nodes.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-11-28 11:42:59 -06:00
Piotr Mienkowski
8bfcfe5545 drivers: i2c: Add DTS support for i2c_sam_twihs driver
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2017-11-15 11:13:08 -06:00
Maureen Helm
6043c74fd3 gpio: Introduce mcux igpio shim driver
Adds a new gpio driver for the NXP i.MX family of SoCs. Read, write,
configure, and callback API functions are all implemented.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-11-15 09:09:58 -06:00
Maureen Helm
0f3b490905 clock_control: Introduce mcux ccm driver
Adds a new clock control driver for i.MX SoCs that have the clock
control module (CCM).

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-11-15 09:09:58 -06:00
Savinay Dharmappa
f61d4266e4 dts: quark_se_c1000_ss_devboard: Add dts support
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-11-15 07:21:10 -06:00
Kumar Gala
ace47887bd serial: atmel_sam3: remove driver as it was deprecated
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-10-26 06:10:21 +02:00
Kumar Gala
b5c4237009 dts: yaml: rework yaml file layout
Moved yaml files to be under dts/bindings and have the bindings try
and match the linux doc device tree binding dir structure as the
canonical binding reference.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-10-23 15:02:00 +02:00