mbox series

[0/3] Rpi: Add support for second sd host controller

Message ID 20180116134638.3879-1-agraf@suse.de
Headers show
Series Rpi: Add support for second sd host controller | expand

Message

Alexander Graf Jan. 16, 2018, 1:46 p.m. UTC
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

Comments

Jaehoon Chung Jan. 17, 2018, 11:06 a.m. UTC | #1
On 01/16/2018 10:46 PM, Alexander Graf wrote:
> 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).

Before reviewing, Cold you fix the checkpatch error and warning?
There are too many error and warning..

Best Regards,
Jaehoon Chung

> 
> 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
>