From owner-freebsd-mips@FreeBSD.ORG Mon May 20 15:13:41 2013 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 441DAC4B for ; Mon, 20 May 2013 15:13:41 +0000 (UTC) (envelope-from lists@rewt.org.uk) Received: from hosted.mx.as41113.net (hosted.mx.as41113.net [91.208.177.22]) by mx1.freebsd.org (Postfix) with ESMTP id D29E1FD3 for ; Mon, 20 May 2013 15:13:40 +0000 (UTC) Received: from [172.16.9.23] (bella.stf.rewt.org.uk [91.208.177.62]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: lists@rewt.org.uk) by hosted.mx.as41113.net (Postfix) with ESMTPSA id 3bDkBz4x2Zz1Gr; Mon, 20 May 2013 16:13:31 +0100 (BST) Message-ID: <519A3D8E.7010106@rewt.org.uk> Date: Mon, 20 May 2013 16:13:18 +0100 From: Joe Holden User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Milan Obuch Subject: Re: Ubiquiti EdgeRouter Lite works multi-user with -CURRENT. References: <20130516111059.38543d57@wind.dino.sk> <20130516131642.adfae355aa3bf7767e9b56e5@ddteam.net> <20130516124248.33ae4e05@wind.dino.sk> <51952112.9010607@rewt.org.uk> <20130517192206.5db0533f@zeta.dino.sk> <51966CB6.2040701@rewt.org.uk> <20130520110659.1d1d2165@zeta.dino.sk> <20130520164001.5f7d99b8@zeta.dino.sk> In-Reply-To: <20130520164001.5f7d99b8@zeta.dino.sk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Aleksandr Rybalko , freebsd-mips@freebsd.org X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2013 15:13:41 -0000 Milan Obuch wrote: > On Mon, 20 May 2013 07:25:30 -0600, Warner Losh wrote: > >> On May 20, 2013, at 3:06 AM, Milan Obuch wrote: >> >>> On Fri, 17 May 2013 10:52:47 -0700, Juli Mallett >>> wrote: >>> >>>> On Fri, May 17, 2013 at 10:45 AM, Joe Holden >>>> wrote: >>>>> 16 possible pins on the controller? There is only one pin on the >>>>> board, and that is the F/D button on the back. >>>> Octeon supports up to 16 GPIO pins and interrupts. I'd suspect >>>> there are other things connected up with GPIO on-board than GPIO >>>> pins exposed to the outside world, but even if that's not the >>>> case, that's still the number of GPIO pins the SoC supports. >>>> >>>> It's possible that the EdgeRouter Lite uses a different pin for its >>>> F/D button. According to the driver, gonzo used the CAM-0100's pin >>>> assignment as the default. It should be easy to extract a list of >>>> pin assignments we care about from looking at the patches from >>>> Ubiquiti to the Simple Executive and Linux, but I haven't looked >>>> personally. (I don't ever use GPIO on Octeon.) >>>> >>>> The octeon_gpio_pins array probably needs to be configured at boot >>>> based on board type. (So it should normally be 16 items (or 16 >>>> plus a terminator) and get filled out by board type, I'd say.) >>>> >>>> Thanks, >>>> Juli. >>> Hi, >>> >>> I am trying to compile new kernel to test GPIO pins, however, no >>> success for some time - kernel linking ends with error: >>> >>> linking kernel.debug >>> ld: kernel.debug: warning: allocated section `.sdata' not in segment >>> ethernet-common.o: In function `cvm_assign_mac_address': >>> /usr/src/sys/mips/cavium/octe/ethernet-common.c:110: undefined >>> reference to >>> `cvmx_mgmt_port_num_ports' /usr/src/sys/mips/cavium/octe/ethernet-common.c:110: >>> relocation truncated to fit: R_MIPS_26 against >>> `cvmx_mgmt_port_num_ports' *** Error code 1 >>> >>> Searching in /sys/mips/cavium for cvmx_mgmt_port_num_ports is not >>> successfull - any insight here? >> This is in the sys/contrib/octeon-sdk tree. I've built kernels since >> then. >> >> Warner > > Thanks, I found it - device octm was unknowingly commented out. Maybe > as I have no octm in devinfo I left it out, no idea. Now it works. > > Back to the original talk - GPIO. I found on Edgerouter Lite pin 11 is > used for reset switch - aka 'Factory Default' button. > > Status is > pin 11: 1 F/D, caps: > when not pressed and > pin 11: 0 F/D, caps: > when pressed. > > However, I found a problem with ethernet driver. It works only in > gigabit mode - connected to 100baseT switch is correctly negotiated, it > seems, but no traffic flows, either way, probably. What could I do to > diagnose root cause of this problem? > > Regards, > Milan I haven't seen that, but as a buildworld+kernel takes a couple of days I'm a week or so behind (I know I know, cross building, but still)