aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Moysan <[email protected]>2022-10-12 16:22:05 +0200
committerAlexandre Torgue <[email protected]>2022-10-24 11:11:38 +0200
commite46a180c060f5a025aee783ef10bcb95b767f6f8 (patch)
treeea741b6e4415cb9d0dff3a2e457f9a0066f88453
parentab2806ddad9d94e449f962a15035846c80f89738 (diff)
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 <[email protected]> Signed-off-by: Alexandre Torgue <[email protected]>
-rw-r--r--arch/arm/boot/dts/stm32mp135f-dk.dts25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/stm32mp135f-dk.dts b/arch/arm/boot/dts/stm32mp135f-dk.dts
index c1c4b5ac8128..a87ab067c955 100644
--- a/arch/arm/boot/dts/stm32mp135f-dk.dts
+++ b/arch/arm/boot/dts/stm32mp135f-dk.dts
@@ -76,6 +76,31 @@
};
};
+&adc_1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&adc1_usb_cc_pins_a>;
+ vdda-supply = <&vdd_adc>;
+ vref-supply = <&vdd_adc>;
+ status = "okay";
+ adc1: adc@0 {
+ status = "okay";
+ /*
+ * Type-C USB_PWR_CC1 & USB_PWR_CC2 on in6 & in12.
+ * Use at least 5 * RC time, e.g. 5 * (Rp + Rd) * C:
+ * 5 * (5.1 + 47kOhms) * 5pF => 1.3us.
+ * Use arbitrary margin here (e.g. 5us).
+ */
+ channel@6 {
+ reg = <6>;
+ st,min-sample-time-ns = <5000>;
+ };
+ channel@12 {
+ reg = <12>;
+ st,min-sample-time-ns = <5000>;
+ };
+ };
+};
+
&i2c1 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&i2c1_pins_a>;