From owner-freebsd-embedded@FreeBSD.ORG Sun Jul 21 06:22:17 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7B446F8D; Sun, 21 Jul 2013 06:22:17 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-x22c.google.com (mail-wg0-x22c.google.com [IPv6:2a00:1450:400c:c00::22c]) by mx1.freebsd.org (Postfix) with ESMTP id E54753DC; Sun, 21 Jul 2013 06:22:16 +0000 (UTC) Received: by mail-wg0-f44.google.com with SMTP id l18so83489wgh.35 for ; Sat, 20 Jul 2013 23:22:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=v7TG6tdPPUSkgZaBVMM2yvg90fltHiHXaaGHHyeXALM=; b=QsxX1qjDq0adtJ8lCK2/mbfnYYrB7Kx1Zsjg4DCkloJFQQicpvOCcxE/RhdbDgiF+0 BeunW7Vjo34hlDsMjp81cDAUR43YyuioSb3nvxYAO/5Kb1SWgThdBQGpaN6EtMfQiYG4 767tbmnq1gWODEV1UzcuVWVgu58qvD/gABUxDz8Qz5QEa1ReUhlOqNUYglWVI7o4WyCg USBUVDcgBUL5USMe+MPJ4p0cL+XedW2eQQRocWfMr1wFdy+CJg7D9ZKg/QBJJ2XSgIAc QpoXpeXtc6EtyW4DO3oSnyCPYNiiHHeFICWzixTCRZv5nSaI9RwHV4j46PqBB+3pAm0d HZxA== MIME-Version: 1.0 X-Received: by 10.180.185.148 with SMTP id fc20mr15457575wic.0.1374387736021; Sat, 20 Jul 2013 23:22:16 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.94.132 with HTTP; Sat, 20 Jul 2013 23:22:15 -0700 (PDT) In-Reply-To: <1374340359.1421.3.camel@localhost> References: <1374340359.1421.3.camel@localhost> Date: Sat, 20 Jul 2013 23:22:15 -0700 X-Google-Sender-Auth: Xfxdg8BJO8EYR3AtGkFm1_zHrCc Message-ID: Subject: Re: Dlink DIR-825 B1 status From: Adrian Chadd To: sbruno@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded@freebsd.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jul 2013 06:22:17 -0000 so there's some fixup code that has to be run. Look at ar71xx_pci.c, AR71XX_ATH_EEPROM, and ar71xx_pci_fixup(). In DIR-825.hints: # ath0 - slot 17 hint.pcib.0.bus.0.17.0.ath_fixup_addr=0x1fff1000 hint.pcib.0.bus.0.17.0.ath_fixup_size=4096 # ath1 - slot 18 hint.pcib.0.bus.0.18.0.ath_fixup_addr=0x1fff5000 hint.pcib.0.bus.0.18.0.ath_fixup_size=4096 So ignoring the driver attach bit, we need to figure out why the eeprom isn't correctly loading in these values. Now, what I think is going on - I think my values above are incorrect. The default image puts it ~ 6mb into the image, NOT the last 64k in the 8mb flash: # The DIR-825 has an 8MB flash part - HOWEVER, the 64k caldata isn't # at the end of the flash. It's ~ 6MB into the flash image. # mtdparts=ar7100-nor0:256k(uboot),64k(Config),1024k(vmlinux),5184k(rootfs),64k(caldata) .. hint.map.4.at="flash/spi0" hint.map.4.start=0x00660000 hint.map.4.end=0x00670000 hint.map.4.name="art" hint.map.4.readonly=1 .. and so I think the address needs to be 0x1f661000 and 0x1f665000 .. not 0x1fff1000/0x1fff5000. So try modifying the fixup_addr to be 0x1f661000 and 0x1f665000 and see if the fixup stuff .. actually fixes things up. -adrian On 20 July 2013 10:12, Sean Bruno wrote: > Using adrian's build sys, I've been able to get this router up with > FreeBSD. There's no indication that it has wireless interfaces on it, > which is odd. > > dmesg --> http://people.freebsd.org/~sbruno/dir_825_dmesg.txt > > There appears to be unattached devices, I suspect maybe I should just > add them to the appropriate driver and recompile? > > # pciconf -lvb > none0@pci0:0:17:0: class=0x020000 card=0xee1c168c chip=0xff1d168c > rev=0x01 hdr=0x00 > vendor = 'Atheros Communications Inc.' > device = 'AR5008 Wireless Network Adapter' > class = network > subclass = ethernet > bar [10] = type Memory, range 32, base 0, size 65536, disabled > none1@pci0:0:18:0: class=0x020000 card=0xee1c168c chip=0xff1d168c > rev=0x01 hdr=0x00 > vendor = 'Atheros Communications Inc.' > device = 'AR5008 Wireless Network Adapter' > class = network > subclass = ethernet > bar [10] = type Memory, range 32, base 0, size 65536, disabled > > > Sean > > p.s. I was totally shocked that there's a pci bus on this thing. That > blew my mind.