Skip to content

Commit 44e9893

Browse files
committed
update
1 parent a2e2d78 commit 44e9893

File tree

7 files changed

+77
-111
lines changed

7 files changed

+77
-111
lines changed

variants/arduino_mkrzero_samd21g18a/arduino_mkrzero_samd21g18a.overlay

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,29 @@
55
*/
66

77
#include <zephyr/dt-bindings/adc/adc.h>
8+
#include <zephyr/dt-bindings/gpio/arduino-mkr-header.h>
89

910
/ {
11+
/* We’ll move it into the board’s DTS in the future. */
12+
arduino_adc: analog-connector {
13+
compatible = "arduino,uno-adc";
14+
#io-channel-cells = <1>;
15+
io-channel-map = <ARDUINO_MKR_HEADER_A0 &adc 0>,
16+
<ARDUINO_MKR_HEADER_A1 &adc 10>,
17+
<ARDUINO_MKR_HEADER_A2 &adc 11>,
18+
<ARDUINO_MKR_HEADER_A3 &adc 4>,
19+
<ARDUINO_MKR_HEADER_A4 &adc 5>,
20+
<ARDUINO_MKR_HEADER_A5 &adc 6>,
21+
<ARDUINO_MKR_HEADER_A6 &adc 7>;
22+
};
23+
1024
zephyr,user {
1125
pwm-pin-gpios = <&arduino_mkr_header 2 0>,
1226
<&arduino_mkr_header 3 0>;
1327

14-
adc-pin-gpios = <&arduino_mkr_header 15 0>,
15-
<&arduino_mkr_header 16 0>,
16-
<&arduino_mkr_header 17 0>,
17-
<&arduino_mkr_header 18 0>,
18-
<&arduino_mkr_header 19 0>,
19-
<&arduino_mkr_header 20 0>,
20-
<&arduino_mkr_header 21 0>;
21-
2228
pwms = <&tcc0 2 255>,
2329
<&tcc0 3 255>;
2430

25-
io-channels = <&adc 0>,
26-
<&adc 10>,
27-
<&adc 11>,
28-
<&adc 4>,
29-
<&adc 5>,
30-
<&adc 6>,
31-
<&adc 7>;
32-
3331
gpio-ports = <&porta>, <&portb>;
3432
serials = <&sercom5>;
3533
i2cs = <&sercom0>;

variants/arduino_nano_33_ble_nrf52840/arduino_nano_33_ble_nrf52840.overlay

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
1+
#include <zephyr/dt-bindings/gpio/arduino-nano-header.h>
2+
13
/ {
4+
/* We’ll move it into the board’s DTS in the future. */
5+
arduino_adc: analog-connector {
6+
compatible = "arduino,uno-adc";
7+
#io-channel-cells = <1>;
8+
io-channel-map = <ARDUINO_NANO_HEADER_A0 &adc 2>,
9+
<ARDUINO_NANO_HEADER_A1 &adc 3>,
10+
<ARDUINO_NANO_HEADER_A2 &adc 6>,
11+
<ARDUINO_NANO_HEADER_A3 &adc 5>,
12+
<ARDUINO_NANO_HEADER_A4 &adc 7>,
13+
<ARDUINO_NANO_HEADER_A5 &adc 0>,
14+
<ARDUINO_NANO_HEADER_A6 &adc 4>,
15+
<ARDUINO_NANO_HEADER_A7 &adc 1>;
16+
};
17+
218
zephyr,user {
19+
builtin-led-gpios = <&arduino_nano_header 13 0>;
20+
321
pwm-pin-gpios = <&arduino_nano_header 3 0>,
422
<&arduino_nano_header 5 0>,
523
<&arduino_nano_header 6 0>,
@@ -8,17 +26,6 @@
826
<&arduino_nano_header 10 0>,
927
<&arduino_nano_header 11 0>;
1028

11-
adc-pin-gpios = <&arduino_nano_header 14 0>,
12-
<&arduino_nano_header 15 0>,
13-
<&arduino_nano_header 16 0>,
14-
<&arduino_nano_header 17 0>,
15-
<&arduino_nano_header 18 0>,
16-
<&arduino_nano_header 19 0>,
17-
<&arduino_nano_header 20 0>,
18-
<&arduino_nano_header 21 0>;
19-
20-
builtin-led-gpios = <&arduino_nano_header 13 0>;
21-
2229
pwms = <&pwm1 1 255 PWM_POLARITY_NORMAL>,
2330
<&pwm1 2 255 PWM_POLARITY_NORMAL>,
2431
<&pwm1 3 255 PWM_POLARITY_NORMAL>,
@@ -27,15 +34,6 @@
2734
<&pwm2 2 255 PWM_POLARITY_NORMAL>,
2835
<&pwm2 3 255 PWM_POLARITY_NORMAL>;
2936

30-
io-channels = <&adc 2>,
31-
<&adc 3>,
32-
<&adc 6>,
33-
<&adc 5>,
34-
<&adc 7>,
35-
<&adc 0>,
36-
<&adc 4>,
37-
<&adc 1>;
38-
3937
gpio-ports = <&gpio0>, <&gpio1>;
4038
serials = <&uart0>;
4139
i2cs = <&arduino_nano_i2c>;

variants/arduino_nano_33_ble_nrf52840_sense/arduino_nano_33_ble_nrf52840_sense.overlay

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
1+
#include <zephyr/dt-bindings/gpio/arduino-nano-header.h>
2+
13
/ {
4+
/* We’ll move it into the board’s DTS in the future. */
5+
arduino_adc: analog-connector {
6+
compatible = "arduino,uno-adc";
7+
#io-channel-cells = <1>;
8+
io-channel-map = <ARDUINO_NANO_HEADER_A0 &adc 2>,
9+
<ARDUINO_NANO_HEADER_A1 &adc 3>,
10+
<ARDUINO_NANO_HEADER_A2 &adc 6>,
11+
<ARDUINO_NANO_HEADER_A3 &adc 5>,
12+
<ARDUINO_NANO_HEADER_A4 &adc 7>,
13+
<ARDUINO_NANO_HEADER_A5 &adc 0>,
14+
<ARDUINO_NANO_HEADER_A6 &adc 4>,
15+
<ARDUINO_NANO_HEADER_A7 &adc 1>;
16+
};
17+
218
zephyr,user {
19+
builtin-led-gpios = <&arduino_nano_header 13 0>;
20+
321
pwm-pin-gpios = <&arduino_nano_header 3 0>,
422
<&arduino_nano_header 5 0>,
523
<&arduino_nano_header 6 0>,
@@ -8,17 +26,6 @@
826
<&arduino_nano_header 10 0>,
927
<&arduino_nano_header 11 0>;
1028

11-
adc-pin-gpios = <&arduino_nano_header 14 0>,
12-
<&arduino_nano_header 15 0>,
13-
<&arduino_nano_header 16 0>,
14-
<&arduino_nano_header 17 0>,
15-
<&arduino_nano_header 18 0>,
16-
<&arduino_nano_header 19 0>,
17-
<&arduino_nano_header 20 0>,
18-
<&arduino_nano_header 21 0>;
19-
20-
builtin-led-gpios = <&arduino_nano_header 13 0>;
21-
2229
pwms = <&pwm1 1 255 PWM_POLARITY_NORMAL>,
2330
<&pwm1 2 255 PWM_POLARITY_NORMAL>,
2431
<&pwm1 3 255 PWM_POLARITY_NORMAL>,
@@ -27,15 +34,6 @@
2734
<&pwm2 2 255 PWM_POLARITY_NORMAL>,
2835
<&pwm2 3 255 PWM_POLARITY_NORMAL>;
2936

30-
io-channels = <&adc 2>,
31-
<&adc 3>,
32-
<&adc 6>,
33-
<&adc 5>,
34-
<&adc 7>,
35-
<&adc 0>,
36-
<&adc 4>,
37-
<&adc 1>;
38-
3937
gpio-ports = <&gpio0>, <&gpio1>;
4038
serials = <&uart0>;
4139
i2cs = <&arduino_nano_i2c>;

variants/arduino_nano_33_iot_samd21g18a/arduino_nano_33_iot_samd21g18a.overlay

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
#include <zephyr/dt-bindings/adc/adc.h>
2+
#include <zephyr/dt-bindings/gpio/arduino-nano-header.h>
23

34
/ {
5+
/* We’ll move it into the board’s DTS in the future. */
6+
arduino_adc: analog-connector {
7+
compatible = "arduino,uno-adc";
8+
#io-channel-cells = <1>;
9+
io-channel-map = <ARDUINO_NANO_HEADER_A0 &adc 0>,
10+
<ARDUINO_NANO_HEADER_A1 &adc 10>,
11+
<ARDUINO_NANO_HEADER_A2 &adc 11>,
12+
<ARDUINO_NANO_HEADER_A3 &adc 4>,
13+
<ARDUINO_NANO_HEADER_A4 &adc 5>,
14+
<ARDUINO_NANO_HEADER_A5 &adc 6>,
15+
<ARDUINO_NANO_HEADER_A6 &adc 7>;
16+
};
17+
418
zephyr,user {
519
pwm-pin-gpios = <&arduino_nano_header 6 0>,
620
<&arduino_nano_header 5 0>,
@@ -11,15 +25,6 @@
1125
<&arduino_nano_header 9 0>,
1226
<&arduino_nano_header 10 0>;
1327

14-
adc-pin-gpios = <&arduino_nano_header 14 0>,
15-
<&arduino_nano_header 15 0>,
16-
<&arduino_nano_header 16 0>,
17-
<&arduino_nano_header 17 0>,
18-
<&arduino_nano_header 18 0>,
19-
<&arduino_nano_header 19 0>,
20-
<&arduino_nano_header 20 0>,
21-
<&arduino_nano_header 21 0>;
22-
2328
pwms = <&tcc0 0 255>,
2429
<&tcc0 1 255>,
2530
<&tcc0 2 255>,
@@ -29,14 +34,6 @@
2934
<&tcc0 6 255>,
3035
<&tcc0 7 255>;
3136

32-
io-channels = <&adc 0>,
33-
<&adc 10>,
34-
<&adc 11>,
35-
<&adc 4>,
36-
<&adc 5>,
37-
<&adc 6>,
38-
<&adc 7>;
39-
4037
gpio-ports = <&porta>, <&portb>;
4138
serials = <&sercom5>;
4239
i2cs = <&arduino_nano_i2c>;

variants/nrf52840dk_nrf52840/nrf52840dk_nrf52840.overlay

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,14 @@
1+
#include <zephyr/dt-bindings/gpio/arduino-header-r3.h>
2+
13
/ {
24
zephyr,user {
3-
adc-pin-gpios = <&arduino_header 0 0>,
4-
<&arduino_header 1 0>,
5-
<&arduino_header 2 0>,
6-
<&arduino_header 3 0>,
7-
<&arduino_header 4 0>,
8-
<&arduino_header 5 0>;
9-
105
pwms = <&pwm0 1 255 PWM_POLARITY_NORMAL>,
116
<&pwm0 2 255 PWM_POLARITY_NORMAL>,
127
<&pwm0 3 255 PWM_POLARITY_NORMAL>,
138
<&pwm1 0 255 PWM_POLARITY_NORMAL>,
149
<&pwm1 1 255 PWM_POLARITY_NORMAL>,
1510
<&pwm1 2 255 PWM_POLARITY_NORMAL>;
1611

17-
io-channels = <&arduino_adc 0>,
18-
<&arduino_adc 1>,
19-
<&arduino_adc 2>,
20-
<&arduino_adc 3>,
21-
<&arduino_adc 4>,
22-
<&arduino_adc 5>;
23-
2412
gpio-ports = <&gpio0>, <&gpio1>;
2513
};
2614
};

variants/nrf9160dk_nrf9160/nrf9160dk_nrf9160.overlay

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include <zephyr/dt-bindings/gpio/arduino-header-r3.h>
2+
13
/ {
24
zephyr,user {
35
pwm-pin-gpios =
@@ -9,14 +11,6 @@
911
<&arduino_header 16 0>,
1012
<&arduino_header 17 0>;
1113

12-
adc-pin-gpios =
13-
<&arduino_header 0 0>,
14-
<&arduino_header 1 0>,
15-
<&arduino_header 2 0>,
16-
<&arduino_header 3 0>,
17-
<&arduino_header 4 0>,
18-
<&arduino_header 5 0>;
19-
2014
pwms =
2115
<&pwm0 1 255 PWM_POLARITY_NORMAL>,
2216
<&pwm0 2 255 PWM_POLARITY_NORMAL>,
@@ -25,14 +19,6 @@
2519
<&pwm1 1 255 PWM_POLARITY_NORMAL>,
2620
<&pwm1 2 255 PWM_POLARITY_NORMAL>;
2721

28-
io-channels =
29-
<&arduino_adc 0>,
30-
<&arduino_adc 1>,
31-
<&arduino_adc 2>,
32-
<&arduino_adc 3>,
33-
<&arduino_adc 4>,
34-
<&arduino_adc 5>;
35-
3622
gpio-ports = <&gpio0>;
3723
};
3824
};

variants/rpi_pico_rp2040/rpi_pico_rp2040.overlay

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
#include <zephyr/dt-bindings/adc/adc.h>
88

99
/ {
10+
/* We’ll move it into the board’s DTS in the future. */
11+
arduino_adc: analog-connector {
12+
compatible = "arduino,uno-adc";
13+
#io-channel-cells = <1>;
14+
io-channel-map = <26 &adc 0>,
15+
<27 &adc 1>,
16+
<28 &adc 2>;
17+
};
18+
1019
zephyr,user {
1120
builtin-led-gpios = <&gpio0 25 0>;
1221

@@ -25,10 +34,6 @@
2534
<&pico_header 22 0>,
2635
<&gpio0 25 0>;
2736

28-
adc-pin-gpios = <&pico_header 26 0>,
29-
<&pico_header 27 0>,
30-
<&pico_header 28 0>;
31-
3237
pwms = <&pwm 2 255 PWM_POLARITY_NORMAL>,
3338
<&pwm 3 255 PWM_POLARITY_NORMAL>,
3439
<&pwm 7 255 PWM_POLARITY_NORMAL>,
@@ -44,10 +49,6 @@
4449
<&pwm 6 255 PWM_POLARITY_NORMAL>,
4550
<&pwm 9 255 PWM_POLARITY_NORMAL>;
4651

47-
io-channels = <&adc 0>,
48-
<&adc 1>,
49-
<&adc 2>;
50-
5152
gpio-ports = <&gpio0>;
5253
serials = <&pico_serial>;
5354
i2cs = <&pico_i2c0>;

0 commit comments

Comments
 (0)