On Mon, Feb 23, 2015 at 10:28:09AM +0100, Jan Lübbe wrote: > On Mo, 2015-02-23 at 10:15 +0100, Steffen Trumtrar wrote: > > --- /dev/null > > +++ b/arch/arm/boards/altera-socdk/board.c > > @@ -0,0 +1,38 @@ > > > +static int ksz9021rn_phy_fixup(struct phy_device *dev) > > +{ > > + phy_write(dev, 0x09, 0x0f00); > > + > > + /* rx skew */ > > + phy_write(dev, 0x0b, 0x8105); > > + phy_write(dev, 0x0c, 0x0000); > > + > > + /* clk/ctrl skew */ > > + phy_write(dev, 0x0b, 0x8104); > > + phy_write(dev, 0x0c, 0xa0d0); > > + > > + return 0; > > +} > > + > > +static int socfpga_console_init(void) > > +{ > > + if (!of_machine_is_compatible("altr,socdk")) > > + return 0; > > + > > + phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK, > > + ksz9021rn_phy_fixup); > > + > > + return 0; > > +} > > +console_initcall(socfpga_console_init); > > > --- /dev/null > > +++ b/arch/arm/dts/socfpga_cyclone5_socdk.dts > > > +&gmac1 { > > + status = "okay"; > > + phy-mode = "rgmii"; > > + > > + rxd0-skew-ps = <0>; > > + rxd1-skew-ps = <0>; > > + rxd2-skew-ps = <0>; > > + rxd3-skew-ps = <0>; > > + txen-skew-ps = <0>; > > + txc-skew-ps = <2600>; > > + rxdv-skew-ps = <0>; > > + rxc-skew-ps = <2000>; > > +}; > > It seems that with the DT-based configuration of the skew values, the > phy_fixup in board.c is not necessary. Yes, one would expect that. But it didn't work, so I decided to not debug this right now. The socfpga-DT section needs an overhaul anyway; gpio and clkmgr bindings are not correct anymore. Regards, Steffen -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox