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.

DP83869HM: DP83869 RGMII to Copper 1000Base-T do not link

Part Number: DP83869HM
Other Parts Discussed in Thread: DP83869

Tool/software:

Hello

I am trying to use 1G Ethernet by connecting DP83869 with rgmii to am335x.
Opmode is set to 000 and led setting is also set to 000. (Refer to Strap Configuration)
When connecting PC and copper, PC recognizes it as 100M and Linux system does not recognize link.
When I force link-up and 100M speed in Linux system (am335x) kernel, Ping test with PC succeeds, but in other cases it does not succeed. (It also failed when link-up and 1000M were set)

I have some questions.
1. In RGMII mode, shouldn't RX_CLK be 125M? If it is 25M, is RGMII mode not set properly?
Do I need additional settings other than Strap Configuration to output RX_CLK as 125M in RGMII mode?

2. I am using Linux kernel 4.19. Is there a DP83869 driver source that is compatible with it? I searched the Internet for drivers and tried compiling several times, but I got errors in some parts.
It seems that MDIO recognizes phy, but it does not identify it as dp83869. Will this be a problem when using dp83869?

I will leave the device tree and 'ethtool eth0' log together, so please refer to them if necessary.
* Device tree (dts)

&davinci_mdio {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&davinci_mdio_default>;
pinctrl-1 = <&davinci_mdio_sleep>;
status = "okay";

reset-gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
reset-delay-us = <100>;

dp83869: ethernet-phy@0 {
reg = <0>;
};

ksz9897: ethernet-phy@1 {
reg = <1>;
};
};

&cpsw_emac0 {
phy_id = <&davinci_mdio>, <0>;
phy-mode = "rgmii-txid";
dual_emac_res_vlan = <1>;
#if 0
fixed-link {
speed = <100>;
full-duplex;
};
#endif
};

* ethtool eth0
Settings for eth0:
Supported ports: [ TP AUI BNC MII FIBRE ]
Supported link modes: Not reported
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: No
Supported FEC modes: Not reported
Advertised link modes: Not reported
Advertised pause frame use: No
Advertised auto-negotiation: No
Advertised FEC modes: Not reported
Speed: 10Mb/s
Duplex: Half
Port: MII
PHYAD: 0
Transceiver: external
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000000 (0)

Link detected: no

Best Regards,

Kim.

  • Hi Kim,

    1) RX_CLK frequency depends on the speed the PHY is linked in:

    10/100/1000M = 2.5/25/125MHz

    If auto-negotiation is disabled and the speed is forced, RX_CLK will output the corresponding frequency.

    2) There may be some back-porting efforts to have driver compatible with Linux 4.19. We have tested below driver on Linux 5.10:

    https://github.com/TexasInstruments/ti-ethernet-software/blob/main/linux_drivers/dp83869.c

    It seems that MDIO recognizes phy, but it does not identify it as dp83869.

    Can you please share the Linux log when this happens?

    Please also see .yaml and dt-bindings file below for reference on configuring dts for RGMII to Copper 1000Base-T mode:

    https://www.kernel.org/doc/Documentation/devicetree/bindings/net/ti%2Cdp83869.yaml

    https://github.com/torvalds/linux/blob/master/include/dt-bindings/net/ti-dp83869.h

    If there are doubts about the PHY configuration, please share a register dump and schematic so I can review.

    Thank you,

    Evan

  • Thank you for your answer.

    I tested it by reflecting DTS as you advised, but the result was similar to before.

    Unfortunately, there is currently no tool that can read the registers.

    Below is the boot log and DTS..

    Please check.

    * boot log

    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.19.94-gbe5389fd85 (root@unet) (gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02)) #21 PREEMPT Mon Aug 26 18:50:56 KST 2024
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] OF: fdt: Machine model: TI AM335x EVM-SK
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] efi: Getting EFI parameters from FDT:
    [    0.000000] efi: UEFI not found.
    [    0.000000] cma: Reserved 48 MiB at 0xbd000000
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM335X ES2.1 (sgx neon)
    [    0.000000] random: get_random_bytes called from start_kernel+0xa4/0x434 with crng_init=0
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260416
    [    0.000000] Kernel command line: console=ttyO0,115200n8 root=PARTUUID=44ae4435-02 rw rootfstype=ext4 rootwait
    [    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
    [    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Memory: 975340K/1048576K available (9216K kernel code, 308K rwdata, 2716K rodata, 1024K init, 254K bss, 24084K reserved, 49152K cma-reserved, 212992K highmem)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    [    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (10208 kB)
    [    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
    [    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 309 kB)
    [    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 255 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] rcu: Preemptible hierarchical RCU implementation.
    [    0.000000]  Tasks RCU enabled.
    [    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    [    0.000000] IRQ: Found an INTC at 0x(ptrval) (revision 5.0) with 128 interrupts
    [    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [    0.000012] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [    0.000032] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [    0.000042] OMAP clocksource: timer1 at 24000000 Hz
    [    0.000203] timer_probe: no matching timers found
    [    0.000381] Console: colour dummy device 80x30
    [    0.000407] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [    0.000413] This ensures that you still see kernel messages. Please
    [    0.000418] update your kernel commandline.
    [    0.000472] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
    [    0.089200] pid_max: default: 32768 minimum: 301
    [    0.089398] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.089415] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.090181] CPU: Testing write buffer coherency: ok
    [    0.090247] CPU0: Spectre v2: using BPIALL workaround
    [    0.091072] Setting up static identity map for 0x80100000 - 0x80100060
    [    0.091212] rcu: Hierarchical SRCU implementation.
    [    0.091538] EFI services will not be available.
    [    0.092817] devtmpfs: initialized
    [    0.100538] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    0.100901] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.100922] futex hash table entries: 256 (order: -1, 3072 bytes)
    [    0.104333] pinctrl core: initialized pinctrl subsystem
    [    0.105075] DMI not present or invalid.
    [    0.105520] NET: Registered protocol family 16
    [    0.107587] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.131375] l4_wkup_cm:clk:0010:0: failed to disable
    [    0.183955] cpuidle: using governor ladder
    [    0.183993] cpuidle: using governor menu
    [    0.188682] OMAP GPIO hardware version 0.1
    [    0.199076] No ATAGs?
    [    0.199088] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.212557] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.213750] v1_8d: supplied by vbat
    [    0.214017] v3_3d: supplied by vbat
    [    0.216352] SCSI subsystem initialized
    [    0.216825] media: Linux media interface: v0.10
    [    0.216869] videodev: Linux video capture interface: v2.00
    [    0.216963] pps_core: LinuxPPS API ver. 1 registered
    [    0.216972] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.216997] PTP clock support registered
    [    0.217032] EDAC MC: Ver: 3.0.0
    [    0.218138] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    0.218722] Advanced Linux Sound Architecture Driver Initialized.
    [    0.220032] clocksource: Switched to clocksource timer1
    [    0.227644] NET: Registered protocol family 2
    [    0.228429] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
    [    0.228460] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
    [    0.228528] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
    [    0.228595] TCP: Hash tables configured (established 8192 bind 8192)
    [    0.228715] UDP hash table entries: 512 (order: 1, 8192 bytes)
    [    0.228740] UDP-Lite hash table entries: 512 (order: 1, 8192 bytes)
    [    0.228884] NET: Registered protocol family 1
    [    0.229668] RPC: Registered named UNIX socket transport module.
    [    0.229684] RPC: Registered udp transport module.
    [    0.229690] RPC: Registered tcp transport module.
    [    0.229696] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.230684] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [    0.231953] Initialise system trusted keyrings
    [    0.232316] workingset: timestamp_bits=14 max_order=18 bucket_order=4
    [    0.236819] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.237586] NFS: Registering the id_resolver key type
    [    0.237625] Key type id_resolver registered
    [    0.237633] Key type id_legacy registered
    [    0.237674] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.239837] Key type asymmetric registered
    [    0.239856] Asymmetric key parser 'x509' registered
    [    0.239921] bounce: pool size: 64 pages
    [    0.239986] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
    [    0.239998] io scheduler noop registered
    [    0.240006] io scheduler deadline registered
    [    0.240370] io scheduler cfq registered (default)
    [    0.240382] io scheduler mq-deadline registered
    [    0.240388] io scheduler kyber registered
    [    0.242208] pinctrl-single 44e10800.pinmux: 142 pins, size 568
    [    0.245832] pwm-backlight backlight: backlight supply power not found, using dummy regulator
    [    0.245926] pwm-backlight backlight: Linked as a consumer to regulator.0
    [    0.291106] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
    [    0.294787] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a 8250
    [    0.935128] console [ttyS0] enabled
    [    0.939777] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 31, base_baud = 3000000) is a 8250
    [    0.949611] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 32, base_baud = 3000000) is a 8250
    [    0.959425] 481aa000.serial: ttyS5 at MMIO 0x481aa000 (irq = 33, base_baud = 3000000) is a 8250
    [    0.970312] omap_rng 48310000.rng: Random Number Generator ver. 20
    [    0.977926] pinctrl-single 44e10800.pinmux: pin PIN48 already requested by 481aa000.serial; cannot claim for panel
    [    0.988528] random: fast init done
    [    0.992214] random: crng init done
    [    0.996247] pinctrl-single 44e10800.pinmux: pin-48 (panel) status -22
    [    1.002753] pinctrl-single 44e10800.pinmux: could not request pin 48 (PIN48) from group lcd_pins_default  on device pinctrl-single
    [    1.014563] tilcdc-panel panel: Error applying setting, reverse things back
    [    1.021591] tilcdc-panel: probe of panel failed with error -22
    [    1.027700] OF: graph: no port node found in /ocp/lcdc@4830e000
    [    1.033920] OF: graph: no port node found in /ocp/lcdc@4830e000
    [    1.040372] OF: graph: no port node found in /ocp/lcdc@4830e000
    [    1.046331] tilcdc 4830e000.lcdc: no encoders/connectors found
    [    1.063616] brd: module loaded
    [    1.073200] loop: module loaded
    [    1.078497] pinctrl-single 44e10800.pinmux: pin PIN89 already requested by 44e10800.pinmux; cannot claim for 481a0000.spi
    [    1.089785] pinctrl-single 44e10800.pinmux: pin-89 (481a0000.spi) status -22
    [    1.096899] pinctrl-single 44e10800.pinmux: could not request pin 89 (PIN89) from group pinmux_spi1_pins  on device pinctrl-single
    [    1.108700] omap2_mcspi 481a0000.spi: Error applying setting, reverse things back
    [    1.116252] omap2_mcspi: probe of 481a0000.spi failed with error -22
    [    1.123413] libphy: Fixed MDIO Bus: probed
    [    1.200116] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
    [    1.207825] libphy: 4a101000.mdio: probed
    [    1.213952] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver unknown
    [    1.222104] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver Microchip KSZ9477
    [    1.231938] cpsw 4a100000.ethernet: Detected MACID = 18:2c:65:7f:d4:d6
    [    1.238632] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
    [    1.245172] cpsw 4a100000.ethernet: ALE Table size 1024
    [    1.250507] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
    [    1.258496] cpsw 4a100000.ethernet: cpsw: Detected MACID = 18:2c:65:7f:d4:d8
    [    1.266914] i2c /dev entries driver
    [    1.272990] cpuidle: enable-method property 'ti,am3352' found operations
    [    1.280283] sdhci: Secure Digital Host Controller Interface driver
    [    1.286495] sdhci: Copyright(c) Pierre Ossman
    [    1.291771] omap_gpio 4804c000.gpio: Could not set line 28 debounce to 200000 microseconds (-22)
    [    1.300652] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    1.332040] sdhci-pltfm: SDHCI platform and OF driver helper
    [    1.339541] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.353261] NET: Registered protocol family 10
    [    1.359596] Segment Routing with IPv6
    [    1.363798] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    1.370554] NET: Registered protocol family 17
    [    1.375332] Key type dns_resolver registered
    [    1.379842] omap_voltage_late_init: Voltage driver support not added
    [    1.387306] Loading compiled-in X.509 certificates
    [    1.398314] mmc0: host does not support reading read-only switch, assuming write-enable
    [    1.409977] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [    1.415455] mmc0: new high speed SDHC card at address 0001
    [    1.421024] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [    1.428386] mmcblk0: mmc0:0001 ASTC 14.6 GiB
    [    1.434296] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xdc
    [    1.441805] nand: Micron MT29F4G08ABADAH4
    [    1.445993]  mmcblk0: p1 p2
    [    1.449065] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
    [    1.457655] omap2-nand 8000000.nand: ELM device not found
    [    1.463191] omap2-nand 8000000.nand: ELM not available
    [    1.468410] omap2-nand: probe of 8000000.nand failed with error -22
    [    1.476200] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [    1.483218] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 400 kHz
    [    1.489215] OF: graph: no port node found in /ocp/lcdc@4830e000
    [    1.495472] OF: graph: no port node found in /ocp/lcdc@4830e000
    [    1.501973] OF: graph: no port node found in /ocp/lcdc@4830e000
    [    1.507935] tilcdc 4830e000.lcdc: no encoders/connectors found
    [    1.514717] OF: graph: no port node found in /ocp/lcdc@4830e000
    [    1.520991] OF: graph: no port node found in /ocp/lcdc@4830e000
    [    1.527371] OF: graph: no port node found in /ocp/lcdc@4830e000
    [    1.533431] tilcdc 4830e000.lcdc: no encoders/connectors found
    [    1.541009] input: gpio_buttons0 as /devices/platform/gpio_buttons0/input/input0
    [    1.549206] OF: graph: no port node found in /ocp/lcdc@4830e000
    [    1.555410] hctosys: unable to open rtc device (rtc0)
    [    1.560795] OF: graph: no port node found in /ocp/lcdc@4830e000
    [    1.567370] ALSA device list:
    [    1.570466]   No soundcards found.
    [    1.574966] OF: graph: no port node found in /ocp/lcdc@4830e000
    [    1.581029] tilcdc 4830e000.lcdc: no encoders/connectors found
    [    1.618185] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [    1.626595] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [    1.642076] devtmpfs: mounted
    [    1.647477] Freeing unused kernel memory: 1024K
    [    1.652836] Run /sbin/init as init process
    [    1.914726] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
    Starting syslogd: OK
    Starting klogd: OK
    Running sysctl: OK
    Populating /dev using udev: [    2.263472] udevd[86]: starting version 3.2.9
    [    2.323337] udevd[87]: starting eudev-3.2.9
    done
    Starting watchdog...
    Initializing random number generator: OK
    Saving random seed: OK
    Starting system message bus: done
    Starting rpcbind: OK
    Starting network...
    cp: can't stat '/data/root/resolv.conf': No such file or directory
    [    4.377252] net eth0: initializing cpsw version 1.12 (0)
    [    4.385757] OF: graph: no port node found in /ocp/lcdc@4830e000
    [    4.394360] OF: graph: no port node found in /ocp/lcdc@4830e000
    [    4.400803] Generic PHY 4a101000.mdio:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
    [    4.417988] OF: graph: no port node found in /ocp/lcdc@4830e000
    [    4.425713] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [    4.431771] tilcdc 4830e000.lcdc: no encoders/connectors found
    [    5.450942] [CRZ] drivers/net/ethernet/ti/cpsw.c (1185) _cpsw_adjust_link: ------------patch----

    * dts

    &davinci_mdio {
    	pinctrl-names = "default", "sleep";
    	pinctrl-0 = <&davinci_mdio_default>;
    	pinctrl-1 = <&davinci_mdio_sleep>;
    	status = "okay";
    
    	reset-gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
    	reset-delay-us = <100>;
    
    	#address-cells = <1>;
        #size-cells = <0>;
    
    	dp83869: ethernet-phy@0 {
            reg = <0>;
            tx-fifo-depth = <DP83869_PHYCR_FIFO_DEPTH_4_B_NIB>;
            rx-fifo-depth = <DP83869_PHYCR_FIFO_DEPTH_4_B_NIB>;
            ti,op-mode = <DP83869_RGMII_COPPER_ETHERNET>;
            ti,max-output-impedance;
            ti,clk-output-sel = <DP83869_CLK_O_SEL_CHN_A_RCLK>;
            rx-internal-delay-ps = <2000>;
            tx-internal-delay-ps = <2000>;
        };
    
    	ksz9897: ethernet-phy@1 {
    /*		compatible = "microchip,ksz9897";*/
            reg = <1>;
        };
    };
    
    &cpsw_emac0 {
    	phy_id = <&davinci_mdio>, <0>;
    	phy-mode = "rgmii-txid";
    	dual_emac_res_vlan = <1>;
    };
    
    &cpsw_emac1 {
    	phy_id = <&davinci_mdio>, <1>;
    	phy-mode = "rgmii-txid";
    	dual_emac_res_vlan = <2>;
    };

    Thank you,

    Kim.

  • Hi Kim,

    Thanks for sharing the logs. Please also share the schematic so I can review straps and connections.

    PHY driver not being recognized could be a result of incorrect MDC/MDIO pinmux, or unintended PHY address strapping.

    Also please confirm, are you using this driver for DP83869?

    https://github.com/TexasInstruments/ti-ethernet-software/blob/main/linux_drivers/dp83869.c

    Thank you,

    Evan