On 11/08/2017 09:16 PM, Ashish Kumar wrote:
> -----Original Message-----
> From: York Sun 
> Sent: Thursday, November 09, 2017 2:07 AM
> To: Ashish Kumar <ashish.ku...@nxp.com>; u-boot@lists.denx.de
> Cc: joe.hershber...@ni.com; Prabhakar Kushwaha <prabhakar.kushw...@nxp.com>
> Subject: Re: [PATCH] driver: net: ldpaa_eth: Add PHY-less SGMII support
> 
> On 11/06/2017 01:09 AM, Ashish Kumar wrote:
>> In case of PHY-less mode, there is no interaction with PHY so auto-neg 
>> etc is not required and link will have fixed attributes
>>
>> Signed-off-by: Ashish Kumar <ashish.ku...@nxp.com>
>> Signed-off-by: Prabhakar Kushwaha <prabhakar.kushw...@nxp.com>
>> ---
>>  drivers/net/ldpaa_eth/ldpaa_eth.c | 9 +++++++--
>>  1 file changed, 7 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c 
>> b/drivers/net/ldpaa_eth/ldpaa_eth.c
>> index 21be79a..85e7faa 100644
>> --- a/drivers/net/ldpaa_eth/ldpaa_eth.c
>> +++ b/drivers/net/ldpaa_eth/ldpaa_eth.c
>> @@ -440,12 +440,17 @@ static int ldpaa_eth_open(struct eth_device *net_dev, 
>> bd_t *bd)
>>      bus = wriop_get_mdio(priv->dpmac_id);
>>      enet_if = wriop_get_enet_if(priv->dpmac_id);
>>      if ((bus == NULL) &&
>> -        (enet_if == PHY_INTERFACE_MODE_XGMII)) {
>> +       ((enet_if == PHY_INTERFACE_MODE_XGMII) ||
>> +       (enet_if == PHY_INTERFACE_MODE_SGMII))) {
>>              priv->phydev = (struct phy_device *)
>>                              malloc(sizeof(struct phy_device));
>>              memset(priv->phydev, 0, sizeof(struct phy_device));
>>  
>> -            priv->phydev->speed = SPEED_10000;
>> +            if (enet_if == PHY_INTERFACE_MODE_XGMII)
>> +                    priv->phydev->speed = SPEED_10000;
>> +            else
>> +                    priv->phydev->speed = SPEED_1000;
>> +
>>              priv->phydev->link = 1;
>>              priv->phydev->duplex = DUPLEX_FULL;
>>      }
>>
> 
> How was this patch tested?
> 
>> It can be tested with PHY-less SGMII riser cards after adding patches 
>> attached. 
>> With the existing Riser card, which are PHY enabled, the test is that PHYs 
>> are not configured by adding these to patches.
> 
>> Do you suggest to add these patches in upstream?
> 

Ashish,

This patch seems OK. But it is only effective with the other two patches
you mentioned, isn't it? Please find a proper way to enable SGMII_PHYLIB
using Kconfig.

York


_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to