This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM67: Ethernet RX is not capturing packets

Part Number: AM67

Tool/software:

Hi, I've gone through the basic ethernet debugging guide, and RX is not able to get packets.

ifconfig shows 0 rx packets, but ethtool shows rx packets (0 crc errors)

The "related question" is nearly identical and unsolved.

davinci_mdio 8000f00.mdio: davinci mdio revision 17.7, bus freq 1000000
davinci_mdio 8000f00.mdio: phy[0]: device 8000f00.mdio:00, driver Micrel KSZ8081 or KSZ8091
am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:00] driver [Micrel KSZ8081 or KSZ8091] (irq=POLL)

ethtool -S eth0
NIC statistics:
p0_rx_good_frames: 39
p0_rx_broadcast_frames: 10
p0_rx_multicast_frames: 29
p0_rx_crc_errors: 0
p0_rx_oversized_frames: 0
p0_rx_undersized_frames: 0
p0_ale_drop: 0
p0_ale_overrun_drop: 0
p0_rx_octets: 6551
p0_tx_good_frames: 0
p0_tx_broadcast_frames: 0
p0_tx_multicast_frames: 0
p0_tx_octets: 0
p0_tx_64B_frames: 8
p0_tx_65_to_127B_frames: 12
p0_tx_128_to_255B_frames: 9
p0_tx_256_to_511B_frames: 10
p0_tx_512_to_1023B_frames: 0
p0_tx_1024B_frames: 0
p0_net_octets: 6551
p0_rx_bottom_fifo_drop: 0
p0_rx_port_mask_drop: 0
p0_rx_top_fifo_drop: 0
p0_ale_rate_limit_drop: 0
p0_ale_vid_ingress_drop: 0
p0_ale_da_eq_sa_drop: 0
p0_ale_block_drop: 0
p0_ale_secure_drop: 0
p0_ale_auth_drop: 0
p0_ale_unknown_ucast: 0
p0_ale_unknown_ucast_bytes: 0
p0_ale_unknown_mcast: 0
p0_ale_unknown_mcast_bytes: 0
p0_ale_unknown_bcast: 0
p0_ale_unknown_bcast_bytes: 0
p0_ale_pol_match: 0
p0_ale_pol_match_red: 0
p0_ale_pol_match_yellow: 0
p0_ale_mcast_sa_drop: 0
p0_ale_dual_vlan_drop: 0
p0_ale_len_err_drop: 0
p0_ale_ip_next_hdr_drop: 0
p0_ale_ipv4_frag_drop: 0
p0_tx_mem_protect_err: 0
p0_tx_pri0: 0
p0_tx_pri1: 0
p0_tx_pri2: 0
p0_tx_pri3: 0
p0_tx_pri4: 0
p0_tx_pri5: 0
p0_tx_pri6: 0
p0_tx_pri7: 0
p0_tx_pri0_bcnt: 0
p0_tx_pri1_bcnt: 0
p0_tx_pri2_bcnt: 0
p0_tx_pri3_bcnt: 0
p0_tx_pri4_bcnt: 0
p0_tx_pri5_bcnt: 0
p0_tx_pri6_bcnt: 0
p0_tx_pri7_bcnt: 0
p0_tx_pri0_drop: 0
p0_tx_pri1_drop: 0
p0_tx_pri2_drop: 0
p0_tx_pri3_drop: 0
p0_tx_pri4_drop: 0
p0_tx_pri5_drop: 0
p0_tx_pri6_drop: 0
p0_tx_pri7_drop: 0
p0_tx_pri0_drop_bcnt: 0
p0_tx_pri1_drop_bcnt: 0
p0_tx_pri2_drop_bcnt: 0
p0_tx_pri3_drop_bcnt: 0
p0_tx_pri4_drop_bcnt: 0
p0_tx_pri5_drop_bcnt: 0
p0_tx_pri6_drop_bcnt: 0
p0_tx_pri7_drop_bcnt: 0
rx_good_frames: 0
rx_broadcast_frames: 0
rx_multicast_frames: 0
rx_pause_frames: 0
rx_crc_errors: 0
rx_align_code_errors: 0
rx_oversized_frames: 0
rx_jabber_frames: 0
rx_undersized_frames: 0
rx_fragments: 0
ale_drop: 0
ale_overrun_drop: 0
rx_octets: 0
tx_good_frames: 39
tx_broadcast_frames: 10
tx_multicast_frames: 29
tx_pause_frames: 0
tx_deferred_frames: 0
tx_collision_frames: 0
tx_single_coll_frames: 0
tx_mult_coll_frames: 0
tx_excessive_collisions: 0
tx_late_collisions: 0
rx_ipg_error: 0
tx_carrier_sense_errors: 0
tx_octets: 6551
tx_64B_frames: 8
tx_65_to_127B_frames: 12
tx_128_to_255B_frames: 9
tx_256_to_511B_frames: 10
tx_512_to_1023B_frames: 0
tx_1024B_frames: 0
net_octets: 6551
rx_bottom_fifo_drop: 0
rx_port_mask_drop: 0
rx_top_fifo_drop: 0
ale_rate_limit_drop: 0
ale_vid_ingress_drop: 0
ale_da_eq_sa_drop: 0
ale_block_drop: 0
ale_secure_drop: 0
ale_auth_drop: 0
ale_unknown_ucast: 0
ale_unknown_ucast_bytes: 0
ale_unknown_mcast: 0
ale_unknown_mcast_bytes: 0
ale_unknown_bcast: 0
ale_unknown_bcast_bytes: 0
ale_pol_match: 0
ale_pol_match_red: 0
ale_pol_match_yellow: 0
ale_mcast_sa_drop: 0
ale_dual_vlan_drop: 0
ale_len_err_drop: 0
ale_ip_next_hdr_drop: 0
ale_ipv4_frag_drop: 0
iet_rx_assembly_err: 0
iet_rx_assembly_ok: 0
iet_rx_smd_err: 0
iet_rx_frag: 0
iet_tx_hold: 0
iet_tx_frag: 0
tx_mem_protect_err: 0
tx_pri0: 39
tx_pri1: 0
tx_pri2: 0
tx_pri3: 0
tx_pri4: 0
tx_pri5: 0
tx_pri6: 0
tx_pri7: 0
tx_pri0_bcnt: 6551
tx_pri1_bcnt: 0
tx_pri2_bcnt: 0
tx_pri3_bcnt: 0
tx_pri4_bcnt: 0
tx_pri5_bcnt: 0
tx_pri6_bcnt: 0
tx_pri7_bcnt: 0
tx_pri0_drop: 0
tx_pri1_drop: 0
tx_pri2_drop: 0
tx_pri3_drop: 0
tx_pri4_drop: 0
tx_pri5_drop: 0
tx_pri6_drop: 0
tx_pri7_drop: 0
tx_pri0_drop_bcnt: 0
tx_pri1_drop_bcnt: 0
tx_pri2_drop_bcnt: 0
tx_pri3_drop_bcnt: 0
tx_pri4_drop_bcnt: 0
tx_pri5_drop_bcnt: 0
tx_pri6_drop_bcnt: 0
tx_pri7_drop_bcnt: 0

ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.10.2 netmask 255.255.255.0 broadcast 192.168.10.255
inet6 fe80::3495:db76:42ed:e4bc prefixlen 64 scopeid 0x20<link>
ether 00:22:33:44:55:66 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 37 bytes 5956 (5.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

journalctl | grep eth0
systemd-networkd[640]: eth0: found matching network '/etc/systemd/network/09-eth.network', based on potentially unpredictable interface name.
systemd-networkd[640]: eth0: Configuring with /etc/systemd/network/09-eth.network.
systemd-networkd[640]: eth0: found matching network '/etc/systemd/network/09-eth.network', based on potentially unpredictable interface name.
kernel: am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:00] driver [Micrel KSZ8081 or KSZ8091] (irq=POLL)
kernel: am65-cpsw-nuss 8000000.ethernet eth0: configuring for phy/rmii link mode
systemd-networkd[640]: eth0: Link UP
NetworkManager[639]: <info> [1709097993.7933] manager: (eth0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2)
NetworkManager[639]: <info> [1709097993.7950] device (eth0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
kernel: am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
systemd-networkd[640]: eth0: Gained carrier
systemd-networkd[640]: eth0: found matching network '/etc/systemd/network/09-eth.network', based on potentially unpredictable interface name.
NetworkManager[639]: <info> [1709097997.7505] device (eth0): carrier: link connected
NetworkManager[639]: <info> [1709097997.7558] device (eth0): state change: unavailable -> disconnected (reason 'carrier-changed', sys-iface-state: 'managed')
NetworkManager[639]: <info> [1709097997.7717] device (eth0): Activation: starting connection 'Wired connection 1' (f8480399-f7c6-39b9-8f60-468fbfe01893)
NetworkManager[639]: <info> [1709097997.7722] device (eth0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
NetworkManager[639]: <info> [1709097997.7741] device (eth0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
NetworkManager[639]: <info> [1709097997.7812] device (eth0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
avahi-daemon[624]: Joining mDNS multicast group on interface eth0.IPv6 with address fe80::3495:db76:42ed:e4bc.
avahi-daemon[624]: New relevant interface eth0.IPv6 for mDNS.
avahi-daemon[624]: Registering new address record for fe80::3495:db76:42ed:e4bc on eth0.*.
avahi-daemon[624]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.10.2.
NetworkManager[639]: <info> [1709097997.9627] device (eth0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
avahi-daemon[624]: New relevant interface eth0.IPv4 for mDNS.
avahi-daemon[624]: Registering new address record for 192.168.10.2 on eth0.IPv4.
NetworkManager[639]: <info> [1709097997.9700] device (eth0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
NetworkManager[639]: <info> [1709097997.9709] device (eth0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
NetworkManager[639]: <info> [1709097997.9742] device (eth0): Activation: successful, device activated.
systemd-networkd[640]: eth0: Gained IPv6LL

I'm using a crossover cable directly connected to a PC with the PC configured as 192.168.10.1 and 255.255.255.0 mask.

  • Hi,

    Are you able to see any packets being received on the phy using phy statistics?

    From the logs it seems that the link was successfully set up at 100M RMII Full duplex. But the CPSW IP is not receiving any packets otherwise we expect to see frames incremented in "rx_good_frames". Even if there is some issue with the frame, there should be some err/drop statistic incrementing. That is also not the case.

    I thing the traffic is not even reaching the SoC. can you probe the RMII Rx lines and see if you see any activity there? Please also check the clocks in that case.

    Can you also check the clock dump using the command "k3conf dump clocks 13" for checking the internal clocks.

    Regards,
    Tanmay

  • Hi Tanmay,

    Looks like perhaps the clock setting is the issue. I can see the clocks on the wires with the scope, but RMII isn't set, and RGMII is set, it's leftover from the devkit dts. How can I update the device tree to set the RMII instead of RGMII clock?

    k3conf dump clocks 13
    |------------------------------------------------------------------------------|
    | VERSION INFO |
    |------------------------------------------------------------------------------|
    | K3CONF | (version 0.3-nogit built Thu Jul 25 14:13:02 UTC 2024) |
    | SoC | J722S SR1.0 |
    | SYSFW | ABI: 4.0 (firmware version 0x000a '10.1.6--v10.01.06 (Fiery Fox))') |
    |------------------------------------------------------------------------------|

    |---------------------------------------------------------------------------------------------------------------------------------------|
    | Device ID | Clock ID | Clock Name | Status | Clock Frequency |
    |---------------------------------------------------------------------------------------------------------------------------------------|
    | 13 | 0 | DEV_CPSW0_CPPI_CLK_CLK | CLK_STATE_READY | 250000000 |
    | 13 | 1 | DEV_CPSW0_CPTS_GENF0 | CLK_STATE_READY | 0 |
    | 13 | 2 | DEV_CPSW0_CPTS_GENF1 | CLK_STATE_READY | 0 |
    | 13 | 3 | DEV_CPSW0_CPTS_RFT_CLK | CLK_STATE_READY | 500000000 |
    | 13 | 4 | DEV_CPSW0_CPTS_RFT_CLK_PARENT_POSTDIV4_16FF_MAIN_2_HSDIVOUT5_CLK | CLK_STATE_READY | 500000000 |
    | 13 | 5 | DEV_CPSW0_CPTS_RFT_CLK_PARENT_POSTDIV4_16FF_MAIN_0_HSDIVOUT6_CLK | CLK_STATE_READY | 200000000 |
    | 13 | 6 | DEV_CPSW0_CPTS_RFT_CLK_PARENT_BOARD_0_CP_GEMAC_CPTS0_RFT_CLK_OUT | CLK_STATE_READY | 0 |
    | 13 | 8 | DEV_CPSW0_CPTS_RFT_CLK_PARENT_BOARD_0_MCU_EXT_REFCLK0_OUT | CLK_STATE_READY | 0 |
    | 13 | 9 | DEV_CPSW0_CPTS_RFT_CLK_PARENT_BOARD_0_EXT_REFCLK1_OUT | CLK_STATE_READY | 0 |
    | 13 | 10 | DEV_CPSW0_CPTS_RFT_CLK_PARENT_WIZ16B2M4CT_MAIN_1_IP1_LN0_TXMCLK | CLK_STATE_READY | 0 |
    | 13 | 11 | DEV_CPSW0_CPTS_RFT_CLK_PARENT_SAM62_PLL_CTRL_WRAP_MAIN_0_CHIP_DIV1_CLK_CLK | CLK_STATE_READY | 500000000 |
    | 13 | 13 | DEV_CPSW0_GMII1_MR_CLK | CLK_STATE_READY | 25000000 |
    | 13 | 14 | DEV_CPSW0_GMII1_MT_CLK | CLK_STATE_READY | 25000000 |
    | 13 | 15 | DEV_CPSW0_GMII2_MR_CLK | CLK_STATE_READY | 25000000 |
    | 13 | 16 | DEV_CPSW0_GMII2_MT_CLK | CLK_STATE_READY | 25000000 |
    | 13 | 17 | DEV_CPSW0_GMII_RFT_CLK | CLK_STATE_READY | 125000000 |
    | 13 | 18 | DEV_CPSW0_MDIO_MDCLK_O | CLK_STATE_READY | 0 |
    | 13 | 19 | DEV_CPSW0_RGMII_MHZ_250_CLK | CLK_STATE_READY | 250000000 |
    | 13 | 20 | DEV_CPSW0_RGMII_MHZ_50_CLK | CLK_STATE_READY | 50000000 |
    | 13 | 21 | DEV_CPSW0_RGMII_MHZ_5_CLK | CLK_STATE_READY | 5000000 |
    | 13 | 22 | DEV_CPSW0_RMII1_MHZ_50_CLK | CLK_STATE_READY | 0 |
    | 13 | 23 | DEV_CPSW0_RMII2_MHZ_50_CLK | CLK_STATE_READY | 0 |
    | 13 | 24 | DEV_CPSW0_SERDES1_REFCLK | CLK_STATE_READY | 0 |
    | 13 | 25 | DEV_CPSW0_SERDES1_RXCLK | CLK_STATE_READY | 0 |
    | 13 | 26 | DEV_CPSW0_SERDES1_RXFCLK | CLK_STATE_READY | 0 |
    | 13 | 27 | DEV_CPSW0_SERDES1_TXCLK | CLK_STATE_READY | 0 |
    | 13 | 28 | DEV_CPSW0_SERDES1_TXFCLK | CLK_STATE_READY | 0 |
    | 13 | 29 | DEV_CPSW0_SERDES1_TXMCLK | CLK_STATE_READY | 0 |
    | 13 | 30 | DEV_CPSW0_SERDES2_REFCLK | CLK_STATE_READY | 0 |
    | 13 | 31 | DEV_CPSW0_SERDES2_RXCLK | CLK_STATE_READY | 0 |
    | 13 | 32 | DEV_CPSW0_SERDES2_RXFCLK | CLK_STATE_READY | 0 |
    | 13 | 33 | DEV_CPSW0_SERDES2_TXCLK | CLK_STATE_READY | 0 |
    | 13 | 34 | DEV_CPSW0_SERDES2_TXFCLK | CLK_STATE_READY | 0 |
    | 13 | 35 | DEV_CPSW0_SERDES2_TXMCLK | CLK_STATE_READY | 0 |
    |---------------------------------------------------------------------------------------------------------------------------------------|

    I see in the device tree:
    cpsw3g: ethernet@8000000 {
    ...
    clocks = <&k3_clks 13 0>;
    assigned-clocks = <&k3_clks 13 3>;
    assigned-clock-parents = <&k3_clks 13 11>;

    I see traffic on the RMII RXD0/RXD1 pins during the first communication, then it stops.

    ping 192.168.10.2

    Pinging 192.168.10.2 with 32 bytes of data:
    Reply from 192.168.10.1: Destination host unreachable. <- RXD0/RXD1 waveform here
    Request timed out. <- No RXD0/RXD1 waveform

    If I ping out from the AM67 to the host, I get consistent communication back on the RXD0/RXD1 lines.
    TXD0/TXD1 are working normally it seems, and traffic on RXD0/RXD1 are not getting consumed somewhere.

    arp -a on the windows host shows the AM67 mac address, but I see no received traffic using tcpdump on AM67.

  • Hi,

    Is the clock for RMII being sources from internal clock or you have connected external clock to the "RMII_REF_CLK" pin?

    If its an internal RMII clock being used, can you confirm that you are looping back the clock in schematic.

    Can you confirm the value of reg 0x00108010 is 0 in case of internal clk loopback.

    Regards,
    Tanmay

  • Hi Tanmay, It's an external clock I think.
    We have pin AE27, RMII1_REF_CLK tied to the phy chip, and I see it oscillating at 50MHz.

    devmem2 0x00108010
    /dev/mem opened.
    Memory mapped at address 0xffffbade8000.
    Read at address 0x00108010 (0xffffbade8010): 0x00000000


  • Hi Tanmay, is there any update on this?

  • Hi Tanmay,

    I noticed the phy is configured with ti,am654-phy-gmii-sel, is it possible this is contributing to the problem?
    Are the rx dma reference 0x4600 and the phy register 0x4044 related?

    The assigned clocks and clock parents look okay to me:
    clocks = <&k3_clks 13 0>; //DEV_CPSW0_CPPI_CLK_CLK
    assigned-clocks = <&k3_clks 13 3>; //DEV_CPSW0_CPTS_RFT_CLK
    assigned-clock-parents = <&k3_clks 13 11>; //DEV_CPSW0_CPTS_RFT_CLK_PARENT_SAM62_PLL_CTRL_WRAP_MAIN_0_CHIP_DIV1_CLK_CLK

    Here is my pin configuration.
    rmii1_pins_default: rmii1-default-pins {
    pinctrl-single,pins = <
    J722S_IOPAD(0x0130, PIN_INPUT, 1) /* (AG26) RGMII1_TXC.RMII1_CRS_DV */
    J722S_IOPAD(0x0148, PIN_INPUT, 1) /* (AE27) RGMII1_RXC.RMII1_REF_CLK */
    J722S_IOPAD(0x014c, PIN_INPUT, 1) /* (AC25) RGMII1_RD0.RMII1_RXD0 */
    J722S_IOPAD(0x0150, PIN_INPUT, 1) /* (AD27) RGMII1_RD1.RMII1_RXD1 */
    J722S_IOPAD(0x0144, PIN_INPUT, 1) /* (AD23) RGMII1_RX_CTL.RMII1_RX_ER */
    J722S_IOPAD(0x0134, PIN_OUTPUT, 1) /* (AF27) RGMII1_TD0.RMII1_TXD0 */
    J722S_IOPAD(0x0138, PIN_OUTPUT, 1) /* (AE23) RGMII1_TD1.RMII1_TXD1 */
    J722S_IOPAD(0x012c, PIN_OUTPUT, 1) /* (AF25) RGMII1_TX_CTL.RMII1_TX_EN */
    >;
    };
    mdio_pins_default: main_mdio-default-pins {
    pinctrl-single,pins = <
    J722S_IOPAD(0x0160, PIN_OUTPUT, 0) /* (AC24) MDIO0_MDC */
    J722S_IOPAD(0x015c, PIN_INPUT, 0) /* (AD25) MDIO0_MDIO */
    >;
    };

  • Hi,

    Sorry for the delay on this. 

    Hi Tanmay, It's an external clock I think.
    We have pin AE27, RMII1_REF_CLK tied to the phy chip, and I see it oscillating at 50MHz.

    If you can see the line oscillating at 50MHz, that's a good sign. It also removes the dependency from the phy-gmii-sel driver to set anything. Its only required in internal clocking mode.

    When you receive any frames, do you see any drops being incremented in the output of "ethtool -S <IF_NAME>"?

    Can you share the device-tree updates you have done for this CPSW node.

    There is per port MAC control and status register at address:

    • Control : 0x08000330h + (j*0x100) where j is the port number
    • Status :  0x08000334h + (j*0x100) where j is the port number

    Can you check what is value of the registers for the RMII port.

    Regards,
    Tanmay

  • Hi Tanmay,

    I confirmed the 50MHz comes from the chip by removing one of our series 33 ohm resistors.
    I found another post saying all series 33 ohms needed removed, so I removed them and it didn't seem to make a difference.

    There are no dropped frames.

    Control and Status registers are returning all 0's
    The excel sheet says +formula for the registers, do you know where I can find the formula value (0x100) for future reference?

    Is IFCTL_A supposed to be set to 1?

    root@j722s-evm:~# devmem2 0x08000330
    /dev/mem opened.
    Memory mapped at address 0xffff85968000.
    Read at address 0x08000330 (0xffff85968330): 0x00000000
    root@j722s-evm:~# devmem2 0x08000334
    /dev/mem opened.
    Memory mapped at address 0xffff8117e000.
    Read at address 0x08000334 (0xffff8117e334): 0x00000000
    root@j722s-evm:~# devmem2 0x08000430
    /dev/mem opened.
    Memory mapped at address 0xffffb3723000.
    Read at address 0x08000430 (0xffffb3723430): 0x00000000
    root@j722s-evm:~# devmem2 0x08000434
    /dev/mem opened.
    Memory mapped at address 0xffffad46c000.
    Read at address 0x08000434 (0xffffad46c434): 0x00000000
    root@j722s-evm:~# devmem2 0x08000530
    /dev/mem opened.
    Memory mapped at address 0xffff9a4cb000.
    Read at address 0x08000530 (0xffff9a4cb530): 0x00000000
    root@j722s-evm:~# devmem2 0x08000534
    /dev/mem opened.
    Memory mapped at address 0xffff954fe000.
    Read at address 0x08000534 (0xffff954fe534): 0x00000000

    Here are device tree changes.
    The micrel changes are mostly copied from an imx dts. The clock_ksz8081_out is unused, I think it's supposed to go somewhere.

    &cpsw3g {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&rmii1_pins_default>;
    };

    &cpsw3g_mdio {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&mdio_pins_default>;

    cpsw3g_phy0: ethernet-phy@0 {
    reset-gpios = <&main_gpio0 60 GPIO_ACTIVE_LOW>;
    reset-assert-us = <10000>;
    reset-deassert-us = <300>;
    clocks = <&clock_ksz8081_in>;
    clock-names = "rmii-ref";
    reg = <0>;
    };
    };

    &cpsw_port1 {
    phy-mode = "rmii";
    phy-handle = <&cpsw3g_phy0>;
    };

    &{/} {
    clock_ksz8081_in: clock-ksz8081-in {
    compatible = "fixed-clock";
    #clock-cells = <0>;
    clock-frequency = <25000000>;
    };

    clock_ksz8081_out: clock-ksz8081-out {
    compatible = "fixed-clock";
    #clock-cells = <0>;
    clock-frequency = <50000000>;
    clock-output-names = "enet1_ref_pad";
    };

    };

  • Hi Tanmay,

    Even though the registers don't seem to be showing with devmem2, the values should be set?
    I modified the code, and I think it is trying to set them in the function: 
    am65_cpsw_nuss_mac_link_up

    [ 9.839619] am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:00] driver [Micrel KSZ8081 or KSZ8091] (irq=POLL)
    [ 9.839682] am65-cpsw-nuss 8000000.ethernet eth0: configuring for phy/rmii link mode
    [ 14.946640] am65-cpsw-nuss 8000000.ethernet: [2121]: NOT Setting CPSW_SL_CTL_EXT_EN
    [ 14.946689] am65-cpsw-nuss 8000000.ethernet: [2125]: Setting CPSW_SL_CTL_IFCTL_A
    [ 14.946697] am65-cpsw-nuss 8000000.ethernet: [2136]: Setting CPSW_SL_CTL_TX_FLOW_EN
    [ 14.946702] am65-cpsw-nuss 8000000.ethernet: [2144]: Setting CPSW_SL_CTL_RX_FLOW_EN
    [ 14.947394] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx

    Using the offsets in the code, I found them here:

    devmem2 0x8022330
    /dev/mem opened.
    Memory mapped at address 0xffff8daae000.
    Read at address 0x08022330 (0xffff8daae330): 0x00008039

    devmem2 0x8022334
    /dev/mem opened.
    Memory mapped at address 0xffffa0962000.
    Read at address 0x08022334 (0xffffa0962334): 0xF0000000

  • I found my pin configuration was named incorrectly named/numbered. Was messed up during the shuffle from rgmii to rmii.
    Should be below:
    J722S_IOPAD(0x0130, PIN_INPUT, 1) /* (AG26) RGMII1_TXC.RMII1_CRS_DV */
    J722S_IOPAD(0x0148, PIN_INPUT, 1) /* (AE27) RGMII1_RXC.RMII1_REF_CLK */
    J722S_IOPAD(0x014c, PIN_INPUT, 1) /* (AC25) RGMII1_RD0.RMII1_RXD0 */
    J722S_IOPAD(0x0150, PIN_INPUT, 1) /* (AD27) RGMII1_RD1.RMII1_RXD1 */
    J722S_IOPAD(0x0144, PIN_INPUT, 1) /* (AD23) RGMII1_RX_CTL.RMII1_RX_ER */
    J722S_IOPAD(0x0134, PIN_OUTPUT, 1) /* (AF27) RGMII1_TD0.RMII1_TXD0 */
    J722S_IOPAD(0x0138, PIN_OUTPUT, 1) /* (AE23) RGMII1_TD1.RMII1_TXD1 */
    J722S_IOPAD(0x012c, PIN_OUTPUT, 1) /* (AF25) RGMII1_TX_CTL.RMII1_TX_EN */