Skip to content
Permalink
Browse files

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>
  • Loading branch information...
anangl authored and nashif committed Jun 28, 2018
1 parent b0c3b35 commit 0a97b5bf35aff7a8c1367ff4f785f1585188e25a
@@ -1,6 +1,11 @@
/* SoC level DTS fixup file */

#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V6M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS

#define CONFIG_ADC_0_IRQ NORDIC_NRF_ADC_40007000_IRQ_0
#define CONFIG_ADC_0_IRQ_PRI NORDIC_NRF_ADC_40007000_IRQ_0_PRIORITY
#define CONFIG_ADC_0_NAME NORDIC_NRF_ADC_40007000_LABEL

#define CONFIG_UART_0_BASE NORDIC_NRF_UART_40002000_BASE_ADDRESS
#define CONFIG_UART_0_IRQ_PRI NORDIC_NRF_UART_40002000_IRQ_0_PRIORITY
#define CONFIG_UART_0_IRQ_NUM NORDIC_NRF_UART_40002000_IRQ_0
@@ -1,6 +1,11 @@
/* SoC level DTS fixup file */

#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS

#define CONFIG_ADC_0_IRQ NORDIC_NRF_SAADC_40007000_IRQ_0
#define CONFIG_ADC_0_IRQ_PRI NORDIC_NRF_SAADC_40007000_IRQ_0_PRIORITY
#define CONFIG_ADC_0_NAME NORDIC_NRF_SAADC_40007000_LABEL

#if defined(NORDIC_NRF_UARTE_40002000_BASE_ADDRESS)
#define CONFIG_UART_0_BASE NORDIC_NRF_UARTE_40002000_BASE_ADDRESS
#define CONFIG_UART_0_IRQ_PRI NORDIC_NRF_UARTE_40002000_IRQ_0_PRIORITY
@@ -39,6 +39,14 @@
};

soc {
adc: adc@40007000 {
compatible = "nordic,nrf-adc";
reg = <0x40007000 0x1000>;
interrupts = <7 1>;
status = "disabled";
label = "ADC_0";
};

uart0: uart@40002000 {
compatible = "nordic,nrf-uart";
reg = <0x40002000 0x1000>;
@@ -39,6 +39,14 @@
};

soc {
adc: adc@40007000 {
compatible = "nordic,nrf-saadc";
reg = <0x40007000 0x1000>;
interrupts = <7 1>;
status = "disabled";
label = "ADC_0";
};

uart0: uart@40002000 {
compatible = "nordic,nrf-uarte";
reg = <0x40002000 0x1000>;
@@ -39,6 +39,14 @@
};

soc {
adc: adc@40007000 {
compatible = "nordic,nrf-saadc";
reg = <0x40007000 0x1000>;
interrupts = <7 1>;
status = "disabled";
label = "ADC_0";
};

uart0: uart@40002000 {
/* uart can be either UART or UARTE, for the user to pick */
/* compatible = "nordic,nrf-uarte" or "nordic,nrf-uart"; */
@@ -40,6 +40,14 @@
};

soc {
adc: adc@40007000 {
compatible = "nordic,nrf-saadc";
reg = <0x40007000 0x1000>;
interrupts = <7 1>;
status = "disabled";
label = "ADC_0";
};

uart0: uart@40002000 {
/* uart can be either UART or UARTE, for the user to pick */
/* compatible = "nordic,nrf-uarte" or "nordic,nrf-uart"; */
@@ -0,0 +1,35 @@
#
# Copyright (c) 2018, Nordic Semiconductor ASA
#
# SPDX-License-Identifier: Apache-2.0
#
---
title: Nordic Semiconductor nRF Family ADC
id: nordic,nrf-adc
version: 0.1

description: >
This is a representation of the nRF ADC node
inherits:
!include adc.yaml

properties:
compatible:
type: string
category: required
description: compatible strings
constraint: "nordic,nrf-adc"

reg:
type: array
description: mmio register space
generation: define
category: required

interrupts:
type: array
category: required
description: required interrupts
generation: define
...
@@ -0,0 +1,35 @@
#
# Copyright (c) 2018, Nordic Semiconductor ASA
#
# SPDX-License-Identifier: Apache-2.0
#
---
title: Nordic Semiconductor nRF Family SAADC
id: nordic,nrf-saadc
version: 0.1

description: >
This is a representation of the nRF SAADC node
inherits:
!include adc.yaml

properties:
compatible:
type: string
category: required
description: compatible strings
constraint: "nordic,nrf-saadc"

reg:
type: array
description: mmio register space
generation: define
category: required

interrupts:
type: array
category: required
description: required interrupts
generation: define
...

0 comments on commit 0a97b5b

Please sign in to comment.
You can’t perform that action at this time.