From fac9da635b54fc986637c6615eef4819e6b1a3b3 Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Sun, 9 Mar 2014 14:22:55 +0100 Subject: [PATCH] bsps/arm: Add DP83848 PHY support to LPC Ethernet --- c/src/lib/libbsp/arm/shared/lpc/network/lpc-ethernet.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/c/src/lib/libbsp/arm/shared/lpc/network/lpc-ethernet.c b/c/src/lib/libbsp/arm/shared/lpc/network/lpc-ethernet.c index f62217173a..5692531d23 100644 --- a/c/src/lib/libbsp/arm/shared/lpc/network/lpc-ethernet.c +++ b/c/src/lib/libbsp/arm/shared/lpc/network/lpc-ethernet.c @@ -1188,6 +1188,7 @@ static int lpc_eth_phy_get_id(int phy, uint32_t *id) } #define PHY_KSZ80X1RNL 0x221550 +#define PHY_DP83848 0x20005c90 typedef struct { unsigned reg; @@ -1271,6 +1272,13 @@ static int lpc_eth_phy_up(lpc_eth_driver_entry *e) RTEMS_ARRAY_SIZE(lpc_eth_phy_up_pre_action_KSZ80X1RNL) ); break; + case PHY_DP83848: + eno = lpc_eth_mdio_read(e->phy, NULL, 0x17, &val); + LPC_ETH_PRINTF("phy PHY_DP83848 RBR 0x%08" PRIx32 "\n", val); + /* val = 0x21; */ + val = 0x32 ; + eno = lpc_eth_mdio_write(e->phy, NULL, 0x17, val); + break; case 0: case 0xfffffff0: eno = EIO;