[PATCHv4 3/6] ARM: dts: Add initial LS1021A TWR board dts support
From: Jingchang Lu <hidden>
Date: 2014-09-24 11:00:34
Also in:
linux-devicetree
-----Original Message----- From: Arnd Bergmann [mailto:arnd at arndb.de] Sent: Wednesday, September 24, 2014 5:36 PM To: Lu Jingchang-B35083 Cc: Guo Shawn-R65073; mark.rutland at arm.com; linux-arm- kernel at lists.infradead.org; devicetree at vger.kernel.org; Lu Chen-B46807; Fu Chao-B44548 Subject: Re: [PATCHv4 3/6] ARM: dts: Add initial LS1021A TWR board dts support On Wednesday 24 September 2014 05:47:53 Jingchang Lu wrote:quoted
The ethernet device nodes already have the phy-handle properties totheir mdio nodes.quoted
The alias for PHY nodes here is: The ethernet has two kind of PHY interface, one is SGMII, and the other is RGMII, The selection is done by the reset configuration word(RCW), so Phy-handle properties should be change properly to reflecting the PHY interface selection. This is done by fixing up dtb in u-boot before booting the kernel. Thus the alias for PHY nodes isadded here for fdt finding the PHY nodes easily. Ok, I see. I thought that this was what the labels in the dtb were supposed to be used for. Can't you do the same thing in u-boot by using a label as opposed to the alias? IIRC you should be able to add an additional label like +&mdio0 { + enet1_sgmii_phy: sgmii_phy0: ethernet-phy at 0 { + reg = <0x0>; + }; and then use libfdt to find the node through that, rather than through the alias. I don't know how things are handled on other platforms, but I think that was how it was initially thought up when we introduced the fdt format on PowerPC. Arnd
We also do the phy-handle fixup on our PowerPC platform based on the aliases, and so I adopt the same way to make these fixup consistent between SoCs. And the u-boot fdt fixup code base on the aliases has been upstreamed, so may we keep this aliases unchanged? BTW, find a node by alias is easily, could you give me some clue on finding a node by a label directly, Thanks. Best Regards, Jingchang