Hi Michal,
This splitter does exist in 3.10. It is in arch/arm/mach-socfpga You need to have a device tree entry for the driver to use it. The example below was taken from the RGMII exmaple design on rocketboards.org https://rocketboards.org/foswiki/view/Projects/CycloneVRGMIIExampleDesign Cyclone V RGMII Example Design - RocketBoards.org<https://rocketboards.org/foswiki/view/Projects/CycloneVRGMIIExampleDesign> rocketboards.org Similar topics. CycloneV SGMII Example Design; Fog removable hardware IP "Haze Reduction" on Cyclone V SoC FPGA Demonstration of Haze Reduction image processing H ... hps_0_gmac0: ethernet@0xff700000 { compatible = "synopsys,dwmac-14.0", "altr,socfpga-stmmac", "snps,dwmac-3.70a", "snps,dwmac"; reg = < 0xFF700000 0x00002000 >; interrupt-parent = < &hps_0_arm_gic_0 >; interrupts = < 0 115 4 >; clocks = < &emac0_clk >; clock-names = "stmmaceth"; interrupt-names = "macirq"; mac-address = "[00 00 00 00 00 00]"; status = "okay"; address-bits = < 48 >; max-frame-size = < 3800 >; local-mac-address = [ 00 00 00 00 00 00 ]; phy-mode = "rgmii-id"; snps,phy-addr = < 0xFFFFFFFF >; phy-addr = < 0xFFFFFFFF >; altr,emac-splitter = < &hps_emac_interface_splitter_0 >; }; hps_emac_interface_splitter_0: splitter@0x100000000 { compatible = "altr,emac-splitter-1.0"; reg = < 0x00000001 0x00000000 0x00000008 >; clocks = < &clk_0 >; }; Let me know how you get on. Thanks, Luke ________________________________ From: [email protected] <[email protected]> on behalf of Michal G <[email protected]> Sent: 16 June 2016 09:01 To: rfi Subject: Re: [Rfi] Emac0 over FPGA not working in 100Mb/s mode On Wed, Jun 15, 2016 at 7:47 PM, Lowell Gilbert <[email protected]<mailto:[email protected]>> wrote: Michal G <[email protected]<mailto:[email protected]>> writes: > I am trying to get up and running EMAC0 over FPGA in 100Mb/s. 1000Mb/s is > working fine. > To bring up/down interface I am using ifplugd. It can successfully plug > 100Mb cable and driver sets libphy: stmmac-0:01 - Link is Up - 100/Full and > if I plug 1000Mb cable it set it to 1000/Full. > > But if I am trying to obtain lease for IP or use static settings with 100Mb > cable, I cannot communicate with the network. But with 1000Mb cable > everything works fine. That's really strange. If the faster link didn't work but the slower one did, that would be far less surprising. I'm pretty sure that nothing you can configure would make 100 megabit fail when 1000 megabit worked fine. One thing that might be interesting is plugging into a gigabit link and then forcing the speed to 100 megabit with ifconfig. If it communicates fine in that setup, the problem might be outside of the SoC board. So I figured it out. There is module in the FPGA between EMAC0 and external PHY called splitter. This splitter has register to switch between speeds. In default it is set to 1000Mb and it needs to be switched to 100Mb if needed. I found out that in 4.5 kernel there is dwmac-socfpga.c part of stmmac.c driver which includes this switching capability. Unfortunately it is missing in 3.10 kernel. Now I need to figure out if it is possible to port this feature to 3.10 and how to do it.
_______________________________________________ Rfi mailing list [email protected] http://lists.rocketboards.org/cgi-bin/mailman/listinfo/rfi
