From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2A89C43603 for ; Tue, 2 Mar 2021 19:49:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 791F064F07 for ; Tue, 2 Mar 2021 19:49:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1581132AbhCBSkK (ORCPT ); Tue, 2 Mar 2021 13:40:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:46442 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351160AbhCBPr1 (ORCPT ); Tue, 2 Mar 2021 10:47:27 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4904F64F56; Tue, 2 Mar 2021 11:57:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614686221; bh=ErfQwjmd8r4+acZhXc+ggYrttmA12hddJQe7yT8J+dY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bp03qdLa0EpKBNodBNH341Dc0btecAQEzuoC2s8mxnkrIy060Y16HfGdaftls+X2D VPmjcmGcjzg0XBN2X/vORk7HiEh3kFU4LxRRhbfJIJjdm1oeDfhuNAZLOjEqGgs4zF BgxNSm29M9mHjjckFwYgKVMeqprtfB6S76DYHVxUFU8TQyfNGXe8UpR8smykMgEzTx PLOnaonNoGeeGDU0u6n061dA6EzkJSed44zdvS8xYzEleTgsvxF6f3AnyVqucAqIhO sF8RtMBgfR4Ak2NraDM5eXWsVR1WOd9agcVxyktRvQ7eAhnW26WkV0q7zjDRgMTMLn SA2V+ANViCO1w== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jeremy Linton , Florian Fainelli , Ulf Hansson , Sasha Levin , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com Subject: [PATCH AUTOSEL 5.10 11/47] mmc: sdhci-iproc: Add ACPI bindings for the RPi Date: Tue, 2 Mar 2021 06:56:10 -0500 Message-Id: <20210302115646.62291-11-sashal@kernel.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210302115646.62291-1-sashal@kernel.org> References: <20210302115646.62291-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70E7DC433E0 for ; Wed, 3 Mar 2021 20:40:02 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8ED3164EFD for ; Wed, 3 Mar 2021 20:40:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8ED3164EFD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=dZnYibLtMjDEOsUOocfBNzPbBgbRoz3IOOiM30xU54U=; b=Fk0sILvjv+mTtu3hRjxixBzZe 7g5K31o2ulj8EzRRgFqf9K5BywXfEuDqMTjttJj9xS8gK4RGZf3hUV/Gb7RBEYoerNNZC6u7OXphc XrDTRwGYvVI6YuHe0p0tAEh0+UR+lCYxkJ1LpOOG8IsXF+IV6n+4UwtEiGrOu8r+3uJE0A5RXsPx/ wymZXgpEN9m/0FG4yQStIwwZvRnDyU5qDi1gC+t6xx6DURRbZYwbILu7JZLHPYUUVU9qM9RDy5pW8 cTQBIPpXeSPjAKROATE3goWHclDU1mDhnqO8tF5WhHWj6TF01Ig+qFI2FCT/8PNJd63QVjZkIv7Ph mkVKeNFEA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lHYEN-006RlD-Jd; Wed, 03 Mar 2021 20:36:28 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHT6Y-005J5M-3g for linux-arm-kernel@desiato.infradead.org; Wed, 03 Mar 2021 15:08:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=61CfNiL6oAXRUZWAkKkoz/foPSegYV70u9jNzK8egjE=; b=DXT6PGZ/rV2dS9q+T8aI7lFp3s VZ1XFRNu9fEpU/J2t85I1nqZQnyRlq7vFj55i8SkDqMIGZUtQ3XucdtMfHeHClhVhZBzClTBD6r8y m35YAu0eFGusvf61mM4DFDLSKNFQWROwVJ8p4Qs/pVxsXhEinrHOXujUapt37VeXHaTuiDJz8j8p7 BDfAIK51sGAtn9SiUXf3mtl6rftxTpwduF8wkI+mwvkl1v6i3ey5olLa0Yfvd98rIM0TpkueEGtCm 4/P2X7rQbNq2djHJ3O46DY0Qbv/98kHVZDQfx8Q2A+eXc4wV0oof6ACLTyovjCPzQ90D85XWLjoz/ 45nCCQrQ==; Received: from mail.kernel.org ([198.145.29.99]) by casper.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lH3eD-00H3CR-Gt for linux-arm-kernel@lists.infradead.org; Tue, 02 Mar 2021 11:57:11 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4904F64F56; Tue, 2 Mar 2021 11:57:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614686221; bh=ErfQwjmd8r4+acZhXc+ggYrttmA12hddJQe7yT8J+dY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bp03qdLa0EpKBNodBNH341Dc0btecAQEzuoC2s8mxnkrIy060Y16HfGdaftls+X2D VPmjcmGcjzg0XBN2X/vORk7HiEh3kFU4LxRRhbfJIJjdm1oeDfhuNAZLOjEqGgs4zF BgxNSm29M9mHjjckFwYgKVMeqprtfB6S76DYHVxUFU8TQyfNGXe8UpR8smykMgEzTx PLOnaonNoGeeGDU0u6n061dA6EzkJSed44zdvS8xYzEleTgsvxF6f3AnyVqucAqIhO sF8RtMBgfR4Ak2NraDM5eXWsVR1WOd9agcVxyktRvQ7eAhnW26WkV0q7zjDRgMTMLn SA2V+ANViCO1w== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jeremy Linton , Florian Fainelli , Ulf Hansson , Sasha Levin , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com Subject: [PATCH AUTOSEL 5.10 11/47] mmc: sdhci-iproc: Add ACPI bindings for the RPi Date: Tue, 2 Mar 2021 06:56:10 -0500 Message-Id: <20210302115646.62291-11-sashal@kernel.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210302115646.62291-1-sashal@kernel.org> References: <20210302115646.62291-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210302_115711_577522_E0F64069 X-CRM114-Status: GOOD ( 11.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel