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.

AM3352: Only using emac1 (second mii port) - any examples?

Part Number: AM3352
Other Parts Discussed in Thread: TPS65217

Hi,

I have a new design that needed the pin functions that where available on mii1, but only one ethernet, so I decided to use mii2 instead.

However, I struggle to get it working properly.

It kind of looks to be working if with these settings & configuring the phy with address 1 (hardware); (if I comment away cpsw_emac0, it just gets worse)

&cpsw_emac0 {
    phy-handle = <&ethphy0>;
    phy-mode = "mii";
};

&cpsw_emac1 {
    phy-handle = <&ethphy1>;
    phy-mode = "mii";
};

&mac {
    slaves = <2>;
    active_slave = <1>;
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&cpsw_default>;
    pinctrl-1 = <&cpsw_sleep>;
    status = "okay";
};

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

    ethphy0: ethernet-phy@0 { // phy address is 0
        reg = <0>;
    };
    ethphy1: ethernet-phy@1 { // phy address is 1
        reg = <1>;
    };

};

Boot log then gives me;

[    9.846308] libphy: Fixed MDIO Bus: probed
[    9.975304] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
[    9.983611] libphy: 4a101000.mdio: probed
[    9.988393] mdio_bus 4a101000.mdio: MDIO device at address 0 is missing.
[   10.016097] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver unknown
[   10.027407] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
[   10.034132] cpsw 4a100000.ethernet: ALE Table size 1024
[   10.045542] cpsw 4a100000.ethernet: Detected MACID = 14:42:fc:12:54:c1

..

udhcpc: started, v1.31.1
[   55.194464] cpsw 4a100000.ethernet: initializing cpsw version 1.12 (0)
[   55.203995] cpsw 4a100000.ethernet: phy "/ocp/interconnect@4a000000/segment@0/target-module@100000/ethernet@0/mdio@1000/ethernet-phy@0" not found on slave 0
[   55.242626] Generic PHY 4a101000.mdio:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=4a101000.mdio:01, irq=POLL)
udhcpc: sending discover
[   55.536193] IPv6: ADDRCONF(NETDEV_CHANGE): can1: link becomes ready
udhcpc: sending discover
[   58.417010] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[   58.426268] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
udhcpc: sending discover
udhcpc: no lease, failing
ifup: failed to bring up eth0

If I then configure the interface with ipconfig x.x.x.x netmask y.y.y.y the interface works.

But I don't think this is proper - the errors about not finding phy0 shouldn't be there, should they? I have tried so many combinations now, that I might be ready for the doctors Open mouth

Is there anything obviously wrong in my set-up or does anyone know of a similar example? (I'm on kernel 5.9.16)

  • Hi,

    The key step is the active_flag=1 which you have set. The cpsw0 and the PHY0 nodes should not be needed as you point out. What is the TI SDK and the kernel version that you are using?  Is this a new board design?

    Best Regards,

    Schuyler

  • Hi Schuyler,

    So, yes, active_flag=1 made a difference, but also the phy has to have (HW) address 1. I started out with phy address 0, but then it is picked up by the wrong mac and however I tried it wanted phy address 1.

    According to the 9 old post there's some 

    Yes, this is a new board design (my third on this cpu type), and I'm using kernel 5.9.16 on a yocto build system defirved from beagle bone. The cpsw.c is identical to main line linux tree, and a little bit different from the l07.03.00.005 but not (afaict) with regard to the phy setup. 

    I _think_ I have the same issue as this; https://e2e.ti.com/support/processors-group/processors/f/processors-forum/426405/am3352-using-emac1-0x4a100300-as-default-and-only-eth0-device-in-linux

    But the code has changed rather much during the 6 years, so I was hoping maybe the issue where fixed, or if someone  has a fix for a more recent kernel.

    Thanks,

      Micael

  • Hi,

    I mis-typed the earlier post in that the cpsw0 and phy0 should not be needed, I corrected the earlier post. As per your observation of the message regarding the missing PHY0 on the MDIO bus.

    Ideally if possible it would be better at least for debug purposes if you would be using either 5.4 or the more recent release of the SDK.  But we can work with the current kernel for the moment.

    Could you please attach a boot log with both the phy0 and cpsw0 nodes fully commented out or removed from the DTS file. To confirm your setup there is only 1 phy at address 1 and attached to the second port, is that correct?

    Please also attach the ethtool eth0 and ethtool -S eth0. Please note that after you comment the cpsw0 node, cpsw1 will show up as eth0 when performing the  ifconfig command.

    Best Regards,

    Schuyler

  • Hi,

    Yes, there's only one phy (address 1 now) connected to the second port. The first port is pinmuxed to other stuff.

    Infact, with addrses 1 of the phy, commenting away both phy0 and cpsw0 also works, but with errors. I think I must not have tested this combo after changing the hw address of the phy.

    Heres's the boot log;

    Starting kernel ...

    [ 0.000000] Booting Linux on physical CPU 0x0
    [ 0.000000] Linux version 5.9.16-jumpnow (oe-user@oe-host) (arm-poky-linux-gnueabi-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 Mon Dec 20
    [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [ 0.000000] OF: fdt: Machine model: Voltum V001
    [ 0.000000] Memory policy: Data cache writeback
    [ 0.000000] cma: Reserved 16 MiB at 0x8e800000
    [ 0.000000] Zone ranges:
    [ 0.000000] Normal [mem 0x0000000080000000-0x000000008fefffff]
    [ 0.000000] HighMem empty
    [ 0.000000] Movable zone start for each node
    [ 0.000000] Early memory node ranges
    [ 0.000000] node 0: [mem 0x0000000080000000-0x000000008fefffff]
    [ 0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x000000008fefffff]
    [ 0.000000] CPU: All CPU(s) started in SVC mode.
    [ 0.000000] AM335X ES2.1 (neon)
    [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 64770
    [ 0.000000] Kernel command line: console=ttyO0,115200n8 consoleblank=0 root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait
    [ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
    [ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
    [ 0.000000] mem auto-init: stack:off, heap alloc:on, heap free:off
    [ 0.000000] Memory: 223672K/261120K available (7168K kernel code, 605K rwdata, 2704K rodata, 1024K init, 6593K bss, 21064K reserved, 16384K cma-reserve)
    [ 0.000000] random: get_random_u32 called from __kmem_cache_create+0x28/0x67c with crng_init=0
    [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [ 0.000000] Running RCU self tests
    [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    [ 0.000000] IRQ: Found an INTC at 0x(ptrval) (revision 5.0) with 128 interrupts
    [ 0.000000] TI gptimer clocksource: always-on /ocp/interconnect@44c00000/segment@200000/target-module@31000
    [ 0.000016] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [ 0.000052] clocksource: dmtimer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [ 0.001061] TI gptimer clockevent: 24000000 Hz at /ocp/interconnect@48000000/segment@0/target-module@40000
    [ 0.003211] Console: colour dummy device 80x30
    [ 0.003297] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
    [ 0.003325] ... MAX_LOCKDEP_SUBCLASSES: 8
    [ 0.003350] ... MAX_LOCK_DEPTH: 48
    [ 0.003374] ... MAX_LOCKDEP_KEYS: 8192
    [ 0.003398] ... CLASSHASH_SIZE: 4096
    [ 0.003422] ... MAX_LOCKDEP_ENTRIES: 32768
    [ 0.003445] ... MAX_LOCKDEP_CHAINS: 65536
    [ 0.003469] ... CHAINHASH_SIZE: 32768
    [ 0.003493] memory used by lock dependency info: 4061 kB
    [ 0.003517] memory used for stack traces: 2112 kB
    [ 0.003542] per task-struct memory footprint: 1536 bytes
    [ 0.003786] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
    [ 0.101235] pid_max: default: 32768 minimum: 301
    [ 0.102092] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
    [ 0.102135] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
    [ 0.106814] CPU: Testing write buffer coherency: ok
    [ 0.107144] CPU0: Spectre v2: using BPIALL workaround
    [ 0.110349] Setting up static identity map for 0x80100000 - 0x80100060
    [ 0.114090] devtmpfs: initialized
    [ 0.197188] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [ 0.198606] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [ 0.198745] futex hash table entries: 256 (order: 1, 12288 bytes, linear)
    [ 0.200758] pinctrl core: initialized pinctrl subsystem
    [ 0.208669] NET: Registered protocol family 16
    [ 0.221314] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [ 0.283011] l3-aon-clkctrl:0000:0: failed to disable
    [ 0.290717] thermal_sys: Registered thermal governor 'fair_share'
    [ 0.290737] thermal_sys: Registered thermal governor 'step_wise'
    [ 0.290793] thermal_sys: Registered thermal governor 'user_space'
    [ 0.291598] cpuidle: using governor ladder
    [ 0.291748] cpuidle: using governor menu
    [ 2.571574] random: fast init done
    [ 4.759926] hw-breakpoint: debug architecture 0x4 unsupported.
    [ 5.100619] usbcore: registered new interface driver usbfs
    [ 5.101059] usbcore: registered new interface driver hub
    [ 5.101499] usbcore: registered new device driver usb
    [ 5.105134] Advanced Linux Sound Architecture Driver Initialized.
    [ 5.149080] clocksource: Switched to clocksource dmtimer
    [ 5.816643] NET: Registered protocol family 2
    [ 5.820240] tcp_listen_portaddr_hash hash table entries: 128 (order: 0, 5632 bytes, linear)
    [ 5.820401] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
    [ 5.820636] TCP bind hash table entries: 2048 (order: 4, 81920 bytes, linear)
    [ 5.821140] TCP: Hash tables configured (established 2048 bind 2048)
    [ 5.821733] UDP hash table entries: 256 (order: 2, 24576 bytes, linear)
    [ 5.821961] UDP-Lite hash table entries: 256 (order: 2, 24576 bytes, linear)
    [ 5.822689] NET: Registered protocol family 1
    [ 5.831403] RPC: Registered named UNIX socket transport module.
    [ 5.831552] RPC: Registered udp transport module.
    [ 5.831591] RPC: Registered tcp transport module.
    [ 5.831629] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [ 5.834698] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [ 5.852109] Initialise system trusted keyrings
    [ 5.863959] workingset: timestamp_bits=30 max_order=16 bucket_order=0
    [ 6.082431] Key type asymmetric registered
    [ 6.082704] Asymmetric key parser 'x509' registered
    [ 6.082977] io scheduler mq-deadline registered
    [ 6.083024] io scheduler kyber registered
    [ 6.720311] gpiochip_add_data_with_key: GPIOs 0..31 (gpio-0-31) failed to register, -517
    [ 6.720418] omap_gpio 44e07000.gpio: Could not register gpio chip -517
    [ 7.807476] gpiochip_add_data_with_key: GPIOs 0..31 (gpio-0-31) failed to register, -517
    [ 7.807566] omap_gpio 4804c000.gpio: Could not register gpio chip -517
    [ 8.108381] gpiochip_add_data_with_key: GPIOs 0..31 (gpio-0-31) failed to register, -517
    [ 8.108462] omap_gpio 481ac000.gpio: Could not register gpio chip -517
    [ 8.156529] gpiochip_add_data_with_key: GPIOs 0..31 (gpio-0-31) failed to register, -517
    [ 8.156603] omap_gpio 481ae000.gpio: Could not register gpio chip -517
    [ 8.436608] debugfs: Directory '49000000.dma' with parent 'dmaengine' already present!
    [ 8.436897] edma 49000000.dma: TI EDMA DMA engine driver
    [ 8.847850] pinctrl-single 44e10800.pinmux: 142 pins, size 568
    [ 8.881843] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
    [ 8.902476] omap_uart 44e09000.serial: no wakeirq for uart0
    [ 8.904981] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 20, base_baud = 3000000) is a OMAP UART0
    [ 9.580931] printk: console [ttyO0] enabled
    [ 9.589924] omap_uart 48022000.serial: no wakeirq for uart1
    [ 9.597555] 48022000.serial: ttyO1 at MMIO 0x48022000 (irq = 26, base_baud = 3000000) is a OMAP UART1
    [ 9.617716] omap_uart 48024000.serial: no wakeirq for uart2
    [ 9.625526] 48024000.serial: ttyO2 at MMIO 0x48024000 (irq = 27, base_baud = 3000000) is a OMAP UART2
    [ 9.645932] omap_uart 481a6000.serial: no wakeirq for uart3
    [ 9.653739] 481a6000.serial: ttyO3 at MMIO 0x481a6000 (irq = 39, base_baud = 3000000) is a OMAP UART3
    [ 9.683406] omap_rng 48310000.rng: Random Number Generator ver. 20
    [ 9.693349] random: crng init done
    [ 9.700375] loop: module loaded
    [ 9.708977] mtdoops: mtd device (mtddev=name/number) must be supplied
    [ 9.722023] libphy: Fixed MDIO Bus: probed
    [ 9.728554] CAN device driver interface
    [ 9.738655] c_can_platform 481cc000.can: c_can_platform device registered (regs=5da69abf, irq=42)
    [ 9.752641] c_can_platform 481d0000.can: c_can_platform device registered (regs=d131a1c6, irq=43)
    [ 9.849190] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
    [ 9.857500] libphy: 4a101000.mdio: probed
    [ 9.885543] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver Micrel KSZ8081 or KSZ8091
    [ 9.897904] cpsw 4a100000.ethernet: No slave[0] phy_id, phy-handle, or fixed-link property
    [ 9.907492] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
    [ 9.914291] cpsw 4a100000.ethernet: ALE Table size 1024
    [ 9.925417] cpsw 4a100000.ethernet: Detected MACID = 14:42:fc:12:54:c1
    [ 9.944432] am335x-phy-driver 47401300.usb-phy: supply vcc not found, using dummy regulator
    [ 9.976996] am335x-phy-driver 47401b00.usb-phy: supply vcc not found, using dummy regulator
    [ 9.994849] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [ 10.001897] ehci-omap: OMAP-EHCI Host Controller driver
    [ 10.008797] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
    [ 10.015851] usbcore: registered new interface driver cdc_wdm
    [ 10.022189] usbcore: registered new interface driver usbtest
    [ 10.042228] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    [ 10.049392] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
    [ 10.063319] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.09
    [ 10.072380] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 10.080142] usb usb1: Product: MUSB HDRC host driver
    [ 10.085395] usb usb1: Manufacturer: Linux 5.9.16-jumpnow musb-hcd
    [ 10.091896] usb usb1: SerialNumber: musb-hdrc.1
    [ 10.104401] hub 1-0:1.0: USB hub found
    [ 10.111308] hub 1-0:1.0: 1 port detected
    [ 10.136399] mousedev: PS/2 mouse device common for all mice
    [ 10.163400] omap_rtc 44e3e000.rtc: registered as rtc0
    [ 10.168869] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01T00:00:00 UTC (946684800)
    [ 10.180961] i2c /dev entries driver
    [ 10.201936] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [ 10.213661] cpu cpu0: OPP-v2 not supported, cpufreq-dt will attempt to use legacy tables.
    [ 10.226797] sdhci: Secure Digital Host Controller Interface driver
    [ 10.233477] sdhci: Copyright(c) Pierre Ossman
    [ 10.238083] sdhci-pltfm: SDHCI platform and OF driver helper
    [ 10.268883] ledtrig-cpu: registered to indicate activity on CPUs
    [ 10.282495] usbcore: registered new interface driver usbhid
    [ 10.288402] usbhid: USB HID core driver
    [ 10.318705] davinci-mcasp 48038000.mcasp: IRQ common not found
    [ 10.339298] Initializing XFRM netlink socket
    [ 10.344118] NET: Registered protocol family 17
    [ 10.348887] can: controller area network core (rev 20170425 abi 9)
    [ 10.356370] NET: Registered protocol family 29
    [ 10.361182] can: raw protocol (rev 20170425)
    [ 10.365897] can: broadcast manager protocol (rev 20170425 t)
    [ 10.372078] Key type dns_resolver registered
    [ 10.378587] oprofile: using arm/armv7
    [ 10.382777] ThumbEE CPU extension supported.
    [ 10.387306] omap_voltage_late_init: Voltage driver support not added
    [ 10.403986] Loading compiled-in X.509 certificates
    [ 10.537234] OMAP GPIO hardware version 0.1
    [ 10.602272] tps65217-pmic: Failed to locate of_node [id: -1]
    [ 10.671707] tps65217-bl: Failed to locate of_node [id: -1]
    [ 10.683823] tps65217 0-0024: TPS65217 ID 0xf version 1.2
    [ 10.691548] at24 0-0050: supply vcc not found, using dummy regulator
    [ 10.704020] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
    [ 10.712062] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [ 10.867146] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
    [ 10.966148] omap_reset_deassert: timedout waiting for gfx:0
    [ 10.991707] ti-sysc: probe of 5600fe00.target-module failed with error -110
    [ 11.023281] omap_gpio 481ac000.gpio: Could not set line 3 debounce to 200000 microseconds (-22)
    [ 11.032617] sdhci-omap 48060000.mmc: Got CD GPIO
    [ 11.174265] mmc0: SDHCI controller on 48060000.mmc [48060000.mmc] using External DMA
    [ 11.297220] mmc0: new high speed SDHC card at address aaaa
    [ 11.319713] mmcblk0: mmc0:aaaa SL08G 7.40 GiB
    [ 11.375049] mmcblk0: p1 p2
    [ 11.428385] ALSA device list:
    [ 11.431751] #0: Voltum Bus Audio
    [ 11.577909] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [ 11.587167] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
    [ 11.614312] devtmpfs: mounted
    [ 11.620976] Freeing unused kernel memory: 1024K
    [ 11.627780] Run /sbin/init as init process
    INIT: version 2.96 booting
    Starting udev
    [ 18.847149] udevd[1073]: starting version 3.2.9
    [ 19.682116] udevd[1074]: starting eudev-3.2.9
    [ 49.680280] irq 60: nobody cared (try booting with the "irqpoll" option)
    [ 49.687386] CPU: 0 PID: 956 Comm: irq/60-tps65217 Not tainted 5.9.16-jumpnow #1
    [ 49.695085] Hardware name: Generic AM33XX (Flattened Device Tree)
    [ 49.701554] [<c010d610>] (unwind_backtrace) from [<c010b48c>] (show_stack+0x10/0x14)
    [ 49.709732] [<c010b48c>] (show_stack) from [<c07eafd0>] (__report_bad_irq+0x3c/0xc0)
    [ 49.717912] [<c07eafd0>] (__report_bad_irq) from [<c0189ab0>] (note_interrupt+0x24c/0x298)
    [ 49.726629] [<c0189ab0>] (note_interrupt) from [<c0186c9c>] (handle_irq_event_percpu+0x84/0x8c)
    [ 49.735794] [<c0186c9c>] (handle_irq_event_percpu) from [<c0186cdc>] (handle_irq_event+0x38/0x5c)
    [ 49.745143] [<c0186cdc>] (handle_irq_event) from [<c018a668>] (handle_level_irq+0xac/0x130)
    [ 49.753945] [<c018a668>] (handle_level_irq) from [<c0185c50>] (generic_handle_irq+0x34/0x44)
    [ 49.762836] [<c0185c50>] (generic_handle_irq) from [<c0186288>] (__handle_domain_irq+0x54/0xa4)
    [ 49.772003] [<c0186288>] (__handle_domain_irq) from [<c0100af0>] (__irq_svc+0x70/0x98)
    [ 49.780340] Exception stack(0xce523ed8 to 0xce523f20)
    [ 49.785670] 3ec0: ffffffff ffffffff
    [ 49.794289] 3ee0: 00000001 ce523f28 ce2bde60 ce2a9c00 ce2bde60 ce2bde10 c0187704 ffffe000
    [ 49.802907] 3f00: ce0b3b2c ce2bfe44 00000000 ce523f28 c07fb040 c07fb048 600f0113 ffffffff
    [ 49.811540] [<c0100af0>] (__irq_svc) from [<c07fb048>] (_raw_spin_unlock_irq+0x28/0x40)
    [ 49.819979] [<c07fb048>] (_raw_spin_unlock_irq) from [<c018761c>] (irq_finalize_oneshot.part.0+0x84/0xd4)
    [ 49.830059] [<c018761c>] (irq_finalize_oneshot.part.0) from [<c0187774>] (irq_thread_fn+0x70/0x78)
    [ 49.839498] [<c0187774>] (irq_thread_fn) from [<c018799c>] (irq_thread+0x110/0x1dc)
    [ 49.847576] [<c018799c>] (irq_thread) from [<c0151a64>] (kthread+0x120/0x14c)
    [ 49.855101] [<c0151a64>] (kthread) from [<c0100114>] (ret_from_fork+0x14/0x20)
    [ 49.862708] Exception stack(0xce523fb0 to 0xce523ff8)
    [ 49.868037] 3fa0: 00000000 00000000 00000000 00000000
    [ 49.876653] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    [ 49.885266] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
    [ 49.892232] handlers:
    [ 49.894755] [<52a5ecdb>] irq_default_primary_handler threaded [<ac3eb724>] tps65217_irq_thread
    [ 49.904112] Disabling IRQ #60
    [ 50.295171] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
    [ 50.375139] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
    [ 50.446678] omap-aes 53500000.aes: will run requests pump with realtime priority
    [ 51.304116] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
    Fri Mar 9 12:34:56 UTC 2018
    Starting firewall
    [ 54.511868] NET: Registered protocol family 10
    [ 54.524247] Segment Routing with IPv6
    INIT: Entering runlevel: 5
    Configuring network interfaces... [ 55.988990] c_can_platform 481cc000.can can0: setting BTR=1c0b BRPE=0000
    [ 55.997961] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready
    [ 56.313395] c_can_platform 481d0000.can can1: setting BTR=1c0b BRPE=0000
    udhcpc: started, v1.31.1
    [ 56.764542] cpsw 4a100000.ethernet: initializing cpsw version 1.12 (0)
    [ 56.773801] libphy: PHY not found
    [ 56.777432] cpsw 4a100000.ethernet: phy "" not found on slave 0, err -19
    [ 56.806772] Micrel KSZ8081 or KSZ8091 4a101000.mdio:01: attached PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=4a101000.mdio:01, irq=POLL)
    udhcpc: sending discover
    [ 57.059979] IPv6: ADDRCONF(NETDEV_CHANGE): can1: link becomes ready
    udhcpc: sending discover
    [ 59.940791] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    [ 59.949893] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    udhcpc: sending discover
    udhcpc: sending select for 10.1.200.77
    udhcpc: lease of 10.1.200.77 obtained, lease time 43200
    /etc/udhcpc.d/50default: Adding DNS 10.1.200.1
    done.
    Starting OpenBSD Secure Shell server: sshd
    generating ssh RSA host key...
    generating ssh ECDSA host key...
    generating ssh ED25519 host key...
    done.
    Starting ntpd: done
    Starting syslogd/klogd: done
    Starting Mosquitto message broker mosquitto

    (I have some issue with irq60 that seems to be related to the pmic, currently trying to chase that one down)

    # ethtool eth0
    Settings for eth0:
    Supported ports: [ TP MII ]
    Supported link modes: 10baseT/Half 10baseT/Full
    100baseT/Half 100baseT/Full
    Supported pause frame use: Symmetric Receive-only
    Supports auto-negotiation: Yes
    Supported FEC modes: Not reported
    Advertised link modes: 10baseT/Half 10baseT/Full
    100baseT/Half 100baseT/Full
    Advertised pause frame use: No
    Advertised auto-negotiation: Yes
    Advertised FEC modes: Not reported
    Link partner advertised link modes: 10baseT/Half 10baseT/Full
    100baseT/Half 100baseT/Full
    Link partner advertised pause frame use: Symmetric
    Link partner advertised auto-negotiation: Yes
    Link partner advertised FEC modes: Not reported
    Speed: 100Mb/s
    Duplex: Full
    Port: MII
    PHYAD: 1
    Transceiver: internal
    Auto-negotiation: on
    Supports Wake-on: d
    Wake-on: d
    Current message level: 0x00000000 (0)

    Link detected: yes

    # ethtool -S eth0
    NIC statistics:
    Good Rx Frames: 2447
    Broadcast Rx Frames: 1122
    Multicast Rx Frames: 1234
    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: 342817
    Good Tx Frames: 105
    Broadcast Tx Frames: 3
    Multicast Tx Frames: 18
    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: 9892
    Rx + Tx 64 Octet Frames: 1235
    Rx + Tx 65-127 Octet Frames: 548
    Rx + Tx 128-255 Octet Frames: 268
    Rx + Tx 256-511 Octet Frames: 466
    Rx + Tx 512-1023 Octet Frames: 35
    Rx + Tx 1024-Up Octet Frames: 0
    Net Octets: 352709
    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: 1359
    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: 1000
    Rx DMA chan 0: good_dequeue: 1232
    Rx DMA chan 0: requeue: 0
    Rx DMA chan 0: teardown_dequeue: 0
    Tx DMA chan 0: head_enqueue: 105
    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: 11
    Tx DMA chan 0: empty_dequeue: 105
    Tx DMA chan 0: busy_dequeue: 0
    Tx DMA chan 0: good_dequeue: 105
    Tx DMA chan 0: requeue: 0
    Tx DMA chan 0: teardown_dequeue: 0

    Note, I still have 

    cpsw_emac0: slave@200 {
    /* Filled in by U-Boot */
    mac-address = [ 00 00 00 00 00 00 ];
    phys = <&phy_gmii_sel 1 1>;
    };

    from the included am33xx-l4.dtsi file. 

    If I would still have phy address 0, this would not have worked, and I am not sure if I like the errors, but it seems to work, and there's fewer of the errors, so maybe I should accept this?

    Thanks,

     Micael

  • Hi,

    This message seems to be indicating an issue but the interface is coming up so perhaps it is ok. 

    cpsw 4a100000.ethernet: phy "" not found on slave 0, err -19

    There are not any errors reported in the mac statistics so the interface looks to be working correctly. 

    Best Regards,

    Schuyler

  • Hi,

    Yes, I think that the code in cpsw.c are not able to "jump over" the first slave, it tries to set it up always, and the second slave has to have a phy with address 1 or +1 of the first phy. Hopefully the boot errors is the only consequence, and nothing else. 

    Thanks,

      Micael