Add AST2700 USB3.2 PHY driver
Ryan Chen
reviewerv4 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 v4:
- Indent the register bitfield definitions so they are distinguishable
from the register offsets, and use lowercase hex.
- Set PHY3S00_SRAM_EXT_LOAD rather than PHY3S00_SRAM_BYPASS. Bypassing
the SRAM leaves the PHY on the default RTL design configuration,
whereas the external load path applies the ROM patch so the PHY runs
the ROM configuration.
- Describe the SRAM handshake in the driver's commit message.
- Link to v3: https://lore.kernel.org/r/[email protected]
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: f82a5da2f04960df9fb57489992d03dd5e64ec6f
change-id: 20260112-upstream_usb3phy-7116f8dfe779
Best regards,
Signature · 7 lines
Ryan Chen <[email protected]> -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Ryan Chen
reviewerPATCH v4 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 · 7 lines
2.34.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Ryan Chen
reviewerPATCH v4 2/3 phy: aspeed: Add AST2700 USB3.2 PHY driver
In reply to Ryan ChenAdd a driver for the USB3.2 PHY on the Aspeed AST2700, which is paired with the DWC3 controller.
The PHY draws its configuration from an internal SRAM in both of the available modes, so the driver must wait for PHY3S00_INIT_DONE before selecting one. PHY3S00_SRAM_BYPASS selects the default design configuration and PHY3S00_SRAM_EXT_LOAD the ROM code configuration; the driver uses the latter.
---
Changes in v4:
- Indent the register bitfield definitions so they are distinguishable from the register offsets, and use lowercase hex.
- Set PHY3S00_SRAM_EXT_LOAD rather than PHY3S00_SRAM_BYPASS. Bypassing the SRAM leaves the PHY on the default RTL design configuration, whereas the external load path applies the ROM patch so the PHY runs the ROM configuration.
- Describe the SRAM handshake in the commit message, answering Andrew's question on v2 about why the driver waits for the SRAM to initialise.
--- 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
Ryan Chen
reviewerPATCH v4 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
@@ -4096,6 +4096,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 · 7 lines
2.34.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Quoted 5 lines · Ryan Chen
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).
Applied, thanks!
[1/3] dt-bindings: phy: aspeed: Document AST2700 USB3.2 PHY
commit: e22b112f2fa565fd7d2715ac9d1bc3ba1a3c2427
[2/3] phy: aspeed: Add AST2700 USB3.2 PHY driver
commit: ad72aff5b4b5396a2a443a8f838fcfb8067dc603
[3/3] MAINTAINERS: Add ASPEED USB3 PHY driver
commit: ea01f446f0682a5e7bd7a275889a890b7e0c6e02Best regards,
Signature · 1 line
~Vinod