From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F0428C6FA82 for ; Mon, 5 Sep 2022 01:49:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4X9bZCfgn+M+HzIcpPsHFmFbRZBIUVS2rcrIaMDQrA4=; b=lAokqOmC193gJs hJjNdGqXv+b/HRmNEOxvxbTuxgKzpl0c7MvkrFCYMG3vagZEdlq6bGkLoxgAQU2orVf3md/BRkm05 5COUHtkiSg2sUcL/EFOYShKkteAgJeOULpg1rnFoxyM24Id4LIdwCA3CIaxxjt5KT7JGDPa8amWlf vS7K8QcAuNeb7JAlOWR0soqRALYg+KCs5vnQL6tRY8PKx+f8LWyyblpR0U/a2ElQMi7TDM/Bl+mtn eTzCEESkh4Fo1MoEj7znY4nmnXmedp9ngANRrfLrIl747i0cxgRfa5FrLaLP/Zsf/KdEPWnQCjISX /U9USrL0kq9cs16lKKag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oV1D0-004vnZ-VI; Mon, 05 Sep 2022 01:47:32 +0000 Received: from desiato.infradead.org ([90.155.92.199]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oV0hq-003ksR-AT for linux-arm-kernel@bombadil.infradead.org; Mon, 05 Sep 2022 01:15:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=uKQzMukmfKtK8emiP07dvzWnEr/us5NMaksVHj9x/V0=; b=mrPmFVijdoEmWnB7VnB5eWL5Xb 1g6PzMsQSRCq5FshO9KBq2ZpKGhZK0hY/jJtnzdcGfe8Lnj9K33+UAc6Z1rZ4OBPWFfzoMgGPdJAT WTsgUbxzHk3BfCXOVcK5iI8ln3wHj5cQtEZBLsLS+5Ka4nARkqwy//rh/DXi+30Liw795JpQUioWN AzeFR6+cNIkvd2FThnqyzm8ISxqZ1zwyuC0aa8zapboa9GVgT+tLwWl1oCC1cdiCAHdLqwkMYTIRm de0Kli5aOdK2hFNk1yTW/dziHp/vAaMiXt/ggd148u/3GCIZaIv9S+ZUfrSeCCYWX34d/F7ScqrgB n9E2KLaQ==; Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oV0cK-009KI8-Rt for linux-arm-kernel@lists.infradead.org; Mon, 05 Sep 2022 01:09:40 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1662A60F3C; Mon, 5 Sep 2022 01:09:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E98A7C433C1; Mon, 5 Sep 2022 01:09:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662340167; bh=fAiEswLHsp8nl/7ncVB2cMMYuE6HK3WXb3iwGc/QnY8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=X86oYWvuuTviIA6Sne4N+5Tzoj1aDPaAfBgebfPo6i+atcW7KoQ3jfHelKT4dkHo0 trYtoCRkUu4Y2XhQpaxAtqh31b1hqIeqRHKn9gx2kx5mA9JZLJ1QtDy8w7CRdYwyuS 6sDbbjIXp0TWifKhVUvjmzR0fukwdB9cIT7DzNzQBjqzw2W5v02qTCQpvDx0uqLR3/ rMVJqq3r7+k303fDjGLCK/upAFJkIKdKWIkmuPyycgK3C+gkM5MQNSWirhFijFoCnF znER9wSHZBafmc9k2P25LfrPyml+0s8v780LoSYel7fqqKYtczxK3gktfuQw7B8KgH 6ayodvb4aV38g== Date: Mon, 5 Sep 2022 09:09:21 +0800 From: Shawn Guo To: Li Yang Cc: devicetree@vger.kernel.org, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Laurentiu Tudor , Robin Murphy Subject: Re: [PATCH 09/11] arm64: dts: ls1043a: use a pseudo-bus to constrain usb and sata dma size Message-ID: <20220905010921.GQ1728671@dragon> References: <20220824223700.32442-1-leoyang.li@nxp.com> <20220824223700.32442-10-leoyang.li@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220824223700.32442-10-leoyang.li@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220905_020937_892217_AF389AEF X-CRM114-Status: GOOD ( 18.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Aug 24, 2022 at 05:37:00PM -0500, Li Yang wrote: > From: Laurentiu Tudor > > Wrap the usb and sata controllers in an intermediate simple-bus and use > it to constrain the dma address size of these usb controllers to the 40 > bits that they generate toward the interconnect. This is required > because the SoC uses 48 bits address sizes and this mismatch would lead > to smmu context faults because the usb generates 40-bit addresses while > the smmu page tables are populated with 48-bit wide addresses. > > Suggested-by: Robin Murphy > Signed-off-by: Laurentiu Tudor > Signed-off-by: Li Yang > --- > .../arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 92 ++++++++++--------- > 1 file changed, 50 insertions(+), 42 deletions(-) > > diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi > index 20888aceb5f4..1942ab84ab1c 100644 > --- a/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi > +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi > @@ -815,51 +815,59 @@ QORIQ_CLK_PLL_DIV(1)>, > QORIQ_CLK_PLL_DIV(1)>; > }; > > - usb0: usb@2f00000 { > - compatible = "snps,dwc3"; > - reg = <0x0 0x2f00000 0x0 0x10000>; > - interrupts = <0 60 0x4>; > - dr_mode = "host"; > - snps,quirk-frame-length-adjustment = <0x20>; > - snps,dis_rxdet_inp3_quirk; > - usb3-lpm-capable; > - snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; > - status = "disabled"; > - }; > + aux_bus: aux_bus { > + #address-cells = <2>; > + #size-cells = <2>; > + compatible = "simple-bus"; > + ranges; > + dma-ranges = <0x0 0x0 0x0 0x0 0x100 0x00000000>; > + > + usb0: usb@2f00000 { > + compatible = "snps,dwc3"; > + reg = <0x0 0x2f00000 0x0 0x10000>; > + interrupts = <0 60 0x4>; While at it, use define for polarity cell? Shawn > + dr_mode = "host"; > + snps,quirk-frame-length-adjustment = <0x20>; > + snps,dis_rxdet_inp3_quirk; > + usb3-lpm-capable; > + snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; > + status = "disabled"; > + }; > > - usb1: usb@3000000 { > - compatible = "snps,dwc3"; > - reg = <0x0 0x3000000 0x0 0x10000>; > - interrupts = <0 61 0x4>; > - dr_mode = "host"; > - snps,quirk-frame-length-adjustment = <0x20>; > - snps,dis_rxdet_inp3_quirk; > - usb3-lpm-capable; > - snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; > - status = "disabled"; > - }; > + usb1: usb@3000000 { > + compatible = "snps,dwc3"; > + reg = <0x0 0x3000000 0x0 0x10000>; > + interrupts = <0 61 0x4>; > + dr_mode = "host"; > + snps,quirk-frame-length-adjustment = <0x20>; > + snps,dis_rxdet_inp3_quirk; > + usb3-lpm-capable; > + snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; > + status = "disabled"; > + }; > > - usb2: usb@3100000 { > - compatible = "snps,dwc3"; > - reg = <0x0 0x3100000 0x0 0x10000>; > - interrupts = <0 63 0x4>; > - dr_mode = "host"; > - snps,quirk-frame-length-adjustment = <0x20>; > - snps,dis_rxdet_inp3_quirk; > - usb3-lpm-capable; > - snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; > - status = "disabled"; > - }; > + usb2: usb@3100000 { > + compatible = "snps,dwc3"; > + reg = <0x0 0x3100000 0x0 0x10000>; > + interrupts = <0 63 0x4>; > + dr_mode = "host"; > + snps,quirk-frame-length-adjustment = <0x20>; > + snps,dis_rxdet_inp3_quirk; > + usb3-lpm-capable; > + snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; > + status = "disabled"; > + }; > > - sata: sata@3200000 { > - compatible = "fsl,ls1043a-ahci"; > - reg = <0x0 0x3200000 0x0 0x10000>, > - <0x0 0x20140520 0x0 0x4>; > - reg-names = "ahci", "sata-ecc"; > - interrupts = <0 69 0x4>; > - clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL > - QORIQ_CLK_PLL_DIV(1)>; > - dma-coherent; > + sata: sata@3200000 { > + compatible = "fsl,ls1043a-ahci"; > + reg = <0x0 0x3200000 0x0 0x10000>, > + <0x0 0x20140520 0x0 0x4>; > + reg-names = "ahci", "sata-ecc"; > + interrupts = <0 69 0x4>; > + clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL > + QORIQ_CLK_PLL_DIV(1)>; > + dma-coherent; > + }; > }; > > msi1: msi-controller1@1571000 { > -- > 2.37.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel