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.

AM5708: MDIO errors and Micrel Phy KSZ9031 bringup issue

Part Number: AM5708
Other Parts Discussed in Thread: DRA722

Hi All,

SDK version: PROCESSOR-SDK-LINUX-AM57X  06_03_00_106

Fixed link is working but otherwise its not working.

PHY_RSTs are at gpio7_5 and 7_6, jack leds both are off orange and yellow.

Can someone guide on dtsi changes and phy resets part in dtsi?

Part number:KSZ9031RN

Gigabit Ethernet PHY0 Address   PHYAD[2:0]=0x00
Gigabit Ethernet PHY1 Address   PHYAD[2:0]=0x01

we have enabled phy reset gpios for both the phys.

miii tool output in uboot-

=> mii dump 0 0
Error reading from the PHY addr=00 reg=00

Phytool output for both the phys

root@am57xx-hs-evm:~# ethtool eth0
Settings for eth0:
        Supports Wake-on: d
        Wake-on: d
        Current message level: 0x00000000 (0)
                               
        Link detected: no

error logs

root@am57xx-hs-evm:~# dmesg | grep mdio
[    1.486789] mdio_bus fixed-0: GPIO lookup for consumer reset
[    1.486797] mdio_bus fixed-0: using lookup tables for GPIO lookup
[    1.486805] mdio_bus fixed-0: No GPIO consumer reset found
[    1.523209] mdio_bus 48485000.mdio: GPIO lookup for consumer reset
[    1.523217] mdio_bus 48485000.mdio: using device tree for GPIO lookup
[    1.523235] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/ethernet@48484000/mdio@48485000[0]'
[    1.523249] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/ethernet@48484000/mdio@48485000[0]'
[    1.523258] mdio_bus 48485000.mdio: using lookup tables for GPIO lookup
[    1.523265] mdio_bus 48485000.mdio: No GPIO consumer reset found
[    1.581456] davinci_mdio 48485000.mdio: davinci mdio revision 1.6, bus freq 1000000
[    1.589153] libphy: 48485000.mdio: probed
[    1.593861] mdio_bus 48485000.mdio: MDIO device at address 0 is missing.
[    1.601683] mdio_bus 48485000.mdio: MDIO device at address 1 is missing.
[    7.239541] libphy: PHY 48485000.mdio:00 not found
[    7.302643] net eth0: phy "48485000.mdio:00" not found on slave 0, err -19
[    7.514675] libphy: PHY 48485000.mdio:01 not found
[    7.519501] net eth1: phy "48485000.mdio:01" not found on slave 1, err -19
root@am57xx-hs-evm:~# dmesg | grep phy
[    0.000000] Booting Linux on physical CPU 0x0
[    1.486828] libphy: Fixed MDIO Bus: probed
[    1.589153] libphy: 48485000.mdio: probed
[    7.239541] libphy: PHY 48485000.mdio:00 not found
[    7.302643] net eth0: phy "48485000.mdio:00" not found on slave 0, err -19
[    7.514675] libphy: PHY 48485000.mdio:01 not found
[    7.519501] net eth1: phy "48485000.mdio:01" not found on slave 1, err -19
root@am57xx-hs-evm:~#

dtsi :

phy0_rst_gpios: phy0_rst_gpios {
            pinctrl-single,pins = <
                    DRA7XX_CORE_IOPAD(0x3448, PIN_OUTPUT | MUX_MODE14)  /* gpmc_a2,gpio7_5 */
            >;
        };
    phy1_rst_gpios: phy1_rst_gpios {
            pinctrl-single,pins = <
                    DRA7XX_CORE_IOPAD(0x344C, PIN_OUTPUT | MUX_MODE14)  /* gpmc_a3,gpio7_6 */
            >;
        };

&mac {
    status = "okay";
    pinctrl-names = "default", "sleep";
        pinctrl-0 = <&cpsw_pins_default>;
    //pinctrl-1 = <&cpsw_pins_sleep>;
    dual_emac;
    //rx_descs = <64>;
};


&davinci_mdio {
    status = "okay";
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&mdio_pins_default>;
        //pinctrl-1 = <&mdio_pins_sleep>;

        phy0: ethernet-phy@0 {
                //compatible = "micrel,ksz9031";
                //device_type = "ethernet-phy";
                reg = <0>;
        };

        phy1: ethernet-phy@1 {
                //compatible = "micrel,ksz9031";
                //device_type = "ethernet-phy";
                reg = <1>;
        };
};

&cpsw_emac0 {
         status = "okay";    
    reset-gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
    reset-delay-us = <2>;  
    phy_id = <&davinci_mdio>, <0>;
    phy-mode = "rgmii";
    dual_emac_res_vlan = <1>;
    pinctrl-names = "default";
        pinctrl-0 = <&phy0_rst_gpios>;

    /*fixed-link {
          speed = <100>;
          full-duplex;
    };*/
};

  • HI All,

    ab to fix the mdio issues in uboot.

    {VIN2A_D10, (M3 | PIN_OUTPUT)}, /* vin2a_d10.mdio_mclk */
    {VIN2A_D11, (M3 | PIN_INPUT)}, /* vin2a_d11.mdio_d */
    these 2 pinmuxes for mdio clk and data were correct but

    {MDIO_MCLK, (M1 | PIN_OUTPUT_PULLUP)}, /* mdio_mclk.uart3_rtsn */ {MDIO_D, (M1 | PIN_INPUT_PULLUP)}, /* mdio_d.uart3_ctsn */
    these two were muxed to 0 instead of 1 for uart3_ctsn.
    after fixing this is the output 
    • => mdio read 0 0
      0 is not a known ethernet
      Reading from bus ethernet@48484000
      PHY at address 0:
      0 - 0x1140
      => ping 10.53.66.200
      link up on port 0, speed 100, full duplex
      Using ethernet@48484000 device
      host 10.53.66.200 is alive
    => setenv autoload no
    • => dhcp
      link up on port 0, speed 100, full duplex
      BOOTP broadcast 1
      BOOTP broadcast 2
      BOOTP broadcast 3
      BOOTP broadcast 4
      DHCP client bound to address 192.168.48.179 (2005 ms)
      => ping 192.168.48.224
      link up on port 0, speed 100, full duplex
      Using ethernet@48484000 device
      host 192.168.48.224 is alive
      we were able to read default mdio registers and verified both static and dhcp for eth0 on uboot
      but in kernel these are the logs
    • can anyone help on this issue? phys are not getting detected
    • root@am57xx-hs-evm:~# dmesg | grep mdio
      [    1.499813] mdio_bus fixed-0: GPIO lookup for consumer reset
      [    1.499821] mdio_bus fixed-0: using lookup tables for GPIO lookup
      [    1.499828] mdio_bus fixed-0: No GPIO consumer reset found
      [    1.536510] mdio_bus 48485000.mdio: GPIO lookup for consumer reset
      [    1.536519] mdio_bus 48485000.mdio: using device tree for GPIO lookup
      [    1.536537] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/ethernet@48484000/mdio@48485000[0]'
      [    1.536552] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/ethernet@48484000/mdio@48485000[0]'
      [    1.536560] mdio_bus 48485000.mdio: using lookup tables for GPIO lookup
      [    1.536568] mdio_bus 48485000.mdio: No GPIO consumer reset found
      [    1.591544] davinci_mdio 48485000.mdio: davinci mdio revision 1.6, bus freq 1000000
      [    1.599239] davinci_mdio 48485000.mdio: no live phy, scanning all
      [    1.638196] libphy: 48485000.mdio: probed
      [    7.235022] libphy: PHY 48485000.mdio:01 not found
      [    7.239851] net eth1: phy "48485000.mdio:01" not found on slave 1, err -19
      [    7.499148] libphy: PHY 48485000.mdio:00 not found
      [    7.662136] net eth0: phy "48485000.mdio:00" not found on slave 0, err -19
      root@am57xx-hs-evm:~# [   32.481726] vtt_fixed: supplied by V3_3D
      [   32.485944] smps1: supplied by V3_3D
      [   32.489920] smps3: supplied by V3_3D
      [   32.496029] smps4: supplied by V3_3D
      [   32.499849] SMPS12: supplied by V3_3D
      [   32.504826] ldo2: supplied by V3_3D

  • HI All,

    Answers to questions asked in

    https://processors.wiki.ti.com/index.php/Ethernet_Triage_Checklist_for_AM3x/4x/5x_CPSW


    1.root@am57xx-hs-evm:~# uname -a
    Linux am57xx-hs-evm 4.19.94-gbe5389fd85 #26 SMP PREEMPT Mon Oct 5 11:19:48 IST 2020 armv7l GNU/Linux

    2. Filesystem have tried both tisdk and arago based as well

    3.Custom Board Am5708

    4.Boot log as follows.

    PPA 4.6.4 (GCC Build - Oct 05 2020 - 13:16:07)
    Supports ALL DRA7x, TDA2x, and AM57x devices
    Detected device: 05841e21 HS
    PPA load address: 0x004a633c
    !FULL DEBUG ON!
    !OBFUSCATOR ON!
    !TEE Load API SUPPORTED!
    SEC_STATUS = 0x23820081
    SEC_CTRL   = 0x00010203
    SEC_EMU    = 0x000037ff
    SEC_TAP    = 0x00002607

    U-Boot SPL 2019.01-g0e9b2ed-dirty (Oct 05 2020 - 13:17:24 +0530)
    DRA722-HS ES2.1
    Trying to boot from MMC1
    secure_boot_verify_image: load_addr = 8080000c, size = 74ec4, sig_addr = 80874ed0
    Authentication passed
    secure_boot_verify_image: load_addr = 80874f28, size = 2039c, sig_addr = 808952c4
    Authentication passed


    U-Boot 2019.01-g0e9b2ed-dirty (Oct 05 2020 - 13:17:24 +0530)

    CPU  : DRA722-HS ES2.1
    Model: TI Custom AM5708
    Board: Custom AM5708 REV
    DRAM:  1 GiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Loading Environment from FAT... OK
    Unidentified board claims AM57XIDK in eeprom header
    Net:   eth0: ethernet@48484000
    Hit any key to stop autoboot:  0
    4493824 bytes read in 198 ms (21.6 MiB/s)
    131228 bytes read in 7 ms (17.9 MiB/s)
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       Loading Device Tree to 8ffdc000, end 8ffff09b ... OK

    Starting kernel ...

    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.19.94-gbe5389fd85 (administrator@EMMYS1756) (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture0
    [    0.000000] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7), cr=30c5387d
    [    0.000000] CPU: div instructions available: patching division code
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
    [    0.000000] OF: fdt: Machine model: TI Custom AM5708
    [    0.000000] Memory policy: Data cache writealloc
    [    0.000000] efi: Getting EFI parameters from FDT:
    [    0.000000] efi: UEFI not found.
    [    0.000000] Reserved memory: created CMA memory pool at 0x0000000095800000, size 56 MiB
    [    0.000000] OF: reserved mem: initialized node ipu2-memory@95800000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created CMA memory pool at 0x0000000099000000, size 64 MiB
    [    0.000000] OF: reserved mem: initialized node dsp1-memory@99000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x000000009d000000, size 32 MiB
    [    0.000000] OF: reserved mem: initialized node ipu1-memory@9d000000, compatible id shared-dma-pool
    [    0.000000] cma: Reserved 24 MiB at 0x00000000bc000000
    [    0.000000] OMAP4: Map 0x00000000bfd00000 to (ptrval) for dram barrier
    [    0.000000] Hit pending asynchronous external abort (FSR=0x00001211) during first unmask, this is most likely caused by a firmware/bootl.
    [    0.000000] DRA722 ES2.1
    [    0.000000] random: get_random_bytes called from start_kernel+0xb4/0x470 with crng_init=0
    [    0.000000] percpu: Embedded 15 pages/cpu s32396 r8192 d20852 u61440
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 193856
    [    0.000000] Kernel command line: console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait
    [    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
    [    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Memory: 609368K/782336K available (10240K kernel code, 332K rwdata, 2832K rodata, 2048K init, 268K bss, 25512K reserved, 147)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    [    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (12256 kB)
    [    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (2048 kB)
    [    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 333 kB)
    [    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 269 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] rcu: Preemptible hierarchical RCU implementation.
    [    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
    [    0.000000]  Tasks RCU enabled.
    [    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
    [    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    [    0.000000] OMAP clockevent source: timer1 at 32786 Hz
    [    0.000000] arch_timer: cp15 timer(s) running at 6.14MHz (virt).
    [    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.000018] Switching to timer-based delay loop, resolution 162ns
    [    0.000302] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
    [    0.000311] OMAP clocksource: 32k_counter at 32768 Hz
    [    0.000792] Console: colour dummy device 80x30
    [    0.000836] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.29 BogoMIPS (lpj=61475)
    [    0.000851] pid_max: default: 32768 minimum: 301
    [    0.000975] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.000990] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.001565] CPU: Testing write buffer coherency: ok
    [    0.001603] CPU0: Spectre v2: using ICIALLU workaround
    [    0.001834] /cpus/cpu@0 missing clock-frequency property
    [    0.001849] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    [    0.059877] Setting up static identity map for 0x80200000 - 0x80200060
    [    0.079881] rcu: Hierarchical SRCU implementation.
    [    0.100063] EFI services will not be available.
    [    0.119932] smp: Bringing up secondary CPUs ...
    [    0.119944] smp: Brought up 1 node, 1 CPU
    [    0.119954] SMP: Total of 1 processors activated (12.29 BogoMIPS).
    [    0.119962] CPU: All CPU(s) started in SVC mode.
    [    0.120402] devtmpfs: initialized
    [    0.150116] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
    [    0.150406] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.150423] futex hash table entries: 256 (order: 2, 16384 bytes)
    [    0.153182] pinctrl core: initialized pinctrl subsystem
    [    0.153753] DMI not present or invalid.
    [    0.154031] NET: Registered protocol family 16
    [    0.160959] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.161909] omap_hwmod: l3_main_2 using broken dt data from ocp
    [    0.352872] cpuidle: using governor ladder
    [    0.352910] cpuidle: using governor menu
    [    0.365743] OMAP GPIO hardware version 0.1
    [    0.380372] No ATAGs?
    [    0.380415] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
    [    0.380431] hw-breakpoint: maximum watchpoint size is 8 bytes.
    [    0.381300] OMAP DMA hardware revision 0.0
    [    0.422380] edma 43300000.edma: memcpy is disabled
    [    0.425762] edma 43300000.edma: TI EDMA DMA engine driver
    [    0.433018] omap-dma-engine 4a056000.dma-controller: OMAP DMA engine driver (LinkedList1/2/3 supported)
    [    0.436456] omap-iommu 40d01000.mmu: 40d01000.mmu registered
    [    0.436646] omap-iommu 40d02000.mmu: 40d02000.mmu registered
    [    0.436892] omap-iommu 58882000.mmu: 58882000.mmu registered
    [    0.437144] omap-iommu 55082000.mmu: 55082000.mmu registered
    [    0.437473] iommu: Adding device 58820000.ipu to group 1
    [    0.437551] iommu: Adding device 55020000.ipu to group 2
    [    0.437674] iommu: Adding device 40800000.dsp to group 0
    [    0.438893] SCSI subsystem initialized
    [    0.440152] omap_i2c 48070000.i2c: bus 0 rev0.12 at 400 kHz
    [    0.440328] media: Linux media interface: v0.10
    [    0.440372] videodev: Linux video capture interface: v2.00
    [    0.440527] pps_core: LinuxPPS API ver. 1 registered
    [    0.440536] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.440557] PTP clock support registered
    [    0.440589] EDAC MC: Ver: 3.0.0
    [    0.460698] Advanced Linux Sound Architecture Driver Initialized.
    [    0.461525] clocksource: Switched to clocksource arch_sys_counter
    [    0.469733] NET: Registered protocol family 2
    [    0.470336] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
    [    0.470366] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
    [    0.470428] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
    [    0.470728] TCP: Hash tables configured (established 8192 bind 8192)
    [    0.470811] UDP hash table entries: 512 (order: 2, 16384 bytes)
    [    0.470846] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
    [    0.470981] NET: Registered protocol family 1
    [    0.501473] RPC: Registered named UNIX socket transport module.
    [    0.501484] RPC: Registered udp transport module.
    [    0.501492] RPC: Registered tcp transport module.
    [    0.501501] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.502630] hw perfevents: enabled with armv7_cortex_a15 PMU driver, 7 counters available
    [    0.503545] Initialise system trusted keyrings
    [    0.503714] workingset: timestamp_bits=14 max_order=18 bucket_order=4
    [    0.508724] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.519241] NFS: Registering the id_resolver key type
    [    0.519267] Key type id_resolver registered
    [    0.519276] Key type id_legacy registered
    [    0.519316] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.521378] Key type asymmetric registered
    [    0.521390] Asymmetric key parser 'x509' registered
    [    0.521440] bounce: pool size: 64 pages
    [    0.521478] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
    [    0.521489] io scheduler noop registered
    [    0.521498] io scheduler deadline registered
    [    0.521646] io scheduler cfq registered (default)
    [    0.521658] io scheduler mq-deadline registered
    [    0.521667] io scheduler kyber registered
    [    0.526659] pinctrl-single 4a003400.pinmux: 282 pins, size 1128
    [    0.526826] pinctrl-single 4a002e8c.pinmux: please update dts to use #pinctrl-cells = <1>
    [    0.526880] pinctrl-single 4a002e8c.pinmux: initialized with no interrupts
    [    0.526892] pinctrl-single 4a002e8c.pinmux: 1 pins, size 4
    [    0.527414] ***ti_iodelay_probe
    [    0.598987] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
    [    0.602668] console [ttyS2] disabled
    [    0.602731] 48020000.serial: ttyS2 at MMIO 0x48020000 (irq = 43, base_baud = 3000000) is a 8250
    [    1.440037] console [ttyS2] enabled
    [    1.457556] brd: module loaded
    [    1.467237] loop: module loaded
    [    1.474455] libphy: Fixed MDIO Bus: probed
    [    1.479054] vcan: Virtual CAN interface driver
    [    1.483597] CAN device driver interface
    [    1.541560] davinci_mdio 48485000.mdio: davinci mdio revision 1.6, bus freq 1000000
    [    1.549258] libphy: 48485000.mdio: probed
    [    1.553313] ***************** davinci_mdio_read
    [    1.557951] ***************** davinci_mdio_read start ret 0x80400000 phyid 0x0 phyreg 0x2
    [    1.567043] ***************** davinci_mdio_read end 0x40FFFF
    [    1.572746] mdio_bus 48485000.mdio: MDIO device at address 0 is missing.
    [    1.579486] ***************** davinci_mdio_read
    [    1.584137] ***************** davinci_mdio_read start ret 0x80410000 phyid 0x1 phyreg 0x2
    [    1.593009] ***************** davinci_mdio_read end 0x41FFFF
    [    1.598697] mdio_bus 48485000.mdio: MDIO device at address 1 is missing.
    [    1.606077] cpsw 48484000.ethernet: Detected MACID = 44:ea:d8:9a:96:e8
    [    1.612720] cpsw 48484000.ethernet: initialized cpsw ale version 1.4
    [    1.619104] cpsw 48484000.ethernet: ALE Table size 1024
    [    1.624418] cpsw 48484000.ethernet: cpts: overflow check period 500 (jiffies)
    [    1.632448] cpsw 48484000.ethernet: cpsw: Random MACID = 7e:4f:c4:7e:b0:32
    [    1.640677] i2c /dev entries driver
    [    1.649248] sdhci: Secure Digital Host Controller Interface driver
    [    1.655551] sdhci: Copyright(c) Pierre Ossman
    [    1.660694] sdhci-pltfm: SDHCI platform and OF driver helper
    [    1.667736] sdhci-omap 480b4000.mmc: failed to set system capabilities
    [    1.674916] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.685965] NET: Registered protocol family 10
    [    1.701446] Segment Routing with IPv6
    [    1.705423] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    1.711912] NET: Registered protocol family 17
    [    1.716385] can: controller area network core (rev 20170425 abi 9)
    [    1.722737] NET: Registered protocol family 29
    [    1.727204] can: raw protocol (rev 20170425)
    [    1.731492] can: broadcast manager protocol (rev 20170425 t)
    [    1.737197] can: netlink gateway (rev 20170425) max_hops=1
    [    1.742991] Key type dns_resolver registered
    [    1.747418] Registering SWP/SWPB emulation handler
    [    1.752254] omap_voltage_late_init: Voltage driver support not added
    [    1.758634] Power Management for TI OMAP4+ devices.
    [    1.764286] Loading compiled-in X.509 certificates
    [    1.795367] dmm 4e000000.dmm: workaround for errata i878 in use
    [    1.803081] dmm 4e000000.dmm: initialized all PAT entries
    [    1.812611] palmas 0-0058: Irq flag is 0x00000004
    [    1.843482] palmas 0-0058: Muxing GPIO 51, PWM 0, LED 2
    [    1.855479] SMPS5: supplied by regulator-dummy
    [    1.866184] LDO3: supplied by regulator-dummy
    [    1.871376] LDO4: supplied by VMAIN
    [    1.876822] random: fast init done
    [    1.883017] V3_3D: supplied by ldo4
    [    1.886755] smps2: supplied by V3_3D
    [    1.890775] cpu cpu0: Linked as a consumer to regulator.10
    [    1.896366] cpu cpu0: Linked as a consumer to regulator.5
    [    1.902363] core: _opp_supported_by_regulators: OPP minuV: 850000 maxuV: 1150000, not supported by regulator
    [    1.912257] cpu cpu0: _opp_add: OPP not supported by regulators (1000000000)
    [    1.920150] omap_gpio 4805d000.gpio: Could not set line 27 debounce to 200000 microseconds (-22)
    [    1.929037] sdhci-omap 4809c000.mmc: Got CD GPIO
    [    1.933967] sdhci-omap 4809c000.mmc: Linked as a consumer to regulator.4
    [    1.940750] ldo1: supplied by V3_3D
    [    1.944770] sdhci-omap 4809c000.mmc: Linked as a consumer to regulator.15
    [    1.951676] sdhci-omap 4809c000.mmc: Dropping the link to regulator.15
    [    1.958305] sdhci-omap 4809c000.mmc: Linked as a consumer to regulator.2
    [    1.965300] sdhci-omap 4809c000.mmc: Linked as a consumer to regulator.15
    [    1.972259] sdhci-omap 4809c000.mmc: no pinctrl state for ddr_3_3v mode
    [    2.004493] mmc0: SDHCI controller on 4809c000.mmc [4809c000.mmc] using ADMA
    [    2.012500] sdhci-omap 480b4000.mmc: Linked as a consumer to regulator.2
    [    2.019290] sdhci-omap 480b4000.mmc: Dropping the link to regulator.2
    [    2.025891] sdhci-omap 480b4000.mmc: Linked as a consumer to regulator.2
    [    2.057047] mmc1: SDHCI controller on 480b4000.mmc [480b4000.mmc] using ADMA
    [    2.064723] hctosys: unable to open rtc device (rtc0)
    [    2.070596] ALSA device list:
    [    2.073681]   No soundcards found.
    [    2.078312] Waiting for root device /dev/mmcblk0p2...
    [    2.088166] mmc0: host does not support reading read-only switch, assuming write-enable
    [    2.098130] mmc0: new high speed SDHC card at address 0001
    [    2.114538] mmcblk0: mmc0:0001 EB1QT 29.8 GiB
    [    2.123318] ti-iodelay 4844a000.padconf: Set reg 0x18c Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [    2.132338] ti-iodelay 4844a000.padconf: Set reg 0x1a4 Delay(a: 119 g: 0), Elements(C=0 F=4)0x29004
    [    2.141502]  mmcblk0: p1 p2
    [    2.144608] ti-iodelay 4844a000.padconf: Set reg 0x1b0 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [    2.154128] ti-iodelay 4844a000.padconf: Set reg 0x1bc Delay(a: 18 g: 0), Elements(C=0 F=0)0x29000
    [    2.163185] ti-iodelay 4844a000.padconf: Set reg 0x1c8 Delay(a: 894 g: 0), Elements(C=2 F=3)0x29043
    [    2.172603] ti-iodelay 4844a000.padconf: Set reg 0x1d4 Delay(a: 30 g: 0), Elements(C=0 F=1)0x29001
    [    2.181824] ti-iodelay 4844a000.padconf: Set reg 0x1e0 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [    2.190927] ti-iodelay 4844a000.padconf: Set reg 0x1ec Delay(a: 23 g: 0), Elements(C=0 F=0)0x29000
    [    2.200049] ti-iodelay 4844a000.padconf: Set reg 0x1f8 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [    2.209376] ti-iodelay 4844a000.padconf: Set reg 0x360 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [    2.218503] ti-iodelay 4844a000.padconf: Set reg 0x194 Delay(a: 152 g: 0), Elements(C=0 F=5)0x29005
    [    2.228308] ti-iodelay 4844a000.padconf: Set reg 0x1ac Delay(a: 206 g: 0), Elements(C=0 F=7)0x29007
    [    2.237565] ti-iodelay 4844a000.padconf: Set reg 0x1b8 Delay(a: 78 g: 0), Elements(C=0 F=2)0x29002
    [    2.246649] ti-iodelay 4844a000.padconf: Set reg 0x1c4 Delay(a: 2 g: 0), Elements(C=0 F=0)0x29000
    [    2.255954] ti-iodelay 4844a000.padconf: Set reg 0x1d0 Delay(a: 266 g: 0), Elements(C=0 F=9)0x29009
    [    2.265068] ti-iodelay 4844a000.padconf: Set reg 0x1dc Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [    2.273999] ti-iodelay 4844a000.padconf: Set reg 0x1e8 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [    2.282929] ti-iodelay 4844a000.padconf: Set reg 0x1f4 Delay(a: 43 g: 0), Elements(C=0 F=1)0x29001
    [    2.292066] ti-iodelay 4844a000.padconf: Set reg 0x200 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [    2.301086] ti-iodelay 4844a000.padconf: Set reg 0x368 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [    2.310168] ti-iodelay 4844a000.padconf: Set reg 0x190 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [    2.319554] ti-iodelay 4844a000.padconf: Set reg 0x1a8 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [    2.328491] ti-iodelay 4844a000.padconf: Set reg 0x1b4 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [    2.337555] ti-iodelay 4844a000.padconf: Set reg 0x1c0 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [    2.346490] ti-iodelay 4844a000.padconf: Set reg 0x1d8 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [    2.358752] EXT4-fs (mmcblk0p2): recovery complete
    [    2.363605] ti-iodelay 4844a000.padconf: Set reg 0x1e4 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [    2.372629] ti-iodelay 4844a000.padconf: Set reg 0x1f0 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [    2.381640] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [    2.389799] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [    2.395864] ti-iodelay 4844a000.padconf: Set reg 0x1fc Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [    2.404799] ti-iodelay 4844a000.padconf: Set reg 0x364 Delay(a: 0 g: 0), Elements(C=0 F=0)0x29000
    [    2.416176] mmc1: new DDR MMC card at address 0001
    [    2.421505] devtmpfs: mounted
    [    2.425827] Freeing unused kernel memory: 2048K
    [    2.430529] Run /sbin/init as init process
    [    2.435210] mmcblk1: mmc1:0001 S0J35A 7.28 GiB
    [    2.440331] mmcblk1boot0: mmc1:0001 S0J35A partition 1 31.5 MiB
    [    2.447674] mmcblk1boot1: mmc1:0001 S0J35A partition 2 31.5 MiB
    [    2.453896] mmcblk1rpmb: mmc1:0001 S0J35A partition 3 4.00 MiB, chardev (244:0)
    [    2.462166]  mmcblk1: p1 p2
    [    2.723879] systemd[1]: System time before build time, advancing clock.
    [    2.751840] systemd[1]: systemd 239 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -)
    [    2.773772] systemd[1]: Detected architecture arm.

    Welcome to Arago 2019.11!

    [    2.812430] systemd[1]: Set hostname to <am57xx-hs-evm>.
    [    3.018773] systemd[1]: File /lib/systemd/system/systemd-journald.service:36 configures an IP firewall (IPAddressDeny=any), but the loca.
    [    3.036159] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewal)
    [    3.191883] random: systemd: uninitialized urandom read (16 bytes read)
    [    3.201859] systemd[1]: Created slice system-getty.slice.
    [  OK  ] Created slice system-getty.slice.
    [    3.231810] random: systemd: uninitialized urandom read (16 bytes read)
    [    3.238771] systemd[1]: Listening on Network Service Netlink Socket.
    [  OK  ] Listening on Network Service Netlink Socket.
    [    3.271635] random: systemd: uninitialized urandom read (16 bytes read)
    [    3.278315] systemd[1]: Reached target Slices.
    [  OK  ] Reached target Slices.
    [    3.311926] systemd[1]: Listening on udev Kernel Socket.
    [  OK  ] Listening on udev Kernel Socket.
    [    3.342856] systemd[1]: Listening on Syslog Socket.
    [  OK  ] Listening on Syslog Socket.
    [  OK  ] Listening on Journal Socket (/dev/log).
    [  OK  ] Reached target Swap.
    [  OK  ] Listening on Process Core Dump Socket.
    [  OK  ] Reached target Paths.
    [  OK  ] Reached target Remote File Systems.
    [  OK  ] Listening on initctl Compatibility Named Pipe.
    [  OK  ] Listening on Journal Socket.
             Mounting /media/ram...
             Mounting /var/volatile...
             Mounting Temporary Directory (/tmp)...
             Mounting Kernel Configuration File System...
             Starting Journal Service...
             Starting udev Coldplug all Devices...
             Mounting Kernel Debug File System...
             Starting Remount Root and Kernel File Systems...
    [  OK  ] Created slice system-serial\x2dgetty.slice.
    [  OK  ] Mounted /media/ram.
    [  OK  ] Mounted /var/volatile.
    [    3.869351] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
    [  OK  ] Mounted Temporary Directory (/tmp).
    [  OK  ] Mounted Kernel Configuration File System.
    [  OK  ] Mounted Kernel Debug File System.
    [  OK  ] Started Remount Root and Kernel File Systems.
             Starting Create Static Device Nodes in /dev...
    [  OK  ] Reached target Local File Systems.
    [  OK  ] Started Journal Service.
    [  OK  ] Started Create Static Device Nodes in /dev.
             Starting udev Kernel Device Manager...
             Starting Flush Journal to Persistent Storage...
    [    4.231294] systemd-journald[78]: Received request to flush runtime journal from PID 1
    [  OK  ] Started udev Kernel Device Manager.
    [  OK  ] Started Flush Journal to Persistent Storage.
             Starting Create Volatile Files and Directories...
    [  OK  ] Started Create Volatile Files and Directories.
             Starting Network Time Synchronization...
             Starting Network Service...
    [  OK  ] Started Network Service.
             Starting Network Name Resolution...
    [  OK  ] Started Network Time Synchronization.
    [  OK  ] Reached target System Time Synchronized.
    [  OK  ] Started Network Name Resolution.
    [  OK  ] Reached target Host and Network Name Lookups.
    [  OK  ] Reached target Network.
    [  OK  ] Started udev Coldplug all Devices.
    [  OK  ] Reached target System Initialization.
    [  OK  ] Listening on D-Bus System Message Bus Socket.
    [  OK  ] Listening on RPCbind Server Activation Socket.
    [  OK  ] Reached target Sockets.
    [  OK  ] Started Daily Cleanup of Temporary Directories.
    [  OK  ] Reached target Timers.
    [  OK  ] Reached target Basic System.
             Starting Permit User Sessions...
    [  OK  ] Started D-Bus System Message Bus.
    [  OK  ] Started System Logging Service.
    [  OK  ] Started Kernel Logging Service.
    [  OK  ] Started Permit User Sessions.
    [    6.700152] net eth1: initializing cpsw version 1.15 (0)
    [  OK  ] Found device /dev/ttyS2.
    [    6.787533] libphy: PHY  not found
    [    6.884573] net eth1: phy "" not found on slave 1, err -19
    [    6.928054] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
    [    7.021332] net eth0: initializing cpsw version 1.15 (0)
    [    7.070749] libphy: PHY 48485000.mdio:00 not found
    [    7.191712] net eth0: phy "48485000.mdio:00" not found on slave 0, err -19
    [    7.227733] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [  OK  ] Started Getty on tty1.
    [  OK  ] Started Serial Getty on ttyS2.
    [  OK  ] Reached target Login Prompts.
             Starting Synchronize System and HW clocks...
    [  OK  ] Reached target Multi-User System.
    [  OK  ] Reached target Graphical Interface.
    [FAILED] Failed to start Synchronize System and HW clocks.
    See 'systemctl status sync-clocks.service' for details.

     _____                    _____           _         _   
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
                  |___|                    |___|            

    Arago Project http://arago-project.org am57xx-hs-evm ttyS2

    Arago 2019.11 am57xx-hs-evm ttyS2

    am57xx-hs-evm login: root

    5.root@am57xx-hs-evm:~# ethtool eth0
    Settings for eth0:
            Supports Wake-on: d
            Wake-on: d
            Current message level: 0x00000000 (0)
                                   
            Link detected: no
    6.root@am57xx-hs-evm:~# 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

    7. root@am57xx-hs-evm:~# ifconfig eth0
    eth0      Link encap:Ethernet  HWaddr 44:EA:D8:9A:96:E8  
              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:71


    Verified the ethernet in uboot and its working but in kernel i see the above error logs.

    Regards,
    Sriraksha

  • Hi,

    There may be a few issues to work through, the first thing to understand is why the PHYs are responding to the bus probe. I would like to ask a few questions first:

    &cpsw_emac0 {
             status = "okay";    
        reset-gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;    -----  Why are these 2 line in cpsw node? They are usually in the mdio node.
        reset-delay-us = <2>;                                              ----- 
        phy_id = <&davinci_mdio>, <0>;         ------ Try changing this line to : phy_id = <&phy0>;
        phy-mode = "rgmii";
        dual_emac_res_vlan = <1>;
        pinctrl-names = "default";                     ----- Why are these 2 pin control lines inside the cpsw node?
            pinctrl-0 = <&phy0_rst_gpios>;        ------

        /*fixed-link {
              speed = <100>;
              full-duplex;
        };*/
    };

    Best Regards,

    Schuyler

  • Hi Schuyler,

    we have phy reset gpios(gpio7_5 & gpio7_6).Was trying to figure out  how and where do we incorporate these in dts?

    So the 2 pin control lines and reset gpios in cpsw nodes.Do you have any idea how do we do that?

    Current dtsi looks like this now.

    &mac {
        pinctrl-names = "default", "sleep";
            pinctrl-0 = <&cpsw_pins_default>;
        pinctrl-1 = <&cpsw_pins_sleep>;
        dual_emac = <1>;
        status = "okay";
    };

    &cpsw_emac0 {
        //phy_id = <&davinci_mdio>, <0>;
        phy_id =<&phy0>;
        phy-mode = "rgmii";
        dual_emac_res_vlan = <1>;
        status = "okay";
    };

    &cpsw_emac1 {
        //phy_id = <&davinci_mdio>, <1>;
        phy_id =<&phy1>;
        phy-mode = "rgmii";
        dual_emac_res_vlan = <2>;
        status = "okay";
    };

    &davinci_mdio {
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&mdio_pins_default>;
        pinctrl-1 = <&mdio_pins_sleep>;
        status = "okay";
        
        phy0: ethernet-phy@0 {
            reg = <0>;
            };

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

    log after the phy id change

    root@am57xx-hs-evm:~# dmesg | grep phy
    [    0.000000] Booting Linux on physical CPU 0x0
    [    1.457392] libphy: Fixed MDIO Bus: probed
    [    1.539154] libphy: 48485000.mdio: probed
    [    1.595903] cpsw 48484000.ethernet: Invalid slave[0] phy_id property
    [    1.602318] cpsw 48484000.ethernet: Invalid slave[1] phy_id property
    [    6.815053] libphy: PHY  not found
    [    6.818487] net eth1: phy "" not found on slave 1, err -19
    [    7.224576] libphy: PHY  not found
    [    7.228007] net eth0: phy "" not found on slave 0, err -19

    Above dtsi along with i tried to move reset gpios part to mdio and there is a crash

    &davinci_mdio {
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&mdio_pins_default>;
        pinctrl-1 = <&mdio_pins_sleep>;
        reset-gpios = <&gpio7 5 GPIO_ACTIVE_LOW>,
                 <&gpio7 6 GPIO_ACTIVE_LOW>;
        reset-delay-us = <2>;
        status = "okay";
        
        phy0: ethernet-phy@0 {
            reg = <0>;
            };

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

    logs looks like this:

    Starting kernel ...

    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.19.94-gbe5389fd85 (administrator@EMMYS1756) (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture0
    [    0.000000] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7), cr=30c5387d
    [    0.000000] CPU: div instructions available: patching division code
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
    [    0.000000] OF: fdt: Machine model: TI Custom AM5708
    [    0.000000] Memory policy: Data cache writealloc
    [    0.000000] efi: Getting EFI parameters from FDT:
    [    0.000000] efi: UEFI not found.
    [    0.000000] Reserved memory: created CMA memory pool at 0x0000000095800000, size 56 MiB
    [    0.000000] OF: reserved mem: initialized node ipu2-memory@95800000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created CMA memory pool at 0x0000000099000000, size 64 MiB
    [    0.000000] OF: reserved mem: initialized node dsp1-memory@99000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x000000009d000000, size 32 MiB
    [    0.000000] OF: reserved mem: initialized node ipu1-memory@9d000000, compatible id shared-dma-pool
    [    0.000000] cma: Reserved 24 MiB at 0x00000000bc000000
    [    0.000000] OMAP4: Map 0x00000000bfd00000 to (ptrval) for dram barrier
    [    0.000000] Hit pending asynchronous external abort (FSR=0x00001211) during first unmask, this is most likely caused by a firmware/bootl.
    [    0.000000] DRA722 ES2.1
    [    0.000000] random: get_random_bytes called from start_kernel+0xb4/0x470 with crng_init=0
    [    0.000000] percpu: Embedded 15 pages/cpu s32396 r8192 d20852 u61440
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 193856
    [    0.000000] Kernel command line: console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait
    [    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
    [    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Memory: 609372K/782336K available (10240K kernel code, 331K rwdata, 2776K rodata, 2048K init, 267K bss, 25508K reserved, 147)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    [    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (12256 kB)
    [    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (2048 kB)
    [    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 332 kB)
    [    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 268 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] rcu: Preemptible hierarchical RCU implementation.
    [    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
    [    0.000000]  Tasks RCU enabled.
    [    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
    [    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    [    0.000000] OMAP clockevent source: timer1 at 32786 Hz
    [    0.000000] arch_timer: cp15 timer(s) running at 6.14MHz (virt).
    [    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.000017] Switching to timer-based delay loop, resolution 162ns
    [    0.000307] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
    [    0.000316] OMAP clocksource: 32k_counter at 32768 Hz
    [    0.000804] Console: colour dummy device 80x30
    [    0.000848] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.29 BogoMIPS (lpj=61475)
    [    0.000863] pid_max: default: 32768 minimum: 301
    [    0.000984] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.000999] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.001580] CPU: Testing write buffer coherency: ok
    [    0.001619] CPU0: Spectre v2: using ICIALLU workaround
    [    0.001847] /cpus/cpu@0 missing clock-frequency property
    [    0.001861] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    [    0.059866] Setting up static identity map for 0x80200000 - 0x80200060
    [    0.079870] rcu: Hierarchical SRCU implementation.
    [    0.100053] EFI services will not be available.
    [    0.119922] smp: Bringing up secondary CPUs ...
    [    0.119933] smp: Brought up 1 node, 1 CPU
    [    0.119944] SMP: Total of 1 processors activated (12.29 BogoMIPS).
    [    0.119952] CPU: All CPU(s) started in SVC mode.
    [    0.120389] devtmpfs: initialized
    [    0.150101] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
    [    0.150392] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.150410] futex hash table entries: 256 (order: 2, 16384 bytes)
    [    0.153088] pinctrl core: initialized pinctrl subsystem
    [    0.153657] DMI not present or invalid.
    [    0.153930] NET: Registered protocol family 16
    [    0.160941] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.161899] omap_hwmod: l3_main_2 using broken dt data from ocp
    [    0.352202] cpuidle: using governor ladder
    [    0.352238] cpuidle: using governor menu
    [    0.365153] OMAP GPIO hardware version 0.1
    [    0.379833] No ATAGs?
    [    0.379878] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
    [    0.379894] hw-breakpoint: maximum watchpoint size is 8 bytes.
    [    0.380795] OMAP DMA hardware revision 0.0
    [    0.412417] edma 43300000.edma: memcpy is disabled
    [    0.415755] edma 43300000.edma: TI EDMA DMA engine driver
    [    0.422854] omap-dma-engine 4a056000.dma-controller: OMAP DMA engine driver (LinkedList1/2/3 supported)
    [    0.426297] omap-iommu 40d01000.mmu: 40d01000.mmu registered
    [    0.426490] omap-iommu 40d02000.mmu: 40d02000.mmu registered
    [    0.426743] omap-iommu 58882000.mmu: 58882000.mmu registered
    [    0.426988] omap-iommu 55082000.mmu: 55082000.mmu registered
    [    0.427311] iommu: Adding device 58820000.ipu to group 1
    [    0.427389] iommu: Adding device 55020000.ipu to group 2
    [    0.427510] iommu: Adding device 40800000.dsp to group 0
    [    0.428752] SCSI subsystem initialized
    [    0.430033] omap_i2c 48070000.i2c: bus 0 rev0.12 at 400 kHz
    [    0.430209] media: Linux media interface: v0.10
    [    0.430247] videodev: Linux video capture interface: v2.00
    [    0.430324] pps_core: LinuxPPS API ver. 1 registered
    [    0.430333] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.430353] PTP clock support registered
    [    0.430382] EDAC MC: Ver: 3.0.0
    [    0.451412] clocksource: Switched to clocksource arch_sys_counter
    [    0.459525] NET: Registered protocol family 2
    [    0.460132] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
    [    0.460161] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
    [    0.460224] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
    [    0.460352] TCP: Hash tables configured (established 8192 bind 8192)
    [    0.460427] UDP hash table entries: 512 (order: 2, 16384 bytes)
    [    0.460462] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
    [    0.460788] NET: Registered protocol family 1
    [    0.491270] RPC: Registered named UNIX socket transport module.
    [    0.491281] RPC: Registered udp transport module.
    [    0.491290] RPC: Registered tcp transport module.
    [    0.491298] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.492419] hw perfevents: enabled with armv7_cortex_a15 PMU driver, 7 counters available
    [    0.493339] Initialise system trusted keyrings
    [    0.493503] workingset: timestamp_bits=14 max_order=18 bucket_order=4
    [    0.498556] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.509086] NFS: Registering the id_resolver key type
    [    0.509113] Key type id_resolver registered
    [    0.509122] Key type id_legacy registered
    [    0.509161] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.511220] Key type asymmetric registered
    [    0.511233] Asymmetric key parser 'x509' registered
    [    0.511282] bounce: pool size: 64 pages
    [    0.511319] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
    [    0.511330] io scheduler noop registered
    [    0.511339] io scheduler deadline registered
    [    0.511481] io scheduler cfq registered (default)
    [    0.511493] io scheduler mq-deadline registered
    [    0.511503] io scheduler kyber registered
    [    0.516550] pinctrl-single 4a003400.pinmux: 282 pins, size 1128
    [    0.516716] pinctrl-single 4a002e8c.pinmux: please update dts to use #pinctrl-cells = <1>
    [    0.516770] pinctrl-single 4a002e8c.pinmux: initialized with no interrupts
    [    0.516781] pinctrl-single 4a002e8c.pinmux: 1 pins, size 4
    [    0.517310] ***ti_iodelay_probe
    [    0.588337] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
    [    0.592081] console [ttyS2] disabled
    [    0.592141] 48020000.serial: ttyS2 at MMIO 0x48020000 (irq = 43, base_baud = 3000000) is a 8250
    [    1.423418] console [ttyS2] enabled
    [    1.440731] brd: module loaded
    [    1.450352] loop: module loaded
    [    1.457586] libphy: Fixed MDIO Bus: probed
    [    1.462296] vcan: Virtual CAN interface driver
    [    1.466764] CAN device driver interface
    [    1.475101] mdio_bus 48485000.mdio: mii_bus 48485000.mdio couldn't get reset GPIO
    [    1.483167] cpsw 48484000.ethernet: Invalid slave[0] phy_id property
    [    1.489561] cpsw 48484000.ethernet: Invalid slave[1] phy_id property
    [    1.495967] cpsw 48484000.ethernet: Detected MACID = 44:ea:d8:9a:96:e8
    [    1.502594] cpsw 48484000.ethernet: initialized cpsw ale version 1.4
    [    1.508978] cpsw 48484000.ethernet: ALE Table size 1024
    [    1.514291] cpsw 48484000.ethernet: cpts: overflow check period 500 (jiffies)
    [    1.522317] cpsw 48484000.ethernet: cpsw: Detected MACID = 22:6c:3f:3c:33:7c
    [    1.530772] i2c /dev entries driver
    [    1.539360] sdhci: Secure Digital Host Controller Interface driver
    [    1.545660] sdhci: Copyright(c) Pierre Ossman
    [    1.550813] sdhci-pltfm: SDHCI platform and OF driver helper
    [    1.557867] sdhci-omap 480b4000.mmc: failed to set system capabilities
    [    1.565049] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.575103] NET: Registered protocol family 10
    [    1.590567] Segment Routing with IPv6
    [    1.594378] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    1.600819] NET: Registered protocol family 17
    [    1.605343] can: controller area network core (rev 20170425 abi 9)
    [    1.611690] NET: Registered protocol family 29
    [    1.616157] can: raw protocol (rev 20170425)
    [    1.620445] can: broadcast manager protocol (rev 20170425 t)
    [    1.626150] can: netlink gateway (rev 20170425) max_hops=1
    [    1.631942] Key type dns_resolver registered
    [    1.636369] Registering SWP/SWPB emulation handler
    [    1.641185] omap_voltage_late_init: Voltage driver support not added
    [    1.647587] Power Management for TI OMAP4+ devices.
    [    1.653222] Loading compiled-in X.509 certificates
    [    1.684279] dmm 4e000000.dmm: workaround for errata i878 in use
    [    1.691988] dmm 4e000000.dmm: initialized all PAT entries
    [    1.701530] palmas 0-0058: Irq flag is 0x00000004
    [    1.733393] palmas 0-0058: Muxing GPIO 51, PWM 0, LED 2
    [    1.745414] SMPS5: supplied by regulator-dummy
    [    1.756140] LDO3: supplied by regulator-dummy
    [    1.761333] LDO4: supplied by VMAIN
    [    1.766643] random: fast init done
    [    1.772814] Unable to handle kernel NULL pointer dereference at virtual address 00000004
    [    1.780940] pgd = (ptrval)
    [    1.783678] [00000004] *pgd=80000080004003, *pmd=00000000
    [    1.789108] Internal error: Oops: a06 [#1] PREEMPT SMP ARM
    [    1.794617] Modules linked in:
    [    1.797688] CPU: 0 PID: 18 Comm: kworker/0:1 Not tainted 4.19.94-gbe5389fd85 #28
    [    1.805114] Hardware name: Generic DRA72X (Flattened Device Tree)
    [    1.811242] Workqueue: events deferred_probe_work_func
    [    1.816409] PC is at device_pm_move_last+0x24/0x44
    [    1.821225] LR is at dpm_list+0x0/0x8
    [    1.824902] pc : [<c06d4730>]    lr : [<c12379b8>]    psr: 20000013
    [    1.831196] sp : ef20be50  ip : 00000000  fp : ef20be5c
    [    1.836442] r10: 00000000  r9 : c12371ac  r8 : 00000000
    [    1.841689] r7 : c06c2cb4  r6 : 00000000  r5 : c1204c48  r4 : eeb94478
    [    1.848244] r3 : c12379a4  r2 : eeb938f4  r1 : eeb944f4  r0 : eeb94478
    [    1.854800] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
    [    1.861966] Control: 30c5387d  Table: 80003000  DAC: fffffffd
    [    1.867736] Process kworker/0:1 (pid: 18, stack limit = 0x(ptrval))
    [    1.874029] Stack: (0xef20be50 to 0xef20c000)
    [    1.878405] be40:                                     ef20be74 ef20be60 c06c2d40 c06d4718
    [    1.886620] be60: eeb67714 c1204c48 ef20bea4 ef20be78 c06c0afc c06c2cc0 ef20bec4 eeb63c00
    [    1.894834] be80: eeb67714 cfd1b8d8 eeb66410 eeb66410 eeb66410 c123718c ef20bebc ef20bea8
    [    1.903048] bea0: c06c2cf4 c06c0aa4 c1236fe0 00000000 ef20bedc ef20bec0 c06c2d74 c06c2cc0
    [    1.911262] bec0: eeb66410 c1237170 c1237170 c123718c ef20befc ef20bee0 c06c542c c06c2d50
    [    1.919476] bee0: c12371a8 ef1eee00 ef662d80 ef666000 ef20bf34 ef20bf00 c02464d0 c06c53d8
    [    1.927690] bf00: 00000008 ef662d98 c1203d00 ef1eee00 ef1eee14 ef662d80 00000008 ef662d98
    [    1.935903] bf20: c1203d00 ef662d80 ef20bf74 ef20bf38 c02474fc c02462e8 ef1e1c00 c0dcfbd0
    [    1.944117] bf40: c1251252 ffffe000 c024c2ec ef1e1c40 ef1e1c00 00000000 ef20a000 ef1eee00
    [    1.952330] bf60: c024724c ef0a3e74 ef20bfac ef20bf78 c024c7b4 c0247258 ef1e1c5c ef1e1c5c
    [    1.960544] bf80: 00000000 ef1e1c00 c024c654 00000000 00000000 00000000 00000000 00000000
    [    1.968756] bfa0: 00000000 ef20bfb0 c02010d8 c024c660 00000000 00000000 00000000 00000000
    [    1.976970] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    [    1.985184] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
    [    1.993394] Backtrace:
    [    1.995857] [<c06d470c>] (device_pm_move_last) from [<c06c2d40>] (device_reorder_to_tail+0x8c/0x90)
    [    2.004950] [<c06c2cb4>] (device_reorder_to_tail) from [<c06c0afc>] (device_for_each_child+0x64/0x9c)
    [    2.014208]  r5:c1204c48 r4:eeb67714
    [    2.017803] [<c06c0a98>] (device_for_each_child) from [<c06c2cf4>] (device_reorder_to_tail+0x40/0x90)
    [    2.027063]  r7:c123718c r6:eeb66410 r5:eeb66410 r4:eeb66410
    [    2.032748] [<c06c2cb4>] (device_reorder_to_tail) from [<c06c2d74>] (device_pm_move_to_tail+0x30/0x48)
    [    2.042095]  r5:00000000 r4:c1236fe0
    [    2.045688] [<c06c2d44>] (device_pm_move_to_tail) from [<c06c542c>] (deferred_probe_work_func+0x60/0x94)
    [    2.055209]  r7:c123718c r6:c1237170 r5:c1237170 r4:eeb66410
    [    2.060898] [<c06c53cc>] (deferred_probe_work_func) from [<c02464d0>] (process_one_work+0x1f4/0x404)
    [    2.070070]  r7:ef666000 r6:ef662d80 r5:ef1eee00 r4:c12371a8
    [    2.075757] [<c02462dc>] (process_one_work) from [<c02474fc>] (worker_thread+0x2b0/0x568)
    [    2.083971]  r10:ef662d80 r9:c1203d00 r8:ef662d98 r7:00000008 r6:ef662d80 r5:ef1eee14
    [    2.091834]  r4:ef1eee00
    [    2.094381] [<c024724c>] (worker_thread) from [<c024c7b4>] (kthread+0x160/0x168)
    [    2.101810]  r10:ef0a3e74 r9:c024724c r8:ef1eee00 r7:ef20a000 r6:00000000 r5:ef1e1c00
    [    2.109672]  r4:ef1e1c40
    [    2.112220] [<c024c654>] (kthread) from [<c02010d8>] (ret_from_fork+0x14/0x3c)
    [    2.119472] Exception stack(0xef20bfb0 to 0xef20bff8)
    [    2.124544] bfa0:                                     00000000 00000000 00000000 00000000
    [    2.132758] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    [    2.140970] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000
    [    2.147614]  r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c024c654
    [    2.155476]  r4:ef1e1c00
    [    2.158022] Code: e590c07c e34c3123 e280107c e283e014 (e58c2004)
    [    2.164181] ---[ end trace ef95956cdbc5dce8 ]---


    Regards,

    Sriraksha

  • Hi,

    Could you please attach snippets of where GPIOs for the PHY resets are defined in the DTS? There should be nodes defining pin mux, the mdio node, the gpio node for bank 7 being enabled?

    Best Regards,

    Schuyler

  • Hi Schuyler,

    PinMuxes are as follows:

     mdio_pins_default: mdio_pins_default {
            pinctrl-single,pins = <
                        DRA7XX_CORE_IOPAD(0x3590, PIN_OUTPUT | MUX_MODE3)  /* vin2a_d10,mdio_mclk */
                DRA7XX_CORE_IOPAD(0x3594, PIN_INPUT | MUX_MODE3)  /* vin2a_d11,mdio_d */
                >;
       };

    cpsw_pins_default:cpsw_pins_default{
            pinctrl-single,pins = <
            /* slave 0 */
                DRA7XX_CORE_IOPAD(0x367C, PIN_INPUT_PULLDOWN | MUX_MODE0)  /* rgmii0_rxd0 */
                        DRA7XX_CORE_IOPAD(0x3678, PIN_INPUT_PULLDOWN | MUX_MODE0)  /* rgmii0_rxd1 */
                DRA7XX_CORE_IOPAD(0x3674, PIN_INPUT_PULLDOWN | MUX_MODE0)  /* rgmii0_rxd2 */
                DRA7XX_CORE_IOPAD(0x3670, PIN_INPUT_PULLDOWN | MUX_MODE0)  /* rgmii0_rxd3 */
                DRA7XX_CORE_IOPAD(0x3664, PIN_OUTPUT | MUX_MODE0)  /* rgmii0_txd0 */
                DRA7XX_CORE_IOPAD(0x3660, PIN_OUTPUT | MUX_MODE0)  /* rgmii0_txd1 */
                DRA7XX_CORE_IOPAD(0x365C, PIN_OUTPUT | MUX_MODE0)  /* rgmii0_txd2 */
                DRA7XX_CORE_IOPAD(0x3658, PIN_OUTPUT | MUX_MODE0)  /* rgmii0_txd3 */
                DRA7XX_CORE_IOPAD(0x3650, PIN_OUTPUT | MUX_MODE0)  /* rgmii0_txc */
                DRA7XX_CORE_IOPAD(0x3654, PIN_OUTPUT | MUX_MODE0)  /* rgmii0_txctl */
                DRA7XX_CORE_IOPAD(0x3668, PIN_INPUT_PULLDOWN | MUX_MODE0)  /* rgmii0_rxc */
                DRA7XX_CORE_IOPAD(0x366C, PIN_INPUT_PULLDOWN | MUX_MODE0)  /* rgmii0_rxctl */
            /* slave 1 */
                DRA7XX_CORE_IOPAD(0x35C4, PIN_INPUT_PULLDOWN | MUX_MODE3)  /* vin2a_d23,rgmii1_rxd0 */
                        DRA7XX_CORE_IOPAD(0x35C0, PIN_INPUT_PULLDOWN | MUX_MODE3)  /* vin2a_d22,rgmii1_rxd1 */
                DRA7XX_CORE_IOPAD(0x35BC, PIN_INPUT_PULLDOWN | MUX_MODE3)  /* vin2a_d21,rgmii1_rxd2 */
                DRA7XX_CORE_IOPAD(0x35B8, PIN_INPUT_PULLDOWN | MUX_MODE3)  /* vin2a_d20,rgmii1_rxd3 */
                DRA7XX_CORE_IOPAD(0x35AC, PIN_OUTPUT | MUX_MODE3)  /* vin2a_d17,rgmii1_txd0 */
                DRA7XX_CORE_IOPAD(0x35A8, PIN_OUTPUT | MUX_MODE3)  /* vin2a_d16,rgmii1_txd1 */
                DRA7XX_CORE_IOPAD(0x35A4, PIN_OUTPUT | MUX_MODE3)  /* vin2a_d15,rgmii1_txd2 */
                DRA7XX_CORE_IOPAD(0x35A0, PIN_OUTPUT | MUX_MODE3)  /* vin2a_d14,rgmii1_txd3 */
                DRA7XX_CORE_IOPAD(0x3598, PIN_OUTPUT | MUX_MODE3)  /* vin2a_d12,rgmii1_txc */
                DRA7XX_CORE_IOPAD(0x359C, PIN_OUTPUT | MUX_MODE3)  /* vin2a_d13,rgmii1_txctl */
                DRA7XX_CORE_IOPAD(0x35B0, PIN_INPUT_PULLDOWN | MUX_MODE3)  /* vin2a_d18,rgmii1_rxc */
                DRA7XX_CORE_IOPAD(0x35B4, PIN_INPUT_PULLDOWN | MUX_MODE3)  /* vin2a_d19,rgmii1_rxctl */
                >;
        };

    gpio7_pins_default: gpio7_pins_default {
                pinctrl-single,pins = <
            DRA7XX_CORE_IOPAD(0x3440, PIN_OUTPUT | MUX_MODE14)        /* gpmc_a0,gpio7_3 */
                DRA7XX_CORE_IOPAD(0x3444, PIN_OUTPUT | MUX_MODE14)        /* gpmc_a1,gpio7_4 */
                DRA7XX_CORE_IOPAD(0x3448, PIN_OUTPUT | MUX_MODE14)        /* gpmc_a2,gpio7_5 */ phy reset 0
                DRA7XX_CORE_IOPAD(0x344C, PIN_OUTPUT | MUX_MODE14)        /* gpmc_a3,gpio7_6 */ phy resey 1
            DRA7XX_CORE_IOPAD(0x37b4, PIN_OUTPUT | MUX_MODE14)          /* spi1_cs1,gpio7_11*/
            >;
        };

    &gpio7 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&gpio7_pins_default>;
    };

    Regards,
    Sriraksha

  • Hi

    For DT you need to follow

    elixir.bootlin.com/.../phy.txt
    elixir.bootlin.com/.../ethernet.txt

    So your DT should look like:

    &mac {
    	status = "okay";
    	dual_emac;
    };
    
    &cpsw_emac0 {
    	phy-handle = <&phy0>;
    	phy-mode = "rgmii";
    	dual_emac_res_vlan = <1>;
    };
    
    &cpsw_emac1 {
    	phy-handle = <&phy1>;
    	phy-mode = "rgmii";
    	dual_emac_res_vlan = <2>;
    };
    
    &davinci_mdio {
    	status = "okay";
    /* This option for the case when both PHYs has shared GPIO reset line
    	reset-gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
        	reset-delay-us = <2>; 
    */
    	phy0: ethernet-phy@0 {
    		reg = <0>;
    		reset-gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
    	};
    
    	phy1: ethernet-phy@1 {
    		reg = <1>;
    		reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
    	};
    };

  • HI Grygorii /Schuyler,

    Tried the above dts change where i moved the reset gpios inside phy node where crash is resolved but error is still the same as follows:

    root@am57xx-hs-evm:~# dmesg | grep phy
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.638304] libphy: Fixed MDIO Bus: probed
    [    0.701524] libphy: 48485000.mdio: probed
    [    0.701549] ***************** davinci_mdio_read start ret 0x80400000 phyid 0x0 phyreg 0x2
    [    0.708964] ***************** davinci_mdio_read start ret 0x80410000 phyid 0x1 phyreg 0x2
    [    5.027506] net eth0: phy "/ocp/ethernet@48484000/mdio@48485000/ethernet-phy@0" not found on slave 0
    [    5.224810] net eth1: phy "/ocp/ethernet@48484000/mdio@48485000/ethernet-phy@1" not found on slave 1
    root@am57xx-hs-evm:~# dmesg | grep mdio
    [    0.638262] mdio_bus fixed-0: GPIO lookup for consumer reset idx 0
    [    0.638271] mdio_bus fixed-0: using lookup tables for GPIO lookup
    [    0.638279] mdio_bus fixed-0: No GPIO consumer reset found
    [    0.644628] mdio_bus 48485000.mdio: GPIO lookup for consumer reset idx 0
    [    0.644637] mdio_bus 48485000.mdio: using device tree for GPIO lookup
    [    0.644655] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/ethernet@48484000/mdio@48485000[0]'
    [    0.644671] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/ethernet@48484000/mdio@48485000[0]'
    [    0.644681] mdio_bus 48485000.mdio: using lookup tables for GPIO lookup
    [    0.644688] mdio_bus 48485000.mdio: No GPIO consumer reset found
    [    0.701514] davinci_mdio 48485000.mdio: davinci mdio revision 1.6, bus freq 1000000
    [    0.701524] libphy: 48485000.mdio: probed
    [    0.701542] ***************** davinci_mdio_read
    [    0.701549] ***************** davinci_mdio_read start ret 0x80400000 phyid 0x0 phyreg 0x2
    [    0.702205] ***************** davinci_mdio_read end 0x40FFFF
    [    0.702215] mdio_bus 48485000.mdio: MDIO device at address 0 is missing.
    [    0.708958] ***************** davinci_mdio_read
    [    0.708964] ***************** davinci_mdio_read start ret 0x80410000 phyid 0x1 phyreg 0x2
    [    0.710046] ***************** davinci_mdio_read end 0x41FFFF
    [    0.710056] mdio_bus 48485000.mdio: MDIO device at address 1 is missing.
    [    5.027506] net eth0: phy "/ocp/ethernet@48484000/mdio@48485000/ethernet-phy@0" not found on slave 0
    [    5.224810] net eth1: phy "/ocp/ethernet@48484000/mdio@48485000/ethernet-phy@1" not found on slave 1

    tried below dtsi change as well where 2 reset gpios (7_5,7_6 for phys and ETH0_INT (gpio 1_25 &  ETH1_INT gpio 6_29) and also from phy datasheet

    http://ww1.microchip.com/downloads/en/DeviceDoc/00002117F.pdf

    Found the values for phy(compatible,asser,deassert time etc)

    Could you let me know if i made any mistakes here?

    gpio1_pins_default: gpio1_pins_default {
                       pinctrl-single,pins = <
                            DRA7XX_CORE_IOPAD(0x37a0, PIN_INPUT | MUX_MODE14)       /* mmc3_dat7,gpio1_25 */  ETH0_INT
                            DRA7XX_CORE_IOPAD(0x3450, PIN_INPUT | MUX_MODE14)       /* GPMC_A4,GPIO1_26 */
                            DRA7XX_CORE_IOPAD(0x3454, PIN_OUTPUT | MUX_MODE14)       /* gpmc_a5,gpio1_27*/
                            DRA7XX_CORE_IOPAD(0x3458, PIN_OUTPUT | MUX_MODE14)       /* gpmc_a6,gpio1_28 */
                            DRA7XX_CORE_IOPAD(0x345c, PIN_INPUT | MUX_MODE14)       /* gpmc_a7,gpio1_29*/
                            DRA7XX_CORE_IOPAD(0x3460, PIN_INPUT | MUX_MODE14)       /* gpmc_a8,gpio1_30 */
                                    >;
                            };

    gpio6_pins_default: gpio6_pins_default {
                  pinctrl-single,pins = <
                            DRA7XX_CORE_IOPAD(0x370c, PIN_OUTPUT | MUX_MODE14)          /* vddshv3,gpio6_8 */
                            DRA7XX_CORE_IOPAD(0x377c, PIN_INPUT | MUX_MODE14)           /* mmc3_clk,gpio6_29 */  ETH1_INT
                                           >;
                             };

    &gpio1 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&gpio1_pins_default>;    
    };

    &gpio6 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&gpio6_pins_default>;
    };


    &mac {
        status = "okay";
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&cpsw_pins_default>;
        pinctrl-1 = <&cpsw_pins_sleep>;
        dual_emac;
    };


    &cpsw_emac0 {
        //phy_id = <&davinci_mdio>, <0>;
        phy-handle = <&phy0>;
        phy-mode = "rgmii";
        dual_emac_res_vlan = <1>;
    };


    &cpsw_emac1 {
        //phy_id = <&davinci_mdio>, <1>;
        phy-handle = <&phy1>;
        phy-mode = "rgmii";
        dual_emac_res_vlan = <2>;
    };


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

        phy0: ethernet-phy@0 {
        compatible = "ethernet-phy-ieee802.3-c22";
        interrupt-parent = <&gpio1>;
        interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
            reg = <0>;
        
            reset-gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
        reset-delay-us = <2>;
        reset-assert-us = <10000>;
        reset-deassert-us = <100>;
        };

        phy1: ethernet-phy@1 {
        compatible = "ethernet-phy-ieee802.3-c22";
        interrupt-parent = <&gpio6>;
        interrupts = <29 IRQ_TYPE_EDGE_FALLING>;
            reg = <1>;

            reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
        reset-delay-us = <2>;
        reset-assert-us = <10000>;
        reset-deassert-us = <100>;
        };
    };

    error logs as follows:

    root@am57xx-hs-evm:~# dmesg | grep phy
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.638350] libphy: Fixed MDIO Bus: probed
    [    0.701507] libphy: 48485000.mdio: probed
    [    0.701530] ***************** davinci_mdio_read start ret 0x80400000 phyid 0x0 phyreg 0x2
    [    0.708945] ***************** davinci_mdio_read start ret 0x80410000 phyid 0x1 phyreg 0x2
    [    4.889258] net eth1: phy "/ocp/ethernet@48484000/mdio@48485000/ethernet-phy@1" not found on slave 1
    [    5.094800] net eth0: phy "/ocp/ethernet@48484000/mdio@48485000/ethernet-phy@0" not found on slave 0
    root@am57xx-hs-evm:~# dmesg | grep mdio
    [    0.638308] mdio_bus fixed-0: GPIO lookup for consumer reset idx 0
    [    0.638317] mdio_bus fixed-0: using lookup tables for GPIO lookup
    [    0.638325] mdio_bus fixed-0: No GPIO consumer reset found
    [    0.644923] mdio_bus 48485000.mdio: GPIO lookup for consumer reset idx 0
    [    0.644932] mdio_bus 48485000.mdio: using device tree for GPIO lookup
    [    0.644950] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/ethernet@48484000/mdio@48485000[0]'
    [    0.644966] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/ethernet@48484000/mdio@48485000[0]'
    [    0.644975] mdio_bus 48485000.mdio: using lookup tables for GPIO lookup
    [    0.644982] mdio_bus 48485000.mdio: No GPIO consumer reset found
    [    0.701497] davinci_mdio 48485000.mdio: davinci mdio revision 1.6, bus freq 1000000
    [    0.701507] libphy: 48485000.mdio: probed
    [    0.701523] ***************** davinci_mdio_read
    [    0.701530] ***************** davinci_mdio_read start ret 0x80400000 phyid 0x0 phyreg 0x2
    [    0.702184] ***************** davinci_mdio_read end 0x40FFFF
    [    0.702195] mdio_bus 48485000.mdio: MDIO device at address 0 is missing.
    [    0.708938] ***************** davinci_mdio_read
    [    0.708945] ***************** davinci_mdio_read start ret 0x80410000 phyid 0x1 phyreg 0x2
    [    0.710026] ***************** davinci_mdio_read end 0x41FFFF
    [    0.710036] mdio_bus 48485000.mdio: MDIO device at address 1 is missing.
    [    4.889258] net eth1: phy "/ocp/ethernet@48484000/mdio@48485000/ethernet-phy@1" not found on slave 1
    [    5.094800] net eth0: phy "/ocp/ethernet@48484000/mdio@48485000/ethernet-phy@0" not found on slave 0

    Regards,
    Sriraksha

  • 1) for am57/dra7 platforms there is strict restriction - all pinmuxing has to be done only in u-boot in mux_data.h. So, pls remove all net muxes

    2) Lets not add complexity for now - no interrupts, pls

    3) for PHY nodes

        phy1: ethernet-phy@1 {
        compatible = "ethernet-phy-ieee802.3-c22";           <-- not needed
        interrupt-parent = <&gpio6>;                                   <-- remove
        interrupts = <29 IRQ_TYPE_EDGE_FALLING>;    <-- remove
            reg = <1>;

            reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
        reset-delay-us = <2>;                                             <-- remove
        reset-assert-us = <10000>;
        reset-deassert-us = <100>;
        };
    };

  • Hi Grygorii,

    Uboot pinmuxes are updated using pinmux tool.So i can remove the muxes in kernel.

    Current dtsi with your changes looks like this

    &mac {
        status = "okay";
        dual_emac;
    };

    &cpsw_emac0 {
             status = "okay";
        //phy-handle = <&phy0>;    
        phy_id = <&davinci_mdio>, <0>;
        phy-mode = "rgmii";
        dual_emac_res_vlan = <1>;
    };


    &cpsw_emac1 {
        status = "okay";
        //phy-handle = <&phy1>;
        phy_id = <&davinci_mdio>, <1>;
        phy-mode = "rgmii";
        dual_emac_res_vlan = <2>;
    };

    &davinci_mdio {
        status = "okay";

        phy0: ethernet-phy@0 {
            reg = <0>;
            reset-gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
        reset-assert-us = <10000>;
        reset-deassert-us = <1000>;
        };
        phy1: ethernet-phy@1 {
            reg = <1>;
            reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
        reset-assert-us = <10000>;
        reset-deassert-us = <1000>;
        };
    };

    no change in errors

    root@am57xx-hs-evm:~# dmesg | grep mdio
    [    0.638346] mdio_bus fixed-0: GPIO lookup for consumer reset idx 0
    [    0.638356] mdio_bus fixed-0: using lookup tables for GPIO lookup
    [    0.638364] mdio_bus fixed-0: No GPIO consumer reset found
    [    0.644733] mdio_bus 48485000.mdio: GPIO lookup for consumer reset idx 0
    [    0.644741] mdio_bus 48485000.mdio: using device tree for GPIO lookup
    [    0.644759] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/ethernet@48484000/mdio@48485000[0]'
    [    0.644773] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/ethernet@48484000/mdio@48485000[0]'
    [    0.644783] mdio_bus 48485000.mdio: using lookup tables for GPIO lookup
    [    0.644791] mdio_bus 48485000.mdio: No GPIO consumer reset found
    [    0.701503] davinci_mdio 48485000.mdio: davinci mdio revision 1.6, bus freq 1000000
    [    0.701513] libphy: 48485000.mdio: probed
    [    0.701532] ***************** davinci_mdio_read
    [    0.701538] ***************** davinci_mdio_read start ret 0x80400000 phyid 0x0 phyreg 0x2
    [    0.702624] ***************** davinci_mdio_read end 0x40FFFF
    [    0.702634] mdio_bus 48485000.mdio: MDIO device at address 0 is missing.
    [    0.709378] ***************** davinci_mdio_read
    [    0.709384] ***************** davinci_mdio_read start ret 0x80410000 phyid 0x1 phyreg 0x2
    [    0.710465] ***************** davinci_mdio_read end 0x41FFFF
    [    0.710475] mdio_bus 48485000.mdio: MDIO device at address 1 is missing.
    [    4.840421] libphy: PHY 48485000.mdio:01 not found
    [    4.930870] net eth1: phy "48485000.mdio:01" not found on slave 1, err -19
    [    5.075577] libphy: PHY 48485000.mdio:00 not found
    [    5.080398] net eth0: phy "48485000.mdio:00" not found on slave 0, err -19
    root@am57xx-hs-evm:~# dmesg | grep phy
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.638389] libphy: Fixed MDIO Bus: probed
    [    0.701513] libphy: 48485000.mdio: probed
    [    0.701538] ***************** davinci_mdio_read start ret 0x80400000 phyid 0x0 phyreg 0x2
    [    0.709384] ***************** davinci_mdio_read start ret 0x80410000 phyid 0x1 phyreg 0x2
    [    4.840421] libphy: PHY 48485000.mdio:01 not found
    [    4.930870] net eth1: phy "48485000.mdio:01" not found on slave 1, err -19
    [    5.075577] libphy: PHY 48485000.mdio:00 not found
    [    5.080398] net eth0: phy "48485000.mdio:00" not found on slave 0, err -19

    regards,
    Sriraksha

  • use "phy-handle", pleaseeee!

    and could you provide " dmesg | grep mdio" output

  • Hi Grygorii,

    Already tried with phy-handle as well.

    dmesg log is as follows

    root@am57xx-hs-evm:~# dmesg | grep mdio
    [    0.638422] mdio_bus fixed-0: GPIO lookup for consumer reset idx 0
    [    0.638432] mdio_bus fixed-0: using lookup tables for GPIO lookup
    [    0.638440] mdio_bus fixed-0: No GPIO consumer reset found
    [    0.644832] mdio_bus 48485000.mdio: GPIO lookup for consumer reset idx 0
    [    0.644840] mdio_bus 48485000.mdio: using device tree for GPIO lookup
    [    0.644859] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/ethernet@48484000/mdio@48485000[0]'
    [    0.644873] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/ethernet@48484000/mdio@48485000[0]'
    [    0.644883] mdio_bus 48485000.mdio: using lookup tables for GPIO lookup
    [    0.644890] mdio_bus 48485000.mdio: No GPIO consumer reset found
    [    0.701498] davinci_mdio 48485000.mdio: davinci mdio revision 1.6, bus freq 1000000
    [    0.701508] libphy: 48485000.mdio: probed
    [    0.701526] ***************** davinci_mdio_read
    [    0.701533] ***************** davinci_mdio_read start ret 0x80400000 phyid 0x0 phyreg 0x2
    [    0.702618] ***************** davinci_mdio_read end 0x40FFFF
    [    0.702629] mdio_bus 48485000.mdio: MDIO device at address 0 is missing.
    [    0.709375] ***************** davinci_mdio_read
    [    0.709381] ***************** davinci_mdio_read start ret 0x80410000 phyid 0x1 phyreg 0x2
    [    0.710248] ***************** davinci_mdio_read end 0x41FFFF
    [    0.710258] mdio_bus 48485000.mdio: MDIO device at address 1 is missing.
    [    5.009292] net eth1: phy "/ocp/ethernet@48484000/mdio@48485000/ethernet-phy@1" not found on slave 1
    [    5.189328] net eth0: phy "/ocp/ethernet@48484000/mdio@48485000/ethernet-phy@0" not found on slave 0
    root@am57xx-hs-evm:~# dmesg | grep phy
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.638466] libphy: Fixed MDIO Bus: probed
    [    0.701508] libphy: 48485000.mdio: probed
    [    0.701533] ***************** davinci_mdio_read start ret 0x80400000 phyid 0x0 phyreg 0x2
    [    0.709381] ***************** davinci_mdio_read start ret 0x80410000 phyid 0x1 phyreg 0x2
    [    5.009292] net eth1: phy "/ocp/ethernet@48484000/mdio@48485000/ethernet-phy@1" not found on slave 1
    [    5.189328] net eth0: phy "/ocp/ethernet@48484000/mdio@48485000/ethernet-phy@0" not found on slave 0

    Regards,
    Sriraksha

  • You must switch to "phy-handle" otherwise I can't help you.

    Hence, following your early posts, you do have networking working in u-boot which means smth. has changed between u-boot and kernel.

    1) check MDIO and GPIO pinmuxes (use "md" in uboot and "devmem" in kernel). Note. You are using non default vin2a_d10/d11 pins.

    2) run "cat /sys/kernel/debug/gpio" to determine PHY reset GPIO

    3) remove "reset-gpios" from PHY nodes and follow https://e2e.ti.com/support/processors/f/791/p/937659/3497599#3497599  to check if  PHY reset GPIOs configured properly

    4) add back "fixed-link" nodes and remove all PHYs from davinci_mdio node and all "phy-handle" properties. You should be able to boot and networking should work (as per your comments). After boot you can try to use "phytool" to probe MDIO bus like "phytoll eth0/0/0".

  • hi grygorii,

    1. we verified all the mdio related pinmuxes in both kernel and uboot and its same but only difference is in useraccess(0x48485080) register where after we set go bit in kernel its reading 0x0000ffff and alive register in kernel reads  0 whereas it read 0x3 in uboot. For testing purpose we even disabled all the peripherals including mdio mac but something is affecting the useraccess register.

    root@am57xx-hs-evm:~# devmem2 0x4A00363C

    /dev/mem opened.
    Memory mapped at address 0xb6fb7000.
    Read at address  0x4A00363C (0xb6fb763c): 0x00090001
    root@am57xx-hs-evm:~# devmem2 0x4A003590
    /dev/mem opened.
    Memory mapped at address 0xb6f1c000.
    Read at address  0x4A003590 (0xb6f1c590): 0x00010003
    root@am57xx-hs-evm:~# devmem2 0x4A003594
    /dev/mem opened.
    Memory mapped at address 0xb6f0b000.
    Read at address  0x4A003594 (0xb6f0b594): 0x00050003
    root@am57xx-hs-evm:~# devmem2 0x4A003774
    /dev/mem opened.
    Memory mapped at address 0xb6f35000.
    Read at address  0x4A003774 (0xb6f35774): 0x0001000A
    root@am57xx-hs-evm:~# devmem2 0x4A0037B8
    /dev/mem opened.
    Memory mapped at address 0xb6f65000.
    Read at address  0x4A0037B8 (0xb6f657b8): 0x000D0006
    root@am57xx-hs-evm:~# devmem2 0x4A003778
    /dev/mem opened.
    Memory mapped at address 0xb6f01000.
    Read at address  0x4A003778 (0xb6f01778): 0x0001000A
    root@am57xx-hs-evm:~# devmem2 0x4A003640
    /dev/mem opened.
    Memory mapped at address 0xb6f45000.
    Read at address  0x4A003640 (0xb6f45640): 0x000D0001
    root@am57xx-hs-evm:~# devmem2 0x4A0037BC
    /dev/mem opened.
    Memory mapped at address 0xb6f21000.

    Read at address  0x4A0037BC (0xb6f217bc): 0x000D0006

    2. o/p of this "cat /sys/kernel/debug/gpio" - Phy reset are not happening even with reset gpios set under phy nodes. Its not resetting both leds in jack are off.

    3. Yes have tried that as well.  I can manually do phy reset on the gpios but once leds are on, if i do ifconfig eth0 up and down it gives out same phy not found error.

    root@am57xx-hs-evm:~# echo 230 > /sys/class/gpio/export
    root@am57xx-hs-evm:~# echo out > /sys/class/gpio/gpio230/direction
    root@am57xx-hs-evm:~# echo 1 > /sys/class/gpio/gpio230/value

    root@am57xx-hs-evm:~# ifconfig eth1 down
    root@am57xx-hs-evm:~# ifconfig eth1 up
    [   95.637923] libphy: PHY  not found
    [   95.641348] net eth1: phy "" not found on slave 1, err -19

    4.with fixed link below dtsi changes it works. dhcp and static ip both works as well.

    &mac {
        status = "okay";
        dual_emac;
    };

    &cpsw_emac0 {
             status = "okay";
        //reset-gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
        //reset-delay-us = <2>;
        //phy-handle = <&phy0>;    
        //phy_id = <&davinci_mdio>, <0>;
        phy-mode = "rgmii";
        dual_emac_res_vlan = <1>;
        fixed-link {
              speed = <100>;
              full-duplex;
        };
    };


    &cpsw_emac1 {
        status = "okay";
        reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
        reset-delay-us = <2>;
        //phy-handle = <&phy1>;
        //phy_id = <&davinci_mdio>, <1>;
        phy-mode = "rgmii";
        dual_emac_res_vlan = <2>;
        fixed-link {
              speed = <100>;
              full-duplex;
        };
    };

    &davinci_mdio {
        status = "okay";
    };

    tested for cpsw_emac1 where reset happened during boot and for cpsw_emac0 did manual reset with gpio and that worked as well.

    root@am57xx-hs-evm:~# ifconfig eth1 10.53.66.205 netmask 255.255.255.0 down
    root@am57xx-hs-evm:~# ifconfig eth1 10.53.66.205 netmask 255.255.255.0 up
    root@am57xx-hs-evm:~# ping 10.53.66.200
    PING 10.53.66.200 (10.53.66.200): 56 data bytes
    64 bytes from 10.53.66.200: seq=4 ttl=64 time=6.233 ms
    64 bytes from 10.53.66.200: seq=5 ttl=64 time=0.422 ms
    64 bytes from 10.53.66.200: seq=6 ttl=64 time=0.430 ms

    root@am57xx-hs-evm:~# phytool eth0/0/0
    ieee-phy: reg:BMCR(0x00) val:0x2100
       flags:          -reset -loopback -aneg-enable -power-down -isolate -aneg-restart -collision-test
       speed:          100-full
    root@am57xx-hs-evm:~# phytool eth1/0/0
    ieee-phy: reg:BMCR(0x00) val:0x2100
       flags:          -reset -loopback -aneg-enable -power-down -isolate -aneg-restart -collision-test
       speed:          100-full


    Regards,
    Sriraksha

  • Hi

    I see diff MDIO pinmuxes comparing to am571x-idk

    root@am57xx-evm:~# devmem2 0x4A00363C
    /dev/mem opened.
    Memory mapped at address 0xb6f42000.
    Read at address 0x4A00363C (0xb6f4263c): 0x00080000
    root@am57xx-evm:~# devmem2 0x4A003640
    /dev/mem opened.
    Memory mapped at address 0xb6f35000.
    Read at address 0x4A003640 (0xb6f35640): 0x000D0000

    Pls, check bits 16-19.

    Pls, use DT as i provided in https://e2e.ti.com/support/processors/f/791/p/944601/3495654#3495654

    Pls, provide output for "cat /sys/kernel/debug/gpio"

    Few options to try:

    1) reduce MDIO freq- add "bus_freq = <20000>;" to "davinci_mdio" node

    2) remove "reset-gpio" and use gpio-hog instead. add to the board file:

    &gpio7 {

      p5 {
       gpio-hog;
       gpios = <5 GPIO_ACTIVE_LOW>;
       line-name = "PHY1 reset";
       output-low;
      };

      p6 {
        gpio-hog;
        gpios = <6 GPIO_ACTIVE_LOW>;
        line-name = "PHY2 reset";
        output-low;
      };

    };

  • Hi grygorii,

    0x4A00363C - mdio_d is used for uart3_ctsn so its will be muxed to 0x00090001

    0x4A003640 - mdio_clk is used for uart3_rtsc so it will be muxed to 0x000D0001

    Used the dts as suggested

    root@am57xx-hs-evm:~# cat /sys/kernel/debug/gpio
    gpiochip0: GPIOs 0-31, parent: platform/48053000.gpio, gpio-0-31:

    gpiochip1: GPIOs 32-63, parent: platform/4ae10000.gpio, gpio-32-63:

    gpiochip2: GPIOs 64-95, parent: platform/48055000.gpio, gpio-64-95:

    gpiochip3: GPIOs 96-127, parent: platform/48057000.gpio, gpio-96-127:

    gpiochip4: GPIOs 128-159, parent: platform/48059000.gpio, gpio-128-159:

    gpiochip5: GPIOs 160-191, parent: platform/4805b000.gpio, gpio-160-191:

    gpiochip6: GPIOs 192-223, parent: platform/4805d000.gpio, gpio-192-223:
     gpio-219 (                    |cd                  ) in  lo IRQ

    gpiochip7: GPIOs 224-255, parent: platform/48051000.gpio, gpio-224-255:

    1. reduced the bus frequency - 20000

    dmesg log as follow -

    root@am57xx-hs-evm:~# dmesg | grep mdio
    [    0.621729] mdio_bus fixed-0: GPIO lookup for consumer reset idx 0
    [    0.621737] mdio_bus fixed-0: using lookup tables for GPIO lookup
    [    0.621745] mdio_bus fixed-0: No GPIO consumer reset found
    [    0.626555] mdio_bus 48485000.mdio: GPIO lookup for consumer reset idx 0
    [    0.626563] mdio_bus 48485000.mdio: using device tree for GPIO lookup
    [    0.626581] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/ethernet@48484000/mdio@48485000[0]'
    [    0.626596] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/ethernet@48484000/mdio@48485000[0]'
    [    0.626605] mdio_bus 48485000.mdio: using lookup tables for GPIO lookup
    [    0.626613] mdio_bus 48485000.mdio: No GPIO consumer reset found
    [    0.711842] davinci_mdio 48485000.mdio: davinci mdio revision 1.6, bus freq 20000
    [    0.711854] libphy: 48485000.mdio: probed
    [    0.711872] ***************** davinci_mdio_read
    [    0.711879] ***************** davinci_mdio_read start ret 0x80400000 phyid 0x0 phyreg 0x2
    [    0.749273] ***************** davinci_mdio_read end 0x40FFFF
    [    0.749284] mdio_bus 48485000.mdio: MDIO device at address 0 is missing.
    [    0.756046] ***************** davinci_mdio_read
    [    0.756053] ***************** davinci_mdio_read start ret 0x80410000 phyid 0x1 phyreg 0x2
    [    0.801333] ***************** davinci_mdio_read end 0x41FFFF
    [    0.801343] mdio_bus 48485000.mdio: MDIO device at address 1 is missing.
    [    4.615173] net eth0: phy "/ocp/ethernet@48484000/mdio@48485000/ethernet-phy@0" not found on slave 0
    [    4.865345] net eth1: phy "/ocp/ethernet@48484000/mdio@48485000/ethernet-phy@1" not found on slave 1

    2. removed reset and added gpio hog

    this worked. able to probe micrel and ping is working.

    Thank you for the help.

    regards,

    Sriraksha