U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 0/2] Rpi: Add support for second sd host controller
Date: Thu, 18 Jan 2018 00:33:15 +0100	[thread overview]
Message-ID: <20180117233317.37302-1-agraf@suse.de> (raw)

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 a full pinctrl driver 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).

v1 -> v2:

  - Introduce real pinctrl driver
  - Checkpatch fixes
  - Remove hand written pinctrl support

Alexander Graf (2):
  bcm283x: Add pinctrl driver
  mmc: Add bcm2835 sdhost controller

 MAINTAINERS                                |   2 +
 arch/arm/mach-bcm283x/include/mach/gpio.h  |   2 -
 board/raspberrypi/rpi/rpi.c                |   5 +-
 configs/rpi_0_w_defconfig                  |   4 +
 configs/rpi_2_defconfig                    |   4 +
 configs/rpi_3_32b_defconfig                |   4 +
 configs/rpi_3_defconfig                    |   4 +
 configs/rpi_defconfig                      |   4 +
 drivers/gpio/bcm2835_gpio.c                |  29 +-
 drivers/mmc/Kconfig                        |  14 +
 drivers/mmc/Makefile                       |   1 +
 drivers/mmc/bcm2835_sdhost.c               | 994 +++++++++++++++++++++++++++++
 drivers/pinctrl/Kconfig                    |   1 +
 drivers/pinctrl/Makefile                   |   1 +
 drivers/pinctrl/broadcom/Kconfig           |   7 +
 drivers/pinctrl/broadcom/Makefile          |   7 +
 drivers/pinctrl/broadcom/pinctrl-bcm283x.c | 150 +++++
 17 files changed, 1210 insertions(+), 23 deletions(-)
 create mode 100644 drivers/mmc/bcm2835_sdhost.c
 create mode 100644 drivers/pinctrl/broadcom/Kconfig
 create mode 100644 drivers/pinctrl/broadcom/Makefile
 create mode 100644 drivers/pinctrl/broadcom/pinctrl-bcm283x.c

-- 
2.12.3

             reply	other threads:[~2018-01-17 23:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-17 23:33 Alexander Graf [this message]
2018-01-17 23:33 ` [U-Boot] [PATCH v2 1/2] bcm283x: Add pinctrl driver Alexander Graf
2018-01-18 17:26   ` Simon Glass
2018-01-17 23:33 ` [U-Boot] [PATCH v2 2/2] mmc: Add bcm2835 sdhost controller Alexander Graf
2018-01-18  4:41   ` Jaehoon Chung
2018-01-23 16:03     ` Alexander Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180117233317.37302-1-agraf@suse.de \
    --to=agraf@suse.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox