[PATCH 3/6] net: ti: am65-cpsw-nuss: Add logic to support MDIO reset

Siddharth Vadapalli s-vadapalli at ti.com
Mon Jul 31 10:36:26 CEST 2023



On 31/07/23 10:13, Siddharth Vadapalli wrote:
> Tom,
> 
> On 22/07/23 01:06, Tom Rini wrote:
>> On Sat, Jul 08, 2023 at 04:15:20PM +0530, Siddharth Vadapalli wrote:
>>
>>> From: Suman Anna <s-anna at ti.com>
>>>
>>> Enhance the AM65 CPSW NUSS driver to perform a MDIO reset using a GPIO
>>> line. Logic is also added to perform a pre and post delay around reset
>>> using the optional 'reset-delay-us' and 'reset-post-delay-us' properties.
>>> This is similar to the reset being performed in the Linux kernel. The
>>> reset is done once when the CPSW MDIO bus is being initialized.
>>>
>>> Signed-off-by: Suman Anna <s-anna at ti.com>
>>> Signed-off-by: Siddharth Vadapalli <s-vadapalli at ti.com>
>>> ---
>>>  drivers/net/ti/am65-cpsw-nuss.c | 34 ++++++++++++++++++++++++++++++++-
>>>  1 file changed, 33 insertions(+), 1 deletion(-)
>>
>> So this breaks building on am62x_evm_a53 because now TI_AM65_CPSW_NUSS
>> needs to select DM_GPIO.  And the next problem is that we don't enable a
>> GPIO driver on that platform as we should I suspect make DA8XX_GPIO
>> default y if K3.
> 
> Sorry for the delayed response. I am planning to address this issue by using:
> #if CONFIG_IS_ENABLED(DM_GPIO)

Instead of CONFIG_IS_ENABLED(DM_GPIO), I will use:
if (IS_ENABLED(CONFIG_DM_GPIO)) {
in the functions.

> in the driver, similar to how it is done for other ethernet drivers such as:
> drivers/net/mvneta.c and drivers/net/mvpp2.c.
> 
> Also, the GPIO hog and reset capabilities are only required on those boards
> which have the Ethernet PHY present on a daughtercard connected to the board.
> 
> I will post the v2 of this series with the above changes to fix the build
> issues. Please let me know if the above approach is acceptable.
> 
>>
> 

-- 
Regards,
Siddharth.


More information about the U-Boot mailing list