Skip to content

arm64: add ethernet to orange pi 3

Corentin Labbe linux-arm-kernel linux-devicetree linux-sunxi lkml netdev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 12 repliesIn review
  2. v33 patches 1 replySuperseded
  3. v25 patches 10 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v16 patches18 repliesSuperseded

Changes in v4 from the cover letter

- fixes kbuild robot report

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3regulator: Add of_regulator_bulk_get_alldrivers/regulator/of_regulator.c include/linux/regulator/consumer.h+100 -08 replies
2/3phy: handle optional regulator for PHYdrivers/net/mdio/fwnode_mdio.c drivers/net/phy/phy_device.c include/linux/phy.h+43 -12 replies
3/3arm64: dts: allwinner: orange-pi-3: Enable ethernetarch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts+38 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/3] arm64: add ethernet to orange pi 3

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/[email protected]/
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/[email protected]/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/[email protected]/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.

Changes since v3:
- fixes kbuild robot report

Corentin Labbe (2):
regulator: Add of_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/fwnode_mdio.c                | 31 ++++++-
 drivers/net/phy/phy_device.c                  | 10 ++
 drivers/regulator/of_regulator.c              | 92 +++++++++++++++++++
 include/linux/phy.h                           |  3 +
 include/linux/regulator/consumer.h            |  8 ++
 6 files changed, 181 insertions(+), 1 deletion(-)
Signature · 1 line
2.37.4