> > I also have a simple utility to communicate with that registers file to > > read/write > > register individually. Is there a standard Linux utility for that > > function? > > I don't think standard utility exists. Binary file which can be > written by userspace shoudl be enough.
mii-tool will allow you to read PHY registers. The kernel API it uses allows you to read any register on the MDIO bus. > spi@0 { > compatible = "microchip,ksz8895"; > ... > ports { > port@4 { > reg = <4>; > label = "cpu"; > ethernet = <&mac0>; > fixed-link { > speed = <100>; > full-duplex; > }; > }; > }; > }; > > On one side, and > > mac0: ethernet@800f0000 { > phy-mode = "rmii"; > status = "okay"; > fixed-link { > speed = <100>; > full-duplex; > }; > }; Are the MAC connected back-to-back, or do you have PHYs in the middle? mac0 you have phy-mode = "rmii";. You can put the same in the port@4, but i don't know if the driver looks for it, and configures the MAC as needed. Andrew