Hello,
we are building custom board with i.MX 8QuadXPlus and want to connect 2 KSZ8795 switches via MDIO, switch port5 is connected to ethernet controller via RGMII. There is likely something wrong with our device description, since KSZ8795 driver is not loaded and ethernet controller detects just generic PHY. Below is the switch configuration for one of the ethernet ports (FEC1) in device tree. Could you please take a look if the device tree snippet is correct or recommend some reference for MDIO switch in device tree? I tried following some examples I could find, but that's the best I come with:
&fec1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_fec1>;
phy-mode = "rgmii";
phy-handle = <&switch0>;
fsl,magic-packet;
local-mac-address = [00 11 22 33 44 55];
status = "okay";
mdio {
#address-cells = <1>;
#size-cells = <0>;
switch0: switch-phy@0 {
compatible = "microchip,ksz8795";
reg = <0>;
/*reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>; */
/*reset-duration = <100>; */
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
label = "lan1";
};
port@1 {
reg = <1>;
label = "lan2";
};
port@2 {
reg = <2>;
label = "lan3";
};
port@3 {
reg = <3>;
label = "lan4";
};
port@4 {
reg = <4>;
label = "cpu";
ethernet = <&fec1>;
fixed-link {
speed = <1000>;
full-duplex;
};
};
};
};
};
Thank you in advance!