Fix SC59x Ethernet PHY descriptions - #3444
Conversation
|
I will test it on the hardware and mark it as ready for review afterwards, changes themselves are fairly straightforward. |
|
I tested the changes on the U-Boot side first since it was easier to validate for me 😛. I also found that the U-Boot ADIN PHY driver was outdated or old bit and did not register ADIN1200 support. I updated the driver to support things we need and align Linux driver. The U-Boot pull request is available here: |
LLM reviewThis series migrates the SC594 and SC598 Ethernet device-tree nodes from stale TI DP83867/DP83848 descriptions to the correct ADI ADIN1300/ADIN1200 PHYs, moves reset management from GPIO hogs to run: 29704096847
|
| adin1200: ethernet-phy@1 { | ||
| compatible = "ethernet-phy-ieee802.3-c22"; | ||
| reg = <1>; | ||
| adi,fifo-depth-bits = <8>; |
There was a problem hiding this comment.
I get that the default is 8, but what's the point of adding this explicitly? just curious.
There was a problem hiding this comment.
I added it only to make the RMII configuration explicit, just to make it seen when someone just check the devicetree.
There was a problem hiding this comment.
I think RMII is clear from the &emac1 :: phy-mode = "rmii" property.
I would advise not to explicitly fill this property in unless you can explain why a FIFO of 8 as opposed to, say, 16, is somehow preferable.
If omitted, it's clear to me as a reader that no particular thought went into the FIFO config.
If I see FIFO size = 8, I imagine there must be a specific reason.
Filling in what is already default is not a specific reason IMO, and potentially misleading as it suggests somebody thought "it really must be this value and not another".
There was a problem hiding this comment.
Yes, for the same reason I also removed the internal delays since they were also the default value for "rgmii-id" mode.
9700331 to
2efab48
Compare
| @@ -175,6 +168,9 @@ | |||
| #size-cells = <0>; | |||
| adin1300: ethernet-phy@0 { | |||
There was a problem hiding this comment.
since it's not part of your PR diff, no need to fix the missing newline here IMO
There was a problem hiding this comment.
Since I change mdio namings, maybe I can also do that?
There was a problem hiding this comment.
go ahead if you're up for it, I just didn't want to ask you to fix yet more things ;D
|
|
||
| &emac1 { | ||
| phy-handle = <&dp83848>; | ||
| phy-handle = <&adin1200>; |
There was a problem hiding this comment.
just my 2c here, but the commits are a bit confusingly structured IMO. in one commit you rename the label from dp83848 to adin1200, but you only update this phandle in the following commit. I don't really see the point. I would suggest to just have commits like:
- "describe the EMAC1 PHY" (where you're adding new PHY)
- "describe the EMAC0 PHY properly" (where you're changing from TI to ADI PHYs)
(on a per-board basis)
and in both cases, put the phy-handles and reset-gpios/timings in the relevant commit.
There was a problem hiding this comment.
Yep, I fixed the commits, I was just doin the fixes and was waiting for approval of functionality to commit-cleanup 👷♂️
0d52983 to
795a2ed
Compare
Move the ADIN1300 reset GPIO out of its GPIO hog so the PHY driver controls reset. The ADIN1300 data sheet, Table 3, requires RESET_N to be asserted for at least 10 us. It also specifies a 5 ms delay before MDIO registers are accessible after reset deassertion. Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
The SC594 EZKIT connects emac0 to an ADIN1300 and emac1 to an ADIN1200. Replace the stale TI PHY descriptions with the corresponding ADI PHY nodes and remove the unused DP83867 binding. Move the ADIN1300 reset GPIO out of its GPIO hog so the PHY driver controls reset. The ADIN1300 data sheet, Table 3, requires RESET_N to be asserted for at least 10 us and specifies a 5 ms delay before MDIO registers are accessible after reset deassertion. Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
Move the ADIN1300 reset GPIO out of its GPIO hog so the PHY driver controls reset. The ADIN1300 data sheet, Table 3, requires RESET_N to be asserted for at least 10 us. It also specifies a 5 ms delay before MDIO registers are accessible after reset deassertion. Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
The SC598 EZKIT connects emac0 to an ADIN1300 and emac1 to an ADIN1200. Replace the stale TI PHY descriptions with the corresponding ADI PHY nodes and remove the unused DP83867 binding. Move the ADIN1300 reset GPIO out of its GPIO hog so the PHY driver controls reset. The ADIN1300 data sheet, Table 3, requires RESET_N to be asserted for at least 10 us and specifies a 5 ms delay before MDIO registers are accessible after reset deassertion. Keep emac1 disabled because its board routing is shared with USB0. Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
Enable the ADIN PHY driver for the SC594 and SC598 board defconfigs. The board device trees use ADIN1300 and ADIN1200 PHYs; remove the obsolete TI PHY selections from the SC594 defconfigs. Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
|
I've been waiting on fixing this because the delays are not trivial to calculate and it is a great candidate for hardware testing. We should really have a test in place that at least does an iperf3 to measure the impact on performance. But there are likely better tests, especially when modifying the delays. |
|
Please confirm with David. Also explain what was tested and the results both before and after applying this change. Without hardware testing we need to make sure there isn't a regression. |

Resolves #2883