Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3523287pxf; Mon, 15 Mar 2021 11:27:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlEDq6RSYT/5bT40v9JKk/opyNDjsPbYqDngREyAsDJ1fRlVjagtmI9rprUdtdY49JAJPk X-Received: by 2002:a17:906:1706:: with SMTP id c6mr3987719eje.223.1615832839782; Mon, 15 Mar 2021 11:27:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832839; cv=none; d=google.com; s=arc-20160816; b=u2eYIIE7pwRugp8MVO8NlOCfVqSD6VlAABHHu3bttNiZwvlZ/aDHuggWdfqtHTEJM+ UqXLArE1BQ7rsl9fe0sJf6SdF1HS2bkhIZZD4RMCKyDyqS7BVkK36doApEHo9pbQAaEp 9+4JUYkap2gSE2+NRLzO5t8UUUuvFzaJE1r+nXq2eQIJR1vR+O4l9r8Q1da13ay/x6ZS sIKSxqWgRQzGIEUJw0C3f5A/HqFLwDYJw42RUBEPksnrCZZzCRDL9aZOUe9AxL3MDXDa I7Dh2xz052RweHSjLpps+uggEmL1v7e3GYHyrt8+GiN4V0CKTZjscVO1CBGI4oWRBLsB reEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0yBAzaDosrnQiIeKbJfz+wOdp22jbK4oaLBnVE52sLc=; b=Q5TZkf5HalE+2zIsK1Zsj5OF+9alOMFba8lU1A37MF+q/AiUxmRb6scCTtXutknd6f R/FqJcqblCdHV5lJmXAPNUNIQmCmD74n+0l9Gep9iYw6O7oTcYKJfFiCSZ2cuFxrkQJv bHsV+so9akbkH57QRR3ZUdU1haAd0Xxbt+K0+MdDtCNzBCM+Uh2X7UZA0wwP6er3n1lp 8gjfHglIRPfKoSEZKl0hWAFo7YCuHt9sM60beLOJlOr8JkqtmdqnpsV3OaPMx7/i0odo e/uQCZZfwseyBPmJgJ7ARZKQawA8/AGXe4D1aXJJB7QTea5jrT9xy0PK3t07un2jb4bq fHQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XEZl7zBe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b6si12464339eju.321.2021.03.15.11.26.51; Mon, 15 Mar 2021 11:27:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XEZl7zBe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235093AbhCOO3Z (ORCPT + 99 others); Mon, 15 Mar 2021 10:29:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:37836 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232976AbhCOOA0 (ORCPT ); Mon, 15 Mar 2021 10:00:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A0CE764F40; Mon, 15 Mar 2021 14:00:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816801; bh=8Ot3fnhF37NWp6SS6AiQuMpnw4SuJYw28xAlGF+me/8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XEZl7zBeASVfBVwp9m4Qc0vNW5wEXAlIOqf9U9yM6bV8F0a9DBt+VdpMmkJnIqY88 6n6Fo40voGaEk8PSbZnzMqWLAUR8EW3FTZG0dZq7xXFddZili34XZEAIqFvRxC0D9o 6w53cq3mtDlMcMu+/C8E6Forsdv78Yrvt4cIJn0Q= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jeremy Linton , Florian Fainelli , Ulf Hansson , Sasha Levin Subject: [PATCH 5.11 133/306] mmc: sdhci-iproc: Add ACPI bindings for the RPi Date: Mon, 15 Mar 2021 14:53:16 +0100 Message-Id: <20210315135512.147381673@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135507.611436477@linuxfoundation.org> References: <20210315135507.611436477@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: Jeremy Linton [ Upstream commit 4f9833d3ec8da34861cd0680b00c73e653877eb9 ] 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 Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20210120000406.1843400-2-jeremy.linton@arm.com Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/host/sdhci-iproc.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c index c9434b461aab..ddeaf8e1f72f 100644 --- a/drivers/mmc/host/sdhci-iproc.c +++ b/drivers/mmc/host/sdhci-iproc.c @@ -296,9 +296,27 @@ static const struct of_device_id sdhci_iproc_of_match[] = { MODULE_DEVICE_TABLE(of, sdhci_iproc_of_match); #ifdef CONFIG_ACPI +/* + * This is a duplicate of bcm2835_(pltfrm_)data without caps quirks + * which are provided by the ACPI table. + */ +static const struct sdhci_pltfm_data sdhci_bcm_arasan_data = { + .quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION | + SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | + SDHCI_QUIRK_NO_HISPD_BIT, + .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN, + .ops = &sdhci_iproc_32only_ops, +}; + +static const struct sdhci_iproc_data bcm_arasan_data = { + .pdata = &sdhci_bcm_arasan_data, +}; + static const struct acpi_device_id sdhci_iproc_acpi_ids[] = { { .id = "BRCM5871", .driver_data = (kernel_ulong_t)&iproc_cygnus_data }, { .id = "BRCM5872", .driver_data = (kernel_ulong_t)&iproc_data }, + { .id = "BCM2847", .driver_data = (kernel_ulong_t)&bcm_arasan_data }, + { .id = "BRCME88C", .driver_data = (kernel_ulong_t)&bcm2711_data }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(acpi, sdhci_iproc_acpi_ids); -- 2.30.1