summaryrefslogtreecommitdiff
path: root/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi
diff options
context:
space:
mode:
authorPatrice Chotard <patrice.chotard@st.com>2019-02-12 16:50:41 +0100
committerPatrick Delaunay <patrick.delaunay@st.com>2019-04-12 16:09:13 +0200
commit77457fa94ebcf60f95a08d3ea7574035bff3bc93 (patch)
tree43e22434b77d46d5bdd3ba89e558a84a790a2377 /arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi
parent395f12976c87c59ec9836027687d395990a9f961 (diff)
ARM: dts: stm32mp1: Add adc nodes
Add adc related nodes. These nodes are used to detect the current supplied by USB type-C power in port on DK1 and DK2 boards. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Diffstat (limited to 'arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi')
-rw-r--r--arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi b/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi
index b4cfba0a38..af7acfa037 100644
--- a/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi
+++ b/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi
@@ -31,6 +31,27 @@
};
};
+&adc {
+ pinctrl-names = "default";
+ pinctrl-0 = <&adc12_usb_pwr_pins_a>;
+ vdd-supply = <&vdd>;
+ vdda-supply = <&vdd>;
+ vref-supply = <&vrefbuf>;
+ status = "okay";
+ adc1: adc@0 {
+ /*
+ * Type-C USB_PWR_CC1 & USB_PWR_CC2 on in18 & in19.
+ * Use at least 5 * RC time, e.g. 5 * (Rp + Rd) * C:
+ * 5 * (56 + 47kOhms) * 5pF => 2.5us.
+ * Use arbitrary margin here (e.g. 5µs).
+ */
+ st,min-sample-time-nsecs = <5000>;
+ /* ANA0, ANA1, USB Type-C CC1 & CC2 */
+ st,adc-channels = <0 1 18 19>;
+ status = "okay";
+ };
+};
+
&clk_hse {
st,digbypass;
};