Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: stm32: add adc support on stm32mp135f-dk

Configure ADC support on stm32mp135f-dk. ADC can be used for
USB Type-C CC1 & CC2 pins wired to in6 & in12.

Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>

authored by

Olivier Moysan and committed by
Alexandre Torgue
e46a180c ab2806dd

+25
+25
arch/arm/boot/dts/stm32mp135f-dk.dts
··· 76 76 }; 77 77 }; 78 78 79 + &adc_1 { 80 + pinctrl-names = "default"; 81 + pinctrl-0 = <&adc1_usb_cc_pins_a>; 82 + vdda-supply = <&vdd_adc>; 83 + vref-supply = <&vdd_adc>; 84 + status = "okay"; 85 + adc1: adc@0 { 86 + status = "okay"; 87 + /* 88 + * Type-C USB_PWR_CC1 & USB_PWR_CC2 on in6 & in12. 89 + * Use at least 5 * RC time, e.g. 5 * (Rp + Rd) * C: 90 + * 5 * (5.1 + 47kOhms) * 5pF => 1.3us. 91 + * Use arbitrary margin here (e.g. 5us). 92 + */ 93 + channel@6 { 94 + reg = <6>; 95 + st,min-sample-time-ns = <5000>; 96 + }; 97 + channel@12 { 98 + reg = <12>; 99 + st,min-sample-time-ns = <5000>; 100 + }; 101 + }; 102 + }; 103 + 79 104 &i2c1 { 80 105 pinctrl-names = "default", "sleep"; 81 106 pinctrl-0 = <&i2c1_pins_a>;