mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/7] Fixing MMC access on Raspberry Pi CM3
@ 2019-02-14 13:24 Tomaz Solc
  2019-02-14 13:24 ` [PATCH 1/7] ARM: rpi: switch emmc from sdhost to sdhci Tomaz Solc
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Tomaz Solc @ 2019-02-14 13:24 UTC (permalink / raw)
  To: barebox; +Cc: Tomaz Solc

Dear all,

These are the changes required to get Raspberry Pi CM3 to boot from the
built-in MMC flash chip. With these patches applied, Barebox successfully boots
a Raspbian system using the following commands:

global linux.bootargs.base="earlyprintk console=tty0 console=ttyAMA0,115200
root=/dev/mmcblk0p2 rootfstype=ext4 rootwait noinitrd"

bootm -o /boot/bcm2710-rpi-cm3.dtb /boot/kernel7.img

Overview of the changes:

 - Implemented pinctrl driver hooks for BCM2835 GPIO, so that pinctrl-
   directives in the device tree are honored.
 - Added the missing device tree property parsing to mci-bcm2835 driver.
 - Added a new Kconfig setting for the Compute Module 3 since a slightly
   different device tree is required compared to Raspberry Pi 3.

Slightly ugly parts:

 - pinctrl needs to be initialized before mci. The only way I found to do this
   is to change the link order, since mci is already started early using
   coredevice_initcall().
 - having a separate MACH_RPI_CM3 in addition to MACH_RPI3 seems an overkill,
   but I couldn't find a clean way to just have a different device tree.

Best regards
Tomaz

Tomaz Solc (7):
  ARM: rpi: switch emmc from sdhost to sdhci
  Kconfig: add pin controllers submenu.
  pinctrl: bcm2835: move existing code from gpio.
  pinctrl: bcm2835: register the pin controller.
  mci: move after pinctrl in link order.
  mci: bcm2835: parse other device tree properties.
  ARM: rpi: Add device tree for Compute Module 3.

 arch/arm/boards/raspberry-pi/lowlevel.c            | 10 +++++
 arch/arm/configs/rpi_defconfig                     |  2 +-
 arch/arm/dts/Makefile                              |  1 +
 arch/arm/dts/bcm2837-rpi-3.dts                     |  9 ++++
 arch/arm/dts/bcm2837-rpi-cm3.dts                   | 26 +++++++++++
 arch/arm/mach-bcm283x/Kconfig                      |  6 +++
 drivers/Makefile                                   |  2 +-
 drivers/gpio/Kconfig                               |  4 --
 drivers/gpio/Makefile                              |  1 -
 drivers/mci/mci-bcm2835.c                          |  3 ++
 drivers/pinctrl/Kconfig                            | 10 +++++
 drivers/pinctrl/Makefile                           |  1 +
 .../gpio-bcm2835.c => pinctrl/pinctrl-bcm2835.c}   | 52 +++++++++++++++++++++-
 images/Makefile.bcm283x                            |  6 ++-
 14 files changed, 124 insertions(+), 9 deletions(-)
 create mode 100644 arch/arm/dts/bcm2837-rpi-cm3.dts
 rename drivers/{gpio/gpio-bcm2835.c => pinctrl/pinctrl-bcm2835.c} (77%)

-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-02-18  9:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-14 13:24 [PATCH 0/7] Fixing MMC access on Raspberry Pi CM3 Tomaz Solc
2019-02-14 13:24 ` [PATCH 1/7] ARM: rpi: switch emmc from sdhost to sdhci Tomaz Solc
2019-02-14 13:24 ` [PATCH 2/7] Kconfig: add pin controllers submenu Tomaz Solc
2019-02-14 13:24 ` [PATCH 3/7] pinctrl: bcm2835: move existing code from gpio Tomaz Solc
2019-02-14 13:24 ` [PATCH 4/7] pinctrl: bcm2835: register the pin controller Tomaz Solc
2019-02-14 13:24 ` [PATCH 5/7] mci: move after pinctrl in link order Tomaz Solc
2019-02-14 23:34   ` Andrey Smirnov
2019-02-18  8:42   ` Sascha Hauer
2019-02-18  9:54     ` Tomaž Šolc
2019-02-14 13:24 ` [PATCH 6/7] mci: bcm2835: parse other device tree properties Tomaz Solc
2019-02-14 13:24 ` [PATCH 7/7] ARM: rpi: Add device tree for Compute Module 3 Tomaz Solc
2019-02-14 14:15   ` Roland Hieber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox