Differences

This shows you the differences between two versions of the page.

toh:poray:prp-x5 [2013/01/08 18:02]
heffer rename to Poray PRP-X5 as that's the OEM
toh:poray:prp-x5 [2014/03/19 00:50] (current)
danitool
Line 1: Line 1:
====== Poray PRP-X5 ====== ====== Poray PRP-X5 ======
-[[http://www.poray.com.cn/en/product.asp?ProdNum=576&parentid=392&zid=201207171128541363384|Poray PRP-X5 Product Overview]]+A portable router with an onboard 5200mAh [[#Tags|rechargeable_battery]]. It provides 150MBit/s 802.11bgn wireless connectivity, one Fast Ethernet port as well as two USB ports (of which one only offers power but no data connection).\\ **''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... ;-)
-This device is sold as a "power bank" with wireless router features. It comes with a (supposedly) 5200mAh Battery. +Also known as: [[http://dx.com/p/hotsion-hot-v9-5200mah-mobile-power-bank-wireless-router-white-159906|HOTSION HOT-V9]], [[http://www.southriverproducts.com/products/proshow.asp?ID=574&MaxID=94|Southriver Products SP-PRP-X5]] [[http://www.lexand.ru/product/portable-devices/marshrutizator-lexand-lpb-52w/|Lexand LPB-52W]], [[http://www.lexand.ru/product/portable-devices/marshrutizator-lexand-lpb-78w/|Lexand LPB-78W]]
-It provides 150MBit/s 802.11bgn wireless connectivity, has a fast ethernet port as well as two USB ports (of which one only offers power but no data connection). +
- +
-Also known as: [[http://dx.com/p/hotsion-hot-v9-5200mah-mobile-power-bank-wireless-router-white-159906|HOTSION HOT-V9]], [[http://www.southriverproducts.com/products/proshow.asp?ID=574&MaxID=94|Southriver Products SP-PRP-X5]]+
===== Hardware Highlights ===== ===== Hardware Highlights =====
Line 16: Line 13:
  - -> [[doc:howto:generic.flashing|Install OpenWrt]]   - -> [[doc:howto:generic.flashing|Install OpenWrt]]
   
-Currently only installing via Serial + TFTP has been tested by pressing "2" during U-Boot phase.+Currently only installing via Serial + TFTP has been tested by pressing **''2''** during U-Boot phase.
-==== Flash Layout ==== + 
-FIXME+{{section>toh/poray/poray.oem.firmware.deobfuscation&noheader&nofooter&noeditbtn}}
==== OEM installation using the TFTP method ==== ==== OEM installation using the TFTP method ====
 +->[[doc:howto:generic.flashing.tftp]]
-->  [[doc:howto:generic.flashing.tftp]] 
 +===== Basic configuration =====
 +-> [[doc:howto:basic.config|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.1.1/24 |
 +| eth0 | LAN port | None |
 +
 +
 +==== Failsafe mode ====
 +-> [[doc:howto:generic.failsafe]]
 +
 +==== Buttons ====
 +-> [[doc:howto:hardware.button]] on howto use and configure the hardware button(s).
 +
 +The Linksys WRT54GL has two buttons. They are Reset and Secure Easy Setup. Here, we merely name the buttons, so we can use them in the above Howto:
 +^ BUTTON ^ Event ^
 +| Power | KEY_POWER |
 +| Reset | KEY_RESTART |
 +| DHCP/3G Switch | KEY_BTN0 |
 +
 +
 +===== Hardware =====
 +==== Info ====
 +| **[[wp>Instruction set]]:**  | [[wp>MIPS architecture|MIPS]] |
 +| **Vendor:**                  | [[wp>Ralink]]|
 +| **[[doc:techref:bootloader]]:**    | [[doc:techref:bootloader:uboot|U-Boot]] |
 +| **[[doc:hardware:soc|System-On-Chip]]:**  | RT5350F (MIPS 24Kc V7.4) |
 +| **[[doc:hardware:cpu|CPU]]/Speed**        | 24Kc V7.4 360 Mhz |
 +| **Flash-Chip:**        | [[http://www.gigadevice.com/UserFiles/File/20121107/GD25Q64B.pdf|Gigadevice GD25Q64B]] |
 +| **Flash size:**        | 8192 KiB |
 +| **RAM-Chip:**          | EtronTech EM63A165TS-6G |
 +| **RAM:**              | 32 MiB  |
 +| **Wireless:**          | Ralink RT5350 2.4ghz 802.11bgn |
 +| **Ethernet:**          | Ralink RT5350 Fast Ethernet |
 +| **USB:**              | Yes, 2 (1 is power only) |
 +| **[[doc:hardware:port.serial|Serial]]:**          | [[toh:poray#Serial|Yes]] |
 +| **[[doc:hardware:port.jtag|JTAG]]:**            | [[toh:poray#JTAG|?]]  |
 +
 +==== Photos ====
 +Model Number
 +
 +//Front://
 +
 +FIXME
 +
 +//Back://
 +
 +FIXME
 +**Note:** This will void your warranty!
 +
 +  * Cover is held by 4 screws and some plastic notches
 + 
 +//Main PCB//
 +
 +{{:toh:hotsion:hotsion-hot-v9_pcb.jpg?400|}}
 +
 +==== Serial ====
 +-> [[doc:hardware:port.serial]] general information about the serial port, serial port cable, etc.
 +
 +How to connect to the Serial Port of this specific device:
 +
 +{{:toh:poray:x5:poray-prp-x5-serial_header.jpg?600|}}
 +
 +==== JTAG ====
 +-> [[doc:hardware:port.jtag]] general information about the JTAG port, JTAG cable, etc.
 +
 +
 +===== Debricking =====
 +-> [[doc:howto:generic.debrick]]
 +
 +
 +===== Notes =====
 +==== Button and Port labels ====
 +All button and port labels mentioned in this article refer to the original device manufactured by Poray. The labelling may very on clones/rebranded versions.
 +
 +==== Power states ====
 +The X5 has three power states:
 +  - Off (labelled **OFF** on the power switch)
 +  - Charge only (labelled **C**)
 +  - On (labelled **ON**)
 +
 +In off mode the system is turned completely off and does not consume any power.
 +
 +Charge mode is meant to be used when charging devices from the designated external USB Port. The operating system is not bootet. Note that this mode will eventually drain the battery, even if nothing is connected to the external USB port.
 +
 +On mode turns on the SoC and thus enables USB and WiFi operation.
 +==== USB Ports ====
 +The RT5350 SoC only has one USB port. However, the X5/X6 has two external USB Ports and the card reader that is attached internally via USB.
 +
 +One of the USB Ports (labelled **USB-OUT**) can only be used for power output, it is not connected to the USB controller in any way. This leaves us with the second USB port as well as the internal card reader.
 +
 +As the X5/X6 does not have an onboard USB hub you can only either run the external USB port (labelled **3G-USB**) or the card reader. Switching between the card reader and the external USB port is done by setting the GPIO 18 (exported as **usb-mode** in sysfs) to **0** for the card reader and **1** for the external USB port. The OEM firmware uses an external switch (labelled **3G** and **DHCP**) to trigger the switching of USB ports.
 +
 +**Note:** Some USB devices do not work after switching the USB port while the system is running. The original firmware works around this issue by rebooting every time you switch the USB port.
 +
 +==== Battery Level ====
 +There currently is no driver for reading the ADC that monitors the device's battery level. This is still WIP.
===== Bootlogs ===== ===== Bootlogs =====
Line 31: Line 131:
<p style="padding: 10px;border:1px solid grey;height:600px;font:10px/14px Georgia, Garamond, Serif;overflow:Auto;background-color:#FFFFFF"> <p style="padding: 10px;border:1px solid grey;height:600px;font:10px/14px Georgia, Garamond, Serif;overflow:Auto;background-color:#FFFFFF">
<code> <code>
- 
- 
- 
U-Boot 1.1.3 (May  5 2011 - 18:57:44) U-Boot 1.1.3 (May  5 2011 - 18:57:44)
Line 671: Line 768:
<code> <code>
-PUT HERE YOUR BOOTLOG+U-Boot 1.1.3 (May  5 2011 - 18:57:44) 
 + 
 +Board: Ralink APSoC DRAM:  32 MB 
 +relocate_code Pointer at: 81fb4000 
 +****************************** 
 +Software System Reset Occurred 
 +****************************** 
 +spi_wait_nsec: 42  
 +spi device id: c8 40 17 c8 40 (4017c840) 
 +Warning: un-recognized chip ID, please update bootloader! 
 +raspi_read: from:30000 len:1000  
 +.*** Warning - bad CRC, using default environment 
 + 
 +GPIODIR=003fbfff 
 +GPIOSET=00000000 
 +GPIODAT=00000000 
 +============================================  
 +Ralink UBoot Version: 3.5.2.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:May  5 2011  Time:18:57:44 
 +============================================  
 +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 
 +GPIODIR=003fbfff 
 +GPIOMOD=000002dc 
 +GPIODAT=00000000 
 + 
 +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:  MIPS OpenWrt Linux-3.8.13 
 +  Created:      2013-06-30  14:25:59 UTC 
 +  Image Type:  MIPS Linux Kernel Image (lzma compressed) 
 +  Data Size:    873741 Bytes = 853.3 kB 
 +  Load Address: 80000000 
 +  Entry Point:  80000000 
 +raspi_read: from:50040 len:d550d  
 +..............  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.8.13 (lsoltero@ubuntu810vm) (gcc version 4.6.4 (OpenWrt/Linaro GCC 4.6-2012.12 r36770) ) #30 Sun Jun 30 10:25:46 EDT 2013 
 +[    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 Poray X5 
 +[    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=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] __ex_table already sorted, skipping sort 
 +[    0.000000] Writing ErrCtl register=0005b930 
 +[    0.000000] Readback ErrCtl register=0005b930 
 +[    0.000000] Memory: 29616k/32768k available (2059k kernel code, 3152k reserved, 357k data, 204k init, 0k highmem) 
 +[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 
 +[    0.000000] NR_IRQS:128 
 +[    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] NET: Registered protocol family 16 
 +[    0.120000] bio: create slab <bio-0> at 0 
 +[    0.130000] rt2880_gpio 10000600.gpio: registering 24 gpios 
 +[    0.140000] Switching to clocksource MIPS 
 +[    0.150000] NET: Registered protocol family 2 
 +[    0.160000] TCP established hash table entries: 512 (order: 0, 4096 bytes) 
 +[    0.180000] TCP bind hash table entries: 512 (order: -1, 2048 bytes) 
 +[    0.190000] TCP: Hash tables configured (established 512 bind 512) 
 +[    0.200000] TCP: reno registered 
 +[    0.210000] UDP hash table entries: 256 (order: 0, 4096 bytes) 
 +[    0.220000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) 
 +[    0.230000] NET: Registered protocol family 1 
 +[    0.240000] rt-timer 10000100.timer: maximum frequncy is 7324Hz 
 +[    0.290000] squashfs: version 4.0 (2009/01/31) Phillip Lougher 
 +[    0.300000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc. 
 +[    0.320000] msgmni has been set to 57 
 +[    0.330000] io scheduler noop registered 
 +[    0.340000] io scheduler deadline registered (default) 
 +[    0.350000] gpio-export gpio_export.3: 2 gpio(s) exported 
 +[    0.360000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled 
 +[    0.380000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20) is a 16550A 
 +[    0.400000] console [ttyS0] enabled, bootconsole disabled 
 +[    0.400000] console [ttyS0] enabled, bootconsole disabled 
 +[    0.430000] m25p80 spi0.0: gd25q64 (8192 Kbytes) 
 +[    0.440000] 4 ofpart partitions found on MTD device spi0.0 
 +[    0.450000] Creating 4 MTD partitions on "spi0.0": 
 +[    0.460000] 0x000000000000-0x000000030000 : "u-boot" 
 +[    0.470000] 0x000000030000-0x000000040000 : "u-boot-env" 
 +[    0.480000] 0x000000040000-0x000000050000 : "factory" 
 +[    0.500000] 0x000000050000-0x000000800000 : "firmware" 
 +[    0.510000] found squashfs behind kernel 
 +[    0.520000] Creating 2 MTD partitions on "spi0.0": 
 +[    0.530000] 0x000000050000-0x00000012554d : "kernel" 
 +[    0.540000] mtd: partition "kernel" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only 
 +[    0.570000] 0x00000012554d-0x000000800000 : "rootfs" 
 +[    0.580000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only 
 +[    0.610000] mtd: partition "rootfs" set to be root filesystem 
 +[    0.620000] mtd: partition "rootfs_data" created automatically, ofs=5E0000, len=220000  
 +[    0.630000] 0x0000005e0000-0x000000800000 : "rootfs_data" 
 +[    0.650000] rt305x-esw 10110000.esw: link changed 0x01 
 +[    0.670000] eth0: done loading 
 +[    0.680000] TCP: cubic registered 
 +[    0.680000] NET: Registered protocol family 17 
 +[    0.690000] 8021q: 802.1Q VLAN Support v1.8 
 +[    0.730000] VFS: Mounted root (squashfs filesystem) readonly on device 31:5. 
 +[    0.740000] Freeing unused kernel memory: 204k freed 
 +[    5.160000] input: gpio-keys-polled.2 as /devices/gpio-keys-polled.2/input/input0 
 +[    5.380000] Button Hotplug driver version 0.4.1 
 +- preinit - 
 +Wait for reset button on x5 to settle 
 +Press the [f] key and hit [enter] to enter failsafe mode 
 +- regular preinit - 
 +[  12.100000] jffs2: notice: (434) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and 12 of xref (0 dead, 2 orphan) found. 
 +[  13.580000] SCSI subsystem initialized 
 +[  14.270000] usbcore: registered new interface driver usbfs 
 +[  14.280000] usbcore: registered new interface driver hub 
 +[  14.300000] usbcore: registered new device driver usb 
 +[  15.360000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver 
 +[  15.380000] ehci-platform: EHCI generic platform driver 
 +[  16.390000] ehci-platform 101c0000.ehci: EHCI Host Controller 
 +[  16.410000] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1 
 +[  16.420000] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000 
 +[  16.450000] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00 
 +[  16.460000] hub 1-0:1.0: USB hub found 
 +[  16.470000] hub 1-0:1.0: 1 port detected 
 +[  16.490000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver 
 +[  16.510000] ohci-platform 101c1000.ohci: Generic Platform OHCI Controller 
 +[  16.520000] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2 
 +[  16.540000] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000 
 +[  16.610000] hub 2-0:1.0: USB hub found 
 +[  16.620000] hub 2-0:1.0: 1 port detected 
 +[  16.750000] Initializing USB Mass Storage driver... 
 +[  16.760000] usbcore: registered new interface driver usb-storage 
 +[  16.780000] USB Mass Storage support registered. 
 +[  16.860000] usb 1-1: new high-speed USB device number 2 using ehci-platform 
 +[  17.020000] scsi0 : usb-storage 1-1:1.0 
 +[  18.030000] scsi 0:0:0:0: Direct-Access    Generic  STORAGE DEVICE  0250 PQ: 0 ANSI: 0 
 +[  18.200000] sd 0:0:0:0: [sda] 15278080 512-byte logical blocks: (7.82 GB/7.28 GiB) 
 +[  18.220000] sd 0:0:0:0: [sda] Write Protect is off 
 +[  18.230000] sd 0:0:0:0: [sda] No Caching mode page present 
 +[  18.240000] sd 0:0:0:0: [sda] Assuming drive cache: write through 
 +[  18.260000] sd 0:0:0:0: [sda] No Caching mode page present 
 +[  18.270000] sd 0:0:0:0: [sda] Assuming drive cache: write through 
 +[  18.290000]  sda: sda1 
 +[  18.300000] sd 0:0:0:0: [sda] No Caching mode page present 
 +[  18.310000] sd 0:0:0:0: [sda] Assuming drive cache: write through 
 +[  18.330000] sd 0:0:0:0: [sda] Attached SCSI removable disk 
 +switching to jffs2 
 +- init - 
 + 
 +Please press Enter to activate this console. [  39.690000] compat-drivers backport release: compat-drivers-2013-03-28-5 
 +[  39.710000] Backport based on wireless-testing.git master-2013-04-16 
 +[  39.720000] compat.git: wireless-testing.git 
 +[  39.770000] cfg80211: Calling CRDA to update world regulatory domain 
 +[  39.780000] cfg80211: World regulatory domain updated: 
 +[  39.790000] cfg80211:  (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp) 
 +[  39.810000] cfg80211:  (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) 
 +[  39.820000] cfg80211:  (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm) 
 +[  39.840000] cfg80211:  (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm) 
 +[  39.850000] cfg80211:  (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) 
 +[  39.870000] cfg80211:  (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) 
 +[  41.360000] phy0 -> rt2x00_set_rt: Info - RT chipset 5350, rev 0500 detected 
 +[  41.370000] phy0 -> rt2x00_set_rf: Info - RF chipset 5350 detected 
 +[  41.550000] CS1168 ADC Linux Driver V1.0 
 +[  41.560000] Bococom Co.,LTD. Hex 2011.5 
 +[  42.190000] PPP generic driver version 2.4.2 
 +[  43.470000] ip_tables: (C) 2000-2006 Netfilter Core Team 
 +[  43.680000] xt_time: kernel timezone is -0000 
 +[  43.830000] NET: Registered protocol family 24 
 +[  44.050000] nf_conntrack version 0.5.0 (465 buckets, 1860 max) 
 +[  44.780000] usbcore: registered new interface driver cdc_acm 
 +[  44.790000] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters 
 +[  45.090000] usbcore: registered new interface driver snd-usb-audio 
 +[  45.260000] usbcore: registered new interface driver usbserial 
 +[  45.270000] usbcore: registered new interface driver usbserial_generic 
 +[  45.280000] usbserial: USB Serial support registered for generic 
 +[  45.340000] usbcore: registered new interface driver ums-alauda 
 +[  45.380000] usbcore: registered new interface driver ums-cypress 
 +[  45.410000] usbcore: registered new interface driver ums-datafab 
 +[  45.450000] usbcore: registered new interface driver ums-freecom 
 +[  45.480000] usbcore: registered new interface driver ums-isd200 
 +[  45.520000] usbcore: registered new interface driver ums-jumpshot 
 +[  45.550000] usbcore: registered new interface driver ums-karma 
 +[  45.590000] usbcore: registered new interface driver ums-sddr09 
 +[  45.620000] usbcore: registered new interface driver ums-sddr55 
 +[  45.660000] usbcore: registered new interface driver ums-usbat 
 +[  45.830000] usbcore: registered new interface driver ftdi_sio 
 +[  45.840000] usbserial: USB Serial support registered for FTDI USB Serial Device 
 +[  46.000000] usbcore: registered new interface driver pl2303 
 +[  46.010000] usbserial: USB Serial support registered for pl2303 
 +[  50.500000] EXT4-fs (sda1): warning: maximal mount count reached, running e2fsck is recommended 
 +[  50.530000] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null) 
 +[  54.130000] ralink-wdt: timeout value 60 must be 0 < timeout <= 35, using 30 
 + 
 +Optimizer login:  
</code> </code>
</p> </p>
</HTML> </HTML>
-===== Basic configuration ===== 
--> [[doc:howto:basic.config|Basic configuration]] After flashing, proceed with this.\\ 
-Set up your Internet connection, configure wireless, configure USB port, etc. 
 +===== Linux kernel 3.8 DTS configuration notes =====
-===== Specific Configuration ===== +<HTML> 
-==== Interfaces ====+<p style="padding: 10px;border:1px solid grey;height:600px;font:10px/14px Georgia, Garamond, Serif;overflow:Auto;background-color:#FFFFFF"> 
 +<code>
-The default network configuration is: +// 
-^ Interface Name ^ Description ^ Default configuration ^ +// Device tree definition for Poray X5 and X6 routers.   
-| br-lan | LAN (&amp; eventually WiFi) | 192.168.1.1/24 |  +// 
-| eth0 | LAN port | None | +// 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-(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 &quot;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/;
-==== Failsafe mode ==== +/include/ &quot;rt5350.dtsi"
--&gt; [[doc:howto:generic.failsafe]]+
-==== Buttons ==== +/ { 
--&gt; [[doc:howto:hardware.button]] on howto use and configure the hardware button(s).+ compatible = "X5", "ralink,rt5350-soc&quot;; 
 + model = "Poray X5";
-The Linksys WRT54GL has two buttons. They are Reset and Secure Easy Setup. Here, we merely name the buttons, so we can use them in the above Howto: + palmbus@10000000 { 
-^ BUTTON ^ Event ^ + sysc@0 { 
-| Power | KEY_POWER |  + ralink,pinmux = "i2c", "spi", "uartlite", "mdio", "sdram", "rgmii"; 
-| Reset | KEY_RESTART |  + ralink,gpiomux = "jtag"; 
-| DHCP/3G Switch | KEY_BTN0 |+ ralink,uartmux = "gpio"; 
 + ralink,wdtmux = <1>; 
 + };
 + gpio0: gpio@600 {
 + status = "okay";
 + };
-===== Hardware ===== + spi@b00 { 
-==== Info ==== + status = &quot;okay&quot;
-| **[[wp&gt;Instruction set|Architecture]]:**    | [[wp&gt;MIPS architecture|MIPS]] | + m25p80@0 { 
-| **Vendor:**          | [[wp>Ralink]]| + #address-cells = <1>; 
-| **[[doc:techref:bootloader]]:**    | [[doc:techref:bootloader:uboot|U-Boot]] | + #size-cells = <1>; 
-| **[[doc:hardware:soc|System-On-Chip]]:**  | RT5350F (MIPS 24Kc V7.4) | + compatible = "gd25q64"; 
-| **[[doc:hardware:cpu|CPU]]/Speed**        | 24Kc V7.4 360 Mhz | + reg = <0 0>; 
-| **Flash-Chip:**      | [[http://www.gigadevice.com/UserFiles/File/20121107/GD25Q64B.pdf|Gigadevice GD25Q64B]] | + linux,modalias = "m25p80", "gd25q64"; 
-| **Flash size:**      | 8192 KiB | + spi-max-frequency = <10000000>;
-| **RAM-Chip:**        | EtronTech EM63A165TS-6G | +
-| **RAM:**            | 32 MiB  | +
-| **Wireless:**        | Ralink RT5350 2.4ghz 802.11bgn | +
-| **Ethernet:**        | Ralink RT5350 Fast Ethernet | +
-| **USB:**            | Yes 2 x 2.0 (?) | +
-| **[[doc:hardware:port.serial|Serial]]:**          | [[toh:poray#Serial|Yes]] | +
-| **[[doc:hardware:port.jtag|JTAG]]:**            | [[toh:poray#JTAG|?]]  |+
-==== Photos ==== + partition@0 { 
-Model Number+ label = "u-boot"; 
 + reg = <0x0 0x30000>; 
 + read-only; 
 + };
-//Front://+ partition@30000 { 
 + label = "u-boot-env"; 
 + reg = <0x30000 0x10000>; 
 + read-only; 
 + };
-FIXME+ factory: partition@40000 { 
 + label = "factory"; 
 + reg = <0x40000 0x10000>; 
 + read-only; 
 + };
-//Back://+ partition@50000 { 
 + label = "firmware"; 
 + reg = <0x50000 0x7b0000>; 
 + }; 
 + }; 
 + }; 
 + };
-FIXME+ ethernet@10100000 { 
 + status = "okay"; 
 + };
-==== Opening the case ==== + esw@10110000 { 
-**Note:** This will void your warranty!+ status = "okay"; 
 + ralink,portmap = <0x2f>; 
 + ralink,led-polarity = <1>; 
 + };
-  * Cover is held by 4 screws and some plastic notches + gpio-leds { 
-  + compatible = "gpio-leds"; 
-//Main PCB//+ power { 
 + label = "x5:green:power"; 
 + gpios = <&gpio0 13 1>; 
 + };
-{{:toh:hotsion:hotsion-hot-v9_pcb.jpg?400|}}+ 20 { 
 + label = "x5:green:20"; 
 + gpios = <&gpio0 12 1>; 
 + };
-==== Serial ==== + 50 { 
--&gt; [[doc:hardware:port.serial]] general information about the serial port, serial port cable, etc.+ label = &quot;x5:green:50"; 
 + gpios = <&gpio0 11 1>; 
 + };
-How to connect to the Serial Port of this specific device:+ 80 { 
 + label = "x5:green:80"; 
 + gpios = <&gpio0 7 1>; 
 + }; 
 + };
-FIXME+ gpio-keys-polled { 
 + compatible = "gpio-keys-polled"; 
 + #address-cells = <1>; 
 + #size-cells = <0>; 
 + poll-interval = <20>;
-==== JTAG ==== + bat { 
--> [[doc:hardware:port.jtag]] general information about the JTAG port, JTAG cable, etc.+ label = "bat"; 
 + gpios = <&gpio0 9 1>
 + linux,code = <0x211>; 
 + };
 + reset {
 + label = "reset";
 + gpios = <&gpio0 10 1>;
 + linux,code = <0x198>;
 + };
-===== Debricking ===== +// 
--> [[doc:howto:generic.debrick]]+// 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>;
-===== Notes =====+// 
 +// 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 
 +//
-Currently the external USB Ports are not working. The EHCI/OHCI device however is working because the internal microSD cardreader, which is connected via USB, works.+                usb-mode { 
 +                        gpio-export,name = "usb-mode"; 
 +                        gpio-export,output = <0>; 
 +                        gpios = <&gpio0 18 0>; 
 +                }; 
 +        };
-<del>WiFi doesn't work either. The patch enabled the WiFi device, but no signal is received or generated.</del+ wmac@10180000 { 
-WiFi does work now with latest RT5350 patches which are heading for trunk: http://patchwork.openwrt.org/patch/3055/+ status = "okay"; 
 + ralink,mtd-eeprom = <&factory 0>
 + ralink,led-polarity = <1>;
 + };
-There seems to be some way to get the current charge level of the battery because the charge level LEDs are controlled by GPIO+ ehci@101c0000 { 
-<del>The firmware has been requested from the vendor to find out how this is done.</del> The vendor does not want to provide the sources.+ status = "okay"; 
 + }; 
 + 
 + ohci@101c1000 { 
 + status = "okay"; 
 + }; 
 +}; 
 +lsoltero@ubuntu810vm:~/openwrt.k3.8/target/linux/ramips/dts$  
 + 
 + 
 +</code> 
 +</p> 
 +</HTML>
===== Tags ===== ===== Tags =====
-{{tag>wip FastEthernet 1Port 1PHY USB 2USB 802.11bgn 1Radio InternalAntenna 32RAM 8Flash MIPS MIPS32 24Kc rt5350f}}+{{tag>ramips rt5350 FastEthernet 1NIC 1WNIC no_switch USB 2USB 802.11bgn InternalAntenna 32RAM 8Flash MIPS MIPS32 24Kc rechargeable_battery}}

Back to top

toh/poray/prp-x5.1357664557.txt.bz2 · Last modified: 2013/01/08 18:02 by heffer