From patchwork Fri Jan 8 21:13:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Linton X-Patchwork-Id: 359067 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp893123jai; Fri, 8 Jan 2021 13:15:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJw5BdFCsZEc6j46ovJ/ILpZGPWoQIOxQUN4Vwqb1fE/xKYXhNwtLm+A1nZ5De8JiRrFtpDk X-Received: by 2002:aa7:cfd7:: with SMTP id r23mr6505861edy.298.1610140552610; Fri, 08 Jan 2021 13:15:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610140552; cv=none; d=google.com; s=arc-20160816; b=IGHGPXM+XpVIVFImyF4CurcKNBy74K8HVd+rTUBtPVYbi7436ELb8al3t3lxVRbneX X4DHZ0BhHhHdySpXCsqGyJh5aktrjT3nu/LPAR/gbkl3kE43XcJz/SLzWbqHp6qy/Vi1 Df+RwOrW/EbIW2k3dRujhVRGhcNFfkuGZE08jGRbzgLY1MLEvg+BozuOjQjV0ux9NGoc FKFUzdpKHuL6ZflFIzqXLoZx/PnJVqZ7/rnvuKIRssvnLxSg4X/nKO7wHVzu93w4GUcK r0UKKs50PzfB938z3yAgH3S3q8AdTA8oRCXXLaFBPlGym8/wJScCc8oRa4iCREsgSVU/ 8Hsw== 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 :message-id:date:subject:cc:to:from; bh=9w3vxtjE5YjoClAY7zUtzzpmxTXhUAH0VH9/YIBUHdc=; b=RT0ioUjI9ZeOXgIkVg0LMdEZoeFTDHV2nuZDIfPUs/SUGXclvKWjvTV8AEaZ8GXR6z kI8vPJQD2HXNNronV6FwrfpJfEiWBOaja1ABR2q6bYJ9T6PS92mhawzQiqKMLsZRI1Bu 6MtiWwKuI+IjyhuY2Fqv+0mDf7oVFbdLTIEWebm0/L8N6a4M+ZbxD6QWbPOSVZX2BALD H8cT8WdjHnV2ONsa4SYHVd0gV/5Tv+jiOB5kGgbdLsKen8Kum0stmAulkbKS+rKlnXKJ DKMOta58ownwCLgTJUndK/JfoCePNFAvWW7BG0miSrVbmI2zyRS1Q2LGmQ43/NOpr2OB FHeg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-mmc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-mmc-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 r26si4115712edy.318.2021.01.08.13.15.52; Fri, 08 Jan 2021 13:15:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-mmc-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-mmc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-mmc-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 S1728940AbhAHVOg (ORCPT + 3 others); Fri, 8 Jan 2021 16:14:36 -0500 Received: from foss.arm.com ([217.140.110.172]:57018 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728587AbhAHVOg (ORCPT ); Fri, 8 Jan 2021 16:14:36 -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 4E2A21063; Fri, 8 Jan 2021 13:13:50 -0800 (PST) Received: from mammon-tx2.austin.arm.com (mammon-tx2.austin.arm.com [10.118.28.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 459843F66E; Fri, 8 Jan 2021 13:13:50 -0800 (PST) From: Jeremy Linton To: linux-mmc@vger.kernel.org Cc: bcm-kernel-feedback-list@broadcom.com, sbranden@broadcom.com, rjui@broadcom.com, ulf.hansson@linaro.org, adrian.hunter@intel.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, f.fainelli@gmail.com, Jeremy Linton Subject: [PATCH] mmc: sdhci-iproc: Add ACPI bindings for the rpi4 Date: Fri, 8 Jan 2021 15:13:39 -0600 Message-Id: <20210108211339.1724769-1-jeremy.linton@arm.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The rpi4 has a Arasan controller it carries over from the rpi3, and a newer eMMC2 controller. Because of a couple "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, we use BCM2847 for the older Arasan and BRCME88C for the newer eMMC2. With this change linux is capable of utilizing the SD card slot, and the wifi on this platform with linux. Signed-off-by: Jeremy Linton --- drivers/mmc/host/sdhci-iproc.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) -- 2.26.2 Acked-by: Florian Fainelli Reported-by: kernel test robot diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c index c9434b461aab..f79d97b41805 100644 --- a/drivers/mmc/host/sdhci-iproc.c +++ b/drivers/mmc/host/sdhci-iproc.c @@ -250,6 +250,14 @@ static const struct sdhci_pltfm_data sdhci_bcm2835_pltfm_data = { .ops = &sdhci_iproc_32only_ops, }; +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 bcm2835_data = { .pdata = &sdhci_bcm2835_pltfm_data, .caps = ((0x1 << SDHCI_MAX_BLOCK_SHIFT) @@ -261,6 +269,10 @@ static const struct sdhci_iproc_data bcm2835_data = { .mmc_caps = 0x00000000, }; +static const struct sdhci_iproc_data bcm_arasan_data = { + .pdata = &sdhci_bcm_arasan_data, +}; + static const struct sdhci_ops sdhci_iproc_bcm2711_ops = { .read_l = sdhci_iproc_readl, .read_w = sdhci_iproc_readw, @@ -299,6 +311,8 @@ MODULE_DEVICE_TABLE(of, sdhci_iproc_of_match); 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);