Skip to content

Commit

Permalink
phy: rockchip: add usbdp combo phy driver
Browse files Browse the repository at this point in the history
This adds a new USBDP combo PHY with Samsung IP block driver.

The driver get lane mux and mapping info in 2 ways, supporting
DisplayPort alternate mode or parsing from DT. When parsing from DT,
the property "rockchip,dp-lane-mux" provide the DP mux and mapping
info. This is needed when the PHY is not used with TypeC Alt-Mode.
For example if the USB3 interface of the PHY is connected to a USB
Type A connector and the DP interface is connected to a DisplayPort
connector.

When do DP link training, need to set lane number, link rate, swing,
and pre-emphasis via PHY configure interface.

Co-developed-by: Heiko Stuebner <[email protected]>
Signed-off-by: Heiko Stuebner <[email protected]>
Co-developed-by: Zhang Yubing <[email protected]>
Signed-off-by: Zhang Yubing <[email protected]>
Co-developed-by: Frank Wang <[email protected]>
Signed-off-by: Frank Wang <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
  • Loading branch information
sre authored and vinodkoul committed Apr 12, 2024
1 parent a75d805 commit 2f70bbd
Show file tree
Hide file tree
Showing 3 changed files with 1,621 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/phy/rockchip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,15 @@ config PHY_ROCKCHIP_USB
select GENERIC_PHY
help
Enable this to support the Rockchip USB 2.0 PHY.

config PHY_ROCKCHIP_USBDP
tristate "Rockchip USBDP COMBO PHY Driver"
depends on ARCH_ROCKCHIP && OF
select GENERIC_PHY
select TYPEC
help
Enable this to support the Rockchip USB3.0/DP combo PHY with
Samsung IP block. This is required for USB3 support on RK3588.

To compile this driver as a module, choose M here: the module
will be called phy-rockchip-usbdp
1 change: 1 addition & 0 deletions drivers/phy/rockchip/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ obj-$(CONFIG_PHY_ROCKCHIP_SAMSUNG_HDPTX) += phy-rockchip-samsung-hdptx.o
obj-$(CONFIG_PHY_ROCKCHIP_SNPS_PCIE3) += phy-rockchip-snps-pcie3.o
obj-$(CONFIG_PHY_ROCKCHIP_TYPEC) += phy-rockchip-typec.o
obj-$(CONFIG_PHY_ROCKCHIP_USB) += phy-rockchip-usb.o
obj-$(CONFIG_PHY_ROCKCHIP_USBDP) += phy-rockchip-usbdp.o
Loading

0 comments on commit 2f70bbd

Please sign in to comment.