All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Golle <daniel@makrotopia.org>
To: "Lucien.Jheng" <lucienzx159@gmail.com>
Cc: Marek Vasut <marek.vasut@mailbox.org>,
	ilias.apalodimas@linaro.org, jerome.forissier@linaro.org,
	marek.vasut+renesas@mailbox.org, paul.barker.ct@bp.renesas.com,
	pbrobinson@gmail.com, u-boot@lists.denx.de,
	joseph.lin@airoha.com, wenshin.chung@airoha.com,
	lucien.jheng@airoha.com, frank-w@public-files.de,
	ericwouds@gmail.com
Subject: Re: [PATCH 1/1] net: phy: Add the Airoha EN8811H PHY driver
Date: Sun, 20 Apr 2025 02:43:03 +0100	[thread overview]
Message-ID: <aARRJ85ULmqsYgPo@makrotopia.org> (raw)
In-Reply-To: <2aa57092-f844-4ef8-9b97-0998a697c0be@gmail.com>

Hi Lucien,
Hi Marek,

On Fri, Apr 18, 2025 at 11:57:19PM +0800, Lucien.Jheng wrote:
> Hi Marek Vasut
> 
> Thanks for the review.
> 
> The next commit will change the loading of the PHY firmware to the
> filesystem on a block device.

Please keep in mind that most systems using this PHY are (like the
OpenWrt One, for example) simple embedded devices with only a small
amount of NAND or NOR flash. Loading the firmware from a filesystem
means overhead and complexity, while loading it from a simple
MTD partition, raw UBI volume or one of the EMMC boot hw partitions
is a better match to the reality of the devices it is being used on,
making the process less complex and more deterministic, and hence
more robust.

> [...]
> Marek Vasut 於 2025/4/6 下午 09:30 寫道:
> > [...]
> > 
> > Can this do the same thing as Aquatia PHY and load the PHY firmware from
> > filesystem on block device instead , using the blk* or fs* commands ?
> > Then the hard-coded filesize and co. won't be necessary.

Note that the size is afaik given by the hardware in this case, it won't
every change. Hence any handling of a more dynamic approach of loading
the firmware will also have to come with a size-check against the (again)
hard-coded size anyway.

> > 
> > If you need board specific loading override, implement __weak default
> > loading from file on filesystem by default (see what Aquatia does) and
> > then override the loading function on board or architecture level.

That can work, but in practice it will lead to code duplication, as all
platforms using those PHYs are kinda similar (ie. MT7981, MT7986 and
probably Airoha/EcoNet router SoCs as well)

> > 
> > U-Boot really needs a proper generic firmware loader, because this
> > firmware stuff keeps showing up more and more, but I cannot ask you to
> > write one only because of this PHY ... but if you are up for a challenge
> > ...
> > 
> > [...]

  parent reply	other threads:[~2025-04-20  1:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-06 13:02 [PATCH 1/1] net: phy: Add the Airoha EN8811H PHY driver Lucien.Jheng
2025-04-06 13:30 ` Marek Vasut
     [not found]   ` <2aa57092-f844-4ef8-9b97-0998a697c0be@gmail.com>
2025-04-20  1:43     ` Daniel Golle [this message]
2025-04-20 17:55       ` Marek Vasut
2025-04-21 15:00         ` Lucien.Jheng
2025-04-17 17:06 ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aARRJ85ULmqsYgPo@makrotopia.org \
    --to=daniel@makrotopia.org \
    --cc=ericwouds@gmail.com \
    --cc=frank-w@public-files.de \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jerome.forissier@linaro.org \
    --cc=joseph.lin@airoha.com \
    --cc=lucien.jheng@airoha.com \
    --cc=lucienzx159@gmail.com \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=marek.vasut@mailbox.org \
    --cc=paul.barker.ct@bp.renesas.com \
    --cc=pbrobinson@gmail.com \
    --cc=u-boot@lists.denx.de \
    --cc=wenshin.chung@airoha.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.