From nobody Thu Oct 2 05:06:28 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 40BEF2192EE; Mon, 22 Sep 2025 05:20:55 +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=1758518456; cv=none; b=s8ou4lJv9F/IPs/8iARZi7+MSbkQydfWP/tDby2upKMGAgqhDTnr81b7G3UzSNHLxGaBkTrZIBh3XtXqMUUbrNcLaakJPc8+Nn0BhWNNvdU/X6Skuncz2s5UpSRty/9GUGN5kNH9BKIb4oGabTR+mVIq4q3LIBvP88zMGZpNfw0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758518456; c=relaxed/simple; bh=qCMpKNEwmFFQntyUxe04ONnLaz0OBcgXO5q4kCOIInU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=hWU+RAyXFByUiFooQRWPLpsQb9IIYf6p7oG5j+votK3cFZkuxREI/qHfEWRrrhoH7ZQoPK8B64Ur6X4gWdmqid1dWXJcS+pGxeUS1gotENluYcv5byPQisehY5rap9osljG1D1lJE8/ygwqD6QU7m87tL9ONzb2cUk2sIY/uff0= 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; Mon, 22 Sep 2025 13:20:45 +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; Mon, 22 Sep 2025 13:20:45 +0800 From: Ryan Chen To: ryan_chen , Greg Kroah-Hartman , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley , "Alan Stern" , Philipp Zabel , , , CC: Conor Dooley Subject: [PATCH v4 1/4] dt-bindings: usb: uhci: Add reset property Date: Mon, 22 Sep 2025 13:20:42 +0800 Message-ID: <20250922052045.2421480-2-ryan_chen@aspeedtech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250922052045.2421480-1-ryan_chen@aspeedtech.com> References: <20250922052045.2421480-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" The UHCI controller on Aspeed SoCs (including AST2700) requires its reset line to be deasserted before the controller can be used. Add an optional "resets" property to the UHCI device tree bindings to describe the phandle to the reset controller. This property is optional for platforms which do not require explicit reset handling. Signed-off-by: Ryan Chen Acked-by: Conor Dooley Reviewed-by: Alan Stern --- Documentation/devicetree/bindings/usb/usb-uhci.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/usb-uhci.yaml b/Document= ation/devicetree/bindings/usb/usb-uhci.yaml index d8336f72dc1f..b1f2b9bd7921 100644 --- a/Documentation/devicetree/bindings/usb/usb-uhci.yaml +++ b/Documentation/devicetree/bindings/usb/usb-uhci.yaml @@ -28,6 +28,9 @@ properties: interrupts: maxItems: 1 =20 + resets: + maxItems: 1 + '#ports': $ref: /schemas/types.yaml#/definitions/uint32 =20 --=20 2.34.1 From nobody Thu Oct 2 05:06:28 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 2760122FE18; Mon, 22 Sep 2025 05:20:57 +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=1758518459; cv=none; b=TgPPNlkQQpAQPU7Ozdzc63w3JWvB1xYSX8nKICAZKYj5URSLx7yAGFo7kJeca5AuHtEcTrDLe2kiEMnW1BV4kqjxDMmIww1/WnIh9k7PDm3VecMQiPYGLezpV9Z38nl60UX7+hUbCFSn+JnPjO4hgHNYmcsWz3IsfSlf0lzE1gU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758518459; c=relaxed/simple; bh=rrTK1bW6XDEyLEiyqC1guI+ZwAFBC6kekLo1DNQcmwQ=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=E9qlyujhqaXTDt/YN8CNYmsJq6X5+xghxMUoZAW/7bzIwAY5tTEmrq2q7lyorhs9pJmOc9AgLZze3SO0MhNQrHyNQ0DQGBb7Dst7Vlvcyykyefr0ZZfVQ3tltGswVnycJvW1GVUGa8Rtz6czZ7Slq+ZLi865vyLUU7b5wMP7JZo= 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; Mon, 22 Sep 2025 13:20:45 +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; Mon, 22 Sep 2025 13:20:45 +0800 From: Ryan Chen To: ryan_chen , Greg Kroah-Hartman , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley , "Alan Stern" , Philipp Zabel , , , Subject: [PATCH v4 2/4] usb: uhci: Add reset control support Date: Mon, 22 Sep 2025 13:20:43 +0800 Message-ID: <20250922052045.2421480-3-ryan_chen@aspeedtech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250922052045.2421480-1-ryan_chen@aspeedtech.com> References: <20250922052045.2421480-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" Some SoCs, such as the Aspeed AST2700, require the UHCI controller to be taken out of reset before it can operate. Add optional reset control support to the UHCI platform driver. The driver now acquires an optional reset line from device tree, deasserts it during probe, and asserts it again in the error path and shutdown. Signed-off-by: Ryan Chen Reviewed-by: Alan Stern --- drivers/usb/host/uhci-hcd.h | 1 + drivers/usb/host/uhci-platform.c | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/uhci-hcd.h b/drivers/usb/host/uhci-hcd.h index 13ee2a6144b2..4326d1f3ca76 100644 --- a/drivers/usb/host/uhci-hcd.h +++ b/drivers/usb/host/uhci-hcd.h @@ -445,6 +445,7 @@ struct uhci_hcd { short load[MAX_PHASE]; /* Periodic allocations */ =20 struct clk *clk; /* (optional) clock source */ + struct reset_control *rsts; /* (optional) clock reset */ =20 /* Reset host controller */ void (*reset_hc) (struct uhci_hcd *uhci); diff --git a/drivers/usb/host/uhci-platform.c b/drivers/usb/host/uhci-platf= orm.c index 62318291f566..aa75b546672b 100644 --- a/drivers/usb/host/uhci-platform.c +++ b/drivers/usb/host/uhci-platform.c @@ -11,6 +11,7 @@ #include #include #include +#include =20 static int uhci_platform_init(struct usb_hcd *hcd) { @@ -132,17 +133,28 @@ static int uhci_hcd_platform_probe(struct platform_de= vice *pdev) goto err_rmr; } =20 + uhci->rsts =3D devm_reset_control_array_get_optional_shared(&pdev->dev); + if (IS_ERR(uhci->rsts)) { + ret =3D PTR_ERR(uhci->rsts); + goto err_clk; + } + ret =3D reset_control_deassert(uhci->rsts); + if (ret) + goto err_clk; + ret =3D platform_get_irq(pdev, 0); if (ret < 0) - goto err_clk; + goto err_reset; =20 ret =3D usb_add_hcd(hcd, ret, IRQF_SHARED); if (ret) - goto err_clk; + goto err_reset; =20 device_wakeup_enable(hcd->self.controller); return 0; =20 +err_reset: + reset_control_assert(uhci->rsts); err_clk: clk_disable_unprepare(uhci->clk); err_rmr: @@ -156,6 +168,7 @@ static void uhci_hcd_platform_remove(struct platform_de= vice *pdev) struct usb_hcd *hcd =3D platform_get_drvdata(pdev); struct uhci_hcd *uhci =3D hcd_to_uhci(hcd); =20 + reset_control_assert(uhci->rsts); clk_disable_unprepare(uhci->clk); usb_remove_hcd(hcd); usb_put_hcd(hcd); --=20 2.34.1 From nobody Thu Oct 2 05:06:28 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 9E3ED24502C; Mon, 22 Sep 2025 05:20:59 +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=1758518461; cv=none; b=us94kf0TlEjJKT3DrSrtQ0J9diFWu2SpLJP9LXymln42SUr/RaG/j9ihq3uUGUBKafVu4bH9Ra/kfB2JSLSVrPcekItv+Z1C3lswUg6gtJIWpyZ6KK0EFvbRQntUo1apLSlxQaFDV/tsFkYKUQJHUneZ3Voubj5tIXYgPVXfdw4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758518461; c=relaxed/simple; bh=cYyOi5dfb9FKGCiBDWVIh/b5XjShpTjKunZT94xkkYU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=UrVwVYG5Ac0UeqLMmLY5ixRRdPL0zrFxSLpzNNN/yKQc/6z9HL0kOXdsjq36TB9mx4aaWQe9sn6UVWFeaf8qDsM/QydPRMMgtvavMw6WPb2PikRVnGgqoEptOPIvuEqqN65nsFE45QEvbXSCTw4QX7xTOXZKaMZuA5gsvNxUc2Q= 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; Mon, 22 Sep 2025 13:20:45 +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; Mon, 22 Sep 2025 13:20:45 +0800 From: Ryan Chen To: ryan_chen , Greg Kroah-Hartman , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley , "Alan Stern" , Philipp Zabel , , , CC: Conor Dooley Subject: [PATCH v4 3/4] dt-bindings: usb: uhci: Add Aspeed AST2700 compatible Date: Mon, 22 Sep 2025 13:20:44 +0800 Message-ID: <20250922052045.2421480-4-ryan_chen@aspeedtech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250922052045.2421480-1-ryan_chen@aspeedtech.com> References: <20250922052045.2421480-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 Reviewed-by: Alan Stern --- Documentation/devicetree/bindings/usb/usb-uhci.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/usb-uhci.yaml b/Document= ation/devicetree/bindings/usb/usb-uhci.yaml index b1f2b9bd7921..e050ca203945 100644 --- a/Documentation/devicetree/bindings/usb/usb-uhci.yaml +++ b/Documentation/devicetree/bindings/usb/usb-uhci.yaml @@ -20,6 +20,7 @@ properties: - aspeed,ast2400-uhci - aspeed,ast2500-uhci - aspeed,ast2600-uhci + - aspeed,ast2700-uhci - const: generic-uhci =20 reg: @@ -53,6 +54,15 @@ allOf: required: - clocks =20 + - if: + properties: + compatible: + contains: + const: aspeed,ast2700-uhci + then: + required: + - resets + unevaluatedProperties: false =20 examples: --=20 2.34.1 From nobody Thu Oct 2 05:06:28 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 8D07D2EC0BF; Mon, 22 Sep 2025 05:21:01 +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=1758518463; cv=none; b=DmqCxiASj129QJIFvLYiqdmk0hRcO15SDS0ygM5pV15kKkMa4R3KxL+3DFm+2DKM3WeePOgrF4gbdoSVTjz5v/MNrVDgbRYr3BF6j2L1yQ/yoG7ubt9AF5Okgt+mIuTW75jvZI8mlQrbk4Tuftmn/qx4sUxHxNjVfX1Eea79YjE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758518463; c=relaxed/simple; bh=w1x3RIjvxJY3r2qRlnkKedK1Xs++HbYecJfNbrnWc8A=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=D3pOP41VbSfWaqYQWxY4Y8Iu9D3atAzYz3eiRqz+4LJ1ucenm9vuwtnCt5thW/T+yJcGiAw9WRKp78Uuc6YswnE0+cxnZgi8adhyGrJOjFic0Svw0OOILdFJwU2H7qttf1oTW/WhOHnCg+t5XyGdya45uiBLoyUow3oyLuHgmx8= 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; Mon, 22 Sep 2025 13:20:45 +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; Mon, 22 Sep 2025 13:20:45 +0800 From: Ryan Chen To: ryan_chen , Greg Kroah-Hartman , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley , "Alan Stern" , Philipp Zabel , , , Subject: [PATCH v4 4/4] usb: uhci: Add Aspeed AST2700 support Date: Mon, 22 Sep 2025 13:20:45 +0800 Message-ID: <20250922052045.2421480-5-ryan_chen@aspeedtech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250922052045.2421480-1-ryan_chen@aspeedtech.com> References: <20250922052045.2421480-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 UHCI controller in AST2700 supports 64-bit DMA. Update the platform UHCI driver to select the appropriate DMA mask based on the device tree compatible string. Signed-off-by: Ryan Chen Reviewed-by: Alan Stern --- drivers/usb/host/uhci-platform.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/uhci-platform.c b/drivers/usb/host/uhci-platf= orm.c index aa75b546672b..37607f985cc0 100644 --- a/drivers/usb/host/uhci-platform.c +++ b/drivers/usb/host/uhci-platform.c @@ -65,9 +65,13 @@ static const struct hc_driver uhci_platform_hc_driver = =3D { .hub_control =3D uhci_hub_control, }; =20 +static const u64 dma_mask_32 =3D DMA_BIT_MASK(32); +static const u64 dma_mask_64 =3D DMA_BIT_MASK(64); + static int uhci_hcd_platform_probe(struct platform_device *pdev) { struct device_node *np =3D pdev->dev.of_node; + const u64 *dma_mask_ptr; struct usb_hcd *hcd; struct uhci_hcd *uhci; struct resource *res; @@ -81,7 +85,11 @@ static int uhci_hcd_platform_probe(struct platform_devic= e *pdev) * Since shared usb code relies on it, set it here for now. * Once we have dma capability bindings this can go away. */ - ret =3D dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); + dma_mask_ptr =3D (u64 *)of_device_get_match_data(&pdev->dev); + if (!dma_mask_ptr) + dma_mask_ptr =3D &dma_mask_32; + + ret =3D dma_coerce_mask_and_coherent(&pdev->dev, *dma_mask_ptr); if (ret) return ret; =20 @@ -114,7 +122,8 @@ static int uhci_hcd_platform_probe(struct platform_devi= ce *pdev) } if (of_device_is_compatible(np, "aspeed,ast2400-uhci") || of_device_is_compatible(np, "aspeed,ast2500-uhci") || - of_device_is_compatible(np, "aspeed,ast2600-uhci")) { + of_device_is_compatible(np, "aspeed,ast2600-uhci") || + of_device_is_compatible(np, "aspeed,ast2700-uhci")) { uhci->is_aspeed =3D 1; dev_info(&pdev->dev, "Enabled Aspeed implementation workarounds\n"); @@ -191,6 +200,7 @@ static void uhci_hcd_platform_shutdown(struct platform_= device *op) static const struct of_device_id platform_uhci_ids[] =3D { { .compatible =3D "generic-uhci", }, { .compatible =3D "platform-uhci", }, + { .compatible =3D "aspeed,ast2700-uhci", .data =3D &dma_mask_64}, {} }; MODULE_DEVICE_TABLE(of, platform_uhci_ids); --=20 2.34.1