From: Corentin Labbe <clabbe@baylibre.com>
To: andrew@lunn.ch, broonie@kernel.org, calvin.johnson@oss.nxp.com,
davem@davemloft.net, edumazet@google.com, hkallweit1@gmail.com,
jernej.skrabec@gmail.com, krzysztof.kozlowski+dt@linaro.org,
kuba@kernel.org, lgirdwood@gmail.com, linux@armlinux.org.uk,
pabeni@redhat.com, robh+dt@kernel.org, samuel@sholland.org,
wens@csie.org
Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev,
netdev@vger.kernel.org, Corentin Labbe <clabbe@baylibre.com>
Subject: [PATCH v3 0/3] arm64: add ethernet to orange pi 3
Date: Mon, 23 May 2022 05:28:04 +0000 [thread overview]
Message-ID: <20220523052807.4044800-1-clabbe@baylibre.com> (raw)
Hello
2 sunxi board still does not have ethernet working, orangepi 1+ and
orangepi 3.
This is due to the fact thoses boards have a PHY which need 2 regulators.
A first attempt by Ondřej Jirman was made to support them was made by adding support in
stmmac driver:
https://lore.kernel.org/lkml/20190820145343.29108-6-megous@megous.com/
Proposal rejected, since regulators need to be handled by the PHY core.
My first tentative was to just add handling of phy and phy-io in
phy-core:
https://lore.kernel.org/netdev/20220509074857.195302-7-clabbe@baylibre.com/T/
But having hard-coded phy names was rejected.
Second tentative tryed the same path than clocks and clock-names for
regulators.
https://lore.kernel.org/netdev/0518eef1-75a6-fbfe-96d8-bb1fc4e5178a@linaro.org/t/
But using this was rejected by DT maintainers.
So v3 use a new regulator_bulk_get_all() which grab all supplies
properties in a DT node.
But this way could have some problem, a netdev driver could handle
already its PHY (like dwmac-sun8i already do) and so both phy-core and
the netdev will use both.
It is why phy-supply was renamed in ephy-supply in patch #3.
This serie was tested on whole range of board and PHY architecture:
- internal PHY
* sun8i-h3-orangepi-pc
- external PHY
* sun50i-h6-pine-h64
* sun8i-r40-bananapi-m2-ultra
* sun8i-a83t-bananapi-m3
* sun50i-a64-bananapi-m64
* sun50i-h6-orangepi-3
* sun50i-h5-nanopi-neo-plus2
The resume/suspend of PHY was tested.
Regards
changes since v1:
- Add regulator_bulk_get_all for ease handling of PHY regulators
- Removed all convertion patchs to keep DT compatibility.
Changes since v2:
- removed use of regulator-names and regulators list.
Corentin Labbe (2):
regulator: Add regulator_bulk_get_all
phy: handle optional regulator for PHY
Ondřej Jirman (1):
arm64: dts: allwinner: orange-pi-3: Enable ethernet
.../dts/allwinner/sun50i-h6-orangepi-3.dts | 38 ++++++++
drivers/net/mdio/Kconfig | 1 +
drivers/net/mdio/fwnode_mdio.c | 36 +++++++-
drivers/net/phy/phy_device.c | 10 ++
drivers/regulator/core.c | 92 +++++++++++++++++++
include/linux/phy.h | 3 +
include/linux/regulator/consumer.h | 2 +
7 files changed, 178 insertions(+), 4 deletions(-)
--
2.35.1
next reply other threads:[~2022-05-23 5:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-23 5:28 Corentin Labbe [this message]
2022-05-23 5:28 ` [PATCH v3 1/3] regulator: Add regulator_bulk_get_all Corentin Labbe
2022-05-23 9:54 ` kernel test robot
2022-05-23 10:04 ` kernel test robot
2022-05-23 13:17 ` Mark Brown
2022-05-23 5:28 ` [PATCH v3 2/3] phy: handle optional regulator for PHY Corentin Labbe
2022-05-23 9:13 ` kernel test robot
2022-05-23 5:28 ` [PATCH v3 3/3] arm64: dts: allwinner: orange-pi-3: Enable ethernet Corentin Labbe
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=20220523052807.4044800-1-clabbe@baylibre.com \
--to=clabbe@baylibre.com \
--cc=andrew@lunn.ch \
--cc=broonie@kernel.org \
--cc=calvin.johnson@oss.nxp.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=jernej.skrabec@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh+dt@kernel.org \
--cc=samuel@sholland.org \
--cc=wens@csie.org \
/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).