Commit graph

1871 commits

Author SHA1 Message Date
Daniel Leung 07cb01b079 x86: apollo_lake: changes GPIO definition in DTS
This breaks down the GPIO controller definition in DTS into
multiple entries. This allows these controllers to be
referenced by other DTS, and test board overlay files.
And also we can remove the entries in the dts fixup file.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-02-05 12:00:36 +01:00
Daniel Leung 19f3a43199 dts: x86/apollo_lake: update UART and I2C unit address
There were complains about the unit-address and first reg
not matching. So update the DTS file to match.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-02-05 12:00:36 +01:00
Peter Bigot 1cf43985e9 drivers: sensor: lsm6dsl: update to new GPIO API
Correct IRQ active level to default active-high, switch to new
interrupt configuration.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Johann Fischer 2a117748f6 drivers: apds9960: convert to new GPIO API
Convert APDS9960 sensor driver to new GPIO API.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-02-05 12:00:36 +01:00
Maureen Helm cadbc96d66 drivers: sensor: Convert fxos8700 to new gpio api
Converts the fxos8700 sensor driver to the new gpio api. Updates device
trees for all boards with this sensor to active low gpio interrupts by
default.

Tested on frdm_k64f and rv32m1_vega_ri5cy boards. The latter verifies
that the reset output works correctly.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-02-05 12:00:36 +01:00
Maureen Helm 4b29b9faec disk: Convert usdhc driver to new gpio api
Converts the usdhc driver to the new gpio api. Updates the
device tree for the mimxrt1050_evk board to set appropriate active
high/low polarity for the power and card detect pins.

Note that the driver doesn't actually support interrupts yet. It
initializes a gpio callback for the card detect pin, but never actually
enables the gpio interrupt. This incomplete behavior is left as-is,
since the purpose of this patch is only to convert the driver to the new
gpio api, not to add new features.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-02-05 12:00:36 +01:00
Armando Visconti 0ae55c7ce9 driver/sensor: iis3dhhc: update to use new GPIO API
Get rid of all the deprecated functions and definitions
replacing them with the new ones.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-02-05 12:00:36 +01:00
Armando Visconti f5dc6580a0 driver/sensor: lsm6dso: update to use new GPIO API
Get rid of all the deprecated functions and definitions
replacing them with the new ones.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-02-05 12:00:36 +01:00
Armando Visconti cde71b4f75 driver/sensor: lps22hh: update to use new GPIO API
Get rid of all the deprecated functions and definitions
replacing them with the new ones.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-02-05 12:00:36 +01:00
Armando Visconti e690fab6b1 driver/sensor: lis2dw12: update to use new GPIO API
Get rid of all the deprecated functions and definitions
replacing them with the new ones.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-02-05 12:00:36 +01:00
Robert Winkler 94b8832585 boards: litex_vexriscv: Enable LiteX GPIO driver
Enable LiteX GPIO driver in litex_vexriscv board.

Signed-off-by: Robert Winkler <rwinkler@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
2020-02-05 12:00:36 +01:00
Robert Winkler e8d0eb1db1 drivers: gpio: Add LiteX GPIO driver
This commits adds GPIO driver for LiteX SoC builder.

Due to the fact that GPIO in LiteX is unidirectional and can be
configured with different pins amount per port, additional entries
were added to the dts file.

Signed-off-by: Robert Winkler <rwinkler@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
2020-02-05 12:00:36 +01:00
Peter Bigot 7821104ee9 drivers: gpio_sx1509b: add support for pin configuration on device init
IO extenders may provide input signals to LEDs or sensors where
leaving the signal undriven may result in increased power consumption
or misbehavior.  The SX1509B powers up with all signals configured as
inputs.  Provide a way to indicate which pins should be set as output,
and their initial signal level, when the device is configured.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Peter Bigot a49b364244 drivers: sensor: sht3xd: convert to new GPIO APIO
Update ALERT active level in all devicetree files.  Capture GPIO flags
in static configuration.  Add internal API to enable and disable
interrupt, to release the handlers when an alert occurs, and to
re-enable the signal when the handler completes.  Check for alerts
received during periods when the interrupt was disabled.

Extend the example to handle both above and below range triggers and
alerts that are present on startup.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Martí Bolívar 1d2a551c65 drivers: led_strip: modernize and fix up ws2812 drivers/sample
Convert the GPIO based driver to the new GPIO API. (Only the
gpio_configure() call is affected).

Move configuration to DT where appropriate for both SPI and GPIO
drivers, only leaving the SPI vs. GPIO decision in Kconfig (in
addition to the basic enable for the driver.) Move some files around
to clean up as a result of this change.

led_ws2812 sample changes:

- make the pattern easier to look at by emitting less light

- use led_strip alias from DT to get strip device, allocate
  appropriate struct led_rgb buffer, etc.

- move the pins around and remove 96b_carbon support (I have no board
  to test with)

GPIO driver specific changes:

- str is required to write OUTSET/OUTCLR, not strb. The registers
  are word-sized.

- the str[b] registers must all be in r0-r7, so "l" is the correct GCC
  inline assembly constraint for both "base" and "pin"

SPI driver specific changes:

- match the GPIO driver in not supporting the update_channels API
  method, which never made sense for this type of strip

- return -ENOMEM when the user tries to send more pixel data
  than we have buffer space for instead of -EINVAL

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Karsten Koenig 4897c95462 drivers: can: mcp2515: Switch to new GPIO API
Mark the INT signal to be active low and use the new functions to get
gpio state and configure the gpio interrupt flanks.

Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
2020-02-05 12:00:36 +01:00
Daniel Leung 7b9cc3198f dts: add binding for PCA95xx series I2C-based GPIO expanders
This adds the DTS binding for the PCA95xx series I2C-based GPIO
expanders.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-02-05 12:00:36 +01:00
Peter Bigot ff4294a7fe drivers: sensor: hts221: update to new GPIO API
Correct DRDY active level to default active-high, switch to new
interrupt configuration.

Also fix a common bug where an already-active DRDY signal is not
properly handled.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-02-05 12:00:36 +01:00
Gerson Fernando Budke 527ebe131d dts: arm: atmel: Add sam4e device tree
Add device tree for Atmel sam4e SoC

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-02-04 17:51:41 -05:00
Gerson Fernando Budke 47c034e4d9 dts: arm: atmel: Add samv71 device tree
Add device tree for Atmel samv71 SoC.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-02-04 08:56:19 -06:00
Oane Kingma 1421dfb3f1 boards: efr32_slwstk6061a: Enable watchdog
This commit adds the following:
- EFR32FG1P SoC support for the watchdog
- efr32_slwstk6061a board support for the watchdog

Signed-off-by: Oane Kingma <o.kingma@interay.com>
2020-02-03 11:25:40 -08:00
Christian Taedcke 6b382bc9e7 boards: efr32mg_sltb004a: Enable watchdog
This commit adds the following:
- EFR32MG SoC support for the watchdog
- efr32mg_sltb004a board support for the watchdog

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2020-02-03 11:25:40 -08:00
Oane Kingma fff0a2b5e7 dts / boards / soc: Add support for SiLabs Gecko watchdog
This commit adds the following:
- device tree bindings for Gecko watchdog driver
- EFM32PG SOC support for the watchdog driver
- EFM32PG board support for the watchdog driver
- DTS aliases for testing with default watchdog driver test

Signed-off-by: Oane Kingma <o.kingma@interay.com>
2020-02-03 11:25:40 -08:00
Peter A. Bigot 6438195701 devicetree: add voltage-divider binding
Define a binding for a voltage divider circuit with one or more analog
input channels.  Add devicetree nodes for several boards that have
battery voltage measurement support.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-02-03 16:26:51 +01:00
Maureen Helm ca43b7ceb4 dts: Add bindings for ft5336 touch panel controller
Adds device tree bindings for the focaltech ft5336 touch panel
controller, which will be used on several i.mx rt evk boards.

Moves address-cells and size-cells properties from the base kscan
bindings to the specific microchip,xec bindings since they are not
required for the ft5336.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-02-01 08:50:16 -05:00
Carlo Caione 0958673ee1 arch: arm64: Enable shared IRQ line for UART
Enable the shared IRQ for the UART line and enable the remaining tasks
that depends on a separated declaration of the TX/RX/Err/... IRQs.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2020-02-01 08:08:43 -05:00
Carlo Caione a61290e1a3 arch: arm64: Add support for qemu_cortex_a53 board
This patch introduces support for the qemu_cortex_a53 board emulated
using QEMU (virt platform) adding SoC, board and DTS files.

| ./scripts/sanitycheck -p qemu_cortex_a53
|
| Total complete:  190/ 190  100%  skipped:   40, failed:    0
| 150 of 150 tests passed (100.00%), 0 failed,
|     40 skipped with 0 warnings in 580.93 seconds

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2020-02-01 08:08:43 -05:00
Carlo Caione 6f36300219 drivers: timer: Add per-core ARM architected timer
ARM cores may have a per-core architected timer, which provides per-cpu
timers, attached to a GIC to deliver its per-processor interrupts via
PPIs. This is the most common case supported by QEMU in the virt
platform.

This patch introduces support for this timer abstracting the way the
timer registers are actually accessed. This is needed because different
architectures (for example ARMv7-R vs ARMv8-A) use different registers
and even the same architecture (ARMv8-A) can actually use different
timers (ELx physical timers vs ELx virtual timers).

So we introduce the common driver here but the actual SoC / architecture
/ board must provide the three helpers (arm_arch_timer_set_compare(),
arm_arch_timer_toggle(), arm_arch_timer_count()) using an header file
imported through the arch/cpu.h header file.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2020-02-01 08:08:43 -05:00
Anas Nashif aa14022c8a intel_s1000: various fixes for build errors
Lot of misdefined variables that went in undetected due to lack of CI on
this board. Fix them and test build with new SDK.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-31 14:51:37 -05:00
Johann Fischer c68ac431cc drivers: display: add support for GD7965 display controller
Add support for GD7965 display controller.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-01-31 11:37:35 -05:00
Ivo Clarysse 0c8a99582e dts: arm: stm32f4: add CAN_2 controller
Add the CAN controller device tree node for CAN_2 of the STM32F4 SoC
series.

Signed-off-by: Ivo Clarysse <ivo@bcdevices.com>
2020-01-30 14:27:28 -05:00
Carles Cufi 8129a78a51 dts: bindings: qspi-nor: Replace tabs with spaces
YAML doesn't support tabs, replace them with spaces.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-01-30 13:05:12 -06:00
Christian Taedcke fbbf68d63c soc: silabs_exx32: Support all gpio ports on efm32jg and efm32pg
This commit adds the remaining gpio ports I, J and K to the device
tree and dts_fixup headers of the EFM32JG12B and EFM32PG12B SoCs.

Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
2020-01-30 09:15:53 -06:00
Benjamin Valentin edb8df102f dts: atmel_sam0: fix location of flash and sram blocks
The blocks were moved into the soc block in samd5x.dtsi,
so we also have to move them for the the actual SoC definitions
that inherit from that.

Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2020-01-30 08:44:30 -06:00
Francois Ramu fafd20ca93 soc: arm: st_stm32: add stm32g474 series
This patch introduces the support of the STM32G474
     device from STMicroelectronics.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-01-30 08:30:15 -06:00
Christian Taedcke 4ead400d79 arm: exx32: Add Silabs EFM32JG12B soc files
The Silicon Labs EFM32 Jade Gecko MCU includes:

    * Cortex-M3 core at 40MHz
    * up to 1024KB of flash and 256KB of RAM
    * multiple low power peripherals

This is basically the same as the EFM32 Pearl Gecko, but with an ARM
Cortex-M3 core instead of a Cortex-M4F.

Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
2020-01-30 07:06:54 -06:00
Scott Branden 54ce0b2d34 arm: Add Broadcom Valkyrie SoC support
Add initial support for Broadcom Valkyrie SoC as part of Zephyr.

Signed-off-by: Scott Branden <scott.branden@broadcom.com>
2020-01-30 03:54:01 -06:00
Krzysztof Chruscinski dcdc61cfdb drivers: serial: nrf_uarte: Allow TX only instance
Extended nrf_uarte driver to support TX only UARTE instances.
When RX pin is not provided then RX is not started at all. This
allows to achieve low power with logging/console enabled.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-01-29 12:03:05 -06:00
Kwon Tae-young 271bd8bcea soc: stm32l1: Add support for STM32 IWDG
The driver for STM32's independent watchdog already exists and is
compatible with the stm32l1 SoC. Enable the independent watchdog
for the stm32l1 series for use with this driver.

Signed-off-by: Kwon Tae-young <tykwon@m2i.co.kr>
2020-01-29 11:20:57 -06:00
Kamil Lazowski 5b4f4253c1 drivers: flash: add Nordic JEDEC QSPI NOR flash driver
Most JEDEC NOR flash devices uses not only typical SPI mode
(MISO,MOSI,SCK and CS), but also QSPI mode (IO0,IO1,IO2,IO3,SCK and CS).
QSPI mode uses more data lines and as a result provide higher
throughput. If this were not enough, Nordic chips provide
hardware acceleration for read/write/erase functions, what
gives significant performance boost.
It does a lot of things "behind the scene", i.e when user has written
some data to the flash and would like to read them back, it has to wait
until the flash is ready by reading WIP bit in Status Register.
This driver does it automatically.

Signed-off-by: Kamil Lazowski <Kamil.Lazowski@nordicsemi.no>
2020-01-29 15:15:49 +01:00
Andrzej Głąbek 7899b1f5b6 modules: hal_nordic: Update nrfx to version 2.1.0
Update the hal_nordic module revision, to switch to nrfx 2.1.0.

Because the list of peripherals for nRF5340 has changed as follows:
- SPIM2 has been renamed to SPIM4
- SPIM2-3, SPIS2-3, TWIM2-3, TWIS2-3, and UARTE2-3 have been added
a couple of related corrections needed to be applied in dts and Kconfig
files, plus the spi_nrfx_spim driver has been extended with the support
for SPIM4.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-01-29 15:00:45 +01:00
Henrik Brix Andersen 5a82424767 dts: arm: stm32f3: add can controller
Add the CAN controller device tree node for CAN_1 of the STM32F3 SoC
series.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-01-29 09:47:27 +01:00
Tomasz Bursztyka 1d679156f8 dts/xtensa: Adding USB node to Intel s1000
The SoS provides one instance of the DW controller.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-01-28 18:18:18 -05:00
Tomasz Bursztyka c7cf2bc5f0 dts/bindings: Adding DesignWare USB node description
Corresponding driver will be configured via DTS.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-01-28 18:18:18 -05:00
Tomasz Bursztyka 8d10e66371 drivers/interrupt-controller: Make irqs DT configured in DW
DesignWare driver can manage different amount of irqs so let's make it
configurable via DTS.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-01-28 18:18:18 -05:00
Tomasz Bursztyka 9a57119189 dts: Add the 2 other DW DMA nodes to intel s1000
There are 2 other DMA controller found on this SoC.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-01-28 18:18:18 -05:00
Tomasz Bursztyka 0d4bf57709 dts: Setup DMA node for the Intel S1000
Details of the node are configured via DTS.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-01-28 18:18:18 -05:00
Tomasz Bursztyka e39571f331 dts: Add the bindings for DesignWare DMA node
This is the first step to enable the relevant driver to be configured
via DTS.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-01-28 18:18:18 -05:00
Henrik Brix Andersen 6487ecc784 dts: arm: nxp: ke1xf: fix LPO clock frequency
The frequency of the Low Power Oscillator (LPO) is 128kHz, not 125kHz.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-28 14:47:35 -06:00
Francois Ramu b7a3e7dc31 dts: bindings: dma add support for controller
This patch introduces the periph to/from memory dma transfer
define new values for dma cells on client side

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-01-28 12:58:44 -06:00
Francois Ramu 82799d2ae4 dts: bindings: dma controller supports mem2mem transfer
This checks if the DMA controller supports or not
the memory-to-memory transfers. For DMA Version1,
in the stm32f2xx, stm32f4xx, stm32f7xx series,
only DMA instance 2 is able to transfer mem-to-mem.
For other series, with DMA Version2, there is no such a limitation.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-01-28 12:58:44 -06:00
Ulf Magnusson 52e0dd748f dts: bindings: ps2: Replace 'should be 1/0' comments with 'const: 1/0'
Check with 'const:' that #address-cells is 1 and #size-cells is 0. That
way other values will get flagged by edtlib.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-28 12:48:53 -06:00
Jose Alberto Meza da87abd971 dts: arm: microchip: Adjust DT IRQ priorities
Adjust default IRQ priorities.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2020-01-28 20:13:36 +02:00
Jonas Eriksson 3e64e751b6 soc: stm32f1: Add support for stm32f1xx SoCs
Define stm32f100xx family, tested using stm32vl_disco
(stm32f100rb).

Signed-off-by: Jonas Eriksson <jonas@upto.se>
2020-01-28 08:30:52 -06:00
Ulf Magnusson 8e476ab692 dts: bindings: semtech,sx1276: Remove redundant document separator
Not needed. Bindings are never concatenated together.

Makes the https://github.com/zephyrproject-rtos/ci-tools/pull/123 check
clean, though it only looks at changed files in PRs.

Clean up the header too.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-27 10:41:31 -06:00
Oane Kingma 437587af20 drivers/ethernet: Add support for SiLabs Giant Gecko GG11
Ethernet MAC present in Silicon Labs EFM32GG11B4xx and
EFM32GG11B8xx SoCs.

DMA based driver with support for link up/down detection.

Signed-off-by: Oane Kingma <o.kingma@interay.com>
2020-01-24 10:28:33 -06:00
Oane Kingma c52787c4d1 boards/arm: Add initial support for SiLabs Giant Gecko GG11 STK
This commit adds initial support for the Silicon Labs EFM32
Giant Gecko GG11 StarterKit.

Features supported for now are NVIC, SysTick, GPIO, Flash,
Counter, I2C, UART and Ethernet. Support for Watchdog and
ADC will follow as soon as their respective PRs are merged.

Signed-off-by: Oane Kingma <o.kingma@interay.com>
2020-01-24 10:28:33 -06:00
Peter Bigot 1a5368a07b drivers: sensor: bma280: convert from Kconfig to devicetree
Define a binding for the Bosch BMA280 sensor.  Remove the Kconfig
settings and update the driver to use the devicetree information.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-24 15:52:09 +01:00
Ulf Magnusson e25394bca9 dts: bindings: nxp,lpc-iap: Remove deprecated 'title' field
Merge all the information into 'description:' and remove 'title:'.
Gets rid of a deprecation warning.

See commit 2934ee2cda ("dts: bindings: Remove 'title:' and put all info.
into 'description:'").

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-24 10:53:36 +01:00
Benjamin Valentin 2fef2002e8 soc: atmel_sam0: add SAM TRNG to DTS
We can use the SAM entropy node here.

Signed-off-by: Benjamin Valentin <benpicco@googlemail.com>
2020-01-23 12:40:59 +01:00
Moonkwun Jung a67ca8f202 dts: arm: st: h7: fix stm32h7 separate cores
Currently, only the stm32h747 soc is supported in the h7 foler.
The h7 series comes with both single core and dual core products.
This change moves C-M4 core out of stm32h7.dtsi so that it can be
included by single core STM32H7 soc description.

Signed-off-by: Moonkwun Jung <mkainyh@gmail.com>
2020-01-23 09:54:39 +01:00
Henrik Brix Andersen 230b278f84 dts: arm: nxp: k6x: fix rtc dts node
Fix the RTC device tree node for the NXP K6x SoC series. This device
is compatible with nxp,kinetis-rtc.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-01-22 06:27:30 -06:00
Antony Pavlov fc1cdf233d soc: arm: stm32l1: Add STM32L152Xe stuff
The STM32L151 and STM32L152 differ in that
the STM32L152 features an LCD controller.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
2020-01-20 18:08:43 -06:00
Erwan Gouriou 87a440b8c6 dts: stm32: Define stm32l073 as stm32l072 superset
STM32L073 soc variant is a STM32L072 with LCD peripheral.
Reflect this in dts definition by including stm32l072.dtsi
in stm32l073.dtsi.
This also allows to fix an issue on stm32l073 gpioe which
declared wrong reg definition.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-20 12:17:31 -06:00
Daniel Leung 6ecb36cbe0 dts: arm: mec1501hsz: rename I2C nodes
The I2C controllers on the MEC1501 SoC can be attached to
different I2C output line. For example, the I2C #0 controller
can be used with I2C7 physical lines out of SoC. The output
selection is done by the attribute "port_sel". This renames
the parent I2C nodes on the SoC side to refer to
the controller themselves instead of the output lines to
avoid confusion. The labels of these nodes are also renamed
to reflect the controllers.

On the board level, the DTS labels are overwritten to indicate
the actual output lines.

Aliases are also provided in both SoC and board levels to
provide shortcuts to the DTS nodes.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-01-18 13:33:20 -05:00
Kumar Gala b1602c8e39 arm: Removed support for CC2650
The SoC, driver, and board support for the CC2650 and CC2650 Sensortag
aren't currently supported and we are removing them as such.  If anyone
is interesting in supporting this platform we can easily recovery it
from git.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-01-18 09:27:55 -06:00
Henrik Brix Andersen 05dca5df04 dts: nxp: k6x: add temperature sensor nodes
Add device tree nodes for the internal temperature sensor in the NXP
Kinetis K6x SoC series.

A temperature sensor node is added for each ADC in the SoC to allow
the user to choose which ADC instance to use for the sensor readings.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-16 17:30:42 -06:00
Henrik Brix Andersen ca9861f690 dts: nxp: ke1xf: add temperature sensor nodes
Add device tree nodes for the internal temperature sensor in the NXP
Kinetis KE1xF SoC series.

A temperature sensor node is added for each ADC in the SoC to allow
the user to choose which ADC instance to use for the sensor readings.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-16 17:30:42 -06:00
Henrik Brix Andersen 30e1a7f7c1 dts: bindings: add binding for the NXP Kinetis SoC temperature sensor
Add device tree binding for the internal temperature sensor found on
the NXP Kinetis SoC series.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-16 17:30:42 -06:00
Roland Ma 01049b73be dts: arm: st: Add dts and soc additions for stm32 F767ZI board
Added dts additions for stm32 nucleo f767zi board, also added
and modified soc addtions for thet board.
Updated dts reference file name.
Updated yaml to take out adc for now.

Signed-off-by: Roland Ma <rolandma@yahoo.com>
2020-01-16 22:51:13 +01:00
Andrei Gansari 5ac450ecc4 dts: lpc55s6x flash controller add
Added flash controller and all memory mapped regions to DTS.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-01-16 08:19:46 -06:00
Andrei Gansari 1cebd314c2 dts: nxp,lpc-iap.yaml
New IAP Flash device for LPC SoC.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-01-16 08:19:46 -06:00
Andrei Gansari fb9a41dc0b dts: lpc55s69 all flash regions
Added reserved partition and bootrom partitions.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-01-16 08:19:46 -06:00
Andrei Gansari 85800622f9 dts: remove artificial include
DTS inclusion simplification for LPC55S69 cpu 0.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-01-16 08:19:46 -06:00
Kumar Gala 5a911ec47f dts: gpio: ti,boosterpack: Remove title as its deprecated
Move title info into description as we've deprecated the title field.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-01-15 11:37:28 -06:00
Kumar Gala 50a23de5af dts: silabs,gecko-spi-usuart: Remove title as its deprecated
Move title info into description as we've deprecated the title field.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-01-15 11:37:28 -06:00
Kumar Gala ae77fe1369 dts: dht: Remove title as its deprecated
Move title info into description as we've deprecated the title field.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-01-15 11:37:28 -06:00
Peter A. Bigot 11dd504f2a drivers: sensor: ccs811: use device tree for control GPIOs
Replace Kconfig GPIO pin configuration with device tree gpios.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-01-14 15:44:09 -06:00
Kwon Tae-young cea68ea492 dts: arm: stm32: add dts support for EEPROM of STM32L0
Add eeprom to STM32L0 series.
stm32l053X8: 2k
stm32l072Xz, stm32l073Xz: 6k

Signed-off-by: Kwon Tae-young <tykwon@m2i.co.kr>
2020-01-14 11:13:42 -05:00
Benjamin Valentin fc7f458ab3 flash: sam0: Define LOCK_REGIONS in dts
The amount of lock regions differs between different sam0 MCUs.

	saml10:  2
	saml11:  4
	samd2x:	16
	saml2x: 16
	samd5x: 32

ASF does not provide a definition for this, so create a new one
in dts.

Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2020-01-14 11:12:33 -05:00
Maureen Helm b8ad9969ef drivers: counter: Refactor mcux gpt driver to use generated dts macros
Refactors the mcux gpt driver to use generated device tree macros
directly. Removes now unused dts fixup macros from i.mx rt socs.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-01-14 11:10:27 -05:00
Brett Witherspoon a563247af6 dts: bindings: add GPIO binding for BoosterPack header
This header is found on TI LaunchPad development kits and BoosterPack
expansion modules. This binding allows boards to define mappings from
header pins to device GPIOs.

Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
2020-01-14 15:45:35 +01:00
Maureen Helm 88fcded3b0 dts: boards: Define dts aliases at soc level for lpc socs
Defines device tree aliases for on-chip peripherals at the soc level
instead of the board level for all lpc socs. The eliminates some
duplicate code in the board level device trees, and will allow drivers
to use device-tree generated macros directly instead of through dts
fixups.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-01-13 10:22:44 -05:00
Maureen Helm ecd24bccd1 dts: boards: Define dts aliases at soc level for i.mx 6/7 socs
Defines device tree aliases for on-chip peripherals at the soc level
instead of the board level for all i.mx 6/7 socs. The eliminates some
duplicate code in the board level device trees, and will allow drivers
to use device-tree generated macros directly instead of through dts
fixups.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-01-13 10:22:44 -05:00
Maureen Helm 201f8897cd dts: boards: Define dts aliases at soc level for i.mx rt socs
Defines device tree aliases for on-chip peripherals at the soc level
instead of the board level for all i.mx rt socs. The eliminates some
duplicate code in the board level device trees, and will allow drivers
to use device-tree generated macros directly instead of through dts
fixups.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-01-13 10:22:09 -05:00
Henrik Brix Andersen 575c211f97 dts: riscv: rv32m1: add timer/pwm modules
Add device tree nodes for the Timer/PWM (TPM) modules present in the
OpenISA RV32M1 SoC.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-01-13 09:12:34 -06:00
Henrik Brix Andersen c989ab8b05 dts: bindings: add binding for RV32M1 Timer/PWM module
Add device tree binding for the Timer/PWM module (TPM) present on the
OpenISA RV32M1 SoC.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-01-13 09:12:34 -06:00
Maureen Helm 519661748e dts: boards: Define dts aliases at soc level for kinetis socs
Defines device tree aliases for on-chip peripherals at the soc level
instead of the board level for all kinetis socs. The eliminates some
duplicate code in the board level device trees, and will allow drivers
to use device-tree generated macros directly instead of through dts
fixups.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-01-13 08:30:53 -06:00
Ioannis Glaropoulos 1e492b2b1d dts: arm: nrf5340: adding device_type property in sram nodes
Add device_type DTS property in sram0 and sram1 nodes,
for nRF5340 Application and Network CPU, respectively.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-01-13 12:48:46 +01:00
Christian Taedcke 6da94af847 drivers: spi: Add Gecko SPI driver
This commit adds SPI driver and its bindings using the USART peripheral
for Silicon Labs EFM32 and EFR32 MCUs.

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2020-01-10 07:14:35 -06:00
Ryan QIAN 7f75e4f83b soc: arm: nxp_imx: rt: add device support i.MX RT1010
- Add device support for i.MXRT1010

Signed-off-by: Ryan QIAN <jianghao.qian@nxp.com>
2020-01-09 16:29:22 -06:00
Laczen JMS ab3ed439c8 drivers: eeprom: Unified simulator and native_posix
EEPROM simulator and native_posix have been unified to one solution,
the old eeprom,native_posix is removed.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2020-01-09 20:28:19 +01:00
Laczen JMS 20623dfa4c drivers: eeprom: Add support for eeprom simulator
Add support for a eeprom simulator. The PR limits the addition to
qemu_x86 but it can easily be added to other devices by defining the
eeprom simulator in the dts and setting 'CONFIG_EEPROM_SIMULATOR=y'

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-09 20:28:19 +01:00
Henrik Brix Andersen bc2113bd46 drivers: adc: add LMP90xxx ADC driver with GPIO
Add driver for the Texas Instruments LMP90xxx series of multi-channel,
low-power 16-/24-bit sensor analog frontends (AFEs).

The functionality is split into two drivers; an ADC driver and a GPIO
driver.

Tested with LMP90080 and LMP90100.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-09 17:27:52 +01:00
Peter Bigot fe018f51a2 drivers: sensor: mpu6050: convert to devicetree
Add a binding for the sensor and replace all Kconfig selection of
hardware parameters with devicetree property values.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-08 16:40:04 +01:00
Ulf Magnusson 23a5b4963b dts: edtlib: Add 'type: path' for path references
Add binding support for a 'path' property type, for properties that are
assigned node paths. Usually, paths are assigned with path references
like 'foo = &label' (common in /chosen), but plain strings are accepted
as well as long as they're valid paths.

The 'path' type is mostly for completeness at this point, but might be
useful for https://github.com/zephyrproject-rtos/zephyr/issues/21623.
The support is there already in dtlib.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-08 08:02:00 -06:00
Robert Winkler 0b6c18bd64 boards: litex_vexriscv: Enable LiteX PWM driver
This commit enables LiteX PWM driver for litex_vexriscv board.

Signed-off-by: Robert Winkler <rwinkler@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2020-01-08 11:04:36 +01:00
Robert Winkler 56db098a55 drivers: pwm: Add driver for LiteX PWM peripherial
PWM driver for LiteX SoC builder was created.
Because LiteX supports only one channel for each PWM device,
an appropriate restriction was made.

Signed-off-by: Robert Winkler <rwinkler@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2020-01-08 11:04:36 +01:00
Robert Winkler 34fedd6cc9 boards: litex_vexriscv: Enable LiteX I2C driver
This commit enables LiteX I2C driver for litex_vexriscv board.

Signed-off-by: Robert Winkler <rwinkler@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2020-01-07 20:55:43 +01:00
Robert Winkler 7f8a70a74b drivers: i2c: Add driver for LiteX I2C controller
This adds I2C bitbang driver for LiteX SoC builder with its bindings.

Signed-off-by: Robert Winkler <rwinkler@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2020-01-07 20:55:43 +01:00
Henrik Brix Andersen 85e1117e94 dts: nxp: kinetis-ftm: add PWM flags cell
Add support for specifying PWM flags for the NXP Kinetis FlexTimer
(FTM) PWM driver through the device tree.

All in-tree clients of this PWM controller are active-low LEDs.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-07 18:13:18 +01:00
Stephanos Ioannidis 38f0b05b99 dts: xilinx_zynqmp: Fix incorrect RPU device tree specification.
This commit fixes the following problems with the RPU device tree:

1. The core type of the RPU of ZynqMP SoC is Cortex-R5F, not
  Cortex-R4.

2. RPU and APU use different interrupt controllers (PL390 GICv1 and
  GIC-400 GICv2, respectively) mapped to the same CPU local bus address
  region but with different offsets for the distributor and CPU
  interrupt control register sets. The GIC address mapping specified by
  the current dts is that of an APU and does not apply to the PL390
  GICv1 of an RPU (refer to the "Zynq UltraScale+ Devices Register
  Reference" document from Xilinx for more information).

For more details, refer to the issue #20217.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-01-07 17:17:12 +01:00
Stephanos Ioannidis 8a29685a25 dts: xilinx_zynqmp: Refactor dts to specify RPU and APU separately.
ZynqMP SoC embeds two separate processor types: Cortex-R for RPU and
Cortex-A for APU.

Since the current Zephyr architecture cannot support AMP of Cortex-R
and Cortex-A within one project, the RPU and APU should be considered
separate platforms.

This commit relocates the device tree nodes that are not common between
RPU and APU to a separate dtsi file (zynqmp_rpu.dtsi).

When Cortex-A53 APU support is added in the future, an additional dtsi
file (zynqmp_apu.dtsi) for specifying the APU device tree should be
added.

For more details, refer to the issue #20217.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-01-07 17:17:12 +01:00
Pawel Czarnecki 65b47118c5 boards: litex_vexriscv: Enable LiteX PRBS driver
This enables LiteX PRBS random number generator driver
for litex_vexriscv board.

Signed-off-by: Pawel Czarnecki <pczarnecki@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2020-01-06 13:33:25 -05:00
Pawel Czarnecki 894b488b06 drivers: entropy: Add driver for LiteX PRBS module
This adds PRBS ranom number generator driver for
LiteX SoC builder with its bindings.

Signed-off-by: Pawel Czarnecki <pczarnecki@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2020-01-06 13:33:25 -05:00
Henrik Brix Andersen ebb4126cbe soc: nxp: ke1xf: rename ftm instances to pwm to match other SoCs
Rename the NXP FTM instances in the KE1xF SoC to PWM to match the
other SoCs/boards using the FlexTimer as PWM generator.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-01-06 10:03:20 -06:00
Ulf Magnusson e9dca5560b dts/bindings: ti,tmp116: Remove unused 'alert-gpios' property
Johann Fischer pointed out that the driver for this sensor
(master/drivers/sensor/tmp116/tmp116.c) doesn't use GPIOs, in
https://github.com/zephyrproject-rtos/zephyr/pull/21605, though there
seems to be an ALERT pin from looking at the datasheet
(http://www.ti.com/lit/ds/symlink/tmp116.pdf).

Remove the unused property declaration.

I was originally just going to change a 'category: optional' to
'required: false' (and 'type: compound' to 'type: phandle-array').
Either solution is fine with me. Could keep the declaration if people
are planning to use it soon.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-04 09:22:38 -05:00
Ulf Magnusson ac09bb33cf dts/bindings: ti,tmp116: Use 'required' instead of 'category' key
'category' is deprecated. See commit fcd665a26c ("dts: bindings: Have
'required: true/false' instead of 'category: ...'").

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-03 09:43:33 -06:00
Sahaj Sarup 4dca5285f0 arm: board: 96b_stm32_sensor_mez: enable USART3
This patchset enables USART3 on the 96Boards STM32 Mezzanine.
It is broken out to J10 Grove Connector.

Changes:

- Enabled USART3 in board dts.
- Updated board index.rst with uart pinouts.
- soc dtsi: enabled usart3.

Test: Tested USART3 as console at 115200 baud

Signed-off-by: Sahaj Sarup <sahaj.sarup@linaro.org>
2020-01-03 09:37:08 -06:00
Johann Fischer f6807df469 drivers: display_st7789v: obtain panel settings and parameters from DT
Obtain panel settings and parameters from DT.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-01-02 17:00:06 -05:00
Manivannan Sadhasivam e47b5f7a65 drivers: lora: Add SX1276 LoRa Modem support
Add support for Semtech SX1276 LoRa Modem.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2019-12-21 12:20:24 +01:00
Jack Rosenthal 53ed9e57a2 soc: stm32f0: Add support for STM32F098xx SOC
This adds a Kconfig options and device tree configs for the STM32F098
series of SoC.

Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
2019-12-20 20:27:20 -05:00
Ulf Magnusson 86dc23a15d dts: bindings: Remove "provides a base representation" from bindings
Newly-introduced stuff. See
https://github.com/zephyrproject-rtos/zephyr/pull/20793.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-20 19:45:06 -05:00
Ulf Magnusson 0ac6e6bf36 dts: bindings: Remove redundant document separators
Not needed. Prevent them from being copy-pasted.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-20 19:45:06 -05:00
Peter Bigot 0cfac519cc sensor: dht: convert from Kconfig to devicetree
Define a binding for the Aosong DHT family of temperature/humidity
sensors.  Remove the Kconfig settings, and update the driver to use
devicetree information.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-12-19 06:43:37 -06:00
Peter Bigot bb106390a2 dts: bindings: generalize JEDEC SPI NOR descriptions
Currently most SPI NOR serial flash devices are accessed through the
spi-nor flash driver, but there are pending enhancements that will
access these devices through other driver implementations.  Several of
the descriptive properties of the flash memories are common regardless
of the interface selected.  Pull those out to a separate yaml file to
be included into the bindings for interface-specific node descriptions.

Also revise the documentation to note that the jedec,spi-nor
compatible depends on a commands set compatible with the Micron M25P80
serial nor flash; there is no JEDEC standard for these commands.
These devices do generally provide descriptive structures defined by
JESD216, but currently Zephyr doesn't make use of these structures.
The JEDEC CFI standard previously referenced in the description is not
relevant to these devices.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-12-19 12:37:31 +01:00
Ulf Magnusson 527343dfce dts: bindings: Replace 'child-bus:'/'parent-bus:' with 'bus:'/'on-bus:'
'child-bus:'/'parent-bus:' have been deprecated.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-19 11:02:28 +01:00
Ulf Magnusson 379145ffce scripts: edtlib: Rename 'child-bus:'/'parent-bus:' to 'bus:'/'on-bus:'
I keep mixing these up, so that's probably a sign that the names are
bad. The root of the problem is that "parent-bus" can be read as both
"this is the parent bus" and as "the parent bus is this".

Use 'bus:' for the bus "provider" and 'on-bus:' for nodes on the bus
instead, which is less confusing.

Support the old keys for backwards compatibility, along with a
deprecation warning.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-19 11:02:28 +01:00
Filip Brozovic e541e63653 soc: arm: stm32g0: add STM32G031 SoC series
This commit adds support for the STM32G031xx SoCs
by STMicroelectronics.

Signed-off-by: Filip Brozovic <fbrozovic@gmail.com>
2019-12-18 22:06:39 +01:00
Filip Brozovic fc2dfae64f drivers: i2c: add STM32G0X I2C support
Add I2C driver support for STM32G0X SoC series.

Signed-off-by: Filip Brozovic <fbrozovic@gmail.com>
2019-12-18 22:06:27 +01:00
Sahaj Sarup d072ab83ac arm: 96b_stm32_sensor_mez: spi: Enable SPI4
This patch enables SPI4 on the 96Boards STM32 Sensors Mezzanine.
SPI4 has been broken out to a Grove Connector on the board.

Changes:

- Updated board dts to enable spi4
- Updated board Kconfig
- Updated board documentation
- Update board pinmux
- Updated stm32f4 pinmux header file
- Updated stm32f401 dtsi
- Updated stm32f4 defconfig to enable PORTE GPIO
- Added board to spi_loopback test

Test: spi_loopback test passed

Signed-off-by: Sahaj Sarup <sahaj.sarup@linaro.org>
2019-12-18 07:34:37 -06:00
Ulf Magnusson 2934ee2cda dts: bindings: Remove 'title:' and put all info. into 'description:'
Add any useful information from 'title:' to the 'description:' strings
(e.g. explanations of acronyms), and remove 'title:' as well as any
copy-pasted "this binding gives a ..." boilerplate.

Also clean some description strings up a bit.

Some other things could probably be cleaned up (replacing 'GPIO node'
with 'GPIO controller' on controllers for consistency, for example), but
I kept things close to the original to avoid accidentally messing up.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-18 11:52:45 +01:00
Ulf Magnusson 36b7ca44b8 scripts: edtlib.py: Deprecate 'title:'
Most bindings look something like this:

    title: Foo

    description: This binding provides a base representation of Foo

That kind of description doesn't add any useful information, as it's
just the title along with some copy-pasted text. I'm not sure what "base
representation" was supposed to mean originally either.

Many bindings also put something that's closer to a description in the
title, because it's not clear what's expected or how the title is used.
In reality, the title isn't used anywhere. 'description:' on the other
hand shows up as a comment in the generated header.

Deprecate 'title:' and generate a long informative warning if it shows
up in a binding.

Next commits will clean up the 'description:' strings (bringing them
closer to 'title:' in most cases) and remove 'title:' from all bindings.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-18 11:52:45 +01:00
Mateusz Holenko 65e4178071 boards: litex_vexriscv: dts: Reorder liteeth registers
This is just a cosmetic change to avoid a warning:
"unit-address and first reg (0xb0000000)
don't match for ethernet@e0009800"

Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2019-12-18 10:35:15 +02:00
Martin Jaeger 3d1834e5d6 dts: arm: stm32l452 dtsi files updated
Fixed warning for uppercase hex addresses and added stm32l452Xe.dtsi

Signed-off-by: Martin Jaeger <17674105+martinjaeger@users.noreply.github.com>
2019-12-13 17:02:40 -06:00
Gerson Fernando Budke 1a0e8a2e04 dts: ieee802154: rf2xx: Add DTS support
Add a dts binding file for the ATMEL AT86RF23x/212x transceivers.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2019-12-13 11:23:23 +02:00
Kwon Tae-young a6f5c1bbf6 dts: arm: stm32: add dts support for EEPROM of STM32L1
Add eeprom to STM32L1 series.
Currently supported L1 series EEPROM size is 4Kbyte.

Signed-off-by: Kwon Tae-young <tykwon@m2i.co.kr>
2019-12-12 07:57:33 -06:00
Feng Cheng ee57c8e749 drivers: flash: Add the flash driver of the stm32f1x family
Most of the code is copied from the stm32f0x family
Tested on stm32f103ze soc

Signed-off-by: Feng Cheng <i@fengch.me>
2019-12-11 12:40:33 -06:00
Ulf Magnusson 984bfae831 global: Remove leading/trailing blank lines in files
Remove leading/trailing blank lines in .c, .h, .py, .rst, .yml, and
.yaml files.

Will avoid failures with the new CI test in
https://github.com/zephyrproject-rtos/ci-tools/pull/112, though it only
checks changed files.

Move the 'target-notes' target in boards/xtensa/odroid_go/doc/index.rst
to get rid of the trailing blank line there. It was probably misplaced.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-11 19:17:27 +01:00
Maureen Helm 30415e9246 dts: Add spi bindings and nodes for lpc socs
Adds spi device tree bindings and nodes for the lpc54xxx and lpc55s6x
socs in preparation for adding a new spi driver.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-12-10 08:48:56 -06:00
Carlo Caione 7baf3f74a9 interrupt_controller: gic: Support PPIs
The GIC-400 driver currently only supports SPIs because the (32) offset
for the INTIDs is hard-coded in the driver. At the driver level there is
no really difference between PPIs and SPIs so we can easily extend the
driver to support PPIs as well.

This is useful if we want to add support for the ARM Generic Timers that
use INTIDs in the PPI range.

SPI interrupts are in the range [0-987]. PPI interrupts are in the range
[0-15].

This commit adds interrupt 'type' cell to the GIC device tree binding
and changes the 'irq' cell to use interrupt type-specific index, rather
than a linear IRQ number.

The 'type'+'irq (index)' combo is automatically fixed up into a linear
IRQ number by the scripts/dts/gen_defines.py script.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2019-12-10 06:59:55 +01:00
Henrik Brix Andersen 94b509ba9f dts: bindings: nxp: lpi2c: add bus idle timeout property
Add property for specifying the bus idle timeout for the NXP
i.MX/Kinetis LPI2C I2C controller.

Enabling the bus idle timeout helps the controller to recover from
e.g. EMC causing false clock pulses/spikes on the SCL line.

Without a timeout the LPI2C controller will assume that another bus
master took over the I2C bus and thus refuses to issue a I2C START
condition.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-12-09 16:01:38 -06:00
Evgeniy Didin 8922afb0f8 arc: hsdk: Set SRAM_BASE_ADDRESS in defconfig
On power-on boot-ROM is mapped to address 0 in HSDK board.
Normally later when U-Boot gets started by boot-ROM we change mappings
so that real DDR is mapped to entire address space including 0:
https://elixir.bootlin.com/u-boot/latest/source/board/synopsys/hsdk/hsdk.c#L474

But if U-Boot is not started (which is controlled by the BIM dip-switch
on the board) boot-ROM remains mapped to 0, and essentially any attempt
to write to that location fails, thus we cannot upload contents of our
target Elf there even with JTAG.

The next logical option is to use beginning of the non-translated
memory region 0x8000_0000 which we typically use for loading
U-Boot & Linux kernel on ARC boards. But in case of HSDK
we have DCCM (Data Closely-Coupled MEmory - fast on-chip SRAM)
mapped there and since we cannot execute code from DCCM
we need to skip that region as well which gives us the next option
being 0x9000_0000 . That's because DCCM owns entire 256 MiB "aperture"
even though it may have much smaller size up-to 8 MiB.

We are mapping only 5 apertures because the last two
(0xe000_0000-0xffff_ffff) are used for peripherals and AXI.

Signed-off-by: Evgeniy Didin <didin@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2019-12-09 16:37:12 -05: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
Emil Obalski 95c41b11a7 soc: arm: nordic: adding ipc aliases for nRF53
This commit adds ipc-0 aliases in the DTS framework
for nRF5340 Application and Network MCU.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2019-11-20 19:29:06 +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
Christian Taedcke 6486c429f1 dts: silabs: Define all available gpio ports for efr32mg12p
Add device tree elements for all gpio ports of the efr32mg12p including
the dts fixup entries.
Also remove gpio port e since this is not available in efr32mg12p socs.

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2019-11-13 12:05:48 -06:00
Andrei Gansari a0f011b2fb dts: lpc devices allocate all gpio interrupts
Allocate all 8 PINT interrupts to ports 0 and 1, allocate 4 to each.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2019-11-13 12:05:48 -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
Stanislav Poboril aef4541475 dts: nxp_imx6sx_m4: fix gpio5 int num
Fix interrupt number for gpio5

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2019-11-13 12:05:48 -06:00
Emil Obalski 3747fd0a68 soc: nordic: Add support for nRF52833
This commit adds basic support for nRF52833 SoC.
Changes affect introducing:
 - architecuture files (dtsi)
 - configuration of nrfx drivers
 - adaptation of inclusions based on chosen SoC
 - configuration of NFCT_PINS_AS_GPIOS depends on HAS_HW_NRF_NFCT.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2019-11-13 10:33:38 -06:00
Francois Ramu 91884302bf soc: arm: st_stm32: add driver lptimer management to stm32wb series
This patch introduces the support of the Low Power Timer
     for the STM32WBxx from STMicroelectronics.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2019-11-13 10:31:06 -06:00
Alexander Wachter c180e059bf soc: stm32f103Xb: Enable CAN support for this SoC
This commit enables CAN on the STM32F103Xb SoC series.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-11-13 10:30:19 -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
Gaute Gamnes 603531bb78 dts: arm: nordic: nRF5340 Network MCU DTS structure
Adding nRF5340 Network MCU (CPU NET) .dtsi headers

Signed-off-by: Gaute Gamnes <gaute.gamnes@nordicsemi.no>
2019-11-08 19:26:35 +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 d0c9234d70 soc: arm: st_stm32: add driver lptimer management to stm32l4 series
This patch introduces the support of the Low Power Timer
     for the STM32L4xx from STMicroelectronics.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2019-11-08 10:04:21 -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 256ec940fb dts: riscv: add 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, modulation index and modulation filter
co-efficients (such that max frequency deviation
<= 500kHz). Generic FSK mode also offers a highly
configurable packet structure, variable bit rate
transmission and reception, some limited packet
(header) processing, and interface to a RAM-based
Packet Buffer.

Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
2019-11-08 15:38:57 +01: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
Vincent Wan 1b263ba0a6 dts: specify cpu frequency for TI CC13X2/CC26X2
Add cpu clock frequency information to DTS so that it can be retrieved
in the code.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-11-07 15:55:21 -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
Benjamin Valentin 496ace1500 soc: atmel_sam0: Add SAME54
This adds supoprt for the Atmel SAME54 SoC.

The SAME5x/SAMD5x is a line of Cortex-M4F MCUs that share peripherals
with the sam0 Cortex-M0+ and saml1x Cortex-M23 parts.

Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2019-11-06 21:18:00 -06:00
Kumar Gala 051630607b dts: nxp: remove unused pinmux
We've never used the pinctrl from dts so remove it as we hopefully
replace it with something useful.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-06 17:32:50 -08:00
Kumar Gala dc2cb92c4a dts: Add standard alias for watchdog
Introduce a standard watchdog alias 'watchdog0' that can be utilized
by sample/test code in the future.  This helps remove the need for
CONFIG_WDT_0_NAME in dts_fixup.h files.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-11-06 13:51:20 -06:00
Erwan Gouriou 4dc303b99b dts: stm32: Remove pinctrl definitions
dts pinctrl definitions were pushed in tree without the code
available to deal with it. They have been kept waiting for the
code, but this is taking much more time than initially thought.

So in current zephyr tree, for all STM32 boards, we have pinmux.c
file which is used to configure pins and these files that are
basically no-op. This situation is creating a lot of confusion
especially to new comers, and create useless maintenance effort.

Remove these files for now.
When zephyr will ready to use them, this commit could be reverted.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-11-06 18:26:04 +01: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 ff3889a051 dt-bindings: arm: st: add dts support for DMA of some series of stm32
Add dts support for f0/f1/f2/f3/f4/f7/l0/l4 series STM32.

Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
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
Erwan Gouriou a0da140a2a dt: stm32f0: Fix clock bus for SPI1 and few timers
There is no APB2 bus on stm32f0 series.
What could be found as APB2 in CMSIS files is actually
second group of APB (A.K.A APB1_2).
Fix nodes that are using this wrong reference accorss the series.

Fixes #20310

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-11-05 14:55:21 -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
Filip Brozovic edcb7deb88 soc: arm: kv5x: add NXP Kinetis KV5x SoC series support
Add initial support for the NXP Kinetis KV5x SoC series (MKV56F24
and MKV58F24).

Signed-off-by: Filip Brozovic <fbrozovic@gmail.com>
2019-11-05 19:37:21 +01:00
Ulf Magnusson 3ac7c6fcbf binding-template.yaml: Improve 'include:' docs and mention base.yaml
Explain how 'include:' works in some more detail and mention base.yaml,
along with an example of how it can be used.

This was adapted from
https://github.com/zephyrproject-rtos/zephyr/pull/19846.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-05 17:47:47 +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 6916e5cc8d dts: binding-template.yaml: Preserve newlines in 'description'
Do

    description: |

instead of

    description: >

in the example, to preserve internal newlines in the string. Also link
to https://yaml-multiline.info/, which is handy.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-30 07:56:16 +01:00
Ulf Magnusson afb8406ebd dts: binding-template.yaml: Document simple types as well
The int, array, string, and string-array property types were not
documented together with the other types, for whatever reason (might've
been too focused on the more complex types and overlooked it). Add
documentation for them.

Also do some minor cleanup on the descriptions, e.g. to make them more
consistent.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-30 07:56:16 +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
Sebastian Bøe e79768c2df dtc: Remove support for common.dts
Remove the common.dts file which has been used for a year.

common.dts at one point allowed us to conditionally add an MCUBoot
overlay based on Kconfig.

but since DT lost access to Kconfig options it has been unused.

The overridable variable DTS_COMMON_OVERLAYS, which by default points
to common.dts, is also unused in-tree, and any out-of-tree usage can
be ported over to use DTC_OVERLAY_FILE instead, so we remove the
variable as well.

This simplifies the configuration system.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-10-24 11:01:08 -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 f7bfa936a1 boards: litex_vexriscv: Enable LiteX SPI driver
This commit enables LiteX SPI driver for litex_vexriscv board.

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
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
Manivannan Sadhasivam bf949409b8 soc: arm: stm32: Add support for STM32L151XB-A SoC
STM32L151XB-A SoC is almost similar to the STM32L151XB SoC except that
it has more RAM (32KiB). Hence add devicetree and Kconfig support.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2019-10-18 10:40:45 -05:00
Manivannan Sadhasivam 4f79e31566 soc: arm: st_stm32: stm32l1: Add RTC/Counter support
Add RTC/Counter support for STM32L1 SoCs.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2019-10-18 10:40:45 -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
Karl Palsson 1a45eb67d1 dts: stm32/l1: add xx8-A parts
The -A parts have more flash and ram than the original part numbers.

Signed-off-by: Karl Palsson <karlp@etactica.com>
2019-10-16 14:42:54 -05:00
Karl Palsson d46c1a0c98 stm32/l1: enable spi peripherals
STM32L1 uses the same spi controller as STM32F1 so we can just set the
right addresses and enable them. We also need to add the fixup names and
to correctly include the header for ST LL HAL.

Signed-off-by: Karl Palsson <karlp@etactica.com>
2019-10-16 14:42:54 -05:00
Stephanos Ioannidis e87ccbc318 arch: arm: Fix incorrect Cortex-R device tree specification.
1. Replace the non-existent CPU device binding ("Cortex-R") specified
   by the CPU node with a proper one.

2. Relocate CPU node declaration to SoC dtsi:

  The CPU node should be declared in the SoC dtsi because the core
  type is SoC-dependent. In fact, this is exactly how it is done in
  the Cortex-M port.

3. Remove core_intc (supposedly Cortex-R VIC):

  Unlike the NVIC of Cortex-M, the VIC of Cortex-R is not a true
 interrupt controller in the conventional sense and merely acts as
 a CPU input port for aggregated interrupt request and vector index
 signals. For this reason, there is no point in declaring it in the
 device tree and specifying it as an interrupt parent. All SoCs
 incorporating Cortex-R implement a separate true interrupt
 controller (for instance, GIC for Zynq MPSoC and VIM for Hercules).

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2019-10-11 16:27:14 +02: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
Antony Pavlov 70a14435b0 arm: stm32f0: introduce STM32F030X4 stuff
The patch adds initial support for STM32F030X4 SoC.

STM32F0 Cube package advises to use 'stm32f030x6' code
for both STM32F030x4 and STM32F030x6 SoC variants.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
2019-10-08 16:31:48 -05:00
NavinSankar Velliangiri bcf6d52dd1 dtsi/Kconfig: arm: st: Add dtsi and Kconfig for SOC variant STM32F401XC
This PR adds the dtsi and Kconfig for the SOC variant STM32F401XC.

Signed-off-by: NavinSankar Velliangiri <navin@linumiz.com>
2019-10-07 08:57:36 -05:00
Erwan Gouriou e3c1683e8b drivers: watchdog: Add STM32G4x Watchdog support
Add watchdog driver support for STM32G4X SoC series.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Signed-off-by: Richard Osterloh <richard.osterloh@gmail.com>
2019-10-04 18:44:24 -07:00
Richard Osterloh 37514ae660 drivers: usb: Add STM32G4X USB support
Add USB driver support for STM32G4X SoC series.

Signed-off-by: Richard Osterloh <richard.osterloh@gmail.com>
2019-10-04 18:44:24 -07:00
Richard Osterloh c678d4508d drivers: counter: Add STM32G4X counter support
Add counter driver support for STM32G4X SoC series.

Signed-off-by: Richard Osterloh <richard.osterloh@gmail.com>
2019-10-04 18:44:24 -07:00
Erwan Gouriou 0ecef25d5e drivers: pwm: Add STM32G4X PWM Support
Add PWM driver support for STM32G4X SoC series.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Signed-off-by: Richard Osterloh <richard.osterloh@gmail.com>
2019-10-04 18:44:24 -07:00
Richard Osterloh 794606f866 drivers: spi: Add STM32G4X SPI support
Add SPI driver support for STM32G4X SoC series.

Signed-off-by: Richard Osterloh <richard.osterloh@gmail.com>
2019-10-04 18:44:24 -07:00
Richard Osterloh 4ce35300c8 drivers: i2c: Add STM32G4X I2C support
Add I2C driver support for STM32G4X SoC series.

Signed-off-by: Richard Osterloh <richard.osterloh@gmail.com>
2019-10-04 18:44:24 -07: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
Richard Osterloh 1d2a030ee3 drivers: serial: Add STM32G4X serial support
Add UART driver support for STM32G4X SoC series.

Signed-off-by: Richard Osterloh <richard.osterloh@gmail.com>
2019-10-04 18:44:24 -07:00
Richard Osterloh f7bad922f0 drivers: gpio: Add STM32G4X gpio support
Add GPIO driver support for STM32G4X SoC series.

Signed-off-by: Richard Osterloh <richard.osterloh@gmail.com>
2019-10-04 18:44:24 -07:00
Richard Osterloh ca7cbb5a08 drivers: clock_control: Add STM32G4X clock support
Add clock support for STM32G4X SoC series.

Signed-off-by: Richard Osterloh <richard.osterloh@gmail.com>
2019-10-04 18:44:24 -07:00
Richard Osterloh b87878d09c soc: arm: st_stm32: Add STM32G4 SoC series
Add soc and dts files to support for most of the common peripherals
in the STM32G4 series. Add specific support for the STM32G431RB.

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
Andrzej Głąbek 21442d806a dts: nrf52840: Correct the base address in spi3 node
Instead of 0x4002b000 it should be 0x4002f000.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-09-27 11:39:31 -04: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 bce525fdcf dts/arm: Add support for the ADC in MEC1501hsz
It has one instance.

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
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
Tom Burdick 6a708e625d arch: kinetis: Add support for k2x
This adds support for Kinestis K22

Co-authored-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
Co-authored-by: Oliver Stäbler <oliver.staebler@bytesatwork.ch>
Co-authored-by: Tom Burdick <thomas.burdick@gmail.com>
Signed-off-by: Tom Burdick <thomas.burdick@gmail.com>
2019-09-25 02:18:38 -07: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
Jakub Wegnerowski d57a3634f7 boards: litex_vexriscv: Enable LiteX DNA driver
Enable LiteX DNA ID driver in litex_vexriscv board.

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 bea2714cae dts/arm: Add the 9 MEC1501 PWM instances.
All disabled by default.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-09-19 20:45:37 -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
Armando Visconti 79c24e3e5e soc: arm: st: add stm32l4r9xx support
Add support for ST stm32l4r9xx System-on-Chip.

See http://www.st.com/en/microcontrollers/stm32l4r9-s9.html
for more details.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-09-19 09:47:45 -05:00
Erwin Rol efa44b1885 arm: stm32f4: Add CAN1 support
Add CAN1 pinmux definitions and DT entries for STM32F4 series.

Signed-off-by: Erwin Rol <erwin@erwinrol.com>
2019-09-19 08:52:53 -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
Pavlo Hamov 97e1ad1b8c boards: stm32f429i_disc1: add SPI5 support
Add support of RCC configuration.
Add pinmux items

Signed-off-by: Pavlo Hamov <pavlo_hamov@jabil.com>
2019-09-18 06:43:47 -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
Francisco Munoz 34f4e30615 dts: arm: microchip: Add dtsi entries for PS/2 devices in MEC1501
Create new nodes for PS/2 devices which can be used for
mouse and keyboard

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
Watson Zeng 9d50f9b5a7 arc: hsdk: dts: bug fix
bug fix in arc_hsdk.dtsi

Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
2019-09-17 20:40:38 +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 5a09a51e31 dts/arm: Add the 3 MEC1501 basic timer instances.
4 are found: 2 with a counter of 16bits and 2 with a counter of 32 bits.
However, first 32bits instance will not be exposed as it will be used by
rtos timer driver directly to implement k_busy_wait()

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-09-14 12:13:49 +08: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
Piotr Mienkowski c249782bbc soc: add DTS PIO module nodes for sam3x series
This commit adds DTS PIO nodes for sam3x series SoCs.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-09-12 13:25:30 -05:00
Robert Weber 17f545be7d soc: stm32wb: Add support for STM32 IWDG
The driver for STM32's independent watchdog already exists and is
compatible with the stm32wb SoC. Enable the independent watchdog
for the stm32wb series for use with this driver.

Signed-off-by: Robert Weber <robertweber95@gmail.com>
2019-09-12 13:21:06 -05:00
Pushpal Sidhu e5deb5adc9 dts: stm32l4r5: Add extra timer nodes not present in parent
Add timer nodes that aren't present in the parent file. Adds timers 3,
4, 5, 8, 17.

Signed-off-by: Pushpal Sidhu <psidhu.devel@gmail.com>
2019-09-12 08:43:53 -05:00
Erwan Gouriou b42ad680c5 dts/Kconfig: Remove symbol HAS_DTC_USB
Symbol not used, so clean it up.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-09-12 08:16:42 -05:00
Erwan Gouriou 21d39eff6c dts/Kconfig: Remove symbol HAS_DTS_QDEC.
Symbol not used, so clean it up.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-09-12 08:16:42 -05:00
Erwan Gouriou 555936f771 dts/Kconfig: Remove unused HAS_DTS_SPI
Symbol is always "and'ed" with the symbol that
selects it, so no effect. Clean it up.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-09-12 08:16:42 -05:00
Erwan Gouriou e5380258b6 dts/Kconfig: Remove unused HAS_DTS_ETHERNET
Symbol not used clean it up.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-09-12 08:16:42 -05:00
Erwan Gouriou e7574e1c00 dts/Kconfig: Remove unused HAS_DTS_ADC
Symbol not used clean it up.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-09-12 08:16:42 -05: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
Andrew Boie 9df9994572 x86: fix XIP SOC support and defaults
XIP support in x86 was something of a mess. This
patch does the following:

- Generic ia32 SOC no longer defines a "flash" region
  as generic X86 devices don't have a microcontroller-
  like concept of flash. The same has been done for apollo_lake.
- Generic ia32 and apollo_lake SOCs starts memory at 1MB.
- Generic ia32 SOC may optionally have CONFIG_XIP enabled.
  The board definition must provide a flash region definition
  that gets exposed as DT_PHYS_LOAD_ADDR.
- Fixed definitions for RAM/ROM source addresses in ia32's
  linker.ld when XIP is turned off.
- Support for enabling XIP on apollo_lake SOC removed, there's
  no use-case.
- acrn and gpmrb boards have flash and XIP related definitions
  removed.
- qemu_x86 has a fake flash region added, immediately after system
  RAM, for use when XIP is enabled. This used to be in the ia32 SOC.
  However, the default for qemu_x86 is to now have XIP disabled.
- Fixed tests/kernel/xip to run by default on boards that enable
  XIP by default, plus an additional test to exercise XIP on
  qemu_x86 (which supports it but has XIP switched off by default)

The overall effect of this patch is to:

- Remove XIP configuration for SOC/boards where it does not make
  any sense to have it
- Support testing XIP on qemu_x86 via tests/kernel/xip, but leave
  it off by default for other tests, to ensure it doesn't bit-rot
  and that the system works in both scenarios.
- XIP remains an available feature for boards that need it.

Fixes: #18956

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-09-11 21:11:38 -04: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
Filip Brozovic 38125b8b49 soc: arm: k8x: add NXP Kinetis K8x SoC series support
Add initial support for the NXP Kinetis K8x SoC series (MK80F25615
and MK82F25615).

Signed-off-by: Filip Brozovic <fbrozovic@gmail.com>
2019-09-11 09:23:28 -05:00
Ulf Magnusson 2845d8f404 scripts: edtlib: Make order irrelevant when including multiple files
When foo.yaml set some property 'required: true' and bar.yaml set the
same property 'required: false', the check for changing
'required: false' to 'required: true' would raise an error for

    include: [bar.yaml, foo.yaml]

(with that particular order due to implementation details).

The order files are included in shouldn't matter. To fix it, change the
logic so that 'required' values are ORed together between included files
(so that 'required: true' is always respected), and remove the
'required' true-to-false check when merging included files.

Keep the true-to-false check when merging the (merged) included files
into the main binding (the binding with the 'include:' in it). This
might give a good organization, and the old scripts do it too.

Piggyback two fixes/cleanups:

 - 'compatible' should be allowed to appear in included files

 - No need to allow an 'inherits' key in _check_binding(), because
   it has been removed before then, when merging bindings

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-11 07:50:30 -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
Kumar Gala 2c1e0439c7 irq: rv32m1: Fixup IRQ values for multi-level IRQ handling
Remove the handcoded multi-level IRQ values in device tree.  We now are
able to generate the encoded multi-level IRQ value.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-10 07:34:57 -05:00
Kumar Gala d6e6a2be38 irq: intel_s1000: Fixup IRQ values for multi-level IRQ handling
Remove the handcoded multi-level IRQ values in device tree.  We now are
able to generate the encoded multi-level IRQ value.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-10 07:34:57 -05:00
Vincent Wan d11864662b dts: arm: add device tree file for TI CC3235SF
This dtsi file adds definitions for memory regions on the SoC.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-09-10 10:22:30 +03:00
Kumar Gala 466f91a9e3 dts: nxp: nxp_ke1xf: Make LPO fixed-clock its own node
Pull out the LPO fixed-clock that is part of the PMC hardware block as
its own child node of the PMC block.  This is because the PMC could have
its own driver associated with it that is seperate from the LPO clk.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-09 21:23:30 -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 58b46d7089 dts: binding-template.yaml: Document how 'type: boolean' works
It's a bit subtle in that it's the only type where a property can
generate output even if it doesn't exist.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-09 08:47:49 -05:00
Ulf Magnusson ff1f75293e dts: edtlib: Support giving missing properties a default value
For missing optional properties, it can be handy to generate a default
value instead of no value, to cut down on #ifdefs.

Allow a default value to be specified in the binding, via a new
'default: <default value>' setting for properties in bindings.
Defaults are supported for both scalar and array types. YAML arrays are
used to specify the value for array types.

'default:' also appears in json-schema, with the same meaning.

Include misc. sanity checks, like the 'default' value matching 'type'.

The documentation changes in binding-template.yaml explain the syntax.

Suggested by Peter A. Bigot in
https://github.com/zephyrproject-rtos/zephyr/issues/17829.

Fixes: #17829
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-09 08:47:49 -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 d834b69bd9 scripts: dts: Improve syntax and code for including binding files
Have

    include: foo.dts
    include: [foo.dts, bar.dts]

instead of

    inherits:
        !include foo.dts

    inherits:
        !include [foo.dts, bar.dts]

This is a nicer and shorter and less cryptic syntax, and will make it
possible to get rid of the custom PyYAML constructor for '!include'
later.

'inherits: !include ...' is still supported for backwards compatibility
for now. Later on, I'm planning to mass-replace it, add a deprecation
warning if it's used, and document 'include:'. Then the '!include'
implementation can be removed a bit later.

'!include' has caused issues in the past (see the comment above the
add_constructor() call), gets iffy with multiple EDT instances, and
makes the code harder to follow.

I'm guessing '!include' might've been intended to be useful outside of
'inherits:' originally, but that's the only place where it's used. It's
undocumented that it's possible to put it elsewhere.

To implement the backwards compatibility, the code just transforms

    inherits:
        !include foo.dts

into

    inherits:
        - foo.dts

and treats 'inherits:' similarly to 'include:'. Previously, !include
inserted the contents of the included file instead.

Some more sanity checks for 'include:'/'inherits:' are included as well.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
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 e83f4fad29 dts/arm: Add support for the watchdog in MEC1501hsz
It has one instance of this watchdog.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-09-07 09:56:58 -04: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
Ulf Magnusson f38e27603d dts: xilinx_zynqmp: Remove stray 0 from interrupt-parent
'interrupt-parent' should contain just the phandle of the node
interrupts are sent to.

This node (gic: interrupt-controller@f9010000) doesn't generate any
interrupts, so the 'interrupt-parent' value is never used (this is why
it wasn't caught). It'll give an error later with 'interrupt-parent'
declared as 'type: phandle' in bindings though.

Don't know what was intended. Just remove the 0.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-08-14 10:35:48 -05: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
Armando Visconti 757366c18c dts: stm32l4r5: (FIX) Provide clock info for spi3 controller
SPI3 clock info were missing and following macros were
not generated:

 - DT_ST_STM32_SPI_FIFO_40003C00_CLOCK_BITS
 - DT_ST_STM32_SPI_FIFO_40003C00_CLOCK_BUS

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-08-12 10:45:14 -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
Bradley Bolen 929dc717cf soc: arm: xilinx_zynqmp: Add qemu based SoC
This commit adds support for the Zynq UltraScale+ MPSoC as a qemu based
platform for Cortex-R based testing.  This SoC only supports an
interrupt controller and serial port for limited testing.

Signed-off-by: Bradley Bolen <bbolen@lexmark.com>
2019-08-09 22:50:50 +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 c30a71df95 arch: arm: Add Cortex-R support
This adds initial Cortex-R support for interrupts and context switching.

Signed-off-by: Bradley Bolen <bbolen@lexmark.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 226b3381f9 dts: nxp: cleanup remove system-clock-frequency
Remove unused "system-clock-frequency" property, we don't have this
defined in various bindings and thus aren't using it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-09 14:56:20 -05: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
Nicolas Pitre 7f74825958 riscv: add a qemu_riscv64 board
This emulates a RISC-V in 64-bit mode on a SiFive FE310 dev board.
Memory is tight so a few tests had to be disabled due to the extra
memory usage compared to qemu_riscv32.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-08-09 09:11:45 -05:00
Henrik Brix Andersen 67126be662 soc: arm: nxp: ke1xf: add FlexTimer (FTM) module support
Add support for the FlexTimer (FTM) modules present in the NXP Kinetis
KE1xF Soc series.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-08-09 07:32:43 -05:00
Henrik Brix Andersen 84c74993d4 drivers: pwm: mcux_ftm: use device tree for obtaining clock frequency
Use clock specified in the device tree for obtaining the source clock
frequency for the pwm_mcux_ftm driver instead of relying on having an
NXP Kinetis MCG clock available in all SoCs supporting FlexTimer (FTM)
modules.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-08-09 07:32:43 -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
Watson Zeng 80ca3e064e board: emsdp: doc update and bug fixes
- update doc for different core configuration.

- fix some bugs in dts related files.

- add dts config and defconfig for different core configuration.

- end files with a newline in boards/arc/emsdp/board.dtsi

- remove unused head in boards/arc/emsdp/doc/index.rst

- ARC_MPU_VER in different core is fixed. so remove some useless code
  for ARC_MPU_VER judgements in Kconfig.defconfig.* files for emsdp

Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
2019-08-08 11:48:39 +02:00
Watson Zeng bcba284e8f boards: arc: emsdp: add basic emsdp board support
* add basic emsdp board support

Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
2019-08-08 11:48:39 +02: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
Andrew Boie ce3cc4f974 x86: ia32: do not use the first megabyte
After witnessing some strange errors with memory not being
what it should be, lifiting everything above 1MB has solved
it. The Zephyr binary was being loaded into memory containing
reserved regions, resulting in data corruption.

We still simulate XIP for testing purposes by setting up the
memory map as follows:

0x000000 - 0x0FFFFF : Non-present
0x100000 - 0x4FFFFF : "Flash" ROM region
0x500000 - 0x8FFFFF : "SRAM" RAM region

For a total of 9 megabytes of physical RAM used.

Fixes problems observed in some large tests when code coverage
is enabled (which increases the amount of RAM used even more).

Fixes: #17782

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-08-07 12:50:53 -07: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
Kumar Gala 01d11d50d3 dts: nios2: Remove device_type = "memory" from SRAM nodes
The true mmio-sram nodes should not have had a 'device_type' property.
Remove it from the cases that we clearly know are SRAM.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-06 08:59:22 -04:00
Kumar Gala 3d4fa57541 dts: riscv: Remove device_type = "memory" from SRAM nodes
The true mmio-sram nodes should not have had a 'device_type' property.
Remove it from the cases that we clearly know are SRAM.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-06 08:59:22 -04:00
Kumar Gala a5ae0daa35 dts: arc: Remove device_type = "memory" from {d,i}ccm nodes
The "{d,i}ccm" nodes should not have had a 'device_type' property.
Remove it from the cases that we clearly know are {d,i}ccm.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-06 08:59:22 -04:00
Kumar Gala b52b1b2222 dts: arm: Remove device_type = "memory" from SRAM nodes
The true mmio-sram nodes should not have had a 'device_type' property.
Remove it from the cases that we clearly know are SRAM.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-06 08:59:22 -04: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
Markus Fuchs edb58ec46b soc: arm: st_stm32: add STM32F437XI
This patch adds support for the STM32F437XI SoC.

Signed-off-by: Markus Fuchs <markus.fuchs@de.sauter-bc.com>
2019-08-05 19:57:45 -04:00
Yaël Boutreux 3a967f92c3 soc: arm: st_stm32: stm32mp1: Add SPI support
Add SPI support for STM32MP1x SoC.

Signed-off-by: Yaël Boutreux <yael.boutreux@st.com>
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
2019-08-05 13:52:34 -05:00
Nicolas Pitre 1f4b5ddd0f riscv32: rename to riscv
With the upcoming riscv64 support, it is best to use "riscv" as the
subdirectory name and common symbols as riscv32 and riscv64 support
code is almost identical. Then later decide whether 32-bit or 64-bit
compilation is wanted.

Redirects for the web documentation are also included.

Then zephyrbot complained about this:

"
New files added that are not covered in CODEOWNERS:

dts/riscv/microsemi-miv.dtsi
dts/riscv/riscv32-fe310.dtsi

Please add one or more entries in the CODEOWNERS file to cover
those files
"

So I assigned them to those who created them. Feel free to readjust
as necessary.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-08-02 13:54:48 -07: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
Ulf Magnusson 8ed7cb89cc dts: nxp: Remove unused 'prescaler' properties from watchdog nodes
Trying to get rid of properties that appear on device tree nodes but
aren't declared in bindings.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-08-01 16:10:04 -04:00
Ulf Magnusson 34dcdf1df9 dts: nxp: Remove unused 'start-on-boot' properties
Trying to get rid of properties that appear on device tree nodes but
aren't declared in bindings.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-08-01 16:10:04 -04:00
Ulf Magnusson 0408dc31ae dts: nxp: Remove unused 'reload-counter' properties
Trying to get rid of properties that appear on device tree nodes but
aren't declared in bindings.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-08-01 16:10:04 -04:00
Ulf Magnusson 2b61411233 dts: nxp: Remove clk-* properties from nxp,kinetis-sim nodes
These are not declared in dts/bindings/arm/nxp,kinetis-sim.yaml and do
not generate any output.

Trying to get rid of properties that appear on device tree nodes but
aren't declared in bindings.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-08-01 16:10:04 -04:00
Ioannis Glaropoulos 7dbc318acd dts: arm: nrf9160: minor typo fix
A minor spelling fix in an inline comment in
both nRF9160 Secure and Non-Secure .dtsi headers.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-08-01 22:14:26 +03:00
Ulf Magnusson 583226a833 dts: nxp: Remove unused 'clock-source' properties
These are not declared in any binding and do not generate any output.

Trying to get rid of properties that appear on device tree nodes but
aren't declared in bindings.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-08-01 11:11:43 +02:00
Kumar Gala c874e1bd63 dts/nxp: Fix dtc warning with spi device node name
Fix the following dtc warning:

mimxrt1064_evk.dts.pre.tmp:78.31-85.5: Warning (spi_bus_bridge):
 /soc/flexspi1@402a4000: node name for SPI buses should be 'spi'

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-31 17:14:22 -05:00
Andrzej Głąbek 3fbe2828ba dts: nordic: nrf9160: Remove redundant aliases
Several aliases were added to nrf9160[ns].dtsi files solely for
the purpose of getting base addresses of certain hardware modules
via DT_ macros generated for these aliases.
Since for one-instance modules the same can be now achieved with
standard DT_INST_0_* macros, there is no need to keep these aliases.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-08-01 00:32:51 +03:00