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.

AM3358: ethernet-phy@1" not found on slave 1

Part Number: AM3358
Other Parts Discussed in Thread: AM3352

Tool/software:

In a Custom [ref: am3358] board, for Linux kernel 6.1.33, facing issue in ethernet.

out of two ethernet ports one is working fine, and the other is not working.

The below are the dts changes 

dts changes are:

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

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

reset-gpios = <
&gpio2 2 GPIO_ACTIVE_LOW /* GPIO2_2 (ETH0_RESETn) */
&gpio2 3 GPIO_ACTIVE_LOW /* GPIO2_3 (ETH1_RESETn) */
>;
reset-delay-us = <30>; /* PHY datasheet states 25uS min */
ethernetphy0: ethernet-phy@0 {
// compatible = "ethernet-phy-id2000.a140", "ethernet-phy-ieee802.3-c22", "ethernet-phy-ieee802.3-c45";
reg = <0>;
/* Commenting to resolve kernel panic
interrupt-parent = <&gpio2>;
interrupts = <6 IRQ_TYPE_EDGE_FALLING>; */
};
ethernetphy1: ethernet-phy@1 {
// compatible = "ethernet-phy-id2000.a140", "ethernet-phy-ieee802.3-c22", "ethernet-phy-ieee802.3-c45";
reg = <1>;
/* Commenting to resolve kernel panic
interrupt-parent = <&gpio2>;
interrupts = <7 IRQ_TYPE_EDGE_FALLING>; */
};
};

/* ETH0 */
&cpsw_port1 {
phy-mode = "rmii";
phy_id = <&davinci_mdio_sw>, <0>;
phy-handle = <&ethernetphy0>;
status = "okay";
};

/* ETH1 */
&cpsw_port2 {
phy-mode = "rmii";
phy_id = <&davinci_mdio_sw>, <1>;
phy-handle = <&ethernetphy1>;
status = "okay";
};

Kernel Log:

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 6.1.33-g40c32565ca (oe-user@oe-host) (arm-oe-linux-gnueabi-gcc (GCC) 11.3.0, GNU ld (GNU Binutils) 2.38.20220708) #1 SMP Thu Jul  6 14:17:24 3
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: TI AM335x 6_10
[    0.000000] Memory policy: Data cache writeback
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 64 MiB at 0x88800000
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000080000000-0x000000008fdfffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080000000-0x000000008fdfffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x000000008fdfffff]
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] AM335X ES2.1 (neon)
[    0.000000] percpu: Embedded 16 pages/cpu s33748 r8192 d23596 u65536
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64516
[    0.000000] Kernel command line: console=ttyO0,115200n8 root=PARTUUID=a946079f-02 rw rootflags=data=ordered,journal_checksum,commit=1,discard 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:off, heap free:off
[    0.000000] Memory: 172576K/260096K available (12288K kernel code, 1465K rwdata, 3100K rodata, 1024K init, 309K bss, 21984K reserved, 65536K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] trace event string verifier disabled
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=16 to nr_cpu_ids=1.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    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] IRQ: Found an INTC at 0x(ptrval) (revision 5.0) with 128 interrupts
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] TI gptimer clocksource: always-on /ocp/interconnect@44c00000/segment@200000/target-module@31000
[    0.000003] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000034] clocksource: dmtimer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000665] TI gptimer clockevent: 24000000 Hz at /ocp/interconnect@48000000/segment@0/target-module@40000
[    0.003425] Console: colour dummy device 80x30
[    0.003480] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
[    0.003491] This ensures that you still see kernel messages. Please
[    0.003498] update your kernel commandline.
[    0.003549] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
[    0.120790] pid_max: default: 32768 minimum: 301
[    0.121050] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.121075] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.122033] CPU: Testing write buffer coherency: ok
[    0.122112] CPU0: Spectre v2: using BPIALL workaround
[    0.122598] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.123879] Setting up static identity map for 0x80100000 - 0x80100060
[    0.124166] rcu: Hierarchical SRCU implementation.
[    0.124176] rcu:     Max phase no-delay instances is 1000.
[    0.127014] EFI services will not be available.
[    0.127405] smp: Bringing up secondary CPUs ...
[    0.127418] smp: Brought up 1 node, 1 CPU
[    0.127432] SMP: Total of 1 processors activated (597.60 BogoMIPS).
[    0.127447] CPU: All CPU(s) started in SVC mode.
[    0.128281] devtmpfs: initialized
[    0.150658] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.151157] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.151197] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.157368] pinctrl core: initialized pinctrl subsystem
[    0.158832] DMI not present or invalid.
[    0.159910] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.163726] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.165418] thermal_sys: Registered thermal governor 'step_wise'
[    0.165588] cpuidle: using governor menu
[    0.190680] No ATAGs?
[    0.190706] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.194009] Serial: AMBA PL011 UART driver
[    2.053449] SCSI subsystem initialized
[    2.054441] usbcore: registered new interface driver usbfs
[    2.054515] usbcore: registered new interface driver hub
[    2.054582] usbcore: registered new device driver usb
[    2.055255] pps_core: LinuxPPS API ver. 1 registered
[    2.055269] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    2.055301] PTP clock support registered
[    2.055504] EDAC MC: Ver: 3.0.0
[    2.059197] clocksource: Switched to clocksource dmtimer
[    2.142751] NET: Registered PF_INET protocol family
[    2.143135] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    2.144409] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    2.144461] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    2.144484] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    2.144531] TCP bind hash table entries: 2048 (order: 3, 32768 bytes, linear)
[    2.144619] TCP: Hash tables configured (established 2048 bind 2048)
[    2.144746] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    2.144784] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    2.144993] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    2.146131] RPC: Registered named UNIX socket transport module.
[    2.146151] RPC: Registered udp transport module.
[    2.146159] RPC: Registered tcp transport module.
[    2.146165] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.146183] PCI: CLS 0 bytes, default 64
[    2.147867] Initialise system trusted keyrings
[    2.148750] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    2.157681] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.159000] NFS: Registering the id_resolver key type
[    2.159078] Key type id_resolver registered
[    2.159088] Key type id_legacy registered
[    2.159403] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    2.159423] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    2.159483] ntfs: driver 2.1.32 [Flags: R/O].
[    2.160364] Key type asymmetric registered
[    2.160383] Asymmetric key parser 'x509' registered
[    2.160621] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    2.160638] io scheduler mq-deadline registered
[    2.160649] io scheduler kyber registered
[    2.252982] Serial: 8250/16550 driver, 5 ports, IRQ sharing enabled
[    2.256480] STMicroelectronics ASC driver initialized
[    2.274966] brd: module loaded
[    2.284108] loop: module loaded
[    2.292494] CAN device driver interface
[    2.293045] e1000e: Intel(R) PRO/1000 Network Driver
[    2.293054] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    2.293164] igb: Intel(R) Gigabit Ethernet Network Driver
[    2.293173] igb: Copyright (c) 2007-2014 Intel Corporation.
[    2.294408] pegasus: Pegasus/Pegasus II USB Ethernet driver
[    2.294482] usbcore: registered new interface driver pegasus
[    2.294553] usbcore: registered new interface driver asix
[    2.294607] usbcore: registered new interface driver ax88179_178a
[    2.294669] usbcore: registered new interface driver cdc_ether
[    2.294742] usbcore: registered new interface driver smsc75xx
[    2.294822] usbcore: registered new interface driver smsc95xx
[    2.294875] usbcore: registered new interface driver net1080
[    2.294927] usbcore: registered new interface driver cdc_subset
[    2.294976] usbcore: registered new interface driver zaurus
[    2.295080] usbcore: registered new interface driver cdc_ncm
[    2.296168] usbcore: registered new interface driver usb-storage
[    2.297386] i2c_dev: i2c /dev entries driver
[    2.300651] cpuidle: enable-method property 'ti,am3352' found operations
[    2.301578] sdhci: Secure Digital Host Controller Interface driver
[    2.301591] sdhci: Copyright(c) Pierre Ossman
[    2.301833] Synopsys Designware Multimedia Card Interface Driver
[    2.302098] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.303010] ledtrig-cpu: registered to indicate activity on CPUs
[    2.303623] usbcore: registered new interface driver usbhid
[    2.303638] usbhid: USB HID core driver
[    2.307938] NET: Registered PF_INET6 protocol family
[    2.310188] Segment Routing with IPv6
[    2.310276] In-situ OAM (IOAM) with IPv6
[    2.310499] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.311592] NET: Registered PF_PACKET protocol family
[    2.311612] can: controller area network core
[    2.311715] NET: Registered PF_CAN protocol family
[    2.311730] can: raw protocol
[    2.311743] can: broadcast manager protocol
[    2.311761] can: netlink gateway - max_hops=1
[    2.312187] Key type dns_resolver registered
[    2.312378] ThumbEE CPU extension supported.
[    2.312401] Registering SWP/SWPB emulation handler
[    2.313019] omap_voltage_late_init: Voltage driver support not added
[    2.314500] Loading compiled-in X.509 certificates
[    2.349408] ti-sysc 44e07000.target-module: dts flag should be at module level for ti,no-reset-on-init
[    2.362560] pinctrl-single 44e10800.pinmux: 142 pins, size 568
[    2.369813] ti-sysc: probe of 44e31000.target-module failed with error -16
[    2.389882] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 400 kHz
[    2.396266] ti-sysc: probe of 48040000.target-module failed with error -16
[    2.412740] gpio gpiochip0: (gpio-0-31): not an immutable chip, please consider fixing it!
[    2.413685] OMAP GPIO hardware version 0.1
[    2.435447] gpio gpiochip1: (gpio-32-63): not an immutable chip, please consider fixing it!
[    2.438944] gpio gpiochip2: (gpio-64-95): not an immutable chip, please consider fixing it!
[    2.459804] omap_rng 48310000.rng: Random Number Generator ver. 20
[    2.470976] random: crng init done
[    2.529209] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
[    2.531934] mdio_bus 4a101000.mdio: MDIO device at address 1 is missing.
[    2.531967] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver TI DP83825S
[    2.532421] cpsw-switch 4a100000.switch: /ocp/interconnect@4a000000/segment@0/target-module@100000/switch@0/ethernet-ports/port@1 Missing dual_emac_res_vlan in DT.
[    2.532495] cpsw-switch 4a100000.switch: /ocp/interconnect@4a000000/segment@0/target-module@100000/switch@0/ethernet-ports/port@1 Using 1 as Reserved VLAN
[    2.532740] cpsw-switch 4a100000.switch: /ocp/interconnect@4a000000/segment@0/target-module@100000/switch@0/ethernet-ports/port@2 Missing dual_emac_res_vlan in DT.
[    2.532806] cpsw-switch 4a100000.switch: /ocp/interconnect@4a000000/segment@0/target-module@100000/switch@0/ethernet-ports/port@2 Using 2 as Reserved VLAN
[    2.532916] cpsw-switch 4a100000.switch: initialized cpsw ale version 1.4
[    2.532931] cpsw-switch 4a100000.switch: ALE Table size 1024
[    2.533074] cpsw-switch 4a100000.switch: cpts: overflow check period 500 (jiffies)
[    2.533096] cpsw-switch 4a100000.switch: CPTS: ref_clk_freq:250000000 calc_mult:2147483648 calc_shift:29 error:0 nsec/sec
[    2.533188] cpsw-switch 4a100000.switch: Detected MACID = 38:0b:3c:95:ed:04
[    2.533269] cpsw-switch 4a100000.switch: Detected MACID = 38:0b:3c:95:ed:06
[    2.536899] cpsw-switch 4a100000.switch: initialized (regs 0x4a100000, pool size 256) hw_ver:0019010C 1.12 (0)
[    2.548051] debugfs: Directory '49000000.dma' with parent 'dmaengine' already present!
[    2.548097] edma 49000000.dma: TI EDMA DMA engine driver
[    2.588079] omap_reset_deassert: timedout waiting for gfx:0
[    2.588143] ti-sysc: probe of 5600fe00.target-module failed with error -110
[    2.592314] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[    2.596139] gpio gpiochip3: (gpio-96-127): not an immutable chip, please consider fixing it!
[    2.601387] l3-aon-clkctrl:0000:0: failed to disable
[    2.604442] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 34, base_baud = 3000000) is a 8250
[    3.747630] printk: console [ttyS0] enabled
[    3.819394] tps65910-rtc tps65910-rtc: registered as rtc0
[    3.827178] tps65910-rtc tps65910-rtc: setting system clock to 2000-01-01T00:00:00 UTC (946684800)
[    3.837957] at24 0-0051: supply vcc not found, using dummy regulator
[    3.845378] at24 0-0051: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[    3.853436] pca953x 0-0022: supply vcc not found, using dummy regulator
[    3.860408] pca953x 0-0022: using AI
[    3.865874] at24 0-0050: supply vcc not found, using dummy regulator
[    3.873119] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[    3.880336] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    3.898464] sdhci-omap 481d8000.mmc: Got WP GPIO
[    3.903576] sdhci-omap 481d8000.mmc: supply pbias not found, using dummy regulator
[    3.916261] sdhci-omap 481d8000.mmc: supply vqmmc not found, using dummy regulator
[    3.924707] sdhci-omap 481d8000.mmc: using old ti,non-removable property
[    3.958811] mmc1: SDHCI controller on 481d8000.mmc [481d8000.mmc] using External DMA
[    3.967503] Waiting for root device PARTUUID=a946079f-02...
[    4.018919] mmc1: new high speed MMC card at address 0001
[    4.026551] mmcblk1: mmc1:0001 IS004G 3.64 GiB
[    4.036091]  mmcblk1: p1 p2 p3 p4
[    4.042595] mmcblk1boot0: mmc1:0001 IS004G 2.00 MiB
[    4.049902] mmcblk1boot1: mmc1:0001 IS004G 2.00 MiB
[    4.056830] mmcblk1rpmb: mmc1:0001 IS004G 512 KiB, chardev (243:0)
[    4.123714] EXT4-fs (mmcblk1p2): recovery complete
[    4.130594] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Quota mode: disabled.
[    4.139889] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    4.147465] devtmpfs: mounted
[    4.155826] Freeing unused kernel image (initmem) memory: 1024K
[    4.163996] Run /sbin/init as init process
INIT: version 3.01 booting
Starting udev
[    4.806696] udevd[102]: starting version 3.2.10
[    4.882336] udevd[103]: starting eudev-3.2.10
[   11.899837] EXT4-fs (mmcblk1p4): recovery complete
[   11.904728] EXT4-fs (mmcblk1p4): mounted filesystem with ordered data mode. Quota mode: disabled.
[   11.948012] ext3: Unknown parameter 'umask'
[   11.959492] EXT4-fs (mmcblk1p3): recovery complete
[   11.964384] EXT4-fs (mmcblk1p3): mounted filesystem with ordered data mode. Quota mode: disabled.
[   12.011616] ext2: Unknown parameter 'umask'
[   12.015928] ext4: Unknown parameter 'umask'
[   12.080542] squashfs: Unknown parameter 'umask'
[   12.121164] FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[   13.347948] EXT4-fs (mmcblk1p2): re-mounted. Quota mode: disabled.
[   13.531768] cryptodev: loading out-of-tree module taints kernel.
[   13.541981] cryptodev: driver 1.12 loaded.
Fri Mar  9 12:34:56 UTC 2018
INIT: Entering runlevel: 5
Configuring network interfaces... [   14.786140] cpsw-switch 4a100000.switch: starting ndev. mode: dual_mac
[   14.816746] TI DP83825S 4a101000.mdio:00: attached PHY driver (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
udhcpc: started, v1.35.0
udhcpc: broadcasting discover
[   16.890116] cpsw-switch 4a100000.switch eth0: Link is Up - 100Mbps/Full - flow control off
[   16.898645] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
udhcpc: broadcasting discover
udhcpc: broadcasting select for 192.168.1.12, server 192.168.1.3
udhcpc: lease of 192.168.1.12 obtained from 192.168.1.3, lease time 428157906
ifconfig: SIOCGIFFLAGS: No such device
ifconfig: SIOCSIFADDR: No such device
done.
Starting system message bus: dbus.
starting DNS forwarder and DHCP server: dnsmasq... done.
Starting HOSTAP Daemon: nl80211: 'nl80211' generic netlink not found
Failed to initialize driver 'nl80211'
wlan0: interface state UNINITIALIZED->DISABLED
wlan0: AP-DISABLED
wlan0: CTRL-EVENT-TERMINATING
hostapd_free_hapd_data: Interface wlan0 wasn't started
Starting syslogd/klogd: done
daemon not start due to lack of /dev/watchdog
Starting crond: OK
grep: /var/lib/opkg/info/*.control: No such file or directory

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

Arago Project am335x-alc /dev/ttyS0

Carrier Linux Reference Distrbution nodistro.0 am335x-alc /dev/ttyS0

am335x-alc login: root
root@am335x-alc:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 38:0B:3C:95:ED:04  
          inet addr:192.168.1.12  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::3a0b:3cff:fe95:ed04/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:822 (822.0 B)  TX bytes:1540 (1.5 KiB)

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

root@am335x-alc:~# ping 192.168.1.3
PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data.
64 bytes from 192.168.1.3: icmp_seq=1 ttl=64 time=0.405 ms
64 bytes from 192.168.1.3: icmp_seq=2 ttl=64 time=0.351 ms
^C
--- 192.168.1.3 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1020ms
rtt min/avg/max/mdev = 0.351/0.378/0.405/0.027 ms
root@am335x-alc:~# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 38:0B:3C:95:ED:04  
          inet addr:192.168.1.12  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::3a0b:3cff:fe95:ed04/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1154 (1.1 KiB)  TX bytes:1856 (1.8 KiB)

eth1      Link encap:Ethernet  HWaddr 38:0B:3C:95:ED:06  
          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)

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

sit0      Link encap:IPv6-in-IPv4  
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@am335x-alc:~# ifconfig eth1 192.168.1.5 up
[  141.867918] cpsw-switch 4a100000.switch: starting ndev. mode: dual_mac
[  141.892107] cpsw-switch 4a100000.switch: phy "/ocp/interconnect@4a000000/segment@0/target-module@100000/switch@0/mdio@1000/ethernet-phy@1" not found on slave 1
root@am335x-alc:~#
  • Hi,

    The MDIO bus scan is not finding the PHY, in the boot log is this message. Some possibilities are the PHY is not in a good state or perhaps the address configuration on the PHY is not correct.

    [    2.531934] mdio_bus 4a101000.mdio: MDIO device at address 1 is missing.

    Best Regards,

    Schuyler

  • Hi thanks for the reply,

    It is working fine for 5.10 Linux kernel: only eth0 is listing out and ping happening from eth0 and eth1

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

    reset-gpios = <
    &gpio2 2 GPIO_ACTIVE_LOW /* GPIO2_2 (ETH0_RESETn) */
    &gpio2 3 GPIO_ACTIVE_LOW /* GPIO2_3 (ETH1_RESETn) */
    >;
    reset-delay-us = <30>; /* PHY datasheet states 25uS min */
    ethernetphy0: ethernet-phy@0 {
    reg = <0>;
    };
    ethernetphy1: ethernet-phy@1 {
    reg = <1>;
    };
    };

    /* ETH0 */
    &cpsw_emac0 {
    phy-mode = "rmii";
    phy_id = <&davinci_mdio>, <0>;
    phy-handle = <&ethernetphy0>;
    status = "okay";
    };

    /* ETH1 */
    &cpsw_emac1 {
    phy-mode = "rmii";
    phy_id = <&davinci_mdio>, <1>;
    phy-handle = <&ethernetphy1>;
    status = "okay";
    };

    But in 6.1.33 Linux kernel as I mentioned with above dts changes it is not working

    what changes do require for switch behavior in dts file.

    root@am335x-alc:~# ifconfig eth1 192.168.1.5 up
    [  141.867918] cpsw-switch 4a100000.switch: starting ndev. mode: dual_mac
    [  141.892107] cpsw-switch 4a100000.switch: phy "/ocp/interconnect@4a000000/segment@0/target-module@100000/switch@0/mdio@1000/ethernet-phy@1" not found on slave 1
    requirement is:
     configure eth0 and eth1, both connect to the switch, so from the rest of the processor it looks like there is only eth0