Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp960139pxb; Wed, 3 Mar 2021 22:35:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJyyt3EqM/RBCWpdxZi9miAkBJOAEiG67uo3iol97YPZpVxTtg2NHvgwlzukZr5PIjfaS+Xj X-Received: by 2002:a17:906:f891:: with SMTP id lg17mr2587988ejb.69.1614839721360; Wed, 03 Mar 2021 22:35:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614839721; cv=none; d=google.com; s=arc-20160816; b=WUs+MRaHHnAezY86/SmAwbk0WoY23tvgldBw0w2fa8/xQf0tk14j23fM59c1kUmMrh 1tZAMPKXe+bcKSA4YI13+ThAt+5nRv9AtnG9oy/99BjiysKrSrgDcPglTgHOb8wXjhrr 15Gv7OSy6bG4xzoo9Y6tJcEzl0SABsNJFRMyKSylXrIqeRApA2xYswYhqE/kLmhIuB5X V4KotDHSemRvY2a3CfMURriUSf1TaeflfMr434+474Ie30an+GqsogLeaiftX6C8eCv1 ZG6x+B72cMKu1SeZvSfDw7QWcFWfFCETga8JCuu/ViA6Fg7jTY9JArqWlKU3oK6t7pjp z+rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=PnZpaOgWqYKzRoX9cjbeL7yIABizKYEzbdPwFwv7qjw=; b=COwIir1beAvLJe0/fPrahdkEqpxYVux2+A1EYz39k3rDT/z2opztksZRnj9aD2PvaI rbp2cHYvyt1pLIsWWdRS/ekfHar++jC2OqkW4qAW4cAkAx/A/USNUcB2/UlaW+tcJ78F zHb/XJr2TvRNh1d3Xfh+bV/aUyHBWL89DkqRBKb/hppA1EgldQmU/2X7DWXohJ3WZxuV Rs5VIbTcyEjN5x0qeorgYIUhBOzFh9n2SE3h/jstiRYUCZ/fm4t9OhSt7S0VN+MgZMRD tfzWUVH+1X1XndLP+vSRWn0UqurKVgJ2X1ICfUVzsBJg7OPo1TUwGjc+LtVXqXWtD0lt JnoQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q3si17060936ejb.681.2021.03.03.22.34.59; Wed, 03 Mar 2021 22:35:21 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1444834AbhCBTNd (ORCPT + 99 others); Tue, 2 Mar 2021 14:13:33 -0500 Received: from foss.arm.com ([217.140.110.172]:53692 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1839414AbhCBQRv (ORCPT ); Tue, 2 Mar 2021 11:17:51 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3525E12FC; Tue, 2 Mar 2021 08:17:01 -0800 (PST) Received: from [192.168.122.166] (unknown [10.119.48.4]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 14B223F7D7; Tue, 2 Mar 2021 08:17:00 -0800 (PST) Subject: Re: [PATCH AUTOSEL 5.10 11/47] mmc: sdhci-iproc: Add ACPI bindings for the RPi To: Sasha Levin , linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Florian Fainelli , Ulf Hansson , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com References: <20210302115646.62291-1-sashal@kernel.org> <20210302115646.62291-11-sashal@kernel.org> From: Jeremy Linton Message-ID: <445ed4c0-3b2c-1371-931d-b0de7bdb497a@arm.com> Date: Tue, 2 Mar 2021 10:16:59 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210302115646.62291-11-sashal@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 3/2/21 5:56 AM, Sasha Levin wrote: > 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. For this to actually work on kernels < 5.11 you also need: c5b1c6dc13da mmc: sdhci: Update firmware interface API Which I don't see in 5.10 yet. Thanks, > > 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); >