Tool/software:
I am using rmii with AM62P SOC mounted on my custom carrier board.
Phy chip is KSZ8081.
Regarding the clock, there's a clock generated on the board using oscillator and the phy receives it as input to generate its own 50MHz clock.
I have the following DTS but unfortunately I am not able to get the ethernet link up:
aliases { ethernet0 = &cpsw_port1; // ethernet1 = &cpsw_port2; }; &main_pmx0 { bootph-all; main_mdio1_pins_default: main-mdio1-default-pins { pinctrl-single,pins = < AM62PX_IOPAD(0x0160, PIN_OUTPUT, 0) /* (F17) MDIO0_MDC */ AM62PX_IOPAD(0x015c, PIN_INPUT, 0) /* (F16) MDIO0_MDIO */ >; bootph-all; }; main_rmii1_pins_default: main-rmii1-default-pins { pinctrl-single,pins = < AM62PX_IOPAD(0x0130, PIN_INPUT, 1) /* (B17) RGMII1_TXC.RMII1_CRS_DV */ AM62PX_IOPAD(0x0148, PIN_INPUT, 1) /* (A16) RGMII1_RXC.RMII1_REF_CLK */ AM62PX_IOPAD(0x014c, PIN_INPUT, 1) /* (B15) RGMII1_RD0.RMII1_RXD0 */ AM62PX_IOPAD(0x0150, PIN_INPUT, 1) /* (B16) RGMII1_RD1.RMII1_RXD1 */ AM62PX_IOPAD(0x0144, PIN_INPUT, 1) /* (A15) RGMII1_RX_CTL.RMII1_RX_ER */ AM62PX_IOPAD(0x0134, PIN_INPUT, 1) /* (A18) RGMII1_TD0.RMII1_TXD0 */ AM62PX_IOPAD(0x0138, PIN_INPUT, 1) /* (C17) RGMII1_TD1.RMII1_TXD1 */ AM62PX_IOPAD(0x012c, PIN_INPUT, 1) /* (B18) RGMII1_TX_CTL.RMII1_TX_EN */ >; }; }; &cpsw3g { pinctrl-names = "default"; pinctrl-0 = <&main_rmii1_pins_default>; status = "okay"; }; &cpsw_port1 { //phy-mode = "rgmii-rxid"; phy-mode = "rmii"; phy-handle = <&cpsw3g_phy0>; status = "okay"; }; // &cpsw_port2 { // phy-mode = "rgmii-rxid"; // phy-handle = <&cpsw3g_phy1>; // status = "okay"; // }; &cpsw3g_mdio { pinctrl-names = "default"; pinctrl-0 = <&main_mdio1_pins_default>; status = "okay"; cpsw3g_phy0: ethernet-phy@0 { reg = <0>; compatible = "microchip,ksz8081", "ethernet-phy-ieee802.3-c22"; bootph-all; //ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>; //ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; //ti,min-output-impedance; }; };
I would appreciate it if you can give me any hint to fix the issue.
Logs from dmesg:
\u@\h:\w$ dmesg | grep -i cpsw [ 1.276860] am65-cpsw-nuss 8000000.ethernet: initializing am65 cpsw nuss version 0x6BA01903, cpsw version 0x6BA81903 Ports: 3 quirks:00000006 [ 1.352404] am65-cpsw-nuss 8000000.ethernet: initialized cpsw ale version 1.5 [ 1.359536] am65-cpsw-nuss 8000000.ethernet: ALE Table size 512, Policers 32 [ 1.367305] am65-cpsw-nuss 8000000.ethernet: CPTS ver 0x4e8a010d, freq:500000000, add_val:1 pps:0 [ 1.387349] am65-cpsw-nuss 8000000.ethernet: set new flow-id-base 19 [ 6.846624] am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:00] driver [Micrel KSZ8081 or KSZ8091] (irq=POLL) [ 6.869420] am65-cpsw-nuss 8000000.ethernet eth0: configuring for phy/rmii link mode \u@\h:\w$ dmesg | grep -i phy [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034] [ 0.000000] arch_timer: cp15 timer(s) running at 200.00MHz (phys). [ 1.342802] davinci_mdio 8000f00.mdio: phy[0]: device 8000f00.mdio:00, driver Micrel KSZ8081 or KSZ8091 [ 7.381436] am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:00] driver [Micrel KSZ8081 or KSZ8091] (irq=POLL) [ 7.395812] am65-cpsw-nuss 8000000.ethernet eth0: configuring for phy/rmii link mode
Regards,
Mohamed