Date: Mon, 9 Dec 2013 07:03:49 +0100 From: Milan Obuch <freebsd-mips@dino.sk> To: Adrian Chadd <adrian@freebsd.org> Cc: freebsd-mips@freebsd.org Subject: Re: AR934x initial support is now in the tree - partial success on RB2011 Message-ID: <20131209070349.7d257938@zeta.dino.sk> In-Reply-To: <CAJ-Vmomxmv4DWJFSNMtGGu3GfZe9Vbjpv5BnMFAC%2BpRrA-0Z4g@mail.gmail.com> References: <CAJ-VmomPjqmZhDvpFHxqv-dpGEPN%2BgS=tR11EMdpH=Vej8TvKA@mail.gmail.com> <20131208230612.290d2611@zeta.dino.sk> <CAJ-Vmomxmv4DWJFSNMtGGu3GfZe9Vbjpv5BnMFAC%2BpRrA-0Z4g@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 8 Dec 2013 19:40:24 -0800 Adrian Chadd <adrian@freebsd.org> wrote: > Hi, > > There's no AR8327 and no AR8227 support yet. I'm sorry. Someone has to > port that over. I ran out of steam and am currently spending some time > improving iwn(4) for general use. > Hi, thanks for responding, anyway. My gut feeling is RB2011 needs somehow setup a AR9344 - AR8327 connection for ethernet to work properly, but I can't find how. As for AR8227 I was under impression it is internal in the SoC so it should work the same way as in any similar device, in OpenWrt's log I found there is only AR8327 switch mentioned explicitly, the other is described as AR934X built-in switch. What I found to be different in OpenWrt compared to my setup are interrupts - they have irq 4 for eth0 where AR8327 is connected, and irq 5 for eth1. I tried these in my hints too, but it did not work either - arge1 did not even probe: arge1: <Atheros AR71xx built-in ethernet interface> at mem 0x1a000000-0x1a000fff irq 5 on nexus0 arge1: arge_attach: overriding MII mode to 'GMII' nexus_alloc_resource: could not reserve resource for arge1 arge1: couldn't map interrupt device_attach: arge1 attach returned 6 No idea why or where should this interrupt be defined in order to be able to be used for arge1. > I don't think I tested USB. I can try giving it a go later next week. > It should mostly work; I need to just check that the relevant USB > setup bits are ported over and the USB power / port pins are enabled > in the GPIO configuration register. > That could well just be the cause for failures I see. If you could come with any patch I will test it asap, I just can't come with it nyself, as I have no idea how. > -adrian > > > On 8 December 2013 14:06, Milan Obuch <freebsd-mips@dino.sk> wrote: > > On Tue, 15 Oct 2013 21:29:40 -0700 > > Adrian Chadd <adrian@freebsd.org> wrote: > > > >> Hi all, > >> > >> The initial AR934x support is now in the tree. > >> > >> The basics: > >> > >> * the basic hacks needed to bring up mips74k support is now in the > >> tree; > >> * I've added MIPS bus space barriers to things; > >> * on-board wifi works; > >> * slow UART works (ie, rs232 console); > >> * on-chip switch support works (but no VLAN support - see below); > >> * on-chip USB probes/attaches fine; > >> * ethernet seems to work fine. > >> > >> It passes packets and such! > >> > >> What I haven't yet done (and I'll accept patches!) > >> > >> * the fast UART code from the AR933x should work for the fast UART > >> port but I haven't yet tested it! > >> > >> * I haven't tried USB yet! > >> > >> * taught the arswitch code about the VLAN registers for the AR934x > >> on-chip switch. > >> > >> * taught the ath(4) driver to use the bus space barrier stuff. So > >> the wifi is likely going to be angry at us for a while. > >> > >> * There's no support for the newer switch chips (AR8327 in > >> particular.) > >> > >> * NAND, I2S support, etc. > >> > >> Thanks! > >> > >> > >> -adrian > >> > > > > Hi, > > > > I was able to build kernel for ethernet boot on RouterBoard 2011L. > > My configs are based on DB120, but some parts are left out (there > > is no wifi on my device). See attachments. However, it does not > > fully boot - kernel seems to be up and running, but neither USB nor > > ethernet works for me, this means no way to mount rootfs. Also > > there is a dmesg (actually serial console log) attached. > > > > It seems there is OpenWrt working on this device, see dmesg I found > > at https://dev.openwrt.org/attachment/ticket/13585/log, but I was > > not able to verify this. I need > > openwrt-ar71xx-nand-vmlinux-initramfs.elf file as I do not want to > > erase MikroTik's RouterOS from the device, yet, but every one I > > found was just too old to support correctly RB2011L. > > > > I found also a page describing a way to build OpenWrt on FreeBSD at > > http://caia.swin.edu.au/urp/diffuse/openwrt/buildunderfreebsd.html, > > but it did not work for me, tested on both 9.2-STABLE and 10.0-BETA4 > > systems. I have no Linux setup available, so I could not try to > > build OpenWrt this way either. > > > > I am now out of ideas, so would appreciate anything I could test to > > troubleshoot the issues I see. Oh, I have both ports 1 (gigabit, so > > on Ar8327 switch, necessary to do a ethernet boot on the device) > > and 6 (100 Mbit, on Ar8227 according to manufacturer's page found at > > http://wiki.mikrotik.com/wiki/Manual:Switch_Chip_Features). > > > > Also, if someone could build for me OpenWrt for this device suitable > > for netbooting, that would be also great - at least I could verify > > it really works so we could try to find relevant bits from OpenWrt's > > sources, for ethernet support it could be seen at > > https://dev.openwrt.org/browser/trunk/target/linux/generic/files/drivers/net/phy/ar8216.c, > > but finding the relevant bits in this 2584 lines of code intended > > for various Atheros switches is not (yet) easy for me :( > > > > There was a time when rootfs could be embedded easily in kernel, > > but I found no method to do id on current sources. If there is any > > method to do this, it will be possible to mount rootfs from md > > based ram disk and do some debugging on the RB2011 itself, thus > > overcoming the troubles with not (yet) working ethernet and USB on > > this device. > > > > Regards, > > Milan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131209070349.7d257938>