public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>,
	Shawn Guo <shawnguo@kernel.org>, Sasha Levin <sashal@kernel.org>,
	leoyang.li@nxp.com, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org
Subject: [PATCH AUTOSEL 6.6 39/40] arm64: dts: ls208xa: use a pseudo-bus to constrain usb dma size
Date: Tue,  7 Nov 2023 07:16:41 -0500	[thread overview]
Message-ID: <20231107121837.3759358-39-sashal@kernel.org> (raw)
In-Reply-To: <20231107121837.3759358-1-sashal@kernel.org>

From: Laurentiu Tudor <laurentiu.tudor@nxp.com>

[ Upstream commit b39d5016456871a88f5cd141914a5043591b46f3 ]

Wrap the usb controllers in an intermediate simple-bus and use it to
constrain the dma address size of these usb controllers to the 40b
that they generate toward the interconnect. This is required because
the SoC uses 48b address sizes and this mismatch would lead to smmu
context faults [1] because the usb generates 40b addresses while the
smmu page tables are populated with 48b wide addresses.

[1]
xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
xhci-hcd xhci-hcd.0.auto: hcc params 0x0220f66d hci version 0x100 quirks 0x0000000002000010
xhci-hcd xhci-hcd.0.auto: irq 108, io mem 0x03100000
xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
arm-smmu 5000000.iommu: Unhandled context fault: fsr=0x402, iova=0xffffffb000, fsynr=0x0, cbfrsynra=0xc01, cb=3

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 .../arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 46 +++++++++++--------
 1 file changed, 27 insertions(+), 19 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
index d2f5345d05600..717288bbdb8b6 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
@@ -1186,26 +1186,34 @@ sata1: sata@3210000 {
 			dma-coherent;
 		};
 
-		usb0: usb@3100000 {
-			status = "disabled";
-			compatible = "snps,dwc3";
-			reg = <0x0 0x3100000 0x0 0x10000>;
-			interrupts = <0 80 0x4>; /* Level high type */
-			dr_mode = "host";
-			snps,quirk-frame-length-adjustment = <0x20>;
-			snps,dis_rxdet_inp3_quirk;
-			snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
-		};
+		bus: bus {
+			#address-cells = <2>;
+			#size-cells = <2>;
+			compatible = "simple-bus";
+			ranges;
+			dma-ranges = <0x0 0x0 0x0 0x0 0x100 0x00000000>;
+
+			usb0: usb@3100000 {
+				compatible = "snps,dwc3";
+				reg = <0x0 0x3100000 0x0 0x10000>;
+				interrupts = <0 80 0x4>; /* Level high type */
+				dr_mode = "host";
+				snps,quirk-frame-length-adjustment = <0x20>;
+				snps,dis_rxdet_inp3_quirk;
+				snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
+				status = "disabled";
+			};
 
-		usb1: usb@3110000 {
-			status = "disabled";
-			compatible = "snps,dwc3";
-			reg = <0x0 0x3110000 0x0 0x10000>;
-			interrupts = <0 81 0x4>; /* Level high type */
-			dr_mode = "host";
-			snps,quirk-frame-length-adjustment = <0x20>;
-			snps,dis_rxdet_inp3_quirk;
-			snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
+			usb1: usb@3110000 {
+				compatible = "snps,dwc3";
+				reg = <0x0 0x3110000 0x0 0x10000>;
+				interrupts = <0 81 0x4>; /* Level high type */
+				dr_mode = "host";
+				snps,quirk-frame-length-adjustment = <0x20>;
+				snps,dis_rxdet_inp3_quirk;
+				snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
+				status = "disabled";
+			};
 		};
 
 		ccn@4000000 {
-- 
2.42.0


  parent reply	other threads:[~2023-11-07 12:34 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-07 12:16 [PATCH AUTOSEL 6.6 01/40] drm/gma500: Fix call trace when psb_gem_mm_init() fails Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 02/40] drm/amdkfd: ratelimited SQ interrupt messages Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 03/40] drm/komeda: drop all currently held locks if deadlock happens Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 04/40] drm/amd/display: Blank phantom OTG before enabling Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 05/40] drm/amd/display: Don't lock phantom pipe on disabling Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 06/40] drm/amd/display: add seamless pipe topology transition check Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 07/40] drm/edid: Fixup h/vsync_end instead of h/vtotal Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 08/40] md: don't rely on 'mddev->pers' to be set in mddev_suspend() Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 09/40] drm/amdgpu: not to save bo in the case of RAS err_event_athub Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 10/40] drm/amdkfd: Fix a race condition of vram buffer unref in svm code Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 11/40] drm/amdgpu: update retry times for psp vmbx wait Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 12/40] drm/amd: Update `update_pcie_parameters` functions to use uint8_t arguments Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 13/40] drm/amd/display: use full update for clip size increase of large plane source Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 14/40] string.h: add array-wrappers for (v)memdup_user() Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 15/40] kernel: kexec: copy user-array safely Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 16/40] kernel: watch_queue: " Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 17/40] drm_lease.c: " Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 18/40] drm: vmwgfx_surface.c: " Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 19/40] drm/msm/dp: skip validity check for DP CTS EDID checksum Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 20/40] drm/amd: Fix UBSAN array-index-out-of-bounds for SMU7 Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 21/40] drm/radeon: Fix UBSAN array-index-out-of-bounds for Radeon HD 5430 Sasha Levin
2023-11-07 13:38   ` Alex Deucher
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 22/40] drm/amd: Fix UBSAN array-index-out-of-bounds for Polaris and Tonga Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 23/40] drm/amdgpu: Fix potential null pointer derefernce Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 24/40] drm/panel: fix a possible null pointer dereference Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 25/40] drm/panel/panel-tpo-tpg110: " Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 26/40] drm/radeon: " Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 27/40] drm/amdgpu/vkms: " Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 28/40] drm/panel: st7703: Pick different reset sequence Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 29/40] drm/amdkfd: Fix shift out-of-bounds issue Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 30/40] drm/amdgpu: Fix a null pointer access when the smc_rreg pointer is NULL Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 31/40] drm/amd: Disable PP_PCIE_DPM_MASK when dynamic speed switching not supported Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 32/40] drm/amd/display: fix num_ways overflow error Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 33/40] drm/amd: check num of link levels when update pcie param Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 34/40] arm64: dts: renesas: r8a779f0: spider: Enable PCIe Host ch0 Sasha Levin
2023-11-07 18:50   ` Geert Uytterhoeven
2023-11-16 17:58     ` Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 35/40] soc: qcom: pmic: Fix resource leaks in a device_for_each_child_node() loop Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 36/40] arm64: dts: rockchip: add PCIe to rk3588s-indiedroid-nova Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 37/40] arm64: dts: rockchip: add USB2 to rk3588s-indiedroid Sasha Levin
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 38/40] arm64: dts: rockchip: Add NanoPC T6 PCIe e-key support Sasha Levin
2023-11-07 12:16 ` Sasha Levin [this message]
2023-11-07 12:16 ` [PATCH AUTOSEL 6.6 40/40] selftests/efivarfs: create-read: fix a resource leak Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231107121837.3759358-39-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=laurentiu.tudor@nxp.com \
    --cc=leoyang.li@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox