Skip to content

DLink DIR655A1

Adrian Chadd edited this page Mar 22, 2015 · 1 revision

D-Link DIR655A1

Overview

The D-Link DIR655 (A1) is a 3x3 2GHz 11n AP.

  • QCA9558 SoC, MIPS74K, 720MHz
  • 128MiB RAM
  • 16MiB flash
  • AR8327N gigabit switch

How to build

  • Check out freebsd-HEAD
  • clone the freebsd-wifi-build repo
  • make sure /tftpboot exists and is writable
$ cd /path/to/freebsd/src
$ /path/to/freebsd-wifi-build/bin/build dir655a1

How to flash

  • Setup your host as 192.168.0.100
  • Plug into a LAN port
  • Power on, hold the reset pin down for 10 seconds
  • Visit 192.168.0.1 in Firefox
  • Upload 'dir655a1.factory.img'

It's easier to verify this with the serial port wired up - unfortunately the flash recovery web ui is not very reliable and sometimes plainly fails to flash things.

Issues

  • The serial port RX doesn't work - only TX. So even once FreeBSD boots, the serial port isn't fully available. It's a missing resistor on the board and/or a missing GPIO pin configuration in the SoC setup.
  • D-Link don't put the calibration data at the end of flash - they put it around 6 megabytes into the flash itself. So to use the rest of the image you'll have to come up with some creative way of writing to it after the unit has reset. If you'd like to do this, please email [email protected] and we'll figure out how.

See also

Boot log

*** Warning *** : PCIe WLAN Module not found !!!
*** Warning *** : PCIe WLAN Module not found !!!
In:    serial
Out:   serial
Err:   serial
Net:   ath_gmac_enet_initialize...
athrs_sgmii_res_cal: cal value = 0x1
default_mac_from_artblock: C0:A0:BB:EA:48:27 from 0xBFFE0004
No valid address in Flash. Using fixed address
default_mac_from_artblock: C0:A0:BB:EA:48:27 from 0xBFFE0004
No valid address in Flash. Using fixed address
ath_gmac_enet_initialize: reset mask:c02200 
Scorpion  ----> S17 PHY *
Vlan config...
s17 phy0 register value 0x00004140
TEST: FINAL REG VAL after TX Calibration - 0x46000000
TEST: FINAL XMII VAL after RX Calibration - 0x56000000
TEST: FINAL ETH_CFG VAL after RX Calibration - 0x00028001
not is_drqfn 
new change S17_P0PAD_MODE_REG  4= [0x80] athrs17_reg_init: complete
: cfg1 0x80000000 cfg2 0x7335
eth0: 00:03:7f:09:0b:ad
eth0 up
athrs17_reg_init_wan done
athrs17_reg_init_wan S17_P6PAD_MODE_REG c= [0x7600000] done
SGMII in forced mode
athr_gmac_sgmii_setup SGMII done
: cfg1 0x800c0000 cfg2 0x7214
eth1: 00:03:7f:09:0b:ad
eth1 up
eth0, eth1
Setting 0x18116290 to 0x4890214f
main_loop 434> gpio 17: 2 , delay:1 
Hit any key to stop autoboot 0:  0 
## Booting image at 9f040000 ...
   Image Name:   FreeBSD
   Created:      2015-03-20   6:11:45 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1366995 Bytes =  1.3 MB
   Load Address: 80050000
   Entry Point:  80050100
   Verifying Checksum at 0x9f040040 ...OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80050100) ...
## bootargs 0: console=ttyS0,115200 root=31:02 rootfstype=jffs2 init=/sbin/init mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),6336k(rootfs),1408k(uImage),8256k(mib0),64k(ART)...
## bootargs @A7F73FB0: console=ttyS0,115200 mem=128M root=31:03 rootfstype=squashfs,jffs2 init=/sbin/init mtdparts=ath-nor0:192k(u-boot),64k(nvram),15296k(linux),13952k@0x00190000(rootfs),192k(LANG),512k(My-Dlink),64k(MAC),64k(ART)...
## Giving linux memsize in bytes, 134217728

Starting kernel ...

CPU platform: Atheros AR9558 rev 0
CPU Frequency=720 MHz
CPU DDR Frequency=600 MHz
CPU AHB Frequency=200 MHz
platform frequency: 720 MHz
CPU reference clock: 40 MHz
CPU MDIO clock: 40 MHz
arguments: 
  a0 = 00000007
  a1 = a7f73fb0
  a2 = a7f74490
  a3 = 00000010
Cmd line:argv is invalid
Environment:
envp is invalid
Cache info:
  picache_stride    = 4096
  picache_loopcount = 16
  pdcache_stride    = 4096
  pdcache_loopcount = 8
cpu0: MIPS Technologies processor v80.151
  MMU: Standard TLB, 32 entries
  L1 i-cache: 4 ways of 512 sets, 32 bytes per line
  L1 d-cache: 4 ways of 256 sets, 32 bytes per line
  Config1=0xbee3519e<PerfCount,WatchRegs,MIPS16,EJTAG>
  Config3=0x2e28
Physical memory chunk(s):
0x52a000 - 0x7ffffff, 128802816 bytes (31446 pages)
Maxmem is 0x8000000
qca955x_chip_init_gmac: gmac_cfg=0x00000001
qca955x_configure_gmac: ETH_CFG=0x00028001
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2015 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.0-CURRENT #0 r279943:280239M: Thu Mar 19 23:11:19 PDT 2015
    adrian@lucy-11i386:/usr/home/adrian/work/freebsd/head-embedded/obj/mips/mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/sys/DIR-655A1 mips
gcc version 4.2.1 20070831 patched [FreeBSD]
Preloaded elf kernel "kernel" at 0x80524090.
real memory  = 134217728 (131072K bytes)
Physical memory chunk(s):
0x005be000 - 0x07d97fff, 125673472 bytes (30682 pages)
avail memory = 125403136 (119MB)
wlan: <802.11 Link Layer>
random: entropy device infrastructure driver
random: selecting highest priority adaptor <Dummy>
mem: <memory>
null: <full device, null device, zero device>
random: SOFT: yarrow init()
random: selecting highest priority adaptor <Yarrow>
nexus0: <MIPS32 root nexus>
clock0: <Generic MIPS32 ticker> on nexus0
Timecounter "MIPS32" frequency 360000000 Hz quality 800
Event timer "MIPS32" frequency 360000000 Hz quality 800
argemdio0: <Atheros AR71xx built-in ethernet interface, MDIO controller> at mem 0x19000000-0x19000fff on nexus0
mdio0: <MDIO> on argemdio0
mdioproxy0: <MII/MDIO proxy, MDIO side> on mdio0
arswitch0: <Atheros AR8327 Ethernet Switch (ver 1 rev 4)> on mdio0
arswitch0: ar8327_fetch_pdata_port: port 0: speed=3, duplex=1, txpause=1, rxpause=1
arswitch0: ar8327_fetch_pdata_port: port 6: speed=3, duplex=1, txpause=1, rxpause=1
arswitch0: ar8327_fetch_pdata_pad: pad 0: mode=3, rxclk_sel=0, txclk_sel=0, txclk_delay_sel=0, rxclk_delay_sel=0, txclk_delay_en=0, rxclk_enable_en=0, sgmii_delay_en=1, pipe_rxclk_sel=0
arswitch0: ar8327_fetch_pdata_pad: pad 6: mode=6, rxclk_sel=0, txclk_sel=0, txclk_delay_sel=1, rxclk_delay_sel=2, txclk_delay_en=1, rxclk_enable_en=1, sgmii_delay_en=0, pipe_rxclk_sel=0
arswitch0: ar8327_phy_fixup: called; phy=0; chiprev=4
arswitch0: ar8327_phy_fixup: called; phy=1; chiprev=4
arswitch0: ar8327_phy_fixup: called; phy=2; chiprev=4
arswitch0: ar8327_phy_fixup: called; phy=3; chiprev=4
arswitch0: ar8327_phy_fixup: called; phy=4; chiprev=4
miibus0: <MII bus> on arswitch0
ukphy0: <Generic IEEE 802.3u media interface> PHY 0 on miibus0
ukphy0: OUI 0x00c82e, model 0x0003, rev. 4
ukphy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto
miibus1: <MII bus> on arswitch0
ukphy1: <Generic IEEE 802.3u media interface> PHY 1 on miibus1
ukphy1: OUI 0x00c82e, model 0x0003, rev. 4
ukphy1:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto
miibus2: <MII bus> on arswitch0
ukphy2: <Generic IEEE 802.3u media interface> PHY 2 on miibus2
ukphy2: OUI 0x00c82e, model 0x0003, rev. 4
ukphy2:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto
miibus3: <MII bus> on arswitch0
ukphy3: <Generic IEEE 802.3u media interface> PHY 3 on miibus3
ukphy3: OUI 0x00c82e, model 0x0003, rev. 4
ukphy3:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto
miibus4: <MII bus> on arswitch0
ukphy4: <Generic IEEE 802.3u media interface> PHY 4 on miibus4
ukphy4: OUI 0x00c82e, model 0x0003, rev. 4
ukphy4:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto
etherswitch0: <Switch controller> on arswitch0
mdio1: <MDIO> on arswitch0
mdioproxy1: <MII/MDIO proxy, MDIO side> on mdio1
argemdio1: <Atheros AR71xx built-in ethernet interface, MDIO controller> at mem 0x1a000000-0x1a000fff on nexus0
mdio2: <MDIO> on argemdio1
mdioproxy2: <MII/MDIO proxy, MDIO side> on mdio2
apb0 at irq 4 on nexus0
uart0: <16550 or compatible> at mem 0x18020003-0x1802001a irq 3 on apb0
uart0: console (115200,n,8,1)
uart0: fast interrupt
gpio0: <Atheros AR71XX GPIO driver> at mem 0x18040000-0x18040fff irq 2 on apb0
gpio0: [GIANT-LOCKED]
gpio0: gpio pinmask=0x0
gpiobus0: <GPIO bus> on gpio0
gpioc0: <GPIO controller> on gpio0
ehci0: <AR71XX Integrated USB 2.0 controller> at mem 0x1b000100-0x1b0010ff irq 1 on nexus0
usbus0: set host controller mode
usbus0: EHCI version 1.0
usbus0: set host controller mode
usbus0 on ehci0
ehci0: usbpf: Attached
ehci1: <AR71XX Integrated USB 2.0 controller> at mem 0x1b400100-0x1b4010ff irq 1 on nexus0
usbus1: set host controller mode
usbus1: EHCI version 1.0
usbus1: set host controller mode
usbus1 on ehci1
ehci1: usbpf: Attached
pcib0 at irq 0 on nexus0
ar724x_pci_write: 0x180c0000/0x180c0004 addr=0x4, data=0x356(0x100356), bytes=2
ar724x_pci_write: 0x180c0000/0x180c0020 addr=0x20, data=0x1ff01000(0x1ff01000), bytes=4
ar724x_pci_write: 0x180c0000/0x180c0024 addr=0x24, data=0x1ff01000(0x1ff01000), bytes=4
pcib0: no PCIe controller found
device_attach: pcib0 attach returned 6
arge0: <Atheros AR71xx built-in ethernet interface> at mem 0x19000000-0x19000fff irq 2 on nexus0
arge0: Overriding MAC from EEPROM
arge0: arge_fetch_pll_config: pll_1000 = 0x56000000
arge0: arge_attach: overriding MII mode to 'RGMII'
mii_attach_proxy: not attaching, no mdio device hint for arge0
arge0: finishing attachment, phymask 0000, proxy null 
arge0: bpf attached
arge0: Ethernet address: ff:ff:ff:ff:ff:ff
arge1: <Atheros AR71xx built-in ethernet interface> at mem 0x1a000000-0x1a000fff irq 3 on nexus0
arge1: Overriding MAC from EEPROM
arge1: arge_fetch_pll_config: pll_1000 = 0x3000101
arge1: arge_attach: overriding MII mode to 'SGMII'
mii_attach_proxy: not attaching, no mdio device hint for arge1
arge1: finishing attachment, phymask 0000, proxy null 
arge1: bpf attached
arge1: Ethernet address: ff:ff:ff:ff:ff:ff
ath0: Vendor=0x168c, Device=0x0039
ath0: Vendor=0x168c, Device=0x0039
ath0: <Qualcomm Atheros QCA955x> at mem 0x18100000-0x1811ffff irq 0 on nexus0
ath0: eeprom @ 0x1fff0000 (16384 bytes)
ath0: eeprom data @ 0xbfff0000
check DDR Activity - HIGH
ar9300_set_reset: Scorpion SoC RTC reset done.
Bootstrap clock 40MHz
Enterprise mode: 0x23fc0000
ar9300_attach: calling ar9300_hw_attach
ar9300_hw_attach: calling ar9300_eeprom_attach
ar9300_flash_map: unimplemented for now
Restoring Cal data from DRAM
ar9300_hw_attach: ar9300_eeprom_attach returned 0
ath0: RX status length: 48
ath0: RX buffer size: 4096
ath0: TX descriptor length: 128
ath0: TX status length: 36
ath0: TX buffers per descriptor: 4
ath0: ath_edma_setup_rxfifo: type=0, FIFO depth = 16 entries
ath0: ath_edma_setup_rxfifo: type=1, FIFO depth = 128 entries
ath0: [HT] enabling HT modes
ath0: [HT] enabling short-GI in 20MHz mode
ath0: [HT] 1 stream STBC receive enabled
ath0: [HT] 1 stream STBC transmit enabled
ath0: [HT] 3 RX streams; 3 TX streams
ath0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
ath0: 3T3R
ath0: 11ng MCS 20MHz
ath0: MCS 0-7: 6.5Mbps - 65Mbps
ath0: MCS 8-15: 13Mbps - 130Mbps
ath0: MCS 16-23: 19.5Mbps - 195Mbps
ath0: 11ng MCS 20MHz SGI
ath0: MCS 0-7: 7Mbps - 72Mbps
ath0: MCS 8-15: 14.5Mbps - 144.5Mbps
ath0: MCS 16-23: 21.5Mbps - 216.5Mbps
ath0: 11ng MCS 40MHz:
ath0: MCS 0-7: 13.5Mbps - 135Mbps
ath0: MCS 8-15: 27Mbps - 270Mbps
ath0: MCS 16-23: 40.5Mbps - 405Mbps
ath0: 11ng MCS 40MHz SGI:
ath0: MCS 0-7: 15Mbps - 150Mbps
ath0: MCS 8-15: 30Mbps - 300Mbps
ath0: MCS 16-23: 45Mbps - 450Mbps
ath0: AR9550 mac 1024.0 RF5110 phy 1832.14
ath0: 2GHz radio: 0x0000; 5GHz radio: 0x0000
ath0: Use hw queue 1 for WME_AC_BE traffic
ath0: Use hw queue 0 for WME_AC_BK traffic
ath0: Use hw queue 2 for WME_AC_VI traffic
ath0: Use hw queue 3 for WME_AC_VO traffic
ath0: Use hw queue 8 for CAB traffic
ath0: Use hw queue 9 for beacons
ath0: using multicast key search
spi0: <AR71XX SPI> at mem 0x1f000000-0x1f00000f on nexus0
spibus0: <spibus bus> on spi0
mx25l0: <M25Pxx Flash Family> at cs 0 on spibus0
mx25l0: mx25ll128, sector 65536 bytes, 256 sectors
ar71xx_wdog0: <Atheros AR71XX watchdog timer> on nexus0
Device configuration finished.
Timecounters tick every 1.000 msec
tcp_init: net.inet.tcp.tcbhashsize auto tuned to 2048
lo0: bpf attached
arswitch0port1: link state changed to DOWN
arswitch0port2: link state changed to DOWN
arswitch0port3: link state changed to DOWN
arswitch0port4: link state changed to DOWN
arswitch0port5: link state changed to DOWN
GEOM: new disk flash/spi0
usbus0: 480Mbps High Speed USB v2.0
usbus1: 480Mbps High Speed USB v2.0
MAP: flash/spi0: 0x40000, data=0x40000 "/dev/map/u-boot"
MAP: search flash/spi0 for key ".!/bin/sh" from 0x40000, step 0x10000
ugen0.1: <Atheros> at usbus0
uhub0: <Atheros EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
ugen1.1: <Atheros> at usbus1
uhub1: <Atheros EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
MAP: flash/spi0: 40000x150000, data=0x150000 "/dev/map/kernel"
MAP: search flash/spi0 for key ".!/bin/sh" from 0x40000, step 0x10000
MAP: flash/spi0: 190000x640000, data=0x640000 "/dev/map/rootfs"
MAP: flash/spi0: 7d0000x10000, data=0x10000 "/dev/map/cfg"
MAP: flash/spi0: 7e0000x810000, data=0x810000 "/dev/map/mib0"
MAP: flash/spi0: ff0000x10000, data=0x10000 "/dev/map/ART"
map/rootfs.uncompress: GEOM_ULZMA image found
map/rootfs.uncompress: 284 x 65536 blocks
MAP: No valid partition found at map/rootfs.uncompress
random: unblocking device.
Root mount waiting for: usbus1 usbus0
uhub1: 1 port with 1 removable, self powered
uhub0: 1 port with 1 removable, self powered
Trying to mount root from ufs:map/rootfs.uncompress []...
warning: no time-of-day clock registered, system time will not be set accurately
start_init: trying /sbin/init
Mar 20 06:11:26 init: login_getclass: unknown class 'daemon'
MAP: No valid partition found at md0
MAP: No valid partition found at md0
MAP: No valid partition found at md1
MAP: No valid partition found at md1
MAP: No valid partition found at md2
MAP: No valid partition found at md2
*** Populating /var ..
*** Loading configuration files ..
*** Restoring from /dev/map/cfg .. 
gunzip: unknown compression format
1+0 records in
1+0 records out
65536 bytes transferred in 4.088959 secs (16028 bytes/sec)
0 blocks
*** Completed.
*** setting up hostname
*** Load kernel modules
kldload: can't load bridgestp: module already loaded or in kernel
kldload: can't load if_bridge: No such file or directory
kldload: can't load random: No such file or directory
*** bringing up loopback ..
*** Default password/login databases ..
*** Starting networking via /etc/rc.d/base/net
*** Interface: arge0: start
*** Interface: arge0: done
*** Interface: bridge0: start
bridge0: bpf attached
bridge0: Ethernet address: ae:3a:9e:be:6f:e6
arge0: promiscuous mode enabled
bridge0: link state changed to UP
*** Interface: bridge0: done
*** inetd
*** Done!

FreeBSD/mips (freebsd-wifi-build) (ttyu0)

login: arswitch0: arswitch_miipollstat: port 2: port -> UP
arswitch0port3: link state changed to UP
Mar 20 06:12:17 su: in pam_group(): (pam_group) neither luser nor ruser specified, assuming ruser
Mar 20 06:12:17 su: user to root on /dev/pts/0
Clone this wiki locally