From patchwork Tue Jan 16 13:46:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 124688 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp1019210lje; Tue, 16 Jan 2018 05:46:52 -0800 (PST) X-Google-Smtp-Source: ACJfBosGAMU80CQnWjBZtuxZFQgfE4XodVNUVjXJYXwKbtAPIYyL1+DNwfNSbuy/fY7U3omIef3z X-Received: by 10.80.216.205 with SMTP id y13mr55553000edj.173.1516110411963; Tue, 16 Jan 2018 05:46:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516110411; cv=none; d=google.com; s=arc-20160816; b=rbqN0cv9pHdRmg1h7sSUfCQhgI/Mfw/o6O9Fu3EoIc6rvtO10sh+L7Pwn+r0qfGWOE sHoZ+goZUhBapb1OEEAnb2fvBIiurJrfdUjLYyhpAYly+OoN5fJAzZAN6cKZPbn4k8yK VwNVU9XEUVV6H+6tbwwU+kMGzS6Faow9xbzaWKh5wL082cQk8Tg2Fi9YwDZTxZqztdao ygdmooBfQAIuEJb48tZjNMGU0NxlsLL0poRQI19OCPi6HEOLfHEfIXO6/qSR6ZDCGHyN 6Td3dHoSMTNbEEcAhx5uMzt3ZWGXFAcNNP+KhNFYz/hbG7yg9o9c7O71oOmH9JuIiyzF GUbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from :arc-authentication-results; bh=/qIewH4Y2K6uCCVydcQ3BzzdVwbGUaCjRIZRDyMEBEQ=; b=LspPsUtT6R4mbXTLNz8qU8AAQRqalCkErqoBX1c4HBbcsevJZEH0A3rLt/WfGeApyG 39X0YVIdsU4NWySCEnKZeAIh/skaXB4E7fmru2mQ3XbABuWiHU/5BiIXkYai1IWdLxTp 7L2f/730DnvPFeYkRO5O5sthC++mFno816P3YrjeKLnSW7FN7ZgahUY3qDmrH/0VW/g4 CSViipAqBrOmKrpyjfq1acCKVTICM1ujb3wCr1ebX8Jn45EH7+KIHqPrggAvslsiisOO szAhRZCE7+aJ6s/bNvO7LDJj2mAOD6MUupNcD4l8okxGkk/QWya0oNX+t2qZMXzWejNq N0HQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id 47si1778741edz.9.2018.01.16.05.46.51; Tue, 16 Jan 2018 05:46:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 8644CC21DF3; Tue, 16 Jan 2018 13:46:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 14C39C21DA5; Tue, 16 Jan 2018 13:46:47 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6F152C21DBA; Tue, 16 Jan 2018 13:46:45 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by lists.denx.de (Postfix) with ESMTPS id 1EDBAC21DB0 for ; Tue, 16 Jan 2018 13:46:45 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7DE0BAD00; Tue, 16 Jan 2018 13:46:44 +0000 (UTC) From: Alexander Graf To: u-boot@lists.denx.de Date: Tue, 16 Jan 2018 14:46:35 +0100 Message-Id: <20180116134638.3879-1-agraf@suse.de> X-Mailer: git-send-email 2.12.3 Subject: [U-Boot] [PATCH 0/3] Rpi: Add support for second sd host controller X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The Raspberry Pi (bcm283x SoC) family contains 2 IP blocks to drive SD peripherals: A pretty standard SDHCI one called iProc and a home grown one called "sdhost". When driving U-Boot by the same device tree that we use for Linux, we end up in situations where only the "sdhost" device is available for use. In those situations, current U-Boot can simply not drive the SD card, because the device tree disables the SDHCI device. This patch set also adds support for pinmuxing the SD devices properly to their respective pins. This is necessary because the RPi firmware doesn't mux the SD pins according to the device tree but instead expects the payload (usually Linux, U-Boot for us) to do that. With this patch set, I can successfully use U-Boot on a RPi3 Compute Module with CONFIG_OF_BOARD=y and a device tree generated by the RPi firmware (plus a few overlays in config.txt for vc4, serial, etc). Alexander Graf (3): bcm2835_gpio: Add support for pinmux mmc: Add bcm2835 sdhost controller mmc: bcm2835_sdhci: Add pinmux support arch/arm/mach-bcm283x/include/mach/gpio.h | 1 + drivers/gpio/bcm2835_gpio.c | 40 ++ drivers/mmc/Kconfig | 14 + drivers/mmc/Makefile | 1 + drivers/mmc/bcm2835_sdhci.c | 11 + drivers/mmc/bcm2835_sdhost.c | 1000 +++++++++++++++++++++++++++++ 6 files changed, 1067 insertions(+) create mode 100644 drivers/mmc/bcm2835_sdhost.c