Skip to main content
Graduate
October 31, 2025
Question

mickledore Yocto build issue due to patch "0001-v6.1-stm32mp-r2.patch" in meta-st-stm32mp layer

  • October 31, 2025
  • 2 replies
  • 209 views

Hello,

Thee kernel compilation fails with the yocto (mickeldore) due to patch "0001-v6.1-stm32mp-r2.patch". The issue is with this snippet of the patch:

@@ -3716,6 +3718,7 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq,
 hprt0 &= ~HPRT0_TSTCTL_MASK;
 hprt0 |= (windex >> 8) << HPRT0_TSTCTL_SHIFT;
 dwc2_writel(hsotg, hprt0, HPRT0);
+ hsotg->test_mode = windex >> 8;
 break;


Since "test_mode" is only available when CONFIG_USB_DWC2_PERIPHERAL and/or CONFIG_USB_DWC2_DUAL_ROLE are set, the build fails with the following configuration:

CONFIG_USB_DWC2_HOST=y

CONFIG_USB_DWC2_PERIPHERAL=n

CONFIG_USB_DWC2_DUAL_ROLE=n

This is a valid configuration. The patch should be amended as follows:

@@ -3715,7 +3717,14 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq,
 "SetPortFeature - USB_PORT_FEAT_TEST\n");
 hprt0 &= ~HPRT0_TSTCTL_MASK;
 hprt0 |= (windex >> 8) << HPRT0_TSTCTL_SHIFT;
- dwc2_writel(hsotg, hprt0, HPRT0);
+ dwc2_wriitel(hsotg, hprt0, HPRT0);
+ /* test mode is available only when DUAL_ROLE and/or
+ * PERIPHERAL are configured
+ */
+#if IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) || \
+ IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE)
+ hsotg->test_mode = windex >> 8;
+#endif /* CONFIG_USB_DWC2_PERIPHERAL || CONFIG_USB_DWC2_DUAL_ROLE */
 break;

Can the maintainers please fix the patch? Thanks.

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    November 6, 2025

    Hi @omniwiz 

     

    Thanks for the heads-up. We escalate the ticket to maintainer

    Anyway be aware that this version is close to end of maintenance period and so I advise you to rather upgrade to recent 6.1/scarthgap version

    Olivier 

    omniwizAuthor
    Graduate
    November 6, 2025

    Thank you, @Olivier GALLIEN !