* [PATCH] pico-imx7d: Remove board_phy_config()
@ 2023-11-03 22:47 Fabio Estevam
2023-12-13 16:33 ` Fabio Estevam
0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2023-11-03 22:47 UTC (permalink / raw)
To: sbabic; +Cc: u-boot, Fabio Estevam
From: Fabio Estevam <festevam@denx.de>
With Ethernet DM in place, there is no longer the need for having
the board_phy_config() anymore.
Remove it.
Tested on imx7d-pico-pi board:
=> setenv autoload no
=> dhcp
BOOTP broadcast 1
*** Unhandled DHCP Option in OFFER/ACK: 42
DHCP client bound to address 192.168.0.138 (138 ms)
=> tftp zImage
Using ethernet@30be0000 device
TFTP from server 192.168.0.16; our IP address is 192.168.0.138
Filename 'zImage'.
Load address: 0x80800000
Loading: #################################################################
....
#################################################################
##########
4.3 MiB/s
done
Bytes transferred = 9034120 (89d988 hex)
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
board/technexion/pico-imx7d/pico-imx7d.c | 26 ------------------------
1 file changed, 26 deletions(-)
diff --git a/board/technexion/pico-imx7d/pico-imx7d.c b/board/technexion/pico-imx7d/pico-imx7d.c
index 6e98b85b2873..5def6eda43e5 100644
--- a/board/technexion/pico-imx7d/pico-imx7d.c
+++ b/board/technexion/pico-imx7d/pico-imx7d.c
@@ -101,32 +101,6 @@ static int setup_fec(void)
return set_clk_enet(ENET_125MHZ);
}
-
-int board_phy_config(struct phy_device *phydev)
-{
- unsigned short val;
-
- /* To enable AR8035 ouput a 125MHz clk from CLK_25M */
- phy_write(phydev, MDIO_DEVAD_NONE, 0xd, 0x7);
- phy_write(phydev, MDIO_DEVAD_NONE, 0xe, 0x8016);
- phy_write(phydev, MDIO_DEVAD_NONE, 0xd, 0x4007);
-
- val = phy_read(phydev, MDIO_DEVAD_NONE, 0xe);
- val &= 0xffe7;
- val |= 0x18;
- phy_write(phydev, MDIO_DEVAD_NONE, 0xe, val);
-
- /* introduce tx clock delay */
- phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x5);
- val = phy_read(phydev, MDIO_DEVAD_NONE, 0x1e);
- val |= 0x0100;
- phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, val);
-
- if (phydev->drv->config)
- phydev->drv->config(phydev);
-
- return 0;
-}
#endif
static void setup_iomux_uart(void)
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] pico-imx7d: Remove board_phy_config()
@ 2023-11-04 10:45 Szőke Kálmán Benjamin
2023-11-04 11:54 ` Fabio Estevam
0 siblings, 1 reply; 4+ messages in thread
From: Szőke Kálmán Benjamin @ 2023-11-04 10:45 UTC (permalink / raw)
To: u-boot@lists.denx.de, Fabio Estevam
Other pico SoMs still has board_phy_config() also, you should remove it from them, too.pico-imx8mq: https://github.com/u-boot/u-boot/blob/master/board/technexion/pico-imx8mq/pico-imx8mq.c#L111pico-imx6ul: https://github.com/u-boot/u-boot/blob/master/board/technexion/pico-imx6ul/pico-imx6ul.c#L110pico-imx6: https://github.com/u-boot/u-boot/blob/master/board/technexion/pico-imx6/pico-imx6.c#L314
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] pico-imx7d: Remove board_phy_config()
2023-11-04 10:45 Szőke Kálmán Benjamin
@ 2023-11-04 11:54 ` Fabio Estevam
0 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2023-11-04 11:54 UTC (permalink / raw)
To: Szőke Kálmán Benjamin; +Cc: u-boot@lists.denx.de
On Sat, Nov 4, 2023 at 7:45 AM Szőke Kálmán Benjamin
<egyszeregy@freemail.hu> wrote:
>
> Other pico SoMs still has board_phy_config() also, you should remove it from them, too.
board_phy_config() could probably be removed from these boards too.
To be sure, someone has to test it. If there is a problem with the
devicetree description, simply removing
board_phy_config() may cause an Ethernet regression.
If you have access to these boards, feel free to test and submit patches.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] pico-imx7d: Remove board_phy_config()
2023-11-03 22:47 [PATCH] pico-imx7d: Remove board_phy_config() Fabio Estevam
@ 2023-12-13 16:33 ` Fabio Estevam
0 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2023-12-13 16:33 UTC (permalink / raw)
To: sbabic; +Cc: u-boot, Fabio Estevam
On Fri, Nov 3, 2023 at 7:47 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> From: Fabio Estevam <festevam@denx.de>
>
> With Ethernet DM in place, there is no longer the need for having
> the board_phy_config() anymore.
>
> Remove it.
>
> Tested on imx7d-pico-pi board:
>
> => setenv autoload no
> => dhcp
> BOOTP broadcast 1
> *** Unhandled DHCP Option in OFFER/ACK: 42
> DHCP client bound to address 192.168.0.138 (138 ms)
> => tftp zImage
> Using ethernet@30be0000 device
> TFTP from server 192.168.0.16; our IP address is 192.168.0.138
> Filename 'zImage'.
> Load address: 0x80800000
> Loading: #################################################################
> ....
> #################################################################
> ##########
> 4.3 MiB/s
> done
> Bytes transferred = 9034120 (89d988 hex)
>
> Signed-off-by: Fabio Estevam <festevam@denx.de>
Applied to u-boot-imx next, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-12-13 16:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-03 22:47 [PATCH] pico-imx7d: Remove board_phy_config() Fabio Estevam
2023-12-13 16:33 ` Fabio Estevam
-- strict thread matches above, loose matches on Subject: below --
2023-11-04 10:45 Szőke Kálmán Benjamin
2023-11-04 11:54 ` Fabio Estevam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox