OpenWrt/LEDE Project

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category Kernel
  • Assigned To No-one
  • Operating System All
  • Severity Medium
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Edmunt Pienkowsky - 11.10.2017
Last edited by Mathias Kresin - 27.10.2017

FS#1055 - Youku YK1: No ethernet devices

Device: Youku YK1

Software: SNAPSHOT, r5040-f98f83e

Steps to reproduce: Download image and install it. Because ethernet is dead I’ve created custom image with enabled WiFi in order to access device.

ip a:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
3: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 54:36:9b:0d:9f:69 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 fd92:c129:46b0::1/60 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::5636:9bff:fe0d:9f69/64 scope link 
       valid_lft forever preferred_lft forever
4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br-lan state UP qlen 1000
    link/ether 54:36:9b:0d:9f:69 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::5636:9bff:fe0d:9f69/64 scope link 
       valid_lft forever preferred_lft forever

The hardware is seems ok. After installing firmware for Lenovo Y1 ethernet devices are accessible:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen 1000
    link/ether 54:36:9b:0d:9f:69 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::5636:9bff:fe0d:9f69/64 scope link 
       valid_lft forever preferred_lft forever
4: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 56:36:9b:0d:9f:69 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 fd94:4bcf:c5ba::1/60 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::5436:9bff:fe0d:9f69/64 scope link 
       valid_lft forever preferred_lft forever
5: eth0.1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether 56:36:9b:0d:9f:69 brd ff:ff:ff:ff:ff:ff
6: eth0.2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 56:36:9b:0d:9f:6a brd ff:ff:ff:ff:ff:ff
    inet6 fe80::5436:9bff:fe0d:9f6a/64 scope link 
       valid_lft forever preferred_lft forever
7: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br-lan state UP qlen 1000
    link/ether 54:36:9b:0d:9f:69 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::5636:9bff:fe0d:9f69/64 scope link 
       valid_lft forever preferred_lft forever

dmesg:

Essential line (I think):

[    0.498941] ralink-usb-phy usbphy: invalid resource

Whole output:

[    0.000000] Linux version 4.9.54 (buildbot@buildslave) (gcc version 5.4.0 (LEDE GCC 5.4.0 r4987-90805b16b6) ) #0 Mon Oct 9 09:29:01 2017
[    0.000000] Board has DDR2
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7620A ver:2 eco:6
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is YOUKU YK1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat 80420604, node_mem_map 81000020
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=0000000a
[    0.000000] Readback ErrCtl register=0000000a
[    0.000000] Memory: 125208K/131072K available (3285K kernel code, 159K rwdata, 784K rodata, 180K init, 222K bss, 5864K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:256
[    0.000000] CPU Clock: 580MHz
[    0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[    0.000000] systick: enable autosleep mode
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000012] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.015468] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.080618] pid_max: default: 32768 minimum: 301
[    0.089929] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.102955] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.123622] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.143104] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.155259] pinctrl core: initialized pinctrl subsystem
[    0.166940] NET: Registered protocol family 16
[    0.199979] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.211008] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.223606] rt2880_gpio 10000638.gpio: registering 16 gpios
[    0.234599] rt2880_gpio 10000638.gpio: registering 16 irq handlers
[    0.247145] rt2880_gpio 10000660.gpio: registering 32 gpios
[    0.258132] rt2880_gpio 10000660.gpio: registering 32 irq handlers
[    0.270687] rt2880_gpio 10000688.gpio: registering 1 gpios
[    0.281501] rt2880_gpio 10000688.gpio: registering 1 irq handlers
[    0.298127] clocksource: Switched to clocksource systick
[    0.309920] NET: Registered protocol family 2
[    0.319545] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.333326] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.345914] TCP: Hash tables configured (established 1024 bind 1024)
[    0.358644] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.370167] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.382866] NET: Registered protocol family 1
[    0.391448] PCI: CLS 0 bytes, default 32
[    0.393907] rt-timer 10000100.timer: maximum frequency is 1220Hz
[    0.406652] Crashlog allocated RAM at address 0x3f00000
[    0.418275] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.439906] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.451394] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.480757] io scheduler noop registered
[    0.488457] io scheduler deadline registered (default)
[    0.498941] ralink-usb-phy usbphy: invalid resource
[    0.509123] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.525317] console [ttyS0] disabled
[    0.532366] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    0.552042] console [ttyS0] enabled
[    0.565861] bootconsole [early0] disabled
[    0.588873] spi spi0.0: force spi mode3
[    0.597340] m25p80 spi0.0: mx25l25635e (32768 Kbytes)
[    0.607500] 4 ofpart partitions found on MTD device spi0.0
[    0.618435] Creating 4 MTD partitions on "spi0.0":
[    0.627980] 0x000000000000-0x000000030000 : "u-boot"
[    0.639643] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.652206] 0x000000040000-0x000000050000 : "factory"
[    0.664226] 0x000000050000-0x000002000000 : "firmware"
[    0.851167] 2 uimage-fw partitions found on MTD device firmware
[    0.863010] 0x000000050000-0x0000001a7df5 : "kernel"
[    0.874557] 0x0000001a7df5-0x000002000000 : "rootfs"
[    0.886376] mtd: device 5 (rootfs) set to be root filesystem
[    0.898348] 1 squashfs-split partitions found on MTD device rootfs
[    0.910725] 0x0000005e0000-0x000002000000 : "rootfs_data"
[    0.923844] libphy: Fixed MDIO Bus: probed
[    0.932648] rt2880-pinmux pinctrl: pin io40 already requested by pinctrl; cannot claim for 10100000.ethernet
[    0.952295] rt2880-pinmux pinctrl: pin-40 (10100000.ethernet) status -22
[    0.965662] rt2880-pinmux pinctrl: could not request pin 40 (io40) from group ephy  on device rt2880-pinmux
[    0.985083] mtk_soc_eth 10100000.ethernet: Error applying setting, reverse things back
[    1.000882] mtk_soc_eth: probe of 10100000.ethernet failed with error -22
[    1.014884] rt2880_wdt 10000120.watchdog: Initialized
[    1.026163] NET: Registered protocol family 10
[    1.039661] NET: Registered protocol family 17
[    1.048649] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.074485] 8021q: 802.1Q VLAN Support v1.8
[    1.097524] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    1.112620] Freeing unused kernel memory: 180K
[    1.121505] This architecture does not have kernel memory protection.
[    2.393949] init: Console is alive
[    2.401079] init: - watchdog -
[    2.557217] random: fast init done
[    4.266470] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.536813] usbcore: registered new interface driver usbfs
[    4.547943] usbcore: registered new interface driver hub
[    4.558678] usbcore: registered new device driver usb
[    4.574497] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.596334] SCSI subsystem initialized
[    4.609015] ehci-platform: EHCI generic platform driver
[    4.629818] phy phy-usbphy.0: remote usb device wakeup disabled
[    4.641629] phy phy-usbphy.0: UTMI 16bit 30MHz
[    4.650525] ehci-platform 101c0000.ehci: EHCI Host Controller
[    4.662020] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
[    4.677927] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
[    4.700059] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
[    4.713639] hub 1-0:1.0: USB hub found
[    4.721536] hub 1-0:1.0: 1 port detected
[    4.732458] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.746346] ohci-platform: OHCI generic platform driver
[    4.757113] ohci-platform 101c1000.ohci: Generic Platform OHCI controller
[    4.770723] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2
[    4.786599] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000
[    4.824795] hub 2-0:1.0: USB hub found
[    4.832749] hub 2-0:1.0: 1 port detected
[    4.842308] ohci-pci: OHCI PCI platform driver
[    4.863935] MTK MSDC device init.
[    4.891398] mtk-sd: MediaTek MT6575 MSDC Driver
[    4.908276] usbcore: registered new interface driver usb-storage
[    4.924325] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.945338] init: - preinit -
[    5.011598] mmc0: new high speed SDHC card at address 1234
[    5.034842] mmcblk0: mmc0:1234 SA08G 7.21 GiB 
[    5.053081]  mmcblk0: p1
[    8.285453] jffs2: notice: (387) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    8.319181] mount_root: switching to jffs2 overlay
[    8.356620] urandom-seed: Seeding with /etc/urandom.seed
[    8.483091] procd: - early -
[    8.488928] procd: - watchdog -
[    8.929206] procd: - watchdog -
[    8.935817] procd: - ubus -
[    9.180228] procd: - init -
[    9.547827] kmodloader: loading kernel modules from /etc/modules.d/*
[    9.565759] Loading modules backported from Linux version v4.14-rc2-0-ge19b205be43d
[    9.581089] Backport generated by backports.git v4.14-rc2-1-0-g8bfe0960
[    9.677737] rt2800_wmac 10180000.wmac: loaded eeprom from mtd device "factory"
[    9.692207] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 6352, rev 0500 detected
[    9.707677] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 7620 detected
[    9.722133] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[    9.743785] kmodloader: done loading kernel modules from /etc/modules.d/*
[   15.414158] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   18.739488] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   18.783553] br-lan: port 1(wlan0) entered blocking state
[   18.794221] br-lan: port 1(wlan0) entered disabled state
[   18.805278] device wlan0 entered promiscuous mode
[   18.876601] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   18.889512] br-lan: port 1(wlan0) entered blocking state
[   18.900130] br-lan: port 1(wlan0) entered forwarding state
[   18.988088] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   47.782580] random: crng init done

dmesg from device with Lenovo Y1 firmware:

[    0.000000] Linux version 4.9.54 (buildbot@buildslave) (gcc version 5.4.0 (LEDE GCC 5.4.0 r4987-90805b16b6) ) #0 Mon Oct 9 09:29:01 2017
[    0.000000] Board has DDR2
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7620A ver:2 eco:6
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is Lenovo Y1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat 80420604, node_mem_map 81000020
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=00077412
[    0.000000] Readback ErrCtl register=00077412
[    0.000000] Memory: 125208K/131072K available (3285K kernel code, 159K rwdata, 784K rodata, 180K init, 222K bss, 5864K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:256
[    0.000000] CPU Clock: 580MHz
[    0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[    0.000000] systick: enable autosleep mode
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000012] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.015469] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.080616] pid_max: default: 32768 minimum: 301
[    0.089927] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.102954] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.123744] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.143226] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.155382] pinctrl core: initialized pinctrl subsystem
[    0.167057] NET: Registered protocol family 16
[    0.437711] mt7620-pci 10140000.pcie: PCIE0 no card, disable it(RST&CLK)
[    0.450939] mt7620-pci: probe of 10140000.pcie failed with error -1
[    0.478185] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.489214] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.501809] rt2880_gpio 10000660.gpio: registering 32 gpios
[    0.512804] rt2880_gpio 10000660.gpio: registering 32 irq handlers
[    0.525352] rt2880_gpio 10000688.gpio: registering 1 gpios
[    0.536165] rt2880_gpio 10000688.gpio: registering 1 irq handlers
[    0.552511] clocksource: Switched to clocksource systick
[    0.564318] NET: Registered protocol family 2
[    0.573944] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.587725] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.600313] TCP: Hash tables configured (established 1024 bind 1024)
[    0.613042] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.624567] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.637265] NET: Registered protocol family 1
[    0.645849] PCI: CLS 0 bytes, default 32
[    0.648291] rt-timer 10000100.timer: maximum frequency is 1220Hz
[    0.661032] Crashlog allocated RAM at address 0x3f00000
[    0.672634] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.694250] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.705737] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.735082] io scheduler noop registered
[    0.742781] io scheduler deadline registered (default)
[    0.753256] ralink-usb-phy usbphy: invalid resource
[    0.763438] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.779609] console [ttyS0] disabled
[    0.786660] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    0.806334] console [ttyS0] enabled
[    0.813412] bootconsole [early0] disabled
[    0.828574] spi spi0.0: force spi mode3
[    0.833432] m25p80 spi0.0: mx25l25635e (32768 Kbytes)
[    0.838633] 4 ofpart partitions found on MTD device spi0.0
[    0.844285] Creating 4 MTD partitions on "spi0.0":
[    0.849181] 0x000000000000-0x000000030000 : "u-boot"
[    0.856019] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.863423] 0x000000040000-0x000000050000 : "factory"
[    0.870444] 0x000000050000-0x000001000000 : "firmware"
[    0.964557] 2 uimage-fw partitions found on MTD device firmware
[    0.970623] 0x000000050000-0x0000001a7d82 : "kernel"
[    0.977353] 0x0000001a7d82-0x000001000000 : "rootfs"
[    0.984356] mtd: device 5 (rootfs) set to be root filesystem
[    0.990722] 1 squashfs-split partitions found on MTD device rootfs
[    0.997110] 0x0000005f0000-0x000001000000 : "rootfs_data"
[    1.004984] libphy: Fixed MDIO Bus: probed
[    1.011814] gsw: setting port4 to ephy mode
[    1.016178] mtk_soc_eth 10100000.ethernet eth0 (uninitialized): port 0 link up (100Mbps/Full duplex)
[    1.026902] mtk_soc_eth 10100000.ethernet: loaded mt7620 driver
[    1.033865] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    1.042878] rt2880_wdt 10000120.watchdog: Initialized
[    1.049205] NET: Registered protocol family 10
[    1.056972] NET: Registered protocol family 17
[    1.061567] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.074855] 8021q: 802.1Q VLAN Support v1.8
[    1.096389] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    1.104626] Freeing unused kernel memory: 180K
[    1.109161] This architecture does not have kernel memory protection.
[    2.612505] random: fast init done
[    2.733461] init: Console is alive
[    2.737169] init: - watchdog -
[    4.180803] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.440713] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.452211] init: - preinit -
[    6.368734] 8021q: adding VLAN 0 to HW filter on device eth0
[    7.761984] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[    7.797333] urandom-seed: Seed file not found (/etc/urandom.seed)
[    7.915013] procd: - early -
[    7.918064] procd: - watchdog -
[    8.237989] procd: - watchdog -
[    8.241519] procd: - ubus -
[    8.418817] procd: - init -
[    8.822158] kmodloader: loading kernel modules from /etc/modules.d/*
[    8.836464] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    8.852308] Loading modules backported from Linux version v4.14-rc2-0-ge19b205be43d
[    8.860209] Backport generated by backports.git v4.14-rc2-1-0-g8bfe0960
[    8.925270] ip_tables: (C) 2000-2006 Netfilter Core Team
[    8.940466] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[    9.020544] xt_time: kernel timezone is -0000
[    9.036017] PPP generic driver version 2.4.2
[    9.043308] NET: Registered protocol family 24
[    9.065438] rt2800_wmac 10180000.wmac: loaded eeprom from mtd device "factory"
[    9.072903] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 6352, rev 0500 detected
[    9.080838] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 7620 detected
[    9.088582] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[    9.184629] kmodloader: done loading kernel modules from /etc/modules.d/*
[   16.154464] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   16.161527] jffs2_build_filesystem(): unlocking the mtd device... 
[   16.167721] done.
[   16.169685] jffs2_build_filesystem(): erasing all blocks after the end marker... 
[   20.965011] 8021q: adding VLAN 0 to HW filter on device eth0
[   21.004484] device eth0 entered promiscuous mode
[   21.037292] br-lan: port 1(eth0.1) entered blocking state
[   21.042893] br-lan: port 1(eth0.1) entered disabled state
[   21.048879] device eth0.1 entered promiscuous mode
[   21.133985] br-lan: port 1(eth0.1) entered blocking state
[   21.139513] br-lan: port 1(eth0.1) entered forwarding state
[   27.504253] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   27.530200] br-lan: port 2(wlan0) entered blocking state
[   27.535712] br-lan: port 2(wlan0) entered disabled state
[   27.541641] device wlan0 entered promiscuous mode
[   27.634677] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   27.641359] br-lan: port 2(wlan0) entered blocking state
[   27.646852] br-lan: port 2(wlan0) entered forwarding state
[   86.014234] done.
[   86.016255] jffs2: notice: (858) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   92.571384] random: crng init done
[   93.092837] mtk_soc_eth 10100000.ethernet eth0: port 0 link down
[   93.099782] br-lan: port 1(eth0.1) entered disabled state
[   95.629651] mtk_soc_eth 10100000.ethernet eth0: port 0 link up (100Mbps/Full duplex)
[   95.639039] br-lan: port 1(eth0.1) entered blocking state
[   95.644628] br-lan: port 1(eth0.1) entered forwarding state

Additional hardware info:

CPU 	MediaTek MT7620A ver 2, eco 6
RAM 	128MB DDR2
Flash 	Macronix MX25L25635E @ 24MHz (32MB)
Switch 	MediaTek MT7620A built-in 5-port 10/100M switch


Closed by  Mathias Kresin
27.10.2017 09:36
Reason for closing:  Fixed
Additional comments about closing:  

Fixed with ht tps://git.lede-project.org/9786b53efb822 5f5b6f21921e684b40b9febe61e

Project Manager
Mathias Kresin commented on 12.10.2017 10:37

Nope, your issue is:

[ 0.932648] rt2880-pinmux pinctrl: pin io40 already requested by pinctrl; cannot claim for 10100000.ethernet
[ 0.952295] rt2880-pinmux pinctrl: pin-40 (10100000.ethernet) status -22
[ 0.965662] rt2880-pinmux pinctrl: could not request pin 40 (io40) from group ephy on device rt2880-pinmux
[ 0.985083] mtk_soc_eth 10100000.ethernet: Error applying setting, reverse things back
[ 1.000882] mtk_soc_eth: probe of 10100000.ethernet failed with error -22

The SoC pins of the ephy group are referenced/configured twice with contrary settings.

In target/linux/ramips/dts/mt7620a.dtsi (which is included by YOUKU-YK1.dts), the ephy pins are configured as

ephy_pins: ephy {
	ephy {
		ralink,group = "ephy";
		ralink,function = "ephy";
	};
};

and referenced by the YOUKU-YK1.dts with

&ethernet {
	pinctrl-0 = <&ephy_pins>;
};

But in the YOUKU-YK1.dts the Pins of the ephy group are configured as GPIOs (&gpio2 0 to &gpio2 4 - used by the wan LED):

&pinctrl {
	state_default: pinctrl0 {
		default {
			ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "ephy", "wled", "nd_sd";
			ralink,function = "gpio";
		};
	};
};

Either of both is wrong.

Since it seems to me you are able to build images on your own. Would you please test which of both is wrong.

Edmunt Pienkowsky commented on 13.10.2017 07:24

Here are the results:

First try

Changing

&ethernet {
	pinctrl-names = "default";
	pinctrl-0 = <&ephy_pins>;
	mtd-mac-address = <&factory 0x4>;
	mediatek,portmap = "llllw";
};

to

&ethernet {
	pinctrl-names = "default";
	mtd-mac-address = <&factory 0x4>;
	mediatek,portmap = "llllw";
};

Result

Ethernet ports accessible, leds accessible.

ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN qlen 1000
    link/ether 54:36:9b:0d:9f:69 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::5636:9bff:fe0d:9f69/64 scope link 
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 54:36:9b:0d:9f:69 brd ff:ff:ff:ff:ff:ff
4: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 54:36:9b:0d:9f:69 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 fd31:483a:823f::1/60 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::5636:9bff:fe0d:9f69/64 scope link 
       valid_lft forever preferred_lft forever
5: eth0.1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether 54:36:9b:0d:9f:69 brd ff:ff:ff:ff:ff:ff
6: eth0.2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 54:36:9b:0d:9f:6a brd ff:ff:ff:ff:ff:ff
    inet6 fe80::5636:9bff:fe0d:9f6a/64 scope link 
       valid_lft forever preferred_lft forever

ls /sys/class/leds

rt2800soc-phy0::assoc
rt2800soc-phy0::quality
rt2800soc-phy0::radio
youku-yk1:blue:air
youku-yk1:blue:power
youku-yk1:blue:usb
youku-yk1:blue:wan

Attached full dmesg in dmesg-1.txt.

Second try

Changing

&pinctrl {
	state_default: pinctrl0 {
		default {
			ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "ephy", "wled", "nd_sd";
			ralink,function = "gpio";
		};
	};
};

to

&pinctrl {
	state_default: pinctrl0 {
		default {
			ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd";
			ralink,function = "gpio";
		};
	};
};

Result

Ethernet ports accessible, leds not defined.

ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN qlen 1000
    link/ether 54:36:9b:0d:9f:69 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::5636:9bff:fe0d:9f69/64 scope link 
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 54:36:9b:0d:9f:69 brd ff:ff:ff:ff:ff:ff
4: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 54:36:9b:0d:9f:69 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 fdfe:7948:fb60::1/60 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::5636:9bff:fe0d:9f69/64 scope link 
       valid_lft forever preferred_lft forever
5: eth0.1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether 54:36:9b:0d:9f:69 brd ff:ff:ff:ff:ff:ff
6: eth0.2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 54:36:9b:0d:9f:6a brd ff:ff:ff:ff:ff:ff
    inet6 fe80::5636:9bff:fe0d:9f6a/64 scope link 
       valid_lft forever preferred_lft forever

ls /sys/class/leds

rt2800soc-phy0::assoc
rt2800soc-phy0::quality
rt2800soc-phy0::radio

Attached full dmesg in dmesg-2.txt.

Project Manager
Mathias Kresin commented on 13.10.2017 11:19

Thanks a lot for doing the tests!

Would you please ensure that the wan LED really uses a pin of the phy group, by switching the LED on and off:

echo 255 > /sys/class/leds/youku-yk1:blue:wan/brightness
echo 0 > /sys/class/leds/youku-yk1:blue:wan/brightness

Are you able to send a patch on your own following https://lede-project.org/submitting-patches?

Edmunt Pienkowsky commented on 13.10.2017 15:14

echo 255 > youku-yk1:blue:wan/brightness turns led on and echo 0 > youku-yk1:blue:wan/brightness turns led off.
I also added (missing?) led configuration to /etc/config/system:

config led 'led_wan'
	option name 'wan'
	option sysfs 'youku-yk1:blue:wan'
	option trigger 'switch0'
	option port_mask '0x10'

and wan led blinks fine.


It is no problem to create PR on GitHub (or create patch) to me. The only problem is... description.
I do not understand what lack of pinctrl-0 = <&ephy_pins> line really do.

Project Manager
Mathias Kresin commented on 13.10.2017 15:27
I do not understand what lack of pinctrl-0 = <&ephy_pins> line really do.

I'm not entirely sure why/how it works either and waiting for a answer from someone with a more knowledge about ramips.

I suspect it is copy/paste from MT7620a_MT7610e.dts, which has an additional/extra (?) phy attached to switch port4:

&ethernet {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&ephy_pins>;
        mediatek,portmap = "llllw";
};

&gsw {
        mediatek,port4 = "ephy";
};
Project Manager
Mathias Kresin commented on 13.10.2017 20:36

I can provide an explanation now.

If you have a look at the switch part of the attached Functional Block Diagram of the mt7620 you can see that the build in switch has 4 Fast-Ethernet and 2 Gigabit Ethernet "ports".

The 4 FE switch ports (port 0-3) are always attached to the 5-Port E[mbedded]PHY. Switch Port 4 can be attached either to the EPHY to have 5 usable RJ45 FE ports or to an external phy (icplus ip1001 for example). Switch Port 5 can be only attached an external PHY.

In the end the following hardware configurations are possible:

- 4x EPHY (FE) + 2x external PHY (can be FE or GE)
- 5x EPHY (FE) + 1x external PHY (can be FE or GE)
- 1x external PHY (can be FE or GE)
- 2x external PHY (can be FE or GE)

I suspect for the YK1 the 2x external PHY hardware config is used and therefore the ephy_pins are not required/can be used for a different purpose (here GPIO).

If so, the default switch config ("0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0") looks at least suspicious.

Would it be possible that you take a few pictures of the board and attach the pictures to this report. Even better would be if you create an article at the openwrt wiki for this board. I wasn't able to find any information about this board.

I'm interested in the actual switch config as well. Would you please run 'swconfig list' and 'swconfig dev <switchname from list output> show' to check which switch ports get a link if you attach a cable to the RJ45 ports.

Edmunt Pienkowsky commented on 14.10.2017 09:09

Thank you for your explanation.

This router have only 2 LAN ports so maybe port 5 is just not used.

Here are switch info you asked for:

LAN1 up:

Global attributes:
	enable_vlan: 1
	mib: Switch MIB counters
PPE_AC_BCNT0: 0
PPE_AC_PCNT0: 0
PPE_AC_BCNT63: 0
PPE_AC_PCNT63: 0
PPE_MTR_CNT0: 0
PPE_MTR_CNT63: 0
GDM1_TX_GBCNT: 0
GDM1_TX_GPCNT: 0
GDM1_TX_SKIPCNT: 0
GDM1_TX_COLCNT: 0
GDM1_RX_GBCNT1: 0
GDM1_RX_GPCNT1: 0
GDM1_RX_OERCNT: 0
GDM1_RX_FERCNT: 0
GDM1_RX_SERCNT: 0
GDM1_RX_LERCNT: 0
GDM1_RX_CERCNT: 0
GDM1_RX_FCCNT: 0
GDM2_TX_GBCNT: 0
GDM2_TX_GPCNT: 0
GDM2_TX_SKIPCNT: 0
GDM2_TX_COLCNT: 0
GDM2_RX_GBCNT: 0
GDM2_RX_GPCNT: 0
GDM2_RX_OERCNT: 0
GDM2_RX_FERCNT: 0
GDM2_RX_SERCNT: 0
GDM2_RX_LERCNT: 3
GDM2_RX_CERCNT: 0
GDM2_RX_FCCNT: 0

Port 0:
	mib: Port 0 MIB counters
TxGPC      : 295
TxBOC      : 0
TxGOC      : 44346
TxEPC      : 0
RxGPC      : 472
RxBOC      : 0
RxGOC      : 46173
RxEPC1     : 0
RxEPC2     : 0

	pvid: 1
	link: port:0 link:up speed:100baseT full-duplex 
Port 1:
	mib: Port 1 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

	pvid: 1
	link: port:1 link:down
Port 2:
	mib: Port 2 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

	pvid: 1
	link: port:2 link:down
Port 3:
	mib: Port 3 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

	pvid: 1
	link: port:3 link:down
Port 4:
	mib: Port 4 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

	pvid: 2
	link: port:4 link:down
Port 5:
	mib: Port 5 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

	pvid: 0
	link: port:5 link:down
Port 6:
	mib: Port 6 MIB counters
TxGPC      : 472
TxBOC      : 0
TxGOC      : 48061
TxEPC      : 0
RxGPC      : 400
RxBOC      : 0
RxGOC      : 73321
RxEPC1     : 0
RxEPC2     : 105

	pvid: 0
	link: port:6 link:up speed:1000baseT full-duplex 
Port 7:
	mib: Port 7 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

	pvid: 0
	link: port:7 link:down
VLAN 1:
	vid: 1
	ports: 0 1 2 3 6t 
VLAN 2:
	vid: 2
	ports: 4 6t 

LAN2 up:

Global attributes:
	enable_vlan: 1
	mib: Switch MIB counters
PPE_AC_BCNT0: 0
PPE_AC_PCNT0: 0
PPE_AC_BCNT63: 0
PPE_AC_PCNT63: 0
PPE_MTR_CNT0: 0
PPE_MTR_CNT63: 0
GDM1_TX_GBCNT: 0
GDM1_TX_GPCNT: 0
GDM1_TX_SKIPCNT: 0
GDM1_TX_COLCNT: 0
GDM1_RX_GBCNT1: 0
GDM1_RX_GPCNT1: 0
GDM1_RX_OERCNT: 0
GDM1_RX_FERCNT: 0
GDM1_RX_SERCNT: 0
GDM1_RX_LERCNT: 0
GDM1_RX_CERCNT: 0
GDM1_RX_FCCNT: 0
GDM2_TX_GBCNT: 0
GDM2_TX_GPCNT: 0
GDM2_TX_SKIPCNT: 0
GDM2_TX_COLCNT: 0
GDM2_RX_GBCNT: 0
GDM2_RX_GPCNT: 0
GDM2_RX_OERCNT: 0
GDM2_RX_FERCNT: 0
GDM2_RX_SERCNT: 0
GDM2_RX_LERCNT: 3
GDM2_RX_CERCNT: 0
GDM2_RX_FCCNT: 0

Port 0:
	mib: Port 0 MIB counters
TxGPC      : 305
TxBOC      : 0
TxGOC      : 45640
TxEPC      : 0
RxGPC      : 489
RxBOC      : 0
RxGOC      : 47837
RxEPC1     : 0
RxEPC2     : 0

	pvid: 1
	link: port:0 link:down
Port 1:
	mib: Port 1 MIB counters
TxGPC      : 78
TxBOC      : 0
TxGOC      : 11626
TxEPC      : 0
RxGPC      : 131
RxBOC      : 0
RxGOC      : 15159
RxEPC1     : 0
RxEPC2     : 0

	pvid: 1
	link: port:1 link:up speed:100baseT full-duplex 
Port 2:
	mib: Port 2 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

	pvid: 1
	link: port:2 link:down
Port 3:
	mib: Port 3 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

	pvid: 1
	link: port:3 link:down
Port 4:
	mib: Port 4 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

	pvid: 2
	link: port:4 link:down
Port 5:
	mib: Port 5 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

	pvid: 0
	link: port:5 link:down
Port 6:
	mib: Port 6 MIB counters
TxGPC      : 620
TxBOC      : 0
TxGOC      : 65476
TxEPC      : 0
RxGPC      : 512
RxBOC      : 0
RxGOC      : 92184
RxEPC1     : 0
RxEPC2     : 129

	pvid: 0
	link: port:6 link:up speed:1000baseT full-duplex 
Port 7:
	mib: Port 7 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

	pvid: 0
	link: port:7 link:down
VLAN 1:
	vid: 1
	ports: 0 1 2 3 6t 
VLAN 2:
	vid: 2
	ports: 4 6t 

WAN (and LAN1) up:

Global attributes:
	enable_vlan: 1
	mib: Switch MIB counters
PPE_AC_BCNT0: 0
PPE_AC_PCNT0: 0
PPE_AC_BCNT63: 0
PPE_AC_PCNT63: 0
PPE_MTR_CNT0: 0
PPE_MTR_CNT63: 0
GDM1_TX_GBCNT: 0
GDM1_TX_GPCNT: 0
GDM1_TX_SKIPCNT: 0
GDM1_TX_COLCNT: 0
GDM1_RX_GBCNT1: 0
GDM1_RX_GPCNT1: 0
GDM1_RX_OERCNT: 0
GDM1_RX_FERCNT: 0
GDM1_RX_SERCNT: 0
GDM1_RX_LERCNT: 0
GDM1_RX_CERCNT: 0
GDM1_RX_FCCNT: 0
GDM2_TX_GBCNT: 0
GDM2_TX_GPCNT: 0
GDM2_TX_SKIPCNT: 0
GDM2_TX_COLCNT: 0
GDM2_RX_GBCNT: 0
GDM2_RX_GPCNT: 0
GDM2_RX_OERCNT: 0
GDM2_RX_FERCNT: 0
GDM2_RX_SERCNT: 0
GDM2_RX_LERCNT: 3
GDM2_RX_CERCNT: 0
GDM2_RX_FCCNT: 0

Port 0:
	mib: Port 0 MIB counters
TxGPC      : 434
TxBOC      : 0
TxGOC      : 66559
TxEPC      : 0
RxGPC      : 676
RxBOC      : 0
RxGOC      : 67570
RxEPC1     : 0
RxEPC2     : 0

	pvid: 1
	link: port:0 link:up speed:100baseT full-duplex 
Port 1:
	mib: Port 1 MIB counters
TxGPC      : 147
TxBOC      : 0
TxGOC      : 23032
TxEPC      : 0
RxGPC      : 224
RxBOC      : 0
RxGOC      : 23471
RxEPC1     : 0
RxEPC2     : 0

	pvid: 1
	link: port:1 link:down
Port 2:
	mib: Port 2 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

	pvid: 1
	link: port:2 link:down
Port 3:
	mib: Port 3 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

	pvid: 1
	link: port:3 link:down
Port 4:
	mib: Port 4 MIB counters
TxGPC      : 88
TxBOC      : 0
TxGOC      : 8999
TxEPC      : 0
RxGPC      : 136
RxBOC      : 0
RxGOC      : 24720
RxEPC1     : 0
RxEPC2     : 0

	pvid: 2
	link: port:4 link:up speed:100baseT full-duplex 
Port 5:
	mib: Port 5 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

	pvid: 0
	link: port:5 link:down
Port 6:
	mib: Port 6 MIB counters
TxGPC      : 1036
TxBOC      : 0
TxGOC      : 119905
TxEPC      : 0
RxGPC      : 828
RxBOC      : 0
RxGOC      : 142327
RxEPC1     : 0
RxEPC2     : 159

	pvid: 0
	link: port:6 link:up speed:1000baseT full-duplex 
Port 7:
	mib: Port 7 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

	pvid: 0
	link: port:7 link:down
VLAN 1:
	vid: 1
	ports: 0 1 2 3 6t 
VLAN 2:
	vid: 2
	ports: 4 6t 

I've also attached some pictures of this router and board.

   r01.jpg (169.5 KiB)
   r02.jpg (218.1 KiB)
   r03.jpg (101.7 KiB)
   r04.jpg (63.8 KiB)
   b01.jpg (223.3 KiB)
   b02.jpg (217.5 KiB)
   b03.jpg (192 KiB)
   b04.jpg (153.4 KiB)
   b05.jpg (140 KiB)
   b06.jpg (61.5 KiB)
   b07.jpg (193 KiB)
   b08.jpg (184.3 KiB)
   b09.jpg (248.2 KiB)
   b10.jpg (92.6 KiB)
Project Manager
Mathias Kresin commented on 14.10.2017 09:29
This router have only 2 LAN ports so maybe port 5 is just not used.

Your board has three RJ45 ports. From the config it looks like the following:

* switch port 0: LAN1
* switch port 1: LAN2
* switch port 4: WAN

* switch port 6: CPU port to SoC.

No idea to which switch port LAN2 is attached (I expected it would be port5). Edit: I've read only half of the report.

Nevertheless, your config shows that my explanation wasn't completely correct. Three phys/phys at port0 + port 1 is something that I didn't expected.

Unfortunately your pictures are really blurry and I wasn't able to spot any phy chips.

Edmunt Pienkowsky commented on 14.10.2017 17:02

I found few better quality pictures on ebay.

Project Manager
Mathias Kresin commented on 15.10.2017 12:11

Your board has definitely no external phy. Means the EPHY is used for sure.

I guess I found the answer to our question in the MT7620 Datasheet (google for it). First of all the EPHY pins are names EPHY_LED pins and they can be set to the following functions:

EPHY_LED pin share scheme

Pin Name            | EPHY function | JTAG function | GPIO function
--------------------+---------------+---------------+--------------
EPHY_LED4_N_JTRST_N | EPHY_LED4_N   | JTAG_RST_N    | GPIO#44
EPHY_LED3_N_JTCLK   | EPHY_LED3_N   | JTAG_CLK      | GPIO#43
EPHY_LED2_N_JTMS    | EPHY_LED2_N   | JTAG_TMS      | GPIO#42
EPHY_LED1_N_JTDI    | EPHY_LED1_N   | JTAG_TDI      | GPIO#41
EPHY_LED0_N_JTDO    | EPHY_LED0_N   | JTAG_TDO      | GPIO#40

Judging from the function name, I assume the pins in EPHY function are only used to control LEDs attached to the SoC and not required at all to get the EPHY working. Since your board doesn't have these LEDs, it is fine to set the pins to the GPIO function.

If you touch the 01_leds file to add the wan led trigger, drop the power led from the youku-yk1 section. The LED is already controlled and switched to on by diag.sh. If it doesn't work, as expected, the LED is most likely GPIO_ACTIVE_HIGH instead of GPIO_ACTIVE_LOW.

Edmunt Pienkowsky commented on 21.10.2017 09:14

Here you can find my pull request.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing