mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Tomaz Solc <tomaz.solc@tablix.org>
To: barebox@lists.infradead.org
Cc: Tomaz Solc <tomaz.solc@tablix.org>
Subject: [PATCH 0/7] Fixing MMC access on Raspberry Pi CM3
Date: Thu, 14 Feb 2019 14:24:22 +0100	[thread overview]
Message-ID: <20190214132429.7463-1-tomaz.solc@tablix.org> (raw)

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

             reply	other threads:[~2019-02-14 13:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-14 13:24 Tomaz Solc [this message]
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

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=20190214132429.7463-1-tomaz.solc@tablix.org \
    --to=tomaz.solc@tablix.org \
    --cc=barebox@lists.infradead.org \
    /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