Commit graph

8801 commits

Author SHA1 Message Date
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
Christian Taedcke
d969aced6d dts: silabs: Fix wrong gpio interrupt numbers
The interrupt numbers for two socs for the gpio peripheral was wrong.
This commits corrects this issue for the relevant socs.

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2021-01-07 16:54:23 -06:00
Christian Taedcke
0c17b3681c dts: silabs: Fix invalid nodes in gpio node
The watchdog and rng nodes were a sub-node of the gpio node.
This commits corrects this issue for the relevant socs.

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2021-01-07 16:54:23 -06:00
Thomas Stranger
4ed375040e drivers: adc: stm32: add support for stm32g0 series
Adds support for ADC on G0 series.
Simple implementation: sequencer not fully configurable,
and only one common sampling time.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2021-01-07 15:50:22 -06:00
Johan Hedberg
4ba387829b edtlib: Match any parent bus when binding lacks an explicit on-bus
There are some drivers in the tree that support devices on multiple
different buses, although so far this has not been represented in
device tree using the bus concept. In order to convert these drivers &
bindings to refer to a formal bus in device tree we need to be able to
match bindings which lack an explicit "on-bus: ..." value against any
parent bus. This will also be needed for any external bindings, since
those would not be aware of on-bus (as it's a Zephyhr-specific
extension).

The two drivers I'm particularly targeting is the ns16550 UART driver
(drivers/serial/uart_ns16550.c) and the DW I2C driver
(drivers/i2c/i2c_dw.c). They both support devices with a fixed MMIO
address as well as devices connected and discovered over PCIe. The
only issue is that instead of encoding the bus information the proper
DT way these bindings use a special "pcie" property in the DT node
entries to indicate whether the node is on the PCIe bus or not.

Being able to convert the above two drivers to use the DT bus concept
allow the removal of "hacks" like this:

 if DT_INST_PROP(0, pcie) || \
       DT_INST_PROP(1, pcie) || \
       DT_INST_PROP(2, pcie) || \
       DT_INST_PROP(3, pcie)

to the more intuitive:

 if DT_ANY_INST_ON_BUS_STATUS_OKAY(pcie)

This also has the benefit that the driver doesn't need to make any
arbitrary assumptions of how many matching devices there may be but
works for any number of matches. This is already a problem now since
e.g. the ns16550 driver assumes a maximum of 4 nodes, whereas
dts/x86/elkhart_lake.dtsi defines up to 9 different ns16550 nodes.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2021-01-07 20:07:12 +02: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
Francois Ramu
d695746ee6 soc: arm: stm32g4 add rtc feature on this serie
This patch enables the rtc clock on the stm32g4 soc
from STMicroelectronics.
Even if the set by default (reset value of theRCC_APB1ENR)
the bit is marked as 1.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-01-06 08:09:47 -06:00
Francois Ramu
f58f6b8cfb soc: arm: stm32g0 add rtc feature on this serie
This patch enables the rtc clock on the stm32g0 soc
from STMicroelectronics.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-01-06 08:09:47 -06:00
Daniel Leung
7312d361bc dts: intel_s1000: add GNA node
This adds the GNA node to the intel_s1000 SoC device tree
file.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-01-06 05:59:21 -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
Christian Taedcke
7ecca2976e dts: arm: nxp: Add initial LPC55S28 devicetree
Add initial devicetree for the NXP LPC55S28.

Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
2021-01-05 15:38:04 -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
Thomas Stranger
c0b8a7af8b soc: arm: stm32g0 dac peripheral on this serie
Add dac definition in soc devicetree for stm32g0.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2021-01-04 17:52:05 -05:00
Thomas Stranger
88dd6a200a soc: arm: stm32g0 add spi peripheral on this serie
This patch enables the spi support for the stm32g0 soc
from STMicroelectronics.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2021-01-04 17:52:05 -05:00
Andrzej Głąbek
4b38398c09 dts: nordic: Use NRF_DEFAULT_IRQ_PRIORITY instead of hard-coded values
Instead of hard-coded values for interrupt priorities in DT nodes, use
a macro that additionally can be overridden at the board or application
level. This allows, for instance, changing the interrupt priorities for
all but one peripheral without using a lengthy overlay file.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-01-04 12:51:06 -05:00
Andrzej Głąbek
a05987ed48 dts: nordic: Rename nrf5_common.dtsi to nrf_common.dtsi
This file originally added a "nordic,nrf-sw-pwm" node with a few basic
properties that were common to all nRF51 and nRF52 series SoCs. There
is no implementation of SW_PWM available for other nRF series. At the
time this file has been created, there was only nRF91 apart from nRF5x,
but when nRF53 appeared, the name of this file became misleading.
Recent addition of common disabling of the systick node made it clear
that such common file for all nRF SoCs is convenient.
To prevent further confusion, rename this file to nrf_common.dtsi and
keep there only stuff actually common to all nRF series, moving the
SW_PWM related node to particular SoCs that use it (this is actually
consistent with how all other nodes, that also have some properties
common to several or even all nRF SoCs, are defined).

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-01-04 12:51:06 -05:00
Mulin Chao
db5239ea68 dts: nuvoton_npcx: Change io status of host-uart device to "disabled".
Change io status of host-uart device to "disabled". It was caused by a
mistake during solving conflicts.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2021-01-04 12:21:57 -05: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
Mulin Chao
e258690655 driver: npcx: add glue module support in npcx series.
The System Glue module includes the three major functions:
— Power Switch Logic (PSL)
— SMBus multi-bus, wake-up support
— Simple Debug Port (SDP)

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). Since a single SMB module is able to serve only one
SMBus/I2C bus at a time, SMB_SEL registerin Glue module is used to
control theconnection of I2Cn_0 and I2Cn_1 interface pins to the SMBn
module (where n is 5, 6).

This CL provides a soc specific pin-control function called
"soc_pinctrl_i2c_port_sel" to switch buses (port) of the same SMB module
(controller). It will be used in the following i2c driver.

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
Sebastian Schwabe
a44de32db2 dts: arm: Add STM32F303x8 dtsi config
This commit adds the dtsi config for the stm32f303k8.
In addition fixing to long line for author.
Fixing sram0 memory size.

Signed-off-by: Sebastian Schwabe <sebastian.schwabe@mailbox.tu-dresden.de>
2020-12-20 10:14:03 -05:00
Vinayak Kariappa Chettimada
396566d449 dts: nordic: Use PPIs 0-5 consistently for SW PWM
Use PPIs 0-5 consistently across nRF51x and nRF52x for SW
PWM driver. Bluetooth LE controller's use of PPI has been
adjusted to use PPI 6-19 based on features enabled.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-12-20 13:36:09 +01: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
65e8ca1c99 dts: intel_s1000: add I2S nodes
This adds the I2S nodes to the intel_s1000 SoC device tree file.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-12-18 09:29:20 -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
Martin Jäger
e212446263 dts: arm: stm32l0: add lptim1 and other timers
Add all timers and PWM channels for the STM32L0 series MCUs.

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-12-17 10:25:34 -05:00
Henrik Brix Andersen
f9befe4f42 dts: arm: nxp: ke1xf: add ACMP devicetree nodes
Add Analog Comparator (ACMP) devicetree nodes to the NXP KE1xF SoC
devicetree.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-12-17 08:54:33 -06: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
Yestin Sun
6264788f6d soc: arm: st: Add spi to stm32l5 MCUs
Add spi1 interface for stm32l552xx and stm32l562xx microcontrollers

Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
2020-12-14 13:16:10 -05:00
Erwan Gouriou
905f496603 dts: stm32h7: Remove zephyr,flash-controller support on M4 core
Flash controller support is not yet ready on M4 core.
Remove the chosen declaration to make it clear.

Additionally, generate a build error if this driver is compiled
on M4 core.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-12-14 16:47:05 +01:00
Erwan Gouriou
5bc01c3614 dts: stm32h745: Define M4 flash controller
Define erase and write block size for M4 side flash controller.
Additionally move compatible definition from package to soc file.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-12-14 16:47:05 +01:00
Nicolas VINCENT
f7078da707 dts: flash: write/erase block size to stm32h7 devs
Define write and erase block size for supported stm32h7 devices
Use a specific compatible string for stm32h7 devices for the flash
driver

Signed-off-by: Nicolas VINCENT <nicolas.vincent@vossloh.com>
2020-12-14 16:47:05 +01:00
Erwan Gouriou
fe3613d90e dts: stm32h7: Set stm32h747 as a stm32h745 superset
Simplify stm32h7 dts series dts description by defining stm32h747
as a stm32h475 superset.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-12-14 16:47:05 +01:00
Lasse Sangild
4b20d3cb96 drivers: dac: Enable for STM32H7 (single core) series
Add DAC nodes to devicetree

Signed-off-by: Lasse Sangild <los@magnatek.dk>
2020-12-14 11:22:31 +01:00
Johan Hedberg
0ab5f59780 soc: x86: Add Elkhart Lake SoC definition
Add a basic definition for the Intel Elkhart Lake SoC.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-12-12 14:16:23 +02:00