[PATCH v3 4/5] net: phy: Add support for TI PHY init

Dan Murphy dmurphy at ti.com
Mon May 4 18:59:32 CEST 2020


Michal

On 5/4/20 4:46 AM, Michal Simek wrote:
> On 30. 04. 20 18:30, Dan Murphy wrote:
>> ti_phy_init function was allocated to the DP83867 PHY.  This function
>> name is to generic for a specific PHY.  The function can be moved to a
>> TI specific file that can register all TI PHYs that are defined in the
>> defconfig.  The ti_phy_init file will contain all TI PHYs initialization
>> so that only phy_ti_init can be called from the framework.
>>
>> In addition to the above the config flag for the DP83867 needs to be changed
>> in the Kconfig and dependent defconfig files. The config flag that was
>> used for the DP83867 was also generic in nature so a more specific
>> config flag for the DP83867 was created.
>>
>> Acked-by: Michal Simek <michal.simek at xilinx.com>
>> Signed-off-by: Dan Murphy <dmurphy at ti.com>
>> ---
>>   configs/am65x_evm_a53_defconfig      |  2 +-
>>   configs/am65x_hs_evm_a53_defconfig   |  2 +-
>>   configs/dra7xx_evm_defconfig         |  2 +-
>>   configs/dra7xx_hs_evm_defconfig      |  2 +-
>>   configs/dra7xx_hs_evm_usb_defconfig  |  2 +-
>>   configs/j721e_evm_a72_defconfig      |  2 +-
>>   configs/j721e_hs_evm_a72_defconfig   |  2 +-
>>   configs/k2g_evm_defconfig            |  2 +-
>>   configs/xilinx_versal_virt_defconfig |  2 +-
>>   configs/xilinx_zynqmp_virt_defconfig |  2 +-
>>   drivers/net/phy/Kconfig              | 15 +++++++++++++++
>>   drivers/net/phy/Makefile             |  3 ++-
>>   drivers/net/phy/dp83867.c            |  3 ++-
>>   drivers/net/phy/ti_phy_init.c        | 18 ++++++++++++++++++
>>   drivers/net/phy/ti_phy_init.h        | 15 +++++++++++++++
>>   15 files changed, 62 insertions(+), 12 deletions(-)
>>   create mode 100644 drivers/net/phy/ti_phy_init.c
>>   create mode 100644 drivers/net/phy/ti_phy_init.h
>>
>> diff --git a/configs/am65x_evm_a53_defconfig b/configs/am65x_evm_a53_defconfig
>> index 542bbd992c53..c8cc9b2f7d8d 100644
>> --- a/configs/am65x_evm_a53_defconfig
>> +++ b/configs/am65x_evm_a53_defconfig
>> @@ -101,7 +101,7 @@ CONFIG_SPI_FLASH_SFDP_SUPPORT
>>   CONFIG_SPI_FLASH_STMICRO=y
>>   # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
>>   CONFIG_SPI_FLASH_MTD=y
>> -CONFIG_PHY_TI=y
>> +CONFIG_PHY_TI_DP83867=y
>>   CONFIG_PHY_FIXED=y
>>   CONFIG_DM_ETH=y
>>   CONFIG_E1000=y
>> diff --git a/configs/am65x_hs_evm_a53_defconfig b/configs/am65x_hs_evm_a53_defconfig
>> index 9f43cee39611..738bd01b059f 100644
>> --- a/configs/am65x_hs_evm_a53_defconfig
>> +++ b/configs/am65x_hs_evm_a53_defconfig
>> @@ -103,7 +103,7 @@ CONFIG_SPI_FLASH_SFDP_SUPPORT
>>   CONFIG_SPI_FLASH_STMICRO=y
>>   # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
>>   CONFIG_SPI_FLASH_MTD=y
>> -CONFIG_PHY_TI=y
>> +CONFIG_PHY_TI_DP83867=y
>>   CONFIG_PHY_FIXED=y
>>   CONFIG_DM_ETH=y
>>   CONFIG_E1000=y
>> diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
>> index 4d765da4e052..9ad462cdc6de 100644
>> --- a/configs/dra7xx_evm_defconfig
>> +++ b/configs/dra7xx_evm_defconfig
>> @@ -86,7 +86,7 @@ CONFIG_DM_SPI_FLASH=y
>>   CONFIG_SF_DEFAULT_MODE=0
>>   CONFIG_SF_DEFAULT_SPEED=76800000
>>   CONFIG_SPI_FLASH_SPANSION=y
>> -CONFIG_PHY_TI=y
>> +CONFIG_PHY_TI_DP83867=y
>>   CONFIG_DM_ETH=y
>>   CONFIG_PHY_GIGE=y
>>   CONFIG_MII=y
>> diff --git a/configs/dra7xx_hs_evm_defconfig b/configs/dra7xx_hs_evm_defconfig
>> index c25d4ce5c142..9aa452460765 100644
>> --- a/configs/dra7xx_hs_evm_defconfig
>> +++ b/configs/dra7xx_hs_evm_defconfig
>> @@ -89,7 +89,7 @@ CONFIG_DM_SPI_FLASH=y
>>   CONFIG_SF_DEFAULT_MODE=0
>>   CONFIG_SF_DEFAULT_SPEED=76800000
>>   CONFIG_SPI_FLASH_SPANSION=y
>> -CONFIG_PHY_TI=y
>> +CONFIG_PHY_TI_DP83867=y
>>   CONFIG_DM_ETH=y
>>   CONFIG_PHY_GIGE=y
>>   CONFIG_MII=y
>> diff --git a/configs/dra7xx_hs_evm_usb_defconfig b/configs/dra7xx_hs_evm_usb_defconfig
>> index 8e74496b2ccd..d282468212e9 100644
>> --- a/configs/dra7xx_hs_evm_usb_defconfig
>> +++ b/configs/dra7xx_hs_evm_usb_defconfig
>> @@ -87,7 +87,7 @@ CONFIG_SF_DEFAULT_MODE=0
>>   CONFIG_SF_DEFAULT_SPEED=76800000
>>   CONFIG_SPI_FLASH_BAR=y
>>   CONFIG_SPI_FLASH_SPANSION=y
>> -CONFIG_PHY_TI=y
>> +CONFIG_PHY_TI_DP83867=y
>>   CONFIG_DM_ETH=y
>>   CONFIG_PHY_GIGE=y
>>   CONFIG_MII=y
>> diff --git a/configs/j721e_evm_a72_defconfig b/configs/j721e_evm_a72_defconfig
>> index e9e82bb4309d..29ae8d720753 100644
>> --- a/configs/j721e_evm_a72_defconfig
>> +++ b/configs/j721e_evm_a72_defconfig
>> @@ -124,7 +124,7 @@ CONFIG_SPI_FLASH_SFDP_SUPPORT
>>   CONFIG_SPI_FLASH_STMICRO=y
>>   # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
>>   CONFIG_SPI_FLASH_MTD=y
>> -CONFIG_PHY_TI=y
>> +CONFIG_PHY_TI_DP83867=y
>>   CONFIG_PHY_FIXED=y
>>   CONFIG_DM_ETH=y
>>   CONFIG_TI_AM65_CPSW_NUSS=y
>> diff --git a/configs/j721e_hs_evm_a72_defconfig b/configs/j721e_hs_evm_a72_defconfig
>> index a723e2718e5e..7174fda72a01 100644
>> --- a/configs/j721e_hs_evm_a72_defconfig
>> +++ b/configs/j721e_hs_evm_a72_defconfig
>> @@ -114,7 +114,7 @@ CONFIG_SPI_FLASH_SFDP_SUPPORT
>>   CONFIG_SPI_FLASH_STMICRO=y
>>   # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
>>   CONFIG_SPI_FLASH_MTD=y
>> -CONFIG_PHY_TI=y
>> +CONFIG_PHY_TI_DP83867=y
>>   CONFIG_PHY_FIXED=y
>>   CONFIG_DM_ETH=y
>>   CONFIG_TI_AM65_CPSW_NUSS=y
>> diff --git a/configs/k2g_evm_defconfig b/configs/k2g_evm_defconfig
>> index 5abf5faa450e..14cf1b997d91 100644
>> --- a/configs/k2g_evm_defconfig
>> +++ b/configs/k2g_evm_defconfig
>> @@ -58,7 +58,7 @@ CONFIG_PHYLIB=y
>>   CONFIG_PHY_MARVELL=y
>>   CONFIG_PHY_MICREL=y
>>   CONFIG_PHY_MICREL_KSZ8XXX=y
>> -CONFIG_PHY_TI=y
>> +CONFIG_PHY_TI_DP83867=y
>>   CONFIG_DM_ETH=y
>>   CONFIG_MII=y
>>   CONFIG_DRIVER_TI_KEYSTONE_NET=y
>> diff --git a/configs/xilinx_versal_virt_defconfig b/configs/xilinx_versal_virt_defconfig
>> index e8c349261207..dcd841b8e299 100644
>> --- a/configs/xilinx_versal_virt_defconfig
>> +++ b/configs/xilinx_versal_virt_defconfig
>> @@ -61,7 +61,7 @@ CONFIG_SPI_FLASH_WINBOND=y
>>   CONFIG_PHY_MARVELL=y
>>   CONFIG_PHY_NATSEMI=y
>>   CONFIG_PHY_REALTEK=y
>> -CONFIG_PHY_TI=y
>> +CONFIG_PHY_TI_DP83867=y
>>   CONFIG_PHY_VITESSE=y
>>   CONFIG_PHY_FIXED=y
>>   CONFIG_PHY_GIGE=y
>> diff --git a/configs/xilinx_zynqmp_virt_defconfig b/configs/xilinx_zynqmp_virt_defconfig
>> index 7b09edd78e1b..b7b671282a87 100644
>> --- a/configs/xilinx_zynqmp_virt_defconfig
>> +++ b/configs/xilinx_zynqmp_virt_defconfig
>> @@ -101,7 +101,7 @@ CONFIG_PHY_MICREL=y
>>   CONFIG_PHY_MICREL_KSZ90X1=y
>>   CONFIG_PHY_NATSEMI=y
>>   CONFIG_PHY_REALTEK=y
>> -CONFIG_PHY_TI=y
>> +CONFIG_PHY_TI_DP83867=y
>>   CONFIG_PHY_VITESSE=y
>>   CONFIG_PHY_XILINX_GMII2RGMII=y
>>   CONFIG_PHY_FIXED=y
>> diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
>> index d1f049e62ab7..a8ae1db4afe2 100644
>> --- a/drivers/net/phy/Kconfig
>> +++ b/drivers/net/phy/Kconfig
>> @@ -243,6 +243,21 @@ config PHY_TERANETICS
>>   
>>   config PHY_TI
>>   	bool "Texas Instruments Ethernet PHYs support"
>> +	---help---
>> +	  Adds PHY registration support for TI PHYs.
>> +
>> +config PHY_TI_GENERIC
>> +	select PHY_TI
>> +	bool "Texas Instruments Generic Ethernet PHYs support"
>> +	---help---
>> +	  Adds support for Generic TI PHYs that don't need special handling but
>> +	  the PHY name is associated with a PHY ID.
>
> I spot one more thing here.
> This fragment should be the part of 5/5 not 4/5.
Ack
> Thanks,
> Michal


More information about the U-Boot mailing list