From nobody Thu Oct 2 10:55:21 2025 Received: from TWMBX01.aspeed.com (mail.aspeedtech.com [211.20.114.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 555312E5B1E; Thu, 18 Sep 2025 06:49:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.20.114.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758178172; cv=none; b=pd2eG6MKRhC8gClWGdhlg7yDi0JAGAzWby+ZxFPjsBT4qxv/ga+NGmSjhOhezbCufdrXYy/6VN9crjydcHHKRyAN7coczhHKBMs1ucsD6UaTTawvoMoeRq5G0OxNBVTb8URMSPnIv0goH9OZq/ZmkhPX/gpLMZcrCsqwQWTKKR0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758178172; c=relaxed/simple; bh=327s3SPTgg7bcd2NbQb1fQK1ScG/hbShdOnC7Um/L4Y=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=LF1GTRuxhVpZbp/7P+BhxewO3+zszcHdsYm4AAQP3+mRC/9iqGL3hA08GH2vMDOYwaQ/xYw/q7vdsOvi5G3puD7Npk7BMVQRFdFdBJw7TnwOgNBhTXW9pge8gsNTnBAD9Dn+V6knS1Qq4D5f5b6+qcK8EATEslXwnPSOnvmMpCc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com; spf=pass smtp.mailfrom=aspeedtech.com; arc=none smtp.client-ip=211.20.114.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aspeedtech.com Received: from TWMBX01.aspeed.com (192.168.0.62) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Thu, 18 Sep 2025 14:49:20 +0800 Received: from twmbx02.aspeed.com (192.168.10.13) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server id 15.2.1748.10 via Frontend Transport; Thu, 18 Sep 2025 14:49:19 +0800 From: Ryan Chen To: ryan_chen , Greg Kroah-Hartman , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley , "Alan Stern" , , , Subject: [PATCH 1/2] dt-bindings: usb: ehci: Add Aspeed AST2700 compatible Date: Thu, 18 Sep 2025 14:49:18 +0800 Message-ID: <20250918064919.224927-2-ryan_chen@aspeedtech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250918064919.224927-1-ryan_chen@aspeedtech.com> References: <20250918064919.224927-1-ryan_chen@aspeedtech.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add the compatible string for Aspeed AST2700 SoC. Signed-off-by: Ryan Chen Acked-by: Conor Dooley --- Documentation/devicetree/bindings/usb/generic-ehci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/generic-ehci.yaml b/Docu= mentation/devicetree/bindings/usb/generic-ehci.yaml index 508d958e698c..4e84bead0232 100644 --- a/Documentation/devicetree/bindings/usb/generic-ehci.yaml +++ b/Documentation/devicetree/bindings/usb/generic-ehci.yaml @@ -46,6 +46,7 @@ properties: - aspeed,ast2400-ehci - aspeed,ast2500-ehci - aspeed,ast2600-ehci + - aspeed,ast2700-ehci - brcm,bcm3384-ehci - brcm,bcm63268-ehci - brcm,bcm6328-ehci --=20 2.34.1 From nobody Thu Oct 2 10:55:21 2025 Received: from TWMBX01.aspeed.com (mail.aspeedtech.com [211.20.114.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9097E2E7651; Thu, 18 Sep 2025 06:49:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.20.114.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758178174; cv=none; b=Wih0Fqvut0XgapWPuUczzZ7NKLn7TDbCBdkmNJH2fak16bqJzWKI9YpPu0p9pZ0cR/16HylNXOd/8MyHfxOZ5MdMZDleWcXvgnlYmAkVuWvjert6nLBcHN009Tmd29HSTZMvS2PT1sGifpGoLaB5opJudQ/T46M5G3LD2oMnhx0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758178174; c=relaxed/simple; bh=9Eh/tQsW+3HEfoySbMTj71AIMcMtFp4eVvbvHsN2PqQ=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=gZJCMSJvZzcWVBwe4FDlCgw3Luama4hWoEi3VnDWzF0o0kKLeJE3cP78saoybNA40siWFB6NW5mI1bohIZI43stHpnkMRn058u0myvaoku99ycynMzA+qP1yWyNmINiX8hSKfOmhzMSTiUexj6xHmSp2DubX9exPcG2EWois9sA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com; spf=pass smtp.mailfrom=aspeedtech.com; arc=none smtp.client-ip=211.20.114.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aspeedtech.com Received: from TWMBX01.aspeed.com (192.168.0.62) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Thu, 18 Sep 2025 14:49:20 +0800 Received: from twmbx02.aspeed.com (192.168.10.13) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server id 15.2.1748.10 via Frontend Transport; Thu, 18 Sep 2025 14:49:20 +0800 From: Ryan Chen To: ryan_chen , Greg Kroah-Hartman , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley , "Alan Stern" , , , Subject: [PATCH 2/2] usb: ehci: Add Aspeed AST2700 support Date: Thu, 18 Sep 2025 14:49:19 +0800 Message-ID: <20250918064919.224927-3-ryan_chen@aspeedtech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250918064919.224927-1-ryan_chen@aspeedtech.com> References: <20250918064919.224927-1-ryan_chen@aspeedtech.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Unlike earlier Aspeed SoCs (AST2400/2500/2600) which are limited to 32-bit DMA addressing, the EHCI controller in AST2700 supports 64-bit DMA. Update the EHCI platform driver to make use of this capability by selecting a 64-bit DMA mask when the "aspeed,ast2700-ehci" compatible is present in device tree. Signed-off-by: Ryan Chen --- drivers/usb/host/ehci-platform.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platf= orm.c index 6aab45c8525c..edf1fb4033c2 100644 --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -122,10 +123,18 @@ static const struct ehci_driver_overrides platform_ov= errides __initconst =3D { .extra_priv_size =3D sizeof(struct ehci_platform_priv), }; =20 +#define EHCI_PDATA_COMMON \ + .power_on =3D ehci_platform_power_on, \ + .power_suspend =3D ehci_platform_power_off, \ + .power_off =3D ehci_platform_power_off + static struct usb_ehci_pdata ehci_platform_defaults =3D { - .power_on =3D ehci_platform_power_on, - .power_suspend =3D ehci_platform_power_off, - .power_off =3D ehci_platform_power_off, + EHCI_PDATA_COMMON, +}; + +static const struct usb_ehci_pdata ehci_ast2700_platform =3D { + EHCI_PDATA_COMMON, + .dma_mask_64 =3D 1, }; =20 /** @@ -239,6 +248,7 @@ static int ehci_platform_probe(struct platform_device *= dev) struct usb_hcd *hcd; struct resource *res_mem; struct usb_ehci_pdata *pdata =3D dev_get_platdata(&dev->dev); + const struct of_device_id *match; struct ehci_platform_priv *priv; struct ehci_hcd *ehci; int err, irq, clk =3D 0; @@ -250,7 +260,10 @@ static int ehci_platform_probe(struct platform_device = *dev) * Use reasonable defaults so platforms don't have to provide these * with DT probing on ARM. */ - if (!pdata) + match =3D of_match_device(dev->dev.driver->of_match_table, &dev->dev); + if (match && match->data) + pdata =3D (struct usb_ehci_pdata *)match->data; + else if (!pdata) pdata =3D &ehci_platform_defaults; =20 err =3D dma_coerce_mask_and_coherent(&dev->dev, @@ -298,7 +311,9 @@ static int ehci_platform_probe(struct platform_device *= dev) if (of_device_is_compatible(dev->dev.of_node, "aspeed,ast2500-ehci") || of_device_is_compatible(dev->dev.of_node, - "aspeed,ast2600-ehci")) + "aspeed,ast2600-ehci") || + of_device_is_compatible(dev->dev.of_node, + "aspeed,ast2700-ehci")) ehci->is_aspeed =3D 1; =20 if (soc_device_match(quirk_poll_match)) @@ -485,6 +500,7 @@ static const struct of_device_id vt8500_ehci_ids[] =3D { { .compatible =3D "wm,prizm-ehci", }, { .compatible =3D "generic-ehci", }, { .compatible =3D "cavium,octeon-6335-ehci", }, + { .compatible =3D "aspeed,ast2700-ehci", .data =3D &ehci_ast2700_platform= }, {} }; MODULE_DEVICE_TABLE(of, vt8500_ehci_ids); --=20 2.34.1