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.

DP83822IF: In rmii mode, RX is operational but TX is not operational on AM625 Custom Board

Part Number: DP83822IF
Other Parts Discussed in Thread: LMK1C1103

Tool/software:

Hi, Ti

I'm testing the ethernet test using the dp83822 rmii mode.

eth1 can link up(kernel message, link led on), but rx/tx is not operational.

Could you please help us in resolving the issue.

Below are the kernel log, device tree, and test results.

  • Kernel Log

[    1.014215] ti-sci 44043000.system-controller: ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
[    1.089049] omap_i2c 20000000.i2c: bus 0 rev0.12 at 400 kHz
[    1.096889] omap_i2c 20010000.i2c: bus 1 rev0.12 at 100 kHz
[    1.104222] omap_i2c 20020000.i2c: bus 2 rev0.12 at 400 kHz
[    1.110291] ti-sci-intr 4210000.interrupt-controller: Interrupt Router 5 domain created
[    1.118658] ti-sci-intr bus@f0000:interrupt-controller@a00000: Interrupt Router 3 domain created
[    1.127932] ti-sci-inta 48000000.interrupt-controller: Interrupt Aggregator domain 28 created
[    1.138249] ti-udma 485c0100.dma-controller: Number of rings: 82
[    1.146768] ti-udma 485c0100.dma-controller: Channels: 48 (bchan: 18, tchan: 12, rchan: 18)
[    1.158306] ti-udma 485c0000.dma-controller: Number of rings: 150
[    1.168817] ti-udma 485c0000.dma-controller: Channels: 35 (tchan: 20, rchan: 15)
[    1.179568] printk: console [ttyS2] disabled
[    1.184056] 2800000.serial: ttyS2 at MMIO 0x2800000 (irq = 239, base_baud = 3000000) is a 8250
[    1.192971] printk: console [ttyS2] enabled
[    1.201431] printk: bootconsole [ns16550a0] disabled
[    1.213041] 2820000.serial: ttyS4 at MMIO 0x2820000 (irq = 241, base_baud = 3000000) is a 8250
[    1.222847] 2830000.serial: ttyS5 at MMIO 0x2830000 (irq = 242, base_baud = 3000000) is a 8250
[    1.232663] 2840000.serial: ttyS6 at MMIO 0x2840000 (irq = 243, base_baud = 3000000) is a 8250
[    1.242475] 2850000.serial: ttyS0 at MMIO 0x2850000 (irq = 244, base_baud = 3000000) is a 8250
[    1.252236] 2860000.serial: ttyS1 at MMIO 0x2860000 (irq = 245, base_baud = 3000000) is a 8250
[    1.263312] spi-nor spi0.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff
[    1.271686] davinci_mdio 8000f00.mdio: Configuring MDIO in manual mode
[    1.317161] davinci_mdio 8000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
[    1.327478] davinci_mdio 8000f00.mdio: phy[0]: device 8000f00.mdio:00, driver TI DP83867
[    1.335595] davinci_mdio 8000f00.mdio: phy[1]: device 8000f00.mdio:01, driver TI DP83822
[    1.343726] am65-cpsw-nuss 8000000.ethernet: initializing am65 cpsw nuss version 0x6BA01103, cpsw version 0x6BA81103 Ports: 3 quirks:00006
[    1.356742] am65-cpsw-nuss 8000000.ethernet: Use random MAC address
[    1.363012] am65-cpsw-nuss 8000000.ethernet: initialized cpsw ale version 1.5
[    1.370136] am65-cpsw-nuss 8000000.ethernet: ALE Table size 512
[    1.376747] pps pps0: new PPS source ptp0
[    1.381181] am65-cpsw-nuss 8000000.ethernet: CPTS ver 0x4e8a010c, freq:500000000, add_val:1 pps:1
[    1.391784] am65-cpsw-nuss 8000000.ethernet: set new flow-id-base 19
[    1.404149] mmc0: CQHCI version 5.10
[    1.415178] regulator-3 GPIO handle specifies active low - ignored
[    1.422236] pinctrl-single f4000.pinctrl: Invalid number of rows: 0
[    1.428519] pinctrl-single f4000.pinctrl: no pins entries for main-gpio1-ioexp-intr-pins-default
[    1.438478] 2810000.serial: ttyS3 at MMIO 0x2810000 (irq = 432, base_baud = 3000000) is a 8250
[    1.447813] mmc0: SDHCI controller on fa10000.mmc [fa10000.mmc] using ADMA 64-bit
[    1.450321] debugfs: Directory 'pd:182' with parent 'pm_genpd' already present!
[    1.457275] mmc1: CQHCI version 5.10
[    1.478280] ALSA device list:
[    1.481289]   No soundcards found.
[    1.497263] mmc1: SDHCI controller on fa00000.mmc [fa00000.mmc] using ADMA 64-bit
[    1.505167] Waiting for root device PARTUUID=ed8cbb45-02...
[    1.552626] mmc0: Command Queue Engine enabled
[    1.557168] mmc0: new HS200 MMC card at address 0001
[    1.563493] mmcblk0: mmc0:0001 AJTD4R 14.6 GiB 
[    1.569313] mmc1: new ultra high speed SDR104 SDHC card at address 59b4
[    1.570548]  mmcblk0: p1 p2
[    1.576890] mmcblk1: mmc1:59b4 USDU1 28.3 GiB 
[    1.579429] mmcblk0boot0: mmc0:0001 AJTD4R 4.00 MiB 
[    1.588324]  mmcblk1: p1 p2
[    1.589446] mmcblk0boot1: mmc0:0001 AJTD4R 4.00 MiB 
[    1.597264] mmcblk0rpmb: mmc0:0001 AJTD4R 4.00 MiB, chardev (240:0)
[    1.613493] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Quota mode: none.
[    1.622158] VFS: Mounted root (ext4 filesystem) on device 179:34.
[    1.629026] devtmpfs: mounted
[    1.633663] Freeing unused kernel memory: 2176K
[    1.638409] Run /sbin/init as init process
[    1.642518]   with arguments:
[    1.642522]     /sbin/init
[    1.642524]   with environment:
[    1.642527]     HOME=/
[    1.642530]     TERM=linux
[    1.797461] systemd[1]: System time before build time, advancing clock.
[    1.847324] NET: Registered PF_INET6 protocol family
...
[    4.452846] systemd[1]: Started Journal Service.
[    4.458021] EXT4-fs (mmcblk1p2): re-mounted. Quota mode: none.
[    4.882392] systemd-journald[152]: Received client request to flush runtime journal.
[    5.111401] audit: type=1334 audit(1651167748.312:2): prog-id=5 op=LOAD
[    5.121528] audit: type=1334 audit(1651167748.320:3): prog-id=6 op=LOAD
[    6.193257] random: crng init done
[    6.587822] audit: type=1334 audit(1651167749.788:4): prog-id=7 op=LOAD
[    6.600383] audit: type=1334 audit(1651167749.800:5): prog-id=8 op=LOAD
[    6.867544] FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[    7.201565] CAN device driver interface
[    7.258555] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    7.336289] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    7.482181] mc: Linux media interface: v0.10
[    7.564470] videodev: Linux video capture interface: v2.00
[    8.221344] [drm] Initialized tidss 1.0.0 20180215 for 30200000.dss on minor 0
[    8.246428] am65-cpsw-nuss 8000000.ethernet eth1: PHY [8000f00.mdio:01] driver [TI DP83822] (irq=POLL)
[    8.273331] am65-cpsw-nuss 8000000.ethernet eth1: configuring for phy/rmii link mode
[    8.329774] am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:00] driver [TI DP83867] (irq=POLL)
[    8.339243] am65-cpsw-nuss 8000000.ethernet eth0: configuring for phy/rgmii-rxid link mode
[    8.449504] k3-m4-rproc 5000000.m4fss: assigned reserved memory node m4f-dma-memory@9cb00000
[    8.566723] k3-m4-rproc 5000000.m4fss: configured M4 for remoteproc mode
[    8.574527] k3-m4-rproc 5000000.m4fss: local reset is deasserted for device
[    8.602028] remoteproc remoteproc0: 5000000.m4fss is available
[    8.641695] remoteproc remoteproc0: powering up 5000000.m4fss
[    8.647532] remoteproc remoteproc0: Booting fw image am62-mcu-m4f0_0-fw, size 54860
[    8.660702] rproc-virtio rproc-virtio.0.auto: assigned reserved memory node m4f-dma-memory@9cb00000
[    8.672767] rproc-virtio rproc-virtio.0.auto: registered virtio0 (type 7)
[    8.679669] remoteproc remoteproc0: remote processor 5000000.m4fss is now up
[    9.233661] audit: type=1701 audit(1651167752.436:6): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=353 comm="kmsprint" exe="/usr/bin/km1
[    9.303885] audit: type=1334 audit(1651167752.504:7): prog-id=9 op=LOAD
[    9.322158] audit: type=1334 audit(1651167752.516:8): prog-id=10 op=LOAD
[    9.436424] m_can_platform 20701000.can: m_can device registered (irq=453, version=32)
[    9.448314] rtc-ti-k3 2b1f0000.rtc: registered as rtc0
[    9.455773] rtc-ti-k3 2b1f0000.rtc: setting system clock to 1970-01-01T00:00:17 UTC (17)
[    9.465047] systemd-journald[152]: Time jumped backwards, rotating.
[    9.472346] virtio_rpmsg_bus virtio0: rpmsg host is online
[    9.478072] virtio_rpmsg_bus virtio0: creating channel ti.ipc4.ping-pong addr 0xd
[    9.485985] virtio_rpmsg_bus virtio0: creating channel rpmsg_chrdev addr 0xe
[    9.821532] platform 78000000.r5f: R5F core may have been powered on by a different host, programmed state (0) != actual state (1)
[    9.837568] platform 78000000.r5f: configured R5F for IPC-only mode
[    9.847503] platform 78000000.r5f: assigned reserved memory node r5f-dma-memory@9da00000
[    9.860741] remoteproc remoteproc1: 78000000.r5f is available
[    9.877276] remoteproc remoteproc1: attaching to 78000000.r5f
[    9.891202] platform 78000000.r5f: R5F core initialized in IPC-only mode
[    9.902855] rproc-virtio rproc-virtio.2.auto: assigned reserved memory node r5f-dma-memory@9da00000
[    9.927323] virtio_rpmsg_bus virtio1: rpmsg host is online
[    9.933026] virtio_rpmsg_bus virtio1: creating channel ti.ipc4.ping-pong addr 0xd
[    9.941026] virtio_rpmsg_bus virtio1: creating channel rpmsg_chrdev addr 0xe
[   10.042084] rproc-virtio rproc-virtio.2.auto: registered virtio1 (type 7)
[   10.049543] remoteproc remoteproc1: remote processor 78000000.r5f is now attached
[   10.090614] audit: type=1334 audit(18.132:9): prog-id=11 op=LOAD
[   10.099939] audit: type=1334 audit(18.140:10): prog-id=12 op=LOAD
[   10.797586] audit: type=1325 audit(18.824:11): table=nat family=2 entries=0 op=xt_register pid=416 comm="iptables"
[   10.810385] audit: type=1300 audit(18.824:11): arch=c00000b7 syscall=209 success=yes exit=0 a0=4 a1=0 a2=40 a3=ffffee6d4ca8 items=0 ppid=)
[   10.854328] audit: type=1327 audit(18.824:11): proctitle=69707461626C6573002D74006E6174002D4100504F5354524F5554494E47002D6F0065746830002D5
[   11.358159] am65-cpsw-nuss 8000000.ethernet eth1: Link is Up - 100Mbps/Full - flow control rx/tx
[   11.367288] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   11.824384] kauditd_printk_skb: 6 callbacks suppressed
[   24.187784] i2c 1-003b: deferred probe pending
[   24.192339] platform regulator-6: deferred probe pending
[   24.197758] platform regulator-7: deferred probe pending
[   24.203184] platform fa20000.mmc: deferred probe pending
[   55.928485] device eth1 entered promiscuous mode
[   55.933312] kauditd_printk_skb: 3 callbacks suppressed
[   55.933323] audit: type=1700 audit(63.968:31): dev=eth1 prom=256 old_prom=0 auid=4294967295 uid=0 gid=0 ses=4294967295
[   55.949316] audit: type=1300 audit(63.968:31): arch=c00000b7 syscall=208 success=yes exit=0 a0=4 a1=107 a2=1 a3=ffffe81d77b0 items=0 ppid)
[   55.975468] audit: type=1327 audit(63.968:31): proctitle=74637064756D70002D690065746831
[  129.711735] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you nee.
[  129.728604] Bridge firewalling registered
[  129.760803] audit: type=1325 audit(137.796:32): table=filter family=2 entries=0 op=xt_register pid=977 comm="iptables"
[  129.772610] audit: type=1300 audit(137.796:32): arch=c00000b7 syscall=209 success=yes exit=0 a0=4 a1=0 a2=40 a3=ffffeac49fe8 items=0 ppid)
[  129.801212] audit: type=1327 audit(137.796:32): proctitle=2F7573722F7362696E2F69707461626C6573002D2D77616974002D4C002D6E
[  129.896667] audit: type=1325 audit(137.936:33): table=nat family=2 entries=6 op=xt_replace pid=998 comm="iptables"
[  129.907551] audit: type=1300 audit(137.936:33): arch=c00000b7 syscall=208 success=yes exit=0 a0=4 a1=0 a2=40 a3=12dcc00 items=0 ppid=939 )
[  129.934711] audit: type=1327 audit(137.936:33): proctitle=2F7573722F7362696E2F69707461626C6573002D2D77616974002D74006E6174002D4E00444F4342
[  129.947678] audit: type=1325 audit(137.952:34): table=filter family=2 entries=4 op=xt_replace pid=1001 comm="iptables"
[  129.958620] audit: type=1300 audit(137.952:34): arch=c00000b7 syscall=208 success=yes exit=0 a0=4 a1=0 a2=40 a3=2f4bb940 items=0 ppid=939)
[  129.986012] audit: type=1327 audit(137.952:34): proctitle=2F7573722F7362696E2F69707461626C6573002D2D77616974002D740066696C746572002D4E0042
[  129.999445] audit: type=1325 audit(137.964:35): table=filter family=2 entries=6 op=xt_replace pid=1003 comm="iptables"
[  258.126311] device eth1 left promiscuous mode
[  258.135518] kauditd_printk_skb: 107 callbacks suppressed
[  258.135552] audit: type=1700 audit(266.176:71): dev=eth1 prom=0 old_prom=256 auid=4294967295 uid=0 gid=0 ses=4294967295

  • Device Tree
      spe_pins_default: spe-pins-default {
        pinctrl-single,pins = <
          AM62X_IOPAD(0x0168, PIN_INPUT, 1) /* (AE21) RGMII2_TXC.RMII2_CRS_DV */                                                                
          AM62X_IOPAD(0x0180, PIN_INPUT, 1) /* (AD23) RGMII2_RXC.RMII2_REF_CLK */
          AM62X_IOPAD(0x0184, PIN_INPUT, 1) /* (AE23) RGMII2_RD0.RMII2_RXD0 */
          AM62X_IOPAD(0x0188, PIN_INPUT, 1) /* (AB20) RGMII2_RD1.RMII2_RXD1 */
          AM62X_IOPAD(0x017c, PIN_INPUT, 1) /* (AD22) RGMII2_RX_CTL.RMII2_RX_ER */
          AM62X_IOPAD(0x016c, PIN_INPUT, 1) /* (Y18) RGMII2_TD0.RMII2_TXD0 */
          AM62X_IOPAD(0x0170, PIN_INPUT, 1) /* (AA18) RGMII2_TD1.RMII2_TXD1 */
          AM62X_IOPAD(0x0164, PIN_INPUT, 1) /* (AA19) RGMII2_TX_CTL.RMII2_TX_EN */
        >;
      };
    
    
    ...
    
    
    &cpsw3g {
      pinctrl-names = "default";
      pinctrl-0 = <&main_rgmii1_pins_default
             &spe_pins_default>;
    
      cpts@3d000 {
        /* MAP HW3_TS_PUSH to GENF1 */
        ti,pps = <2 1>;
      };
    };
    
    
    &cpsw_port2 {
      phy-mode = "rmii";
      phy-handle = <&cpsw3g_phy1>;
    };
    
    &cpsw3g_mdio {
      cpsw3g_phy1: ethernet-phy@1 {                                                                                                           
        reg = <1>;
        rx-internal-delay-ps = <1>;
        tx-internal-delay-ps = <1>;
      };
    };
    


  • eth1 configuration
    root@am62xx-evm:~# ifconfig eth1
    eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 192.168.2.1  netmask 255.255.255.0  broadcast 192.168.2.255
            inet6 fe80::ac54:55ff:fe42:56ad  prefixlen 64  scopeid 0x20<link>
            ether ae:54:55:42:56:ad  txqueuelen 1000  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 67  bytes 10020 (9.7 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    root@am62xx-evm:~# dmesg|grep 83822
    [    1.335595] davinci_mdio 8000f00.mdio: phy[1]: device 8000f00.mdio:01, driver TI DP83822
    [    8.246428] am65-cpsw-nuss 8000000.ethernet eth1: PHY [8000f00.mdio:01] driver [TI DP83822] (irq=POLL)
    root@am62xx-evm:~# dmesg|grep rmii 
    [    8.273331] am65-cpsw-nuss 8000000.ethernet eth1: configuring for phy/rmii link mode
    root@am62xx-evm:~# ifconfig eth1
    eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 192.168.2.1  netmask 255.255.255.0  broadcast 192.168.2.255
            inet6 fe80::ac54:55ff:fe42:56ad  prefixlen 64  scopeid 0x20<link>
            ether ae:54:55:42:56:ad  txqueuelen 1000  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 67  bytes 10020 (9.7 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    root@am62xx-evm:~# dmesg|grep 83822
    [    1.335595] davinci_mdio 8000f00.mdio: phy[1]: device 8000f00.mdio:01, driver TI DP83822
    [    8.246428] am65-cpsw-nuss 8000000.ethernet eth1: PHY [8000f00.mdio:01] driver [TI DP83822] (irq=POLL)
    root@am62xx-evm:~# dmesg|grep rmii 
    [    8.273331] am65-cpsw-nuss 8000000.ethernet eth1: configuring for phy/rmii link mode
    root@am62xx-evm:~# 
    
  • Currently, tx/rx is not operational.

  • Could you please correct the DTS config for rmii?

  • Hi Inseok,

    Thank you for submitting your query, I'll gladly assist in handling it.

    From the logs you provided, eth1 is our DP83822 and it is able to link up at 100Mbps. You suspicion is correct, there is some issue on the RMII interface, the communication between your processor and our DP83822 is not established. Could you confirm what RMII operation you are using? There are two types of RMII operations: RMII Slave and RMII Master. In RMII Slave operation, the DP83822 operates off of a 50-MHz CMOS-level oscillator connected to the XI pin and shares the same clock as the MAC. In RMII Master operation, the DP83822 operates off of either a 25-MHz CMOS-level oscillator connected to XI pin or a 25-MHz crystal connected across XI and XO pins.

    Would you be able to share your schematic so that I can confirm the RMII connection?

    Regards,

    Alvaro

  • Hi
    I am a hardware engineer working with the above questioner.

    The current circuit is applicable to both RGMII and RMII, and the input frequency is 25MHz, and is divided into three and transmitted from the LMK1C1103 IC.
    -. SOC
    -. ETH0 (DP83867 / in operation)
    -. ETH1 (DP83822 / RGMII Mode is in operation, RMII Mode is not in operation)

    I am sharing the circuit diagram below, so if you have any additional information to check, please reply.

    In the case of RMII_DV, only pull-up and pull-down resistors exist.
    The resistor options are not set except for RMII Enable.

  • Hi Alvaro

    RGMII has been confirmed to work, and I will try to change it to RMII settings to see if it works.

    Also, among the AM62 pins assigned to RMII, RMII2 Ref Clk is not routed. Is there a separate part that connects to this IC?

    As in the question above, should RX_DV be connected somewhere?
    Only the pull-up and pull-down resistor positions are set.

    Is there anything wrong?

    Please check it. Thank you.

  • Hi Oh Sanbong,

    The only necessary signals for RMII are pictured below, the strapping on RX_DV looks good and like you mentioned, there is no need to connect this pin. The RMII2 Ref CLK on the AM62 might be referring to the 50 MHz clock (refer to RMII Master Signaling below), when the DP83822 is in RMII Master mode it will output this on RX_D3 by default. Since RX_D3 is used in RGMII, I imagine you have made this connection to a different pin on the AM62. This can be changed by writing to Register 0x462 & 0x463 to configure the RMII Master Reference Clock to a different GPIO.

    Regards,

    Alvaro

  • Hello.

    According to your answer, if it is 25MHz XI input, the setting should be 25MHz, and naturally, it will be set to master mode,
    and should RX_D3 PIN be connected to AM62 GPIO?

    If it is 50MHz XI Input, it seems that RX_D3 is not used, with 50MHz setting (slave mode).

    Please answer my question.

  • Hi Oh Sangbong,

    Your understanding is correct, below I have added more detail.

    According to your answer, if it is 25MHz XI input, the setting should be 25MHz, and naturally, it will be set to master mode,
    and should RX_D3 PIN be connected to AM62 GPIO?

    Correct, in RMII Master mode, the PHY operates off a 25MHz input clock into the XI pin of the PHY. By default, the PHY will output a 50MHz clock from RX_D3, which will need to be connected to the MAC. The 50MHz clock can be configured to be output from a different pin, please see Registers 0x462 & 0x463 for more information.

    For example, setting Reg 0x463 = 0x43 will configure GPIO_2 to the RMII 50 MHz ref clock.

    If it is 50MHz XI Input, it seems that RX_D3 is not used, with 50MHz setting (slave mode).

    In RMII Slave mode, the PHY operates off a 50MHz clock. Here there are two options:

    1. A common clock source provides the 50MHz clock to both the MAC and PHY
    2. The MAC provides the 50MHz clock to the PHY

    Regards,

    Alvaro