Changeset 42552


Ignore:
Timestamp:
2014-09-15T12:19:38+02:00 (3 years ago)
Author:
blogic
Message:

ar71xx: add qihoo 360 c301 router support

Qihoo 360 C301 is a dual band wireless router supports 802.11n and 802.11ac.
Its chipset is AR9344 + AR9882 with two 16MB flashes.

This patch adds its initial support.

v2:

  • use mtd_get_mac_ascii to fetch MAC address for ath10k.
  • use ath79_register_pci to initialize AR9882.

Signed-off-by: Weijie Gao <hackpascal@…>

Location:
trunk/target/linux/ar71xx
Files:
4 added
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/base-files/etc/diag.sh

    r42549 r42552  
    166166        oolite) 
    167167                status_led="oolite:red:system" 
     168                ;; 
     169        qihoo-c301) 
     170                status_led="qihoo:green:status" 
    168171                ;; 
    169172        tew-632brp) 
  • trunk/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds

    r42549 r42552  
    193193        ;; 
    194194 
     195qihoo-c301) 
     196        ucidef_set_led_wlan "wlan2g" "WLAN2G" "qihoo:red:status" "phy1tpt" 
     197        ;; 
     198 
    195199smart-300) 
    196200        ucidef_set_led_netdev "wan" "WAN" "nc-link:green:wan" "eth0" 
  • trunk/target/linux/ar71xx/base-files/etc/uci-defaults/02_network

    r42549 r42552  
    348348mynet-n600 |\ 
    349349oolite |\ 
     350qihoo-c301 |\ 
    350351rb-750 |\ 
    351352rb-751 |\ 
  • trunk/target/linux/ar71xx/base-files/lib/ar71xx.sh

    r42549 r42552  
    434434                name="pb92" 
    435435                ;; 
     436        *"Qihoo 360 C301") 
     437                name="qihoo-c301" 
     438                ;; 
    436439        *"RouterBOARD 411/A/AH") 
    437440                name="rb-411" 
  • trunk/target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin

    r41814 r42552  
    2525 
    2626                ;; 
     27                qihoo-c301) 
     28                        local mac 
     29 
     30                        mac=$(mtd_get_mac_ascii devdata wlan5mac) 
     31 
     32                        if [ -z "$mac" ]; then 
     33                                mac=$(macaddr_add $(cat /sys/class/net/eth0/address) -2) 
     34                        fi 
     35 
     36                        dd if=/dev/mtdblock10 \ 
     37                                bs=1 skip=20480 count=6 \ 
     38                                of=/tmp/ath10k-board.bin 
     39                        macaddr_2bin $mac >> /tmp/ath10k-board.bin 
     40                        dd if=/dev/mtdblock10 \ 
     41                                bs=1 skip=20492 count=2104 >> /tmp/ath10k-board.bin 
     42 
     43                ;; 
    2744        esac 
    2845        [ -f /tmp/ath10k-board.bin ] || { 
  • trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh

    r42549 r42552  
    227227                ;; 
    228228 
     229        qihoo-c301 | \ 
    229230        mynet-n600 | \ 
    230231        mynet-n750) 
  • trunk/target/linux/ar71xx/config-3.10

    r42130 r42552  
    7373CONFIG_ATH79_MACH_PB44=y 
    7474CONFIG_ATH79_MACH_PB92=y 
     75CONFIG_ATH79_MACH_QIHOO_C301=y 
    7576# CONFIG_ATH79_MACH_RB2011 is not set 
    7677# CONFIG_ATH79_MACH_RB4XX is not set 
  • trunk/target/linux/ar71xx/config-3.14

    r42130 r42552  
    7474CONFIG_ATH79_MACH_PB44=y 
    7575CONFIG_ATH79_MACH_PB92=y 
     76CONFIG_ATH79_MACH_QIHOO_C301=y 
    7677# CONFIG_ATH79_MACH_RB2011 is not set 
    7778# CONFIG_ATH79_MACH_RB4XX is not set 
  • trunk/target/linux/ar71xx/image/Makefile

    r42549 r42552  
    291291mynet_rext_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,7808k(firmware),64k(nvram)ro,64k(ART)ro,6848k@0x130000(filesystem) 
    292292zyx_nbg6716_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(env)ro,64k(RFdata)ro,-(nbu);ar934x-nfc:2048k(zyxel_rfsd),2048k(romd),1024k(header),2048k(kernel),-(ubi) 
     293qihoo_c301_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),64k(devdata),64k(devconf),15744k(firmware),64k(warm_start),64k(action_image_config),64k(radiocfg)ro;spi0.1:15360k(upgrade2),1024k(privatedata) 
    293294 
    294295 
     
    11561157$(eval $(call SingleProfile,Seama,64k,MYNETN600,mynet-n600,MYNET-N600,ttyS0,115200,$$(mynet_n600_mtdlayout),wrgnd16_wd_db600,1310720,16187392)) 
    11571158$(eval $(call SingleProfile,Seama,64k,MYNETN750,mynet-n750,MYNET-N750,ttyS0,115200,$$(mynet_n600_mtdlayout),wrgnd13_wd_av,1310720,16187392)) 
     1159 
     1160$(eval $(call SingleProfile,Seama,64k,QIHOO360,qihoo-c301,QIHOO-C301,ttyS0,115200,$$(qihoo_c301_mtdlayout),wrgac26_qihoo360_360rg,1310720,16121856)) 
    11581161 
    11591162$(eval $(call SingleProfile,Senao,squashfs-only,EAP300V2,eap300v2,EAP300V2,ttyS0,115200,$$(eap300v2_mtdlayout))) 
  • trunk/target/linux/ar71xx/patches-3.10/601-MIPS-ath79-add-more-register-defines.patch

    r39215 r42552  
    208208  
    209209 #define AR71XX_GPIO_COUNT              16 
    210 @@ -561,4 +664,148 @@ 
     210@@ -561,4 +664,149 @@ 
    211211 #define AR934X_SRIF_DPLL2_OUTDIV_SHIFT 13 
    212212 #define AR934X_SRIF_DPLL2_OUTDIV_MASK  0x7 
     
    280280+ 
    281281+#define AR934X_GPIO_OUT_GPIO           0 
     282+#define AR934X_GPIO_OUT_SPI_CS1        7 
    282283+#define AR934X_GPIO_OUT_LED_LINK0      41 
    283284+#define AR934X_GPIO_OUT_LED_LINK1      42 
  • trunk/target/linux/ar71xx/patches-3.14/601-MIPS-ath79-add-more-register-defines.patch

    r42038 r42552  
    208208  
    209209 #define AR71XX_GPIO_COUNT              16 
    210 @@ -560,4 +663,148 @@ 
     210@@ -560,4 +663,149 @@ 
    211211 #define AR934X_SRIF_DPLL2_OUTDIV_SHIFT 13 
    212212 #define AR934X_SRIF_DPLL2_OUTDIV_MASK  0x7 
     
    280280+ 
    281281+#define AR934X_GPIO_OUT_GPIO           0 
     282+#define AR934X_GPIO_OUT_SPI_CS1        7 
    282283+#define AR934X_GPIO_OUT_LED_LINK0      41 
    283284+#define AR934X_GPIO_OUT_LED_LINK1      42 
Note: See TracChangeset for help on using the changeset viewer.