Thread (14 messages) 14 messages, 4 authors, 2017-08-17

[PATCH 2/3] ARM: sun8i: sunxi-h3-h5: add phy-is-integrated property to internal PHY

From: robh@kernel.org (Rob Herring)
Date: 2017-08-17 15:11:02
Also in: linux-devicetree, lkml, netdev

On Fri, Aug 11, 2017 at 08:03:29AM -0700, Florian Fainelli wrote:
On August 11, 2017 6:25:26 AM PDT, Corentin Labbe [off-list ref] wrote:
quoted
On Fri, Aug 11, 2017 at 04:22:11PM +0800, Chen-Yu Tsai wrote:
quoted
On Fri, Aug 11, 2017 at 4:19 PM, Corentin Labbe
[off-list ref] wrote:
quoted
On Fri, Aug 11, 2017 at 04:11:13PM +0800, Chen-Yu Tsai wrote:
quoted
On Fri, Aug 11, 2017 at 4:05 PM, Corentin Labbe
[off-list ref] wrote:
quoted
On Fri, Aug 11, 2017 at 10:42:51AM +0800, Chen-Yu Tsai wrote:
quoted
Hi,

On Thu, Aug 10, 2017 at 4:51 PM, Corentin Labbe
[off-list ref] wrote:
quoted
This patch add the new phy-is-integrated property to the
internal PHY
quoted
quoted
quoted
quoted
quoted
quoted
node.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 arch/arm/boot/dts/sunxi-h3-h5.dtsi | 1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
quoted
quoted
quoted
quoted
quoted
quoted
index 4b599b5d26f6..54fc24e4c569 100644
--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
@@ -425,6 +425,7 @@
                                        reg = <1>;
                                        clocks = <&ccu
CLK_BUS_EPHY>;
quoted
quoted
quoted
quoted
quoted
quoted
                                        resets = <&ccu
RST_BUS_EPHY>;
quoted
quoted
quoted
quoted
quoted
quoted
+                                       phy-is-integrated;
You also need to "delete" this property at the board level for
any board that has the external PHY at address <1>. Otherwise
they will stop working. This is due to the internal and
external
quoted
quoted
quoted
quoted
quoted
PHYs having the same path and node name in the device tree, so
they are effectively the same node.

ChenYu
They have not the same name, ext_rgmii_phy vs int_mii_phy.
That is just the label. The label plays no part in device tree
merging. The path
quoted
quoted
quoted
    /soc/ethernet at 1c30000/mdio/ethernet-phy at 1

is the same. You can look under

    /proc/device-tree/soc/ethernet at 1c30000/mdio

on the OrangePI Plus 2E or any other H3 board that uses an
external PHY at address 1.

ChenYu
Since we get the phy node by phy-handle and not by path, I think
all should be good.
quoted
You are not getting me. The fact that the two seemingly separate
nodes are merged together means, whatever properties you put in
the internal PHY node, also affect the external PHY node. Once
compiled, they are the SAME node.
Hello Rob, florian, mark

Adding a delete property on all external ethernet-phy at 1 is a bit
overkill, and I dont like the idea that nodes are merged.
This is not exactly up to you that's just how DTC works.
quoted
What do you think about other possible solutions:
- Using integrated-phy at 1 for the integrated PHY node name
That might be okay although you are using now a seemingly non-standard unit name.
quoted
- Using a fake address like 31 (see patch below)
You could also drop the address part in the unit name although we'd probably get a DTC warning for that.

I suspect both of your solutions and what I mentioned above will be producing DTC warnings to some extent... Rob what do you think?
If you have 2 devices at the same address, then there is some mux in the 
middle. Describe that and you problems should be solved. The internal 
phy is always there, so it should be able to always be in the DT.

Rob
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help