Commit graph

116 commits

Author SHA1 Message Date
Piotr Zięcik 05fa9c8318 drivers: counter_nrfx_timer: Port driver to DTS
This commit updates the counter_nrfx_timer driver in order to
use device tree infrastructure.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-03-01 19:46:57 +01:00
Piotr Zięcik 298b841873 drivers: counter_nrfx_rtc: Port driver to DTS
This commit updates the counter_nrfx_rtc driver in order to
use device tree infrastructure.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-03-01 19:46:57 +01:00
Andrzej Głąbek e2dd85472a soc: nrf52810: Allow the use of SPI0, TWI0, and UART0
In the recent MDK brought by nrfx 1.6.2, these legacy peripherals have
been revealed as available also in nRF52810. This patch allows their
use in Zephyr drivers.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-02-26 11:53:20 -06:00
Piotr Zięcik d30c9aeafd drivers: nrf_power_clock: Migrate to DTS.
This commit migrates the nrf_power_clock driver to DTS.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-02-25 17:51:24 +01:00
Andrzej Głąbek 3ea29d081f dts: nordic: Enable wdt nodes by default for all nRF SoCs
Actually, add the "status" property that enables the nodes explicitly.
They were apparently enabled by default without this property.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-02-05 15:23:24 -06:00
Sigvart Hovland 2de8b95153 dts: arm: nordic: Add flash controller alias to nrf9160ns.dtsi
Added missing flash-controller alias to nrf9160ns used by subsystem such
as `mcumgr`.

Signed-off-by: Sigvart Hovland <sigvart.hovland@nordicsemi.no>
2019-01-24 09:49:15 -06:00
Andrzej Głąbek 0cc8f302bf drivers: clock_control: nrf: Use IRQ number symbol generated from DT
Use the symbol generated from DT so that it is common for nRF9160
and nRF5 family SoCs. To avoid artificial renaming of CLOCK_POWER_IRQn
to POWER_CLOCK_IRQn.

For nRF5 family SoCs clock nodes were not defined so far, thus they are
added so that the proper DT symbol is generated for them as well.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-01-21 10:13:34 +01:00
Andrzej Głąbek 2210e2235d dts: nrf9160: Add nodes for PWM peripherals
Add DT nodes for PWM peripherals available in nRF9160.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-01-21 10:13:34 +01:00
Andrzej Głąbek 148f4e3872 dts: nrf9160: Add rtc0 node and replace nvmc node with alias
Add missing node for instance 0 of the RTC peripheral and use an alias
to the flash-controller node instead of the nvmc node definition (there
is no need to have a separate node just to get the NVMC base address).

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-01-21 10:13:34 +01:00
Kumar Gala 801ee9c5f0 dts: nrf: Add SoC compatible property
Add a compatible property to the SoC level nodes to tell what SoC we
are on.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-15 17:17:28 -05:00
Kumar Gala 0891ad4362 dts: nordic: Fix vendor prefix for flash controller
The vendor prefix for the flash controller should be "nordic," not
"nrf,".

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-01-15 08:17:26 -06:00
Ioannis Glaropoulos b3299891ed dts: nordic: nrf91: DTS include headers for nRF9160 SOC
This commit introduces the main device tree header files (.dtsi)
for Nordic nRF9160 SOC, for both Secure and Non-Secure domains.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-12-21 21:03:55 +01:00
Ioannis Glaropoulos fe2f30ad4c dts: nordic: simplify definition of flash and sram sizes in dts
We only need to add the reg property in flash0 and sram0,
in the different DTS headers for the nRF SOCS. We do not
seem to need to define the nodes again. This commit applies
this simplification for flash and sram sizes definition.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-12-20 12:21:23 +01:00
Kumar Gala 90fbeb0a10 dts: nrf: Fix missed device tree warnings
Fix the following warning that shows up in some NRF device tree files:

	Warning (simple_bus_reg): /soc/pwm@4002D000: simple-bus unit
	address format error, expected "4002d000"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-12-19 08:26:22 -06:00
Kumar Gala 523932ccb0 dts: nrf: Fix device tree warnings
Fix the following warning that shows up in some NRF device tree files:

	Warning (simple_bus_reg): /soc/pwm@4001C000: simple-bus unit
	address format error, expected "4001c000"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-12-13 22:11:26 +01:00
Gaute Gamnes 7b1ebb2116 dts: nrf: PWM device node added to nRF52 devices with yaml binding
1. PWM device node added with alias to all
   nRF52x DTSI files. 1 instance for
   nRF52810, 3 instances for nRF52832, and
   4 instance for nRF52840.
2. Added yaml binding for Nordic PWM node.

Signed-off-by: Gaute Gamnes <gaute.gamnes@nordicsemi.no>
2018-12-11 15:18:14 +01:00
Tom Burdick 4619f8f114 samples: usb: Fixes usb/console sample for nrf52840
Adds the virtualcom device to the nrf52840 SoC dts and adds a board
specific nrf52840_overlay.dts file, copied exactly from the
arduino101_overlay.dts file, to set the console device name
appropriately for the subsys/usb/console sample project.

There were no clear alternatives to add a usb_cdc: virtualcom device to
all known SoC devices with USB support as should probably happen.

There was also no clear alternatives to add a non-board specific overlay
to the example.

This fixes a specific problem with the nrf52840-dk board for this sample
project.

Signed-off-by: Tom Burdick <thomas.burdick@gmail.com>
2018-11-21 06:19:32 -06:00
Mieszko Mierunski c9906dd3cf dts: nrf: Remove qdec dts.fixup defines and use aliases instead.
Changed driver to use defines from aliases instead of fixup.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-11-20 22:18:09 +01:00
Mieszko Mierunski 066fe7294e dts: nrf: Remove cryptocell dts.fixup defines and use aliases insted.
Changed driver to use defines from aliases instead of fixup.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-11-20 22:18:09 +01:00
Mieszko Mierunski ac4f588e1f dts: nrf: Remove USBD dts.fixup defines and use aliases instead.
Changed driver to use defines from aliases instead of fixup.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-11-20 22:18:09 +01:00
Mieszko Mierunski 94dc637c65 dts: nrf: Remove WDT dts.fixup defines and use aliases instead.
Changed driver to use defines from aliases instead of fixup.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-11-20 22:18:09 +01:00
Mieszko Mierunski 80421d3f5f dts: nrf: Remove GPIOTE dts.fixup defines and use aliases instead.
Changed driver to use defines from aliases instead of fixup.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-11-20 22:18:09 +01:00
Mieszko Mierunski b370b2ba05 dts: nrf: Remove ADC dts.fixup defines and use aliases instead.
Changed driver to use defines from aliases instead of fixup.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-11-20 22:18:09 +01:00
Mieszko Mierunski 34cb33daa8 dts: nrf: Remove UART dts.fixup defines and use aliases instead.
Changed driver to use defines from aliases instead of fixup.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-11-20 22:18:09 +01:00
Mieszko Mierunski c1f7e0c955 dts: nrf: Remove SPI dts.fixup defines and use aliases instead.
Changed driver to use defines from aliases instead of fixup.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-11-20 22:18:09 +01:00
Mieszko Mierunski 5a10087a25 dts: nrf: Remove TWI dts.fixup defines and use aliases instead.
Changed driver to use alias defines instead of fixup.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-11-20 22:18:09 +01:00
Kumar Gala 0eb0e78d67 dts: Fix warnings associated with reg/unit-address not matching
Newer DTC now warns about mismatch between the reg and unit-address.
Most of these cases are due to case not matching, so fix thoses so
everything is lowercase.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-10 09:11:58 -05:00
Pawel Dunaj ecae736e0b dts: Add support for Nordic QDEC
Add QDEC binding and entry in Nordic SoC DTSI files.

This closes issue #9364

Jira:DESK-259

Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
2018-10-17 13:45:51 -05:00
Dominik Kilian 67ca29a0e7 dts: nrf: Expand nRF DTS to support ARM TrustZone CryptoCell 310
Commit introduces support for ARM TrustZone CryptoCell 310
for Nordic Semiconductor nRF SoCs in device tree.

Signed-off-by: Dominik Kilian <Dominik.Kilian@nordicsemi.no>
2018-09-21 00:29:58 -07:00
Kumar Gala 236a2d6f13 dts: arm: nrf: Remove use of CONFIG_SOC_* from Nordic dts files
To move forward and remove use of Kconfig in dts files lets just create
SoC specific dtsi files that the boards can include.  This lets us
remove:

CONFIG_SOC_NRF51822_QFAA
CONFIG_SOC_NRF51822_QFAB
CONFIG_SOC_NRF51822_QFAC
CONFIG_SOC_NRF52810_QFAA
CONFIG_SOC_NRF52832_QFAA
CONFIG_SOC_NRF52832_CIAA
CONFIG_SOC_NRF52832_QFAB
CONFIG_SOC_NRF52840_QIAA

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-09-15 15:33:43 -05:00
Kumar Gala 6e240da26f dts: Use new DT_SIZE_{K,M} macros
Now that we have a common DT_SIZE_K macro use it instead of defining
__SIZE_K eveywhere.  We also have DT_SIZE_M, so use that in a few
places as well.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-09-15 09:23:07 -05:00
Emanuele Di Santo 50e05a544e boards: arm: nrf52832_pca10040: use dts for LED and button config
The LEDs, buttons and necessary aliases are now configured via dts.
This commit breaks the sample under samples/boards/nrf52/power_mgr.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2018-09-11 11:42:20 -05:00
Emanuele Di Santo e84709e169 boards: arm: nrf51_pca10028: use dts for LED and button configuration
The LEDs, buttons and necessary aliases are now configured via dts.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2018-09-11 11:42:20 -05:00
Filip Kubicz 990a0e8c71 dts: add SPI bindings for nRF family
This change adds DTS definition of SPI device for nRF chips.
It also removes SPI pin configuration from Kconfig and moves it to
chip DTS.

Signed-off-by: Filip Kubicz <filip.kubicz@nordicsemi.no>
2018-09-11 11:41:37 +02:00
Filip Kubicz 5c3992f34f dts: update I2C bindings for nRF chips
Change 'nRF5' family names to 'nRF' in I2C DTS.

Signed-off-by: Filip Kubicz <filip.kubicz@nordicsemi.no>
2018-09-11 11:41:37 +02:00
Andrzej Głąbek 0a97b5bf35 dts: nrf: Add ADC nodes and bindings for nRF SoCs
This commit adds ADC nodes to DTS files for nRF SoCs and introduces
corresponding  bindings for these nodes.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2018-08-29 13:46:57 -04:00
Anas Nashif 6a01c69f9b nrf52_pca10040: get the erase block size from dts
Sample expect that to come from DTS, previously it was hardcoded in the
sample.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-08-28 20:06:58 -04:00
Maureen Helm 7976d2b564 samples: nvs: Use flash erase block size from dts
The nvs sample assumed a 1 KB flash erase block size, which caused the
sample to fail on frdm_k64f because its erase block size is 4 KB. Get
the erase block size from dts instead.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-08-27 12:49:32 -04:00
Mieszko Mierunski 4f6aac1a67 dts: nrf5: Changed GPIO and GPIOTE define names
Changed names using nrf5 to nrf for consistency with other drivers.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-08-17 07:29:14 -07:00
Mieszko Mierunski e99e363cc0 dts: nrf: Added DTS support for nRF51
DTS for nRF51 was missing, I updated soc and board files to
support DTS properly.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2018-08-17 07:29:14 -07:00
Emanuele Di Santo ef935898d0 boards: arm: add nrf52840_pca10059
This commit adds support for the nrf52840_pca10059 board.
The flash partitions are configured to allow migrating from
the stock bootloader to MCUBoot.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2018-07-20 12:00:35 +02:00
Kumar Gala f0450fc423 nrf52: dts: Force user to explicitly set UART0 compatible
Since the UART0 @ 0x40002000 can either be UART or UARTE the user of the
soc.dtsi needs to select either compatible = "nordic,nrf-uarte" or
"nordic,nrf-uart"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-07-10 08:54:30 -05:00
Ioannis Glaropoulos 2b7c854a65 boards: arm: nrf: move LED and Button definitions in DTS
This commit moves the definitions for the LED and Buttons
supported in nrf52810_pca10040 DK in DTS from board.h. Aliases
are kept in board.h to make basic examples pass.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-06-25 19:34:33 +02:00
Carles Cufi 0f6bd5c891 arch: arm: nrf: Add support for the nRF52810
The nRF52810 is a low-cost variant of the nRF52832, with a reduced set
of peripherals and memory. This commit adds basic support for it in the
arch SoC and dts folders.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <ioannis.glaropoulos@nordicsemi.no>
2018-06-25 19:34:33 +02:00
Bartosz Sokolski 06f4daf847 dts: add parentheses around argument in macro __SIZE_K
to allow expressions

Signed-off-by: Bartosz Sokolski <bartosz.sokolski@nordicsemi.no>
2018-06-20 12:14:58 -04:00
Alex Tereschenko 0824ec6409 dt: nrf52840: remove 0x from USBD address
The prepended 0x causes DTC warnings and shouldn't be there.

Tested by compiling hello_world for nrf52840_pca10056 before and after.

Fixes #8334.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
2018-06-16 18:00:56 +02:00
Marc Reilly 6c60abb03b drivers: gpio: add dts support for nrf52 gpio
This adds basic support for declaring gpio nodes in dts for nrf52.
The dts.fixup provides mapping for the generated defines to the config
defines currently used by the nrf gpio driver.

Existing boards that use nrf52 are updated.

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
2018-06-14 15:56:39 +02:00
David Leach 9e09e2a1b7 OpenThread: Change SETTINGS_CONFIG_PAGE_SIZE to target specific value
- Changed define for SETTINGS_CONFIG_PAGE_SIZE from a hard coded value
  to reference build system generated FLASH_ERASE_BLOCK_SIZE. This value
  comes from 'erase-block-size' found in the dtsi file of devices.
- Modified nrf52840.dtsi to include definition for 'erase-block-size'

Fixes #7107

Signed-off-by: David Leach <david.leach@nxp.com>
2018-05-14 17:23:38 -04:00
Karol Lasończyk 83e4947cf1 dts: nrf: Expand nRF DTS to support watchdog
Commit introduces support for watchdog configuration for Nordic
Semiconductor nRF SoCs in device tree.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2018-05-14 10:28:23 -05:00
Carles Cufi 8aa9a37902 drivers: flash: nrf: Rename nrf5 to nrf
With upcoming ICs that are not in the nRF5x family, rename the flash
driver and all its dependencies from nrf5 to nrf.

Should also fix the issue introduced by f49150cab6 which broke the
assignment of the flash device due to a partial rename.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-03-20 20:07:09 +01:00
Sundar Subramaniyan 037dddbe8f dts: arm: nrf52840_pca10056: Use DT to configure USB
Configure USB using DT for nrf52840_pca10056

Signed-off-by: Sundar Subramaniyan <sundar.subramaniyan@gmail.com>
2018-03-15 12:39:53 +01:00
Aapo Vienamo 516a179186 dts: arm: nrf5: Add i2c nodes
DT nodes for i2c0 and i2c1 are added for the nRF5 SoCs.

Signed-off-by: Aapo Vienamo <aapo.vienamo@iki.fi>
2018-03-13 14:14:13 +01:00
Andrzej Puzdrowski ff7dfc4fb4 dts: bindings: add support for the flash driver name
So far, DT did not support the flash driver name.
Any flash-controller should have the appropriate
flash driver that should be identified by its name.

This path adds generic support for extract the description
from the flash-controller node,
adds implementation of this property for all nrf5x targets.


Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2018-01-23 12:29:50 -06:00
Kumar Gala 37d72bf0d6 dts: Update soc-nv-flash nodes
Where missing add compatible = "soc-nv-flash".  Also added a label for
all the soc-nv-flash that we might use in the future.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-23 12:16:53 -06:00
Andrzej Puzdrowski 7126456d2d dts: nrf: Add flash controller and alignment description for nRF51822
Similar addition was don previous for nRF52840.
Added flash-controller description and moved flash description to
it. Added property for description of
the flash alignment required by write operations.


Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2017-09-21 06:46:27 -04:00
Andrzej Puzdrowski 4cab5ccb77 dts: nrf: Add flash controller and alignment description for nRF52832
Similar addition was don previous for nRF52840.
Added flash-controller description and moved flash description to
it. Added property for description of
the flash alignment required by write operations.


Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2017-09-21 06:46:27 -04:00
Andrzej Puzdrowski d868a0be9a dts: nrf: Add flash controller and alignment description for nRF52840
Added flash-controller description and moved flash description to
it (for coherence). Added property for description of
the flash alignment required by write operations.
Thanks to that l-value FLASH_WRITE_BLOCK_SIZE macro
will be generated. It is useful for any component uses
the flash.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2017-09-11 10:29:37 -04:00
Yannis Damigos 1a652e3ef1 dts: Remove memory node from skeleton dtsi file
Remove memory node from skeleton dtsi and add device_type
property in every memory node in soc dtsi files

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2017-07-21 12:20:49 -05:00
Yannis Damigos 399a6bec0f dts: arm: Add unit-address component to memory and flash nodes
This patch add the unit-address component to memory and flash
nodes. According to the DT specification, the unit-address of
a node must match the first address specified in the reg
property of the node.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2017-07-21 12:20:49 -05:00
Kumar Gala ddf3934d83 dts: Add missing compatible "mmio-sram"
Not all sram nodes had a compatible, so add one to those that are
missing.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-20 09:56:41 -05:00
Yannis Damigos 941ffb017b dts: Add cpus and cpu nodes missing properties
This patch adds #address-cell, #size-cell properties to
cpus container node and device_type, reg properties to
cpu node.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2017-07-19 14:28:08 -05:00
Anas Nashif 3405607d9e license: add missing licenses and copyright
We were missing license boilerplate in many files, add them

Jira: ZEP-1464

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-08 10:41:56 -04:00
Kumar Gala 29a6053a0d arm: nrf: dts: use label to generate NRF uart name
Now that we can utilize label in the device tree we can convert to
getting the device name for the NRF UART out of the device tree
instead of from Kconfig.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-05-19 10:06:48 -04:00
Kumar Gala ca3c7ec0a9 arm: dts: nrf: Add Device Tree Support for nRF51822 SoC & boards
Add device tree support for nRF51822 SoCs and Arduino 101-BLE,
Curie-BLE, BLE Nano, PCA10028-DK, and Quark-SE BLE boards. This
is minimal support for memory, flash, and UART.

Change-Id: I7e572bea537e384b6d66e520462f023ace0c9b35
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-28 15:26:39 -05:00
Kumar Gala b09f63ac54 arm: dts: nrf: Add Device Tree Support for nRF52840 SoC & boards
Add device tree support for nRF52840 SoC and PCA10056-DK board.  This
is minimal support for memory, flash, and UART.

For the nRF52840 we select between "nordic,nrf-uarte", "nordic,nrf-uart"
support for each board.

Change-Id: I1c377e0cb97ff4716ea5489fffaa7c0e2b34d18a
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-28 15:26:39 -05:00
Kumar Gala 77f65b907f arm: dts: Add DTS support for NRF52832 SoC
Add plumbing to build system and SoC level dtsi for the NRF52832 SoC.
We additionally add the necessary yaml files for the UART on the NRF52
SoCs.

Change-Id: I3b4a821b2993827e33d8e84bdbbc759d1521f8bd
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-14 05:56:54 -05:00