2025-04-29 8:27 AM
Hello,
I notice that on stm32mp257f-ev1 board the USB_DRD port (CN15) is active only if USBPD_DRPSI_CM33_NonSecure_stripped.elf firmware is running. I need to run a different firmware on M33 while using the USB_DRD port. Searching in board's DT I found the following part:
&mlahb {
intc_rpmsg: interrupt-controller@1 {
compatible = "rpmsg,intc";
reg = <1 0>;
#interrupt-cells = <1>;
interrupt-controller;
status = "okay";
};
i2c_rpmsg: i2c@2 {
compatible = "rpmsg,i2c-controller";
reg = <2 0>;
rpmsg,dev-id = "rpmsg_i2c";
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
typec@35 {
compatible = "st,stm32mp25-typec";
reg = <0x35>;
interrupts-extended = <&intc_rpmsg 0>;
status = "okay";
connector {
compatible = "usb-c-connector";
label = "USB-C";
port {
typec_ep: endpoint {
remote-endpoint = <&dwc3_ep>;
};
};
};
};
};
};
So I'm thinking the point is that the typec@35 node is activated only when i2c_rpmesg is created running USBPD_DRPSI_CM33_NonSecure_stripped.elf. Is it possible to change this configuration?
Regards
Marco.
2025-04-30 7:11 AM
Hello @MBassi ,
You can force USB_DRD in "peripheral" mode (if it can match your use case). In this condition, the M33 firmware is not needed anymore, you can so remove the typec@35 node (I mean disable it) and apply the good configuration on the usb3dr node.
Other similar topic: https://community.st.com/t5/stm32-mpus-products/stm32mp257dak3-usb3dr-not-working-in-peripheral-mode-under-linux/m-p/798142
Kind regards,
Erwan.
2025-05-16 1:36 AM
Sorry for my late reply. Your solution works, but I read in the guide that force peripheral mode ignore vbus detection and is not compliant with USB specifications. So I tried to add vbus following the suggested guide OTG device tree configuration
I don't know exactly how to define the <&vbus_otg> node required by vbus-supply, I tried the following code changing <&vbus_otg> with <&vbus_5v> in the connector node, It compiles but doesn't work. Maybe I misunderstand something else in the guide?
Regards
Marco.
vbus_5v: vbus_5v {
compatible = "regulator-fixed";
regulator-name = "vbus-regulator";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-always-on;
};