From 72e5016f878d142e925f0016cee4ee7cbf42ae5b Mon Sep 17 00:00:00 2001 From: Jean-Jacques Hiblot Date: Mon, 24 Apr 2017 11:51:27 +0200 Subject: drivers: phy: add generic PHY framework The PHY framework provides a set of APIs to control a PHY. This API is derived from the linux version of the generic PHY framework. Currently the API supports init(), deinit(), power_on, power_off() and reset(). The framework provides a way to get a reference to a phy from the device-tree. Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Simon Glass --- drivers/phy/Kconfig | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 drivers/phy/Kconfig (limited to 'drivers/phy/Kconfig') diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig new file mode 100644 index 0000000000..0a7492063c --- /dev/null +++ b/drivers/phy/Kconfig @@ -0,0 +1,36 @@ + +menu "PHY Subsystem" + +config PHY + bool "PHY Core" + depends on DM + help + PHY support. + + This framework is designed to provide a generic interface for PHY + devices. PHY devices are dedicated hardware that handle the physical + layer of the protocols in the OSI model. + PHYs are commonly used for high speed interfaces such as Serial-ATA + or PCI express. + The API provides functions to initialize/deinitialize the + PHY, power on/off the PHY, and reset the PHY. It's meant to be as + compatible as possible with the equivalent framework found in the + linux kernel. + +config SPL_PHY + bool "PHY Core in SPL" + depends on DM + help + PHY support in SPL. + + This framework is designed to provide a generic interface for PHY + devices. PHY devices are dedicated hardware that handle the physical + layer of the protocols (https://en.wikipedia.org/wiki/OSI_model). + PHYs are commonly used for high speed interfaces such as Serial-ATA + or PCI express. + The API provides functions to initialize/deinitialize the + PHY, power on/off the PHY, and reset the PHY. It's meant to be as + compatible as possible with the equivalent framework found in the + linux kernel. + +endmenu -- cgit From 86322f5982206f431ee4678a74182859c249aac4 Mon Sep 17 00:00:00 2001 From: Jean-Jacques Hiblot Date: Mon, 24 Apr 2017 11:51:28 +0200 Subject: dm: test: Add tests for the generic PHY uclass Those tests check: - the ability for a phy-user to get a phy based on its name or its index - the ability of a phy device (provider) to manage multiple ports - the ability to perform operations on the phy (init,deinit,on,off) - the behavior of the uclass when optional operations are not implemented Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Simon Glass --- drivers/phy/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/phy/Kconfig') diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig index 0a7492063c..75f459d78d 100644 --- a/drivers/phy/Kconfig +++ b/drivers/phy/Kconfig @@ -33,4 +33,12 @@ config SPL_PHY compatible as possible with the equivalent framework found in the linux kernel. +config PHY_SANDBOX + bool "Sandbox PHY support" + depends on SANDBOX + depends on PHY + help + This select a dummy sandbox PHY driver. It used only to implement + the unit tests for the phy framework + endmenu -- cgit From 982082d9ce7365e2680639d3764ba0f09d82fa2a Mon Sep 17 00:00:00 2001 From: Jean-Jacques Hiblot Date: Mon, 24 Apr 2017 11:51:29 +0200 Subject: drivers: phy: add PIPE3 phy driver This phy is found on omap platforms with sata capabilities. Except for the part related to the DM and the PHY framework, the code is basically a copy paste from arch/arm/mach-omap2/pipe3-phy.c Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Tom Rini Reviewed-by: Simon Glass --- drivers/phy/Kconfig | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'drivers/phy/Kconfig') diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig index 75f459d78d..a91a6946b8 100644 --- a/drivers/phy/Kconfig +++ b/drivers/phy/Kconfig @@ -41,4 +41,22 @@ config PHY_SANDBOX This select a dummy sandbox PHY driver. It used only to implement the unit tests for the phy framework +config PIPE3_PHY + bool "Support omap's PIPE3 PHY" + depends on PHY && ARCH_OMAP2 + help + Support for the omap PIPE3 phy for sata + + This PHY is found on omap devices supporting SATA such as dra7, am57x + and omap5 + +config SPL_PIPE3_PHY + bool "Support omap's PIPE3 PHY in SPL" + depends on SPL_PHY && ARCH_OMAP2 + help + Support for the omap PIPE3 phy for sata in SPL + + This PHY is found on omap devices supporting SATA such as dra7, am57x + and omap5 + endmenu -- cgit