Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp35228rwe; Wed, 24 Aug 2022 16:21:42 -0700 (PDT) X-Google-Smtp-Source: AA6agR4a89zsbO5almK2r/LkAAcTM9drSUU3PzDdkk+kWaGnGf2XuQSB2Wcy1jHtpoId1//OiW6E X-Received: by 2002:a62:e304:0:b0:536:bdec:5800 with SMTP id g4-20020a62e304000000b00536bdec5800mr1262124pfh.49.1661383301790; Wed, 24 Aug 2022 16:21:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661383301; cv=none; d=google.com; s=arc-20160816; b=wwoSuSSB9NSMXK9j5PlVAesBRB2A7aapWB9IqJ79rDJ2v/nYl50JwKVpL+jeKcfm0t 9PoSnRKk5sI+uZQNIxsnZjrFTu6E9SxGKrW7H9Qd6saEghrh2qlqYHWbZpcoliZpunXB 3a/Y4eabTM7TlPIBWy4wev0LONEgDDD81qH2wVqrR+0d6ts9sqUawMk+EDrGFU7G5auX pVYl1Qb9bsXYvT9JlRMhg4ffjLSfeoUAuORA+9ZFLWDwjTgcZHvHo15gFZ7TtymBcOIL ieNxeCC8f/Mq66+Q7jjnWIbPC3Eu+VCuvc2P1LMw6L8OP8FrY5X4WigyFZ0tPX3rmOdh +2gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=803KY9luNt4ClobPHHODgamIR7qZEgMFeMrruLADrPM=; b=CRhixdtHWsbw6U7NvrbKX8ufDqPOH5iPwyYxCbfoRpXchDDBOIib4wyk6G3u6VY98E 5/jKhsF5pK4aUqXiUf0Ge6YzvLKCCJZdG5F85I8sr3wHb8DnUIQm9sCOZDkdDWF9xSy4 86t2xmfQksALgIOic+SHbF+sXnsPP/ZE8TNk/e/RpGfLJHmkJZq/Mt0IurvYmaUW/f69 wRjF6oqJaF9grxpE+F8GxGTPplUC5aO0LTsPfdKnHr5XoFI5Ja/e8cMr2RPmHtAh9JHX CuccIApNKQ906wjuXowx8lCCgTY74x6mJ4aXsv306hEvVA+w3/UPTlBsJHL6nJVmYu4c ID5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 12-20020a170902c24c00b0016ee5e068d2si18001123plg.519.2022.08.24.16.21.31; Wed, 24 Aug 2022 16:21:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231604AbiHXXMk (ORCPT + 99 others); Wed, 24 Aug 2022 19:12:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231343AbiHXXM3 (ORCPT ); Wed, 24 Aug 2022 19:12:29 -0400 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E065880E87; Wed, 24 Aug 2022 16:12:20 -0700 (PDT) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 460221A1418; Thu, 25 Aug 2022 01:12:18 +0200 (CEST) Received: from smtp.na-rdc02.nxp.com (usphx01srsp001v.us-phx01.nxp.com [134.27.49.11]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id D35611A1404; Thu, 25 Aug 2022 01:12:17 +0200 (CEST) Received: from right.am.freescale.net (right.am.freescale.net [10.81.116.134]) by usphx01srsp001v.us-phx01.nxp.com (Postfix) with ESMTP id 6268740AA2; Wed, 24 Aug 2022 16:12:16 -0700 (MST) From: Li Yang To: shawnguo@kernel.org, devicetree@vger.kernel.org Cc: robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Laurentiu Tudor , Robin Murphy , Li Yang Subject: [PATCH 6/9] arm64: dts: ls1046a: use a pseudo-bus to constrain usb and sata dma size Date: Wed, 24 Aug 2022 18:11:57 -0500 Message-Id: <20220824231200.494-7-leoyang.li@nxp.com> X-Mailer: git-send-email 2.25.1.377.g2d2118b In-Reply-To: <20220824231200.494-1-leoyang.li@nxp.com> References: <20220824231200.494-1-leoyang.li@nxp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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-ls1046a.dtsi | 90 ++++++++++--------- 1 file changed, 49 insertions(+), 41 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi index 10b6c41570cc..c7c6c82626fd 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi @@ -711,47 +711,55 @@ QORIQ_CLK_PLL_DIV(2)>, QORIQ_CLK_PLL_DIV(2)>; }; - usb0: usb@2f00000 { - compatible = "snps,dwc3"; - reg = <0x0 0x2f00000 0x0 0x10000>; - interrupts = ; - dr_mode = "host"; - snps,quirk-frame-length-adjustment = <0x20>; - snps,dis_rxdet_inp3_quirk; - snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; - usb3-lpm-capable; - }; - - usb1: usb@3000000 { - compatible = "snps,dwc3"; - reg = <0x0 0x3000000 0x0 0x10000>; - interrupts = ; - dr_mode = "host"; - snps,quirk-frame-length-adjustment = <0x20>; - snps,dis_rxdet_inp3_quirk; - snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; - usb3-lpm-capable; - }; - - usb2: usb@3100000 { - compatible = "snps,dwc3"; - reg = <0x0 0x3100000 0x0 0x10000>; - interrupts = ; - dr_mode = "host"; - snps,quirk-frame-length-adjustment = <0x20>; - snps,dis_rxdet_inp3_quirk; - snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; - usb3-lpm-capable; - }; - - sata: sata@3200000 { - compatible = "fsl,ls1046a-ahci"; - reg = <0x0 0x3200000 0x0 0x10000>, - <0x0 0x20140520 0x0 0x4>; - reg-names = "ahci", "sata-ecc"; - interrupts = ; - clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL - QORIQ_CLK_PLL_DIV(2)>; + 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 = ; + dr_mode = "host"; + snps,quirk-frame-length-adjustment = <0x20>; + snps,dis_rxdet_inp3_quirk; + snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; + usb3-lpm-capable; + }; + + usb1: usb@3000000 { + compatible = "snps,dwc3"; + reg = <0x0 0x3000000 0x0 0x10000>; + interrupts = ; + dr_mode = "host"; + snps,quirk-frame-length-adjustment = <0x20>; + snps,dis_rxdet_inp3_quirk; + snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; + usb3-lpm-capable; + }; + + usb2: usb@3100000 { + compatible = "snps,dwc3"; + reg = <0x0 0x3100000 0x0 0x10000>; + interrupts = ; + dr_mode = "host"; + snps,quirk-frame-length-adjustment = <0x20>; + snps,dis_rxdet_inp3_quirk; + snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; + usb3-lpm-capable; + }; + + sata: sata@3200000 { + compatible = "fsl,ls1046a-ahci"; + reg = <0x0 0x3200000 0x0 0x10000>, + <0x0 0x20140520 0x0 0x4>; + reg-names = "ahci", "sata-ecc"; + interrupts = ; + clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL + QORIQ_CLK_PLL_DIV(2)>; + }; }; msi1: msi-controller@1580000 { -- 2.37.1