Add AST2700 USB3.2 PHY driver
Ryan Chen
reviewerv3 cover Add AST2700 USB3.2 PHY driver
Add AST2700 USB3.2 PHY support.
- Supports Super Speed Plus Gen2x1 (10 Gbps), Super Speed (5 Gbps), High Speed (480 Mbps), Full Speed (12Mbps), and Low Speed (1.5 Mbps).
---
Changes in v3:
- Wire drivers/phy/aspeed/ into drivers/phy/Kconfig and
drivers/phy/Makefile so the driver is actually built.
- Fix the Makefile config symbol to CONFIG_PHY_ASPEED_USB3 to match
the Kconfig symbol.
- Expand the Kconfig help text.
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- aspeed,ast2700-usb3-phy.yaml
- Drop clocks, resets descripton.
- Kconfig
- add COMPILE_TEST, remove default n
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Ryan Chen (3):
dt-bindings: phy: aspeed: Document AST2700 USB3.2 PHY
phy: aspeed: Add AST2700 USB3.2 PHY driver
MAINTAINERS: Add ASPEED USB3 PHY driver
.../bindings/phy/aspeed,ast2700-usb3-phy.yaml | 48 +++++ MAINTAINERS | 8 + drivers/phy/Kconfig | 1 + drivers/phy/Makefile | 1 + drivers/phy/aspeed/Kconfig | 15 ++ drivers/phy/aspeed/Makefile | 2 + drivers/phy/aspeed/phy-aspeed-usb3.c | 236 +++++++++++++++++++++ 7 files changed, 311 insertions(+)
---
base-commit: 948efecf22e49aa4bf55bb73ec79a0ddcfd38571
change-id: 20260112-upstream_usb3phy-7116f8dfe779
Best regards,
Signature · 1 line
Ryan Chen <[email protected]>
Ryan Chen
reviewerPATCH v3 1/3 dt-bindings: phy: aspeed: Document AST2700 USB3.2 PHY
Document AST2700 USB3.2 PHY. This IP is connected between USB3 controller and PHY module.
--- .../bindings/phy/aspeed,ast2700-usb3-phy.yaml | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+)
Documentation/devicetree/bindings/phy/aspeed,ast2700-usb3-phy.yaml new file +48 -0
@@ -0,0 +1,48 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/aspeed,ast2700-usb3-phy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ASPEED AST2700 USB 3.2 PHY + +maintainers: + - Ryan Chen <[email protected]> + +properties: + compatible: + const: aspeed,ast2700-usb3-phy + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + + '#phy-cells': + const: 0 + +required: + - compatible + - reg + - clocks + - resets + - '#phy-cells' + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/aspeed,ast2700-scu.h> + #include <dt-bindings/reset/aspeed,ast2700-scu.h> + + usb-phy@12010000 { + compatible = "aspeed,ast2700-usb3-phy"; + reg = <0x12010000 0xc0>; + clocks = <&syscon0 SCU0_CLK_GATE_PORTAUSB2CLK>; + resets = <&syscon0 SCU0_RESET_PORTA_PHY3>; + #phy-cells = <0>; + };
Signature · 1 line
2.34.1
Re: [PATCH v3 1/3] dt-bindings: phy: aspeed: Document AST2700 USB3.2 PHY
Quoted 5 lines · Ryan Chen
Document AST2700 USB3.2 PHY. This IP is connected between USB3 controller and PHY module.
Reviewed-by Krzysztof Kozlowski <[email protected]>Signed-off-by Ryan Chen <[email protected]>
- Mani
Signature · 1 line
மணிவண்ணன் சதாசிவம்
Ryan Chen
reviewerPATCH v3 2/3 phy: aspeed: Add AST2700 USB3.2 PHY driver
In reply to Ryan ChenAdd AST2700 USB3.2 PHY driver support.
--- drivers/phy/Kconfig | 1 + drivers/phy/Makefile | 1 + drivers/phy/aspeed/Kconfig | 15 +++ drivers/phy/aspeed/Makefile | 2 + drivers/phy/aspeed/phy-aspeed-usb3.c | 236 +++++++++++++++++++++++++++++++++++ 5 files changed, 255 insertions(+)
drivers/phy/Kconfig +1 -0
@@ -171,6 +171,7 @@ config PHY_XGENE source "drivers/phy/allwinner/Kconfig" source "drivers/phy/amlogic/Kconfig" source "drivers/phy/apple/Kconfig" +source "drivers/phy/aspeed/Kconfig" source "drivers/phy/axiado/Kconfig" source "drivers/phy/broadcom/Kconfig" source "drivers/phy/cadence/Kconfig"
drivers/phy/Makefile +1 -0
@@ -23,6 +23,7 @@ obj-$(CONFIG_PHY_XGENE) += phy-xgene.o obj-$(CONFIG_GENERIC_PHY) += allwinner/ \ amlogic/ \ apple/ \ + aspeed/ \ axiado/ \ broadcom/ \ cadence/ \
drivers/phy/aspeed/Kconfig new file +15 -0
@@ -0,0 +1,15 @@ +# SPDX-License-Identifier: GPL-2.0-only + +# +# PHY drivers for ASPEED +# + +config PHY_ASPEED_USB3 + tristate "ASPEED USB3 PHY driver" + select GENERIC_PHY + depends on (ARCH_ASPEED || COMPILE_TEST) + help + Enable this to support the USB 3.2 PHY on the Aspeed AST2700 SoC. + It supports SuperSpeedPlus Gen2x1 (10 Gbps), SuperSpeed (5 Gbps), + High Speed (480 Mbps), Full Speed (12 Mbps) and Low Speed + (1.5 Mbps), and is paired with the DWC3 USB controller.
drivers/phy/aspeed/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0 +obj-$(CONFIG_PHY_ASPEED_USB3) += phy-aspeed-usb3.o
drivers/phy/aspeed/phy-aspeed-usb3.c new file +236 -0
236 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [PATCH v3 2/3] phy: aspeed: Add AST2700 USB3.2 PHY driver
Quoted 3 lines · Ryan Chen
Add AST2700 USB3.2 PHY driver support.
Signed-off-by Ryan Chen <[email protected]>
Just couple of nitpicks below. Once they are addressed:
Quoted 76 lines
--- drivers/phy/Kconfig | 1 + drivers/phy/Makefile | 1 + drivers/phy/aspeed/Kconfig | 15 +++ drivers/phy/aspeed/Makefile | 2 + drivers/phy/aspeed/phy-aspeed-usb3.c | 236 +++++++++++++++++++++++++++++++++++ 5 files changed, 255 insertions(+)drivers/phy/Kconfig +1
-0@@ -171,6 +171,7 @@ config PHY_XGENE source "drivers/phy/allwinner/Kconfig" source "drivers/phy/amlogic/Kconfig" source "drivers/phy/apple/Kconfig" +source "drivers/phy/aspeed/Kconfig" source "drivers/phy/axiado/Kconfig" source "drivers/phy/broadcom/Kconfig" source "drivers/phy/cadence/Kconfig"drivers/phy/Makefile +1
-0@@ -23,6 +23,7 @@ obj-$(CONFIG_PHY_XGENE) += phy-xgene.o obj-$(CONFIG_GENERIC_PHY) += allwinner/ \ amlogic/ \ apple/ \ + aspeed/ \ axiado/ \ broadcom/ \ cadence/ \drivers/phy/aspeed/Kconfig new file +15
-0@@ -0,0 +1,15 @@ +# SPDX-License-Identifier: GPL-2.0-only + +# +# PHY drivers for ASPEED +# + +config PHY_ASPEED_USB3 + tristate "ASPEED USB3 PHY driver" + select GENERIC_PHY + depends on (ARCH_ASPEED || COMPILE_TEST) + help + Enable this to support the USB 3.2 PHY on the Aspeed AST2700 SoC. + It supports SuperSpeedPlus Gen2x1 (10 Gbps), SuperSpeed (5 Gbps), + High Speed (480 Mbps), Full Speed (12 Mbps) and Low Speed + (1.5 Mbps), and is paired with the DWC3 USB controller.drivers/phy/aspeed/Makefile new file +2
-0@@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0 +obj-$(CONFIG_PHY_ASPEED_USB3) += phy-aspeed-usb3.odrivers/phy/aspeed/phy-aspeed-usb3.c new file +9
-0@@ -0,0 +1,236 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* Copyright 2026 Aspeed Technology Inc. +*/ + +#include <linux/bitfield.h> +#include <linux/clk.h> +#include <linux/io.h> +#include <linux/iopoll.h>
drivers/phy/aspeed/phy-aspeed-usb3.c line 19
Quoted 10 lines
drivers/phy/aspeed/phy-aspeed-usb3.c new file +10
-0+#include <linux/module.h> +#include <linux/of.h> +#include <linux/phy/phy.h> +#include <linux/platform_device.h> +#include <linux/reset.h> + +#define PHY3S00 0x00 +#define PHY3S00_INIT_DONE BIT(15) +#define PHY3S00_SRAM_BYPASS BIT(7) +#define PHY3S00_SRAM_EXT_LOAD BIT(6)
If you want to mix register offsets and bitfield definitions, then you need to use indent to differentiate:
#define PHY3S00 0x00 #define PHY3S00_INIT_DONE BIT(15) #define PHY3S00_SRAM_BYPASS BIT(7) ... #define PHY3S04 0x04 ...
drivers/phy/aspeed/phy-aspeed-usb3.c line 22
Quoted 3 lines
drivers/phy/aspeed/phy-aspeed-usb3.c new file +3
-0+#define PHY3S04 0x04 +#define PHY3C00 0x08 +#define PHY3C04 0x0C
Use lowercaps for all hex values
- Mani
Signature · 1 line
மணிவண்ணன் சதாசிவம்
Ryan Chen
reviewerRE: [PATCH v3 2/3] phy: aspeed: Add AST2700 USB3.2 PHY driver
Quoted 9 lines
Subject: Re: [PATCH v3 2/3] phy: aspeed: Add AST2700 USB3.2 PHY driver
Quoted 3 lines · Ryan Chen
Add AST2700 USB3.2 PHY driver support.
Signed-off-by Ryan Chen <[email protected]>Just couple of nitpicks below. Once they are addressed:
Hello,
Thanks your reviewed. I will update.
Quoted 94 lines
Reviewed-by: Manivannan Sadhasivam
<[email protected]>drivers/phy/Makefile obj-$(CONFIG_PHY_XGENE) +=
Quoted 26 lines
--- drivers/phy/Kconfig | 1 + drivers/phy/Makefile | 1 + drivers/phy/aspeed/Kconfig | 15 +++ drivers/phy/aspeed/Makefile | 2 + drivers/phy/aspeed/phy-aspeed-usb3.c | 236 +++++++++++++++++++++++++++++++++++ 5 files changed, 255 insertions(+)drivers/phy/Kconfig index renamed from drivers/phy/Kconfig +0
-0
19f3b7d12b7d..85fa381978f8100644drivers/phy/Kconfig +1
-0@@ -171,6 +171,7 @@ config PHY_XGENE source "drivers/phy/allwinner/Kconfig" source "drivers/phy/amlogic/Kconfig" source "drivers/phy/apple/Kconfig" +source "drivers/phy/aspeed/Kconfig" source "drivers/phy/axiado/Kconfig" source "drivers/phy/broadcom/Kconfig" source "drivers/phy/cadence/Kconfig"drivers/phy/Makefile index renamed from drivers/phy/Makefile +0
-0
d7aa516bcc49..c6dd02003bbe100644drivers/phy/Makefile +0
-0@@ -23,6 +23,7 @@ obj-$(CONFIG_PHY_XGENE) +=phy-xgene.o
Quoted 50 lines
drivers/phy/Makefile +1
-0obj-$(CONFIG_GENERIC_PHY) += allwinner/ \ amlogic/ \ apple/ \ + aspeed/ \ axiado/ \ broadcom/ \ cadence/ \drivers/phy/aspeed/Kconfig new file +15
-0@@ -0,0 +1,15 @@ +# SPDX-License-Identifier: GPL-2.0-only + +# +# PHY drivers for ASPEED +# + +config PHY_ASPEED_USB3 + tristate "ASPEED USB3 PHY driver" + select GENERIC_PHY + depends on (ARCH_ASPEED || COMPILE_TEST) + help + Enable this to support the USB 3.2 PHY on the Aspeed AST2700 SoC. + It supports SuperSpeedPlus Gen2x1 (10 Gbps), SuperSpeed (5 Gbps), + High Speed (480 Mbps), Full Speed (12 Mbps) and Low Speed + (1.5 Mbps), and is paired with the DWC3 USB controller.drivers/phy/aspeed/Makefile new file +2
-0@@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0 +obj-$(CONFIG_PHY_ASPEED_USB3) += phy-aspeed-usb3.odrivers/phy/aspeed/phy-aspeed-usb3.c new file +9
-0@@ -0,0 +1,236 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* Copyright 2026 Aspeed Technology Inc. +*/ + +#include <linux/bitfield.h> +#include <linux/clk.h> +#include <linux/io.h> +#include <linux/iopoll.h> drivers/phy/aspeed/phy-aspeed-usb3.c line 19
Quoted 10 lines
drivers/phy/aspeed/phy-aspeed-usb3.c new file +10
-0+#include <linux/module.h> +#include <linux/of.h> +#include <linux/phy/phy.h> +#include <linux/platform_device.h> +#include <linux/reset.h> + +#define PHY3S00 0x00 +#define PHY3S00_INIT_DONE BIT(15) +#define PHY3S00_SRAM_BYPASS BIT(7) +#define PHY3S00_SRAM_EXT_LOAD BIT(6)If you want to mix register offsets and bitfield definitions, then you need to use indent to differentiate:
Quoted 6 lines
#define PHY3S00 0x00 #define PHY3S00_INIT_DONE BIT(15) #define PHY3S00_SRAM_BYPASS BIT(7) ... #define PHY3S04 0x04 ...
Will update
Quoted 6 lines
drivers/phy/aspeed/phy-aspeed-usb3.c line 22
Quoted 4 lines
drivers/phy/aspeed/phy-aspeed-usb3.c new file +3
-0+#define PHY3S04 0x04 +#define PHY3C00 0x08 +#define PHY3C04 0x0CUse lowercaps for all hex values
Will update.
Quoted 5 lines
- Mani
--
மணிவண்ணன் சதாசிவம்
Ryan Chen
reviewerPATCH v3 3/3 MAINTAINERS: Add ASPEED USB3 PHY driver
In reply to Ryan ChenAdd maintainer entry for ASPEED USB3 PHY driver.
--- MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+)
MAINTAINERS +8 -0
@@ -4062,6 +4062,14 @@ S: Maintained F: Documentation/devicetree/bindings/usb/aspeed,ast2600-udc.yaml F: drivers/usb/gadget/udc/aspeed_udc.c +ASPEED USB3 PHY DRIVER +M: Ryan Chen <[email protected]> +L: [email protected] (moderated for non-subscribers) +L: [email protected] +S: Maintained +F: Documentation/devicetree/bindings/phy/aspeed,ast2700-usb3-phy.yaml +F: drivers/phy/aspeed/phy-aspeed-usb3.c + ASPEED VIDEO ENGINE DRIVER M: Eddie James <[email protected]> L: [email protected]
Signature · 1 line
2.34.1
Re: [PATCH v3 3/3] MAINTAINERS: Add ASPEED USB3 PHY driver
Quoted 3 lines · Ryan Chen
Add maintainer entry for ASPEED USB3 PHY driver.
Signed-off-by Ryan Chen <[email protected]>
- Mani
Signature · 1 line
மணிவண்ணன் சதாசிவம்