#16931: Need mt762x-gsw switch driver on MT7620a
-------------------------------------+-------------------------------------
 Reporter:  qshen                    |      Owner:  developers
     Type:  defect                   |     Status:  new
 Priority:  normal                   |  Milestone:  Attitude Adjustment
Component:  other                    |  12.09
 Keywords:  MT7620A  mt762x-gsw      |    Version:  Trunk
  switch                             |
-------------------------------------+-------------------------------------
 I have a device, HiWiFi HC5661 from China.
 MT7620A+RALINK, 128M DDR2 MEMORY
 I compiled an trunk version ( r41406 ) with this profile:

 Target System: Ralink RT288x/RT3xxx
 Subtarget: (MT7620a based boards)
 Target Profile: Default

 Everything works well except the ethernet ports.
 LuCI 's switch/vlan page hidden.

 I tried to list the switch:
 {{{
 root@OpenWrt:~# swconfig list
 Found: switch0 - mt7530
 }}}

 And the swconfig set doesn't work.

 The original firmware is based on openwrt, but no source code.
 I hook it and got root priv, and found the switch is recognized as mt762x-
 gsw. And the LuCI's switch/vlan page works. The swconfig works too.

 And I check the kernel log, the trunk version is:


 {{{
 [    0.860000] (unregistered net_device): port 0 link up (100Mbps/Full
 duplex)
 [    0.860000] (unregistered net_device): port 2 link up (100Mbps/Full
 duplex)
 [    0.890000] ralink_soc_eth 10100000.ethernet: loaded mt7530 driver
 [    0.900000] eth0: done loading
 }}}

 and the original version is:


 {{{
 [    1.740000] PROC INIT OK!
 [    1.740000] mt762x-gsw switch driver registered.
 [    1.740000] Ralink APSoC Hardware Watchdog Timer
 }}}

 Can we add the support of mt762x-gsw switch? There're so many MT7620A
 devices with mt762x-gsw switch!

 The full kernel log is here:

 {{{
 [    0.000000] Linux version 3.10.44 (qshen@QsLYCNC) (gcc version 4.8.3
 (OpenWrt/Linaro GCC 4.8-2014.04 r41406) ) #2 Mon Jun 30 15:55:51 CST 2014
 [    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: Ralink MT7620A ver:2 eco:3
 [    0.000000] bootconsole [early0] enabled
 [    0.000000] CPU revision is: 00019650 (MIPS 24KEc)
 [    0.000000] MIPS: machine is Ralink MT7620A evaluation board
 [    0.000000] Determined physical RAM map:
 [    0.000000]  memory: 08000000 @ 00000000 (usable)
 [    0.000000] Initrd not found or empty - disabling initrd
 [    0.000000] Zone ranges:
 [    0.000000]   Normal   [mem 0x00000000-0x07ffffff]
 [    0.000000] Movable zone start for each node
 [    0.000000] Early memory node ranges
 [    0.000000]   node   0: [mem 0x00000000-0x07ffffff]
 [    0.000000] On node 0 totalpages: 32768
 [    0.000000] free_area_init_node: node 0, pgdat 802cc990, node_mem_map
 81005520
 [    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] 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] 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=0003bb60
 [    0.000000] Readback ErrCtl register=0003bb60
 [    0.000000] Memory: 126552k/131072k available (2372k kernel code, 4520k
 reserved, 582k data, 180k init, 0k highmem)
 [    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.050000] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
 [    0.060000] pid_max: default: 32768 minimum: 301
 [    0.060000] Mount-cache hash table entries: 512
 [    0.070000] pinctrl core: initialized pinctrl subsystem
 [    0.070000] NET: Registered protocol family 16
 [    0.080000] rt2880-pinmux pinctrl.1: try to register 73 pins ...
 [    0.080000] pinctrl core: registered pin 0 (io0) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 1 (io1) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 2 (io2) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 3 (io3) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 4 (io4) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 5 (io5) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 6 (io6) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 7 (io7) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 8 (io8) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 9 (io9) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 10 (io10) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 11 (io11) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 12 (io12) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 13 (io13) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 14 (io14) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 15 (io15) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 16 (io16) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 17 (io17) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 18 (io18) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 19 (io19) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 20 (io20) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 21 (io21) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 22 (io22) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 23 (io23) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 24 (io24) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 25 (io25) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 26 (io26) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 27 (io27) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 28 (io28) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 29 (io29) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 30 (io30) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 31 (io31) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 32 (io32) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 33 (io33) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 34 (io34) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 35 (io35) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 36 (io36) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 37 (io37) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 38 (io38) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 39 (io39) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 40 (io40) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 41 (io41) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 42 (io42) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 43 (io43) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 44 (io44) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 45 (io45) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 46 (io46) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 47 (io47) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 48 (io48) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 49 (io49) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 50 (io50) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 51 (io51) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 52 (io52) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 53 (io53) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 54 (io54) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 55 (io55) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 56 (io56) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 57 (io57) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 58 (io58) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 59 (io59) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 60 (io60) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 61 (io61) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 62 (io62) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 63 (io63) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 64 (io64) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 65 (io65) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 66 (io66) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 67 (io67) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 68 (io68) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 69 (io69) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 70 (io70) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 71 (io71) on rt2880-pinmux
 [    0.080000] pinctrl core: registered pin 72 (io72) on rt2880-pinmux
 [    0.080000] pinctrl core: add 0 pinmux maps
 [    0.080000] rt2880-pinmux pinctrl.1: failed to lookup the default state
 [    0.080000] rt2880-pinmux pinctrl.1: failed to lookup the sleep state
 [    0.490000] PCIE0 no card, disable it(RST&CLK)
 [    0.500000] bio: create slab <bio-0> at 0
 [    0.510000] rt2880_gpio 10000600.gpio: registering 24 gpios
 [    0.510000] rt2880_gpio 10000600.gpio: registering 24 irq handlers
 [    0.520000] PCI host bridge to bus 0000:00
 [    0.520000] pci_bus 0000:00: root bus resource [mem
 0x20000000-0x2fffffff]
 [    0.530000] pci_bus 0000:00: root bus resource [io
 0x10160000-0x1016ffff]
 [    0.530000] pci_bus 0000:00: No busn resource found for root bus, will
 use [bus 00-ff]
 [    0.540000] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
 [    0.540000] Switching to clocksource MIPS
 [    0.540000] NET: Registered protocol family 2
 [    0.550000] TCP established hash table entries: 1024 (order: 1, 8192
 bytes)
 [    0.550000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
 [    0.560000] TCP: Hash tables configured (established 1024 bind 1024)
 [    0.560000] TCP: reno registered
 [    0.570000] UDP hash table entries: 256 (order: 0, 4096 bytes)
 [    0.570000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
 [    0.580000] NET: Registered protocol family 1
 [    0.580000] PCI: CLS 0 bytes, default 32
 [    0.580000] rt-timer 10000100.timer: maximum frequncy is 2441Hz
 [    0.590000] alarmtimer alarmtimer: no of_node; not parsing pinctrl DT
 [    0.600000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
 [    0.610000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME)
 (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
 [    0.620000] msgmni has been set to 247
 [    0.630000] io scheduler noop registered
 [    0.630000] io scheduler deadline registered (default)
 [    0.640000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
 [    0.640000] serial8250 serial8250: no of_node; not parsing pinctrl DT
 [    0.640000] pinctrl core: add 1 pinmux maps
 [    0.640000] rt2880-pinmux pinctrl.1: found group selector 3 for
 uartlite
 [    0.640000] rt2880-pinmux pinctrl.1: request pin 15 (io15) for
 10000c00.uartlite
 [    0.640000] rt2880-pinmux pinctrl.1: request pin 16 (io16) for
 10000c00.uartlite
 [    0.640000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20) is a
 16550A
 [    0.650000] console [ttyS0] enabled, bootconsole disabled
 [    0.680000] pinctrl core: add 1 pinmux maps
 [    0.680000] rt2880-pinmux pinctrl.1: found group selector 2 for spi
 [    0.680000] rt2880-pinmux pinctrl.1: request pin 3 (io3) for
 10000b00.spi
 [    0.680000] rt2880-pinmux pinctrl.1: request pin 4 (io4) for
 10000b00.spi
 [    0.680000] rt2880-pinmux pinctrl.1: request pin 5 (io5) for
 10000b00.spi
 [    0.680000] rt2880-pinmux pinctrl.1: request pin 6 (io6) for
 10000b00.spi
 [    0.680000] m25p80 spi32766.0: found w25q128, expected en25q64
 [    0.690000] m25p80 spi32766.0: w25q128 (16384 Kbytes)
 [    0.700000] 4 ofpart partitions found on MTD device spi32766.0
 [    0.710000] Creating 4 MTD partitions on "spi32766.0":
 [    0.720000] 0x000000000000-0x000000030000 : "u-boot"
 [    0.730000] 0x000000030000-0x000000040000 : "u-boot-env"
 [    0.740000] 0x000000040000-0x000000050000 : "factory"
 [    0.760000] 0x000000050000-0x000000800000 : "firmware"
 [    0.770000] 0x000000152b39-0x000000800000 : "rootfs"
 [    0.780000] mtd: partition "rootfs" must either start or end on erase
 block boundary or be smaller than an erase block -- forcing read-only
 [    0.810000] mtd: device 4 (rootfs) set to be root filesystem
 [    0.820000] mtd: partition "rootfs_data" created automatically,
 ofs=0x390000, len=0x470000
 [    0.830000] 0x000000390000-0x000000800000 : "rootfs_data"
 [    0.850000] pinctrl core: add 1 pinmux maps
 [    0.850000] rt2880-pinmux pinctrl.1: found group selector 12 for ephy
 [    0.850000] rt2880-pinmux pinctrl.1: request pin 40 (io40) for
 10100000.ethernet
 [    0.850000] rt2880-pinmux pinctrl.1: request pin 41 (io41) for
 10100000.ethernet
 [    0.850000] rt2880-pinmux pinctrl.1: request pin 42 (io42) for
 10100000.ethernet
 [    0.850000] rt2880-pinmux pinctrl.1: request pin 43 (io43) for
 10100000.ethernet
 [    0.850000] rt2880-pinmux pinctrl.1: request pin 44 (io44) for
 10100000.ethernet
 [    0.850000] gsw: setting port4 to ephy mode
 [    0.860000] (unregistered net_device): port 0 link up (100Mbps/Full
 duplex)
 [    0.860000] (unregistered net_device): port 2 link up (100Mbps/Full
 duplex)
 [    0.890000] ralink_soc_eth 10100000.ethernet: loaded mt7530 driver
 [    0.900000] eth0: done loading
 [    0.910000] rt3xxx-usbphy ubsphy.3: loaded
 [    0.920000] rt2880_wdt 10000120.watchdog: Initialized
 [    0.930000] TCP: cubic registered
 [    0.930000] NET: Registered protocol family 17
 [    0.940000] 8021q: 802.1Q VLAN Support v1.8
 [    0.970000] VFS: Mounted root (squashfs filesystem) readonly on device
 31:4.
 [    0.980000] Freeing unused kernel memory: 180K (802e3000 - 80310000)
 [    7.040000] usbcore: registered new interface driver usbfs
 [    7.050000] usbcore: registered new interface driver hub
 [    7.060000] usbcore: registered new device driver usb
 [    7.080000] rt2880-pinmux pinctrl.1: request pin 12 (io12) for pio:12
 [    7.080000] rt2880-pinmux pinctrl.1: pin 12 is not set to gpio mux
 [    7.090000] rt2880-pinmux pinctrl.1: request() failed for pin 12
 [    7.100000] rt2880-pinmux pinctrl.1: pin-12 (pio:12) status -22
 [    7.110000] gpio-keys gpio-keys-polled.4: unable to claim gpio 12,
 err=-22
 [    7.130000] gpio-keys: probe of gpio-keys-polled.4 failed with error
 -22
 [   12.660000] NET: Registered protocol family 10
 [   12.680000] nf_conntrack version 0.5.0 (1980 buckets, 7920 max)
 [   12.700000] ip6_tables: (C) 2000-2006 Netfilter Core Team
 [   12.720000] Loading modules backported from Linux version
 master-2014-05-22-0-gf2032ea
 [   12.730000] Backport generated by backports.git
 backports-20140320-37-g5c33da0
 [   12.750000] ip_tables: (C) 2000-2006 Netfilter Core Team
 [   12.820000] xt_time: kernel timezone is -0000
 [   12.850000] cfg80211: Calling CRDA to update world regulatory domain
 [   12.870000] cfg80211: World regulatory domain updated:
 [   12.880000] cfg80211:  DFS Master region: unset
 [   12.890000] cfg80211:   (start_freq - end_freq @ bandwidth),
 (max_antenna_gain, max_eirp), (dfs_cac_time)
 [   12.910000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A,
 2000 mBm), (N/A)
 [   12.930000] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A,
 2000 mBm), (N/A)
 [   12.940000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A,
 2000 mBm), (N/A)
 [   12.960000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A,
 2000 mBm), (N/A)
 [   12.980000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A,
 2000 mBm), (N/A)
 [   12.990000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz),
 (N/A, 0 mBm), (N/A)
 [   13.050000] PPP generic driver version 2.4.2
 [   13.060000] NET: Registered protocol family 24
 [   20.710000] eth0: port 2 link down
 [   21.750000] device eth0.1 entered promiscuous mode
 [   21.760000] device eth0 entered promiscuous mode
 [   21.780000] br-lan: port 1(eth0.1) entered forwarding state
 [   21.790000] br-lan: port 1(eth0.1) entered forwarding state
 [   21.960000] jffs2_scan_eraseblock(): End of filesystem marker found at
 0x0
 [   22.010000] jffs2_build_filesystem(): unlocking the mtd device... done.
 [   23.790000] br-lan: port 1(eth0.1) entered forwarding state
 [   24.500000] eth0: port 2 link up (100Mbps/Full duplex)
 [   22.020000] jffs2_build_filesystem(): erasing all blocks after the end
 marker... done.
 [   64.770000] jffs2: notice: (830) jffs2_build_xattr_subsystem: complete
 building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of
 xref (0 dead, 0 orphan) found.

 }}}

--
Ticket URL: <https://dev.openwrt.org/ticket/16931>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to