From owner-freebsd-arm@FreeBSD.ORG Mon Dec 3 17:16:15 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 44999925 for ; Mon, 3 Dec 2012 17:16:15 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-qa0-f47.google.com (mail-qa0-f47.google.com [209.85.216.47]) by mx1.freebsd.org (Postfix) with ESMTP id D7C468FC15 for ; Mon, 3 Dec 2012 17:16:14 +0000 (UTC) Received: by mail-qa0-f47.google.com with SMTP id a19so1936334qad.13 for ; Mon, 03 Dec 2012 09:16:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=mUp6eK9uKHG3sOXWJn4v03Jgi4nqRj3Zs80YxQKaRGM=; b=goUQvl2+3d+Uojig1aVIcESiVtIpKLyArYR0MAZPbuWUBYKT2WFoOnEA5o8opSeBEv k7BHiGGEZIr3KT7tIMueZpZ8HH2fyXtiFotXsqDGIUXVwp9tUKRcAEBrVHgaHZWk7gXM eA5YX5UswOO4vk8JU/ZIZDQCUMsTqocZPU7zRVZUQILhsk/dpHdZzR6kFLcD+XiIYJ5f YS4b6KZetSqHzegZb3LNcru0XQG/K5gBREovfIWNOJL+1G964R9XW5OTO2A8I5cD/2jy YLFFbo+98fE1Rz1yD6Vdh3nAKGDxP1C/BJma/CfhQ5CbFG1mzofY3pFSbR4mHH/3khi6 wFHQ== Received: by 10.224.35.137 with SMTP id p9mr18214576qad.85.1354554972378; Mon, 03 Dec 2012 09:16:12 -0800 (PST) Received: from monkey-bot.int.fusionio.com ([209.117.142.2]) by mx.google.com with ESMTPS id h16sm9762768qae.8.2012.12.03.09.16.08 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 03 Dec 2012 09:16:09 -0800 (PST) Sender: Warner Losh Subject: Re: FreeBSD on Raspberry Pi 512MB (with U-Boot + ubldr) Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <1354552432.1140.28.camel@revolution.hippie.lan> Date: Mon, 3 Dec 2012 10:16:06 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <16308BDE-D3DA-4127-89BF-C8EF03B017DF@bsdimp.com> References: <3988C1622A974F19A9D3888F0334FF10@ad.peach.ne.jp> <50B8058C.9030909@bluezbox.com> <18DB98C9-66D9-4B00-989A-156F21E9981C@bsdimp.com> <1354552432.1140.28.camel@revolution.hippie.lan> To: Ian Lepore X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQkD7yeFX1y5v9bHrrKHZG1SuMrtxRiarc/w/J0wnafOzI0U/fhSLnEXaP0G1cdRxwdDfIHw Cc: Ralf.Wenk@hs-karlsruhe.de, freebsd-arm@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Dec 2012 17:16:15 -0000 On Dec 3, 2012, at 9:33 AM, Ian Lepore wrote: > On Mon, 2012-12-03 at 09:17 -0700, Warner Losh wrote: >> On Dec 3, 2012, at 7:51 AM, Daisuke Aoyama wrote: >>=20 >>>>>> BTW, SDHCI is not yet stable? >>>>>=20 >>>>> There is one issue with setting SDHCI clock. I'll commit fix later = today. >>>>=20 >>>>=20 >>>> I like to share some information about the SD card reading speed. >>>>=20 >>>> While exchanging the old boot sequence with then new one I once = booted >>>> with the new boot sequence but without an /boot/loader.rc file. >>>>=20 >>>> The reading speed achieved with >>>> dd if=3D/dev/mmcsd0 of=3D/dev/null bs=3D1m count=3D100 >>>> from the SD card was 10 Mbyte/sec. >>>>=20 >>>> After creating the file with "echo 'fdt addr 0x100' > = /boot/loader.rc" >>>> and rebooting the reading speed achieved from the SD card was down = to >>>> 2.8 Mbyte/sec. >>>>=20 >>>> Although the SDHCI frequency was shown on the second boot as double = high as >>>> on the first (100MHz versus 50MHz) the reading speed was much = lower. >>>> I think the cause was the mmcsd bus bit width which was reported as = 4 at >>>> the first and as 1 at the second boot. >>>=20 >>> At this time, it must be 50. if use 100MHz, some cards cant be used = anymore. >>> Howerver, probably 4bit transfer is OK. >>=20 >> 33MHz is the top speed for SD cards. There's an extension to make = them go as fast as 50MHz. Most SD cards cope at 50MHz without enabling = the extension and even more when enabled. The current common code tries = to enable things properly, but relies on the host bridge adapter driver = to set the clock properly... There may be some cruft here left over = from the early Atmel legacy where the datasheet gave somewhat aggressive = advise.. >>=20 >> 100MHz at one bit is 100Mbps. 50MHz 4 bit is 200Mbps. >>=20 >> I gotta get a pi to play around with this :) >=20 > Oops, not quite. >=20 > SD 1.0 and 1.1 limit bus speed to 25mhz, but you can usually get away > with 30mhz and sometimes even higher (but anything over 25 is out of > spec). =20 >=20 > SD 2.0 upped the limit to 50mhz, but you can't set the bus to run that > fast until you've probed the card and determined that it supports = SDHC. > The signaling standard is actually different between 1.x and 2.x in = SDHC > mode (there are differences in the relationships between = rise/fall/hold > times above 25mhz). That's why old Atmel hardware can't do SDHC 50mhz > even though the microcontroller can run the bus at 50mhz -- it does so > with the 1.x signal timings (it was pretty sneaky of them to adverise > mmc/sd up to 50mhz knowing that running the bus that fast was just a > violation of the SD 1.x spec, which is all they really support). >=20 > I've heard that SD 3.x allows for bus speeds of 100mhz and higher, but > only on SDXC cards. I'm hand-waving a bit here because I haven't = gotten > to work with hardware that new yet. Thanks for refreshing my memory... > Bus speed is independant of the 1/4/8 bit datapath (well, at least in > the SD specs up through 2.0, after that I'm not sure). Experience has shown that the card has a speed limit for transfer = though, so I've seen cards that can do 1 bit at 50MHz but not 4 bits at = 25MHz. Warner=