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.

Linux/AM3352: Ethernet interface not up

Part Number: AM3352

Tool/software: Linux

Hello,

I have custom board based AM3352, and on my board I have two PHY of TI-DP83867 at address 0x0 and 0xF.

Ethernet is working at u-boot level, I can transfer files using tftp, hardware looks OK.

When I start linux, it boots-up successfully, but network interface is not up.

Please let me know what area I should look for so ethernet/phy comes up and networking works. I would like to get eth0, and eth1 both comes  up with DHCP mode.

I am using TI-SDK 4.03.00.05

 

I am using am335x-evm.dtb file and i haven't made any changes in corresponding .dts file. It looks like I have to make some changes based on my hardware. unfortunately I am not much familiar with .dts file if someone can explain me what kind of changes are required, I really appreciate.

Thanks,
NU.

/ # uname -a
Linux 4.9.69-g9ce43c71ae #36 PREEMPT Mon Aug 20 21:24:03 PDT 2018 armv7l GNU/Linux
/ # ifconfig -a
eth0      Link encap:Ethernet  HWaddr 98:5D:AD:45:49:58
          BROADCAST MULTICAST  MTU:1500  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:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:174

lo        Link encap:Local Loopback
          LOOPBACK  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)

sit0      Link encap:IPv6-in-IPv4
          NOARP  MTU:1480  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)

/ # ifconfig eth0 up
[ 1291.439019] net eth0: initializing cpsw version 1.12 (0)
[ 1291.444400] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
[ 1291.470223] cpsw 4a100000.ethernet: ALE Table size 1024
[ 1291.477963] net eth0: phy "4a101000.mdio:00" not found on slave 0, err -19
[ 1291.484883] libphy: PHY 4a101000.mdio:01 not found
[ 1291.489826] net eth0: phy "4a101000.mdio:01" not found on slave 1, err -19
[ 1291.498947] cpts ptp bc clkid 0
[ 1291.509968] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
/ #

  • Hi newuser,

    Yes, you need to update your am335x-evm.dts linux file to match your custom board ethernet PHYs. Check below things:

    - pinmux, check if MDIO and CPSW pinmux is correct for your board and change if necessary
    - phy_id and phy-mode

    These changes should be same as for u-boot am335x-evm.dts file. As you state that u-boot is working fine, is this with default am335x-evm.dts file? If not, aligned your linux am335x-evm.dts file with you u-boot am335x-evm.dts file.

    u-boot/arch/arm/dts/am335x-evm.dts
    linux-kernel/arch/arm/boot/dts/am335x-evm.dts

    Refer also to the below files regarding DTS settings:

    linux-kernel/Documentation/devicetree/bindings/net/cpsw.txt
    linux-kernel/Documentation/devicetree/bindings/net/ethernet.txt

    Note also that TI DRA72XEVM is coming with dp83867 PHY, you can take its DTS file for reference:

    linux-kernel/arch/arm/boot/dts/dra72-evm-revc.dts
    linux-kernel/Documentation/devicetree/bindings/net/ti,dp83867.txt

    Regards,
    Pavel
  • Hello Pavel,

    Thx for your reply. on my board i have two TI PHY - DP83867 operating in rgmii2 mode, connected at address 0x0 and 0xF.

    eth_0, at address 0x0 is working at U-boot level, i can xfer file and no issue for that one.

    for U-Boot I am not using .dts file, all setting are done in code using mux.c in u-boot.

     

    Now I have started working on linux for AM3352 and i want my both eth0 and eht1 i am having for trouble to make both interface up.

    I have attached my logs, as well as modified .dts file. 

    do i have to make any change in PHY driver code? i see in driver code dp83867.c PHY device address is hard coded to 0x1F, so how it is going to work for two phys? can you explain me.

    Also on my board i have only one UART - UART_0, and no USB. so I made some changes in .dts file but now I see more warning/error and not sure how to fix that one?

    Starting kernel ...

    [ 0.000000] Booting Linux on physical CPU 0x0
    [ 0.000000] Linux version 4.14.40-g4796173fc5 (dmehta@silver1) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11)) #1 PREEMPT Sun Aug 26 21:59:47 PDT 2018
    [ 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
    [ 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 0x8a800000
    [ 0.000000] CPU: All CPU(s) started in SVC mode.
    [ 0.000000] AM335X ES2.1 (neon)
    [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 64960
    [ 0.000000] Kernel command line: console=ttyO0,115200n8 root=/
    [ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    [ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    [ 0.000000] Memory: 185064K/262144K available (7168K kernel code, 282K rwdata, 1944K rodata, 15360K init, 252K bss, 27928K reserved, 49152K cma-reserved, 0K highmem)
    [ 0.000000] Virtual kernel memory layout:
    [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
    [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
    [ 0.000000] vmalloc : 0xd0800000 - 0xff800000 ( 752 MB)
    [ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
    [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
    [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
    [ 0.000000] .text : 0xc0008000 - 0xc0800000 (8160 kB)
    [ 0.000000] .init : 0xc0a00000 - 0xc1900000 (15360 kB)
    [ 0.000000] .data : 0xc1900000 - 0xc1946b18 ( 283 kB)
    [ 0.000000] .bss : 0xc1946b18 - 0xc1985df4 ( 253 kB)
    [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [ 0.000000] 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 0xfa200000 (revision 5.0) with 128 interrupts
    [ 0.000000] OMAP clockevent source: timer2 at 25000000 Hz
    [ 0.000016] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns
    [ 0.000037] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
    [ 0.000049] OMAP clocksource: timer1 at 25000000 Hz
    [ 0.000206] timer_probe: no matching timers found
    [ 0.000405] Console: colour dummy device 80x30
    [ 0.000432] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [ 0.000439] This ensures that you still see kernel messages. Please
    [ 0.000445] update your kernel commandline.
    [ 0.000476] Calibrating delay loop... 795.44 BogoMIPS (lpj=3977216)
    [ 0.089143] pid_max: default: 32768 minimum: 301
    [ 0.089344] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.089360] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.090186] CPU: Testing write buffer coherency: ok
    [ 0.090929] Setting up static identity map for 0x80100000 - 0x80100060
    [ 0.091085] Hierarchical SRCU implementation.
    [ 0.091434] EFI services will not be available.
    [ 0.092834] devtmpfs: initialized
    [ 0.100147] random: get_random_u32 called from bucket_table_alloc+0x8c/0x1c4 with crng_init=0
    [ 0.100576] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [ 0.100900] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [ 0.100924] futex hash table entries: 256 (order: -1, 3072 bytes)
    [ 0.104729] pinctrl core: initialized pinctrl subsystem
    [ 0.105509] DMI not present or invalid.
    [ 0.105949] NET: Registered protocol family 16
    [ 0.108253] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [ 0.116231] omap_hwmod: uart2: no dt node
    [ 0.116254] ------------[ cut here ]------------
    [ 0.116292] WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_hwmod.c:2494 _init.constprop.21+0x1f8/0x4bc
    [ 0.116301] omap_hwmod: uart2: doesn't have mpu register target base
    [ 0.116308] Modules linked in:
    [ 0.116330] CPU: 0 PID: 1 Comm: swapper Not tainted 4.14.40-g4796173fc5 #1
    [ 0.116337] Hardware name: Generic AM33XX (Flattened Device Tree)
    [ 0.116346] Backtrace:
    [ 0.116383] [<c010bbc8>] (dump_backtrace) from [<c010be98>] (show_stack+0x18/0x1c)
    [ 0.116396] r7:00000009 r6:00000000 r5:c0941dc4 r4:cf03fe20
    [ 0.116417] [<c010be80>] (show_stack) from [<c0735a8c>] (dump_stack+0x24/0x28)
    [ 0.116438] [<c0735a68>] (dump_stack) from [<c0128e38>] (__warn+0xe8/0x100)
    [ 0.116452] [<c0128d50>] (__warn) from [<c0128e90>] (warn_slowpath_fmt+0x40/0x48)
    [ 0.116466] r9:c0a0061c r8:000000b5 r7:00000000 r6:c1909b84 r5:00000000 r4:c0942190
    [ 0.116482] [<c0128e54>] (warn_slowpath_fmt) from [<c0a0ac60>] (_init.constprop.21+0x1f8/0x4bc)
    [ 0.116491] r3:c09435ec r2:c0942190
    [ 0.116499] r4:c1909b40
    [ 0.116514] [<c0a0aa68>] (_init.constprop.21) from [<c0a0b45c>] (__omap_hwmod_setup_all+0x48/0x108)
    [ 0.116528] r10:00000003 r9:c0a0061c r8:000000b5 r7:c0a38820 r6:00000000 r5:c1907d50
    [ 0.116535] r4:c1909b40
    [ 0.116550] [<c0a0b414>] (__omap_hwmod_setup_all) from [<c0101984>] (do_one_initcall+0x4c/0x170)
    [ 0.116560] r5:c0a0b414 r4:ffffe000
    [ 0.116585] [<c0101938>] (do_one_initcall) from [<c0a00ebc>] (kernel_init_freeable+0x138/0x1c8)
    [ 0.116598] r9:c0a0061c r8:000000b5 r6:c0a47e5c r5:c1946b40 r4:c1946b40
    [ 0.116621] [<c0a00d84>] (kernel_init_freeable) from [<c0749eb8>] (kernel_init+0x10/0x110)
    [ 0.116634] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0749ea8
    [ 0.116642] r4:00000000
    [ 0.116656] [<c0749ea8>] (kernel_init) from [<c0107f28>] (ret_from_fork+0x14/0x2c)
    [ 0.116665] r5:c0749ea8 r4:00000000
    [ 0.116685] ---[ end trace a4a0537cfd8d78ca ]---
    [ 0.116945] omap_hwmod: uart3: no dt node
    [ 0.116953] ------------[ cut here ]------------
    [ 0.116968] WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_hwmod.c:2494 _init.constprop.21+0x1f8/0x4bc
    [ 0.116976] omap_hwmod: uart3: doesn't have mpu register target base
    [ 0.116982] Modules linked in:
    [ 0.116996] CPU: 0 PID: 1 Comm: swapper Tainted: G W 4.14.40-g4796173fc5 #1
    [ 0.117004] Hardware name: Generic AM33XX (Flattened Device Tree)
    [ 0.117010] Backtrace:
    [ 0.117032] [<c010bbc8>] (dump_backtrace) from [<c010be98>] (show_stack+0x18/0x1c)
    [ 0.117043] r7:00000009 r6:00000000 r5:c0941dc4 r4:cf03fe20
    [ 0.117058] [<c010be80>] (show_stack) from [<c0735a8c>] (dump_stack+0x24/0x28)
    [ 0.117073] [<c0735a68>] (dump_stack) from [<c0128e38>] (__warn+0xe8/0x100)
    [ 0.117088] [<c0128d50>] (__warn) from [<c0128e90>] (warn_slowpath_fmt+0x40/0x48)
    [ 0.117101] r9:c0a0061c r8:000000b5 r7:00000000 r6:c1909c00 r5:00000000 r4:c0942190
    [ 0.117116] [<c0128e54>] (warn_slowpath_fmt) from [<c0a0ac60>] (_init.constprop.21+0x1f8/0x4bc)
    [ 0.117126] r3:c09435e4 r2:c0942190
    [ 0.117133] r4:c1909bbc
    [ 0.117148] [<c0a0aa68>] (_init.constprop.21) from [<c0a0b45c>] (__omap_hwmod_setup_all+0x48/0x108)
    [ 0.117163] r10:00000003 r9:c0a0061c r8:000000b5 r7:c0a38820 r6:00000000 r5:c1907d50
    [ 0.117170] r4:c1909bbc
    [ 0.117184] [<c0a0b414>] (__omap_hwmod_setup_all) from [<c0101984>] (do_one_initcall+0x4c/0x170)
    [ 0.117193] r5:c0a0b414 r4:ffffe000
    [ 0.117209] [<c0101938>] (do_one_initcall) from [<c0a00ebc>] (kernel_init_freeable+0x138/0x1c8)
    [ 0.117222] r9:c0a0061c r8:000000b5 r6:c0a47e5c r5:c1946b40 r4:c1946b40
    [ 0.117238] [<c0a00d84>] (kernel_init_freeable) from [<c0749eb8>] (kernel_init+0x10/0x110)
    [ 0.117252] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0749ea8
    [ 0.117259] r4:00000000
    [ 0.117273] [<c0749ea8>] (kernel_init) from [<c0107f28>] (ret_from_fork+0x14/0x2c)
    [ 0.117282] r5:c0749ea8 r4:00000000
    [ 0.117290] ---[ end trace a4a0537cfd8d78cb ]---
    [ 0.117515] omap_hwmod: uart4: no dt node
    [ 0.117522] ------------[ cut here ]------------
    [ 0.117538] WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_hwmod.c:2494 _init.constprop.21+0x1f8/0x4bc
    [ 0.117545] omap_hwmod: uart4: doesn't have mpu register target base
    [ 0.117551] Modules linked in:
    [ 0.117565] CPU: 0 PID: 1 Comm: swapper Tainted: G W 4.14.40-g4796173fc5 #1
    [ 0.117573] Hardware name: Generic AM33XX (Flattened Device Tree)
    [ 0.117579] Backtrace:
    [ 0.117598] [<c010bbc8>] (dump_backtrace) from [<c010be98>] (show_stack+0x18/0x1c)
    [ 0.117610] r7:00000009 r6:00000000 r5:c0941dc4 r4:cf03fe20
    [ 0.117625] [<c010be80>] (show_stack) from [<c0735a8c>] (dump_stack+0x24/0x28)
    [ 0.117639] [<c0735a68>] (dump_stack) from [<c0128e38>] (__warn+0xe8/0x100)
    [ 0.117653] [<c0128d50>] (__warn) from [<c0128e90>] (warn_slowpath_fmt+0x40/0x48)
    [ 0.117667] r9:c0a0061c r8:000000b5 r7:00000000 r6:c1909c7c r5:00000000 r4:c0942190
    [ 0.117682] [<c0128e54>] (warn_slowpath_fmt) from [<c0a0ac60>] (_init.constprop.21+0x1f8/0x4bc)
    [ 0.117691] r3:c09435dc r2:c0942190
    [ 0.117698] r4:c1909c38
    [ 0.117714] [<c0a0aa68>] (_init.constprop.21) from [<c0a0b45c>] (__omap_hwmod_setup_all+0x48/0x108)
    [ 0.117727] r10:00000003 r9:c0a0061c r8:000000b5 r7:c0a38820 r6:00000000 r5:c1907d50
    [ 0.117735] r4:c1909c38
    [ 0.117749] [<c0a0b414>] (__omap_hwmod_setup_all) from [<c0101984>] (do_one_initcall+0x4c/0x170)
    [ 0.117758] r5:c0a0b414 r4:ffffe000
    [ 0.117773] [<c0101938>] (do_one_initcall) from [<c0a00ebc>] (kernel_init_freeable+0x138/0x1c8)
    [ 0.117786] r9:c0a0061c r8:000000b5 r6:c0a47e5c r5:c1946b40 r4:c1946b40
    [ 0.117801] [<c0a00d84>] (kernel_init_freeable) from [<c0749eb8>] (kernel_init+0x10/0x110)
    [ 0.117815] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0749ea8
    [ 0.117822] r4:00000000
    [ 0.117836] [<c0749ea8>] (kernel_init) from [<c0107f28>] (ret_from_fork+0x14/0x2c)
    [ 0.117845] r5:c0749ea8 r4:00000000
    [ 0.117853] ---[ end trace a4a0537cfd8d78cc ]---
    [ 0.118067] omap_hwmod: uart5: no dt node
    [ 0.118074] ------------[ cut here ]------------
    [ 0.118088] WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_hwmod.c:2494 _init.constprop.21+0x1f8/0x4bc
    [ 0.118096] omap_hwmod: uart5: doesn't have mpu register target base
    [ 0.118102] Modules linked in:
    [ 0.118114] CPU: 0 PID: 1 Comm: swapper Tainted: G W 4.14.40-g4796173fc5 #1
    [ 0.118122] Hardware name: Generic AM33XX (Flattened Device Tree)
    [ 0.118128] Backtrace:
    [ 0.118148] [<c010bbc8>] (dump_backtrace) from [<c010be98>] (show_stack+0x18/0x1c)
    [ 0.118159] r7:00000009 r6:00000000 r5:c0941dc4 r4:cf03fe20
    [ 0.118175] [<c010be80>] (show_stack) from [<c0735a8c>] (dump_stack+0x24/0x28)
    [ 0.118188] [<c0735a68>] (dump_stack) from [<c0128e38>] (__warn+0xe8/0x100)
    [ 0.118202] [<c0128d50>] (__warn) from [<c0128e90>] (warn_slowpath_fmt+0x40/0x48)
    [ 0.118216] r9:c0a0061c r8:000000b5 r7:00000000 r6:c1909cf8 r5:00000000 r4:c0942190
    [ 0.118232] [<c0128e54>] (warn_slowpath_fmt) from [<c0a0ac60>] (_init.constprop.21+0x1f8/0x4bc)
    [ 0.118241] r3:c09435d4 r2:c0942190
    [ 0.118249] r4:c1909cb4
    [ 0.118263] [<c0a0aa68>] (_init.constprop.21) from [<c0a0b45c>] (__omap_hwmod_setup_all+0x48/0x108)
    [ 0.118277] r10:00000003 r9:c0a0061c r8:000000b5 r7:c0a38820 r6:00000000 r5:c1907d50
    [ 0.118285] r4:c1909cb4
    [ 0.118299] [<c0a0b414>] (__omap_hwmod_setup_all) from [<c0101984>] (do_one_initcall+0x4c/0x170)
    [ 0.118308] r5:c0a0b414 r4:ffffe000
    [ 0.118323] [<c0101938>] (do_one_initcall) from [<c0a00ebc>] (kernel_init_freeable+0x138/0x1c8)
    [ 0.118336] r9:c0a0061c r8:000000b5 r6:c0a47e5c r5:c1946b40 r4:c1946b40
    [ 0.118351] [<c0a00d84>] (kernel_init_freeable) from [<c0749eb8>] (kernel_init+0x10/0x110)
    [ 0.118364] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0749ea8
    [ 0.118372] r4:00000000
    [ 0.118386] [<c0749ea8>] (kernel_init) from [<c0107f28>] (ret_from_fork+0x14/0x2c)
    [ 0.118395] r5:c0749ea8 r4:00000000
    [ 0.118403] ---[ end trace a4a0537cfd8d78cd ]---
    [ 0.118619] omap_hwmod: uart6: no dt node
    [ 0.118625] ------------[ cut here ]------------
    [ 0.118640] WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_hwmod.c:2494 _init.constprop.21+0x1f8/0x4bc
    [ 0.118648] omap_hwmod: uart6: doesn't have mpu register target base
    [ 0.118654] Modules linked in:
    [ 0.118666] CPU: 0 PID: 1 Comm: swapper Tainted: G W 4.14.40-g4796173fc5 #1
    [ 0.118674] Hardware name: Generic AM33XX (Flattened Device Tree)
    [ 0.118680] Backtrace:
    [ 0.118699] [<c010bbc8>] (dump_backtrace) from [<c010be98>] (show_stack+0x18/0x1c)
    [ 0.118710] r7:00000009 r6:00000000 r5:c0941dc4 r4:cf03fe20
    [ 0.118725] [<c010be80>] (show_stack) from [<c0735a8c>] (dump_stack+0x24/0x28)
    [ 0.118739] [<c0735a68>] (dump_stack) from [<c0128e38>] (__warn+0xe8/0x100)
    [ 0.118753] [<c0128d50>] (__warn) from [<c0128e90>] (warn_slowpath_fmt+0x40/0x48)
    [ 0.118767] r9:c0a0061c r8:000000b5 r7:00000000 r6:c1909d74 r5:00000000 r4:c0942190
    [ 0.118782] [<c0128e54>] (warn_slowpath_fmt) from [<c0a0ac60>] (_init.constprop.21+0x1f8/0x4bc)
    [ 0.118792] r3:c09435b8 r2:c0942190
    [ 0.118799] r4:c1909d30
    [ 0.118813] [<c0a0aa68>] (_init.constprop.21) from [<c0a0b45c>] (__omap_hwmod_setup_all+0x48/0x108)
    [ 0.118827] r10:00000003 r9:c0a0061c r8:000000b5 r7:c0a38820 r6:00000000 r5:c1907d50
    [ 0.118835] r4:c1909d30
    [ 0.118849] [<c0a0b414>] (__omap_hwmod_setup_all) from [<c0101984>] (do_one_initcall+0x4c/0x170)
    [ 0.118858] r5:c0a0b414 r4:ffffe000
    [ 0.118872] [<c0101938>] (do_one_initcall) from [<c0a00ebc>] (kernel_init_freeable+0x138/0x1c8)
    [ 0.118885] r9:c0a0061c r8:000000b5 r6:c0a47e5c r5:c1946b40 r4:c1946b40
    [ 0.118901] [<c0a00d84>] (kernel_init_freeable) from [<c0749eb8>] (kernel_init+0x10/0x110)
    [ 0.118914] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0749ea8
    [ 0.118922] r4:00000000
    [ 0.118936] [<c0749ea8>] (kernel_init) from [<c0107f28>] (ret_from_fork+0x14/0x2c)
    [ 0.118945] r5:c0749ea8 r4:00000000
    [ 0.118952] ---[ end trace a4a0537cfd8d78ce ]---
    [ 0.121529] omap_hwmod: usb_otg_hs: no dt node
    [ 0.121545] ------------[ cut here ]------------
    [ 0.121566] WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_hwmod.c:2494 _init.constprop.21+0x1f8/0x4bc
    [ 0.121574] omap_hwmod: usb_otg_hs: doesn't have mpu register target base
    [ 0.121581] Modules linked in:
    [ 0.121597] CPU: 0 PID: 1 Comm: swapper Tainted: G W 4.14.40-g4796173fc5 #1
    [ 0.121606] Hardware name: Generic AM33XX (Flattened Device Tree)
    [ 0.121613] Backtrace:
    [ 0.121636] [<c010bbc8>] (dump_backtrace) from [<c010be98>] (show_stack+0x18/0x1c)
    [ 0.121648] r7:00000009 r6:00000000 r5:c0941dc4 r4:cf03fe20
    [ 0.121664] [<c010be80>] (show_stack) from [<c0735a8c>] (dump_stack+0x24/0x28)
    [ 0.121679] [<c0735a68>] (dump_stack) from [<c0128e38>] (__warn+0xe8/0x100)
    [ 0.121694] [<c0128d50>] (__warn) from [<c0128e90>] (warn_slowpath_fmt+0x40/0x48)
    [ 0.121707] r9:c0a0061c r8:000000b5 r7:00000000 r6:c1908d44 r5:00000000 r4:c0942190
    [ 0.121723] [<c0128e54>] (warn_slowpath_fmt) from [<c0a0ac60>] (_init.constprop.21+0x1f8/0x4bc)
    [ 0.121732] r3:c0943454 r2:c0942190
    [ 0.121739] r4:c1908d00
    [ 0.121754] [<c0a0aa68>] (_init.constprop.21) from [<c0a0b45c>] (__omap_hwmod_setup_all+0x48/0x108)
    [ 0.121768] r10:00000003 r9:c0a0061c r8:000000b5 r7:c0a38820 r6:00000000 r5:c1907d50
    [ 0.121776] r4:c1908d00
    [ 0.121790] [<c0a0b414>] (__omap_hwmod_setup_all) from [<c0101984>] (do_one_initcall+0x4c/0x170)
    [ 0.121800] r5:c0a0b414 r4:ffffe000
    [ 0.121816] [<c0101938>] (do_one_initcall) from [<c0a00ebc>] (kernel_init_freeable+0x138/0x1c8)
    [ 0.121829] r9:c0a0061c r8:000000b5 r6:c0a47e5c r5:c1946b40 r4:c1946b40
    [ 0.121847] [<c0a00d84>] (kernel_init_freeable) from [<c0749eb8>] (kernel_init+0x10/0x110)
    [ 0.121860] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0749ea8
    [ 0.121868] r4:00000000
    [ 0.121882] [<c0749ea8>] (kernel_init) from [<c0107f28>] (ret_from_fork+0x14/0x2c)
    [ 0.121891] r5:c0749ea8 r4:00000000
    [ 0.121898] ---[ end trace a4a0537cfd8d78cf ]---
    [ 0.126097] omap_hwmod: debugss: _wait_target_disable failed
    [ 0.166904] cpuidle: using governor ladder
    [ 0.166945] cpuidle: using governor menu
    [ 0.171518] OMAP GPIO hardware version 0.1
    [ 0.179551] omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/nandflash_pins_s0, deferring probe
    [ 0.181896] No ATAGs?
    [ 0.181914] hw-breakpoint: debug architecture 0x4 unsupported.
    [ 0.194634] edma 49000000.edma: TI EDMA DMA engine driver
    [ 0.196456] vgaarb: loaded
    [ 0.196863] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
    [ 0.196926] omap_i2c 4802a000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c1_pins, deferring probe
    [ 0.197097] pps_core: LinuxPPS API ver. 1 registered
    [ 0.197107] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [ 0.197132] PTP clock support registered
    [ 0.197169] EDAC MC: Ver: 3.0.0
    [ 0.197646] dmi: Firmware registration failed.
    [ 0.198068] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [ 0.199645] clocksource: Switched to clocksource timer1
    [ 0.207919] NET: Registered protocol family 2
    [ 0.208696] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.208732] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.208761] TCP: Hash tables configured (established 2048 bind 2048)
    [ 0.208874] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.208895] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.209059] NET: Registered protocol family 1
    [ 0.209743] RPC: Registered named UNIX socket transport module.
    [ 0.209760] RPC: Registered udp transport module.
    [ 0.209768] RPC: Registered tcp transport module.
    [ 0.209775] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [ 1.360009] hw perfevents: no interrupt-affinity property for /pmu, guessing.
    [ 1.360167] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [ 1.361758] workingset: timestamp_bits=14 max_order=16 bucket_order=2
    [ 1.366224] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [ 1.367037] NFS: Registering the id_resolver key type
    [ 1.367085] Key type id_resolver registered
    [ 1.367093] Key type id_legacy registered
    [ 1.367140] ntfs: driver 2.1.32 [Flags: R/O].
    [ 1.369242] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
    [ 1.369265] io scheduler noop registered
    [ 1.369274] io scheduler deadline registered
    [ 1.369512] io scheduler cfq registered (default)
    [ 1.369524] io scheduler mq-deadline registered
    [ 1.369533] io scheduler kyber registered
    [ 1.371012] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [ 1.422841] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [ 1.426039] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a 8250
    [ 2.603418] random: fast init done
    [ 3.158249] console [ttyS0] enabled
    [ 3.163633] omap_rng 48310000.rng: Random Number Generator ver. 20
    [ 3.179894] brd: module loaded
    [ 3.190096] loop: module loaded
    [ 3.195523] libphy: Fixed MDIO Bus: probed
    [ 3.269728] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
    [ 3.277435] davinci_mdio 4a101000.mdio: detected phy mask ffff7ffe
    [ 4.101330] libphy: 4a101000.mdio: probed
    [ 4.105397] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver TI DP83867
    [ 4.113882] davinci_mdio 4a101000.mdio: phy[15]: device 4a101000.mdio:0f, driver TI DP83867
    [ 4.123223] cpsw 4a100000.ethernet: Detected MACID = 98:5d:ad:45:49:58
    [ 4.130062] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
    [ 4.136451] cpsw 4a100000.ethernet: ALE Table size 1024
    [ 4.141805] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
    [ 4.150538] i2c /dev entries driver
    [ 4.154439] IR NEC protocol handler initialized
    [ 4.158994] IR RC5(x/sz) protocol handler initialized
    [ 4.164131] IR RC6 protocol handler initialized
    [ 4.168681] IR JVC protocol handler initialized
    [ 4.173245] IR Sony protocol handler initialized
    [ 4.177881] IR SANYO protocol handler initialized
    [ 4.182616] IR Sharp protocol handler initialized
    [ 4.187338] IR MCE Keyboard/mouse protocol handler initialized
    [ 4.193367] IR XMP protocol handler initialized
    [ 4.199273] cpuidle: enable-method property 'ti,am3352' found operations
    [ 4.206436] sdhci: Secure Digital Host Controller Interface driver
    [ 4.212688] sdhci: Copyright(c) Pierre Ossman
    [ 4.217657] omap_hsmmc 48060000.mmc: Got CD GPIO
    [ 4.223277] sdhci-pltfm: SDHCI platform and OF driver helper
    [ 4.229495] ledtrig-cpu: registered to indicate activity on CPUs
    [ 4.237564] NET: Registered protocol family 10
    [ 4.243525] Segment Routing with IPv6
    [ 4.247300] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [ 4.254086] NET: Registered protocol family 17
    [ 4.258813] Key type dns_resolver registered
    [ 4.263361] omap_voltage_late_init: Voltage driver support not added
    [ 4.275023] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [ 4.280395] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [ 4.679644] nand: timeout while waiting for chip to become ready
    [ 4.685720] nand: No NAND device found
    [ 4.689490] omap2-nand 8000000.nand: scan failed, may be bus-width mismatch
    [ 4.698138] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 100 kHz
    [ 4.705198] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
    [ 4.711727] omap_hsmmc 48060000.mmc: Got CD GPIO
    [ 4.717665] hctosys: unable to open rtc device (rtc0)
    [ 4.723381] vbat: disabling
    [ 4.726200] lis3_reg: disabling
    [ 4.729431] Warning: unable to open an initial console.
    [ 4.753807] Freeing unused kernel memory: 15360K


    / # ifconfig -a
    eth0 Link encap:Ethernet HWaddr 98:5D:AD:45:49:58
    BROADCAST MULTICAST MTU:1500 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:1000
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
    Interrupt:44

    lo Link encap:Local Loopback
    LOOPBACK 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:1000
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

    sit0 Link encap:IPv6-in-IPv4
    NOARP MTU:1480 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:1000
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

    At this stage, I can see for eth0  - LINK and activity LED active.

    But as soon as I set some static ip address for eth0, both LED get turn OFF.

    Do I need to load any other modules? do you think something might be wrong with my start-up script?


    / # ifconfig eth0 30.30.30.33 netmask 255.255.255.0
    [ 280.235922] net eth0: initializing cpsw version 1.12 (0)
    [ 280.262142] net eth0: phy "4a101000.mdio:00" not found on slave 0, err -19
    [ 280.269927] net eth0: phy "4a101000.mdio:0f" not found on slave 1, err -19
    [ 280.283592] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    / #
    / # uname -a
    Linux 4.14.40-g4796173fc5 #1 PREEMPT Sun Aug 26 21:59:47 PDT 2018 armv7l GNU/Linux


    / # [ 858.993163] random: crng init done

    am335x_linux.zip

  • newuser said:
    Thx for your reply. on my board i have two TI PHY - DP83867 operating in rgmii2 mode, connected at address 0x0 and 0xF.

    We do not have RGMII2 mode available. Do you mean RGMII mode?

    newuser said:
    Now I have started working on linux for AM3352 and i want my both eth0 and eht1 i am having for trouble to make both interface up.

    newuser said:
    I have attached my logs, as well as modified .dts file. 

    You should also add "dual_emac" property in your DTS. Note that Am335x TI EVM is coming with single ethernet PHY, that is way "dual_emac" is missing from EVM DTS file. AM335x SK comes with the ethernet PHYs, and "dual_emac" is used in am335x-evmsk.dts file, please use as a reference.

    newuser said:
    do i have to make any change in PHY driver code? i see in driver code dp83867.c PHY device address is hard coded to 0x1F, so how it is going to work for two phys? can you explain me.

    This is Sitara forum and I can help you with Sitara AM335x device. regarding questions specific for DP83867 PHY and its driver, you should ask/post in ethernet phy forum:

    newuser said:
    Also on my board i have only one UART - UART_0, and no USB. so I made some changes in .dts file but now I see more warning/error and not sure how to fix that one?

    This is not related to ethernet PHY integration, so I would suggest you to open new e2e thread in Sitara forum regarding UART/USB related issues.

    newuser said:
    [ 0.000000] Linux version 4.14.40-g4796173fc5 (dmehta@silver1) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11)) #1 PREEMPT Sun Aug

    In your previous post you stated that you are using PSDK v4.03. have you made a switch to latest PSDK v5.00? If yes, not that PSDK v5.00 is using newer linaro GCC version of 7.2.1

  • Hello Pavel,

    Thanks for your reply. After adding "dual_emac" now i can see both eth0 and eth1. and both gets link-up. I can see activity and link LED is blinking/steady.

    At present I am using my own rootfs - and it looks like something is not setup correctly for networking to work either for static as well as for dhcp. I tried both mode.

    Do you have any pointer ,OR  can you guide me what minimum scripts / software are required in my file system so static as well as DHCP mode can work.

    Thanks,

    NU.

  • Hello Pavel,

    To simplify, now I am focusing only one ethernet eth0 - with DP83867 with PHY address 0x0. I have attached my log.

    run linux
    link up on port 0, speed 1000, full duplex
    Using cpsw device
    TFTP from server 30.30.30.1; our IP address is 30.30.30.25
    Filename 'zImage'.
    Load address: 0x82000000
    Loading: #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             ########
             753.9 KiB/s
    done
    Bytes transferred = 11555328 (b05200 hex)
    link up on port 0, speed 1000, full duplex
    Using cpsw device
    TFTP from server 30.30.30.1; our IP address is 30.30.30.25
    Filename 'am335x-evm.dtb'.
    Load address: 0x84000000
    Loading: ###
             673.8 KiB/s
    done
    Bytes transferred = 37302 (91b6 hex)
    link up on port 0, speed 1000, full duplex
    Using cpsw device
    TFTP from server 30.30.30.1; our IP address is 30.30.30.25
    Filename 'ramdisk.gz'.
    Load address: 0x87000000
    Loading: #############################################
             940.4 KiB/s
    done
    Bytes transferred = 655481 (a0079 hex)
    ## Flattened Device Tree blob at 84000000
       Booting using the fdt blob at 0x84000000
       Loading Device Tree to 8df38000, end 8df441b5 ... OK

    Starting kernel ...

    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.14.40-g4796173fc5 (dmehta@silver1) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #4 PREEMPT Thu Sep 6 22:45:11 PDT 2018
    [    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
    [    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 0x8a800000
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM335X ES2.1 (neon)
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64960
    [    0.000000] Kernel command line: bootargs=console=ttyO0,115200n8
    [    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    [    0.000000] Memory: 191192K/262144K available (7168K kernel code, 282K rwdata, 1944K rodata, 9216K init, 252K bss, 21800K reserved, 49152K cma-reserved, 0K highmem)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    [    0.000000]     vmalloc : 0xd0800000 - 0xff800000   ( 752 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0xc0008000 - 0xc0800000   (8160 kB)
    [    0.000000]       .init : 0xc0a00000 - 0xc1300000   (9216 kB)
    [    0.000000]       .data : 0xc1300000 - 0xc1346ae8   ( 283 kB)
    [    0.000000]        .bss : 0xc1346ae8 - 0xc1385d74   ( 253 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] 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 0xfa200000 (revision 5.0) with 128 interrupts
    [    0.000000] OMAP clockevent source: timer2 at 25000000 Hz
    [    0.000014] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns
    [    0.000037] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
    [    0.000048] OMAP clocksource: timer1 at 25000000 Hz
    [    0.000220] timer_probe: no matching timers found
    [    0.000440] Console: colour dummy device 80x30
    [    0.001066] console [tty0] enabled
    [    0.001094] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [    0.001116] This ensures that you still see kernel messages. Please
    [    0.001136] update your kernel commandline.
    [    0.001177] Calibrating delay loop... 795.44 BogoMIPS (lpj=3977216)
    [    0.089085] pid_max: default: 32768 minimum: 301
    [    0.089292] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.089324] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.090208] CPU: Testing write buffer coherency: ok
    [    0.090975] Setting up static identity map for 0x80100000 - 0x80100060
    [    0.091157] Hierarchical SRCU implementation.
    [    0.091516] EFI services will not be available.
    [    0.092857] devtmpfs: initialized
    [    0.101128] random: get_random_u32 called from bucket_table_alloc+0x8c/0x1ac with crng_init=0
    [    0.101592] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    0.101937] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.101990] futex hash table entries: 256 (order: -1, 3072 bytes)
    [    0.105839] pinctrl core: initialized pinctrl subsystem
    [    0.106661] DMI not present or invalid.
    [    0.107121] NET: Registered protocol family 16
    [    0.109520] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.124267] omap_hwmod: debugss: _wait_target_disable failed
    [    0.165130] cpuidle: using governor ladder
    [    0.165193] cpuidle: using governor menu
    [    0.169787] OMAP GPIO hardware version 0.1
    [    0.177995] omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/nandflash_pins_s0, deferring probe
    [    0.180673] No ATAGs?
    [    0.180689] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.193456] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.195387] vgaarb: loaded
    [    0.195821] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
    [    0.195922] omap_i2c 4802a000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c1_pins, deferring probe
    [    0.196129] pps_core: LinuxPPS API ver. 1 registered
    [    0.196154] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.196201] PTP clock support registered
    [    0.196248] EDAC MC: Ver: 3.0.0
    [    0.196738] dmi: Firmware registration failed.
    [    0.197188] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    0.198634] clocksource: Switched to clocksource timer1
    [    0.207056] NET: Registered protocol family 2
    [    0.207868] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.207932] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.207975] TCP: Hash tables configured (established 2048 bind 2048)
    [    0.208097] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.208134] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.208306] NET: Registered protocol family 1
    [    0.208949] RPC: Registered named UNIX socket transport module.
    [    0.208991] RPC: Registered udp transport module.
    [    0.209009] RPC: Registered tcp transport module.
    [    0.209027] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.860951] hw perfevents: no interrupt-affinity property for /pmu, guessing.
    [    0.861145] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [    0.862759] workingset: timestamp_bits=14 max_order=16 bucket_order=2
    [    0.867291] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.868162] NFS: Registering the id_resolver key type
    [    0.868231] Key type id_resolver registered
    [    0.868251] Key type id_legacy registered
    [    0.868310] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.870724] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
    [    0.870784] io scheduler noop registered
    [    0.870803] io scheduler deadline registered
    [    0.871047] io scheduler cfq registered (default)
    [    0.871074] io scheduler mq-deadline registered
    [    0.871093] io scheduler kyber registered
    [    0.872332] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [    0.924280] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [    0.927554] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a 8250
    [    1.555126] console [ttyS0] enabled
    [    1.560543] omap_rng 48310000.rng: Random Number Generator ver. 20
    [    1.576804] brd: module loaded
    [    1.587100] loop: module loaded
    [    1.592668] libphy: Fixed MDIO Bus: probed
    [    1.668716] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
    [    1.676456] davinci_mdio 4a101000.mdio: detected phy mask ffff7ffe
    [    2.093486] libphy: 4a101000.mdio: probed
    [    2.097591] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver TI DP83867
    [    2.106077] davinci_mdio 4a101000.mdio: phy[15]: device 4a101000.mdio:0f, driver TI DP83867
    [    2.115474] cpsw 4a100000.ethernet: Detected MACID = 98:5d:ad:45:49:58
    [    2.122353] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
    [    2.128831] cpsw 4a100000.ethernet: ALE Table size 1024
    [    2.134141] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
    [    2.142838] i2c /dev entries driver
    [    2.146760] IR NEC protocol handler initialized
    [    2.151405] IR RC5(x/sz) protocol handler initialized
    [    2.156491] IR RC6 protocol handler initialized
    [    2.161066] IR JVC protocol handler initialized
    [    2.165626] IR Sony protocol handler initialized
    [    2.170286] IR SANYO protocol handler initialized
    [    2.175020] IR Sharp protocol handler initialized
    [    2.179766] IR MCE Keyboard/mouse protocol handler initialized
    [    2.185636] IR XMP protocol handler initialized
    [    2.191713] cpuidle: enable-method property 'ti,am3352' found operations
    [    2.198902] sdhci: Secure Digital Host Controller Interface driver
    [    2.205133] sdhci: Copyright(c) Pierre Ossman
    [    2.210158] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    2.215726] sdhci-pltfm: SDHCI platform and OF driver helper
    [    2.222098] ledtrig-cpu: registered to indicate activity on CPUs
    [    2.230288] NET: Registered protocol family 10
    [    2.236203] Segment Routing with IPv6
    [    2.240156] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    2.246850] NET: Registered protocol family 17
    [    2.251697] Key type dns_resolver registered
    [    2.256154] omap_voltage_late_init: Voltage driver support not added
    [    2.267883] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [    2.273285] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [    2.648631] random: fast init done
    [    2.678628] nand: timeout while waiting for chip to become ready
    [    2.684704] nand: No NAND device found
    [    2.688482] omap2-nand 8000000.nand: scan failed, may be bus-width mismatch
    [    2.697126] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 100 kHz
    [    2.704242] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
    [    2.710806] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    2.716767] hctosys: unable to open rtc device (rtc0)
    [    2.722547] vbat: disabling
    [    2.725387] lis3_reg: disabling
    [    2.728686] Warning: unable to open an initial console.
    [    2.748417] Freeing unused kernel memory: 9216K

    Please press Enter to activate this console.
    / # ifconfig
    / # ifconfig -a
    eth0      Link encap:Ethernet  HWaddr 98:5D:AD:45:49:58
              BROADCAST MULTICAST  MTU:1500  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:1000
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
              Interrupt:44

    lo        Link encap:Local Loopback
              LOOPBACK  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:1000
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

    sit0      Link encap:IPv6-in-IPv4
              NOARP  MTU:1480  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:1000
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

    / # ifconfig eth0 up
    [   23.148415] net eth0: initializing cpsw version 1.12 (0)
    [   23.175361] net eth0: phy "4a101000.mdio:00" not found on slave 0, err -19
    [   23.183295] net eth0: phy "4a101000.mdio:0f" not found on slave 1, err -19
    [   23.196850] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    / # ethtool -S eth0
    NIC statistics:
         Good Rx Frames: 0
         Broadcast Rx Frames: 0
         Multicast Rx Frames: 0
         Pause Rx Frames: 0
         Rx CRC Errors: 0
         Rx Align/Code Errors: 0
         Oversize Rx Frames: 0
         Rx Jabbers: 0
         Undersize (Short) Rx Frames: 0
         Rx Fragments: 0
         Rx Octets: 0
         Good Tx Frames: 0
         Broadcast Tx Frames: 0
         Multicast Tx Frames: 0
         Pause Tx Frames: 0
         Deferred Tx Frames: 0
         Collisions: 0
         Single Collision Tx Frames: 0
         Multiple Collision Tx Frames: 0
         Excessive Collisions: 0
         Late Collisions: 0
         Tx Underrun: 0
         Carrier Sense Errors: 0
         Tx Octets: 0
         Rx + Tx 64 Octet Frames: 0
         Rx + Tx 65-127 Octet Frames: 0
         Rx + Tx 128-255 Octet Frames: 0
         Rx + Tx 256-511 Octet Frames: 0
         Rx + Tx 512-1023 Octet Frames: 0
         Rx + Tx 1024-Up Octet Frames: 0
         Net Octets: 0
         Rx Start of Frame Overruns: 0
         Rx Middle of Frame Overruns: 0
         Rx DMA Overruns: 0
         Rx DMA chan 0: head_enqueue: 1
         Rx DMA chan 0: tail_enqueue: 127
         Rx DMA chan 0: pad_enqueue: 0
         Rx DMA chan 0: misqueued: 0
         Rx DMA chan 0: desc_alloc_fail: 0
         Rx DMA chan 0: pad_alloc_fail: 0
         Rx DMA chan 0: runt_receive_buf: 0
         Rx DMA chan 0: runt_transmit_bu: 0
         Rx DMA chan 0: empty_dequeue: 0
         Rx DMA chan 0: busy_dequeue: 0
         Rx DMA chan 0: good_dequeue: 0
         Rx DMA chan 0: requeue: 0
         Rx DMA chan 0: teardown_dequeue: 0
         Tx DMA chan 0: head_enqueue: 0
         Tx DMA chan 0: tail_enqueue: 0
         Tx DMA chan 0: pad_enqueue: 0
         Tx DMA chan 0: misqueued: 0
         Tx DMA chan 0: desc_alloc_fail: 0
         Tx DMA chan 0: pad_alloc_fail: 0
         Tx DMA chan 0: runt_receive_buf: 0
         Tx DMA chan 0: runt_transmit_bu: 0
         Tx DMA chan 0: empty_dequeue: 0
         Tx DMA chan 0: busy_dequeue: 0
         Tx DMA chan 0: good_dequeue: 0
         Tx DMA chan 0: requeue: 0
         Tx DMA chan 0: teardown_dequeue: 0
    / # ifconfig
    eth0      Link encap:Ethernet  HWaddr 98:5D:AD:45:49:58
              UP BROADCAST MULTICAST  MTU:1500  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:1000
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
              Interrupt:44

    / # ifconfig eth0 30.30.30.66 netmask 255.255.255.0 down
    / # ifconfig -a
    eth0      Link encap:Ethernet  HWaddr 98:5D:AD:45:49:58
              inet addr:30.30.30.66  Bcast:30.30.30.255  Mask:255.255.255.0
              BROADCAST MULTICAST  MTU:1500  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:1000
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
              Interrupt:44

    lo        Link encap:Local Loopback
              LOOPBACK  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:1000
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

    sit0      Link encap:IPv6-in-IPv4
              NOARP  MTU:1480  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:1000
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

    / # ifconfig eth0 up
    [   84.458117] net eth0: initializing cpsw version 1.12 (0)
    [   84.477306] TI DP83867 4a101000.mdio:00: attached PHY driver [TI DP83867] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
    [   84.488342] net eth0: could not add device link to 4a101000.mdio:0f err -17
    [   84.508295] TI DP83867 4a101000.mdio:0f: attached PHY driver [TI DP83867] (mii_bus:phy_addr=4a101000.mdio:0f, irq=POLL)
    [   84.524228] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    / # [   87.611621] cpsw 4a100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
    [   87.619656] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    ifconfig
    eth0      Link encap:Ethernet  HWaddr 98:5D:AD:45:49:58
              inet addr:30.30.30.66  Bcast:30.30.30.255  Mask:255.255.255.0
              inet6 addr: fe80::9a5d:adff:fe45:4958/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:0 (0.0 B)  TX bytes:586 (586.0 B)
              Interrupt:44

    / # ping 30.30.30.1
    PING 30.30.30.1 (30.30.30.1): 56 data bytes
    ^C
    --- 30.30.30.1 ping statistics ---
    12 packets transmitted, 0 packets received, 100% packet loss
    / # ifconfig
    eth0      Link encap:Ethernet  HWaddr 98:5D:AD:45:49:58
              inet addr:30.30.30.66  Bcast:30.30.30.255  Mask:255.255.255.0
              inet6 addr: fe80::9a5d:adff:fe45:4958/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:0 (0.0 B)  TX bytes:1302 (1.2 KiB)
              Interrupt:44

    / # ping 30.30.30.1
    PING 30.30.30.1 (30.30.30.1): 56 data bytes
    ^C
    --- 30.30.30.1 ping statistics ---
    21 packets transmitted, 0 packets received, 100% packet loss
    / # ping 30.30.30.1
    PING 30.30.30.1 (30.30.30.1): 56 data bytes
    [  247.768693] random: crng init done

    ^C
    --- 30.30.30.1 ping statistics ---
    115 packets transmitted, 0 packets received, 100% packet loss
    / # ping 30.30.30.1
    PING 30.30.30.1 (30.30.30.1): 56 data bytes
    ^C
    --- 30.30.30.1 ping statistics ---
    5 packets transmitted, 0 packets received, 100% packet loss
    / # ifup eth0
    udhcpc: started, v1.29.0
    udhcpc: sending discover
    udhcpc: sending discover
    udhcpc: sending discover
    udhcpc: no lease, forking to background

    Still I am not able to make out why ethernet is not working? I can see link and activity LED is blinking, but static as well as dynamic IP address mode for ethernet is not working.

    Any clue? Do I have to do anything with PHY interrupt? at present it is connected to GPIO_3_0. does driver is using PHY interrupt?

    Do I have to modify .dts / .dtsi file this PHY interrupt which is connected to GPIO_3_0?

    / # ethtool -G eth0 rx 248
    / # ethtool -g eth0
    Ring parameters for eth0:
    Pre-set maximums:
    RX:             248
    RX Mini:        0
    RX Jumbo:       0
    TX:             0
    Current hardware settings:
    RX:             248
    RX Mini:        0
    RX Jumbo:       0
    TX:             8

    / # ethtool -P eth0
    Permanent address: 98:5d:ad:45:49:58
    / # ethtool -i eth0
    driver: cpsw
    version: 1.0
    firmware-version:
    expansion-rom-version:
    bus-info: 4a100000.ethernet
    supports-statistics: yes
    supports-test: no
    supports-eeprom-access: no
    supports-register-dump: yes
    supports-priv-flags: no
    / # ethtool eth0
    Settings for eth0:
            Supports Wake-on: d
            Wake-on: d
            Current message level: 0x00000000 (0)

            Link detected: no
    / # ifconfig eth0
    eth0      Link encap:Ethernet  HWaddr 98:5D:AD:45:49:58
              BROADCAST MULTICAST  MTU:1500  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:1000
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
              Interrupt:44

    What is this interrupt #? and how it is set?

  • Hello,

    I am looking into your latest issue and questions, and I see you have verified the thread. Could you please share what was the solution of your latest issue.

    Regards,
    Pavel
  • Hello Pavel,

    Issue was with my DTS file, now it is fixed. I have attached my DTS file - may be useful to someone.

    Now i have two more issue left related to networking, I was thinking of opening a separate ticket, but if you can answer in this thread that will be great.

    On my customer board I have two wired ethernet ETH_0 and ETH_1, with TI-PHY.

    Issue # 1: ETH_0 is working in static mode, but dhcp - I have to do manually issue command ifup/ifdown couple of time, and ifconfig eth0 dynamic. I have default script for dhcpc, but it doesn't get executed automatically. I have created my on rootfs - so it looks like I am missing something. If you can help me on this that will be great.

    Issue #2: My second ethernet ET_1 is not up, I can see activity and link LED is blinking.

                      I have two use case

                     a) ETH_0 and ETH_1 both are on same subnet. is it same as switch ?

                     b) ETH_0 and ETH_1 are on different subnet. / each port connected to two different router.

                           e.g. eth0 192.168.0.1, 255.255.255.0 gw-192.168.0.100

                                    eth1 10.20.30.1,  255.255.255.0 gw-10.20.30.100.

    Is it possible to get both use case?

    Thanks,

    NU.

    7823.am335x-evm.zip

  • newuser,

    I will suggest you to open new e2e thread for your new issues.

    Regards,
    Pavel