* Re: [RFC PATCH net-next] net: phy: aquantia: add firmware load support
[not found] <20230930104008.234831-1-robimarko@gmail.com>
@ 2023-10-04 23:28 ` Jakub Kicinski
2023-10-05 2:43 ` Andrew Lunn
0 siblings, 1 reply; 3+ messages in thread
From: Jakub Kicinski @ 2023-10-04 23:28 UTC (permalink / raw)
To: Robert Marko
Cc: andrew, hkallweit1, linux, davem, edumazet, pabeni, netdev,
linux-kernel, Christian Marangi, Luis Chamberlain, devicetree
On Sat, 30 Sep 2023 12:39:44 +0200 Robert Marko wrote:
> + ret = of_property_read_string(dev->of_node, "firmware-name",
> + &fw_name);
Perhaps a well established weirdness of the embedded world but why read
the fw name from OF?! You can identify what PHY it is and decide the
file name based on that. And also put that fw name in MODULE_FIRMWARE()
so that initramfs can be built with appropriate file in place :S
> + ret = request_firmware(&fw, fw_name, dev);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC PATCH net-next] net: phy: aquantia: add firmware load support
2023-10-04 23:28 ` [RFC PATCH net-next] net: phy: aquantia: add firmware load support Jakub Kicinski
@ 2023-10-05 2:43 ` Andrew Lunn
2023-10-05 14:24 ` Jakub Kicinski
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2023-10-05 2:43 UTC (permalink / raw)
To: Jakub Kicinski
Cc: Robert Marko, hkallweit1, linux, davem, edumazet, pabeni, netdev,
linux-kernel, Christian Marangi, Luis Chamberlain, devicetree
On Wed, Oct 04, 2023 at 04:28:31PM -0700, Jakub Kicinski wrote:
> On Sat, 30 Sep 2023 12:39:44 +0200 Robert Marko wrote:
> > + ret = of_property_read_string(dev->of_node, "firmware-name",
> > + &fw_name);
>
> Perhaps a well established weirdness of the embedded world but why read
> the fw name from OF?! You can identify what PHY it is and decide the
> file name based on that. And also put that fw name in MODULE_FIRMWARE()
> so that initramfs can be built with appropriate file in place :S
The Aquantia PHY and its `firmware` is just weird. It is more than
just firmware, it also contains what i think they call provisioning.
That is basically the reset defaults for registers. And not everything
is documented, and i think parts of that provision contains SERDES eye
configuration. So i think you end up with a custom firmware per board?
And you can never trust the firmware in one device will do the same
thing as a different firmware in another device, because the reset
defaults are a bit fuzzy. The PHY driver is somewhat built on sand,
since you cannot really trust any register to have any specific reset
value.
So i can understand putting the board specific firmware name in DT,
and that the firmware will never be in linux-firmware because it would
not scale, and there never being one firmware usable for all
boards. And this odd way of doing things means the usual mechanisms
for getting the firmware in initramfs does not work.
I suppose the question is, do we want to say this is all too ugly for
Linux, solve it in the bootloader, or spend the extra $0.50 for a
flash chip and put the firmware in at the factory. As a kernel
developer i would want the boot loader to solve this, so i can TFTP
boot the kernel. I would also like having a rescue mechanism for when
i brick Linux on the box and need to boot a Debian install image to
recover it.
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC PATCH net-next] net: phy: aquantia: add firmware load support
2023-10-05 2:43 ` Andrew Lunn
@ 2023-10-05 14:24 ` Jakub Kicinski
0 siblings, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2023-10-05 14:24 UTC (permalink / raw)
To: Andrew Lunn
Cc: Robert Marko, hkallweit1, linux, davem, edumazet, pabeni, netdev,
linux-kernel, Christian Marangi, Luis Chamberlain, devicetree
On Thu, 5 Oct 2023 04:43:51 +0200 Andrew Lunn wrote:
> The Aquantia PHY and its `firmware` is just weird. It is more than
> just firmware, it also contains what i think they call provisioning.
> That is basically the reset defaults for registers. And not everything
> is documented, and i think parts of that provision contains SERDES eye
> configuration. So i think you end up with a custom firmware per board?
Ah, that makes sense, thanks for explaining.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-05 14:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230930104008.234831-1-robimarko@gmail.com>
2023-10-04 23:28 ` [RFC PATCH net-next] net: phy: aquantia: add firmware load support Jakub Kicinski
2023-10-05 2:43 ` Andrew Lunn
2023-10-05 14:24 ` Jakub Kicinski
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).