<div dir="ltr">Hello,<div><br></div><div>is there any progress yet ?</div><div><br></div><div>Regards,</div><div>Sascha</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Fr., 22. Nov. 2019 um 00:27 Uhr schrieb André Przywara <<a href="mailto:andre.przywara@arm.com">andre.przywara@arm.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 21/11/2019 21:46, Sascha Dewald wrote:<br>
<br>
Hi,<br>
<br>
> could someone give me a summary which is missing in u-boot and what<br>
> needs to be ported ?<br>
<br>
The PHY is pretty much standard and already supported, as far as I can<br>
see, the MAC is not.<br>
<br>
> I found other broadcom drivers, which are already in u-boot.<br>
<br>
The RPi4 uses a Broadcom GENETv5 IP (with a slight tweak). The Linux<br>
driver is quite sophisticated: it supports older revisions (v1..v4),<br>
makes clever use of multiple priority queues and is of course fully<br>
interrupt driven, including napi shortcuts, also enjoys all the glory of<br>
the full Linux driver framework galore.<br>
For U-Boot we can get away with a MUCH simpler driver. Amit and I spent<br>
a while understanding the hardware based on the Linux driver, and Amit<br>
saw the first ARP packet from U-Boot on his laptop yesterday. He is<br>
currently working on the recv() function.<br>
<br>
> How difficult is it, to strip the drivers down, from the linux kernel to<br>
> work with u-boot?<br>
<br>
As mentioned, stripping the driver down (as in copying and editing) is<br>
not a good idea, but the basic driver is already somewhat working<br>
(probing, instantiation, sending packets), so we are not far away.<br>
<br>
If I could ask for just for a few more days of patience, then I am<br>
looking forward for your help with review and testing!<br>
<br>
Cheers,<br>
Andre<br>
<br>
> Am Mi., 20. Nov. 2019 um 12:21 Uhr schrieb Andre Przywara<br>
> <<a href="mailto:andre.przywara@arm.com" target="_blank">andre.przywara@arm.com</a> <mailto:<a href="mailto:andre.przywara@arm.com" target="_blank">andre.przywara@arm.com</a>>>:<br>
> <br>
> On Wed, 20 Nov 2019 12:13:55 +0100<br>
> Matthias Brugger <<a href="mailto:mbrugger@suse.com" target="_blank">mbrugger@suse.com</a> <mailto:<a href="mailto:mbrugger@suse.com" target="_blank">mbrugger@suse.com</a>>> wrote:<br>
> <br>
> Hi,<br>
> <br>
> > Adding Andre as he helps in the effort to port the driver. More<br>
> comments inline.<br>
> ><br>
> > On 19/11/2019 22:46, Heinrich Schuchardt wrote:<br>
> > > On 11/19/19 9:48 PM, Simon Glass wrote: <br>
> > >> Hi Sascha,<br>
> > >><br>
> > >> On Tue, 19 Nov 2019 at 10:10, Sascha Dewald<br>
> <<a href="mailto:sascha.dewald@gmail.com" target="_blank">sascha.dewald@gmail.com</a> <mailto:<a href="mailto:sascha.dewald@gmail.com" target="_blank">sascha.dewald@gmail.com</a>>> wrote: <br>
> > >>><br>
> > >>> Hi Simon,<br>
> > >>><br>
> > >>> it uses bcmgenet.<br>
> > >>><br>
> > >>> Below some information from "hwinfo" and "dmesg"<br>
> > >>> <br>
> > >><br>
> > >> OK, well I think this is in linux as<br>
> drivers/net/ethernet/broadcom/genet<br>
> > >><br>
> > >> I'm not sure about the PHY but it looks like there is no driver for<br>
> > >> genet in U-Boot. I suggest poriting it over. <br>
> <br>
> Amit (CC:ed) is working on that. That is still quite rough and not<br>
> really working yet, but as of yesterday he saw the first (empty)<br>
> packets on the line at least.<br>
> I would assume we get something working still this year.<br>
> <br>
> > > In linux-next/next-20191119<br>
> > > arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b.dtb<br>
> > > there is no network device.<br>
> > > <br>
> > Florian send a new pull request, I think yesterday which adds the<br>
> genet driver<br>
> > to RPi4.<br>
> <br>
> I found the burst length quirk together with the new compatible<br>
> string in David's net-next/master two days ago.<br>
> <br>
> > > On Raspbian you can find for RPi4:<br>
> > ><br>
> > > compatible = "brcm,genet-v5"<br>
> > > relating to Linux drivers/net/ethernet/broadcom/genet/bcmgenet.c<br>
> > > CONFIG_BCMGENET "Broadcom GENET internal MAC support"<br>
> > > <br>
> ><br>
> > RPi4 is a special case as DMA burst size is different from plain<br>
> genet-v5<br>
> > driver. But that might be of no relevance for U-Boot.<br>
> <br>
> Yeah, since there is no other user, we could just go ahead and fix<br>
> the smaller burst length of 8 in U-Boot. I guess we don't care about<br>
> the performance impact that has.<br>
> <br>
> Cheers,<br>
> Andre.<br>
> <br>
> ><br>
> > > compatible = "ethernet-phy-ieee802.3-c22";<br>
> > > relating to Linux drivers/of/of_mdio.c.<br>
> > > CONFIG_OF_MDIO OpenFirmware MDIO bus (Ethernet PHY) accessors<br>
> > ><br>
> > > compatible = "brcm,genet-mdio-v5";<br>
> > > relating to Linux drivers/net/phy/mdio-bcm-unimac.c<br>
> > > CONFIG_MDIO_BCM_UNIMAC "Broadcom UniMAC MDIO bus controller"<br>
> > ><br>
> > > So wouldn't we need all three drivers?<br>
> > ><br>
> > > Maybe Joe can tell us.<br>
> > ><br>
> > > Best regards<br>
> > ><br>
> > > Heinrich<br>
> > ><br>
> > > <br>
> > >><br>
> > >> Regards,<br>
> > >> Simon<br>
> > >> _______________________________________________<br>
> > >> U-Boot-Board-Maintainers mailing list<br>
> > >> <a href="mailto:U-Boot-Board-Maintainers@lists.denx.de" target="_blank">U-Boot-Board-Maintainers@lists.denx.de</a><br>
> <mailto:<a href="mailto:U-Boot-Board-Maintainers@lists.denx.de" target="_blank">U-Boot-Board-Maintainers@lists.denx.de</a>><br>
> > >> <a href="https://lists.denx.de/listinfo/u-boot-board-maintainers" rel="noreferrer" target="_blank">https://lists.denx.de/listinfo/u-boot-board-maintainers</a><br>
> > >> <br>
> > > <br>
> <br>
<br>
</blockquote></div>