From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marco Cavallini Date: Mon, 01 Oct 2007 18:39:53 +0200 Subject: [U-Boot-Users] DP83848 PHY for AT91RM9200 board In-Reply-To: References: <4700EC22.5020103@koansoftware.com> Message-ID: <470122D9.6030200@koansoftware.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de ksi at koi8.net ha scritto: > On Mon, 1 Oct 2007, Marco Cavallini wrote: > > Here is DP83848 driver code for AT91RM9200 for u-boot-1.1.4 :) Just from my > archives... > > Something might be missing but the driver source and the header files are > there... > >> Hi, >> I'm using u-boot-1.1.4 (quite old but I must use it) >> with my AT91RM9200 based board. >> I replaced DM9161 with a new DP83848 PHY ethernet physical layer >> transceiver. >> >> So I'm backporting Sergey Kubushyn's driver >> National Semiconductor DP83848 PHY Driver for TI DaVinci (TMS320DM644x) >> adapting it for my AT91RM9200 based board. >> >> I left eth_init() like it was for DM9161 because connections are the >> same. >> The problem I'm facing to is that PHY is not detected when I call >> dp83848_is_phy_connected (see below). >> >> I wonder if anybody used DP83848 PHY before and maybe could give me a >> hint. >> >> int dp83848_is_phy_connected(AT91PS_EMAC phy_addr) >> { >> u_int16_t id1, id2; >> >> printf ("*** dp83848_is_phy_connected\n"); >> >> at91rm9200_EmacEnableMDIO (phy_addr); >> at91rm9200_EmacReadPhy(phy_addr, DP83848_PHYID1_REG, &id1) ; >> at91rm9200_EmacReadPhy(phy_addr, DP83848_PHYID2_REG, &id2) ; >> at91rm9200_EmacDisableMDIO (phy_addr); >> >> printf ("phy_addr=%X - id1=%X - id2=%X\n", phy_addr, id1, id2); >> // here I always get 0xFFFBC000 0xFFFF 0xFFFF >> >> if ((id1 == DP83848_PHYID1_OUI) && (id2 == DP83848_PHYID2_OUI)) >> return(1); >> >> return(0); >> } >> >> TIA >> -- >> Marco Cavallini Hi Sergey, thank you for answering. we have just discovered an hardware mistake on PFBOUT-PFBIN2 pins now I can detect the PHY using your code Thank you very much Best regards -- Marco Cavallini Koan s.a.s. - Bergamo - Italia Embedded and Real-Time Software Engineering http://www.KoanSoftware.com - http://www.KaeilOS.com