Commit graph

116 commits

Author SHA1 Message Date
Kumar Gala 77a56fd725 dts: remove incorrect use of device_type property
For true mmio-sram, arc,iccm, arc,dccm nodes we should not be setting
device_type = "memory".  This should be used for true DRAM regions of
memory and not on SoC SRAMs.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-07-23 06:37:41 -05:00
Ioannis Glaropoulos 619a498845 soc: arm: nrf5340: remove DTS nodes for non-functional devices
Several peripherals are non-functional in the ENG_A revision
of nRF5340 (Application MCU) so we delete the corresponding
DTS nodes in the device description.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-07-08 10:45:57 +02:00
Ioannis Glaropoulos 6880603e1d dts: arm: nordic: add SoC-variant headers for nrf5340 FP1
Adding SoC variant headers for nRF5340 variant (non Eng A).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-07-08 10:45:57 +02:00
Ioannis Glaropoulos ac9901d5fc dts: arm: nordic: add Eng A suffix to nRF5340 CPUAPP .dtsi headers
Rename the nRF5340 QKAA variant .dtsi headers (Application
MCU) by adding an Engineering A (Eng A) suffix. This is done
to indicate that the headers should be explicitly used when
building for a board that contains the Engineeering A nrf5340
SoC variant.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-07-08 10:45:57 +02:00
Ioannis Glaropoulos 30c9c062d4 dts: arm: nordic: fix compatible strings for nRF5340 MCUs
We need to use CPUAPP and CPUNET instead of CPU0 and CPU1
terminology, because those terms are the ones used
throughout the DeviceTree definitions for nRF5340 SoC.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-07-08 10:45:57 +02:00
Ioannis Glaropoulos 1579246f32 dts: arm: nordic: move number of MPU regions in variant-specific file
Move the definition of the number of MPU regions
(num-mpu-regions) in a SoC variant-specific header
instead of the common .dtsi for nRF5340 Application
MCU. This allows us to define different SoC variants
with different number of MPU regions available.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-07-08 10:45:57 +02:00
Ioannis Glaropoulos 166cfe5fb1 dts: arm: nordic: rename nrf5340_cpuapp_common.dtsi
This commit renames the nrf5340_cpuapp_common.dtsi header
to nrf5340_cpuapp_peripherals.dtsi. This name is more
appropriate, as the header contains DT definitions for
peripherals, accessible from either Secure or Non-secure
execution environment (i.e. not accessible exclusively
by Secure or Non-Secure).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-07-08 10:45:57 +02:00
Andrzej Głąbek e64f75bae1 dts: nordic: Remove no longer needed peripheral aliases
Aliases defined for peripheral nodes in the nRF SoC definitions were
used in drivers to properly match the hardware instances.
After the drivers were converted to use the new DT API, these aliases
became needless.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-06-18 23:59:40 +02:00
Martí Bolívar c0fcff9b7d dts: nrf5340_cpuapp: add cryptocell node
Add the missing node and bindings. This is a secure-mapped peripheral,
so do not add it to the common include file
nrf5340_cpuapp_common.dtsi.

Fixes: #25493
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-21 20:09:44 +02:00
Mieszko Mierunski f4a7255677 boards: nordic: Add support for nRF52833dk_nrf52820 board
This commit adds support for nRF52820 development on nRF52833DK.
Changes afffects:
 - Introduce files related to board description.
 - Add blank documentation file (for future update).
 - configuration files for build process.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2020-05-08 15:00:41 +02:00
Mieszko Mierunski 8538e7133a soc: nordic: Add support for nRF52820
This commit adds basic support for nRF52820 SoC.
Changes affect introducing:
 - architecuture files (dtsi)
 - configuration of nrfx drivers
 - adaptation of inclusions based on chosen SoC

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2020-05-08 15:00:41 +02:00
Kumar Gala 7a15afc1d4 drivers: flash: replace DT_FLASH_DEV_NAME with DT macro
Replace DT_FLASH_DEV_NAME with DT_CHOSEN_ZEPHYR_FLASH_CONTROLLER_LABEL.
We now set zephyr,flash-controller in the chosen node of the device
tree to the flash controller device.

NOTE: For a SoCs with on die flash, this points to the controller and
      not the 'soc-nv-flash' node.  Typically the controller is the
      parent of the 'soc-nv-flash' node).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-27 18:43:20 -05:00
Martí Bolívar 644f9ecbf0 dts: nordic: introduce wdt0 / wdt1 distinction
Add wdt0 node labels for all watchdogs. Keep the existing wdt node
labels in place for backwards compatibility.

Add a wdt1 node to the nRF5340 application core .dtsi, but leave it
disabled. Leave the wdt node's label set to "WDT" on this core for
backwards compatibility also, in case any users are getting it with a
string literal instead of asking the devicetree. This can be changed
later after this round of watchdog changes has been shaken out and
tested more.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-24 19:35:41 +02:00
Kumar Gala 43a7d26603 drivers: entropy: replace CONFIG_ENTROPY_NAME with DT macro
Replace CONFIG_ENTROPY_NAME with DT_CHOSEN_ZEPHYR_ENTROPY_LABEL.  We now
set zephyr,entropy in the chosen node of the device tree to the entropy
device.

This allows us to remove CONFIG_ENTROPY_NAME from dts_fixup.h.  Also
remove any other stale ENTROPY related defines in dts_fixup.h files.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-13 09:14:21 -05:00
Martí Bolívar 7337e8023f dts: nordic_nrf: add flash_controller labels
Make sure every flash controller has a node label "flash_controller".
This will make it easier to refer to the SoC NVMC node when necessary.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-07 08:00:29 -05:00
Andrzej Głąbek 20125076f6 dts: nordic: Add missing rng nodes in nRF SoCs
Define rng nodes for all SoCs featuring the RNG peripheral,
so that the entropy_nrf5 driver can be converted to DTS.

For the network core in nRF5340, align the RNG interrupt priority with
what is used as the default value in (almost) all other DTS nodes.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-04-06 09:10:43 -05:00
Andrzej Głąbek c158e3ee74 dts: nrf: Correct the number of pins available in gpio1
Currently supported nRF SoCs featuring the second GPIO port (P1) do not
have all 32 pins implemented in that port. Add the "ngpios" property
in gpio1 nodes for these SoCs, so that they don't take the default
value of 32 to indicate the number of available pins but use instead:
- 10 for nRF52833
- 16 for nRF52840
- 16 for nRF5340 (both application and network core)

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-04-02 13:53:16 +02:00
Torsten Rasmussen 058b749538 dts: added cryptocell to the dts file for nRF9160
This commit adds cryptocell definitions to the nRF9160 dts file.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-02-05 13:57:04 -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
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
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
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
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
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
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
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
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 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
Ioannis Glaropoulos 3f5aae9d24 soc: arm: nrf9160: add missing NRF_UICR definition
NRF_UICR needs to be defined for nRF9160 SoC in
nrfx_config_nrf9160.h, because it is not defined
in nrfx/hal/mdk/nrf9160.h (as it is a Secure-only
peripheral).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-08-08 08:50:39 -05:00
Kumar Gala 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
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
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
Kumar Gala 5071eeec8b dts: Remove unused virtualcom device node from dts
There doesn't seem to be any use of the virtualcom device in the code,
so lets remove it from the dts as it describes itself as a usb device
controller which it is not.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-18 11:24:40 +02:00
Ulf Magnusson a84ded74ea dts: Replace status = "ok" with status = "okay"
The DT spec. only has "okay" and not "ok". The Linux kernel has around
12k "okay"s and 300 "ok"s.

The scripts/dts scripts only check for "disabled", so should be safe re.
those at least.

The replacement was done with

    git ls-files | xargs sed -i 's/status\s*=\s*"ok"/status = "okay"/'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-06-14 19:51:13 -05:00
Ioannis Glaropoulos 8ce04c5a6b dts: arm: delete systick node from SoCs not having the SysTick timer
ARM SysTick peripheral is optional in Cortex-M0 MCUs,
so we delete the respective dts node when the peripheral
is not present.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-05-20 14:06:10 -05:00
Ioannis Glaropoulos 4b15873c13 soc: arm: add ARM MPU node info and fixup for ARMv8-M SoCs
This commit adds a DTS node for the ARM MPU peripheral in the
device tree of ARMv8-M SoCs (for the secure and the non-secure
DTS descriptions) and updates the fixup files. SoCs:
- nrf9160
- musca_a
- musca_b1

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-05-20 14:06:10 -05:00
Ioannis Glaropoulos 0472bc467f dts: nordic: add missing erase-block-size entry
Adding missing erase-block-size entries for the flash-controller
nodes in the nrf52810 and nrf52811 .dtsi files.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-05-15 11:05:19 -05:00
Kumar Gala 233149eec5 dts: nordic: move flash/sram under SoC Node
Move flash-controller and SRAM node definitions under SoC node.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-05-15 11:05:19 -05:00
Krzysztof Chruscinski 6d4a5200bc drivers: counter: Move nRF TIMER and RTC configuration to device tree
Reduced Kconfig for counter with nRF TIMER and RTC. Added overlays
for TIMER and RTC configuration in the counter test.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-05-15 10:11:02 +02:00
Antony Pavlov 3bcd188068 treewide: fix typos
Fix trivial typos.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
2019-05-14 06:07:40 -05:00
Jakub Rzeszutko 0efddb63b7 arm: nrf: Add support for the nRF52811
This commit adds basic support for nrf52811 in the arch SoC, dts
and nrfx folders.

The nRF52811 is a Bluetooth 5.1 Direction Finding SoC with comprehensive
protocol support.
The nRF52811 SoC is capable of the latest features of Bluetooth 5.1,
the most prominent being Direction Finding.

The radio in the nRF52811 SoC has comprehensive protocol capabilities,
including Bluetooth 5.1 Directing Finding, all Bluetooth 5 features,
802.15.4, Thread, Zigbee, ANT and 2.4 GHz proprietary.
It has 4 dBm TX power and has been optimized to offer the best RX
sensitivity of all SoCs in the nRF52 series.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2019-05-14 09:52:57 +02:00
Anas Nashif 3ae52624ff license: cleanup: add SPDX Apache-2.0 license identifier
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier.  Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.

By default all files without license information are under the default
license of Zephyr, which is Apache version 2.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 08:45:22 -04:00
Mieszko Mierunski 7700322961 dts: nrf: Add DPPIC to device tree.
Add DPPIC to dts. Add HAS_HW_NRF_DPPIC to nrf91 soc.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2019-03-28 09:30:57 -04:00
Jakub Rzeszutko 6e861e1947 dts: update mermory regions for nrf chips
According to nrf51 and nrf52 specifaction every peripheral is
assigned a fixed block of 0x1000 bytes. Due to that dts for
nrf51 and nrf52 chips have been updated.
The only exception is gpio for nrf52840 where gpio0 and gpio1
share the same memory regions. For this reason, the definition
of gpio for nrf52840 is different from the others.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2019-03-28 11:50:43 +01:00
Gaute Gamnes 88f099c3a1 dts: nrf: SW PWM device node added to nRF5 devices with yaml binding
1. SW PWM device node added to common nrf5_common.dtsi
2. SW PWM node set in all nRF5x DTSI files.
   Different initial settings for nRF51 and nRF52 devices.
   Status is ok by default for nRF51.
3. Added yaml binding for Nordic SW PWM node.
4. Set codeowner of nordic dts bindings to @anangl

Signed-off-by: Gaute Gamnes <gaute.gamnes@nordicsemi.no>
2019-03-12 13:34:01 +01:00
Gaute Gamnes 281e251690 dts: nrf: Temp device node added to nRF5 devices with yaml binding
1. Temp device node added to all nRF5 DTSI files.
2. Added yaml binding for Nordic Temp node.
3. Set codeowner of nordic dts bindings to @anangl

Signed-off-by: Gaute Gamnes <gaute.gamnes@nordicsemi.no>
2019-03-12 13:33:36 +01:00
Andrei Emeltchenko da605d5e32 dts: usbserial: Fix USB serial console device name
Fixes DT device name for USB serial console.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-03-09 10:41:05 +01:00