Hii,
I am configuring ethernet switch ksz9563 from microchip in my i.mx8mp custom board. I have configured the switch in DTS as follows
Hi @gaurav_bankar were you able to solve the problem?
I am using ksz8794 in the MDIO mode as well and I have also created almost similar fec node as you.
&fec1{
phy-mode = "rgmii-id";
phy-handle = <&switch0port0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_fec1>;
status = "okay";
fixed-link {
speed = <1000>;
full-duplex;
};
mdio {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
ksz8794: ksz8794@0 {
compatible = "microchip,ksz8794";
reg = <0>;
reset-gpios = <&gpio4 24 GPIO_ACTIVE_LOW>;
ports {
#address-cells = <1>;
#size-cells = <0>;
switch0port0:port@0 {
reg = <0>;
label = "cpu";
ethernet = <&fec1>;
fixed-link {
speed = <1000>;
full-duplex;
};
};
port@1 {
reg = <1>;
label = "port1";
};
port@2 {
reg = <2>;
label = "port2";
};
port@3 {
reg = <3>;
label = "port3";
};
port@4 {
reg = <4>;
label = "port4";
};
};
};
};
};
And in dmesg I get the following logs
dmesg | grep "eth"
fec 30be0000.ethernet: Invalid MAC address: 00:00:00:00:00:00
fec 30be0000.ethernet: Using random MAC address: 1e:f5:75:fa:7b:78
fec 30be0000.ethernet eth0: registered PHC device 0
fec 30be0000.ethernet eth0: Unable to connect to phy
fec 30be0000.ethernet eth0: Unable to connect to phy
If you have successfully solved the issue can you please provide the solution
Hi @gaurav_bankar,
I hope you are doing well.
Please refer to the below example for reference.
ðernet0 {
status = "okay";
pinctrl-0 = <ðernet0_rgmii_pins_a>;
pinctrl-1 = <ðernet0_rgmii_pins_sleep_
pinctrl-names = "default", "sleep";
phy-mode = "rgmii";
max-speed = <1000>;
phy-handle = <&phy0>;
mdio0 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "snps,dwmac-mdio";
phy0: ethernet-phy@1 {
reg = <1>;
};
};
};
Please check this configuration is made for the ethernet node in the device tree.
Thanks & Regards,
Dhruvit Vasavada