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

Tom Rini trini at konsulko.com
Mon Jul 31 17:12:13 CEST 2023


On Mon, Jul 31, 2023 at 02:06:26PM +0530, Siddharth Vadapalli wrote:
> 
> 
> 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.

That will break SPL, if that's a use case on these platforms.

Please check that whatever approach you take doesn't break other
platforms nor include code when not required on other platforms.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230731/28ab597c/attachment.sig>


More information about the U-Boot mailing list