OpenWrt Forum Archive

Topic: TL-WA901ND v4 suport

The content of this topic has been archived between 24 Feb 2018 and 25 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

hello,
I just got brand new TL-WA901ND v4. Unfortunately it have new hardware revision. Can it get openwrt support?

32MB ram
4MB flash
TP9343

flash layout:

Creating 5 MTD partitions on "ath-nor0":
0x000000000000-0x000000020000 : "u-boot"
0x000000020000-0x000000120000 : "kernel"
0x000000120000-0x0000003e0000 : "rootfs"
0x0000003e0000-0x0000003f0000 : "config"
0x0000003f0000-0x000000400000 : "art"

https://ktuedu-my.sharepoint.com/personal/vilpalu_ktu_lt/_layouts/15/guestaccess.aspx?guestaccesstoken=hB96Jk%2bCDmPhh2rMsQ9tDQJq%2bvOKvWRC5C6o%2bgTI%2b0M%3d&docid=0157f557f5ebb437996feefecbb4f3fb9

bootlog:

 U-Boot 1.1.4 (Apr  8 2015 - 10:25:45)

ap151 - Dragonfly 1.0

DRAM:  32 MB
Top of RAM usable for U-Boot at: 82000000
Reserving 139k for U-Boot at: 81fdc000
Reserving 192k for malloc() at: 81fac000
Reserving 44 Bytes for Board Info at: 81fabfd4
Reserving 36 Bytes for Global Data at: 81fabfb0
Reserving 128k for boot params() at: 81f8bfb0
Stack Pointer at: 81f8bf98
Now running in RAM - U-Boot at: 81fdc000
Flash Manuf Id 0xef, DeviceId0 0x40, DeviceId1 0x16
flash size 4MB, sector count = 64
Flash:  4 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ath_gmac_enet_initialize...
No valid address in Flash. Using fixed address
No valid address in Flash. Using fixed address
ath_gmac_enet_initialize: reset mask:c02200
Dragonfly----> S27 PHY *
: cfg1 0x80000000 cfg2 0x7114
eth0: 00:03:7f:09:0b:ad
athrs27_phy_setup ATHR_PHY_CONTROL 4 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 4 :10
eth0 up
ATHRS27: resetting s27
ATHRS27: s27 reset done
: cfg1 0x800c0000 cfg2 0x7214
eth1: 00:03:7f:09:0b:ad
athrs27_phy_setup ATHR_PHY_CONTROL 0 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 0 :10
athrs27_phy_setup ATHR_PHY_CONTROL 1 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 1 :10
athrs27_phy_setup ATHR_PHY_CONTROL 2 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 2 :10
athrs27_phy_setup ATHR_PHY_CONTROL 3 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 3 :10
eth1 up
eth0, eth1
Setting 0x181162c0 to 0x82
Autobooting in 1 seconds
## Booting image at 9f020000 ...
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80194fe0) ...
## Giving linux memsize in bytes, 33554432

Starting kernel ...

Booting QCA956x
Linux version 2.6.31 (tomcat@buildserver) (gcc version 4.3.3 (GCC) ) #87 Wed Apr 8 10:28:20 CST 2015
Ram size passed from bootloader =32M
flash_size passed from bootloader = 4
CPU revision is: 00019750 (MIPS 74Kc)
ath_sys_frequency: cpu 750 ddr 400 ahb 250
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Zone PFN ranges:
  Normal   0x00000000 -> 0x00002000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00002000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: console=ttyS0,115200 root=31:2 rootfstype=squashfs init=/sbin/init mtdparts=ath-nor0:128k(u-boot),1024k(kernel),2816k(rootfs),64k(config),64k(art) mem=32M
PID hash table entries: 128 (order: 7, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Writing ErrCtl register=00000000
Readback ErrCtl register=00000000
Memory: 25088k/32768k available (1639k kernel code, 7680k reserved, 413k data, 116k init, 0k highmem)
NR_IRQS:128
plat_time_init: plat time init done
r4k_clockevent_init: Ignoring int_usable failure
Calibrating delay loop... 374.78 BogoMIPS (lpj=749568)
Mount-cache hash table entries: 512

****************ALLOC***********************
 Packet mem: 802324a0 (0x500000 bytes)
********************************************

NET: Registered protocol family 16
ath_pcibios_init: bus 0
***** Warning PCIe 0 H/W not found !!!
registering PCI controller with io_map_base unset
bio: create slab <bio-0> at 0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
net_link: create socket ok.
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
NET: Registered protocol family 1
ATH GPIOC major 0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
msgmni has been set to 49
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xb8020000 (irq = 19) is a 16550A
console [ttyS0] enabled
PPP generic driver version 2.4.2
NET: Registered protocol family 24
5 cmdlinepart partitions found on MTD device ath-nor0
Creating 5 MTD partitions on "ath-nor0":
0x000000000000-0x000000020000 : "u-boot"
0x000000020000-0x000000120000 : "kernel"
0x000000120000-0x0000003e0000 : "rootfs"
0x0000003e0000-0x0000003f0000 : "config"
0x0000003f0000-0x000000400000 : "art"
->Oops: flash id 0xef4016 .
Ooops, why the devices couldn't been initialed?
TCP cubic registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
athwdt_init: Registering WDT success
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
Freeing unused kernel memory: 116k freed
init started:  BusyBox v1.01 (2015.04.08-02:33+0000) multi-call binary
This Board use 2.6.31

xt_time: kernel timezone is -0000
nf_conntrack version 0.5.0 (512 buckets, 5120 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
insmod: cannot open module `/lib/modules/2.6.31/kernel/iptable_raw.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/flashid.ko': No such file or directory
PPPoL2TP kernel driver, V1.0
PPTP driver version 0.8.3
insmod: cannot open module `/lib/modules/2.6.31/kernel/harmony.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/af_key.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/xfrm_user.ko': No such file or directory
qca956x_GMAC: Length per segment 1536
956x_GMAC: qca956x_gmac_attach
956x_GMAC: qca956x_set_gmac_caps
GPIO LED SETTINGS ....done
Currently in interrupt mode unit1
qca956x_set_gmac_caps  CHECK DMA STATUS
mac:1 Registering S27....
qca956x_GMAC: RX TASKLET - Pkts per Intr:32
qca956x_GMAC: Max segments per packet :   1
qca956x_GMAC: Max tx descriptor count :   128
qca956x_GMAC: Max rx descriptor count :   128
qca956x_GMAC: Mac capability flags    :   2401
956x_GMAC: qca956x_gmac_attach
956x_GMAC: qca956x_set_gmac_caps
Currently in interrupt mode unit0
qca956x_set_gmac_caps  CHECK DMA STATUS
mac:0 Registering S27....
qca956x_GMAC: RX TASKLET - Pkts per Intr:32
qca956x_GMAC: Max segments per packet :   1
qca956x_GMAC: Max tx descriptor count :   128
qca956x_GMAC: Max rx descriptor count :   128
qca956x_GMAC: Mac capability flags    :   2401

 (none) mips #87 Wed Apr 8 10:28:20 CST 2015 (none)
(none) login: athr_gmac_ring_alloc Allocated 2048 at 0x81c4f000
sram_desc_cnt 1536,mac Unit 1,Tx r->ring_desc 0xbd000000
athr_gmac_ring_alloc Allocated 2048 at 0x81e67800
sram_desc_cnt 3072,mac Unit 1,Rx r->ring_desc 0xbd000600
956x_GMAC: eth1 in RGMII MODE
Dragonfly -----> S27 PHY
ATHRS27: resetting s27
ATHRS27: s27 reset done
++++ athrs27_igmp_setup once---
++ PVID: 0x0000000b, bitmap: 0x0000001f
++ PVID: 0x00000003, bitmap: 0x0000001f
++ PVID: 0x00000005, bitmap: 0x0000001f
++ PVID: 0x00000007, bitmap: 0x0000001f
++ PVID: 0x00000009, bitmap: 0x0000001f
vtable vid: 0x00000002, bitmap 0x00000003
vtable vid: 0x00000004, bitmap 0x00000005
vtable vid: 0x00000006, bitmap 0x00000007
vtable vid: 0x00000008, bitmap 0x00000009
vtable vid: 0x0000000a, bitmap 0x0000000b
vtable vid: 0x0000000c, bitmap 0x0000000d
vtable vid: 0x0000000e, bitmap 0x0000000f
vtable vid: 0x00000010, bitmap 0x00000011
vtable vid: 0x00000012, bitmap 0x00000013
vtable vid: 0x00000014, bitmap 0x00000015
vtable vid: 0x00000016, bitmap 0x00000017
vtable vid: 0x00000018, bitmap 0x00000019
vtable vid: 0x0000001a, bitmap 0x0000001b
vtable vid: 0x0000001c, bitmap 0x0000001d
vtable vid: 0x0000001e, bitmap 0x0000001f
vtable vid: 0x00000020, bitmap 0x00000021
Setting Drop CRC Errors, Pause Frames and Length Error frames
Setting PHY...
athr_gmac_ring_alloc Allocated 2048 at 0x81e5f800
sram_desc_cnt 4608,mac Unit 0,Tx r->ring_desc 0xbd000c00
athr_gmac_ring_alloc Allocated 2048 at 0x81e5f000
sram_desc_cnt 6144,mac Unit 0,Rx r->ring_desc 0xbd001200
956x_GMAC: eth0 in MII MODE
Dragonfly -----> S27 PHY
Setting Drop CRC Errors, Pause Frames and Length Error frames
Setting PHY...
device eth1 entered promiscuous mode
athr_gmac_ring_free Freeing at 0x81e5f800
athr_gmac_ring_free Freeing at 0x81e5f000
athr_gmac_ring_alloc Allocated 2048 at 0x81e5f000
sram_desc_cnt 6144,mac Unit 0,Tx r->ring_desc 0xbd000c00
athr_gmac_ring_alloc Allocated 2048 at 0x81e5f800
sram_desc_cnt 6144,mac Unit 0,Rx r->ring_desc 0xbd001200
956x_GMAC: eth0 in MII MODE
Dragonfly -----> S27 PHY
Setting Drop CRC Errors, Pause Frames and Length Error frames
Setting PHY...
nf_conntrack_rtsp v0.6.21 loading
nf_nat_rtsp v0.6.21 loading
adf: module license 'Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
ath_hal: 0.9.17.1 (AR5416, AR9380, REGOPS_FUNC, WRITE_EEPROM, TX_DATA_SWAP, RX_DATA_SWAP, 11D)
ath_rate_atheros: Copyright (c) 2001-2005 Atheros Communications, Inc, All Rights Reserved
ath_dev: Copyright (c) 2001-2007 Atheros Communications, Inc, All Rights Reserved
ath_ahb: 10.2.162.3 (Atheros/multi-bss)
__ath_attach: Set global_scn[0]
Enterprise mode: 0x03bda000
Restoring Cal data from Flash
------read crc is:0x00000000, calculate crc is:0x151ad996.
caldata crc check error.
ath_get_caps[6146] rx chainmask mismatch actual 7 sc_chainmak 0
ath_get_caps[6121] tx chainmask mismatch actual 7 sc_chainmak 0
ATH_RESERVED_TXBUF = 1000
wifi0: Atheros 956X: mem=0xb8100000, irq=2
VAP device ath0 created
Setting Max Stations:32

 DES SSID SET=TP-LINK_AP_C8CA
 ieee80211_ioctl_siwmode: imr.ifm_active=131712, new mode=3, valid=1
athr_gmac_ring_free Freeing at 0x81e5f000
athr_gmac_ring_free Freeing at 0x81e5f800
br0: port 1(eth1) entering disabled state
athr_gmac_ring_alloc Allocated 2048 at 0x81e5f800
sram_desc_cnt 6144,mac Unit 0,Tx r->ring_desc 0xbd000c00
athr_gmac_ring_alloc Allocated 2048 at 0x81e5f000
sram_desc_cnt 6144,mac Unit 0,Rx r->ring_desc 0xbd001200
956x_GMAC: eth0 in MII MODE
Dragonfly -----> S27 PHY
Setting Drop CRC Errors, Pause Frames and Length Error frames
Setting PHY...
device ath0 entered promiscuous mode
br0: port 2(ath0) entering forwarding state
 ieee80211_ioctl_siwmode: imr.ifm_active=393856, new mode=3, valid=1
br0: port 2(ath0) entering disabled state

 DES SSID SET=TP-LINK_AP_C8CA
br0: port 2(ath0) entering forwarding state
blockWps_proc_write 861: write value = 0 

serial ports needs soldering, because Tx and Rx holes are not connected to lines:
https://ktuedu-my.sharepoint.com/personal/vilpalu_ktu_lt/_layouts/15/guestaccess.aspx?guestaccesstoken=dfFHYIGr%2bISK7GJLMeW%2bTVkX3dLC6glmYf4iGTPoj90%3d&amp;docid=050f5cfd859624b6c96cad70801d40182
serial settings: 115200 8N1

The username/password combination to get a root Shell access is root:sohoadmin

Hello Vilpalu,

Did you get this working and if so have you got a set of step by step instructions for a total novice?

teamp wrote:

Hello Vilpalu,

Did you get this working and if so have you got a set of step by step instructions for a total novice?

I'm novice too sad

perhaps this will help ...

# cat /proc/version&
Linux version 2.6.31 (tomcat@buildserver) (gcc version 4.3.3 (GCC) ) #87 Wed Apr 8 10:28:20 CST 2015
# cat /proc/cpuinfo &
system type             : QCA956x
processor               : 0
cpu model               : MIPS 74Kc V5.0
BogoMIPS                : 374.78
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0000, 0x0ff8, 0x0ff8, 0x0ff8]
ASEs implemented        : mips16 dsp
shadow register sets    : 1
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

# cat /proc/interrupts&
           CPU0
  2:     262317           dummy  wifi0
  4:          0            MIPS  eth1
  5:          0            MIPS  eth0
  6:          0            MIPS  cascade
  7:    1490813            MIPS  timer
 18:          0        ATH MISC  cascade
 19:      48116        ATH MISC  serial
 43:          0        ATH MISC  gmac s27 link intr, gmac s27 link intr
 45:          0        ATH GPIO  RESTORE_FACTORY_DEFAULT
 61:          0        ATH GPIO  WIFI_RADIO_SWITCH

ERR:          0

# ls /proc
1                 411               athversion        misc
10                412               buddyinfo         modules
17                416               bus               mounts
18                417               cmdline           mtd
2                 420               cpuinfo           net
213               424               crypto            pagetypeinfo
246               429               devices           partitions
247               489               diskstats         self
2993              5                 driver            simple_config
3                 6                 execdomains       slabinfo
3620              7                 filesystems       softirqs
3621              74                fs                stat
3627              8                 interrupts        sys
3628              81                iomem             sysvipc
377               82                ioports           timer_list
378               84                irq               tty
381               9                 kallsyms          uptime
382               90                kmsg              version
4                 94                loadavg           vmallocinfo
409               athdebug          locks             vmstat
410               athnodefixedrate  meminfo           zoneinfo


# cat /proc/meminfo&
MemTotal:          25204 kB
MemFree:            8076 kB
Buffers:            1972 kB
Cached:             6728 kB
SwapCached:            0 kB
Active:             3976 kB
Inactive:           6564 kB
Active(anon):       1840 kB
Inactive(anon):        0 kB
Active(file):       2136 kB
Inactive(file):     6564 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:          1864 kB
Mapped:             1792 kB
Slab:               3612 kB
SReclaimable:        416 kB
SUnreclaim:         3196 kB
PageTables:          156 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:       12600 kB
Committed_AS:       3756 kB
VmallocTotal:    1048404 kB
VmallocUsed:          44 kB
VmallocChunk:    1042280 kB

# cat /proc/softirqs&
                CPU0
      HI:          0
   TIMER:    1551242
  NET_TX:       1240
  NET_RX:       2446
   BLOCK:          0
 TASKLET:     215723
   SCHED:          0
 HRTIMER:          0
     RCU:     287822

# cat /proc/devices&
Character devices:
  1 mem
  4 ttyS
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
 10 misc
 77 ATH_GPIOC
 90 mtd
108 ppp
128 ptm
136 pts
238 ar7240_gpio_chrdev
239 ar7240_flash_chrdev

Block devices:
259 blkext
 31 mtdblock

cat /proc/timer_list&
Timer List Version: v0.4
HRTIMER_MAX_CLOCK_BASES: 2
now at 585264671218 nsecs

cpu: 0
 clock 0:
  .base:       801f7630
  .index:      0
  .resolution: 4000250 nsecs
  .get_time:   ktime_get_real
active timers:
 clock 1:
  .base:       801f7658
  .index:      1
  .resolution: 4000250 nsecs
  .get_time:   ktime_get
active timers:
 #0: <81c69ea0>, hrtimer_wakeup, S:01
 # expires at 585376036445-585376086445 nsecs [in 111365227 to 111415227 nsecs]
 #1: <80df7ea0>, hrtimer_wakeup, S:01
 # expires at 585396017794-585396067794 nsecs [in 131346576 to 131396576 nsecs]
 #2: <81fe5ea0>, hrtimer_wakeup, S:01
 # expires at 585400218997-585400268997 nsecs [in 135547779 to 135597779 nsecs]
 #3: <81c5fea0>, hrtimer_wakeup, S:01
 # expires at 585462363882-585462413882 nsecs [in 197692664 to 197742664 nsecs]
 #4: <81fe7ea0>, hrtimer_wakeup, S:01
 # expires at 585604024256-585604074256 nsecs [in 339353038 to 339403038 nsecs]
 #5: <81d6fea0>, hrtimer_wakeup, S:01
 # expires at 585752216786-585752266786 nsecs [in 487545568 to 487595568 nsecs]
 #6: <81c71ad8>, hrtimer_wakeup, S:01
 # expires at 586756081362-586758081360 nsecs [in 1491410144 to 1493410142 nsecs]
 #7: <81febea0>, hrtimer_wakeup, S:01
 # expires at 587436650117-587436700117 nsecs [in 2171978899 to 2172028899 nsecs]
 #8: <81ea1a40>, hrtimer_wakeup, S:01
 # expires at 588308069546-588311625442 nsecs [in 3043398328 to 3046954224 nsecs]
 #9: <81fe9a40>, hrtimer_wakeup, S:01
 # expires at 592436056080-592471056079 nsecs [in 7171384862 to 7206384861 nsecs]
 #10: <80e07a40>, hrtimer_wakeup, S:01
 # expires at 602528120602-602558120583 nsecs [in 17263449384 to 17293449365 nsecs]
 #11: <81e63a40>, hrtimer_wakeup, S:01
 # expires at 614848052714-614908052712 nsecs [in 29583381496 to 29643381494 nsecs]
 #12: <81e9fea0>, hrtimer_wakeup, S:01
 # expires at 615272105322-615272155322 nsecs [in 30007434104 to 30007484104 nsecs]
 #13: <81d44b08>, it_real_fn, S:01
 # expires at 3602999956471-3602999956471 nsecs [in 3017735285253 to 3017735285253 nsecs]
 #14: <81e6bea0>, hrtimer_wakeup, S:01
 # expires at 3675233067333-3675233117333 nsecs [in 3089968396115 to 3089968446115 nsecs]
 #15: <81c63ea0>, hrtimer_wakeup, S:01
 # expires at 10031998121893-10031998171893 nsecs [in 9446733450675 to 9446733500675 nsecs]


Tick Device: mode:     0
Per CPU device: 0
Clock Event Device: MIPS
 max_delta_ns:   2147483647
 min_delta_ns:   2048
 mult:           1610612736
 shift:          32
 mode:           3
 next_event:     585268000000 nsecs
 set_next_event: mips_next_event
 set_mode:       mips_set_clock_mode
 event_handler:  tick_handle_periodic
 


# /sbin/lsmod
Module                  Size  Used by
umac 693808 0 - Live 0x80d00000
ath_dev 186064 1 umac, Live 0x81f40000 (P)
ath_rate_atheros 28656 2 umac,ath_dev, Live 0x80c88000 (P)
ath_hal 532064 3 umac,ath_dev,ath_rate_atheros, Live 0x80c00000 (P)
asf 10016 3 umac,ath_dev,ath_hal, Live 0x81f08000 (P)
adf 19776 3 umac,ath_dev,ath_hal, Live 0x81f00000 (P)
nf_nat_sip 7648 0 - Live 0x81eee000
nf_conntrack_sip 18208 1 nf_nat_sip, Live 0x81ee8000
nf_nat_rtsp 6048 0 - Live 0x81ec8000
nf_conntrack_rtsp 11904 1 nf_nat_rtsp, Live 0x81ee0000
nf_nat_h323 6672 0 - Live 0x81eca000
nf_nat_tftp 1296 0 - Live 0x81ea3000
nf_conntrack_tftp 4192 1 nf_nat_tftp, Live 0x81ec2000
nf_nat_ftp 2768 0 - Live 0x81eb0000
nf_conntrack_ftp 7152 1 nf_nat_ftp, Live 0x81ebe000
nf_nat_pptp 2576 0 - Live 0x81e58000
nf_conntrack_pptp 5888 1 nf_nat_pptp, Live 0x81eb4000
tp_domain 5200 0 - Live 0x81eb2000
athrs_gmac 59952 0 - Live 0x81e80000
xt_mark 1504 0 - Live 0x81deb000
statistics 87072 0 - Live 0x81e40000
wlan_warn 2976 0 - Live 0x81de8000
pptp 10432 0 - Live 0x81de4000
pppol2tp 26944 0 - Live 0x81df0000
br_filter 1232 0 - Live 0x81dd5000
ts_kmp 2160 1 - Live 0x81dcc000
cls_fw 4880 0 - Live 0x81dd6000
cls_basic 4720 0 - Live 0x81dd2000
sch_sfq 6352 0 - Live 0x81dd0000
sch_prio 5376 0 - Live 0x81dce000
sch_htb 17856 0 - Live 0x81dd8000
ipt_TRIGGER 3568 0 - Live 0x81dae000
ipt_REJECT 2992 0 - Live 0x81dca000
ipt_REDIRECT 1520 0 - Live 0x81dc4000
ipt_MASQUERADE 2400 2 - Live 0x81dc7000
iptable_nat 4720 1 - Live 0x81d8e000
iptable_filter 2352 1 - Live 0x81d8c000
ip_tables 11824 2 iptable_nat,iptable_filter, Live 0x81dc0000
nf_nat_proto_gre 2080 1 nf_nat_pptp, Live 0x81d68000
nf_nat 18560 12 nf_nat_sip,nf_nat_rtsp,nf_conntrack_rtsp,nf_nat_h323,nf_nat_tftp,nf_nat_ftp,nf_nat_pptp,ipt_TRIGGER,ipt_REDIRECT,ipt_MASQUERADE,iptable_nat,nf_nat_proto_gre, Live 0x81d78000
nf_conntrack_ipv4 14112 4 iptable_nat,nf_nat, Live 0x81d74000
nf_defrag_ipv4 1648 1 nf_conntrack_ipv4, Live 0x81dac000
xt_state 1856 1 - Live 0x81d89000
xt_conntrack 4400 0 - Live 0x81d82000
nf_conntrack_h323 47280 1 nf_nat_h323, Live 0x81da0000
nf_conntrack_proto_gre 4928 1 nf_conntrack_pptp, Live 0x81d80000
nf_conntrack 60544 20 nf_nat_sip,nf_conntrack_sip,nf_nat_rtsp,nf_conntrack_rtsp,nf_nat_h323,nf_nat_tftp,nf_conntrack_tftp,nf_nat_ftp,nf_conntrack_ftp,nf_nat_pptp,nf_conntrack_pptp,ipt_TRIGGER,ipt_MASQUERADE,iptable_nat,nf_nat,nf_conntrack_ipv4,xt_state,xt_conntrack,nf_conntrack_h323,nf_conntrack_proto_gre, Live 0x81d90000
ipt_multiurl 1952 0 - Live 0x81d61000
xt_time 2720 0 - Live 0x81d70000
xt_string 2208 0 - Live 0x81d5f000
xt_multiport 2848 0 - Live 0x81d6b000
xt_mac 1376 0 - Live 0x81d5a000
xt_iprange 2128 0 - Live 0x81d58000
xt_comment 1296 2 - Live 0x81d5d000
xt_TCPMSS 3264 0 - Live 0x81d59000
xt_MARK 1888 2 - Live 0x81d60000
xt_tcpudp 2800 11 - Live 0x81d62000
x_tables 16048 20 xt_mark,wlan_warn,ipt_TRIGGER,ipt_REJECT,ipt_REDIRECT,ipt_MASQUERADE,iptable_nat,ip_tables,xt_state,xt_conntrack,ipt_multiurl,xt_time,xt_string,xt_multiport,xt_mac,xt_iprange,xt_comment,xt_TCPMSS,xt_MARK,xt_tcpudp, Live 0x81d64000

# cat /proc/modules&
umac 693808 0 - Live 0x80d00000
ath_dev 186064 1 umac, Live 0x81f40000 (P)
ath_rate_atheros 28656 2 umac,ath_dev, Live 0x80c88000 (P)
ath_hal 532064 3 umac,ath_dev,ath_rate_atheros, Live 0x80c00000 (P)
asf 10016 3 umac,ath_dev,ath_hal, Live 0x81f08000 (P)
adf 19776 3 umac,ath_dev,ath_hal, Live 0x81f00000 (P)
nf_nat_sip 7648 0 - Live 0x81eee000
nf_conntrack_sip 18208 1 nf_nat_sip, Live 0x81ee8000
nf_nat_rtsp 6048 0 - Live 0x81ec8000
nf_conntrack_rtsp 11904 1 nf_nat_rtsp, Live 0x81ee0000
nf_nat_h323 6672 0 - Live 0x81eca000
nf_nat_tftp 1296 0 - Live 0x81ea3000
nf_conntrack_tftp 4192 1 nf_nat_tftp, Live 0x81ec2000
nf_nat_ftp 2768 0 - Live 0x81eb0000
nf_conntrack_ftp 7152 1 nf_nat_ftp, Live 0x81ebe000
nf_nat_pptp 2576 0 - Live 0x81e58000
nf_conntrack_pptp 5888 1 nf_nat_pptp, Live 0x81eb4000
tp_domain 5200 0 - Live 0x81eb2000
athrs_gmac 59952 0 - Live 0x81e80000
xt_mark 1504 0 - Live 0x81deb000
statistics 87072 0 - Live 0x81e40000
wlan_warn 2976 0 - Live 0x81de8000
pptp 10432 0 - Live 0x81de4000
pppol2tp 26944 0 - Live 0x81df0000
br_filter 1232 0 - Live 0x81dd5000
ts_kmp 2160 1 - Live 0x81dcc000
cls_fw 4880 0 - Live 0x81dd6000
cls_basic 4720 0 - Live 0x81dd2000
sch_sfq 6352 0 - Live 0x81dd0000
sch_prio 5376 0 - Live 0x81dce000
sch_htb 17856 0 - Live 0x81dd8000
ipt_TRIGGER 3568 0 - Live 0x81dae000
ipt_REJECT 2992 0 - Live 0x81dca000
ipt_REDIRECT 1520 0 - Live 0x81dc4000
ipt_MASQUERADE 2400 2 - Live 0x81dc7000
iptable_nat 4720 1 - Live 0x81d8e000
iptable_filter 2352 1 - Live 0x81d8c000
ip_tables 11824 2 iptable_nat,iptable_filter, Live 0x81dc0000
nf_nat_proto_gre 2080 1 nf_nat_pptp, Live 0x81d68000
nf_nat 18560 12 nf_nat_sip,nf_nat_rtsp,nf_conntrack_rtsp,nf_nat_h323,nf_nat_tftp,nf_nat_ftp,nf_nat_pptp,ipt_TRIGGER,ipt_REDIRECT,ipt_MASQUERADE,iptable_nat,nf_nat_proto_gre, Live 0x81d78000
nf_conntrack_ipv4 14112 4 iptable_nat,nf_nat, Live 0x81d74000
nf_defrag_ipv4 1648 1 nf_conntrack_ipv4, Live 0x81dac000
xt_state 1856 1 - Live 0x81d89000
xt_conntrack 4400 0 - Live 0x81d82000
nf_conntrack_h323 47280 1 nf_nat_h323, Live 0x81da0000
nf_conntrack_proto_gre 4928 1 nf_conntrack_pptp, Live 0x81d80000
nf_conntrack 60544 20 nf_nat_sip,nf_conntrack_sip,nf_nat_rtsp,nf_conntrack_rtsp,nf_nat_h323,nf_nat_tftp,nf_conntrack_tftp,nf_nat_ftp,nf_conntrack_ftp,nf_nat_pptp,nf_conntrack_pptp,ipt_TRIGGER,ipt_MASQUERADE,iptable_nat,nf_nat,nf_conntrack_ipv4,xt_state,xt_conntrack,nf_conntrack_h323,nf_conntrack_proto_gre, Live 0x81d90000
ipt_multiurl 1952 0 - Live 0x81d61000
xt_time 2720 0 - Live 0x81d70000
xt_string 2208 0 - Live 0x81d5f000
xt_multiport 2848 0 - Live 0x81d6b000
xt_mac 1376 0 - Live 0x81d5a000
xt_iprange 2128 0 - Live 0x81d58000
xt_comment 1296 2 - Live 0x81d5d000
xt_TCPMSS 3264 0 - Live 0x81d59000
xt_MARK 1888 2 - Live 0x81d60000
xt_tcpudp 2800 11 - Live 0x81d62000
x_tables 16048 20 xt_mark,wlan_warn,ipt_TRIGGER,ipt_REJECT,ipt_REDIRECT,ipt_MASQUERADE,iptable_nat,ip_tables,xt_state,xt_conntrack,ipt_multiurl,xt_time,xt_string,xt_multiport,xt_mac,xt_iprange,xt_comment,xt_TCPMSS,xt_MARK,xt_tcpudp, Live 0x81d64000

# ls /dev
ar7100_flash_chrdev
ar7100_gpio_chrdev
caldata
console
dk0
dk1
kmem
mem
mtd0
mtdblock0
mtdblock1
mtdblock2
mtdblock3
mtdblock4
mtdblock5
mtdblock6
mtdr0
null
ppp
ptmx
pts
ptyp0
ptyp1
ptyp2
ram0
random
tty
tty0
tty1
tty2
ttyACM0
ttyACM1
ttyACM10
ttyACM11
ttyACM12
ttyACM13
ttyACM14
ttyACM15
ttyACM2
ttyACM3
ttyACM4
ttyACM5
ttyACM6
ttyACM7
ttyACM8
ttyACM9
ttyS0
ttyS1
ttyS2
ttyUSB0
ttyUSB1
ttyUSB10
ttyUSB11
ttyUSB12
ttyUSB13
ttyUSB14
ttyUSB15
ttyUSB2
ttyUSB3
ttyUSB4
ttyUSB5
ttyUSB6
ttyUSB7
ttyUSB8
ttyUSB9
ttyp0
ttyp1
ttyp2
urandom
zero

# /sbin/ifconfig
ath0      Link encap:Ethernet  HWaddr 60:E3:27:9F:34:FA
          UP BROADCAST RUNNING MULTICAST  MTU:2290  Metric:1
          RX packets:722 errors:0 dropped:0 overruns:0 frame:0
          TX packets:622 errors:0 dropped:1126 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:108796 (106.2 KiB)  TX bytes:156594 (152.9 KiB)

br0       Link encap:Ethernet  HWaddr 60:E3:27:9F:34:FA
          inet addr:192.168.0.254  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1865 errors:0 dropped:0 overruns:0 frame:0
          TX packets:766 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:168154 (164.2 KiB)  TX bytes:253200 (247.2 KiB)

eth0      Link encap:Ethernet  HWaddr 60:E3:27:9F:34:F9
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth1      Link encap:Ethernet  HWaddr 60:E3:27:9F:34:F9
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1142 errors:0 dropped:0 overruns:0 frame:0
          TX packets:454 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:105898 (103.4 KiB)  TX bytes:166642 (162.7 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wifi0     Link encap:Ethernet  HWaddr 60:E3:27:9F:34:FA
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7052 errors:0 dropped:0 overruns:0 frame:0
          TX packets:42314 errors:561 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:2 Memory:b8100000-b811ffff

# cat /proc/partitions&
major minor  #blocks  name

  31        0        128 mtdblock0
  31        1       1024 mtdblock1
  31        2       2816 mtdblock2
  31        3         64 mtdblock3
  31        4         64 mtdblock4

# cat /proc/diskstats&
    31       0 mtdblock0 0 0 0 0 0 0 0 0 0 0 0
  31       1 mtdblock1 0 0 0 0 0 0 0 0 0 0 0
  31       2 mtdblock2 66 1752 3636 1048 0 0 0 0 0 1048 1048
  31       3 mtdblock3 0 0 0 0 0 0 0 0 0 0 0
  31       4 mtdblock4 1 0 8 0 0 0 0 0 0 0 0

# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/mtdblock2            2432      2432         0 100% /

# cat /proc/pagetypeinfo&
Page block order: 10
Pages per block:  1024

Free pages count per migrate type at order       0      1      2      3      4      5      6      7      8      9     10
Node    0, zone   Normal, type    Unmovable     13     15      7      1      4      4      3      0      0      0      0
Node    0, zone   Normal, type  Reclaimable      0      0      0      0      0      0      0      0      0      0      0
Node    0, zone   Normal, type      Movable      1      7      2      6      4      5      5      0      0      0      0
Node    0, zone   Normal, type      Reserve      0      0      0      0      0      0      0      0      0      0      1
Node    0, zone   Normal, type      Isolate      0      0      0      0      0      0      0      0      0      0      0

Number of blocks type     Unmovable  Reclaimable      Movable      Reserve      Isolate
Node 0, zone   Normal

# cat /proc/vmstat&
nr_free_pages 2103
nr_inactive_anon 0
nr_active_anon 485
nr_inactive_file 1601
nr_active_file 478
nr_unevictable 0
nr_mlock 0
nr_anon_pages 491
nr_mapped 437
nr_file_pages 2079
nr_dirty 0
nr_writeback 0
nr_slab_reclaimable 83
nr_slab_unreclaimable 799
nr_page_table_pages 45
nr_unstable 0
nr_bounce 0
nr_vmscan_write 0
nr_writeback_temp 0
pgpgin 1822
pgpgout 0
pswpin 0
pswpout 0
pgalloc_normal 529018
pgalloc_movable 0
pgfree 531121
pgactivate 874
pgdeactivate 0
pgfault 1724928
pgmajfault 83
pgrefill_normal 0
pgrefill_movable 0
pgsteal_normal 0
pgsteal_movable 0
pgscan_kswapd_normal 0
pgscan_kswapd_movable 0
pgscan_direct_normal 0
pgscan_direct_movable 0
pginodesteal 0
slabs_scanned 0
kswapd_steal 0
kswapd_inodesteal 0
pageoutrun 0
allocstall 0
pgrotated 0
unevictable_pgs_culled 0
unevictable_pgs_scanned 0
unevictable_pgs_rescued 0
unevictable_pgs_mlocked 0
unevictable_pgs_munlocked 0
unevictable_pgs_cleared 0
unevictable_pgs_stranded 0
unevictable_pgs_mlockfreed 0

# cat /proc/zoneinfo&
Node 0, zone   Normal
  pages free     2102
        min      180
        low      225
        high     270
        scanned  0
        spanned  8192
        present  8128
    nr_free_pages 2102
    nr_inactive_anon 0
    nr_active_anon 485
    nr_inactive_file 1602
    nr_active_file 478
    nr_unevictable 0
    nr_mlock     0
    nr_anon_pages 491
    nr_mapped    437
    nr_file_pages 2080
    nr_dirty     0
    nr_writeback 0
    nr_slab_reclaimable 83
    nr_slab_unreclaimable 799
    nr_page_table_pages 45
    nr_unstable  0
    nr_bounce    0
    nr_vmscan_write 0
    nr_writeback_temp 0
        protection: (0, 0)
  pagesets
    cpu: 0
              count: 0
              high:  0
              batch: 1
  all_unreclaimable: 0
  prev_priority:     12
  start_pfn:         0
  inactive_ratio:    1

(Last edited by hostle19 on 24 Dec 2015, 23:03)

Chaos Calmer 15.05 TL-WA901ND-V4 Support Patch

--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -243,7 +243,8 @@ get_status_led() {
        tl-wa850re)
                status_led="tp-link:blue:re"
                ;;
-       tl-wa860re)
+       tl-wa860re | \
+       tl-wa901nd-v4)
                status_led="tp-link:green:power"
                ;;
        tl-mr3220 | \
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -485,7 +485,8 @@ tl-wr842n-v2)
        ;;

 tl-wa801nd-v2 | \
-tl-wa901nd-v3)
+tl-wa901nd-v3 | \
+tl-wa901nd-v4)
        ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
        ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
        ;;
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -360,6 +360,7 @@ tl-wa801nd-v2 |\
 tl-wa901nd |\
 tl-wa901nd-v2 |\
 tl-wa901nd-v3 |\
+tl-wa901nd-v4 |\
 tl-wr703n |\
 tube2h |\
 wndap360 |\
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ a/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -763,6 +763,9 @@ ar71xx_board_detect() {
     *"TL-WA901ND v3")
         name="tl-wa901nd-v3"
         ;;
+    *"TL-WA901ND v4")
+        name="tl-wa901nd-v4"
+        ;;
     *"TL-WDR3500")
         name="tl-wdr3500"
         ;;
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -338,6 +338,7 @@ platform_check_image() {
        tl-wa901nd | \
        tl-wa901nd-v2 | \
        tl-wa901nd-v3 | \
+       tl-wa901nd-v4 | \
        tl-wdr3500 | \
        tl-wdr4300 | \
        tl-wdr4900-v2 | \
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -117,6 +117,7 @@ CONFIG_ATH79_MACH_TL_WA7210N_V2=y
 CONFIG_ATH79_MACH_TL_WA830RE_V2=y
 CONFIG_ATH79_MACH_TL_WA901ND=y
 CONFIG_ATH79_MACH_TL_WA901ND_V2=y
+CONFIG_ATH79_MACH_TL_WA901ND_V4=y
 CONFIG_ATH79_MACH_TL_WAX50RE=y
 CONFIG_ATH79_MACH_TL_WDR3500=y
 CONFIG_ATH79_MACH_TL_WDR4300=y
--- /dev/null
+++ b/ target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa901nd-v4.c
@@ -0,0 +1,107 @@
+/*
+ *  TP-LINK TL-WA901N/ND v4 board support
+ *
+ *  Copyright (C) 2015 Hostle <hostle@fire-wrt.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+ */
+
+#include <linux/gpio.h>
+#include <linux/platform_device.h>
+
+#include <asm/mach-ath79/ath79.h>
+#include <asm/mach-ath79/ar71xx_regs.h>
+
+#include "common.h"
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define TL_WA901ND_V4_GPIO_LED_QSS     3
+#define TL_WA901ND_V4_GPIO_LED_POWER   18
+#define TL_WA901ND_V4_GPIO_LED_LAN     7
+#define TL_WA901ND_V4_GPIO_LED_WLAN    8
+
+#define TL_WA901ND_V4_GPIO_BTN_RESET   1
+
+#define TL_WA901ND_V4_KEYS_POLL_INTERVAL       20              /* msecs */
+#define TL_WA901ND_V4_KEYS_DEBOUNCE_INTERVAL   \
+                                       (3 * TL_WA901ND_V4_KEYS_POLL_INTERVAL)
+
+static struct gpio_led tl_wa901nd_v4_leds_gpio[] __initdata = {
+       {
+               .name           = "tp-link:green:power",
+               .gpio           = TL_WA901ND_V4_GPIO_LED_POWER,
+               .active_low     = 1,
+       },
+       {
+               .name           = "tp-link:green:lan",
+               .gpio           = TL_WA901ND_V4_GPIO_LED_LAN,
+               .active_low     = 1,
+       },
+       {
+               .name           = "tp-link:green:qss",
+               .gpio           = TL_WA901ND_V4_GPIO_LED_QSS,
+               .active_low     = 1,
+
+       },
+       {
+               .name           = "tp-link:green:wlan",
+               .gpio           = TL_WA901ND_V4_GPIO_LED_WLAN,
+               .active_low     = 1,
+       }
+};
+
+static struct gpio_keys_button tl_wa901nd_v4_gpio_keys[] __initdata = {
+       {
+               .desc           = "reset",
+               .type           = EV_KEY,
+               .code           = KEY_RESTART,
+               .debounce_interval = TL_WA901ND_V4_KEYS_DEBOUNCE_INTERVAL,
+               .gpio           = TL_WA901ND_V4_GPIO_BTN_RESET,
+               .active_low     = 1,
+       }
+};
+
+static const char *tl_wa901n_v4_part_probes[] = {
+       "tp-link",
+       NULL,
+};
+
+static struct flash_platform_data tl_wa901n_v4_flash_data = {
+       .part_probes    = tl_wa901n_v4_part_probes,
+};
+
+static void __init tl_wa901nd_v4_setup(void)
+{
+    u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
+    u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
+
+    ath79_register_m25p80(&tl_wa901n_v4_flash_data);
+
+    ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wa901nd_v4_leds_gpio),
+                 tl_wa901nd_v4_leds_gpio);
+
+    ath79_register_gpio_keys_polled(-1, TL_WA901ND_V4_KEYS_POLL_INTERVAL,
+                    ARRAY_SIZE(tl_wa901nd_v4_gpio_keys),
+                    tl_wa901nd_v4_gpio_keys);
+
+    ath79_register_mdio(0, 0x0);
+
+    ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1);
+    ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1);
+
+    ath79_register_eth(0);
+    ath79_register_eth(1);
+
+    ath79_register_wmac(ee, mac);
+
+}
+
+MIPS_MACHINE(ATH79_MACH_TL_WA901ND_V4, "TL-WA901ND-v4", "TP-LINK TL-WA901ND v4",
+            tl_wa901nd_v4_setup);
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -659,6 +659,14 @@ define Device/tl-wa901nd-v3
 endef
 TARGET_DEVICES += tl-wa901nd-v3

+define Device/tl-wa901nd-v4
+    $(Device/tplink-4mlzma)
+    BOARDNAME := TL-WA901ND-v4
+    DEVICE_PROFILE := TLWA901
+    TPLINK_HWID := 0x09010004
+endef
+TARGET_DEVICES += tl-wa901nd-v3 tl-wa901nd-v4
+
 define Device/tl-wa7210n-v2
     $(Device/tplink-4mlzma)
     BOARDNAME := TL-WA7210N-v2

--- /dev/null
+++ b/target/linux/ar71xx/patches-3.18/907-MIPS-ath79-add-tl-wa901nd-v4.patch

--- a/arch/mips/ath79/Kconfig
+++ b/arch/mips/ath79/Kconfig
@@ -1014,6 +1014,15 @@ config ATH79_MACH_TL_WA901ND_V2
     select ATH79_DEV_M25P80
     select ATH79_DEV_WMAC
 
+config ATH79_MACH_TL_WA901ND_V4
+    bool "TP-LINK TL-WA901ND v4 support"
+    select SOC_QCA956X
+    select ATH79_DEV_ETH
+    select ATH79_DEV_GPIO_BUTTONS
+    select ATH79_DEV_LEDS_GPIO
+    select ATH79_DEV_M25P80
+    select ATH79_DEV_WMAC
+
 config ATH79_MACH_TL_WDR3500
     bool "TP-LINK TL-WDR3500 board support"
     select SOC_AR934X
--- a/arch/mips/ath79/Makefile
+++ b/arch/mips/ath79/Makefile
@@ -127,6 +127,7 @@ obj-$(CONFIG_ATH79_MACH_TL_WA7210N_V2)    +
 obj-$(CONFIG_ATH79_MACH_TL_WA830RE_V2)    += mach-tl-wa830re-v2.o
 obj-$(CONFIG_ATH79_MACH_TL_WA901ND)    += mach-tl-wa901nd.o
 obj-$(CONFIG_ATH79_MACH_TL_WA901ND_V2)    += mach-tl-wa901nd-v2.o
+obj-$(CONFIG_ATH79_MACH_TL_WA901ND_V4)  += mach-tl-wa901nd-v4.o
 obj-$(CONFIG_ATH79_MACH_TL_WDR3500)     += mach-tl-wdr3500.o
 obj-$(CONFIG_ATH79_MACH_TL_WDR4300)     += mach-tl-wdr4300.o
 obj-$(CONFIG_ATH79_MACH_TL_WR741ND)    += mach-tl-wr741nd.o
--- a/arch/mips/ath79/machtypes.h
+++ b/arch/mips/ath79/machtypes.h
@@ -151,6 +151,7 @@ enum ath79_mach_type {
     ATH79_MACH_TL_WA901ND,        /* TP-LINK TL-WA901ND */
     ATH79_MACH_TL_WA901ND_V2,    /* TP-LINK TL-WA901ND v2 */
     ATH79_MACH_TL_WA901ND_V3,    /* TP-LINK TL-WA901ND v3 */
+    ATH79_MACH_TL_WA901ND_V4,       /* TP-LINK TL-WA901ND v4 */
     ATH79_MACH_TL_WDR3500,        /* TP-LINK TL-WDR3500 */
     ATH79_MACH_TL_WDR4300,        /* TP-LINK TL-WDR4300 */
     ATH79_MACH_TL_WDR4900_V2,    /* TP-LINK TL-WDR4900 v2 */

(Last edited by hostle19 on 10 Jan 2016, 22:35)

here is the boot log and the patch for OpenWrt Designated Driver r48014

U-Boot 1.1.4 (Apr  8 2015 - 10:25:45)

ap151 - Dragonfly 1.0

DRAM:  32 MB
Top of RAM usable for U-Boot at: 82000000
Reserving 139k for U-Boot at: 81fdc000
Reserving 192k for malloc() at: 81fac000
Reserving 44 Bytes for Board Info at: 81fabfd4
Reserving 36 Bytes for Global Data at: 81fabfb0
Reserving 128k for boot params() at: 81f8bfb0
Stack Pointer at: 81f8bf98
Now running in RAM - U-Boot at: 81fdc000
Flash Manuf Id 0xef, DeviceId0 0x40, DeviceId1 0x16
flash size 4MB, sector count = 64
Flash:  4 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ath_gmac_enet_initialize...
No valid address in Flash. Using fixed address
No valid address in Flash. Using fixed address
ath_gmac_enet_initialize: reset mask:c02200
Dragonfly----> S27 PHY *
: cfg1 0x80000000 cfg2 0x7114
eth0: 00:03:7f:09:0b:ad
athrs27_phy_setup ATHR_PHY_CONTROL 4 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 4 :10
eth0 up
ATHRS27: resetting s27
ATHRS27: s27 reset done
: cfg1 0x800c0000 cfg2 0x7214
eth1: 00:03:7f:09:0b:ad
athrs27_phy_setup ATHR_PHY_CONTROL 0 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 0 :10
athrs27_phy_setup ATHR_PHY_CONTROL 1 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 1 :10
athrs27_phy_setup ATHR_PHY_CONTROL 2 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 2 :10
athrs27_phy_setup ATHR_PHY_CONTROL 3 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 3 :10
eth1 up
eth0, eth1
Setting 0x181162c0 to 0x82
Autobooting in 1 seconds
## Booting image at 9f020000 ...
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 33554432

Starting kernel ...
[    0.000000] Linux version 4.1.13 (hostle@hostle) (gcc version 5.2.0 (OpenWrt GCC 5.2.0 r48014) ) #2 Sat Jan 2 01:16:07 EST 2016
[    0.000000] MyLoader: sysp=cfc4f681, boardp=5b7df190, parts=59f64b1a
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019750 (MIPS 74Kc)
[    0.000000] SoC: Qualcomm Atheros TP9343 rev 0
[    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 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] On node 0 totalpages: 8192
[    0.000000] free_area_init_node: node 0, pgdat 803b3de0, node_mem_map 81000000
[    0.000000]   Normal zone: 64 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 8192 pages, LIFO batch:0
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache 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: 8128
[    0.000000] Kernel command line:  board=TL-WA901ND-v4  console=ttyS0,115200 rootfstype=squashfs,jffs2 noinitrd
[    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=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 28068K/32768K available (2799K kernel code, 140K rwdata, 572K rodata, 252K init, 195K bss, 4700K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:83
[    0.000000] Clocks: CPU:750.000MHz, DDR:400.000MHz, AHB:250.000MHz, Ref:25.000MHz
[    0.000000] clocksource MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 5096694524 ns
[    0.000007] sched_clock: 32 bits at 375MHz, resolution 2ns, wraps every 5726622718ns
[    0.007444] Calibrating delay loop... 373.55 BogoMIPS (lpj=1867776)
[    0.069989] pid_max: default: 32768 minimum: 301
[    0.074520] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.080785] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090202] clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.100141] NET: Registered protocol family 16
[    0.105641] MIPS: machine is TP-LINK TL-WA901ND v4
[    0.562163] Switched to clocksource MIPS
[    0.567067] NET: Registered protocol family 2
[    0.572005] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.578661] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.584725] TCP: Hash tables configured (established 1024 bind 1024)
[    0.590860] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.596437] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.602702] NET: Registered protocol family 1
[    0.606868] PCI: CLS 0 bytes, default 32
[    0.607819] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.629968] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.635551] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.647580] io scheduler noop registered
[    0.651275] io scheduler deadline registered (default)
[    0.656443] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.662895] console [ttyS0] disabled
[    0.686336] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 1562500) is a 16550A
[    0.694541] console [ttyS0] enabled
[    0.701679] bootconsole [early0] disabled
[    0.712696] m25p80 spi0.0: found w25q32, expected m25p80
[    0.718203] m25p80 spi0.0: w25q32 (4096 Kbytes)
[    0.724055] 5 tp-link partitions found on MTD device spi0.0
[    0.729816] Creating 5 MTD partitions on "spi0.0":
[    0.734817] 0x000000000000-0x000000020000 : "u-boot"
[    0.740766] 0x000000020000-0x000000153294 : "kernel"
[    0.746660] 0x000000153294-0x0000003f0000 : "rootfs"
[    0.752554] mtd: device 2 (rootfs) set to be root filesystem
[    0.758470] 1 squashfs-split partitions found on MTD device rootfs
[    0.764897] 0x000000380000-0x0000003f0000 : "rootfs_data"
[    0.771214] 0x0000003f0000-0x000000400000 : "art"
[    0.776846] 0x000000020000-0x0000003f0000 : "firmware"
[    0.800775] libphy: ag71xx_mdio: probed
[    1.394219] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.1:04 [uid=004dd042, driver=Generic PHY]
[    1.404283] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:MII
[    1.993918] ag71xx-mdio.1: Found an AR934X built-in switch
[    2.036251] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[    2.044543] NET: Registered protocol family 10
[    2.052913] NET: Registered protocol family 17
[    2.057595] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    2.070807] 8021q: 802.1Q VLAN Support v1.8
[    2.081139] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    2.090341] Freeing unused kernel memory: 252K (803d1000 - 80410000)
[    3.094987] init: Console is alive
[    3.098741] init: - watchdog -
[    4.005244] usbcore: registered new interface driver usbfs
[    4.010984] usbcore: registered new interface driver hub
[    4.016627] usbcore: registered new device driver usb
[    4.027353] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.035579] ehci-platform: EHCI generic platform driver
[    4.043995] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.051603] ohci-platform: OHCI generic platform driver
[    4.102747] init: - preinit -
[    4.614597] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    4.640545] random: procd urandom read with 7 bits of entropy available
[    7.434366] eth0: link up (100Mbps/Full duplex)
[    7.439076] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    7.778228] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[    7.812469] eth0: link down
[    7.826434] procd: - early -
[    7.829511] procd: - watchdog -
[    8.520099] procd: - ubus -
[    9.583244] procd: - init -
[   10.258235] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   10.277679] Loading modules backported from Linux version master-2015-12-03-0-g1677f62
[   10.285924] Backport generated by backports.git backports-20151120-0-g906a6b3
[   10.296305] ip_tables: (C) 2000-2006 Netfilter Core Team
[   10.311627] nf_conntrack version 0.5.0 (442 buckets, 1768 max)
[   10.351939] xt_time: kernel timezone is -0000
[   10.377279] cfg80211: World regulatory domain updated:
[   10.382649] cfg80211:  DFS Master region: unset
[   10.387146] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   10.397215] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   10.405488] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   10.413756] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[   10.422021] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[   10.431814] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[   10.441611] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[   10.449974] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   10.458241] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[   10.522536] PPP generic driver version 2.4.2
[   10.529440] NET: Registered protocol family 24
[   10.580332] ath: EEPROM regdomain: 0x0
[   10.580353] ath: EEPROM indicates default country code should be used
[   10.580360] ath: doing EEPROM country->regdmn map search
[   10.580378] ath: country maps to regdmn code: 0x3a
[   10.580386] ath: Country alpha2 being used: US
[   10.580393] ath: Regpair used: 0x3a
[   10.591884] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   10.595635] ieee80211 phy0: Atheros AR9561 Rev:0 mem=0xb8100000, irq=47
[   10.605154] cfg80211: Regulatory domain changed to country: US
[   10.611191] cfg80211:  DFS Master region: FCC
[   10.615561] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   10.625634] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 3000 mBm), (N/A)
[   10.633907] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2300 mBm), (N/A)
[   10.643699] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2300 mBm), (0 s)
[   10.653491] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2300 mBm), (0 s)
[   10.661843] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm), (N/A)
[   10.670112] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)
[   17.454087] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   17.482214] jffs2_build_filesystem(): unlocking the mtd device... done.
[   17.489101] jffs2_build_filesystem(): erasing all blocks after the end marker... done.
[   19.412961] jffs2: notice: (934) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   20.074847] device eth0 entered promiscuous mode
[   20.103750] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   22.984364] eth0: link up (100Mbps/Full duplex)
[   22.989110] br-lan: port 1(eth0) entered forwarding state
[   22.994758] br-lan: port 1(eth0) entered forwarding state
[   23.022214] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   24.992178] br-lan: port 1(eth0) entered forwarding state
[   69.762191] random: nonblocking pool is initialized

TL-WA901ND V4 support patch for OpenWrt Designated Driver r48014

--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -280,7 +280,8 @@ get_status_led() {
     tl-wa850re)
         status_led="tp-link:blue:re"
         ;;
-    tl-wa860re)
+    tl-wa860re | \
+    tl-wa901nd-v4)
         status_led="tp-link:green:power"
         ;;
     tl-mr3220 | \
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -601,7 +601,8 @@ tl-wr842n-v2)
     ;;
 
 tl-wa801nd-v2 | \
-tl-wa901nd-v3)
+tl-wa901nd-v3 | \
+tl-wa901nd-v4)
     ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
     ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
     ;;
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -356,6 +356,7 @@ tl-wa801nd-v2 |\
 tl-wa901nd |\
 tl-wa901nd-v2 |\
 tl-wa901nd-v3 |\
+tl-wa901nd-v4 |\
 tl-wr703n |\
 tube2h |\
 wndap360 |\
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -830,6 +830,9 @@ ar71xx_board_detect() {
     *"TL-WA901ND v3")
         name="tl-wa901nd-v3"
         ;;
+    *"TL-WA901ND v4")
+        name="tl-wa901nd-v4"
+        ;;
     *"TL-WDR3320 v2")
         name="tl-wdr3320-v2"
         ;;
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -354,6 +354,7 @@ platform_check_image() {
     tl-wa901nd | \
     tl-wa901nd-v2 | \
     tl-wa901nd-v3 | \
+    tl-wa901nd-v4 | \
     tl-wdr3320-v2 | \
     tl-wdr3500 | \
     tl-wdr4300 | \
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -136,6 +136,7 @@ CONFIG_ATH79_MACH_TL_WA7210N_V2=y
 CONFIG_ATH79_MACH_TL_WA830RE_V2=y
 CONFIG_ATH79_MACH_TL_WA901ND=y
 CONFIG_ATH79_MACH_TL_WA901ND_V2=y
+CONFIG_ATH79_MACH_TL_WA901ND_V4=y
 CONFIG_ATH79_MACH_TL_WAX50RE=y
 CONFIG_ATH79_MACH_TL_WDR3320_V2=y
 CONFIG_ATH79_MACH_TL_WDR3500=y
--- /dev/null
+++ b/ target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa901nd-v4.c
@@ -0,0 +1,107 @@
+/*
+ *  TP-LINK TL-WA901N/ND v4 board support
+ *
+ *  Copyright (C) 2015 Hostle <hostle@fire-wrt.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+ */
+
+#include <linux/gpio.h>
+#include <linux/platform_device.h>
+
+#include <asm/mach-ath79/ath79.h>
+#include <asm/mach-ath79/ar71xx_regs.h>
+
+#include "common.h"
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define TL_WA901ND_V4_GPIO_LED_QSS     3
+#define TL_WA901ND_V4_GPIO_LED_POWER   18
+#define TL_WA901ND_V4_GPIO_LED_LAN     7
+#define TL_WA901ND_V4_GPIO_LED_WLAN    8
+
+#define TL_WA901ND_V4_GPIO_BTN_RESET   1
+
+#define TL_WA901ND_V4_KEYS_POLL_INTERVAL       20              /* msecs */
+#define TL_WA901ND_V4_KEYS_DEBOUNCE_INTERVAL   \
+                                       (3 * TL_WA901ND_V4_KEYS_POLL_INTERVAL)
+
+static struct gpio_led tl_wa901nd_v4_leds_gpio[] __initdata = {
+       {
+               .name           = "tp-link:green:power",
+               .gpio           = TL_WA901ND_V4_GPIO_LED_POWER,
+               .active_low     = 1,
+       },
+       {
+               .name           = "tp-link:green:lan",
+               .gpio           = TL_WA901ND_V4_GPIO_LED_LAN,
+               .active_low     = 1,
+       },
+       {
+               .name           = "tp-link:green:qss",
+               .gpio           = TL_WA901ND_V4_GPIO_LED_QSS,
+               .active_low     = 1,
+
+       },
+       {
+               .name           = "tp-link:green:wlan",
+               .gpio           = TL_WA901ND_V4_GPIO_LED_WLAN,
+               .active_low     = 1,
+       }
+};
+
+static struct gpio_keys_button tl_wa901nd_v4_gpio_keys[] __initdata = {
+       {
+               .desc           = "reset",
+               .type           = EV_KEY,
+               .code           = KEY_RESTART,
+               .debounce_interval = TL_WA901ND_V4_KEYS_DEBOUNCE_INTERVAL,
+               .gpio           = TL_WA901ND_V4_GPIO_BTN_RESET,
+               .active_low     = 1,
+       }
+};
+
+static const char *tl_wa901n_v4_part_probes[] = {
+       "tp-link",
+       NULL,
+};
+
+static struct flash_platform_data tl_wa901n_v4_flash_data = {
+       .part_probes    = tl_wa901n_v4_part_probes,
+};
+
+static void __init tl_wa901nd_v4_setup(void)
+{
+        u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
+    u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
+
+    ath79_register_m25p80(&tl_wa901n_v4_flash_data);
+
+    ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wa901nd_v4_leds_gpio),
+                 tl_wa901nd_v4_leds_gpio);
+
+    ath79_register_gpio_keys_polled(-1, TL_WA901ND_V4_KEYS_POLL_INTERVAL,
+                    ARRAY_SIZE(tl_wa901nd_v4_gpio_keys),
+                    tl_wa901nd_v4_gpio_keys);
+
+    ath79_register_mdio(0, 0x0);
+
+    ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1);
+    ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1);
+
+    ath79_register_eth(0);
+    ath79_register_eth(1);
+
+    ath79_register_wmac(ee, mac);
+
+}
+
+MIPS_MACHINE(ATH79_MACH_TL_WA901ND_V4, "TL-WA901ND-v4", "TP-LINK TL-WA901ND v4",
+            tl_wa901nd_v4_setup);
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -1025,7 +1025,14 @@ define Device/tl-wa901nd-v3
     DEVICE_PROFILE := TLWA901
     TPLINK_HWID := 0x09010003
 endef
-TARGET_DEVICES += tl-wa901nd-v1 tl-wa901nd-v2 tl-wa901nd-v3
+
+define Device/tl-wa901nd-v4
+    $(Device/tplink-4mlzma)
+    BOARDNAME := TL-WA901ND-v4
+    DEVICE_PROFILE := TLWA901
+    TPLINK_HWID := 0x09010004
+endef
+TARGET_DEVICES += tl-wa901nd-v1 tl-wa901nd-v2 tl-wa901nd-v3 tl-wa901nd-v4
 
 define Device/tl-wa7210n-v2
     $(Device/tplink-4mlzma)
--- /dev/null
+++ b/target/linux/ar71xx/patches-4.1/911-MIPS-ath79-add-tl-wa901nd-v4.patch
@@ -0,0 +1,38 @@
+--- a/arch/mips/ath79/Kconfig
++++ b/arch/mips/ath79/Kconfig
+@@ -68,6 +68,15 @@ config ATH79_MACH_PB44
+       Say 'Y' here if you want your kernel to support the
+       Atheros PB44 reference board.
+ 
++config ATH79_MACH_TL_WA901ND_V4
++    bool "TP-LINK TL-WA901ND v4 support"
++    select SOC_QCA956X
++    select ATH79_DEV_ETH
++    select ATH79_DEV_GPIO_BUTTONS
++    select ATH79_DEV_LEDS_GPIO
++    select ATH79_DEV_M25P80
++    select ATH79_DEV_WMAC
++
+ config ATH79_MACH_UBNT_XM
+     bool "Ubiquiti Networks XM/UniFi boards"
+     select SOC_AR724X
+--- a/arch/mips/ath79/Makefile
++++ b/arch/mips/ath79/Makefile
+@@ -144,6 +144,7 @@ obj-$(CONFIG_ATH79_MACH_TL_WA7210N_V2)    +
+ obj-$(CONFIG_ATH79_MACH_TL_WA830RE_V2)    += mach-tl-wa830re-v2.o
+ obj-$(CONFIG_ATH79_MACH_TL_WA901ND)    += mach-tl-wa901nd.o
+ obj-$(CONFIG_ATH79_MACH_TL_WA901ND_V2)    += mach-tl-wa901nd-v2.o
++obj-$(CONFIG_ATH79_MACH_TL_WA901ND_V4)  += mach-tl-wa901nd-v4.o
+ obj-$(CONFIG_ATH79_MACH_TL_WDR3320_V2)  += mach-tl-wdr3320-v2.o
+ obj-$(CONFIG_ATH79_MACH_TL_WDR3500)     += mach-tl-wdr3500.o
+ obj-$(CONFIG_ATH79_MACH_TL_WDR4300)     += mach-tl-wdr4300.o
+--- a/arch/mips/ath79/machtypes.h
++++ b/arch/mips/ath79/machtypes.h
+@@ -169,6 +169,7 @@ enum ath79_mach_type {
+     ATH79_MACH_TL_WA901ND,        /* TP-LINK TL-WA901ND */
+     ATH79_MACH_TL_WA901ND_V2,    /* TP-LINK TL-WA901ND v2 */
+     ATH79_MACH_TL_WA901ND_V3,    /* TP-LINK TL-WA901ND v3 */
++    ATH79_MACH_TL_WA901ND_V4,       /* TP-LINK TL-WA901ND v4 */
+     ATH79_MACH_TL_WDR3320_V2,    /* TP-LINK TL-WDR3320 v2 */
+     ATH79_MACH_TL_WDR3500,        /* TP-LINK TL-WDR3500 */
+     ATH79_MACH_TL_WDR4300,        /* TP-LINK TL-WDR4300 */

I have to manually approve each registration .... to ward off the spammers and the bots. You should be able to login and download the files now

just flashed it, but wifi does not feel stable, signal is strong but I got poor performance : 20-30Mb/s download  and 50-70Mb/s uplaud. Using 2x2 mimo wifi adapter on 20 MHz channel.

that is unfortunate, working 100% on mine, hooked to isp router as wireless client providing all my devices with a wireless ap. Android tv hasn't missed a beat smile

well some tweaks with WiFi transmission powers and wifi gets stable. Reduce transmit power from 26dBm to 10dBm and now working nice stable 50-60Mb/s on 20MHz channel. Also compiled my self image without luci and with full wpad support.
next steps setup multiple SSID and vlan's.

Good stuff, I am glad you got it running good. I haven't had any issues what so ever. Hopefully someone will commit my patches and to add official support so everyone can play smile

vilpalu, how did you manage to get shell access? The root:sohoadmin doesn't work with ssh of my newly delivered WA901ND v4. I could get serial console working after soldering the Tx/Rx holes to the lines, but they disabled shell access through serial (only boot messages appear).

using serial once it has finished booting press enter and the prompt should appear, I just got mine 2 weeks ago and I was able to log on and get the information I posted above .

Hello hostle19,

i tested your cc-patch and the board-detection doesn't work:

--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -763,6 +763,9 @@ ar71xx_board_detect() {
        *"TL-WA901ND v3")
                name="tl-wa901nd-v3"
                ;;
+       *"TL-WA901N/ND v4")
+               name="tl-wa901nd-v4"
+               ;;
        *"TL-WDR3500")
                name="tl-wdr3500"
                ;;

i think it has to be

--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -763,6 +763,9 @@ ar71xx_board_detect() {
        *"TL-WA901ND v3")
                name="tl-wa901nd-v3"
                ;;
+       *"TL-WA901ND v4")
+               name="tl-wa901nd-v4"
+               ;;
        *"TL-WDR3500")
                name="tl-wdr3500"
                ;;

Is there any possibility to upload your original diffs? Thanks,
toms_01

@ toms_01, you are absolutely correct, I had originally named it  TL-WA901N/ND v4 in the mach-tl-wa901nd-v4.c file and must not have updated the patch before i uploaded, I have corrected in my post above it using the diff from my git, it should be correct now. Thanks for pointing that out.I am away at school right now but when I am home next weekend I will upload the originals for you. In the mean time you can check out my git ...https://github.com/Hostle/openwrt/tree/chaos_calmer if you like.

hostle19 wrote:

using serial once it has finished booting press enter and the prompt should appear, I just got mine 2 weeks ago and I was able to log on and get the information I posted above .

Thanks for confirmation, it works! My OS/X driver was fooling me (again), the cu cmd sometimes doesn't get out Tx data to the FT232RL adapter unless I start cu as root. I now can successfully log into the TL-WA901.

Sure no problem, whats the username you registered with ? there has been a swarm of spammers trying to get in lately so I had to tighten up the firewall settings.

hostle19 wrote:

Sure no problem, whats the username you registered with ? there has been a swarm of spammers trying to get in lately so I had to tighten up the firewall settings.

obiserver

You should be all set now, sorry about the wait

Cheers