mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: ukl@pengutronix.de, "Daniel Brát" <danek.brat@gmail.com>,
	ore@pengutronix.de, "Ahmad Fatoum" <a.fatoum@pengutronix.de>
Subject: [PATCH 14/15] doc: bcm283x: add initial docs for Raspberry Pi 4 support
Date: Thu,  5 May 2022 10:01:51 +0200	[thread overview]
Message-ID: <20220505080152.1068424-15-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20220505080152.1068424-1-a.fatoum@pengutronix.de>

Separate out the barebox-dt-2nd documentation. There's much duplication
that way, but as we intend to remove the board-specific raspberry pi
images, this is ok for now.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 Documentation/boards/bcm2835.rst | 61 +++++++++++++++++++++++++++++---
 1 file changed, 56 insertions(+), 5 deletions(-)

diff --git a/Documentation/boards/bcm2835.rst b/Documentation/boards/bcm2835.rst
index 0b5299a34078..b27c6f34a50b 100644
--- a/Documentation/boards/bcm2835.rst
+++ b/Documentation/boards/bcm2835.rst
@@ -4,6 +4,17 @@ Broadcom BCM283x
 Raspberry Pi
 ------------
 
+barebox supports has support for BCM283x-based Raspberry Pi single board
+computers. Support is most extensive for BCM283[567]. Forthe newer BCM2711
+used in the Raspberry Pi 4, only basic support is available currently
+(Serial Port @115200 Baud, Pinctrl, SD-Card).
+
+Legacy Raspberry Pi Images
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This format will be eventually phased out in favor of using the generic
+``barebox-dt-2nd.img`` binary for all configurations.
+
   1. Prepare an SD or microSD card with a FAT filesystem of at least 30 MB in size.
 
   2. Download the `Raspberry Pi firmware`_ (120 MB), unzip it, and copy the
@@ -19,11 +30,6 @@ Raspberry Pi
      Copy the respective image for your model to your SD card and name it
      ``barebox.img``.
 
-     Alternatively, ``images/barebox-dt-2nd.img`` can be used as single bootloader for all
-     supported 32-bit boards. In this case the device tree supplied by the video core
-     is directly used by barebox to probe. The device trees in ``arch/arm/dts/*.dtb``
-     will need to be renamed for alignment with the naming scheme expected by the videocore.
-
   4. Create a text file ``config.txt`` on the SD card with the following content::
 
          kernel=barebox.img
@@ -53,5 +59,50 @@ The original command-line from VideoCore device tree is available to the Barebox
 
     global linux.bootargs.vc="$global.vc.bootargs"
 
+Generic DT image
+~~~~~~~~~~~~~~~~
+
+  1. Prepare an SD or microSD card with a FAT filesystem of at least 30 MB in size.
+
+  2. Download the `Raspberry Pi firmware`_ (120 MB), unzip it, and copy the
+     contents of the ``boot/`` folder to your card.
+
+  3. Use ``make rpi_defconfig; make`` to build barebox for 32-Bit or ``make rpi_v8a_defconfig; make`` to build it for 64-Bit
+
+     This will create ``images/barebox-dt-2nd.img``, which can be used as single bootloader
+     for all supported boards. In this case the device tree supplied by the video core
+     is directly used by barebox to probe. The device trees in ``arch/arm/dts/*.dtb``
+     will need to be renamed for alignment with the naming scheme expected by the videocore.
+     (left is name in FAT, right is name used by barebox, here in genimage syntax)::
+
+         file bcm2836-rpi-2-b.dtb { image = bcm2836-rpi-2.dtb }
+         file bcm2836-rpi-2-b.dtb { image = bcm2836-rpi-2.dtb }
+         file bcm2837-rpi-3-b.dtb { image = bcm2837-rpi-3.dtb }
+         file bcm2837-rpi-3-a-plus.dtb { image = bcm2837-rpi-3.dtb }
+         file bcm2837-rpi-3-b-plus.dtb { image = bcm2837-rpi-3.dtb }
+         file bcm2837-rpi-cm3-io3.dtb { image = bcm2837-rpi-cm3.dtb }
+         file bcm2711-rpi-4-b.dtb { image = bcm2711-rpi-4-b.dtb }
+
+  4. Create a text file ``config.txt`` on the SD card with the following content::
+
+         kernel=barebox-dt-2nd.img
+         arm_64bit=1 # remove for 32-bit mode
+         upstream_kernel=1 # use upstream DT file names
+         enable_uart=1
+
+     If you want to use the mini-uart instead of the PL011, you may need to additionally set::
+
+         uart_2ndstage=1
+
+     This is required on boards, like the Raspberry Pi Zero W, that use the mini-uart as the
+     primary UART. It is needed on boards like the CM3 as well if the mini-uart is to be used.
+
+     (For more information, refer to the `documentation for config.txt`_.)
+
+  5. Connect to board's UART (115200 8N1);
+     Use PIN6 (GND), PIN8 (UART_TX), PIN10 (UART_RX) pins.
+
+  6. Turn board's power on.
+
 .. _Raspberry Pi firmware: https://codeload.github.com/raspberrypi/firmware/zip/80e1fbeb78f9df06701d28c0ed3a3060a3f557ef
 .. _documentation for config.txt: https://www.raspberrypi.org/documentation/configuration/config-txt/
-- 
2.30.2


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


  parent reply	other threads:[~2022-05-05  8:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05  8:01 [PATCH 00/15] ARM: rpi: add basic " Ahmad Fatoum
2022-05-05  8:01 ` [PATCH 01/15] PBL: fdt: fix /memory parsing when #address-cells != #size-cells Ahmad Fatoum
2022-05-05  8:01 ` [PATCH 02/15] of: address: fix printing of OF node name in error message Ahmad Fatoum
2022-05-05  8:01 ` [PATCH 03/15] serial: ns16550: rpi: remove ungating now done by proper clk driver Ahmad Fatoum
2022-05-05  8:01 ` [PATCH 04/15] ARM: cpu: prevent recursive dependencies via CPU_SUPPORTS_64BIT_KERNEL Ahmad Fatoum
2022-05-05  8:01 ` [PATCH 05/15] ARM: rpi: add Raspberry Pi 3 64-bit build support Ahmad Fatoum
2022-05-05  8:01 ` [PATCH 06/15] ARM: rpi: rpi3: disallow MMU_EARLY && 64BIT Ahmad Fatoum
2022-05-05  8:01 ` [PATCH 07/15] clk: rpi: add Raspberry Pi 4 support Ahmad Fatoum
2022-05-05  8:01 ` [PATCH 08/15] mci: bcm2835: add bcm2711-emmc2 (Rpi4) support Ahmad Fatoum
2022-05-05  8:01 ` [PATCH 09/15] serial: ns16550: rpi: skip baudrate changes for bcm2711 Ahmad Fatoum
2022-05-05  8:01 ` [PATCH 10/15] clocksource: bcm2835: bump below architeced timer for AArch64 Ahmad Fatoum
2022-05-05  8:01 ` [PATCH 11/15] ARM: rpi: add Raspberry Pi 4 support Ahmad Fatoum
2022-05-05  8:01 ` [PATCH 12/15] ARM: rpi: add debug_ll support for Raspberry Pi 4 Ahmad Fatoum
2022-05-05  8:01 ` [PATCH 13/15] ARM: rpi: add heuristic for skipping detection of SDIO card Ahmad Fatoum
2022-05-05  8:01 ` Ahmad Fatoum [this message]
2022-05-05  8:01 ` [PATCH 15/15] doc: bcm283x: reference newer firmware Ahmad Fatoum
2022-05-06 12:47 ` [PATCH 00/15] ARM: rpi: add basic Raspberry Pi 4 support Ahmad Fatoum

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=20220505080152.1068424-15-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=danek.brat@gmail.com \
    --cc=ore@pengutronix.de \
    --cc=ukl@pengutronix.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