#20331: Support for MAC1200R 2.0 (mt7628 + mt7612)
--------------------------------+----------------------------------
Reporter: tomxieup@… | Owner: developers
Type: defect | Status: new
Priority: high | Milestone: Chaos Calmer (trunk)
Component: packages | Version: Trunk
Keywords: mt76 mt7612 mt7628 |
--------------------------------+----------------------------------
My Mercury wifi box chipset is mt7628an + mt7612en.
Its product name is Mercury MAC1200R 2.0, which has totally different
hardware with this[http://wiki.openwrt.org/toh/mercury/mac1200r].
I wrote a test DTS file and flashed my openwrt image into the box, but the
router seems deadlocked when loading the mt7612 firmware.
Thanks in advance.
== My DTSI file content: ==
/ {
#address-cells = <1>;
#size-cells = <1>;
compatible = "ralink,mtk7628an-soc";
cpus {
cpu@0 {
compatible = "mips,mips24KEc";
};
};
chosen {
bootargs = "console=ttyS0,57600";
};
cpuintc: cpuintc@0 {
#address-cells = <0>;
#interrupt-cells = <1>;
interrupt-controller;
compatible = "mti,cpu-interrupt-controller";
};
palmbus@10000000 {
compatible = "palmbus";
reg = <0x10000000 0x200000>;
ranges = <0x0 0x10000000 0x1FFFFF>;
#address-cells = <1>;
#size-cells = <1>;
sysc@0 {
compatible = "ralink,mt7620a-sysc";
reg = <0x0 0x100>;
};
timer@100 {
compatible = "ralink,mt7620a-timer",
"ralink,rt2880-timer";
reg = <0x100 0x20>;
interrupt-parent = <&intc>;
interrupts = <1>;
};
watchdog@120 {
compatible = "ralink,mt7628an-wdt",
"mtk,mt7621-wdt";
reg = <0x120 0x10>;
resets = <&rstctrl 8>;
reset-names = "wdt";
interrupt-parent = <&intc>;
interrupts = <24>;
};
intc: intc@200 {
compatible = "ralink,mt7628an-intc",
"ralink,rt2880-intc";
reg = <0x200 0x100>;
resets = <&rstctrl 9>;
reset-names = "intc";
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&cpuintc>;
interrupts = <2>;
ralink,intc-registers = <0x9c 0xa0
0x6c 0xa4
0x80 0x78>;
};
memc@300 {
compatible = "ralink,mt7620a-memc",
"ralink,rt3050-memc";
reg = <0x300 0x100>;
resets = <&rstctrl 20>;
reset-names = "mc";
interrupt-parent = <&intc>;
interrupts = <3>;
};
gpio@600 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "mtk,mt7628-gpio", "mtk,mt7621-gpio";
reg = <0x600 0x100>;
gpio0: bank@0 {
reg = <0>;
compatible = "mtk,mt7621-gpio-bank";
gpio-controller;
#gpio-cells = <2>;
};
gpio1: bank@1 {
reg = <1>;
compatible = "mtk,mt7621-gpio-bank";
gpio-controller;
#gpio-cells = <2>;
};
gpio2: bank@2 {
reg = <2>;
compatible = "mtk,mt7621-gpio-bank";
gpio-controller;
#gpio-cells = <2>;
};
};
spi@b00 {
compatible = "ralink,mt7621-spi";
reg = <0xb00 0x100>;
resets = <&rstctrl 18>;
reset-names = "spi";
#address-cells = <1>;
#size-cells = <1>;
pinctrl-names = "default";
pinctrl-0 = <&spi_pins>;
status = "disabled";
};
uartlite@c00 {
compatible = "ns16550a";
reg = <0xc00 0x100>;
reg-shift = <2>;
reg-io-width = <4>;
no-loopback-test;
resets = <&rstctrl 12>;
reset-names = "uartl";
interrupt-parent = <&intc>;
interrupts = <20>;
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins>;
};
uart1@d00 {
compatible = "ns16550a";
reg = <0xd00 0x100>;
reg-shift = <2>;
reg-io-width = <4>;
no-loopback-test;
resets = <&rstctrl 19>;
reset-names = "uart1";
interrupt-parent = <&intc>;
interrupts = <21>;
pinctrl-names = "default";
pinctrl-0 = <&uart1_pins>;
status = "disabled";
};
uart2@e00 {
compatible = "ns16550a";
reg = <0xe00 0x100>;
reg-shift = <2>;
reg-io-width = <4>;
no-loopback-test;
resets = <&rstctrl 20>;
reset-names = "uart2";
interrupt-parent = <&intc>;
interrupts = <22>;
pinctrl-names = "default";
pinctrl-0 = <&uart2_pins>;
status = "disabled";
};
};
pinctrl {
compatible = "ralink,rt2880-pinmux";
pinctrl-names = "default";
pinctrl-0 = <&state_default>;
state_default: pinctrl0 {
};
spi_pins: spi {
spi {
ralink,group = "spi";
ralink,function = "spi";
};
};
uart0_pins: uartlite {
uartlite {
ralink,group = "uart0";
ralink,function = "uart0";
};
};
uart1_pins: uart1 {
uart1 {
ralink,group = "uart1";
ralink,function = "uart1";
};
};
uart2_pins: uart2 {
uart2 {
ralink,group = "uart2";
ralink,function = "uart2";
};
};
sdxc_pins: sdxc {
sdxc {
ralink,group = "sdmode";
ralink,function = "sdxc";
};
};
};
rstctrl: rstctrl {
compatible = "ralink,mt7620a-reset",
"ralink,rt2880-reset";
#reset-cells = <1>;
};
usbphy: usbphy {
compatible = "ralink,mt7628an-usbphy", "ralink,mt7620a-
usbphy";
#phy-cells = <1>;
resets = <&rstctrl 22>;
reset-names = "host";
};
sdhci@10130000 {
compatible = "ralink,mt7620-sdhci";
reg = <0x10130000 4000>;
interrupt-parent = <&intc>;
interrupts = <14>;
pinctrl-names = "default";
pinctrl-0 = <&sdxc_pins>;
status = "disabled";
};
ehci@101c0000 {
compatible = "ralink,rt3xxx-ehci";
reg = <0x101c0000 0x1000>;
phys = <&usbphy 1>;
phy-names = "usb";
interrupt-parent = <&intc>;
interrupts = <18>;
};
ohci@101c1000 {
compatible = "ralink,rt3xxx-ohci";
reg = <0x101c1000 0x1000>;
phys = <&usbphy 1>;
phy-names = "usb";
interrupt-parent = <&intc>;
interrupts = <18>;
};
ethernet@10100000 {
compatible = "ralink,rt5350-eth";
reg = <0x10100000 10000>;
interrupt-parent = <&cpuintc>;
interrupts = <5>;
resets = <&rstctrl 21 &rstctrl 23>;
reset-names = "fe", "esw";
port@5 {
compatible = "ralink,mt7620a-gsw-port", "ralink
,eth-port";
reg = <5>;
status = "disabled";
};
};
esw@10110000 {
compatible = "ralink,rt3050-esw";
reg = <0x10110000 8000>;
resets = <&rstctrl 23>;
reset-names = "esw";
interrupt-parent = <&intc>;
interrupts = <17>;
};
pcie@10140000 {
compatible = "mediatek,mt7620-pci";
reg = <0x10140000 0x100
0x10142000 0x100>;
#address-cells = <3>;
#size-cells = <2>;
resets = <&rstctrl 26>;
reset-names = "pcie0";
interrupt-parent = <&cpuintc>;
interrupts = <4>;
status = "disabled";
device_type = "pci";
bus-range = <0 255>;
ranges = <
0x02000000 0 0x00000000 0x20000000 0 0x10000000 /*
pci memory */
0x01000000 0 0x00000000 0x10160000 0 0x00010000 /*
io space */
>;
pcie-bridge {
reg = <0x0000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
device_type = "pci";
};
};
wmac@10180000 {
compatible = "ralink,rt7620-wmac", "ralink,rt2880-wmac";
reg = <0x10180000 40000>;
interrupt-parent = <&cpuintc>;
interrupts = <6>;
ralink,eeprom = "soc_wmac.eeprom";
};
};
== My DTS file content: ==
/dts-v1/;
/include/ "mw1200r.dtsi"
/ {
compatible = "mediatek,mt7628an-eval-board", "mediatek,mt7628an-
soc";
model = "Mercury MW1200R";
memory@0 {
device_type = "memory";
reg = <0x0 0x2000000>;
};
palmbus@10000000 {
spi@b00 {
status = "okay";
m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "w25q128";
reg = <0 0>;
linux,modalias = "m25p80", "w25q128";
spi-max-frequency = <10000000>;
m25p,chunked-io = <32>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
};
partition@50000 {
label = "firmware";
reg = <0x50000 0xf80000>;
};
partition@fd0000 {
label = "crash";
reg = <0xfd0000 0x10000>;
};
partition@fe0000 {
label = "reserved";
reg = <0xfe0000 0x10000>;
read-only;
};
partition@ff0000 {
label = "Bdata";
reg = <0xff0000 0x10000>;
};
};
};
};
ethernet@10100000 {
pinctrl-names = "default";
mtd-mac-address = <&factory 0x4>;
ralink,port-map = "llllw";
};
wmac@10180000 {
ralink,mtd-eeprom = <&factory 0x4>;
};
pcie@10140000 {
status = "okay";
pcie-bridge {
mt76@0,0 {
reg = <0x0000 0 0 0 0>;
device_type = "pci";
mediatek,mtd-eeprom = <&factory 0x8000>;
mediatek,2ghz = <0>;
};
};
};
pinctrl {
state_default: pinctrl0 {
gpio {
ralink,group = "i2c";
ralink,function = "gpio";
};
};
};
gpio-leds {
compatible = "gpio-leds";
green {
label = "mw1200r:green:status";
gpios = <&gpio1 0 1>;
};
};
gpio-keys-polled {
compatible = "gpio-keys-polled";
#address-cells = <1>;
#size-cells = <0>;
poll-interval = <20>;
reset {
label = "reset";
gpios = <&gpio1 6 0>;
linux,code = <0x198>;
};
};
};
== Booting log from minicom: ==
[ 0.000000] Linux version 3.18.20 (tom@xxxxxx) (gcc version 4.8.3
(OpenWrt/Linaro GCC 4.8-2014.04 r46569) ) #4 Sat Aug 15 19:04:25 CST 2015
[ 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 MT7628AN ver:1 eco:2
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019655 (MIPS 24KEc)
[ 0.000000] MIPS: machine is Mercury MW1200R
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 02000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x00000000-0x01ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x00000000-0x01ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x00000000-0x01ffffff]
[ 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] Built 1 zonelists in Zone order, mobility grouping on.
Total pages: 8128
[ 0.000000] Kernel command line: console=ttyS0,57600
rootfstype=squashfs,jffs2
[ 0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384
bytes)
[ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Writing ErrCtl register=0000000c
[ 0.000000] Readback ErrCtl register=0000000c
[ 0.000000] Memory: 28856K/32768K available (2531K kernel code, 130K
rwdata, 520K rodata, 136K init, 210K bss, 3912K reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:256
[ 0.000000] intc: using register map from devicetree
[ 0.000000] CPU Clock: 580MHz
[ 0.000000] clocksource_of_init: no matching clocksources found
[ 0.000000] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[ 0.060000] pid_max: default: 32768 minimum: 301
[ 0.060000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.070000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096
bytes)
[ 0.080000] pinctrl core: initialized pinctrl subsystem
[ 0.090000] NET: Registered protocol family 16
[ 0.200000] mt7620-pci 10140000.pcie: Port 0 N_FTS = 1b105000
[ 0.350000] PCI host bridge /pcie@10140000 ranges:
[ 0.360000] MEM 0x0000000020000000..0x000000002fffffff
[ 0.370000] IO 0x0000000010160000..0x000000001016ffff
[ 0.390000] mt7621_gpio 10000600.gpio: registering 32 gpios
[ 0.400000] mt7621_gpio 10000600.gpio: registering 32 gpios
[ 0.410000] mt7621_gpio 10000600.gpio: registering 32 gpios
[ 0.420000] PCI host bridge to bus 0000:00
[ 0.420000] pci_bus 0000:00: root bus resource [mem
0x20000000-0x2fffffff]
[ 0.430000] pci_bus 0000:00: root bus resource [io 0xffffffff]
[ 0.440000] pci_bus 0000:00: No busn resource found for root bus, will
use [bus 00-ff]
[ 0.450000] pci 0000:00:00.0: bridge configuration invalid ([bus
00-00]), reconfiguring
[ 0.460000] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[ 0.470000] pci 0000:00:00.0: BAR 0: failed to assign [mem size
0x80000000]
[ 0.480000] pci 0000:00:00.0: BAR 8: assigned [mem
0x20000000-0x200fffff]
[ 0.490000] pci 0000:00:00.0: BAR 9: assigned [mem
0x20100000-0x201fffff pref]
[ 0.500000] pci 0000:00:00.0: BAR 1: assigned [mem
0x20200000-0x2020ffff]
[ 0.510000] pci 0000:01:00.0: BAR 0: assigned [mem
0x20000000-0x200fffff 64bit]
[ 0.520000] pci 0000:01:00.0: BAR 6: assigned [mem
0x20100000-0x2010ffff pref]
[ 0.530000] pci 0000:00:00.0: PCI bridge to [bus 01]
[ 0.530000] pci 0000:00:00.0: bridge window [mem
0x20000000-0x200fffff]
[ 0.540000] pci 0000:00:00.0: bridge window [mem
0x20100000-0x201fffff pref]
[ 0.550000] pci 0000:00:00.0: card - bus=0x0, slot = 0x0 irq=0
[ 0.560000] pci 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
[ 0.570000] Switched to clocksource MIPS
[ 0.580000] NET: Registered protocol family 2
[ 0.580000] TCP established hash table entries: 1024 (order: 0, 4096
bytes)
[ 0.600000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.610000] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.620000] TCP: reno registered
[ 0.630000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.640000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.650000] NET: Registered protocol family 1
[ 0.660000] rt-timer 10000100.timer: maximum frequency is 2441Hz
[ 0.680000] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.710000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.720000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME)
(CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.740000] msgmni has been set to 56
[ 0.750000] io scheduler noop registered
[ 0.750000] io scheduler deadline registered (default)
[ 0.760000] drivers/phy/phy-ralink-usb.c:ralink_usb_phy_probe[147]
[ 0.780000] drivers/phy/phy-ralink-usb.c:ralink_usb_phy_probe[161]
[ 0.790000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 0.800000] console [ttyS0] disabled
[ 0.810000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 28,
base_baud = 2500000) is a 16550A
[ 0.830000] console [ttyS0] enabled
[ 0.830000] console [ttyS0] enabled
[ 0.840000] bootconsole [early0] disabled
[ 0.840000] bootconsole [early0] disabled
[ 0.860000] kgdb: Registered I/O driver kgdbts.
[ 0.870000] kgdbts:RUN plant and detach test
[ 0.880000] kgdbts:RUN sw breakpoint test
[ 0.880000] kgdbts:RUN bad memory access test
[ 0.890000] kgdbts:RUN singlestep test 1000 iterations
[ 0.910000] kgdbts:RUN singlestep [0/1000]
[ 1.100000] kgdbts:RUN singlestep [100/1000]
[ 1.290000] kgdbts:RUN singlestep [200/1000]
[ 1.480000] kgdbts:RUN singlestep [300/1000]
[ 1.670000] kgdbts:RUN singlestep [400/1000]
[ 1.860000] kgdbts:RUN singlestep [500/1000]
[ 2.050000] kgdbts:RUN singlestep [600/1000]
[ 2.240000] kgdbts:RUN singlestep [700/1000]
[ 2.430000] kgdbts:RUN singlestep [800/1000]
[ 2.620000] kgdbts:RUN singlestep [900/1000]
[ 2.810000] kgdbts:RUN do_fork for 100 breakpoints
[ 2.840000] m25p80 spi32766.0: w25q128 (16384 Kbytes)
[ 2.850000] m25p80 spi32766.0: using chunked io
[ 2.860000] 7 ofpart partitions found on MTD device spi32766.0
[ 2.870000] Creating 7 MTD partitions on "spi32766.0":
[ 2.890000] 0x000000000000-0x000000030000 : "u-boot"
[ 2.900000] 0x000000030000-0x000000040000 : "u-boot-env"
[ 2.910000] 0x000000040000-0x000000050000 : "factory"
[ 2.920000] 0x000000050000-0x000000fd0000 : "firmware"
[ 3.010000] 2 uimage-fw partitions found on MTD device firmware
[ 3.030000] 0x000000050000-0x000000167f2b : "kernel"
[ 3.040000] 0x000000167f2b-0x000000fd0000 : "rootfs"
[ 3.050000] mtd: device 5 (rootfs) set to be root filesystem
[ 3.060000] 1 squashfs-split partitions found on MTD device rootfs
[ 3.070000] 0x0000003b0000-0x000000fd0000 : "rootfs_data"
[ 3.080000] 0x000000fd0000-0x000000fe0000 : "crash"
[ 3.090000] 0x000000fe0000-0x000000ff0000 : "reserved"
[ 3.110000] 0x000000ff0000-0x000001000000 : "Bdata"
[ 3.140000] ralink_soc_eth 10100000.ethernet eth0: ralink at
0xb0100000, irq 5
[ 3.150000] mt7621_wdt 10000120.watchdog: Initialized
[ 3.160000] TCP: cubic registered
[ 3.170000] NET: Registered protocol family 17
[ 3.180000] bridge: automatic filtering via arp/ip/ip6tables has been
deprecated. Update your scripts to load br_netfilter if you need this.
[ 3.200000] 8021q: 802.1Q VLAN Support v1.8
[ 3.270000] VFS: Mounted root (squashfs filesystem) readonly on device
31:5.
[ 3.280000] Freeing unused kernel memory: 136K (8031e000 - 80340000)
[ 5.300000] init: Console is alive
[ 5.310000] init: - watchdog -
[ 7.370000] init: - preinit -
[ 8.270000] rt305x-esw 10110000.esw: link changed 0x00
[ 8.460000] random: mktemp urandom read with 13 bits of entropy
available
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug
level
[ 9.880000] kgdb: Unregistered I/O driver kgdbts, debugger disabled.
[ 11.710000] mount_root: jffs2 not ready yet, using temporary tmpfs
overlay
[ 11.750000] procd: - early -
[ 11.750000] procd: - watchdog -
[ 11.920000] rt305x-esw 10110000.esw: link changed 0x04
[ 12.610000] procd: - ubus -
[ 13.620000] procd: - init -
Please press Enter to activate this console.
[ 14.530000] NET: Registered protocol family 10
[ 14.540000] tun: Universal TUN/TAP device driver, 1.6
[ 14.550000] tun: (C) 1999-2004 Max Krasnyansky <[email protected]>
[ 14.570000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 14.590000] Loading modules backported from Linux version
master-2015-07-21-0-g47cd203
[ 14.610000] Backport generated by backports.git
backports-20150626-0-gc1a4168
[ 14.650000] cfg80211: World regulatory domain updated:
[ 14.660000] cfg80211: DFS Master region: unset
[ 14.660000] cfg80211: (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp), (dfs_cac_time)
[ 14.680000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A,
2000 mBm), (N/A)
[ 14.700000] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A,
2000 mBm), (N/A)
[ 14.720000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A,
2000 mBm), (N/A)
[ 14.730000] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000
KHz AUTO), (N/A, 2000 mBm), (N/A)
[ 14.750000] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000
KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 14.770000] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A,
2000 mBm), (0 s)
[ 14.790000] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A,
2000 mBm), (N/A)
[ 14.800000] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz),
(N/A, 0 mBm), (N/A)
[ 14.860000] mt76pci 0000:01:00.0: ASIC revision: 76120044
[ 14.870000] mt76pci 0000:01:00.0: devm_request_irq ok.
[ 14.880000] mt76pci 0000:01:00.0: Invalid MAC address, using random
address ea:19:ff:9e:a1:33
[ 14.920000] ROM patch already applied
[ 14.930000] Firmware Version: 0.0.00
[ 14.930000] Build: 1
[ 14.940000] Build Time: 201410061140____ ( <------'''Dead at
here''' )
--
Ticket URL: <https://dev.openwrt.org/ticket/20331>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets