linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] Add ethernet support for Orange Pi 3
@ 2019-08-20 14:53 megous
  2019-08-20 14:53 ` [PATCH 1/6] dt-bindings: net: sun8i-a83t-emac: Add phy-supply property megous
                   ` (6 more replies)
  0 siblings, 7 replies; 19+ messages in thread
From: megous @ 2019-08-20 14:53 UTC (permalink / raw)
  To: David S. Miller, Rob Herring, Mark Rutland, Maxime Ripard,
	Chen-Yu Tsai, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	Maxime Coquelin
  Cc: Ondrej Jirman, netdev, devicetree, linux-arm-kernel,
	linux-kernel, linux-stm32

From: Ondrej Jirman <megous@megous.com>

This series implements ethernet support for Xunlong Orange Pi 3 board, by:

- making small cleanups of existing dwmac-sun8i code
- adding DT bindings docummentation
- adding support for phy-io-supply to dwmac-sun8i code
- adding DT configuration for Orange Pi 3 board

For some people, ethernet doesn't work after reboot because u-boot doesn't
support AXP805 PMIC, and will not turn off the etherent PHY regulators.
So the regulator controlled by gpio will be shut down, but the other one
controlled by the AXP PMIC will not.

This is a problem only when running with a builtin driver. This needs
to be fixed in u-boot and should not prevent these patches from being
merged.

This evolved out of the Orange Pi 3 patches series, as I didn't want
to stretch that out any longer.

Please take a look.

thank you and regards,
  Ondrej Jirman

Ondrej Jirman (6):
  dt-bindings: net: sun8i-a83t-emac: Add phy-supply property
  dt-bindings: net: sun8i-a83t-emac: Add phy-io-supply property
  net: stmmac: sun8i: Use devm_regulator_get for PHY regulator
  net: stmmac: sun8i: Rename PHY regulator variable to regulator_phy
  net: stmmac: sun8i: Add support for enabling a regulator for PHY I/O
    pins
  arm64: dts: allwinner: orange-pi-3: Enable ethernet

 .../net/allwinner,sun8i-a83t-emac.yaml        |  8 ++
 .../dts/allwinner/sun50i-h6-orangepi-3.dts    | 40 ++++++++++
 .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 74 ++++++++++++-------
 3 files changed, 96 insertions(+), 26 deletions(-)

-- 
2.22.1


^ permalink raw reply	[flat|nested] 19+ messages in thread
* [PATCH 0/6] arm64: add ethernet to orange pi 3
@ 2022-05-09  7:48 Corentin Labbe
  2022-05-09  7:48 ` [PATCH 6/6] arm64: dts: allwinner: orange-pi-3: Enable ethernet Corentin Labbe
  0 siblings, 1 reply; 19+ messages in thread
From: Corentin Labbe @ 2022-05-09  7:48 UTC (permalink / raw)
  To: alexandre.torgue, andrew, broonie, calvin.johnson, davem,
	edumazet, hkallweit1, jernej.skrabec, joabreu,
	krzysztof.kozlowski+dt, kuba, lgirdwood, linux, pabeni,
	peppe.cavallaro, robh+dt, samuel, wens
  Cc: netdev, devicetree, linux-arm-kernel, linux-kernel, linux-sunxi,
	Corentin Labbe

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 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.

This serie try to handle this.

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

Corentin Labbe (5):
  phy: handle optional regulator for PHY
  net: stmmac: dwmac-sun8i: remove regulator
  dt-bindings: net: Add documentation for phy-supply
  ARM: dts: sunxi: move phy regulator in PHY node
  arm64: dts: allwinner: move phy regulator in PHY node

Ondřej Jirman (1):
  arm64: dts: allwinner: orange-pi-3: Enable ethernet

 .../devicetree/bindings/net/ethernet-phy.yaml | 10 +++++
 arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts  |  2 +-
 .../boot/dts/sun8i-a83t-cubietruck-plus.dts   |  2 +-
 arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts |  2 +-
 arch/arm/boot/dts/sun8i-h3-nanopi-r1.dts      |  2 +-
 arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts  |  2 +-
 .../arm/boot/dts/sun8i-h3-orangepi-plus2e.dts |  2 +-
 arch/arm/boot/dts/sun8i-h3-zeropi.dts         |  2 +-
 .../boot/dts/sun8i-r40-bananapi-m2-ultra.dts  |  2 +-
 arch/arm/boot/dts/sun8i-r40-oka40i-c.dts      |  2 +-
 .../boot/dts/sun8i-v40-bananapi-m2-berry.dts  |  2 +-
 arch/arm/boot/dts/sun9i-a80-cubieboard4.dts   |  2 +-
 arch/arm/boot/dts/sun9i-a80-optimus.dts       |  2 +-
 arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi |  2 +-
 .../dts/allwinner/sun50i-a64-bananapi-m64.dts |  2 +-
 .../dts/allwinner/sun50i-a64-nanopi-a64.dts   |  2 +-
 .../sun50i-a64-oceanic-5205-5inmfd.dts        |  2 +-
 .../dts/allwinner/sun50i-a64-olinuxino.dts    |  2 +-
 .../dts/allwinner/sun50i-a64-orangepi-win.dts |  2 +-
 .../boot/dts/allwinner/sun50i-a64-pine64.dts  |  2 +-
 .../allwinner/sun50i-a64-sopine-baseboard.dts |  2 +-
 .../sun50i-h5-libretech-all-h5-cc.dts         |  2 +-
 .../allwinner/sun50i-h5-nanopi-neo-plus2.dts  |  2 +-
 .../dts/allwinner/sun50i-h5-nanopi-neo2.dts   |  2 +-
 .../dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts |  2 +-
 .../dts/allwinner/sun50i-h5-orangepi-pc2.dts  |  2 +-
 .../allwinner/sun50i-h5-orangepi-prime.dts    |  2 +-
 .../sun50i-h5-orangepi-zero-plus.dts          |  2 +-
 .../dts/allwinner/sun50i-h6-beelink-gs1.dts   |  2 +-
 .../dts/allwinner/sun50i-h6-orangepi-3.dts    | 38 +++++++++++++++++++
 .../allwinner/sun50i-h6-pine-h64-model-b.dts  |  8 ++--
 .../boot/dts/allwinner/sun50i-h6-pine-h64.dts |  2 +-
 .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 37 +-----------------
 drivers/net/mdio/fwnode_mdio.c                | 32 ++++++++++++++++
 drivers/net/phy/phy_device.c                  | 20 ++++++++++
 include/linux/phy.h                           |  3 ++
 36 files changed, 138 insertions(+), 68 deletions(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2022-05-09  7:52 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-20 14:53 [PATCH 0/6] Add ethernet support for Orange Pi 3 megous
2019-08-20 14:53 ` [PATCH 1/6] dt-bindings: net: sun8i-a83t-emac: Add phy-supply property megous
2019-08-20 16:18   ` Rob Herring
2019-08-20 14:53 ` [PATCH 2/6] dt-bindings: net: sun8i-a83t-emac: Add phy-io-supply property megous
2019-08-20 16:20   ` Rob Herring
2019-08-20 16:34     ` Ondřej Jirman
2019-08-20 16:57       ` Rob Herring
2019-08-20 22:36         ` Ondřej Jirman
2019-08-20 14:53 ` [PATCH 3/6] net: stmmac: sun8i: Use devm_regulator_get for PHY regulator megous
2019-08-20 15:39   ` Andrew Lunn
2019-08-20 15:47     ` Ondřej Jirman
2019-08-20 15:57       ` Andrew Lunn
2019-08-20 16:20         ` Ondřej Jirman
2019-08-20 15:56     ` Ondřej Jirman
2019-08-20 14:53 ` [PATCH 4/6] net: stmmac: sun8i: Rename PHY regulator variable to regulator_phy megous
2019-08-20 14:53 ` [PATCH 5/6] net: stmmac: sun8i: Add support for enabling a regulator for PHY I/O pins megous
2019-08-20 14:53 ` [PATCH 6/6] arm64: dts: allwinner: orange-pi-3: Enable ethernet megous
2019-08-20 20:56 ` [PATCH 0/6] Add ethernet support for Orange Pi 3 David Miller
2022-05-09  7:48 [PATCH 0/6] arm64: add ethernet to orange pi 3 Corentin Labbe
2022-05-09  7:48 ` [PATCH 6/6] arm64: dts: allwinner: orange-pi-3: Enable ethernet Corentin Labbe

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).