summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabrice Gasnier <fabrice.gasnier@foss.st.com>2022-10-14 16:15:08 +0200
committerAlexandre Torgue <alexandre.torgue@foss.st.com>2022-10-24 11:57:18 +0200
commit4f532403b1e5b379e4027448da715567a2b3ff57 (patch)
tree13fd3197d979e3f41858d3913241f238a5ab8165
parent44978e1359168ad0604235f0b36d7df7721ad85f (diff)
ARM: dts: stm32: enable USB OTG in dual role mode on stm32mp135f-dk
The USB OTG controller provides the USB data available on stm32mp135f-dk, on the Type-C connector. Data role is determined by "usb-role-switch". A STM32G0 provides the USB Type-C and Power Delivery connectivity. It controls dual role power and dual role data through UCSI protocol over I2C. It's wired on I2C1, with an interrupt pin on PI2 GPIO. Its firmware maybe updated over I2C, so use the optional firmware-name to enable firmware update. Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
-rw-r--r--arch/arm/boot/dts/stm32mp135f-dk.dts34
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/stm32mp135f-dk.dts b/arch/arm/boot/dts/stm32mp135f-dk.dts
index 364d2c86d546..b7bf36b802dc 100644
--- a/arch/arm/boot/dts/stm32mp135f-dk.dts
+++ b/arch/arm/boot/dts/stm32mp135f-dk.dts
@@ -128,6 +128,28 @@
/* spare dmas for other usage */
/delete-property/dmas;
/delete-property/dma-names;
+
+ typec@53 {
+ compatible = "st,stm32g0-typec";
+ reg = <0x53>;
+ /* Alert pin on PI2 */
+ interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
+ interrupt-parent = <&gpioi>;
+ /* Internal pull-up on PI2 */
+ pinctrl-names = "default";
+ pinctrl-0 = <&stm32g0_intn_pins_a>;
+ firmware-name = "stm32g0-ucsi.mp135f-dk.fw";
+ connector {
+ compatible = "usb-c-connector";
+ label = "USB-C";
+
+ port {
+ con_usb_c_g0_ep: endpoint {
+ remote-endpoint = <&usbotg_hs_ep>;
+ };
+ };
+ };
+ };
};
&i2c5 {
@@ -191,6 +213,18 @@
};
};
+&usbotg_hs {
+ phys = <&usbphyc_port1 0>;
+ phy-names = "usb2-phy";
+ usb-role-switch;
+ status = "okay";
+ port {
+ usbotg_hs_ep: endpoint {
+ remote-endpoint = <&con_usb_c_g0_ep>;
+ };
+ };
+};
+
&usbphyc {
status = "okay";
};