Skip to content

Commit 3cc9282

Browse files
nordic-krchkartben
authored andcommitted
samples: drivers: adc: adc_dt: Add nrf54h20dk_nrf54h20_cpuppr
Add overlays for nrf54h20dk_nrf54h20_cpuppr. Moved common configuration for nrf54h20dk to nrf54h20dk_nrf54h20_common.dtsi. Add configuration for vpr_launcher on nrf54h20dk_nrf54h20_cpuapp. Signed-off-by: Krzysztof Chruściński <[email protected]>
1 parent 40ebaa9 commit 3cc9282

File tree

5 files changed

+69
-39
lines changed

5 files changed

+69
-39
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* Copyright (c) 2024 Nordic Semiconductor ASA
5+
*/
6+
7+
/ {
8+
zephyr,user {
9+
io-channels = <&adc 0>, <&adc 1>, <&adc 7>;
10+
};
11+
};
12+
13+
&adc {
14+
#address-cells = <1>;
15+
#size-cells = <0>;
16+
17+
channel@0 {
18+
reg = <0>;
19+
zephyr,gain = "ADC_GAIN_1_2";
20+
zephyr,reference = "ADC_REF_INTERNAL";
21+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
22+
zephyr,input-positive = <NRF_SAADC_AIN1>; /* P1.01 */
23+
zephyr,resolution = <10>;
24+
};
25+
26+
channel@1 {
27+
reg = <1>;
28+
zephyr,gain = "ADC_GAIN_1_2";
29+
zephyr,reference = "ADC_REF_INTERNAL";
30+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
31+
zephyr,input-positive = <NRF_SAADC_AIN2>; /* P1.02 */
32+
zephyr,resolution = <12>;
33+
zephyr,oversampling = <8>;
34+
};
35+
36+
channel@7 {
37+
reg = <7>;
38+
zephyr,gain = "ADC_GAIN_1_2";
39+
zephyr,reference = "ADC_REF_INTERNAL";
40+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
41+
zephyr,input-positive = <NRF_SAADC_AIN3>; /* P1.03 */
42+
zephyr,input-negative = <NRF_SAADC_AIN7>; /* P1.07 */
43+
zephyr,resolution = <12>;
44+
};
45+
};

samples/drivers/adc/adc_dt/boards/nrf54h20dk_nrf54h20_cpuapp.overlay

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,4 @@
44
* Copyright (c) 2024 Nordic Semiconductor ASA
55
*/
66

7-
/ {
8-
zephyr,user {
9-
io-channels = <&adc 0>, <&adc 1>, <&adc 7>;
10-
};
11-
};
12-
13-
&adc {
14-
#address-cells = <1>;
15-
#size-cells = <0>;
16-
17-
channel@0 {
18-
reg = <0>;
19-
zephyr,gain = "ADC_GAIN_1_2";
20-
zephyr,reference = "ADC_REF_INTERNAL";
21-
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
22-
zephyr,input-positive = <NRF_SAADC_AIN1>; /* P1.01 */
23-
zephyr,resolution = <10>;
24-
};
25-
26-
channel@1 {
27-
reg = <1>;
28-
zephyr,gain = "ADC_GAIN_1_2";
29-
zephyr,reference = "ADC_REF_INTERNAL";
30-
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
31-
zephyr,input-positive = <NRF_SAADC_AIN2>; /* P1.02 */
32-
zephyr,resolution = <12>;
33-
zephyr,oversampling = <8>;
34-
};
35-
36-
channel@7 {
37-
reg = <7>;
38-
zephyr,gain = "ADC_GAIN_1_2";
39-
zephyr,reference = "ADC_REF_INTERNAL";
40-
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
41-
zephyr,input-positive = <NRF_SAADC_AIN3>; /* P1.03 */
42-
zephyr,input-negative = <NRF_SAADC_AIN7>; /* P1.07 */
43-
zephyr,resolution = <12>;
44-
};
45-
};
7+
#include "nrf54h20dk_nrf54h20_common.dtsi"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* Copyright (c) 2024 Nordic Semiconductor ASA
5+
*/
6+
7+
#include "nrf54h20dk_nrf54h20_common.dtsi"
8+
9+
&adc {
10+
status = "okay";
11+
};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
#include "../../../boards/nrf54h20dk_nrf54h20_common.dtsi"
7+
8+
&adc {
9+
status = "reserved";
10+
interrupt-parent = <&cpuppr_clic>;
11+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# nothing here

0 commit comments

Comments
 (0)