Closed coveritytest closed 1 year ago
Okay, it works with
phytool write eth0/5/0xD 0x001F
phytool write eth0/5/0xE 0x0025
phytool write eth0/5/0xD 0x401F
phytool read eth0/5/0xE
Don't know if bug or feature.
I would say that if your first example had worked, then that would have been the bug. Heuristics around bases always end bad in my experience. I.e. which register would you expect to read with phytool read eth0/5/10
? 10 or 16 (decimal)?
Accepting decimal numbers is good for several reasons:
$(())
always outputs decimalLet me also recommend that you check out mdio-tools, which already implements Clause 45 over Clause 22 addressing. In your case, mdio <YOUR-BUS> mmd-c22 5:0x1f 0x25
should replace the 4 invocations of phytool.
Thanks for clarification.
to read extended registers on DP83826I PHY which does not work. According to section 9.3.11.5 in the manual we need to do:
phytool write eth0/5/D 0x001F
phytool write eth0/5/E 0x0025
phytool write eth0/5/D 0x401F
phytool read eth0/5/E
in order to read register 0x25. This results in 0x4000. It does result in 0x4000 for all extended registers, I always get 0x4000 as a result.