Commit graph

864 commits

Author SHA1 Message Date
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