From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@9fans.net From: Richard Miller <9fans@hamnavoe.com> Date: Sun, 11 Dec 2016 16:57:27 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] raspberry pi sdhost driver Topicbox-Message-UUID: b0e6ba9e-ead9-11e9-9d60-3106f5b1d025 The pi3 native wifi driver (ether4330.c) recently added to /n/sources/contrib/miller/9/bcm had an annoying limitation. The sdio interface to the wifi chip is via the emmc host adapter on the bcm283x SoC, which previously had been used for the sdcard. This meant a kernel could be configured to use wifi or sdcard but not both. Fortunately there is a secondary, Broadcom proprietary (and undocumented) "sdhost" interface which can be used for the sdcard instead. This interface has been present on all the pi models, but a linux driver only appeared when the pi3 was released. I've now added a driver (sdhost.c) for this interface, which will be used in place of emmc if you add sdhost to the "link" section of the kernel config file. I recommend this even if you don't use wifi, since the sdhost hardware can squeeze a bit more performance out of cards with "high speed" capability (which nowadays means most of them). You'll also need to update io.h, and sdmmc.c to get the new code which recognises high speed cards. I've also updated the old emmc driver to increase its speed fairly dramatically; but the emmc must always divide its 250Mhz input clock by an even number, which means it can drive 50Mhz cards only up to 41.67 Mhz. The sdhost driver doesn't have this limitation.