Re: [PATCH 1/2] arm64: dts: imx8qm-ss-conn: add usbotg3 iommu information

From: Frank Li

Date: Wed Oct 28 2026 - 17:06:11 EST


On Wed, Oct 28, 2026 at 04:08:03PM -0400, Frank Li wrote:
> On Wed, Oct 28, 2026 at 08:44:21PM +0100, Emanuele Ghidoli wrote:
> >
> >
> > On 7/20/26 23:10, Frank.Li@xxxxxxxxxxx wrote:
> > > From: Frank Li <Frank.Li@xxxxxxx>
> > >
> > > Add usbotg3 iommu information.
> > >
> > > Signed-off-by: Frank Li <Frank.Li@xxxxxxx>
> > > ---
> > > arch/arm64/boot/dts/freescale/imx8qm-ss-conn.dtsi | 4 ++++
> > > 1 file changed, 4 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/freescale/imx8qm-ss-conn.dtsi b/arch/arm64/boot/dts/freescale/imx8qm-ss-conn.dtsi
> > > index ccf9f510e0f88..1370a571153a5 100644
> > > --- a/arch/arm64/boot/dts/freescale/imx8qm-ss-conn.dtsi
> > > +++ b/arch/arm64/boot/dts/freescale/imx8qm-ss-conn.dtsi
> > > @@ -32,3 +32,7 @@ &usdhc3 {
> > > compatible = "fsl,imx8qm-usdhc", "fsl,imx8qxp-usdhc", "fsl,imx7d-usdhc";
> > > iommus = <&smmu 0x11 0x7f80>;
> > > };
> > > +
> > > +&usbotg3_cdns3 {
> > > + iommus = <&smmu 0x4 0x7f80>;
> > > +};
> > >
> >
> > Hello Frank,
> >
> > this patch, now in mainline as 73c3b40e536d, breaks USB 3.0 on Apalis iMX8QM
> > (both on Ixora and on the Apalis Evaluation Board). Right after xHCI starts:
> >
> > xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed
> > xhci-hcd xhci-hcd.1.auto: WARNING: Host System Error
> > ...
> > xhci-hcd xhci-hcd.1.auto: xHCI host controller not responding, assume dead
> > xhci-hcd xhci-hcd.1.auto: HC died; cleaning up
> >
> > SuperSpeed devices no longer enumerate, and no SMMU fault is reported.
> > Reverting only this commit on top of current master fixes it. The other commit
> > seems fine.
>
> Does it only impact superspeed? High speed work?

Thank you report this problem. Suppose below patch should fix this problem.

I have not time to test it today.

diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c
index a18bb60f6f3df..7d485f5494ed8 100644
--- a/drivers/iommu/of_iommu.c
+++ b/drivers/iommu/of_iommu.c
@@ -117,6 +117,28 @@ int of_iommu_configure(struct device *dev, struct device_node *master_np,
bool dev_iommu_present;
int err;

+ /*
+ * If the device has no of_node (e.g. a synthetic platform device
+ * created by platform_device_alloc() such as xhci-hcd), walk up
+ * the parent device chain to find the nearest ancestor that has an
+ * of_node with an "iommus" property and use that node to configure
+ * the IOMMU for this device. This allows child devices that share
+ * the same IOMMU stream ID as their parent to be configured correctly
+ * even when they have no DT node of their own.
+ */
+ if (!master_np) {
+ struct device *parent = dev->parent;
+
+ while (parent) {
+ if (parent->of_node &&
+ of_property_present(parent->of_node, "iommus")) {
+ master_np = parent->of_node;
+ break;
+ }
+ parent = parent->parent;
+ }
+ }
+
if (!master_np)
return -ENODEV;

Frank

>
> Frank
> >
> > Adding the same property to the parent as well, like the NXP downstream tree
> > does, also fixes it:
> >
> > &usbotg3 {
> > iommus = <&smmu 0x4 0x7f80>;
> > };
> >
> > With that, SuperSpeed devices enumerate again.
> >
> > Could you please take care of a fix? Otherwise I think we should revert this
> > patch.
> >
> > #regzbot introduced: 73c3b40e536d
> >
> > Thanks,
> > Emanuele