Skip to content

Commit b061645

Browse files
soburiDhruvaG2000
authored andcommitted
variants: Apply GPIO cell based PWM and ADC node configuration
Signed-off-by: TOKITA Hiroshi <[email protected]>
1 parent 453d857 commit b061645

File tree

5 files changed

+82
-14
lines changed

5 files changed

+82
-14
lines changed

Diff for: variants/arduino_mkrzero/arduino_mkrzero.overlay

+11-2
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,19 @@
3232
<&arduino_mkr_header 21 0>,
3333
<&portb 8 0>;
3434

35+
pwm-pin-gpios = <&arduino_mkr_header 2 0>,
36+
<&arduino_mkr_header 3 0>;
37+
38+
adc-pin-gpios = <&arduino_mkr_header 15 0>,
39+
<&arduino_mkr_header 16 0>,
40+
<&arduino_mkr_header 17 0>,
41+
<&arduino_mkr_header 18 0>,
42+
<&arduino_mkr_header 19 0>,
43+
<&arduino_mkr_header 20 0>,
44+
<&arduino_mkr_header 21 0>;
45+
3546
pwms = <&tcc0 2 255>,
3647
<&tcc0 3 255>;
37-
pwm-pins = <2 3>;
3848

3949
io-channels = <&adc 0>,
4050
<&adc 10>,
@@ -43,7 +53,6 @@
4353
<&adc 5>,
4454
<&adc 6>,
4555
<&adc 7>;
46-
io-channel-pins = <15 16 17 18 19 20 21>;
4756

4857
serials = <&sercom5>;
4958
i2cs = <&sercom0>;

Diff for: variants/arduino_nano_33_ble/arduino_nano_33_ble.overlay

+19-4
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,32 @@
2323
<&arduino_nano_header 20 0>,
2424
<&arduino_nano_header 21 0>;
2525

26+
pwm-pin-gpios = <&arduino_nano_header 3 0>,
27+
<&arduino_nano_header 5 0>,
28+
<&arduino_nano_header 6 0>,
29+
<&arduino_nano_header 13 0>,
30+
<&arduino_nano_header 9 0>,
31+
<&arduino_nano_header 10 0>,
32+
<&arduino_nano_header 11 0>;
33+
34+
adc-pin-gpios = <&arduino_nano_header 14 0>,
35+
<&arduino_nano_header 15 0>,
36+
<&arduino_nano_header 16 0>,
37+
<&arduino_nano_header 17 0>,
38+
<&arduino_nano_header 18 0>,
39+
<&arduino_nano_header 19 0>,
40+
<&arduino_nano_header 20 0>,
41+
<&arduino_nano_header 21 0>;
42+
43+
builtin-led-gpios = <&arduino_nano_header 13 0>;
44+
2645
pwms = <&pwm1 1 255 PWM_POLARITY_NORMAL>,
2746
<&pwm1 2 255 PWM_POLARITY_NORMAL>,
2847
<&pwm1 3 255 PWM_POLARITY_NORMAL>,
2948
<&pwm2 0 255 PWM_POLARITY_NORMAL>,
3049
<&pwm2 1 255 PWM_POLARITY_NORMAL>,
3150
<&pwm2 2 255 PWM_POLARITY_NORMAL>,
3251
<&pwm2 3 255 PWM_POLARITY_NORMAL>;
33-
pwm-pins = <3 5 6 13 9 10 11>;
3452

3553
io-channels = <&adc 2>,
3654
<&adc 3>,
@@ -40,12 +58,9 @@
4058
<&adc 0>,
4159
<&adc 4>,
4260
<&adc 1>;
43-
io-channel-pins = <14 15 16 17 18 19 20 21>;
4461

4562
serials = <&uart0>;
4663
i2cs = <&arduino_nano_i2c>;
47-
48-
builtin-led-gpios = <&arduino_nano_header 13 0>;
4964
};
5065
};
5166

Diff for: variants/arduino_nano_33_ble_sense/arduino_nano_33_ble_sense.overlay

+19-4
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,32 @@
2323
<&arduino_nano_header 20 0>,
2424
<&arduino_nano_header 21 0>;
2525

26+
pwm-pin-gpios = <&arduino_nano_header 3 0>,
27+
<&arduino_nano_header 5 0>,
28+
<&arduino_nano_header 6 0>,
29+
<&arduino_nano_header 13 0>,
30+
<&arduino_nano_header 9 0>,
31+
<&arduino_nano_header 10 0>,
32+
<&arduino_nano_header 11 0>;
33+
34+
adc-pin-gpios = <&arduino_nano_header 14 0>,
35+
<&arduino_nano_header 15 0>,
36+
<&arduino_nano_header 16 0>,
37+
<&arduino_nano_header 17 0>,
38+
<&arduino_nano_header 18 0>,
39+
<&arduino_nano_header 19 0>,
40+
<&arduino_nano_header 20 0>,
41+
<&arduino_nano_header 21 0>;
42+
43+
builtin-led-gpios = <&arduino_nano_header 13 0>;
44+
2645
pwms = <&pwm1 1 255 PWM_POLARITY_NORMAL>,
2746
<&pwm1 2 255 PWM_POLARITY_NORMAL>,
2847
<&pwm1 3 255 PWM_POLARITY_NORMAL>,
2948
<&pwm2 0 255 PWM_POLARITY_NORMAL>,
3049
<&pwm2 1 255 PWM_POLARITY_NORMAL>,
3150
<&pwm2 2 255 PWM_POLARITY_NORMAL>,
3251
<&pwm2 3 255 PWM_POLARITY_NORMAL>;
33-
pwm-pins = <3 5 6 13 9 10 11>;
3452

3553
io-channels = <&adc 2>,
3654
<&adc 3>,
@@ -40,12 +58,9 @@
4058
<&adc 0>,
4159
<&adc 4>,
4260
<&adc 1>;
43-
io-channel-pins = <14 15 16 17 18 19 20 21>;
4461

4562
serials = <&uart0>;
4663
i2cs = <&arduino_nano_i2c>;
47-
48-
builtin-led-gpios = <&arduino_nano_header 13 0>;
4964
};
5065
};
5166

Diff for: variants/arduino_nano_33_iot/arduino_nano_33_iot.overlay

+18-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,24 @@
2525
<&arduino_nano_header 20 0>,
2626
<&arduino_nano_header 21 0>;
2727

28+
pwm-pin-gpios = <&arduino_nano_header 6 0>,
29+
<&arduino_nano_header 5 0>,
30+
<&arduino_nano_header 17 0>,
31+
<&arduino_nano_header 12 0>,
32+
<&arduino_nano_header 2 0>,
33+
<&arduino_nano_header 3 0>,
34+
<&arduino_nano_header 9 0>,
35+
<&arduino_nano_header 10 0>;
36+
37+
adc-pin-gpios = <&arduino_nano_header 14 0>,
38+
<&arduino_nano_header 15 0>,
39+
<&arduino_nano_header 16 0>,
40+
<&arduino_nano_header 17 0>,
41+
<&arduino_nano_header 18 0>,
42+
<&arduino_nano_header 19 0>,
43+
<&arduino_nano_header 20 0>,
44+
<&arduino_nano_header 21 0>;
45+
2846
pwms = <&tcc0 0 255>,
2947
<&tcc0 1 255>,
3048
<&tcc0 2 255>,
@@ -33,7 +51,6 @@
3351
<&tcc0 5 255>,
3452
<&tcc0 6 255>,
3553
<&tcc0 7 255>;
36-
pwm-pins = <6 5 17 12 2 3 9 10>;
3754

3855
io-channels = <&adc 0>,
3956
<&adc 10>,
@@ -42,7 +59,6 @@
4259
<&adc 5>,
4360
<&adc 6>,
4461
<&adc 7>;
45-
io-channel-pins = <14 15 16 17 18 19 20 21>;
4662

4763
serials = <&sercom5>;
4864
i2cs = <&arduino_nano_i2c>;

Diff for: variants/nrf52840dk_nrf52840/nrf52840dk_nrf52840.overlay

+15-2
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,34 @@
2424
<&arduino_header 5 0>,
2525
<&gpio0 13 GPIO_ACTIVE_LOW>;
2626

27+
pwm-pin-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>,
28+
<&arduino_header 9 0>,
29+
<&arduino_header 11 0>,
30+
<&arduino_header 12 0>,
31+
<&arduino_header 15 0>,
32+
<&arduino_header 16 0>,
33+
<&arduino_header 17 0>;
34+
35+
adc-pin-gpios = <&arduino_header 0 0>,
36+
<&arduino_header 1 0>,
37+
<&arduino_header 2 0>,
38+
<&arduino_header 3 0>,
39+
<&arduino_header 4 0>,
40+
<&arduino_header 5 0>;
41+
2742
pwms = <&pwm0 1 255 PWM_POLARITY_NORMAL>,
2843
<&pwm0 2 255 PWM_POLARITY_NORMAL>,
2944
<&pwm0 3 255 PWM_POLARITY_NORMAL>,
3045
<&pwm1 0 255 PWM_POLARITY_NORMAL>,
3146
<&pwm1 1 255 PWM_POLARITY_NORMAL>,
3247
<&pwm1 2 255 PWM_POLARITY_NORMAL>;
33-
pwm-pins = <22 3 5 6 9 10 11>;
3448

3549
io-channels = <&arduino_adc 0>,
3650
<&arduino_adc 1>,
3751
<&arduino_adc 2>,
3852
<&arduino_adc 3>,
3953
<&arduino_adc 4>,
4054
<&arduino_adc 5>;
41-
io-channel-pins = <16 17 18 19 20 21>;
4255
};
4356
};
4457

0 commit comments

Comments
 (0)