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.

TDA2SX: how to configure the two emac slaves as fixed-link and autoeth respectively

Part Number: TDA2SX

Dear TI,

I am working with my TDA2SX custom board. The vision sdk version is 3.6. And the related uboot and kernel tags.

I have my emac0 port connected to on-board MCU without phy chip and emac1 port connected to a realtec phy chip to the outside.

This is my kernel dts snippet decompiled from my dtb file:

ethernet@48484000 {
			compatible = "ti,dra7-cpsw", "ti,cpsw";
			ti,hwmods = "gmac";
			clocks = <0x11b 0x11c>;
			clock-names = "fck", "cpts";
			cpdma_channels = <0x8>;
			ale_entries = <0x400>;
			bd_ram_size = <0x2000>;
			mac_control = <0x20>;
			slaves = <0x2>;
			active_slave = <0x0>;
			cpts_clock_mult = <0x784cfe14>;
			cpts_clock_shift = <0x1d>;
			reg = <0x48484000 0x1000 0x48485200 0x2e00>;
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			ti,no-idle;
			interrupts = <0x0 0x14e 0x4 0x0 0x14f 0x4 0x0 0x150 0x4 0x0 0x151 0x4>;
			ranges;
			syscon = <0x8>;
			status = "okay";
			dual_emac;

			mdio@48485000 {
				compatible = "ti,cpsw-mdio";
				#address-cells = <0x1>;
				#size-cells = <0x0>;
				ti,hwmods = "davinci_mdio";
				bus_freq = <0xf4240>;
				reg = <0x48485000 0x100>;
				linux,phandle = <0x11d>;
				phandle = <0x11d>;
			};

			slave@48480200 {
				mac-address = [00 00 00 00 00 00];
				phy-mode = "rmii";
				dual_emac_res_vlan = <0x1>;

				fixed-link {
					speed = <0x64>;
					full-duplex;
				};
			};

			slave@48480300 {
				mac-address = [00 00 00 00 00 00];
				phy_id = <0x11d 0x1>;
				phy-mode = "mii";
				dual_emac_res_vlan = <0x2>;
			};

			cpsw-phy-sel@4a002554 {
				compatible = "ti,dra7xx-cpsw-phy-sel";
				reg = <0x4a002554 0x4>;
				reg-names = "gmii-sel";
			};

Then i can only get one eth port returned by issue ifconfig.

root@dra7xx-evm:~# ifconfig
eth0      Link encap:Ethernet  HWaddr A8:E2:C1:D9:29:2A
          inet6 addr: fe80::aae2:c1ff:fed9:292a%763612/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:17828 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1435901 (1.3 MiB)  TX bytes:1332 (1.3 KiB)
          Interrupt:92

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1%763612/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

As i have enabled the "dual_emac" property. Why can not i get both eth0 and eth1 ports, which just same as the evm board.
What should i do to make the eth1 interface working normally? Are there any files from the rootfs need to be checked?

Regardss
Liu Gan

  • Hi all,

    Anything else if you need, let me know.

    Hope sincerely for your help.

    Regardss
    Liu Gan

  • Hi Liu,

    Based on the dtb, I believe the "eth0" device on your ifconfig corresponds to the "emac0" connected in phy less mode.

    Can you please confirm this based on the MAC Address?

    And also, as you are using a realtec phy to connect to "emac1", did you create a corresponding device tree node and bind it with the driver for the realtec PHY?

    I am not seeing any such changes in the snippet you have attached, so please provide the information on that.

    Regards

    Santhana Bharathi

  • Hi Santhana,

    Thanks for your reply.

    Based on the dtb, I believe the "eth0" device on your ifconfig corresponds to the "emac0" connected in phy less mode.
    Yes, you are right. The "eth0" device corrsponds to the "emac0" node. The "ping" cmd working fine over the interface communicating to the MCU.

    And also, as you are using a realtec phy to connect to "emac1", did you create a corresponding device tree node and bind it with the driver for the realtec PHY?
    I meant to use the following slave node reference to the emac1 port. So i modify to the phy-mode to "mii" just follow the hardware connections. And the phy_id '0x1' is also come from the hardware configurations. Do i need to add some more configurations here?

    slave@48480300 {
                    mac-address = [00 00 00 00 00 00];
                    phy_id = <0x11d 0x1>;
                    phy-mode = "mii";
                    dual_emac_res_vlan = <0x2>;
                };

    Regards,
    Liu Gan

  • Hi Liu,

    Can you please give information about the delay values set in the PHY for Tx and Rx.

    Please confirm that the total delay added by the PHY and the Iodelay module in the TDA2SX Soc do not exceed the acceptable range.

    Regards

    Santhana Bharathi

  • Hi Santhana,

    Would you please tell me where can i find the delay values setting for the PHY. 

    And how can i get the total delay.

    Also, the 'acceptable delay range' is taken by what, the tda2sx soc emac controller or the phy chip? Is that mean the tolerant time that the emac contorller waiting for the phy reply?

    Regards,
    Liu Gan

  • Hi Liu,

    where can i find the delay values setting for the PHY.

    The datasheet of the PHY you are using should have the registers to enable the delay.

    Also, the 'acceptable delay range' is taken by what, the tda2sx soc emac controller or the phy chip? Is that mean the tolerant time that the emac contorller waiting for the phy reply?

    The total delay is the sum of PHY's internal delay and the IOdelay added in u-boot's mux_data file. And as per the SoC specifications the delay between Clock and the Data lines for Rx should be 2.5ns.

    Can you please provide the linux boot log, that will give clues on whether the PHY is detected or not.

     

    Regards

    Santhana Bharathi

     

  • Hi Santhana,

    I found the 'spi_flash_params_table' in the attached datasheet.

    The attached files are the phy datasheet and the output of the TI PIn Mux Tool. I used the iodelay.txt as the io delay settings in the 'mux_data.h'.

    Here is my uboot dts snippet:

    I copied the eth configuration from  the 'dra7-evm.dts'. Then i modified the phy-mode to 'rmii' and 'mii' respectively accroding to the hardware configuration. But i know that the fixed-link property is not support in the uboot by default. So for now, i just want to get the cpsw_emac1 to be worked.
    This is the uboot startup log:

    U-Boot SPL 2016.05-svn1450 (Nov 17 2019 - 14:49:38)
    DRA752-GP ES2.0
    Trying to boot from SPI
    mkimage signature not found
    Error loading remotecore IPU2!,Continuing with boot ...
    mkimage signature not found
    Error loading remotecore DSP1!,Continuing with boot ...
    mkimage signature not found
    Error loading remotecore DSP2!,Continuing with boot ...
    mkimage signature not found
    Error loading remotecore IPU1!,Continuing with boot ...
    ERROR: Cannot import environment: errno = 22
    at common/env_common.c:221/env_import()
    *** Warning - import failed, using default environment
    ERROR: Cannot import environment: errno = 3
    at common/env_sf.c:246/env_relocate_spec()
    *** Warning - env_import failed, using default environment
    
    data_offset=0, data_size=6b7f8, load=80800000
    U-Boot size 6b7f8, data 80800000
    Aligned image read: dst=80800000, src_sector=40350, sectors=6b7f8
    
    Jumping to U-Boot
    loaded - jumping to U-Boot...
    
    U-Boot 2016.05-svn1450 (Nov 17 2019 - 14:49:38 +0800)
    
    CPU  : DRA752-GP ES2.0
    Model: TI DRA742
    Board: HiRain DRA74x Board REV A.0
    DRAM:  4 GiB
    Relocation Offset is: 7e741000
    Relocating to fef41000, new gd at fdf30eb8, sp at fdf1d750
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    *** Warning - bad CRC, using default environment
    
    SCSI:  SATA link 0 timeout.
    AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
    flags: 64bit ncq stag pm led clo only pmp pio slum part ccc apst
    scanning bus for devices...
    Found 0 device(s).
    Net:   Could not get PHY for ethernet@48484000: addr 2                             
    
    Warning: ethernet@48484000 using MAC address from ROM
    eth0: ethernet@48484000 <----------It may say that the phy can be detected, or it should complaint as 'Could not get PHY for ethernet@48484000: addr 1'

    Hit any key to stop autoboot: 0

    Regards,

    Liu Gan

  • Hi Liu,

    Thank you providing the logs and pinmux configurations. Based on the logs i believe the PHY driver is not even attached.

    For example, if you had used the TI EVM, it  uses DP83867 PHY and its corresponding driver and you should get something like below in your log:

    [   10.776947] TI DP83867 48485000.mdio:02: attached PHY driver [TI DP83867] (mii_bus:phy_addr=48485000.mdio:02)

    Each PHY will have its own set of configurations that has to be passed via MDIO to initialize it. In case of TI PHY, you can refer to the dra76-evm.dts file where you will find an entry like

    &davinci_mdio {
            dp83867_0: ethernet-phy@2 {
                    reg = <2>;
                    ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
                    ti,tx-internal-delay = <DP83867_RGMIIDCTL_250_PS>;
                    ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
                    ti,min-output-impedance;
                    ti,dp83867-rxctrl-strap-quirk;
            };
    
            dp83867_1: ethernet-phy@3 {
                    reg = <3>;
                    ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
                    ti,tx-internal-delay = <DP83867_RGMIIDCTL_250_PS>;
                    ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
                    ti,min-output-impedance;
                    ti,dp83867-rxctrl-strap-quirk;
            };
    };
    

    You had rightly changed the PHY mode to "mii" for the realtek PHY with an ID "1",  but you will also have to add a similar entry(as above) in your dtb file to provide PHY specific parameters (if there are any) via MDIO and bind the corresponding driver.

    With this change, I believe your PHY should be detected and you will get the eth1 device up on your setup.

    Thank you

    Regards

    Santhana Bharathi

  • Hi Santhana,

    Thanks so much for your patience. I misundetstood that you want the uboot log, and this is the kernel boot log.

    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Initializing cgroup subsys cpuset
    [    0.000000] Initializing cgroup subsys cpu
    [    0.000000] Initializing cgroup subsys cpuacct
    [    0.000000] Linux version 4.4.84-svn1450 (gan.liu@ubuntu) (gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02) ) #34 SMP PREEMPT Tue Nov 12 15:33:14 CST 2019
    [    0.000000] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7), cr=30c5387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
    [    0.000000] Machine model: TI DRA742
    [    0.000000] Reserved memory: created DMA memory pool at 0x0000000040300000, size 3 MiB
    [    0.000000] Reserved memory: initialized node cmem@40300000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: regions without no-map are not yet supported
    [    0.000000] Reserved memory: created CMA memory pool at 0x0000000099000000, size 80 MiB
    [    0.000000] Reserved memory: initialized node ipu2_cma@95800000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created CMA memory pool at 0x000000009e000000, size 32 MiB
    [    0.000000] Reserved memory: initialized node ipu1_cma@9d000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: regions without no-map are not yet supported
    [    0.000000] Reserved memory: created CMA memory pool at 0x00000000a1000000, size 32 MiB
    [    0.000000] Reserved memory: initialized node dsp1_cma@99000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created CMA memory pool at 0x00000000a3000000, size 32 MiB
    [    0.000000] Reserved memory: initialized node dsp2_cma@9f000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: regions without no-map are not yet supported
    [    0.000000] Reserved memory: created DMA memory pool at 0x00000000a9000000, size 32 MiB
    [    0.000000] Reserved memory: initialized node cmem@A9000000, compatible id shared-dma-pool
    [    0.000000] cma: Reserved 24 MiB at 0x00000000fd800000
    [    0.000000] Forcing write-allocate cache policy for SMP
    [    0.000000] Memory policy: Data cache writealloc
    [    0.000000] OMAP4: Map 0x000000027fd00000 to fe600000 for dram barrier
    [    0.000000] DRA752 ES2.0
    [    0.000000] PERCPU: Embedded 11 pages/cpu @eb71e000 s14912 r8192 d21952 u45056
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 1033792
    [    0.000000] Kernel command line: console=ttyO2,115200n8 root=PARTUUID=64415171-02 rw rootfstype=ext4 rootwait
    [    0.000000] [LG console_setup 2051]: idx: 2.
    [    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
    [    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: 3495944K/4142080K available (6635K kernel code, 320K rwdata, 2392K rodata, 336K init, 290K bss, 441336K reserved, 204800K cma-reserved, 3363840K 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 : 0xc0008000 - 0xc08d902c   (9029 kB)
    [    0.000000]       .init : 0xc08da000 - 0xc092e000   ( 336 kB)
    [    0.000000]       .data : 0xc092e000 - 0xc097e120   ( 321 kB)
    [    0.000000]        .bss : 0xc0980000 - 0xc09c8800   ( 290 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
    [    0.000000] Preemptible hierarchical RCU implementation.
    [    0.000000]  Build-time adjustment of leaf fanout to 32.
    [    0.000000] NR_IRQS:16 nr_irqs:16 16
    [    0.000000] ti_dt_clocks_register: failed to lookup clock node gmac_gmii_ref_clk_div
    [    0.000000] OMAP clockevent source: timer1 at 32786 Hz
    [    0.000000] Architected cp15 timer(s) running at 6.14MHz (phys).
    [    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x16af5adb9, max_idle_ns: 440795202250 ns
    [    0.000005] sched_clock: 56 bits at 6MHz, resolution 162ns, wraps every 4398046511023ns
    [    0.000015] Switching to timer-based delay loop, resolution 162ns
    [    0.000326] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
    [    0.000334] OMAP clocksource: 32k_counter at 32768 Hz
    [    0.000773] Console: colour dummy device 80x30
    [    0.000788] WARNING: Your 'console=ttyO2' has been replaced by 'ttyS2'
    [    0.000795] This ensures that you still see kernel messages. Please
    [    0.000800] update your kernel commandline.
    [    0.000814] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.29 BogoMIPS (lpj=61475)
    [    0.000827] pid_max: default: 32768 minimum: 301
    [    0.000924] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.000934] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.001476] Initializing cgroup subsys io
    [    0.001492] Initializing cgroup subsys memory
    [    0.001517] Initializing cgroup subsys devices
    [    0.001530] Initializing cgroup subsys freezer
    [    0.001541] Initializing cgroup subsys perf_event
    [    0.001552] Initializing cgroup subsys pids
    [    0.001579] CPU: Testing write buffer coherency: ok
    [    0.001779] /cpus/cpu@0 missing clock-frequency property
    [    0.001796] /cpus/cpu@1 missing clock-frequency property
    [    0.001805] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    [    0.001843] Setting up static identity map for 0x80008380 - 0x800083e0
    [    0.080064] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
    [    0.080134] Brought up 2 CPUs
    [    0.080147] SMP: Total of 2 processors activated (24.59 BogoMIPS).
    [    0.080153] CPU: All CPU(s) started in HYP mode.
    [    0.080158] CPU: Virtualization extensions available.
    [    0.080535] devtmpfs: initialized
    [    0.109182] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
    [    0.110161] omap_hwmod: l3_main_2 using broken dt data from ocp
    [    0.307376] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.307399] futex hash table entries: 512 (order: 3, 32768 bytes)
    [    0.311655] pinctrl core: initialized pinctrl subsystem
    [    0.312523] NET: Registered protocol family 16
    [    0.313432] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.340224] cpuidle: using governor ladder
    [    0.370245] cpuidle: using governor menu
    [    0.378766] OMAP GPIO hardware version 0.1
    [    0.385235] irq: no irq domain found for /ocp/l4@4a000000/scm@2000/pinmux@1400 !
    [    0.400906] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [    0.400919] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [    0.408111] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
    [    0.408121] hw-breakpoint: maximum watchpoint size is 8 bytes.
    [    0.408585] omap4_sram_init:Unable to allocate sram needed to handle errata I688
    [    0.408594] omap4_sram_init:Unable to get sram pool needed to handle errata I688
    [    0.409167] OMAP DMA hardware revision 0.0
    [    0.451497] omap-dma-engine 4a056000.dma-controller: OMAP DMA engine driver (LinkedList1/2/3 supported)
    [    0.452626] edma 43300000.edma: memcpy is disabled
    [    0.457381] edma 43300000.edma: TI EDMA DMA engine driver
    [    0.461686] omap-iommu 40d01000.mmu: 40d01000.mmu registered
    [    0.461864] omap-iommu 40d02000.mmu: 40d02000.mmu registered
    [    0.462033] omap-iommu 58882000.mmu: 58882000.mmu registered
    [    0.462197] omap-iommu 55082000.mmu: 55082000.mmu registered
    [    0.462481] omap-iommu 41501000.mmu: 41501000.mmu registered
    [    0.462667] omap-iommu 41502000.mmu: 41502000.mmu registered
    [    0.465652] palmas 0-0058: IRQ missing: skipping irq request
    [    0.481068] palmas 0-0058: Muxing GPIO 2f, PWM 0, LED 0
    [    0.553211] pcf857x: probe of 0-0020 failed with error -121
    [    0.553473] pcf857x: probe of 0-0021 failed with error -121
    [    0.553631] omap_i2c 48070000.i2c: bus 0 rev0.12 at 400 kHz
    [    0.553820] media: Linux media interface: v0.10
    [    0.553871] Linux video capture interface: v2.00
    [    0.553909] pps_core: LinuxPPS API ver. 1 registered
    [    0.553916] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.553940] PTP clock support registered
    [    0.553984] EDAC MC: Ver: 3.0.0
    [    0.554755] omap-mailbox 48840000.mailbox: omap mailbox rev 0x400
    [    0.555043] omap-mailbox 48842000.mailbox: omap mailbox rev 0x400
    [    0.555373] Advanced Linux Sound Architecture Driver Initialized.
    [    0.556215] clocksource: Switched to clocksource arch_sys_counter
    [    0.566822] NET: Registered protocol family 2
    [    0.567314] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
    [    0.567378] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
    [    0.567503] TCP: Hash tables configured (established 8192 bind 8192)
    [    0.567551] UDP hash table entries: 512 (order: 2, 16384 bytes)
    [    0.567582] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
    [    0.567787] NET: Registered protocol family 1
    [    0.568048] RPC: Registered named UNIX socket transport module.
    [    0.568058] RPC: Registered udp transport module.
    [    0.568064] RPC: Registered tcp transport module.
    [    0.568070] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.569012] hw perfevents: enabled with armv7_cortex_a15 PMU driver, 7 counters available
    [    0.579055] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.579729] NFS: Registering the id_resolver key type
    [    0.579757] Key type id_resolver registered
    [    0.579765] Key type id_legacy registered
    [    0.579833] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.581144] bounce: pool size: 64 pages
    [    0.581298] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
    [    0.581315] io scheduler noop registered
    [    0.581329] io scheduler deadline registered
    [    0.581365] io scheduler cfq registered (default)
    [    0.586160] pinctrl-single 4a003400.pinmux: 282 pins at pa fc003400 size 1128
    [    0.589313] PCI host bridge /ocp/axi@0/pcie_rc@51000000 ranges:
    [    0.589326]   No bus range found for /ocp/axi@0/pcie_rc@51000000, using [bus 00-ff]
    [    0.589358]    IO 0x20003000..0x20012fff -> 0x00000000
    [    0.589380]   MEM 0x20013000..0x2fffffff -> 0x20013000
    [    0.619388] dra7-pcie 51000000.pcie_rc: link is not up
    [    0.619563] dra7-pcie 51000000.pcie_rc: PCI host bridge to bus 0000:00
    [    0.619576] pci_bus 0000:00: root bus resource [bus 00-ff]
    [    0.619587] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
    [    0.619596] pci_bus 0000:00: root bus resource [mem 0x20013000-0x2fffffff]
    [    0.620008] PCI: bus0: Fast back to back transfers disabled
    [    0.620127] PCI: bus1: Fast back to back transfers enabled
    [    0.620210] pci 0000:00:00.0: BAR 0: assigned [mem 0x20100000-0x201fffff]
    [    0.620224] pci 0000:00:00.0: BAR 1: assigned [mem 0x20020000-0x2002ffff]
    [    0.620236] pci 0000:00:00.0: PCI bridge to [bus 01]
    [    0.620460] pcieport 0000:00:00.0: Signaling PME through PCIe PME interrupt
    [    0.680071] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [    0.683443] 4806a000.serial: ttyS0 at MMIO 0x4806a000 (irq = 301, base_baud = 3000000) is a 8250
    [    0.684314] 4806c000.serial: ttyS1 at MMIO 0x4806c000 (irq = 302, base_baud = 3000000) is a 8250
    [    0.685151] console [ttyS2] disabled
    [    0.685197] 48020000.serial: ttyS2 at MMIO 0x48020000 (irq = 303, base_baud = 3000000) is a 8250
    [    1.717058] console [ttyS2] enabled
    [    1.721706] [drm] Initialized drm 1.1.0 20060810
    [    1.727257] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [    1.733901] [drm] No driver support for vblank timestamp query.
    [    1.740067] [drm] Initialized vdrm 1.0.0 20110917 on minor 0
    [    1.752949] loop: module loaded
    [    1.756509] vmemexp device MAJOR num = 245
    [    1.760639] vmemexp class registered
    [    1.764349] /dev/vmemexp device registered
    [    1.768480] ioctl DBUFIOC_EXPORT_VIRTMEM = -1072899120
    [    1.774179] nand: No NAND device found
    [    1.777970] omap2-nand 8000000.nand: scan failed, may be bus-width mismatch
    [    1.787791] m25p80 spi32766.0: found n25q512a, expected s25fl256s1
    [    1.794035] m25p80 spi32766.0: n25q512a (65536 Kbytes)
    [    1.799275] 7 ofpart partitions found on MTD device spi32766.0
    [    1.805134] Creating 7 MTD partitions on "spi32766.0":
    [    1.810316] 0x000000000000-0x000000040000 : "QSPI.SPL"
    [    1.816464] 0x000000040000-0x000000140000 : "QSPI.u-boot"
    [    1.822783] 0x000000140000-0x0000001c0000 : "QSPI.u-boot-spl-os"
    [    1.829719] 0x0000001c0000-0x0000001d0000 : "QSPI.u-boot-env"
    [    1.836402] 0x0000001d0000-0x0000001e0000 : "QSPI.u-boot-env.backup1"
    [    1.843769] 0x0000001e0000-0x0000009e0000 : "QSPI.kernel"
    [    1.850124] 0x0000009e0000-0x000002000000 : "QSPI.file-system"
    [    1.857921] libphy: Fixed MDIO Bus: probed
    [    1.906249] davinci_mdio 48485000.mdio: davinci mdio revision 1.6
    [    1.912375] davinci_mdio 48485000.mdio: detected phy mask fffffffc
    [    1.922697] libphy: 48485000.mdio: probed
    [    1.926747] davinci_mdio 48485000.mdio: phy[0]: device 48485000.mdio:00, driver unknown
    [    1.934788] davinci_mdio 48485000.mdio: phy[1]: device 48485000.mdio:01, driver unknown
    [    1.943623] cpsw 48484000.ethernet: Detected MACID = a8:e2:c1:d9:29:2a
    [    1.950287] cpsw 48484000.ethernet: cpts: overflow check period 800
    [    1.957253] cpsw 48484000.ethernet: cpsw: Detected MACID = a8:e2:c1:d9:29:2b
    [    1.965818] mousedev: PS/2 mouse device common for all mice
    [    1.971996] i2c /dev entries driver
    [    1.980505] omap_hsmmc 4809c000.mmc: Got CD GPIO
    [    1.986113] omap_hsmmc 480b4000.mmc: no pinctrl state for sdr25 mode
    [    1.992524] omap_hsmmc 480b4000.mmc: no pinctrl state for sdr12 mode
    [    1.999075] evm_3v3_sw: supplied by sysen1
    [    2.037117] ledtrig-cpu: registered to indicate activity on CPUs
    [    2.045039] aic_dvdd: supplied by evm_3v3_sw
    [    2.051144] NET: Registered protocol family 10
    [    2.066466] sit: IPv6 over IPv4 tunneling driver
    [    2.071653] NET: Registered protocol family 17
    [    2.076378] Key type dns_resolver registered
    [    2.079373] mmc0: MAN_BKOPS_EN bit is not set
    [    2.084806] mmc0: new HS200 MMC card at address 0001
    [    2.090133] omap_voltage_late_init: Voltage driver support not added
    [    2.095310] mmcblk0: mmc0:0001 008GB0 7.28 GiB
    [    2.101608] Adding alias for supply vdd,cpu0 -> vdd,4a003b20.oppdm
    [    2.105587] mmcblk0boot0: mmc0:0001 008GB0 partition 1 8.00 MiB
    [    2.113796] Adding alias for supply vbb,cpu0 -> vbb,4a003b20.oppdm
    [    2.115852] mmcblk0boot1: mmc0:0001 008GB0 partition 2 8.00 MiB
    [    2.121015]  mmcblk0: p1 p2
    [    2.128829] ti_oppdm 4a003b20.oppdm: Unable to get vdd regulator:-517
    [    2.135430] Power Management for TI OMAP4+ devices.
    [    2.140553] Registering SWP/SWPB emulation handler
    [    2.146725] dmm 4e000000.dmm: workaround for errata i878 in use
    [    2.154226] dmm 4e000000.dmm: initialized all PAT entries
    [    2.160653] [drm] Initialized omapdrm 1.0.0 20110917 on minor 1
    [    2.177675] omap_hsmmc 4809c000.mmc: Got CD GPIO
    [    2.183166] Adding alias for supply vdd,cpu0 -> vdd,4a003b20.oppdm
    [    2.189418] Adding alias for supply vbb,cpu0 -> vbb,4a003b20.oppdm
    [    2.195667] ti_oppdm 4a003b20.oppdm: Unable to get vdd regulator:-517
    [    2.202685] hctosys: unable to open rtc device (rtc0)
    [    2.219864] evm_1v8: disabling
    [    2.222940] aic_dvdd: disabling
    [    2.226095] vmmcwl_fixed: disabling
    [    2.229829] ldousb: disabling
    [    2.233097] pbias_mmc_omap5: disabling
    [    2.237099] ALSA device list:
    [    2.240079]   No soundcards found.
    [    2.296052] EXT4-fs (mmcblk0p2): recovery complete
    [    2.301686] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [    2.309865] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [    2.315966] devtmpfs: mounted
    [    2.319190] Freeing unused kernel memory: 336K
    [    2.323650] This architecture does not have kernel memory protection.
    INIT: version 2.88 booting
    00=====S00psplash.sh.old
    Framebuffer /dev/fb0 not detected
    Boot splashscreen disabled
    Starting udev
    [    2.493493] udevd[96]: starting version 3.2.2
    [    2.499387] random: udevd: uninitialized urandom read (16 bytes read, 19 bits of entropy available)
    [    2.509429] random: udevd: uninitialized urandom read (16 bytes read, 19 bits of entropy available)
    [    2.519487] random: udevd: uninitialized urandom read (16 bytes read, 19 bits of entropy available)
    [    2.528700] random: udevd: uninitialized urandom read (16 bytes read, 19 bits of entropy available)
    [    2.553958] udevd[97]: starting eudev-3.2.2
    [    2.664976] random: udevd: uninitialized urandom read (16 bytes read, 21 bits of entropy available)
    [    3.033071] udevd[217]: failed to execute '/etc/udev/scripts/mount.sh' '/etc/udev/scripts/mount.sh': No such file or directory
    [    3.056918] udevd[221]: failed to execute '/etc/udev/scripts/mount.sh' '/etc/udev/scripts/mount.sh': No such file or directory
    [    3.414364] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
    hwclock: can't open '/dev/misc/rtc': No such file or directory
    Mon Nov  4 08:23:45 UTC 2019
    hwclock: can't open '/dev/misc/rtc': No such file or directory
    [    3.620304] random: dd: uninitialized urandom read (512 bytes read, 32 bits of entropy available)
    INIT: Entering runlevel: 5
    Configuring network interfaces... [    3.702971] net eth0: initializing cpsw version 1.15 (0)
    [    3.708600] net eth0: initialized cpsw ale version 1.4
    [    3.713762] net eth0: ALE Table size 1024
    [    3.720882] net eth0: phy found : id is : 0x0
    [    3.722042] omap_hsmmc 4809c000.mmc: Got CD GPIO
    [    3.731286] Adding alias for supply vdd,cpu0 -> vdd,4a003b20.oppdm
    [    3.737597] Adding alias for supply vbb,cpu0 -> vbb,4a003b20.oppdm
    [    3.742884] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [    3.750313] ti_oppdm 4a003b20.oppdm: Unable to get vdd regulator:-517
    udhcpc (v1.24.1) started
    Sending discover...
    [    5.716252] cpsw 48484000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    [    5.724134] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    Sending discover...                  
    Sending discover...
    No lease, forking to background
    done.
    hwclock: can't open '/dev/misc/rtc': No such file or directory
    Starting syslogd/klogd: done
    umount: can't unmount /mnt/.psplash: Invalid argument
    
     _____                    _____           _         _
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|
                  |___|                    |___|
    
    Arago Project http://arago-project.org dra7xx-evm /dev/ttyS2
    
    Arago 2018.04 dra7xx-evm /dev/ttyS2
    
    dra7xx-evm login: 

    I believe that the log 'No lease, forking to background' is why the eth1 failed showing up while ifconfig.

    This is some more information:

    As the phy description node in the dts file. I found that the dtb file used for my EVM is dra7-evm-infoadas.dtb, and there are no any phy nodes defined in it.
    So maybe it's not the key point. I guess that if the phy chip cound auto negotiation with outside phy, and the emac controller could communicate the phy chip via mido interface, the ethernet should working fine. May the emac contorller need not to know the phy chip specifications.

    Regards,
    Liu Gan

  • Hi Liu,

    Sorry for the late response.

    Thank you for providing the detailed log.

    [    1.926747] davinci_mdio 48485000.mdio: phy[0]: device 48485000.mdio:00, driver unknown 
    [    1.934788] davinci_mdio 48485000.mdio: phy[1]: device 48485000.mdio:01, driver unknown 
    
    From the log it is clear that the PHY is not getting bound to a Realtek Driver.
    Please check whether your PHY has an associated linux driver available in the kernel.
    If yes, please bind it by mentioning the respective name in the compatible parameter of the dts file

    Thank you
    Regards
    Santhana Bharathi
  • Hi Santhana,

    Thanks for your help. It's proved to be that the phy chip i used is not support both in the uboot and kernel driver.After i add the adapt code for them, it now can work normally.

    But for the mac-2-mac interface. I cannot can all the packets received when i try to ping the other end. There are always lots of packets droped indeed.

    It looks like:

    root@dra7xx-evm:/opt/vision_sdk# ping 192.168.0.3
    PING 192.168.0.3 (192.168.0.3): 56 data bytes
    64 bytes from 192.168.0.3: seq=1 ttl=255 time=3.288 ms
    64 bytes from 192.168.0.3: seq=2 ttl=255 time=3.152 ms
    64 bytes from 192.168.0.3: seq=3 ttl=255 time=3.027 ms
    64 bytes from 192.168.0.3: seq=6 ttl=255 time=2.654 ms
    64 bytes from 192.168.0.3: seq=7 ttl=255 time=2.526 ms
    64 bytes from 192.168.0.3: seq=8 ttl=255 time=2.398 ms
    64 bytes from 192.168.0.3: seq=10 ttl=255 time=2.149 ms
    64 bytes from 192.168.0.3: seq=11 ttl=255 time=2.025 ms
    64 bytes from 192.168.0.3: seq=14 ttl=255 time=1.647 ms
    64 bytes from 192.168.0.3: seq=15 ttl=255 time=1.522 ms
    64 bytes from 192.168.0.3: seq=19 ttl=255 time=1.019 ms
    64 bytes from 192.168.0.3: seq=21 ttl=255 time=0.770 ms
    64 bytes from 192.168.0.3: seq=22 ttl=255 time=0.646 ms
    64 bytes from 192.168.0.3: seq=23 ttl=255 time=0.521 ms
    64 bytes from 192.168.0.3: seq=26 ttl=255 time=0.140 ms
    64 bytes from 192.168.0.3: seq=27 ttl=255 time=5.070 ms
    64 bytes from 192.168.0.3: seq=28 ttl=255 time=4.946 ms
    ^C
    --- 192.168.0.3 ping statistics ---
    29 packets transmitted, 17 packets received, 41% packet loss
    round-trip min/avg/max = 0.140/2.205/5.070 ms

    You can see that from the above console log. Nearly half of the packets did not get the response.It has been proved that the MCU on the other end works fine.
    Could you please help on this problem? I have on idea how to debug with this.

    Regards,
    Liu Gan

  • Hi Liu,

    It is good to know that you are able to use both the MACs as required.

    Regarding the ping issue, can you please close the current thread and create a new thread.

    We highly recommend this, as it will help those who face similar issues in future to easily find the solutions.

    Thanks

    Regards

    Santhana Bharathi