[PATCH] ARM: sun8i: sunxi-h3-h5: Prevent merge of external and integrated PHY

From: Corentin Labbe
Date: Fri Aug 11 2017 - 08:49:54 EST


Actually, some external and integrated PHY are merged due to same dtnode
name "ethernet-phy@1".

This is problematic when we will want to use the phy-is-integrated
property. (Need to delete it on all external PHY node)

An easy solution is to set integrated PHY nodeaddresss at a fake one
that would never be used.
Since board makers currently only provides PHY at addresses 1 and 7,
we will use 31.

Signed-off-by: Corentin Labbe <clabbe.montjoie@xxxxxxxxx>
---
arch/arm/boot/dts/sunxi-h3-h5.dtsi | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
index 54fc24e4c569..2110b0069e33 100644
--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
@@ -420,7 +420,15 @@
mdio: mdio {
#address-cells = <1>;
#size-cells = <0>;
- int_mii_phy: ethernet-phy@1 {
+ /*
+ * Using 31 permits to make a separation between
+ * this integrated PHY and external ones.
+ * Without it, external "ethernet-phy@1" will be
+ * merged with it (due to same dtnode name).
+ * Board makers currently only provides PHY at
+ * addresses 1 and 7.
+ */
+ int_mii_phy: ethernet-phy@31 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <1>;
clocks = <&ccu CLK_BUS_EPHY>;
--
2.13.0