* Re: [PATCH 1/2] arm64: dts: imx8qm-ss-conn: add usbotg3 iommu information
[not found] ` <20260720-qm_smmu-v1-1-3689fbd8b516@nxp.com>
@ 2026-10-28 19:44 ` Emanuele Ghidoli
2026-10-28 20:08 ` Frank Li
0 siblings, 1 reply; 7+ messages in thread
From: Emanuele Ghidoli @ 2026-10-28 19:44 UTC (permalink / raw)
To: Frank.Li, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam
Cc: devicetree, imx, linux-arm-kernel, linux-kernel, Xu Yang,
Frank Li, regressions@lists.linux.dev, Francesco Dolcini
On 7/20/26 23:10, Frank.Li@oss.nxp.com wrote:
> From: Frank Li <Frank.Li@nxp.com>
>
> Add usbotg3 iommu information.
>
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
> 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.
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] arm64: dts: imx8qm-ss-conn: add usbotg3 iommu information
2026-10-28 19:44 ` [PATCH 1/2] arm64: dts: imx8qm-ss-conn: add usbotg3 iommu information Emanuele Ghidoli
@ 2026-10-28 20:08 ` Frank Li
2026-10-28 21:05 ` Frank Li
0 siblings, 1 reply; 7+ messages in thread
From: Frank Li @ 2026-10-28 20:08 UTC (permalink / raw)
To: Emanuele Ghidoli
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, devicetree, imx,
linux-arm-kernel, linux-kernel, Xu Yang, Frank Li,
regressions@lists.linux.dev, Francesco Dolcini
On Wed, Oct 28, 2026 at 08:44:21PM +0100, Emanuele Ghidoli wrote:
>
>
> On 7/20/26 23:10, Frank.Li@oss.nxp.com wrote:
> > From: Frank Li <Frank.Li@nxp.com>
> >
> > Add usbotg3 iommu information.
> >
> > Signed-off-by: Frank Li <Frank.Li@nxp.com>
> > ---
> > 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?
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] arm64: dts: imx8qm-ss-conn: add usbotg3 iommu information
2026-10-28 20:08 ` Frank Li
@ 2026-10-28 21:05 ` Frank Li
2026-10-29 6:55 ` Emanuele Ghidoli
0 siblings, 1 reply; 7+ messages in thread
From: Frank Li @ 2026-10-28 21:05 UTC (permalink / raw)
To: Emanuele Ghidoli
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, devicetree, imx,
linux-arm-kernel, linux-kernel, Xu Yang, Frank Li,
regressions@lists.linux.dev, Francesco Dolcini
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@oss.nxp.com wrote:
> > > From: Frank Li <Frank.Li@nxp.com>
> > >
> > > Add usbotg3 iommu information.
> > >
> > > Signed-off-by: Frank Li <Frank.Li@nxp.com>
> > > ---
> > > 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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] arm64: dts: imx8qm-ss-conn: add usbotg3 iommu information
2026-10-28 21:05 ` Frank Li
@ 2026-10-29 6:55 ` Emanuele Ghidoli
2026-10-30 17:09 ` Frank Li
0 siblings, 1 reply; 7+ messages in thread
From: Emanuele Ghidoli @ 2026-10-29 6:55 UTC (permalink / raw)
To: Frank Li
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, devicetree, imx,
linux-arm-kernel, linux-kernel, Xu Yang, Frank Li,
regressions@lists.linux.dev, Francesco Dolcini
On 10/28/26 22:05, Frank Li wrote:
> Does it only impact superspeed? High speed work?
No, it's not even enumerated, on the Dev board.
>
> Thank you report this problem. Suppose below patch should fix this problem.
>
> I have not time to test it today.
>
>
> Frank
Tested, it doesn't help.
xhci-hcd.1.auto has no fwnode, so platform_dma_configure() never calls
of_dma_configure() and the new code in of_iommu_configure() is never
reached.
Emanuele
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] arm64: dts: imx8qm-ss-conn: add usbotg3 iommu information
2026-10-29 6:55 ` Emanuele Ghidoli
@ 2026-10-30 17:09 ` Frank Li
2026-11-02 17:32 ` Emanuele Ghidoli
2026-11-03 2:05 ` Peng Fan
0 siblings, 2 replies; 7+ messages in thread
From: Frank Li @ 2026-10-30 17:09 UTC (permalink / raw)
To: Emanuele Ghidoli, Peng Fan (OSS)
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, devicetree, imx,
linux-arm-kernel, linux-kernel, Xu Yang, Frank Li,
regressions@lists.linux.dev, Francesco Dolcini
On Thu, Oct 29, 2026 at 07:55:41AM +0100, Emanuele Ghidoli wrote:
>
>
> On 10/28/26 22:05, Frank Li wrote:
> > Does it only impact superspeed? High speed work?
>
> No, it's not even enumerated, on the Dev board.
>
> >
> > Thank you report this problem. Suppose below patch should fix this problem.
> >
> > I have not time to test it today.
> >
> >
> > Frank
>
> Tested, it doesn't help.
>
> xhci-hcd.1.auto has no fwnode, so platform_dma_configure() never calls
> of_dma_configure() and the new code in of_iommu_configure() is never
> reached.
Finially, it is hack at uboot.
592: static int config_smmu_fdt_device_sid(void *blob, int device_offset, int sid)
601: prop = fdt_getprop(blob, device_offset, "fsl,sc_rsrc_id", &proplen);
618: ret = fdtdec_parse_phandle_with_args(blob, device_offset,
620: "power-domains", ...
578: err = sc_rm_set_master_sid(-1, rsrc, sid);
681: prop = fdt_getprop(blob, offset, "iommus", &proplen);
848: if (is_imx8qm()) { ret = config_smmu_fdt(blob);
Need combine power-domains with iommus.
diff --git a/arch/arm64/boot/dts/freescale/imx8-ss-conn.dtsi b/arch/arm64/boot/dts/freescale/imx8-ss-conn.dtsi
index 176e2e332f87c..cc2b9a212780f 100644
--- a/arch/arm64/boot/dts/freescale/imx8-ss-conn.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8-ss-conn.dtsi
@@ -189,6 +189,7 @@ usbotg3_cdns3: usb@5b120000 {
phys = <&usb3_phy>;
phy-names = "cdns3,usb3-phy";
cdns,on-chip-buff-size = /bits/ 16 <18>;
+ power-domains = <&pd IMX_SC_R_USB_2>;
status = "disabled";
};
};
Frank
>
> Emanuele
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] arm64: dts: imx8qm-ss-conn: add usbotg3 iommu information
2026-10-30 17:09 ` Frank Li
@ 2026-11-02 17:32 ` Emanuele Ghidoli
2026-11-03 2:05 ` Peng Fan
1 sibling, 0 replies; 7+ messages in thread
From: Emanuele Ghidoli @ 2026-11-02 17:32 UTC (permalink / raw)
To: Frank Li, Peng Fan (OSS)
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, devicetree, imx,
linux-arm-kernel, linux-kernel, Xu Yang, Frank Li,
regressions@lists.linux.dev, Francesco Dolcini
On 10/30/26 18:09, Frank Li wrote:
> On Thu, Oct 29, 2026 at 07:55:41AM +0100, Emanuele Ghidoli wrote:
>>
>>
>> On 10/28/26 22:05, Frank Li wrote:
>>> Does it only impact superspeed? High speed work?
>>
>> No, it's not even enumerated, on the Dev board.
>>
>>>
>>> Thank you report this problem. Suppose below patch should fix this problem.
>>>
>>> I have not time to test it today.
>>>
>>>
>>> Frank
>>
>> Tested, it doesn't help.
>>
>> xhci-hcd.1.auto has no fwnode, so platform_dma_configure() never calls
>> of_dma_configure() and the new code in of_iommu_configure() is never
>> reached.
>
> Finially, it is hack at uboot.
>
> 592: static int config_smmu_fdt_device_sid(void *blob, int device_offset, int sid)
> 601: prop = fdt_getprop(blob, device_offset, "fsl,sc_rsrc_id", &proplen);
> 618: ret = fdtdec_parse_phandle_with_args(blob, device_offset,
> 620: "power-domains", ...
> 578: err = sc_rm_set_master_sid(-1, rsrc, sid);
> 681: prop = fdt_getprop(blob, offset, "iommus", &proplen);
> 848: if (is_imx8qm()) { ret = config_smmu_fdt(blob);
>
>
> Need combine power-domains with iommus.
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8-ss-conn.dtsi b/arch/arm64/boot/dts/freescale/imx8-ss-conn.dtsi
> index 176e2e332f87c..cc2b9a212780f 100644
> --- a/arch/arm64/boot/dts/freescale/imx8-ss-conn.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8-ss-conn.dtsi
> @@ -189,6 +189,7 @@ usbotg3_cdns3: usb@5b120000 {
> phys = <&usb3_phy>;
> phy-names = "cdns3,usb3-phy";
> cdns,on-chip-buff-size = /bits/ 16 <18>;
> + power-domains = <&pd IMX_SC_R_USB_2>;
> status = "disabled";
> };
> };
>
> Frank
>
>>
>> Emanuele
Hi Frank,
this works. xHCI comes up fine and SuperSpeed devices enumerate again, with no
Host System Error and no SMMU faults. Tested on Apalis iMX8QM and iMX8QP on
Ixora carrier board.
A comment: imx8-ss-conn.dtsi is also included by i.MX8QXP and i.MX8DXL, which
have no SMMU. I get if we should put the property in imx8qm-ss-conn.dtsi, next
to the iommus property it goes with.
Thanks,
Emanuele
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] arm64: dts: imx8qm-ss-conn: add usbotg3 iommu information
2026-10-30 17:09 ` Frank Li
2026-11-02 17:32 ` Emanuele Ghidoli
@ 2026-11-03 2:05 ` Peng Fan
1 sibling, 0 replies; 7+ messages in thread
From: Peng Fan @ 2026-11-03 2:05 UTC (permalink / raw)
To: Frank Li
Cc: Emanuele Ghidoli, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, devicetree,
imx, linux-arm-kernel, linux-kernel, Xu Yang, Frank Li,
regressions@lists.linux.dev, Francesco Dolcini
On Fri, Oct 30, 2026 at 12:09:35PM -0500, Frank Li wrote:
>On Thu, Oct 29, 2026 at 07:55:41AM +0100, Emanuele Ghidoli wrote:
>>
>>
>> On 10/28/26 22:05, Frank Li wrote:
>> > Does it only impact superspeed? High speed work?
>>
>> No, it's not even enumerated, on the Dev board.
>>
>> >
>> > Thank you report this problem. Suppose below patch should fix this problem.
>> >
>> > I have not time to test it today.
>> >
>> >
>> > Frank
>>
>> Tested, it doesn't help.
>>
>> xhci-hcd.1.auto has no fwnode, so platform_dma_configure() never calls
>> of_dma_configure() and the new code in of_iommu_configure() is never
>> reached.
>
>Finially, it is hack at uboot.
>
>592: static int config_smmu_fdt_device_sid(void *blob, int device_offset, int sid)
>601: prop = fdt_getprop(blob, device_offset, "fsl,sc_rsrc_id", &proplen);
>618: ret = fdtdec_parse_phandle_with_args(blob, device_offset,
>620: "power-domains", ...
>578: err = sc_rm_set_master_sid(-1, rsrc, sid);
>681: prop = fdt_getprop(blob, offset, "iommus", &proplen);
>848: if (is_imx8qm()) { ret = config_smmu_fdt(blob);
>
>
>Need combine power-domains with iommus.
StreamID is not default programmed, so we did that in U-Boot.
If not do that in U-Boot, we may need to find a place to configure streamID
in kernel.
Regards
Peng
>
>diff --git a/arch/arm64/boot/dts/freescale/imx8-ss-conn.dtsi b/arch/arm64/boot/dts/freescale/imx8-ss-conn.dtsi
>index 176e2e332f87c..cc2b9a212780f 100644
>--- a/arch/arm64/boot/dts/freescale/imx8-ss-conn.dtsi
>+++ b/arch/arm64/boot/dts/freescale/imx8-ss-conn.dtsi
>@@ -189,6 +189,7 @@ usbotg3_cdns3: usb@5b120000 {
> phys = <&usb3_phy>;
> phy-names = "cdns3,usb3-phy";
> cdns,on-chip-buff-size = /bits/ 16 <18>;
>+ power-domains = <&pd IMX_SC_R_USB_2>;
> status = "disabled";
> };
> };
>
>Frank
>
>>
>> Emanuele
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-11-03 2:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260720-qm_smmu-v1-0-3689fbd8b516@nxp.com>
[not found] ` <20260720-qm_smmu-v1-1-3689fbd8b516@nxp.com>
2026-10-28 19:44 ` [PATCH 1/2] arm64: dts: imx8qm-ss-conn: add usbotg3 iommu information Emanuele Ghidoli
2026-10-28 20:08 ` Frank Li
2026-10-28 21:05 ` Frank Li
2026-10-29 6:55 ` Emanuele Ghidoli
2026-10-30 17:09 ` Frank Li
2026-11-02 17:32 ` Emanuele Ghidoli
2026-11-03 2:05 ` Peng Fan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox