2019-11-15 05:46 AM
Hello ST community
I'm trying to configure the USB in OTG mode so I can upload linux to the NAND flash on my board (I'm using the STM32MP153AAC on a custom board).
Here's the output from the debug serial:
And here is dmesg on the host computer:
From what I can tell, stm32prog is being executed by U-Boot on the board with the arguments "stm32prog usb 0". This causes the stm32-usbphyc device driver to be probed (successfully), and as can be seen in the dmesg output on the host computer, a new USB device is detected, but it doesn't seem to be communicating properly. The error is "device descriptor read/64, error -110"
I've followed all of the guides I could find on how to configure the DT:
https://wiki.st.com/stm32mpu/wiki/OTG_device_tree_configuration
https://wiki.st.com/stm32mpu/wiki/USBPHYC_device_tree_configuration
I've made sure the correct voltage regulators are selected, I've compared my configuration to both the STM32MP157C-EV1 and STM32MP157C-DK2 boards, and I'm at a loss as to what this means.
Here's my top-level device tree:
The relevant section can be found at the very bottom:
&usbh_ehci{
status = "okay";
/* USER CODE BEGIN usbh_ehci */
phys = <&usbphyc_port0>;
phy-names = "usb";
vbus-supply = <&vbus_sw>;
/* USER CODE END usbh_ehci */
};
&usbh_ohci{
status = "okay";
/* USER CODE BEGIN usbh_ohci */
phys = <&usbphyc_port0>;
phy-names = "usb";
vbus-supply = <&vbus_sw>;
/* USER CODE END usbh_ohci */
};
&usbotg_hs{
pinctrl-names = "default"; /*, "sleep";*/
pinctrl-0 = <&usb_otg_hs_pins_mx>;
/*pinctrl-1 = <&usb_otg_hs_sleep_pins_mx>;*/
status = "okay";
/* USER CODE BEGIN usbotg_hs */
/*dr_mode = "peripheral";*/
phys = <&usbphyc_port1 0>;
phy-names = "usb2-phy";
vbus-supply = <&vbus_otg>;
/* USER CODE END usbotg_hs */
};
&usbphyc{
status = "okay";
/* USER CODE BEGIN usbphyc */
vdd3v3-supply = <&vdd>;
/* USER CODE END usbphyc */
};
&usbphyc_port0{
status = "okay";
/* USER CODE BEGIN usbphyc_port0 */
st,phy-tuning = <&usb_phy_tuning>;
/* USER CODE END usbphyc_port0 */
};
&usbphyc_port1{
status = "okay";
/* USER CODE BEGIN usbphyc_port1 */
st,phy-tuning = <&usb_phy_tuning>;
/* USER CODE END usbphyc_port1 */
};