windows-drivers
windows-drivers copied to clipboard
Better support for the Broadcom eMMC2 controller
The sequential R/W speeds max out at around 23-24 MB/s with a SanDisk Ultra UHS-I A1 card. The chip can do much better than this, but it is currently constrained by the following issues:
-
DMA is disabled because sdbus doesn't honor the _DMA method in ACPI, so it's not able to do the required address translation without a lower filter driver.
-
UHS-I support is disabled because the controller can't switch the voltage in a standard way, so it's always running at 3.3V.
Work in progress on an sdport-based miniport "SdHostBCME88C" that addresses these issues. UHS-1 is working. I'll probably be able to add support for DMA this week, and then I'll send a PR.
There would still be some open issues to be resolved before switching to SdHostBCME88C over the existing sdbus driver.
- Right now, if both SdHostBCME88C and bcm2836sdhc are loaded, sometimes the system hangs. I suspect this is a bug in sdport combined with a bug in bcm2836 regarding how interrupts are handled during device initialization. This needs to be resolved before we could enable SdHostBCME88C.
- SdHostBCME88C is very new and might have other issues. Needs testing.
Since DMA works out-of-the-box on the C0 stepping with sdbus, it's possible to add the Intel-specific _DSM method in ACPI for voltage switching, set the _CID accordingly and drop bcmemmc2. (B0 will still need it)
Intel-specific _DSM is controlled by setting CompatType registry value, not by _CID. CompatType=7 means Medfield. CompatType=11 means BayTrail. I do not know what other side effects are introduced with these settings.
If we give it an Intel _CID, the inbox INF will set the CompatType for us. I've briefly tested this a month ago and haven't seen any side effects. (but of course, it needs more testing)
One additional issue that needs some investigation is how to handle RPi's support for 8-bit data bus. I don't have solid info on this, so I may be misguided, but here is what I know:
- RPi4 controller claims that it is capable of driving an 8-bit data bus.
- RPi4 and RPi400 have 4 data lines, so 8-bit data bus is not correct for RPi4/RPi400.
- I understand that RPI compute module 4 does support 8-bit eMMC, so 8-bit data bus may be valid for CM4.
- I've heard some second-hand reports that UHS-2 SD cards did not work with the bcmemmc2.inf driver.
- I don't have any UHS-2 cards to test, but since RPi4 and RPi400 definitely do not support 8-bit data, and since this might be causing trouble for UHS-2 cards, I have set both bcmemmc2 and SDHostBRCME88C drivers to disable 8-bit data bus.
- For now, this does no harm. If CM4 is supported in the future, we will need to revisit this decision.