Hi,
i attach marvell switch to board, configure it in device tree:
&mdio1 {
#address-cells = <1>;
#size-cells = <0>;
switch0: switch0@0 {
compatible = "marvell,mv88e6085";
reg = <0>;
dsa,member = <0 0>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
label = "lan0";
fixed-link {
speed = <1000>;
full-duplex;
};
};
port@1 {
reg = <1>;
label = "lan1";
fixed-link {
speed = <1000>;
full-duplex;
};
};
port@3 {
reg = <3>;
label = "nmi";
};
switch0cpu5: port@5 {
reg = <5>;
label = "cpu";
ethernet = <&fec1>;
phy-mode = "rgmii";
fixed-link {
speed = <1000>;
full-duplex;
};
};
};
};
};
I can read PHY registry by tools like mdio-tool, phytool ect, but i need to modify registry in port. Ethtool can dump port registers by "ethtool -d nmi", but there is no method to write. I need to modify reg 6 (Port-based vlan) to separate ports in switch. How can i do that? In older linux kernels i have /dev/mdio and i can write direct to mdio, in Yocto kirkstone (linux-imx 5.15) i must use ioctl with predefinied structures and commands.
Hi @MJaroc
The kernel update could also update the phy driver and mdio framework which will casue older interface can't work. Use ioctl with predefinied structures and commands is also another way to access registers.
Best Regards
Zhiming