User Tools

Site Tools


toh:nexx:wt1520

Nexx WT1520 (models F H)

A portable router with amazingly small size. It provides 150MBit/s 802.11bgn wireless connectivity, two Fast Ethernet port as well as one USB port.
Note: Many of these routers are marketed as a "3G travel router" but none actually include a 3G modem - the marketing term rather means that the OEM firmware supports USB 3G modems because it contains drivers for USB modems! Ignore that, because with OpenWrt ANY router with USB supports 3G hardware… ;-)

OpenWrt support

Known models

There are two versions (according to this image) with different specifications:

Model USB ports Flash memory Description OpenWrt support
WT1520H 1 4 MB Wireless router R42867
WT1520F 1 8 MB Wireless router R42867

Hardware Highlights

CPU Ram Flash Network USB Serial JTag
Ralink RT5350 @ 360MHz 32 MiB 4/8 MiB 2 (switched) 1 Yes ?

Installation

You can find the download images from the LEDE project (based on OpenWrt) 4MB 8MB Use the 4MB or the 8MB image according to your device's flash memory size, install via factory firmware web-UI.

Actual instructions to flash firmware are on openwrt forum in this thread

After power-on Ralink's u-boot waits in the the following dialog for 5 seconds:

Please choose the operation: 
   1: Load system code to SDRAM via TFTP. 
   2: Load system code then write to Flash via TFTP. 
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial. 
   9: Load Boot Loader code then write to Flash via TFTP. 

2 asks for TFTP client and server IPs and an image name to download. Following a successful TFTP transfer, it will automatically erase and rewrite mtd3 ("Kernel").

4 drops into a regular u-boot command line. Some notable features:

  • cp has a cp.linux and cp.uboot variant.
  • Similarly, there are erase linux, erase uboot and erase all commands.

The linux keyword refers to mtd3 ("Kernel"), uboot to mtd0. Internally, u-boot maps the flash device to address BC000000. The mtd3 partition is at BC050000.

Here are a command line invocations which manually perform the TFTP upgrade similarly to operation #2:

RT5350 # setenv ipaddr 192.168.1.1
RT5350 # setenv serverip 192.168.1.100
RT5350 # tftp 8a100000 openwrt-ramips-rt305x-wt1520-4M-squashfs-sysupgrade.bin
RT5350 # erase linux
RT5350 # cp.linux

The loader wants to find a valid sysupgrade image checksum in mtd3 to boot.

OEM installation using the TFTP method

Original firmware telnet login

Out of the box, you can connect the device to your Ethernet network using the WAN ethernet port (the one next to the edge of the board). It will grab an IP address from the network using DHCP. You then can log in to the device using telnet like this:

$ telnet <IP address assigned by DHCP>

Escape character is '^]'.

(none) login: nexxadmin
Password: y1n2inc.com0755

Basic configuration

Basic configuration After flashing, proceed with this.
Set up your Internet connection, configure wireless, configure USB port, etc.

Specific Configuration

Interfaces

The default network configuration is:

Interface Name Description Default configuration
br-lan LAN (& eventually WiFi) 192.168.8.1/24
eth0 LAN port None

Failsafe mode

Hardware

There are 3 GPIO pins available (for example for I2C bus) as shown in the picture bellow.

Info

Instruction set: MIPS
Vendor: Ralink
bootloader: U-Boot
System-On-Chip: RT5350F (MIPS 24Kc V7.4)
CPU/Speed 24Kc V7.4 360 Mhz
Flash-Chip: Winbond W25Q32BV
Flash size: 4096 KiB
RAM-Chip: EtronTech EM63A165TS
RAM: 32 MiB
Wireless: Ralink RT5350 2.4ghz 802.11bgn
Ethernet: Ralink RT5350 Fast Ethernet
USB: Yes
Serial: Yes
JTAG: ?

Ram chip manual http://www.etron.com/manager/uploads/EM63A165TS_v1.4.pdf

Photos

Model Number

FIXME Note: This will void your warranty!

  • Cover is held by 4 plastic notches

Serial

port.serial general information about the serial port, serial port cable, etc.

How to connect to the Serial Port of this specific device:

Two test points of the center of a board are TX and RX. The USB connector side is TX. Serial speed is 57600 baud. There's a large ground pad near the antenna test point.

JTAG

port.jtag general information about the JTAG port, JTAG cable, etc.

Debricking

generic.debrick

If the bootloader is still working, you can use it to restore your backup of mtd3. The procedure is the same as for installing the OpenWRT image

Tip for backing up the original flash: The factory mtd3 system does not have an sshd or ssh/scp, but runs proftpd. You can use cp to make /dev/mtd{0,1,2,3} copies in the ftp root and download them one by one.

Bootlogs

OEM bootlog

U-Boot 1.1.3 (Sep 13 2012 - 16:39:43) Board: Ralink APSoC DRAM: 32 MB relocate_code Pointer at: 81fb4000 spi_wait_nsec: 42 spi device id: ef 40 16 0 0 (40160000) find flash: W25Q32BV raspi_read: from:30000 len:1000 .*** Warning - bad CRC, using default environment ============================================ Ralink UBoot Version: 4.0.1.0 -------------------------------------------- ASIC 5350_MP (Port5<->None) DRAM_CONF_FROM: Boot-Strapping DRAM_TYPE: SDRAM DRAM_SIZE: 256 Mbits DRAM_WIDTH: 16 bits DRAM_TOTAL_WIDTH: 16 bits TOTAL_MEMORY_SIZE: 32 MBytes Flash component: SPI Flash Date:Sep 13 2012 Time:16:39:43 ============================================ icache: sets:256, ways:4, linesz:32 ,total:32768 dcache: sets:128, ways:4, linesz:32 ,total:16384 ##### The CPU freq = 360 MHZ #### estimate memory size =32 Mbytes Please choose the operation: 1: Load system code to SDRAM via TFTP. 2: Load system code then write to Flash via TFTP. 3: Boot system code via Flash (default). 4: Entr boot command line interface. 7: Load Boot Loader code then write to Flash via Serial. 9: Load Boot Loader code then write to Flash via TFTP. You choosed 3  0 3: System Boot system code via Flash. ## Booting image at bc050000 ... raspi_read: from:50000 len:40 . Image Name: Linux Kernel Image Created: 2014-01-16 10:16:49 UTC Image Type: MIPS Linux Kernel Image (lzma compressed) Data Size: 3791147 Bytes = 3.6 MB Load Address: 80000000 Entry Point: 80414000 raspi_read: from:50040 len:39d92b .......................................................... Verifying Checksum ... OK Uncompressing Kernel Image ... OK No initrd ## Transferring control to Linux (at address 80414000) ... ## Giving linux memsize in MB, 32 Starting kernel ... LINUX started... THIS IS ASIC Linux version 2.6.21 (root@localhost.localdomain) (gcc version 3.4.2) #1209 Thu Jan 16 18:16:17 CST 2014 The CPU feqenuce set to 360 MHz CPU revision is: 0001964c Determined physical RAM map: memory: 02000000 @ 00000000 (usable) Initrd not found or empty - disabling initrd Built 1 zonelists. Total pages: 8128 Kernel command line: console=ttyS1,57600n8 root=/dev/ram0 Primary instruction cache 32kB, physically tagged, 4-way, linesize 32 bytes. Primary data cache 16kB, 4-way, linesize 32 bytes. Synthesized TLB refill handler (20 instructions). Synthesized TLB load handler fastpath (32 instructions). Synthesized TLB store handler fastpath (32 instructions). Synthesized TLB modify handler fastpath (31 instructions). Cache parity protection disabled cause = c0808010, status = 11000000 PID hash table entries: 128 (order: 7, 512 bytes) calculating r4koff... 0015f900(1440000) CPU frequency 360.00 MHz Using 0.050 MHz high precision timer. Console: colour dummy device 80x25 Dentry cache hash table entries: 4096 (order: 2, 16384 bytes) Inode-cache hash table entries: 2048 (order: 1, 8192 bytes) Memory: 25584k/32768k available (3287k kernel code, 7184k reserved, 884k data, 2452k init, 0k highmem) Mount-cache hash table entries: 512 NET: Registered protocol family 16 usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb NET: Registered protocol family 2 Time: MIPS clocksource has been installed. IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 1024 (order: 1, 8192 bytes) TCP bind hash table entries: 1024 (order: 0, 4096 bytes) TCP: Hash tables configured (established 1024 bind 1024) TCP reno registered detected lzma initramfs detected lzma initramfs initramfs: LZMA lc=3,lp=0,pb=2,dictSize=1048576,origSize=9521664 LZMA initramfs by Ming-Ching Tiew <mctiew@yahoo.com>..................................................................................................................................................deice id : ef 40 16 0 0 (40160000) Warning: un-recognized chip ID, please update SPI driver! EN25MAX(ef 40170000) (8192 Kbytes) mtd .name = raspi, .size = 0x00800000 (8M) .erasesize = 0x00010000 (64K) .numeraseregions = 0 Creating 4 MTD partitions on "raspi": 0x00000000-0x00030000 : "Bootloader" 0x00030000-0x00040000 : "Config" 0x00040000-0x00050000 : "Factory" 0x00050000-0x00400000 : "Kernel" Load Ralink DFS Timer Module RT3xxx EHCI/OHCI init. squashfs: version 3.2-r2 (2007/01/15) Phillip Lougher squashfs: LZMA suppport for slax.org by jro NTFS driver 2.1.28 [Flags: R/W]. fuse init (API version 7.8) io scheduler noop registered (default) HDLC line discipline: version $Revision: 1.1.1.1 $, maxframe=4096 N_HDLC line discipline registered. Serial: 8250/16550 driver $Revision: 1.7 $ 2 ports, IRQ sharing disabled serial8250: ttyS0 at I/O 0xb0000500 (irq = 37) is a 16550A serial8250: ttyS1 at I/O 0xb0000c00 (irq = 12) is a 16550A RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize loop: loaded (max 8 devices) rdm_major = 254 MAC_ADRH -- : 0x00000000 MAC_ADRL -- : 0x00000000 Ralink APSoC Ethernet Driver Initilization. v2.0 256 rx/tx descriptors allocated, mtu = 1500! MAC_ADRH -- : 0x00008c88 MAC_ADRL -- : 0x2b002982 PROC INIT OK! PPP generic driver version 2.4.2 PPP Deflate Compression module registered PPP BSD Compression module registered PPP MPPE Compression module registered NET: Registered protocol family 24 PPPoL2TP kernel driver, V0.17 PPTP driver version 0.8.1 === pAd = c0019000, size = 632400 === <-- RTMPAllocAdapterBlock, Status=0 block2mtd: version $Revision: 1.1.1.1 $ rt3xxx-ehci rt3xxx-ehci: Ralink EHCI Host Controller rt3xxx-ehci rt3xxx-ehci: new USB bus registered, assigned bus number 1 rt3xxx-ehci rt3xxx-ehci: irq 18, io mem 0x101c0000 rt3xxx-ehci rt3xxx-ehci: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004 usb usb1: Product: Ralink EHCI Host Controller usb usb1: Manufacturer: Linux 2.6.21 ehci_hcd usb usb1: SerialNumber: rt3xxx usb usb1: configuration #1 chosen from 1 choice hub 1-0:1.0: USB hub found hub 1-0:1.0: 1 port detected rt3xxx-ohci rt3xxx-ohci: RT3xxx OHCI Controller rt3xxx-ohci rt3xxx-ohci: new USB bus registered, assigned bus number 2 rt3xxx-ohci rt3xxx-ohci: irq 18, io mem 0x101c1000 usb usb2: Product: RT3xxx OHCI Controller usb usb2: Manufacturer: Linux 2.6.21 ohci_hcd usb usb2: SerialNumber: rt3xxx-ohci usb usb2: configuration #1 chosen from 1 choice hub 2-0:1.0: USB hub found hub 2-0:1.0: 1 port detected usbcore: registered new interface driver cdc_acm drivers/usb/class/cdc-acm.c: v0.25:USB Abstract Control Model driver for USB modems and ISDN adapters Netfilter messages via NETLINK v0.30. nf_conntrack version 0.5.0 (256 buckets, 2048 max) ip_tables: (C) 2000-2006 Netfilter Core Team, Type=Linux ipt_time loading TCP cubic registered NET: Registered protocol family 1 NET: Registered protocol family 17 Ebtables v2.0 registered 802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com> All bugs added by David S. Miller <davem@redhat.com> _nvram_read checksum = 593e save checksum = 593e Freeing unused kernel memory: 2452k freed Hit enter to continue...RETH 5350 switch reg write offset=14, value=405555 switch reg write offset=50, value=2001 switch reg write offset=98, value=7f3f switch reg write offset=e4, value=3f switch reg write offset=40, value=1001 switch reg write offset=44, value=1001 switch reg write offset=48, value=1002 switch reg write phy_tx_ring = 0x00627000, tx_ring = 0xa0627000 phy_rx_ring0 = 0x00628000, rx_ring0 = 0xa0628000 offset=70, valuRT305x_ESW: Link Status Changed stat_curr = 81808100 e=ffff506f Algorithmics/MIPS FPU Emulator v1.5 SCSI subsystem initialized Initializing USB Mass Storage driver... usbcore: registered new interface driver usb-storage USB Mass Storage support registered. insmod: cannot insert '/lib/modules/2.6.21/kernel/drivers/scsi/scsi_mod.ko': Success insmod: cannot insert '/lib/modules/2.6.21/kernel/drivers/usb/storage/usb-storage.ko': Success ifconfig: ioctl 0x8913 failed: No such device ifconfig: ioctl 0x8913 failed: No such device ifconfig: ioctl 0x8913 failed: No such device ifconfig: ioctl 0x8913 failed: No such device RX DESC a04c0000 size = 2048 <-- RTMPAllocTxRxRingMemory, Status=0 RTMP_TimerListAdd: add timer obj c0083e50! RTMP_TimerListAdd: add timer obj c0021014! RTMP_TimerListAdd: add timer obj c0020be4! RTMP_TimerListAdd: add timer obj c0020fc0! RTMP_TimerListAdd: add timer obj c0020fe8! RTMP_TimerListAdd: add timer obj c00210cc! RTMP_TimerListAdd: add timer obj c00210f8! RTMP_TimerListAdd: add timer obj c00212a4! RTMP_TimerListAdd: add timer obj c0024158! RTMP_TimerListAdd: add timer obj c0023d28! RTMP_TimerListAdd: add timer obj c0024104! RTMP_TimerListAdd: add timer obj c002412c! RTMP_TimerListAdd: add timer obj c0024210! RTMP_TimerListAdd: add timer obj c002423c! RTMP_TimerListAdd: add timer obj c00243e8! RTMP_TimerListAdd: add timer obj c002729c! RTMP_TimerListAdd: add timer obj c0026e6c! RTMP_TimerListAdd: add timer obj c0027248! RTMP_TimerListAdd: add timer obj c0027270! RTMP_TimerListAdd: add timer obj c0027354! RTMP_TimerListAdd: add timer obj c0027380! RTMP_TimerListAdd: add timer obj c002752c! RTMP_TimerListAdd: add timer obj c002a3e0! RTMP_TimerListAdd: add timer obj c0029fb0! RTMP_TimerListAdd: add timer obj c002a38c! RTMP_TimerListAdd: add timer obj c002a3b4! RTMP_TimerListAdd: add timer obj c002a498! RTMP_TimerListAdd: add timer obj c002a4c4! RTMP_TimerListAdd: add timer obj c002a670! RTMP_TimerListAdd: add timer obj c002d524! RTMP_TimerListAdd: add timer obj c002d0f4! RTMP_TimerListAdd: add timer obj c002d4d0! RTMP_TimerListAdd: add timer obj c002d4f8! RTMP_TimerListAdd: add timer obj c002d5dc! RTMP_TimerListAdd: add timer obj c002d608! RTMP_TimerListAdd: add timer obj c002d7b4! RTMP_TimerListAdd: add timer obj c0030668! RTMP_TimerListAdd: add timer obj c0030238! RTMP_TimerListAdd: add timer obj c0030614! RTMP_TimerListAdd: add timer obj c003063c! RTMP_TimerListAdd: add timer obj c0030720! RTMP_TimerListAdd: add timer obj c003074c! RTMP_TimerListAdd: add timer obj c00308f8! RTMP_TimerListAdd: add timer obj c00337ac! RTMP_TimerListAdd: add timer obj c003337c! RTMP_TimerListAdd: add timer obj c0033758! RTMP_TimerListAdd: add timer obj c0033780! RTMP_TimerListAdd: add timer obj c0033864! RTMP_TimerListAdd: add timer obj c0033890! RTMP_TimerListAdd: add timer obj c0033a3c! RTMP_TimerListAdd: add timer obj c00368f0! RTMP_TimerListAdd: add timer obj c00364c0! RTMP_TimerListAdd: add timer obj c003689c! RTMP_TimerListAdd: add timer obj c00368c4! RTMP_TimerListAdd: add timer obj c00369a8! RTMP_TimerListAdd: add timer obj c00369d4! RTMP_TimerListAdd: add timer obj c0036b80! RTMP_TimerListAdd: add timer obj c00519bc! RTMP_TimerListAdd: add timer obj c005158c! RTMP_TimerListAdd: add timer obj c0051968! RTMP_TimerListAdd: add timer obj c0051990! RTMP_TimerListAdd: add timer obj c0051a74! RTMP_TimerListAdd: add timer obj c0051aa0! RTMP_TimerListAdd: add timer obj c00519e8! RTMP_TimerListAdd: add timer obj c0051a14! RTMP_TimerListAdd: add timer obj c0051a40! RTMP_TimerListAdd: add timer obj c0084370! RTMP_TimerListAdd: add timer obj c0084348! RTMP_TimerListAdd: add timer obj c0084320! RTMP_TimerListAdd: add timer obj c005ac0c! RTMP_TimerListAdd: add timer obj c005ad10! RTMP_TimerListAdd: add timer obj c005ac34! RTMP_TimerListAdd: add timer obj c0051f84! RTMP_TimerListAdd: add timer obj c001e4d8! RTMP_TimerListAdd: add timer obj c002161c! RTMP_TimerListAdd: add timer obj c0024760! RTMP_TimerListAdd: add timer obj c00278a4! RTMP_TimerListAdd: add timer obj c002a9e8! RTMP_TimerListAdd: add timer obj c002db2c! RTMP_TimerListAdd: add timer obj c0030c70! RTMP_TimerListAdd: add timer obj c0033db4! RTMP_TimerListAdd: add timer obj c0051ca4! Key1Str is Invalid key length(0) or Type(0) Key2Str is Invalid key length(0) or Type(0) Key3Str is Invalid key length(0) or Type(0) Key4Str is Invalid key length(0) or Type(0) 1. Phy Mode = 9 2. Phy Mode = 9 TXALC> bInternalTxALC = 0 3. Phy Mode = 9 RTMP_TimerListAdd: add timer obj c001e0e0! NICInitAsicFromEEPROM: pAd->TxPowerCtrl.bInternalTxALC = 0 MCS Set = ff 00 00 00 01 RTMP_TimerListAdd: add timer obj 8157290c! RTMP_TimerListAdd: add timer obj 81572938! RTMP_TimerListAdd: add timer obj 806a6684! RTMP_TimerListAdd: add timer obj 81572984! RTMP_TimerListAdd: add timer obj c0052554! Main bssid = 00:0c:43:70:86:be <==== rt28xx_init, Status=0 0x1300 = 00064380 killall: rt2860apd: no process killed rt2860apd: No such file or directory eth2.1: Setting MAC address to 00 0c 43 70 86 bf. device eth2 entered promiscuous mode VLAN (eth2.1): Setting underlying device (eth2) to promiscious mode. device ra0 entered promiscuous mode eth2.1: dev_set_promiscuity(master, 1) device eth2.1 entered promiscuous mode br0: port 2(eth2.1) entering learning state br0: port 1(ra0) entering learning state br0: topology change detected, propagating br0: port 2(eth2.1) entering forwarding state br0: topology change detected, propagating br0: port 1(ra0) entering forwarding state Changing password for admin Password for admin changed by admin - setting default address to 192.168.8.1 samba.sh NEXX WORKGROUP smbpasswd -a admin admin startsmbfilepwent_internal: file /etc/smbpasswd did not exist. File successfully created. Added user admin. Sys led Error info, udhcp server (v0.9.8) started time.windows.com: Unknown host eth2.2: Setting MAC address to 00 0c 43 70 86 c0. info, udhcp client (v0.9.8) started IDLE Hit enter to continue...info, Sending discover... (10) info, Sending discover... (12) info, Sending discover... (14) info, Sending discover... (23) info, Sending discover... (25)


OpenWrt bootlog

U-Boot 1.1.3 (Sep 13 2012 - 16:39:43) Board: Ralink APSoC DRAM: 32 MB relocate_code Pointer at: 81fb4000 ****************************** Software System Reset Occurred ****************************** spi_wait_nsec: 42 spi device id: ef 40 16 0 0 (40160000) find flash: W25Q32BV raspi_read: from:30000 len:1000 .raspi_read: from:30000 len:1000 .============================================ Ralink UBoot Version: 4.0.1.0 -------------------------------------------- ASIC 5350_MP (Port5<->None) DRAM_CONF_FROM: Boot-Strapping DRAM_TYPE: SDRAM DRAM_SIZE: 256 Mbits DRAM_WIDTH: 16 bits DRAM_TOTAL_WIDTH: 16 bits TOTAL_MEMORY_SIZE: 32 MBytes Flash component: SPI Flash Date:Sep 13 2012 Time:16:39:43 ============================================ icache: sets:256, ways:4, linesz:32 ,total:32768 dcache: sets:128, ways:4, linesz:32 ,total:16384 ##### The CPU freq = 360 MHZ #### estimate memory size =32 Mbytes Please choose the operation: 1: Load system code to SDRAM via TFTP. 2: Load system code then write to Flash via TFTP. 3: Boot system code via Flash (default). 4: Entr boot command line interface. 7: Load Boot Loader code then write to Flash via Serial. 9: Load Boot Loader code then write to Flash via TFTP. 0 3: System Boot system code via Flash. ## Booting image at bc050000 ... raspi_read: from:50000 len:40 . Image Name: NEXXWT1520 Created: 2014-06-24 12:59:06 UTC Image Type: MIPS Linux Kernel Image (lzma compressed) Data Size: 1042653 Bytes = 1018.2 kB Load Address: 80000000 Entry Point: 80000000 raspi_read: from:50040 len:fe8dd ................ Verifying Checksum ... OK Uncompressing Kernel Image ... OK No initrd ## Transferring control to Linux (at address 80000000) ... ## Giving linux memsize in MB, 32 Starting kernel ... [ 0.000000] Linux version 3.10.36 (openwrt@gb-11) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r41302) ) #1 Tue Jun 24 06:25:33 UTC 2014 [ 0.000000] SoC Type: Ralink RT5350 id:1 rev:3 [ 0.000000] bootconsole [early0] enabled [ 0.000000] CPU revision is: 0001964c (MIPS 24KEc) [ 0.000000] MIPS: machine is NEXX WT1520 [ 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] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes. [ 0.000000] Primary data cache 16kB, 4-way, VIPT, 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=ttyS1,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=00030a00 [ 0.000000] Readback ErrCtl register=00030a00 [ 0.000000] Memory: 29156k/32768k available (2286k kernel code, 3612k reserved, 570k data, 212k 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: 360MHz [ 0.000000] Calibrating delay loop... 239.61 BogoMIPS (lpj=1198080) [ 0.070000] pid_max: default: 32768 minimum: 301 [ 0.070000] Mount-cache hash table entries: 512 [ 0.080000] pinctrl core: initialized pinctrl subsystem [ 0.090000] NET: Registered protocol family 16 [ 0.140000] bio: create slab <bio-0> at 0 [ 0.150000] rt2880_gpio 10000600.gpio: registering 24 gpios [ 0.160000] rt2880_gpio 10000600.gpio: registering 24 irq handlers [ 0.170000] Switching to clocksource MIPS [ 0.180000] NET: Registered protocol family 2 [ 0.190000] TCP established hash table entries: 512 (order: 0, 4096 bytes) [ 0.210000] TCP bind hash table entries: 512 (order: -1, 2048 bytes) [ 0.220000] TCP: Hash tables configured (established 512 bind 512) [ 0.230000] TCP: reno registered [ 0.240000] UDP hash table entries: 256 (order: 0, 4096 bytes) [ 0.250000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) [ 0.260000] NET: Registered protocol family 1 [ 0.270000] rt-timer 10000100.timer: maximum frequncy is 7324Hz [ 0.330000] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.340000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc. [ 0.360000] msgmni has been set to 56 [ 0.370000] io scheduler noop registered [ 0.380000] io scheduler deadline registered (default) [ 0.390000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled [ 0.420000] 10000500.uart: ttyS0 at MMIO 0x10000500 (irq = 13) is a 16550A [ 0.430000] 10000c00.uartlite: ttyS1 at MMIO 0x10000c00 (irq = 20) is a 16550A [ 0.450000] console [ttyS1] enabled, bootconsole disabled [ 0.450000] console [ttyS1] enabled, bootconsole disabled [ 0.480000] m25p80 spi32766.0: found w25q32, expected gd25q64 [ 0.490000] m25p80 spi32766.0: w25q32 (4096 Kbytes) [ 0.500000] 4 ofpart partitions found on MTD device spi32766.0 [ 0.510000] Creating 4 MTD partitions on "spi32766.0": [ 0.530000] 0x000000000000-0x000000030000 : "u-boot" [ 0.540000] 0x000000030000-0x000000040000 : "u-boot-env" [ 0.550000] 0x000000040000-0x000000050000 : "factory" [ 0.570000] 0x000000050000-0x000000400000 : "firmware" [ 0.580000] 0x00000014e91d-0x000000400000 : "rootfs" [ 0.590000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only [ 0.620000] mtd: device 4 (rootfs) set to be root filesystem [ 0.630000] mtd: partition "rootfs_data" created automatically, ofs=0x310000, len=0xf0000 [ 0.650000] 0x000000310000-0x000000400000 : "rootfs_data" [ 0.670000] eth0: done loading [ 0.680000] rt3xxx-usbphy ubsphy.3: loaded [ 0.690000] rt2880_wdt 10000120.watchdog: Initialized [ 0.700000] TCP: cubic registered [ 0.710000] NET: Registered protocol family 17 [ 0.720000] Bridge firewalling registered [ 0.730000] 8021q: 802.1Q VLAN Support v1.8 [ 0.760000] VFS: Mounted root (squashfs filesystem) readonly on device 31:4. [ 0.780000] Freeing unused kernel memory: 212K (802cb000 - 80300000) procd: Console is alive procd: - watchdog - [ 6.660000] usbcore: registered new interface driver usbfs [ 6.670000] usbcore: registered new interface driver hub [ 6.690000] usbcore: registered new device driver usb [ 6.700000] rt2880-pinmux pinctrl.1: pin 14 is not set to gpio mux [ 6.710000] rt2880-pinmux pinctrl.1: request() failed for pin 14 [ 6.720000] rt2880-pinmux pinctrl.1: pin-14 (pio:14) status -22 [ 6.740000] gpio-keys-polled gpio-keys-polled.4: unable to claim gpio 14, err=-22 [ 6.750000] gpio-keys-polled: probe of gpio-keys-polled.4 failed with error -22 [ 6.770000] dwc_otg: version 2.72a 24-JUN-2008 [ 6.790000] leds-gpio gpio-leds.5: pins are not configured from the driver procd: - preinit - [ 7.510000] rt305x-esw 10110000.esw: link changed 0x00 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.130000] rt305x-esw 10110000.esw: link changed 0x01 jffs2 is ready jffs2 is ready [ 11.210000] jffs2: notice: (287) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and 9 of xref (0 dead, 2 orphan) found. switching to overlay procd: - early - procd: - watchdog - procd: - ubus - procd: - init - Please press Enter to activate this console. [ 13.710000] NET: Registered protocol family 10 [ 13.740000] nf_conntrack version 0.5.0 (458 buckets, 1832 max) [ 13.760000] ip6_tables: (C) 2000-2006 Netfilter Core Team [ 13.790000] Loading modules backported from Linux version master-2014-05-22-0-gf2032ea [ 13.810000] Backport generated by backports.git backports-20140320-37-g5c33da0 [ 13.830000] ip_tables: (C) 2000-2006 Netfilter Core Team [ 13.900000] xt_time: kernel timezone is -0000 [ 13.950000] cfg80211: Calling CRDA to update world regulatory domain [ 13.970000] cfg80211: World regulatory domain updated: [ 13.980000] cfg80211: DFS Master region: unset [ 13.980000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time) [ 14.000000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A) [ 14.020000] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A) [ 14.040000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A) [ 14.050000] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A) [ 14.070000] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A) [ 14.080000] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A) [ 14.190000] PPP generic driver version 2.4.2 [ 14.210000] NET: Registered protocol family 24 [ 14.260000] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5350, rev 0500 detected [ 14.280000] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5350 detected [ 17.710000] rt305x-esw 10110000.esw: link changed 0x00 [ 19.340000] rt305x-esw 10110000.esw: link changed 0x01 procd: - init complete - [ 23.350000] device eth0.1 entered promiscuous mode [ 23.360000] device eth0 entered promiscuous mode [ 23.380000] br-lan: port 1(eth0.1) entered forwarding state [ 23.390000] br-lan: port 1(eth0.1) entered forwarding state [ 25.390000] br-lan: port 1(eth0.1) entered forwarding state [ 26.660000] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready [ 26.670000] device wlan0 entered promiscuous mode [ 26.810000] br-lan: port 2(wlan0) entered forwarding state [ 26.820000] br-lan: port 2(wlan0) entered forwarding state [ 26.830000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready [ 28.820000] br-lan: port 2(wlan0) entered forwarding state


Linux kernel 3.8 DTS configuration notes

//
// Device tree definition for Poray X5 and X6 routers.  
//
// This is free software, licensed under the GNU General Public License v2.
// See /LICENSE for more information.
//
// -- Luis Soltero <lsoltero@globalmarinenet.com>
// -- Michel Stempin <michel.stempin@wanadoo.fr> 
// -- Felix Kaechele <felix@fetzig.org>
//
//
// this files add support for the programmable switch on the side of the router labled 3G-DHCP
// 
//
// Notes on interfacing with the X5/X6 3G-DHCP switch
//
// there are two methods for interfacing with the 3G-DHCP/Switch. These are
// A. Button
// B. Polled
//
// To enable/disable the appropriate method search for COMMENT and comment/uncomppent the 
// appropriate definitions.  Note that both can not be enabled at the same time.  The switch
// can be defined as either a button or a exported GPIO but not both.
//
// A. Button Method
//
// the switch is defined as a button so events can be bound to it using hotplug.  The switch is bound to button BTN_0.
//
// GPIO /sys/class/gpio/usb-mode/value is used to map the X5 SD or USB port to the router.  When the ascii value '0' is
// writen to the gpio the router maps the internal TF/SD drive to the USB interface on the SoC.  When ascii value '1' is
// writen to the gpio the router maps the external USB port labled 3G-USB to the USB interfave on the SoC.
//
// To use the switch  you need to bind it to the BTN_0 button event in hotplug. Here is a /etc/config/system entry that will
// do that.
//
// config button
//        option button 'BTN_0'
//        option action 'released'
//        option handler 'echo 0 > /sys/class/gpio/usb-mode/value'
//
// config button
//        option button 'BTN_0'
//        option action 'pressed'
//        option handler 'echo 1 > /sys/class/gpio/usb-mode/value'
//
// this entry depends on hotplug and the 00-button script as defined here
// http://wiki.openwrt.org/doc/howto/hardware.button 
//
// FixMe:
// On boot up the system needs to probe the state of the switch to initialize the USB mode correctly. This can be done by
// parsing /sys/kernel/debug/gpio which returns
// GPIOs 0-23, 10000600.gpio:
// gpio-7   (x5:green:80         ) out hi
// gpio-9   (bat                 ) in  hi
// gpio-10  (reset               ) in  hi
// gpio-11  (x5:green:50         ) out hi
// gpio-12  (x5:green:20         ) out hi
// gpio-13  (x5:green:power      ) out lo
// gpio-14  (mode                ) in  lo
// gpio-18  (usb-mode            ) out lo
//
// gpio-14 has a value of lo (0) when the switch is set to DHCP and hi(1) when set to USB.
//
// B. Polled Method
//
// the switch state is exported as GPIO 14 with name "usb-switch".  It can be accessed using the following path
// /sys/class/gpio/usb-switch/value.  A value of 1 means that the switch is in 3G mode. A value of 0 means
// that DHCP is selected.  A script or program must be written which polls the state of the GPIO and then
// writes to GPIO 18 when the state changes.  Something like the following should work
//
// #!/bin/sh
// newstate=`cat /sys/class/gpio/usb-switch/value`
// curstate=""
// while [ 1 ] ; do
//    if [ "$currstate" -ne "$newstate" ]; then
//        $curstate=$newstate;
//        echo "$newstate" > /sys/class/gpio/usb-mode/value
//    fi;
//    sleep 2
//    newstate=`cat /sys/class/gpio/usb-switch/value`
// done
// 
// the script can be executed from /etc/init.d/

/dts-v1/;

/include/ "rt5350.dtsi"

/ {
	compatible = "X5", "ralink,rt5350-soc";
	model = "Poray X5";

	palmbus@10000000 {
		sysc@0 {
			ralink,pinmux = "i2c", "spi", "uartlite", "mdio", "sdram", "rgmii";
			ralink,gpiomux = "jtag";
			ralink,uartmux = "gpio";
			ralink,wdtmux = <1>;
		};

		gpio0: gpio@600 {
			status = "okay";
		};

		spi@b00 {
			status = "okay";
			m25p80@0 {
				#address-cells = <1>;
				#size-cells = <1>;
				compatible = "gd25q64";
				reg = <0 0>;
				linux,modalias = "m25p80", "gd25q64";
				spi-max-frequency = <10000000>;

		partition@0 {
			label = "u-boot";
			reg = <0x0 0x30000>;
			read-only;
		};

		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 0x7b0000>;
		};
			};
		};
	};

	ethernet@10100000 {
		status = "okay";
	};

	esw@10110000 {
		status = "okay";
		ralink,portmap = <0x2f>;
		ralink,led-polarity = <1>;
	};

	gpio-leds {
		compatible = "gpio-leds";
		power {
			label = "x5:green:power";
			gpios = <&gpio0 13 1>;
		};

		20 {
			label = "x5:green:20";
			gpios = <&gpio0 12 1>;
		};

		50 {
			label = "x5:green:50";
			gpios = <&gpio0 11 1>;
		};

		80 {
			label = "x5:green:80";
			gpios = <&gpio0 7 1>;
		};
	};

	gpio-keys-polled {
		compatible = "gpio-keys-polled";
		#address-cells = <1>;
		#size-cells = <0>;
		poll-interval = <20>;

		bat {
			label = "bat";
			gpios = <&gpio0 9 1>;
			linux,code = <0x211>;
		};

		reset {
			label = "reset";
			gpios = <&gpio0 10 1>;
			linux,code = <0x198>;
		};

//
// 3G-DHCP Switch BUTTON method
//
// Comment this out (thrugh END COMMENT) when using BUTTON Method
//		mode {
//			label = "mode";
//			gpios = <&gpio0 14 1>;
//			linux,code = <0x100>;
//		};
// END COMMENT
//
	};

        gpio_export {
                compatible = "gpio-export";
                #size-cells = <0>;

//
// 3G-DHCP Switch POLL Method
//
// Uncomment this out (through END COMMENT) when using the POLLED Method
                usb-switch {
                        gpio-export,name = "usb-switch";
                        gpio-export,input = <0>;
                        gpios = <&gpio0 14 0>;
                };
// END COMMENT
//

                usb-mode {
                        gpio-export,name = "usb-mode";
                        gpio-export,output = <0>;
                        gpios = <&gpio0 18 0>;
                };
        };

	wmac@10180000 {
		status = "okay";
		ralink,mtd-eeprom = <&factory 0>;
		ralink,led-polarity = <1>;
	};

	ehci@101c0000 {
		status = "okay";
	};

	ohci@101c1000 {
		status = "okay";
	};
};
lsoltero@ubuntu810vm:~/openwrt.k3.8/target/linux/ramips/dts$ 

Tags

toh/nexx/wt1520.txt · Last modified: 2017/05/13 02:57 by francisuk1989