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/AM3357: Ethernet fails after kernel start

Part Number: AM3357
Other Parts Discussed in Thread: AM3352

Tool/software: Linux

We have custom board designed on am3357 and Ethernet  is working fine in u -boot.

Have used am335x-evm.dts file as reference, while booting Linux we see Ethernet  link is going down , but booting to prompt. we observed after linux booting, the power rail mpp_vdd voltage is dropping from 1.1 v 0.93 v. the EMAC1 (RGMII1) is used for ethernet interface

Using TI SDK 3.x

  • Please follow this checklist: processors.wiki.ti.com/.../5x_CPSW and post the results here.
  • Hi Biser,

    the below is the results

    1. Kernel version and source, also include the results of this command: uname -a

    >>> Linux version 4.4.19-gdb0b54cdad 

     2. File system, TI SDK or Arago/Yocto based filesytem

    >>> Arago based filesytem

     3. Custom board or TI board? Please include device tree source file.

    >>> Custom board using AM3357

     4. Console log of the boot process that includes U-Boot and the Kernel.

    >>> BootLog_U-boot_Linux.txt attached

     5. ethtool <interface such as eth0 or eth1>

       ethtool -S <interface such as eth0 or eth1>

       ifconfig <interface such as eth0 or eth1> 

    -------

    [    1.079994] libphy: Fixed MDIO Bus: probed

    [    1.148878] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6

    [    1.155024] davinci_mdio 4a101000.mdio: detected phy mask fffffffe

    [    1.162306] libphy: 4a101000.mdio: probed

    [    1.166357] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver TI DP83867

    [    1.175597] cpsw 4a100000.ethernet: No slave[1] phy_id, phy-handle, or fixed-link property

    [    1.184032] cpsw 4a100000.ethernet: Detected MACID = 68:c9:0b:73:09:19

    [    1.192902] mousedev: PS/2 mouse device common for all mice

    [    1.199395] i2c /dev entries driver

    [    1.204235] cpuidle: enable-method property 'ti,am3352' found operations

    [    1.212092] omap_hsmmc 48060000.mmc: Got CD GPIO

    [    1.360782] ledtrig-cpu: registered to indicate activity on CPUs

    [    1.373703] NET: Registered protocol family 10

    [    1.379965] sit: IPv6 over IPv4 tunneling driver

    [    1.385601] NET: Registered protocol family 17

    [    1.390606] Key type dns_resolver registered

    [    1.395119] omap_voltage_late_init: Voltage driver support not added

    [    1.405597] omap-gpmc 50000000.gpmc: GPMC revision 6.0

     

     

    .

    .

    .

    .

    [   18.705452] net eth0: ALE Table size 1024

    [   18.720742] net eth0: phy "4a101000.mdio:00" not found on slave 0, err -19

    [   18.727688] libphy: PHY  not found

    [   18.768488] hub 2-0:1.0: USB hub found

    [   18.772513] net eth0: phy "" not found on slave 1, err -19

    [   18.799012] hub 2-0:1.0: 1 port detected

    [   18.824583] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

    [   19.430923] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in a_wait_vrise (80, <SessEnd), retry #3, port1 0008010

    thanks,

    Chandrashekar N B

    BootLog_U-boot_Linux.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    U-Boot SPL 2016.05-00118-gabc6b2a-dirty (Mar 04 2017 - 22:11:05)
    Trying to boot from NAND
    The Expected Linux image was not found. Please check your NAND configuration.
    Trying to start u-boot now...
    U-Boot 2016.05-00118-gabc6b2a-dirty (Mar 04 2017 - 21:39:58 +0530)
    Watchdog enabled
    I2C: ready
    DRAM: 1 GiB
    NAND: 256 MiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    *** Error - No Valid Environment Area found
    *** Warning - bad CRC, using default environment
    <ethaddr> not set. Validating first E-fuse MAC
    Net: eth0: ethernet@4a100000
    Warning: usb_ether MAC addresses don't match:
    Address in SROM is de:ad:be:ef:00:01
    Address in environment is 68:c9:0b:73:09:1b
    , eth1: usb_ether
    Press SPACE to abort autoboot in 2 seconds
    Booting from nand ...
    NAND read: device 0 offset 0x80000, size 0x40000
    262144 bytes read: OK
    NAND read: device 0 offset 0x200000, size 0x800000
    8388608 bytes read: OK
    Kernel image @ 0x82000000 [ 0x000000 - 0x351c60 ]
    ## Flattened Device Tree blob at 88000000
    Booting using the fdt blob at 0x88000000
    Loading Device Tree to 8fff3000, end 8ffff0ac ... OK
    Starting kernel ...
    [ 0.000000] Booting Linux on physical CPU 0x0
    [ 0.000000] Initializing cgroup subsys cpu
    [ 0.000000] Initializing cgroup subsys cpuacct
    [ 0.000000] Linux version 4.4.19-gdb0b54cdad (root@adems) (gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02) ) #3 PREEMPT Thu Mar 2 12:32:02 IST 2017
    [ 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] Machine model: TI AM335x EVM
    [ 0.000000] cma: Reserved 24 MiB at 0xbe800000
    [ 0.000000] Memory policy: Data cache writeback
    [ 0.000000] CPU: All CPU(s) started in SVC mode.
    [ 0.000000] AM335X ES2.1 (neon )
    [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260416
    [ 0.000000] Kernel command line: console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048 rootfstype=ubifs rootwait=1
    [ 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: 1003936K/1048576K available (6619K kernel code, 314K rwdata, 2344K rodata, 264K init, 265K bss, 20064K reserved, 24576K cma-reserved, 237568K 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 - 0xc08c9004 (8965 kB)
    [ 0.000000] .init : 0xc08ca000 - 0xc090c000 ( 264 kB)
    [ 0.000000] .data : 0xc090c000 - 0xc095abd0 ( 315 kB)
    [ 0.000000] .bss : 0xc095abd0 - 0xc099d398 ( 266 kB)
    [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [ 0.000000] Preemptible hierarchical RCU implementation.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Could you please attach the DTS for the custom board?  Were any .dtsi files modified?

    Also please attach the results of the ethtool and ethtools -S commands.

    The error of the phy not found is indication of that the mdio driver is having trouble communicating with the PHY. The low voltage you found might have something to do with that. The PHY looks to be identified since the driver is printing out the TI driver name but the not found later on in the log is not good.

  • Hi,

    Attached is the .dts file we have used for our board. no modifications done in this from the evm dts file.

    also attached is the log of ethool

    thanks,

    ChandrashekarSE_AM3357_30Mar17.rar

  • The DP83867 PHY require some additional configuration. That needs to be enabled in the DTS file. This is described in the Documentation/dt-binding folder.

    Also other thing to check the phy id that is determined by the resistor strapping of the RX pins. From the logs you shared it seems its 0x0.

    So following patch should work for you:

    diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
    index e8c1edcac9e..26be4cc9f79 100644
    --- a/arch/arm/boot/dts/am335x-evm.dts
    +++ b/arch/arm/boot/dts/am335x-evm.dts
    @@ -8,6 +8,7 @@
     /dts-v1/;
     
     #include "am33xx.dtsi"
    +#include <dt-bindings/net/ti-dp83867.h>
     #include <dt-bindings/interrupt-controller/irq.h>
     
     / {
    @@ -708,6 +709,12 @@
         pinctrl-names = "default", "sleep";
         pinctrl-0 = <&davinci_mdio_default>;
         pinctrl-1 = <&davinci_mdio_sleep>;
    +        ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
    +        ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_75_NS>;
    +        ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
    +    ti,strap-mode = <DP83867_4LEVEL_STRAP_MODE1>;
    +        ti,min-output-impedance;
    +
         status = "okay";
     };
     
    @@ -717,10 +724,9 @@
     };
     
     &cpsw_emac1 {
    -    phy_id = <&davinci_mdio>, <1>;
    +    phy_id = <&davinci_mdio>, <0>;
         phy-mode = "rgmii-txid";
     };
    -
     &tscadc {
         status = "okay";
         tsc {
    diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c
    index df43cf8b65f..6688fc242a2 100644
    --- a/drivers/net/phy/dp83867.c
    +++ b/drivers/net/phy/dp83867.c
    @@ -23,7 +23,7 @@
     #include <dt-bindings/net/ti-dp83867.h>
     
     #define DP83867_PHY_ID        0x2000a231
    -#define DP83867_DEVADDR        0x1f
    +#define DP83867_DEVADDR        0x0
     
     #define MII_DP83867_PHYCTRL    0x10
     #define MII_DP83867_MICR    0x12