Skip to content

Commit 5c25d2b

Browse files
committed
ARM: dts: at91-sama5d2_icp: add ADC node and it's pincontrol
Add the node for ADC and the corresponding pinctrl. Only channels 5,6,7 are available on this board as external pins. ADTRG is also available as external trigger. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
1 parent a00c940 commit 5c25d2b

1 file changed

Lines changed: 29 additions & 1 deletion

File tree

arch/arm/boot/dts/at91-sama5d2_icp.dts

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@
262262
lpm-gpios = <&pioBU 7 GPIO_ACTIVE_LOW>;
263263

264264
regulators {
265-
VDD_IO {
265+
vdd_io_reg: VDD_IO {
266266
regulator-name = "VDD_IO";
267267
regulator-min-microvolt = <1200000>;
268268
regulator-max-microvolt = <3700000>;
@@ -373,6 +373,14 @@
373373
};
374374
};
375375

376+
adc: adc@fc030000 {
377+
vddana-supply = <&vdd_io_reg>;
378+
vref-supply = <&vdd_io_reg>;
379+
pinctrl-names = "default";
380+
pinctrl-0 = <&pinctrl_adc_default &pinctrl_adtrg_default>;
381+
status = "okay";
382+
};
383+
376384
macb0: ethernet@f8008000 {
377385
status = "okay";
378386
pinctrl-names = "default";
@@ -414,6 +422,26 @@
414422
};
415423

416424
pinctrl@fc038000 {
425+
pinctrl_adc_default: adc_default {
426+
pinmux = <PIN_PD24__GPIO>,
427+
<PIN_PD25__GPIO>,
428+
<PIN_PD26__GPIO>;
429+
bias-disable;
430+
};
431+
/*
432+
* The ADTRG pin can work on any edge type.
433+
* In here it's being pulled up, so need to
434+
* connect it to ground to get an edge e.g.
435+
* Trigger can be configured on falling, rise
436+
* or any edge, and the pull-up can be changed
437+
* to pull-down or left floating according to
438+
* needs.
439+
*/
440+
pinctrl_adtrg_default: adtrg_default {
441+
pinmux = <PIN_PD31__ADTRG>;
442+
bias-pull-up;
443+
};
444+
417445
pinctrl_flx4_default: flx4_default {
418446
pinmux = <PIN_PC28__FLEXCOM4_IO0>,
419447
<PIN_PC29__FLEXCOM4_IO1>;

0 commit comments

Comments
 (0)