From owner-freebsd-mips@FreeBSD.ORG Sun Nov 14 12:46:47 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B318B106564A for ; Sun, 14 Nov 2010 12:46:47 +0000 (UTC) (envelope-from lists.br@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 611868FC16 for ; Sun, 14 Nov 2010 12:46:47 +0000 (UTC) Received: by yxe1 with SMTP id 1so640019yxe.13 for ; Sun, 14 Nov 2010 04:46:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:message-id:references:to :x-mailer; bh=GLSjubH9QPSyI8/8CI1lZnFHkK8B3iwXPMUrjyjMT1I=; b=xfOMek+mF8W3q4e0DOvls0hKbZKh/OeBWgi4ZPEl2+FYf7XA9abz0cl3K3j+Sk4fB3 rUAusGaSxo+2jYbx/ro4oLcIcXDqTObREOowkLRy+asojXsT/J8HN8wPH1DsoZ9ak/qx FRRnLQ6uSW34RxjiZoZVbsR4pH438vo6tSuyo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to:x-mailer; b=AHkKZLSsJX7BBPxri9hQL3yw3b7KGWuYjEiWC8TVO4J+vhusIazJN/sCUcz9uIBAqG p9I1Xvo1iY78/+jxm49rt1g8ccUmt0EIyRpFb4u9Ix6CO7Gyynq2RaGg8+Mtwlj2FlT+ b5a6sd27y/0iXd7VUbt4HoqhptEnLcTYbIF/Q= Received: by 10.91.147.3 with SMTP id z3mr6128444agn.179.1289738806288; Sun, 14 Nov 2010 04:46:46 -0800 (PST) Received: from [192.168.0.86] ([187.39.15.80]) by mx.google.com with ESMTPS id d8sm2492956ana.2.2010.11.14.04.46.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 14 Nov 2010 04:46:45 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: multipart/mixed; boundary=Apple-Mail-86-46471918 From: Luiz Otavio O Souza In-Reply-To: <201011112359.59958.freebsd-mips@dino.sk> Date: Sun, 14 Nov 2010 10:46:40 -0200 Message-Id: <71AFA800-0873-42FF-9C3B-94F3AA765681@gmail.com> References: <201011101616.59156.freebsd-mips@dino.sk> <2ECB603F-5E21-424E-8EF7-5F7189887AEC@gmail.com> <201011112359.59958.freebsd-mips@dino.sk> To: Milan Obuch X-Mailer: Apple Mail (2.1081) Cc: freebsd-mips@freebsd.org Subject: Re: First RSPRO deployed ! X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 12:46:47 -0000 --Apple-Mail-86-46471918 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Nov 11, 2010, at 8:59 PM, Milan Obuch wrote: [ snip] >> adrian@ keeps a wiki page with some information about this: >> http://wiki.freebsd.org/AdrianChadd/UbiquityRouterstationPro >>=20 >=20 > I know about this page... actually, I am using patches mentioned = there,=20 > downloaded from http://people.freebsd.org/~kan/usb_rspro.diff so I can = use=20 > USB. >=20 > Also, I use attached kernel config, but this needs some changes. For = RTC a=20 > patch is probably necessary. GPIO definition needs to be changed a = bit. I did=20 > not test any miniPCI card yet. Maybe again some patch is needed... >=20 > I found http://people.freebsd.org/~adrian/rspro/ - do you use any = patch from=20 > there? >=20 > Last thing coming from your dmesg - where did you get driver for = switch=20 > connected to arge1 and what could you do with it? I'm using the Adrian's fix for USB align problem = (http://people.freebsd.org/~adrian/rspro/usb_conf_align.diff) it is = equivalent to kan's patch, but the fix isn't hardcoded (you need to = enable the adrian's patch by add "options USB_HOST_ALIGN=3D32" on kernel = config file). I'm sending a quick hack for RSPRO gpio, it adds the missing pins = definitions and disable some functions used only for mikrotik = routerboards. There is nothing needed for miniPCI devices, it just works :) The switch driver is a work in progress... on rspro (for now) it works = as a generic switch (which does nothing), you can only see and set (or = force) the media settings per port. With a working switch driver you can configure (or filter) vlan tags on = each switch port and build more complex setups. I've it more complete on some models of mikrotik routerboards, but the = current code is a mess... i already get some feedback, so now i need to = rewrite the bad parts and i hope it will be available soon for more = tests on rspro. Best regards, Luiz PS: files also available here: http://loos.no-ip.org:280/rspro --Apple-Mail-86-46471918 Content-Disposition: attachment; filename=RSPRO Content-Type: application/octet-stream; name="RSPRO" Content-Transfer-Encoding: 7bit # # AR71XX -- Kernel configuration file for FreeBSD/mips for Atheros 71xx systems # # $FreeBSD: head/sys/mips/conf/AR71XX 207474 2010-05-01 16:39:46Z imp $ # ident RSPRO cpu CPU_MIPS4KC options ISA_MIPS32 makeoptions TARGET_BIG_ENDIAN makeoptions KERNLOADADDR=0x80050000 options HZ=1000 files "../atheros/files.ar71xx" hints "RSPRO.hints" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols makeoptions MODULES_OVERRIDE="" options ALT_BREAK_TO_DEBUGGER options DDB options KDB options KTRACE options SCHED_4BSD #4BSD scheduler options INET #InterNETworking options NFSCLIENT #Network Filesystem Client options NFS_ROOT #NFS usable as /, requires NFSCLIENT options PSEUDOFS #Pseudo-filesystem framework options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions # options NFS_LEGACYRPC # Debugging for use in -current options DEADLKRES options INVARIANTS options INVARIANT_SUPPORT options WITNESS options WITNESS_SKIPSPIN options FFS #Berkeley Fast Filesystem options SOFTUPDATES #Enable FFS soft updates support options UFS_ACL #Support for access control lists options UFS_DIRHASH #Improve performance on big directories #options BOOTP #options BOOTP_NFSROOT #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=arge0 #options BOOTP_COMPAT #options ROOTDEVNAME=\"nfs:192.168.10.1:/mnt/bsd\" #options ROOTDEVNAME=\"ufs:/dev/da1p2\" options ROOTDEVNAME=\"ufs:/dev/gpt/root\" device pci # Wireless NIC cards options IEEE80211_DEBUG options IEEE80211_SUPPORT_MESH options IEEE80211_SUPPORT_TDMA options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's device wlan # 802.11 support device wlan_wep # 802.11 WEP support device wlan_ccmp # 802.11 CCMP support device wlan_tkip # 802.11 TKIP support device wlan_xauth device ath # Atheros pci/cardbus NIC's options ATH_DEBUG device ath_hal option AH_SUPPORT_AR5416 option AH_RXCFG_SDMAMW_4BYTES # See NOTES for details of this WAR device ath_rate_sample #device switch device mii device arge device usb options USB_HOST_ALIGN=32 options USB_EHCI_BIG_ENDIAN_DESC # handle big-endian byte order # options USB_DEBUG device ohci device ehci device spibus device ar71xx_spi device pcf2123_rtc device mx25l #device geom_redboot device ar71xx_wdog device uart device loop device ether device vlan device md device bpf device random device if_bridge device umass device scbus device da options GEOM_PART_GPT options GEOM_LABEL device gpio device gpioled device gpioiic device iicbus device iicbb device iic # network options DUMMYNET options LIBALIAS options IPDIVERT options IPSTEALTH options IPFIREWALL options IPFIREWALL_NAT options IPFIREWALL_VERBOSE options IPFIREWALL_FORWARD options IPFIREWALL_DEFAULT_TO_ACCEPT --Apple-Mail-86-46471918 Content-Disposition: attachment; filename=RSPRO.hints Content-Type: application/octet-stream; name="RSPRO.hints" Content-Transfer-Encoding: 7bit # $FreeBSD: head/sys/mips/conf/AR71XX.hints 202839 2010-01-22 22:14:12Z gonzo $ hint.apb.0.at="nexus0" hint.apb.0.irq=4 # uart0 hint.uart.0.at="apb0" # see atheros/uart_cpu_ar71xx.c why +3 hint.uart.0.maddr=0x18020003 hint.uart.0.msize=0x18 hint.uart.0.irq=3 # ohci hint.ohci.0.at="apb0" hint.ohci.0.maddr=0x1c000000 hint.ohci.0.msize=0x01000000 hint.ohci.0.irq=6 # ehci hint.ehci.0.at="nexus0" hint.ehci.0.maddr=0x1b000000 hint.ehci.0.msize=0x01000000 hint.ehci.0.irq=1 # pci hint.pcib.0.at="nexus0" hint.pcib.0.irq=0 # arge0 hint.arge.0.at="nexus0" hint.arge.0.maddr=0x19000000 hint.arge.0.msize=0x1000 hint.arge.0.irq=2 # PHY4 = 1 << 4 hint.arge.0.phymask=0x10 # arge1 hint.arge.1.at="nexus0" hint.arge.1.maddr=0x1a000000 hint.arge.1.msize=0x1000 hint.arge.1.irq=3 # PHY1, PHY2, PHY3 hint.arge.1.phymask=0x0e hint.arge.1.media=1000 hint.arge.1.fduplex=1 # RSPRO _really_ need the above two lines ! # SPIBUS hint.spi.0.at="nexus0" hint.spi.0.maddr=0x1f000000 hint.spi.0.msize=0x10 # SPI flash hint.mx25l.0.at="spibus0" hint.mx25l.0.cs=1 # shares the same bus with mx25l. # CE low for flash, CE high for RTC hint.rtc.0.at="spibus0" hint.rtc.0.cs=0 # Watchdog hint.ar71xx_wdog.0.at="nexus0" # GPIO hint.gpio.0.at="apb0" hint.gpio.0.maddr=0x18040000 hint.gpio.0.msize=0x1000 hint.gpio.0.irq=2 # RF led - pin 2 hint.gpioled.0.at="gpiobus0" hint.gpioled.0.name="rfled" hint.gpioled.0.pins=0x0004 # gpio i2c # Pin 1 - SCL # Pin 2 - SDA hint.gpioiic.0.at="gpiobus0" hint.gpioiic.0.pins=0x0003 --Apple-Mail-86-46471918--