From: Philipp Zabel <p.zabel@pengutronix.de>
To: "Théo Lebrun" <theo.lebrun@bootlin.com>,
"Vladimir Kondratiev" <vladimir.kondratiev@mobileye.com>,
"Grégory Clement" <gregory.clement@bootlin.com>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Vinod Koul" <vkoul@kernel.org>,
"Kishon Vijay Abraham I" <kishon@kernel.org>,
"Michael Turquette" <mturquette@baylibre.com>,
"Stephen Boyd" <sboyd@kernel.org>,
"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>
Cc: linux-mips@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org,
linux-clk@vger.kernel.org,
"Benoît Monin" <benoit.monin@bootlin.com>,
"Maxime Chevallier" <maxime.chevallier@bootlin.com>,
"Tawfik Bayouk" <tawfik.bayouk@mobileye.com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
"Conor Dooley" <conor.dooley@microchip.com>,
"Jerome Brunet" <jbrunet@baylibre.com>,
"Andrew Lunn" <andrew@lunn.ch>
Subject: Re: [PATCH v2 0/7] Add generic PHY driver used by MACB/GEM on EyeQ5
Date: Thu, 06 Nov 2025 11:51:26 +0100 [thread overview]
Message-ID: <56a49462312d89fd0de6da273f698c0f89e73ada.camel@pengutronix.de> (raw)
In-Reply-To: <20251101-macb-phy-v2-0-c1519eef16d3@bootlin.com>
On Sa, 2025-11-01 at 09:53 +0100, Théo Lebrun wrote:
> EyeQ5 SoCs integrate two GEM instances. A system-controller register
> region named "OLB" has some control over the Ethernet PHY integration.
>
> Past iterations [0] touched those syscon registers directly from MACB.
> It was a bad idea. Extend the current OLB ecosystem with a new generic
> PHY driver.
> - OLB is carried by one main platform driver: clk-eyeq.
> - It instantiates auxiliary devices: reset-eyeq & pinctrl-eyeq5.
> - We add a new one: phy-eyeq5-eth.
>
> Here is a DT overview:
>
> olb: system-controller@e00000 {
> compatible = "mobileye,eyeq5-olb", "syscon";
> reg = <0 0xe00000 0x0 0x400>;
> // ...
> #reset-cells = <2>;
> #clock-cells = <1>;
> #phy-cells = <1>; // <= this is new
> };
>
> macb0: ethernet@2a00000 {
> compatible = "mobileye,eyeq5-gem";
> phys = <&olb 0>; // <= GEM device consumes the PHY
> // ...
> };
>
> macb1: ethernet@2b00000 {
> compatible = "mobileye,eyeq5-gem";
> phys = <&olb 1>; // <= same thing for the second instance
> // ...
> };
>
> The Linux MACB driver already consumes a generic PHY for some other
> compatibles, this is nothing new. The MACB series [1] has been merged
> into net-next/main.
>
> --
>
> One topic to talk about: the whole "we must assign child->of_node
> manually". Auxiliary driver core does not do it automatically, so
> either the parent (clk-eyeq) or the children must do it.
>
> In OLB land, until now, children were doing it with a
> device_set_of_node_from_dev(dev, dev->parent) call in probe.
>
> Recently, Jerome Brunet added devm_auxiliary_device_create():
> eaa0d30216c1 ("driver core: auxiliary bus: add device creation
> helpers"). Using that cleans up clk-eyeq but means we must remove
> device_set_of_node_from_dev() from reset-eyeq in the same patch series,
> as the helpers do the dev->of_node assignement from the parent driver.
>
> That explains why the ideal patch:
> [PATCH 4/7] clk: eyeq: add EyeQ5 children auxiliary device for generic PHYs
> Turned into those three:
> [PATCH 3/7] clk: eyeq: use the auxiliary device creation helper
> [PATCH 4/7] clk: eyeq: add EyeQ5 children auxiliary device for generic PHYs
> [PATCH 5/7] reset: eyeq: drop device_set_of_node_from_dev() done by parent
>
> --
>
> About merging, it'll probably be complex. I see no build dependencies,
> but the board will be in an odd state if only some patches are applied.
> Some dev_warn() at boot and dev->of_node refcounting issues at unload.
>
> - [PATCH 1/7] dt-bindings: soc: mobileye: OLB is an Ethernet PHY provider on EyeQ5
> We touch dt-bindings because OLB becomes a PHY provider.
> => linux-mips (?)
>
> - [PATCH 2/7] phy: Add driver for EyeQ5 Ethernet PHY wrapper
> We add the generic PHY driver in drivers/phy/phy-eyeq5-eth.c with the
> usual Kconfig, Makefile and MAINTAINERS changes.
> => linux-phy (?)
>
> - [PATCH 6/7] MIPS: mobileye: eyeq5: add two Cadence GEM Ethernet controllers
> [PATCH 7/7] MIPS: mobileye: eyeq5-epm: add two Cadence GEM Ethernet PHYs
> DTS patches to add both the #phy-cells of OLB and the MACB instances.
> => linux-mips
>
> - [PATCH 4/7] clk: eyeq: add EyeQ5 children auxiliary device for generic PHYs
> We must update clk-eyeq because it instantiates a new auxdev.
> => linux-clk
>
> - [PATCH 3/7] clk: eyeq: use the auxiliary device creation helper
> [PATCH 5/7] reset: eyeq: drop device_set_of_node_from_dev() done by parent
> With the dev->of_node assignement, we must also correct reset-eyeq.
> => separate them into linux-clk and linux-reset?
Since 3 and 4 should go via clk, and 5 has a dependency on 3, I would
suggest merging them all together.
regards
Philipp
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2025-11-06 10:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-01 8:53 [PATCH v2 0/7] Add generic PHY driver used by MACB/GEM on EyeQ5 Théo Lebrun
2025-11-01 8:53 ` [PATCH v2 1/7] dt-bindings: soc: mobileye: OLB is an Ethernet PHY provider " Théo Lebrun
2025-11-01 8:53 ` [PATCH v2 2/7] phy: Add driver for EyeQ5 Ethernet PHY wrapper Théo Lebrun
2025-11-01 8:53 ` [PATCH v2 3/7] clk: eyeq: use the auxiliary device creation helper Théo Lebrun
2025-11-01 8:53 ` [PATCH v2 4/7] clk: eyeq: add EyeQ5 children auxiliary device for generic PHYs Théo Lebrun
2025-11-01 8:53 ` [PATCH v2 5/7] reset: eyeq: drop device_set_of_node_from_dev() done by parent Théo Lebrun
2025-11-06 10:51 ` Philipp Zabel
2025-11-01 8:53 ` [PATCH v2 6/7] MIPS: mobileye: eyeq5: add two Cadence GEM Ethernet controllers Théo Lebrun
2025-11-07 9:39 ` Thomas Bogendoerfer
2025-11-01 8:53 ` [PATCH v2 7/7] MIPS: mobileye: eyeq5-epm: add two Cadence GEM Ethernet PHYs Théo Lebrun
2025-11-07 9:39 ` Thomas Bogendoerfer
2025-11-06 10:51 ` Philipp Zabel [this message]
2025-11-07 9:07 ` [PATCH v2 0/7] Add generic PHY driver used by MACB/GEM on EyeQ5 Théo Lebrun
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=56a49462312d89fd0de6da273f698c0f89e73ada.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=andrew@lunn.ch \
--cc=benoit.monin@bootlin.com \
--cc=conor+dt@kernel.org \
--cc=conor.dooley@microchip.com \
--cc=devicetree@vger.kernel.org \
--cc=gregory.clement@bootlin.com \
--cc=jbrunet@baylibre.com \
--cc=kishon@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=maxime.chevallier@bootlin.com \
--cc=mturquette@baylibre.com \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=tawfik.bayouk@mobileye.com \
--cc=theo.lebrun@bootlin.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=tsbogend@alpha.franken.de \
--cc=vkoul@kernel.org \
--cc=vladimir.kondratiev@mobileye.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 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).