Skip to content

Commit 4f9833d

Browse files
jlintonarmstorulf
authored andcommitted
mmc: sdhci-iproc: Add ACPI bindings for the RPi
The RPi4 has an Arasan controller it carries over from the RPi3 and a newer eMMC2 controller. Because of a couple of quirks, it seems wiser to bind these controllers to the same driver that DT is using on this platform rather than the generic sdhci_acpi driver with PNP0D40. So, BCM2847 describes the older Arasan and BRCME88C describes the newer eMMC2. The older Arasan is reusing an existing ACPI _HID used by other OSes booting these tables on the RPi. With this change, Linux is capable of utilizing the SD card slot, and the Wi-Fi when booted with UEFI+ACPI on the RPi4. Signed-off-by: Jeremy Linton <[email protected]> Acked-by: Florian Fainelli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 1a97059 commit 4f9833d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

drivers/mmc/host/sdhci-iproc.c

+18
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,27 @@ static const struct of_device_id sdhci_iproc_of_match[] = {
296296
MODULE_DEVICE_TABLE(of, sdhci_iproc_of_match);
297297

298298
#ifdef CONFIG_ACPI
299+
/*
300+
* This is a duplicate of bcm2835_(pltfrm_)data without caps quirks
301+
* which are provided by the ACPI table.
302+
*/
303+
static const struct sdhci_pltfm_data sdhci_bcm_arasan_data = {
304+
.quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION |
305+
SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK |
306+
SDHCI_QUIRK_NO_HISPD_BIT,
307+
.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
308+
.ops = &sdhci_iproc_32only_ops,
309+
};
310+
311+
static const struct sdhci_iproc_data bcm_arasan_data = {
312+
.pdata = &sdhci_bcm_arasan_data,
313+
};
314+
299315
static const struct acpi_device_id sdhci_iproc_acpi_ids[] = {
300316
{ .id = "BRCM5871", .driver_data = (kernel_ulong_t)&iproc_cygnus_data },
301317
{ .id = "BRCM5872", .driver_data = (kernel_ulong_t)&iproc_data },
318+
{ .id = "BCM2847", .driver_data = (kernel_ulong_t)&bcm_arasan_data },
319+
{ .id = "BRCME88C", .driver_data = (kernel_ulong_t)&bcm2711_data },
302320
{ /* sentinel */ }
303321
};
304322
MODULE_DEVICE_TABLE(acpi, sdhci_iproc_acpi_ids);

0 commit comments

Comments
 (0)