netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] MDIO firmware upload for offloading CPU
@ 2020-03-22 13:56 Andreas Böhler
  2020-03-22 14:43 ` Andrew Lunn
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Böhler @ 2020-03-22 13:56 UTC (permalink / raw)
  To: netdev

Hi,

I'm working on support for AVM FRITZ!Box routers, specifically the 3390
and 3490. Both contain two SoCs: A Lantiq VDSL SoC that handles VDSL and
Ethernet connections and an Atheros SoC for WiFi. Only the Lantiq has
access to flash memory, the Atheros SoC requires firmware to be uploaded.

AVM has implemented a two-stage firmware upload: The stage 1 firmware is
transferred via MDIO (there is no PHY), the stage 2 firmware is uploaded
via Ethernet. I've got basic support up and running, but I'm unsure how
to proceed:

I implemented a user space utility that uses ioctls to upload the
firmware via MDIO. However, this only works when the switch
driver/ethernet driver is patched to allow MDIO writes to a fixed PHY
(actually, it now allows MDIO writes to an arbitrary address; I patched
the out-of-tree xrx200 driver for now). It is important to note that no
PHY probing must be done, as this confuses the target.

1. How should firmware uploads via MDIO be performed? Preferably in
userspace or in kernel space? Please keep in mind that the protocol is
entirely reverse-engineered.

2. If the firmware upload can/should be done in userspace, how do I best
get access to the MDIO bus?

3. What would be a suitable way to implement it?

Thanks,
Andreas

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-22 21:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-22 13:56 [RFC] MDIO firmware upload for offloading CPU Andreas Böhler
2020-03-22 14:43 ` Andrew Lunn
2020-03-22 20:29   ` Andreas Böhler
2020-03-22 21:09     ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).