Skip to contentSkip to conversation

pico-imx7d: Remove board_phy_config()

PATCH In review Fabio Estevam 1 participant 2 messages Nov 3, 2023 – Dec 13, 2023 Arm i.MX and Layerscape

lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 pico-imx7d: Remove board_phy_config()

From: Fabio Estevam <[email protected]>

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)

---
 board/technexion/pico-imx7d/pico-imx7d.c | 26 ------------------------
 1 file changed, 26 deletions(-)
board/technexion/pico-imx7d/pico-imx7d.c +0 -26
index 6e98b85b2873..5def6eda43e5 100644
@@ -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)
Signature · 1 line
2.34.1
author reviewer
#1 lore raw
Quoted 22 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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: #################################################################
....

Quoted 7 lines
         #################################################################
         ##########
         4.3 MiB/s

done
Bytes transferred = 9034120 (89d988 hex)

Applied to u-boot-imx next, thanks.