From owner-freebsd-mips@FreeBSD.ORG Sat Mar 1 22:12:42 2014 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75FAB53E; Sat, 1 Mar 2014 22:12:42 +0000 (UTC) Received: from mailhost.netlab.sk (mailhost.netlab.sk [84.245.65.10]) (using SSLv3 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 09FED1450; Sat, 1 Mar 2014 22:12:41 +0000 (UTC) Received: from zeta.dino.sk (fw1.dino.sk [84.245.95.252]) (AUTH: LOGIN milan) by mailhost.netlab.sk with ESMTPA; Sat, 01 Mar 2014 23:12:46 +0100 id 005080BA.53125B5E.000094A5 Date: Sat, 1 Mar 2014 23:12:39 +0100 From: Milan Obuch To: Adrian Chadd Subject: Re: I (think) the AR8327 switch support now works Message-ID: <20140301231239.023b8733@zeta.dino.sk> In-Reply-To: <20140301200546.7ff373d1@zeta.dino.sk> References: <20140301143607.13a96bd6@zeta.dino.sk> <20140301200546.7ff373d1@zeta.dino.sk> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; i386-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-mips@freebsd.org X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Mar 2014 22:12:42 -0000 On Sat, 1 Mar 2014 20:05:46 +0100 Milan Obuch wrote: > On Sat, 1 Mar 2014 09:07:42 -0800 > Adrian Chadd wrote: > > > Yeah, USB still doesn't work. I don't know why that is. :( > > > > Well, I think some initialisation is not done - maybe multiplexed pin > setup is missing, maybe some gpio is used to activate something, > unfortunaltelly, no datasheet is available publicly for SoC used :( > > > Are the flash IDs from Linux? I can commit those easily enough. > > > > Thanks, > > > > No, I disassembled my box and then found datasheets for ICs found on > PCB - that's where I found those IDs. Then I found it looks like > working, however I could not verify it yet, because I did not reached > init launch/userland level yet. > [ snip ] > > > I was able to modify mx25l.c so at least SPI flash is recognised > > > with following patch: > > > > > > Index: /data/src/11/sys/dev/flash/mx25l.c > > > =================================================================== > > > --- /data/src/11/sys/dev/flash/mx25l.c (revision 262653) > > > +++ /data/src/11/sys/dev/flash/mx25l.c (working copy) > > > @@ -110,6 +110,9 @@ > > > { "SST25VF032B", 0xbf, 0x254a, 64 * 1024, 64, FL_ERASE_4K > > > | FL_ERASE_32K }, > > > /* Winbond -- w25x "blocks" are 64K, "sectors" are 4KiB */ > > > + { "w25x10", 0xef, 0x3011, 64 * 1024, 2, FL_ERASE_4K }, > > > + { "w25x20", 0xef, 0x3011, 64 * 1024, 4, FL_ERASE_4K }, > > > + { "w25x40", 0xef, 0x3011, 64 * 1024, 8, FL_ERASE_4K }, > > > { "w25x32", 0xef, 0x3016, 64 * 1024, 64, > > > FL_ERASE_4K }, { "w25q32", 0xef, 0x4016, 64 * 1024, 64, > > > FL_ERASE_4K }, { "w25q64", 0xef, 0x4017, 64 * 1024, 128, > > > FL_ERASE_4K }, > > > > Sorry, patch is not correct - IDs are the same for all three types, which is wrong. Correct one: --- /data/src/11/sys/dev/flash/mx25l.c (revision 262653) +++ /data/src/11/sys/dev/flash/mx25l.c (working copy) @@ -110,6 +110,9 @@ { "SST25VF032B", 0xbf, 0x254a, 64 * 1024, 64, FL_ERASE_4K | FL_ERASE_32K }, /* Winbond -- w25x "blocks" are 64K, "sectors" are 4KiB */ + { "w25x10", 0xef, 0x3011, 64 * 1024, 2, FL_ERASE_4K }, + { "w25x20", 0xef, 0x3012, 64 * 1024, 4, FL_ERASE_4K }, + { "w25x40", 0xef, 0x3013, 64 * 1024, 8, FL_ERASE_4K }, { "w25x32", 0xef, 0x3016, 64 * 1024, 64, FL_ERASE_4K }, { "w25q32", 0xef, 0x4016, 64 * 1024, 64, FL_ERASE_4K }, { "w25q64", 0xef, 0x4017, 64 * 1024, 128, FL_ERASE_4K }, Regards, Milan