This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 11e81d1a89c8c7c7499f08cc972c38ac600ca6e5
Author: Matteo Golin <[email protected]>
AuthorDate: Mon Oct 27 19:07:39 2025 -0400

    docs/platforms/arm64/bcm2711: microSD documented, improvements
    
    The documentation is now updated to reflect the new EMMC support. I have
    also improved the format to match the standard board documentation
    template, and included better support descriptions for features that
    have varying levels of implementation.
    
    Signed-off-by: Matteo Golin <[email protected]>
---
 .../arm64/bcm2711/boards/raspberrypi-4b/index.rst  | 125 +++++++++++++--------
 Documentation/platforms/arm64/bcm2711/index.rst    |  40 ++++++-
 2 files changed, 115 insertions(+), 50 deletions(-)

diff --git 
a/Documentation/platforms/arm64/bcm2711/boards/raspberrypi-4b/index.rst 
b/Documentation/platforms/arm64/bcm2711/boards/raspberrypi-4b/index.rst
index 3db438e527d..0ea6abc98ac 100644
--- a/Documentation/platforms/arm64/bcm2711/boards/raspberrypi-4b/index.rst
+++ b/Documentation/platforms/arm64/bcm2711/boards/raspberrypi-4b/index.rst
@@ -2,7 +2,7 @@
 Raspberry Pi 4B
 ===============
 
-.. tags:: chip:bcm2711, experimental
+.. tags:: arch:arm64, chip:bcm2711, vendor:raspberry-pi, experimental
 
 .. warning::
 
@@ -13,17 +13,6 @@ Raspberry Pi 4B
    found an issue with any of the implementation! See :doc:`the contributing
    guidelines </contributing/index>`.
 
-.. warning::
-
-   The SPI driver implemented for the :doc:`BCM2711 <../../index>` has only 
been
-   tested on SPI0. It appears that even using the special `overlays
-   
<https://github.com/raspberrypi/linux/blob/stable/arch/arm/boot/dts/overlays/README>`_
-   for the device tree passed to the proprietary firmware does not properly
-   initialize the remaining SPI interfaces, and thus they have not been working
-   properly. More effort is required to reverse engineer the magic incantations
-   required to initialize these interfaces, at which point it is assumed that
-   the driver implementation should extend to SPI3-6.
-
 The `Raspberry Pi 4B 
<https://www.raspberrypi.com/products/raspberry-pi-4-model-b/specifications/>`_ 
is an ARM64
 hobbyist board created by Raspberry Pi.
 
@@ -33,7 +22,7 @@ hobbyist board created by Raspberry Pi.
    :alt: Raspberry Pi 4B board
 
 Features
-=========
+========
 
 - Broadcom BCM2711 @1.8GHz
 - 1, 2, 4 and 8GB LPDDR4-3200 SDRAM models
@@ -48,8 +37,50 @@ Features
 - 4-pole stereo audio and composite video port
 - Micro SD card slot
 
-ARM64 Toolchain
-===============
+Board Peripheral Support
+========================
+
+SMP is currently unsupported. To see support for chip peripherals (I2C, SPI,
+UART, etc), see the :doc:`BCM2711 page <../../index>`
+
+NuttX for the Raspberry Pi 4 supports these on-board peripherals:
+
+======================== =======
+Peripheral               Support
+======================== =======
+AV port                  No
+HDMI                     No
+WiFi                     No
+Ethernet                 No
+USB 3.0                  No
+USB 2.0                  No
+Bluetooth                No
+microSD card             Yes (see notes in BCM2711 page)
+======================== =======
+
+Buttons and LEDs
+================
+
+The board has two LEDs:
+
+* SD card activity (green)
+* Power (red)
+
+These LEDs are controlled by proprietary firmware at the beginning of the boot
+process. Afterwards, NuttX controls them with the ``autoleds`` framework. At
+this time:
+
+* Red LED is solid for assertion failure, or blinks on panic
+* Green LED is solid when NuttX has started
+
+Power Supply
+============
+
+The board can be supplied power either through the USB-C connection (5V) or via
+the 5V power input pin.
+
+Installation
+============
 
 Before building NuttX for the Raspberry Pi 4B, download the ARM64 Toolchain for
 **AArch64 Bare-Metal Target** ``aarch64-none-elf`` from
@@ -70,21 +101,7 @@ Check the ARM64 Toolchain:
 
     $ aarch64-none-elf-gcc -v
 
-Building
-========
-
-To build NuttX for the Raspberry Pi 4B, :doc:`install the prerequisites 
</quickstart/install>` and :doc:`clone the git
-repositories </quickstart/install>` for ``nuttx`` and ``apps``.
-
-Configure the NuttX project to use the Raspberry Pi 4B and build it (this 
example uses the ``nsh`` configuration).
-
-.. code:: console
-
-    $ cd nutxx
-    $ tools/configure.sh raspberrypi-4b:nsh
-    $ make
-
-Booting
+Flashing
 ========
 
 In order to boot NuttX on the Raspberry Pi 4B, you will need to have a 
formatted micro SD card. The SD card should
@@ -152,26 +169,38 @@ appear onscreen:
     NuttShell (NSH) NuttX-12.6.0-RC0
     nsh> uname -a
     NuttX 12.6.0-RC0 c4f3a42131-dirty Aug  6 2024 21:17:01 arm64 raspberrypi-4b
-    nsh> 
+    nsh>
 
-Board Peripheral Support
-========================
+Configurations
+==============
 
-SMP is currently unsupported.
+You can configure NuttX for the Raspberry Pi 4B using the following command:
 
-To see support for general chip peripherals (I2C, SPI, UART, etc), see the
-:doc:`BCM2711 page <../../index>`
+.. code:: console
 
-NuttX for the Raspberry Pi 4 supports these on-board peripherals:
+   $ ./tools/configure.sh raspberrypi-4b:<config>
 
-======================== =======
-Peripheral               Support
-======================== =======
-AV port                  No
-HDMI                     No
-WiFi                     No
-Ethernet                 No
-USB 3.0                  No
-USB 2.0                  No
-Bluetooth                No
-======================== =======
+Where ``<config>`` is one of the configurations listed below.
+
+nsh
+---
+
+A simple configuration with NSH on the Mini-UART console, accessible using a 
TTL
+cable connected to GPIO 14 & 15.
+
+sd
+--
+
+Configuration which supports the microSD card peripheral on EMMC2. At boot 
time,
+the microSD card is identified and the boot partition is mounted as a FAT file
+system to ``/sd``. It can be written to and read from.
+
+.. warning::
+
+   There is some instability with the microSD card functionality. Please see
+   :doc:`/platforms/arm64/bcm2711/index` for more information.
+
+.. note::
+
+   This configuration enables BSD components since the :doc:`sdstress
+   </applications/testing/sd_stress/index>` application is BSD licensed.
diff --git a/Documentation/platforms/arm64/bcm2711/index.rst 
b/Documentation/platforms/arm64/bcm2711/index.rst
index a74fc292a95..98307f92caa 100644
--- a/Documentation/platforms/arm64/bcm2711/index.rst
+++ b/Documentation/platforms/arm64/bcm2711/index.rst
@@ -2,7 +2,7 @@
 BCM2711
 =======
 
-.. tags:: chip:bcm2711, experimental
+.. tags:: arch:arm64, chip:bcm2711, vendor:broadcom, experimental
 
 .. warning::
 
@@ -26,14 +26,50 @@ Supported Peripherals
 ======================== =======
 Peripheral               Support
 ======================== =======
-I2C                      Full interrupt-based support, all interfaces work and 
tested.
+I2C                      Full interrupt-based support. No 10b addressing.
 UART                     Mini UART yes, PL011 no
 GPIO                     Partial
+MAILBOX                  Partial (polled method, only commands used by 
firmware are implemented)
+EMMC2                    Interrupt-based support, no DMA.
+EMMC                     Supported alongside EMMC2 in theory, but untested.
 PWM                      No
 SPI                      Interrupt-based driver (no DMA) for all SPI except 1 
& 2 (auxiliary)
 PCM                      No
 ======================== =======
 
+.. warning::
+
+   The SPI driver implemented for the :doc:`BCM2711 <../../index>` has only 
been
+   tested on SPI0. It appears that even using the special `overlays
+   
<https://github.com/raspberrypi/linux/blob/stable/arch/arm/boot/dts/overlays/README>`_
+   for the device tree passed to the proprietary firmware does not properly
+   initialize the remaining SPI interfaces, and thus they have not been working
+   properly. More effort is required to reverse engineer the magic incantations
+   required to initialize these interfaces, at which point it is assumed that
+   the driver implementation should extend to SPI3-6.
+
+.. warning::
+
+   The EMMC2 peripheral connects to the microSD card slot on the 
:doc:`Raspberry
+   Pi 4B </platforms/arm64/bcm2711/boards/raspberrypi-4b/index>`. Currently, it
+   has been tested using a 32GB Samsung microSD card and it has passed testing
+   with that. The only quirks are:
+
+   * No card insertion/removal interrupts work, so hotswapping isn't possible
+   * The :doc:`sdstress </applications/testing/sd_stress/index>` example works
+     unless the 'number of bytes' option is greater than 1023. I suspect this 
is
+     something to do with the FIFO depth being only 1023 bytes.
+
+   However, the 64GB microSD card exhibits very strange behaviour. There are
+   often data CRC errors that prevent the boot filesystem from mounting. When
+   that somehow passes (intermittent), running ``ls`` on the filesystem 
repeatedly
+   sometimes causes certain files to disappear from the listing (they are not
+   deleted and appear again on next boot), or causes their filenames to be 
shown
+   in all caps. Writing to the card with ``echo`` often fails with data CRC
+   error or timeout, and then the card is buggy for the remainder of the
+   session. **It is not recommended to use 64GB cards with this implementation
+   for the time being.**
+
 Supported Boards
 ================
 

Reply via email to