diff mbox series

[V4,8/8] doc: board: ti: Add BeaglePlay documentation

Message ID 20230822184135.2328409-9-nm@ti.com
State Changes Requested
Delegated to: Tom Rini
Headers show
Series board: ti: Add support for BeaglePlay | expand

Commit Message

Nishanth Menon Aug. 22, 2023, 6:41 p.m. UTC
Add base documentation for BeaglePlay

Signed-off-by: Nishanth Menon <nm@ti.com>
---
Cc: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

Changes Since V3:
* Updated documentation to give a more clear overview of MMC partitions
  and flashing information.
* Added OpenOCD debug documentation
* Added LED status information and indication of various boot stages

V3: https://lore.kernel.org/all/20230815164440.2713726-5-nm@ti.com/
V2: https://lore.kernel.org/u-boot/20230727234446.3651836-5-nm@ti.com/
V1: https://lore.kernel.org/all/20230725185253.2123433-7-nm@ti.com/

 doc/board/ti/am62x_beagleplay.rst    | 256 ++++++++++
 doc/board/ti/img/beagleplay_emmc.svg | 697 +++++++++++++++++++++++++++
 doc/board/ti/k3.rst                  |   1 +
 3 files changed, 954 insertions(+)
 create mode 100644 doc/board/ti/am62x_beagleplay.rst
 create mode 100644 doc/board/ti/img/beagleplay_emmc.svg

Comments

Mattijs Korpershoek Aug. 23, 2023, 8:36 a.m. UTC | #1
Hi Nishanth,

On mar., août 22, 2023 at 13:41, Nishanth Menon <nm@ti.com> wrote:

> Add base documentation for BeaglePlay
>
> Signed-off-by: Nishanth Menon <nm@ti.com>

This is great! Thanks a lot for the documentation update, especially the
"Flash to eMMC" section.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>

> ---
> Cc: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
>
> Changes Since V3:
> * Updated documentation to give a more clear overview of MMC partitions
>   and flashing information.
> * Added OpenOCD debug documentation
> * Added LED status information and indication of various boot stages
>
> V3: https://lore.kernel.org/all/20230815164440.2713726-5-nm@ti.com/
> V2: https://lore.kernel.org/u-boot/20230727234446.3651836-5-nm@ti.com/
> V1: https://lore.kernel.org/all/20230725185253.2123433-7-nm@ti.com/
>
>  doc/board/ti/am62x_beagleplay.rst    | 256 ++++++++++
>  doc/board/ti/img/beagleplay_emmc.svg | 697 +++++++++++++++++++++++++++
>  doc/board/ti/k3.rst                  |   1 +
>  3 files changed, 954 insertions(+)
>  create mode 100644 doc/board/ti/am62x_beagleplay.rst
>  create mode 100644 doc/board/ti/img/beagleplay_emmc.svg
>
> diff --git a/doc/board/ti/am62x_beagleplay.rst b/doc/board/ti/am62x_beagleplay.rst
> new file mode 100644
> index 000000000000..5adb7b4c9ace
> --- /dev/null
> +++ b/doc/board/ti/am62x_beagleplay.rst
> @@ -0,0 +1,256 @@
> +.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
> +.. sectionauthor:: Nishanth Menon <nm@ti.com>
> +
> +AM62x Beagleboard.org Beagleplay
> +================================
> +
> +Introduction:
> +-------------
> +
> +BeagleBoard.org BeaglePlay is an easy to use, affordable open source
> +hardware single board computer based on the Texas Instruments AM625
> +SoC that allows you to create connected devices that work even at long
> +distances using IEEE 802.15.4g LR-WPAN and IEEE 802.3cg 10Base-T1L.
> +Expansion is provided over open standards based mikroBUS, Grove and
> +QWIIC headers among other interfaces.
> +
> +Further information can be found at:
> +
> +* Product Page: https://beagleplay.org/
> +* Hardware documentation: https://git.beagleboard.org/beagleplay/beagleplay
> +
> +Boot Flow:
> +----------
> +Below is the pictorial representation of boot flow:
> +
> +.. image:: img/boot_diagram_k3_current.svg
> +  :alt: Boot flow diagram
> +
> +- On this platform, 'TI Foundational Security' (TIFS) functions as the
> +  security enclave master while 'Device Manager' (DM), also known as the
> +  'TISCI server' in "TI terminology", offers all the essential services.
> +  The A53/M4F (Aux core) sends requests to TIFS/DM to accomplish these
> +  services, as illustrated in the diagram above.
> +
> +Sources:
> +--------
> +.. include::  k3.rst
> +    :start-after: .. k3_rst_include_start_boot_sources
> +    :end-before: .. k3_rst_include_end_boot_sources
> +
> +Build procedure:
> +----------------
> +0. Setup the environment variables:
> +
> +.. include::  k3.rst
> +    :start-after: .. k3_rst_include_start_common_env_vars_desc
> +    :end-before: .. k3_rst_include_end_common_env_vars_desc
> +
> +.. include::  k3.rst
> +    :start-after: .. k3_rst_include_start_board_env_vars_desc
> +    :end-before: .. k3_rst_include_end_board_env_vars_desc
> +
> +Set the variables corresponding to this platform:
> +
> +.. include::  k3.rst
> +    :start-after: .. k3_rst_include_start_common_env_vars_defn
> +    :end-before: .. k3_rst_include_end_common_env_vars_defn
> +.. code-block:: bash
> +
> + $ export UBOOT_CFG_CORTEXR="am62x_evm_r5_defconfig beagleplay_r5.config"
> + $ export UBOOT_CFG_CORTEXA="am62x_evm_a53_defconfig beagleplay_a53.config"
> + $ export TFA_BOARD=lite
> + $ # we dont use any extra TFA parameters
> + $ unset TFA_EXTRA_ARGS
> + $ export OPTEE_PLATFORM=k3-am62x
> + $ export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y"
> +
> +.. include::  am62x_sk.rst
> +    :start-after: .. am62x_evm_rst_include_start_build_steps
> +    :end-before: .. am62x_evm_rst_include_end_build_steps
> +
> +Target Images
> +--------------
> +Copy the below images to an SD card and boot:
> +
> +* tiboot3-am62x-gp-evm.bin from R5 build as tiboot3.bin
> +* tispl.bin_unsigned from Cortex-A build as tispl.bin
> +* u-boot.img_unsigned from Cortex-A build as uboot.img
> +
> +Image formats:
> +--------------
> +
> +- tiboot3.bin
> +
> +.. image:: img/multi_cert_tiboot3.bin.svg
> +  :alt: tiboot3.bin image format
> +
> +- tispl.bin
> +
> +.. image:: img/dm_tispl.bin.svg
> +  :alt: tispl.bin image format
> +
> +Flash to eMMC
> +-------------
> +
> +The eMMC layout selected is user-friendly for developers. The
> +boot hardware partition of the eMMC only contains the fixed-size
> +tiboot3.bin image. This is because the contents of the boot partitions
> +need to run from the SoC's internal SRAM, which remains a fixed size
> +constant. The other components of the boot sequence, such as tispl.bin
> +and u-boot.img, are located in the /BOOT partition in the User Defined
> +Area (UDA) hardware partition of the eMMC. These components can vary
> +significantly in size, so readjusting the boot partition offsets is
> +not practical.
> +
> +.. image:: img/beagleplay_emmc.svg
> +  :alt: eMMC partitions and boot file organization for BeaglePlay
> +
> +The following are the steps from Linux shell to program eMMC:
> +
> +.. code-block:: bash
> +
> +  # # Enable Boot0 boot
> +  # mmc bootpart enable 1 2 /dev/mmcblk0
> +  # mmc bootbus set single_backward x1 x8 /dev/mmcblk0
> +  # mmc hwreset enable /dev/mmcblk0
> +
> +  # # Clear eMMC boot0
> +  # echo '0' >> /sys/class/block/mmcblk0boot0/force_ro
> +  # dd if=/dev/zero of=/dev/mmcblk0boot0 count=32 bs=128k
> +  # # Write tiboot3.bin
> +  # dd if=tiboot3.bin of=/dev/mmcblk0boot0 bs=128k
> +
> +  # # Copy the rest of the boot binaries
> +  # mount /dev/mmcblk0p1 /boot/firmware
> +  # cp tispl.bin /boot/firmware
> +  # cp u-boot.img /boot/firmware
> +  # sync
> +
> +.. warning ::
> +
> +  The U-Boot is configured to prioritize booting from an SD card if
> +  it detects a valid boot partition and boot files on it, even if the
> +  system initially booted from eMMC. The boot order is set as follows:
> +
> +  * SD/MMC
> +  * eMMC
> +  * USB
> +  * PXE
> +
> +LED patterns during boot
> +------------------------
> +
> +.. list-table:: USR LED status indication
> +   :widths: 16 16
> +   :header-rows: 1
> +
> +   * - USR LEDs (012345)
> +     - Indicates
> +
> +   * - 00000
> +     - Boot failure or R5 image not started up
> +
> +   * - 11111
> +     - A53 SPL/U-boot has started up
> +
> +   * - 10101
> +     - OS boot process has been initiated
> +
> +   * - 01010
> +     - OS boot process failed and drops to U-Boot shell
> +
> +.. note ::
> +
> +  In the table above, 0 indicates LED switched off and 1 indicates LED
> +  switched ON.
> +
> +.. warning ::
> +
> +  If the "red" power LED is not glowing, the system power supply is not
> +  functional. Please refer to `BeaglePlay documentation
> +  <https://beagleplay.org/>`_ for further information.
> +
> +A53 SPL DDR Memory Layout
> +-------------------------
> +
> +.. include::  am62x_sk.rst
> +    :start-after: .. am62x_evm_rst_include_start_ddr_mem_layout
> +    :end-before: .. am62x_evm_rst_include_end_ddr_mem_layout
> +
> +Switch Setting for Boot Mode
> +----------------------------
> +
> +The boot time option is configured via "USR" button on the board.
> +See `Beagleplay Schematics <https://git.beagleboard.org/beagleplay/beagleplay/-/blob/main/BeaglePlay_sch.pdf>`_
> +for details.
> +
> +.. list-table:: Boot Modes
> +   :widths: 16 16 16
> +   :header-rows: 1
> +
> +   * - USR Switch Position
> +     - Primary Boot
> +     - Secondary Boot
> +
> +   * - Not Pressed
> +     - eMMC
> +     - UART
> +
> +   * - Pressed
> +     - SD/MMC File System (FS) mode
> +     - USB Device Firmware Upgrade (DFU) mode
> +
> +To switch to SD card boot mode, hold the USR button while powering on
> +with Type-C power supply, then release when power LED lights up.
> +
> +Debugging U-Boot
> +----------------
> +
> +See :ref:`Common Debugging environment - OpenOCD<k3_rst_refer_openocd>`: for
> +detailed setup and debugging information.
> +
> +.. warning::
> +
> +  **OpenOCD support since**: v0.12.0
> +
> +  If the default package version of OpenOCD in your development
> +  environment's distribution needs to be updated, it might be necessary to
> +  build OpenOCD from the source.
> +
> +.. include::  k3.rst
> +    :start-after: .. k3_rst_include_start_openocd_connect_tag_connect
> +    :end-before: .. k3_rst_include_end_openocd_connect_tag_connect
> +
> +.. include::  k3.rst
> +    :start-after: .. k3_rst_include_start_openocd_cfg_external_intro
> +    :end-before: .. k3_rst_include_end_openocd_cfg_external_intro
> +
> +For example, with BeaglePlay (AM62X platform), the openocd_connect.cfg:
> +
> +.. code-block:: tcl
> +
> +  # TUMPA example:
> +  # http://www.tiaowiki.com/w/TIAO_USB_Multi_Protocol_Adapter_User's_Manual
> +  source [find interface/ftdi/tumpa.cfg]
> +
> +  transport select jtag
> +
> +  # default JTAG configuration has only SRST and no TRST
> +  reset_config srst_only srst_push_pull
> +
> +  # delay after SRST goes inactive
> +  adapter srst delay 20
> +
> +  if { ![info exists SOC] } {
> +    # Set the SoC of interest
> +    set SOC am625
> +  }
> +
> +  source [find target/ti_k3.cfg]
> +
> +  ftdi tdo_sample_edge falling
> +
> +  # Speeds for FT2232H are in multiples of 2, and 32MHz is tops
> +  # max speed we seem to achieve is ~20MHz.. so we pick 16MHz
> +  adapter speed 16000
> diff --git a/doc/board/ti/img/beagleplay_emmc.svg b/doc/board/ti/img/beagleplay_emmc.svg
> new file mode 100644
> index 000000000000..2dec871d6fdd
> --- /dev/null
> +++ b/doc/board/ti/img/beagleplay_emmc.svg
> @@ -0,0 +1,697 @@
> +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
> +<!--SPDX-License-Identifier: GPL-2.0-or-later OR BSD-3-Clause-->
> +
> +<!--Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/-->
> +
> +<svg
> +   version="1.1"
> +   width="771px"
> +   height="351px"
> +   viewBox="-0.5 -0.5 771 351"
> +   id="svg142"
> +   sodipodi:docname="beagleplay_emmc.svg"
> +   inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
> +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
> +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
> +   xmlns:xlink="http://www.w3.org/1999/xlink"
> +   xmlns="http://www.w3.org/2000/svg"
> +   xmlns:svg="http://www.w3.org/2000/svg"
> +   xmlns:xhtml="http://www.w3.org/1999/xhtml">
> +  <sodipodi:namedview
> +     id="namedview144"
> +     pagecolor="#ffffff"
> +     bordercolor="#666666"
> +     borderopacity="1.0"
> +     inkscape:pageshadow="2"
> +     inkscape:pageopacity="0.0"
> +     inkscape:pagecheckerboard="0"
> +     showgrid="false"
> +     inkscape:zoom="1.460441"
> +     inkscape:cx="380.0222"
> +     inkscape:cy="175.28952"
> +     inkscape:window-width="3440"
> +     inkscape:window-height="1416"
> +     inkscape:window-x="0"
> +     inkscape:window-y="0"
> +     inkscape:window-maximized="1"
> +     inkscape:current-layer="g18" />
> +  <defs
> +     id="defs2" />
> +  <g
> +     id="g132">
> +    <rect
> +       x="90"
> +       y="0"
> +       width="120"
> +       height="60"
> +       fill="rgb(255, 255, 255)"
> +       stroke="rgb(0, 0, 0)"
> +       pointer-events="all"
> +       id="rect4" />
> +    <rect
> +       x="210"
> +       y="0"
> +       width="120"
> +       height="60"
> +       fill="rgb(255, 255, 255)"
> +       stroke="rgb(0, 0, 0)"
> +       pointer-events="all"
> +       id="rect6" />
> +    <rect
> +       x="330"
> +       y="0"
> +       width="120"
> +       height="60"
> +       fill="rgb(255, 255, 255)"
> +       stroke="rgb(0, 0, 0)"
> +       pointer-events="all"
> +       id="rect8" />
> +    <rect
> +       x="450"
> +       y="0"
> +       width="320"
> +       height="60"
> +       fill="rgb(255, 255, 255)"
> +       stroke="rgb(0, 0, 0)"
> +       pointer-events="all"
> +       id="rect10" />
> +    <rect
> +       x="120"
> +       y="15"
> +       width="60"
> +       height="30"
> +       fill="none"
> +       stroke="none"
> +       pointer-events="all"
> +       id="rect12" />
> +    <g
> +       transform="translate(-0.5 -0.5)"
> +       id="g18">
> +      <switch
> +         id="switch16">
> +        <foreignObject
> +           pointer-events="none"
> +           width="100%"
> +           height="100%"
> +           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
> +           style="overflow: visible; text-align: left;">
> +          <xhtml:div
> +             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 30px; margin-left: 121px;">
> +            <xhtml:div
> +               data-drawio-colors="color: rgb(0, 0, 0); "
> +               style="box-sizing: border-box; font-size: 0px; text-align: center;">
> +              <xhtml:div
> +                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Boot0</xhtml:div>
> +            </xhtml:div>
> +          </xhtml:div>
> +        </foreignObject>
> +        <text
> +           x="150"
> +           y="34"
> +           fill="#000000"
> +           font-family="Helvetica"
> +           font-size="12px"
> +           text-anchor="middle"
> +           id="text14">Boot0</text>
> +      </switch>
> +    </g>
> +    <rect
> +       x="240"
> +       y="15"
> +       width="60"
> +       height="30"
> +       fill="none"
> +       stroke="none"
> +       pointer-events="all"
> +       id="rect20" />
> +    <g
> +       transform="translate(-0.5 -0.5)"
> +       id="g26">
> +      <switch
> +         id="switch24">
> +        <foreignObject
> +           pointer-events="none"
> +           width="100%"
> +           height="100%"
> +           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
> +           style="overflow: visible; text-align: left;">
> +          <xhtml:div
> +             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 30px; margin-left: 241px;">
> +            <xhtml:div
> +               data-drawio-colors="color: rgb(0, 0, 0); "
> +               style="box-sizing: border-box; font-size: 0px; text-align: center;">
> +              <xhtml:div
> +                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Boot1</xhtml:div>
> +            </xhtml:div>
> +          </xhtml:div>
> +        </foreignObject>
> +        <text
> +           x="270"
> +           y="34"
> +           fill="rgb(0, 0, 0)"
> +           font-family="Helvetica"
> +           font-size="12px"
> +           text-anchor="middle"
> +           id="text22">Boot1</text>
> +      </switch>
> +    </g>
> +    <rect
> +       x="360"
> +       y="15"
> +       width="60"
> +       height="30"
> +       fill="none"
> +       stroke="none"
> +       pointer-events="all"
> +       id="rect28" />
> +    <g
> +       transform="translate(-0.5 -0.5)"
> +       id="g34">
> +      <switch
> +         id="switch32">
> +        <foreignObject
> +           pointer-events="none"
> +           width="100%"
> +           height="100%"
> +           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
> +           style="overflow: visible; text-align: left;">
> +          <xhtml:div
> +             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 30px; margin-left: 361px;">
> +            <xhtml:div
> +               data-drawio-colors="color: rgb(0, 0, 0); "
> +               style="box-sizing: border-box; font-size: 0px; text-align: center;">
> +              <xhtml:div
> +                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">RPMB</xhtml:div>
> +            </xhtml:div>
> +          </xhtml:div>
> +        </foreignObject>
> +        <text
> +           x="390"
> +           y="34"
> +           fill="rgb(0, 0, 0)"
> +           font-family="Helvetica"
> +           font-size="12px"
> +           text-anchor="middle"
> +           id="text30">RPMB</text>
> +      </switch>
> +    </g>
> +    <rect
> +       x="480"
> +       y="15"
> +       width="280"
> +       height="30"
> +       fill="none"
> +       stroke="none"
> +       pointer-events="all"
> +       id="rect36" />
> +    <g
> +       transform="translate(-0.5 -0.5)"
> +       id="g42">
> +      <switch
> +         id="switch40">
> +        <foreignObject
> +           pointer-events="none"
> +           width="100%"
> +           height="100%"
> +           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
> +           style="overflow: visible; text-align: left;">
> +          <xhtml:div
> +             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 278px; height: 1px; padding-top: 30px; margin-left: 481px;">
> +            <xhtml:div
> +               data-drawio-colors="color: rgb(0, 0, 0); "
> +               style="box-sizing: border-box; font-size: 0px; text-align: center;">
> +              <xhtml:div
> +                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">User Defined Area (UDA)</xhtml:div>
> +            </xhtml:div>
> +          </xhtml:div>
> +        </foreignObject>
> +        <text
> +           x="620"
> +           y="34"
> +           fill="rgb(0, 0, 0)"
> +           font-family="Helvetica"
> +           font-size="12px"
> +           text-anchor="middle"
> +           id="text38">User Defined Area (UDA)</text>
> +      </switch>
> +    </g>
> +    <rect
> +       x="450"
> +       y="60"
> +       width="70"
> +       height="60"
> +       rx="9"
> +       ry="9"
> +       fill="rgb(255, 255, 255)"
> +       stroke="rgb(0, 0, 0)"
> +       pointer-events="all"
> +       id="rect44" />
> +    <g
> +       transform="translate(-0.5 -0.5)"
> +       id="g50">
> +      <switch
> +         id="switch48">
> +        <foreignObject
> +           pointer-events="none"
> +           width="100%"
> +           height="100%"
> +           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
> +           style="overflow: visible; text-align: left;">
> +          <xhtml:div
> +             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 68px; height: 1px; padding-top: 90px; margin-left: 451px;">
> +            <xhtml:div
> +               data-drawio-colors="color: rgb(0, 0, 0); "
> +               style="box-sizing: border-box; font-size: 0px; text-align: center;">
> +              <xhtml:div
> +                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">BOOT</xhtml:div>
> +            </xhtml:div>
> +          </xhtml:div>
> +        </foreignObject>
> +        <text
> +           x="485"
> +           y="94"
> +           fill="rgb(0, 0, 0)"
> +           font-family="Helvetica"
> +           font-size="12px"
> +           text-anchor="middle"
> +           id="text46">BOOT</text>
> +      </switch>
> +    </g>
> +    <rect
> +       x="520"
> +       y="60"
> +       width="120"
> +       height="60"
> +       rx="9"
> +       ry="9"
> +       fill="rgb(255, 255, 255)"
> +       stroke="rgb(0, 0, 0)"
> +       pointer-events="all"
> +       id="rect52" />
> +    <g
> +       transform="translate(-0.5 -0.5)"
> +       id="g58">
> +      <switch
> +         id="switch56">
> +        <foreignObject
> +           pointer-events="none"
> +           width="100%"
> +           height="100%"
> +           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
> +           style="overflow: visible; text-align: left;">
> +          <xhtml:div
> +             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 90px; margin-left: 521px;">
> +            <xhtml:div
> +               data-drawio-colors="color: rgb(0, 0, 0); "
> +               style="box-sizing: border-box; font-size: 0px; text-align: center;">
> +              <xhtml:div
> +                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">rootfs</xhtml:div>
> +            </xhtml:div>
> +          </xhtml:div>
> +        </foreignObject>
> +        <text
> +           x="580"
> +           y="94"
> +           fill="rgb(0, 0, 0)"
> +           font-family="Helvetica"
> +           font-size="12px"
> +           text-anchor="middle"
> +           id="text54">rootfs</text>
> +      </switch>
> +    </g>
> +    <rect
> +       x="700"
> +       y="60"
> +       width="70"
> +       height="60"
> +       rx="9"
> +       ry="9"
> +       fill="rgb(255, 255, 255)"
> +       stroke="rgb(0, 0, 0)"
> +       pointer-events="all"
> +       id="rect60" />
> +    <g
> +       transform="translate(-0.5 -0.5)"
> +       id="g66">
> +      <switch
> +         id="switch64">
> +        <foreignObject
> +           pointer-events="none"
> +           width="100%"
> +           height="100%"
> +           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
> +           style="overflow: visible; text-align: left;">
> +          <xhtml:div
> +             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 68px; height: 1px; padding-top: 90px; margin-left: 701px;">
> +            <xhtml:div
> +               data-drawio-colors="color: rgb(0, 0, 0); "
> +               style="box-sizing: border-box; font-size: 0px; text-align: center;">
> +              <xhtml:div
> +                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">swap</xhtml:div>
> +            </xhtml:div>
> +          </xhtml:div>
> +        </foreignObject>
> +        <text
> +           x="735"
> +           y="94"
> +           fill="rgb(0, 0, 0)"
> +           font-family="Helvetica"
> +           font-size="12px"
> +           text-anchor="middle"
> +           id="text62">swap</text>
> +      </switch>
> +    </g>
> +    <rect
> +       x="640"
> +       y="60"
> +       width="60"
> +       height="60"
> +       rx="9"
> +       ry="9"
> +       fill="rgb(255, 255, 255)"
> +       stroke="rgb(0, 0, 0)"
> +       pointer-events="all"
> +       id="rect68" />
> +    <g
> +       transform="translate(-0.5 -0.5)"
> +       id="g74">
> +      <switch
> +         id="switch72">
> +        <foreignObject
> +           pointer-events="none"
> +           width="100%"
> +           height="100%"
> +           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
> +           style="overflow: visible; text-align: left;">
> +          <xhtml:div
> +             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 90px; margin-left: 641px;">
> +            <xhtml:div
> +               data-drawio-colors="color: rgb(0, 0, 0); "
> +               style="box-sizing: border-box; font-size: 0px; text-align: center;">
> +              <xhtml:div
> +                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">...</xhtml:div>
> +            </xhtml:div>
> +          </xhtml:div>
> +        </foreignObject>
> +        <text
> +           x="670"
> +           y="94"
> +           fill="rgb(0, 0, 0)"
> +           font-family="Helvetica"
> +           font-size="12px"
> +           text-anchor="middle"
> +           id="text70">...</text>
> +      </switch>
> +    </g>
> +    <path
> +       d="M 130 130 L 180 130 L 180 180 L 100 180 L 100 160 Z"
> +       fill="#f8cecc"
> +       stroke="#b85450"
> +       stroke-miterlimit="10"
> +       pointer-events="all"
> +       id="path76" />
> +    <g
> +       transform="translate(-0.5 -0.5)"
> +       id="g82">
> +      <switch
> +         id="switch80">
> +        <foreignObject
> +           pointer-events="none"
> +           width="100%"
> +           height="100%"
> +           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
> +           style="overflow: visible; text-align: left;">
> +          <xhtml:div
> +             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 155px; margin-left: 101px;">
> +            <xhtml:div
> +               data-drawio-colors="color: rgb(0, 0, 0); "
> +               style="box-sizing: border-box; font-size: 0px; text-align: center;">
> +              <xhtml:div
> +                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">tiboot3.bin</xhtml:div>
> +            </xhtml:div>
> +          </xhtml:div>
> +        </foreignObject>
> +        <text
> +           x="140"
> +           y="159"
> +           fill="rgb(0, 0, 0)"
> +           font-family="Helvetica"
> +           font-size="12px"
> +           text-anchor="middle"
> +           id="text78">tiboot3.bin</text>
> +      </switch>
> +    </g>
> +    <path
> +       d="M 470 130 L 520 130 L 520 180 L 440 180 L 440 160 Z"
> +       fill="#d5e8d4"
> +       stroke="#82b366"
> +       stroke-miterlimit="10"
> +       pointer-events="all"
> +       id="path84" />
> +    <g
> +       transform="translate(-0.5 -0.5)"
> +       id="g90">
> +      <switch
> +         id="switch88">
> +        <foreignObject
> +           pointer-events="none"
> +           width="100%"
> +           height="100%"
> +           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
> +           style="overflow: visible; text-align: left;">
> +          <xhtml:div
> +             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 155px; margin-left: 441px;">
> +            <xhtml:div
> +               data-drawio-colors="color: rgb(0, 0, 0); "
> +               style="box-sizing: border-box; font-size: 0px; text-align: center;">
> +              <xhtml:div
> +                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">tispl.bin</xhtml:div>
> +            </xhtml:div>
> +          </xhtml:div>
> +        </foreignObject>
> +        <text
> +           x="480"
> +           y="159"
> +           fill="rgb(0, 0, 0)"
> +           font-family="Helvetica"
> +           font-size="12px"
> +           text-anchor="middle"
> +           id="text86">tispl.bin</text>
> +      </switch>
> +    </g>
> +    <path
> +       d="M 470 180 L 520 180 L 520 230 L 440 230 L 440 210 Z"
> +       fill="#d5e8d4"
> +       stroke="#82b366"
> +       stroke-miterlimit="10"
> +       pointer-events="all"
> +       id="path92" />
> +    <g
> +       transform="translate(-0.5 -0.5)"
> +       id="g98">
> +      <switch
> +         id="switch96">
> +        <foreignObject
> +           pointer-events="none"
> +           width="100%"
> +           height="100%"
> +           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
> +           style="overflow: visible; text-align: left;">
> +          <xhtml:div
> +             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 205px; margin-left: 441px;">
> +            <xhtml:div
> +               data-drawio-colors="color: rgb(0, 0, 0); "
> +               style="box-sizing: border-box; font-size: 0px; text-align: center;">
> +              <xhtml:div
> +                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">u-boot.img</xhtml:div>
> +            </xhtml:div>
> +          </xhtml:div>
> +        </foreignObject>
> +        <text
> +           x="480"
> +           y="209"
> +           fill="rgb(0, 0, 0)"
> +           font-family="Helvetica"
> +           font-size="12px"
> +           text-anchor="middle"
> +           id="text94">u-boot.img</text>
> +      </switch>
> +    </g>
> +    <path
> +       d="M 420 300 L 520 300 L 520 350 L 390 350 L 390 330 Z"
> +       fill="#e1d5e7"
> +       stroke="#9673a6"
> +       stroke-miterlimit="10"
> +       pointer-events="all"
> +       id="path100" />
> +    <g
> +       transform="translate(-0.5 -0.5)"
> +       id="g106">
> +      <switch
> +         id="switch104">
> +        <foreignObject
> +           pointer-events="none"
> +           width="100%"
> +           height="100%"
> +           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
> +           style="overflow: visible; text-align: left;">
> +          <xhtml:div
> +             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 128px; height: 1px; padding-top: 325px; margin-left: 391px;">
> +            <xhtml:div
> +               data-drawio-colors="color: rgb(0, 0, 0); "
> +               style="box-sizing: border-box; font-size: 0px; text-align: center;">
> +              <xhtml:div
> +                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">extlinux/extlinux.conf</xhtml:div>
> +            </xhtml:div>
> +          </xhtml:div>
> +        </foreignObject>
> +        <text
> +           x="455"
> +           y="329"
> +           fill="rgb(0, 0, 0)"
> +           font-family="Helvetica"
> +           font-size="12px"
> +           text-anchor="middle"
> +           id="text102">extlinux/extlinux.conf</text>
> +      </switch>
> +    </g>
> +    <path
> +       d="M 420 240 L 520 240 L 520 290 L 390 290 L 390 270 Z"
> +       fill="#dae8fc"
> +       stroke="#6c8ebf"
> +       stroke-miterlimit="10"
> +       pointer-events="all"
> +       id="path108" />
> +    <g
> +       transform="translate(-0.5 -0.5)"
> +       id="g114">
> +      <switch
> +         id="switch112">
> +        <foreignObject
> +           pointer-events="none"
> +           width="100%"
> +           height="100%"
> +           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
> +           style="overflow: visible; text-align: left;">
> +          <xhtml:div
> +             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 128px; height: 1px; padding-top: 265px; margin-left: 391px;">
> +            <xhtml:div
> +               data-drawio-colors="color: rgb(0, 0, 0); "
> +               style="box-sizing: border-box; font-size: 0px; text-align: center;">
> +              <xhtml:div
> +                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">uEnv.txt / boot.scr<xhtml:br />
> +(optional)</xhtml:div>
> +            </xhtml:div>
> +          </xhtml:div>
> +        </foreignObject>
> +        <text
> +           x="455"
> +           y="269"
> +           fill="rgb(0, 0, 0)"
> +           font-family="Helvetica"
> +           font-size="12px"
> +           text-anchor="middle"
> +           id="text110">uEnv.txt / boot.scr...</text>
> +      </switch>
> +    </g>
> +    <rect
> +       x="0"
> +       y="15"
> +       width="60"
> +       height="30"
> +       fill="none"
> +       stroke="none"
> +       pointer-events="all"
> +       id="rect116" />
> +    <g
> +       transform="translate(-0.5 -0.5)"
> +       id="g122">
> +      <switch
> +         id="switch120">
> +        <foreignObject
> +           pointer-events="none"
> +           width="100%"
> +           height="100%"
> +           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
> +           style="overflow: visible; text-align: left;">
> +          <xhtml:div
> +             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 30px; margin-left: 1px;">
> +            <xhtml:div
> +               data-drawio-colors="color: rgb(0, 0, 0); "
> +               style="box-sizing: border-box; font-size: 0px; text-align: center;">
> +              <xhtml:div
> +                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">eMMC<xhtml:br />
> +hardware partitions</xhtml:div>
> +            </xhtml:div>
> +          </xhtml:div>
> +        </foreignObject>
> +        <text
> +           x="30"
> +           y="34"
> +           fill="rgb(0, 0, 0)"
> +           font-family="Helvetica"
> +           font-size="12px"
> +           text-anchor="middle"
> +           id="text118">eMMC...</text>
> +      </switch>
> +    </g>
> +    <rect
> +       x="365"
> +       y="75"
> +       width="60"
> +       height="30"
> +       fill="none"
> +       stroke="none"
> +       pointer-events="all"
> +       id="rect124" />
> +    <g
> +       transform="translate(-0.5 -0.5)"
> +       id="g130">
> +      <switch
> +         id="switch128">
> +        <foreignObject
> +           pointer-events="none"
> +           width="100%"
> +           height="100%"
> +           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
> +           style="overflow: visible; text-align: left;">
> +          <xhtml:div
> +             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 90px; margin-left: 366px;">
> +            <xhtml:div
> +               data-drawio-colors="color: rgb(0, 0, 0); "
> +               style="box-sizing: border-box; font-size: 0px; text-align: center;">
> +              <xhtml:div
> +                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">UDA partitions</xhtml:div>
> +            </xhtml:div>
> +          </xhtml:div>
> +        </foreignObject>
> +        <text
> +           x="395"
> +           y="94"
> +           fill="rgb(0, 0, 0)"
> +           font-family="Helvetica"
> +           font-size="12px"
> +           text-anchor="middle"
> +           id="text126">UDA partit...</text>
> +      </switch>
> +    </g>
> +  </g>
> +  <switch
> +     id="switch140">
> +    <g
> +       requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
> +       id="g134" />
> +    <a
> +       transform="translate(0,-5)"
> +       xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems"
> +       target="_blank"
> +       id="a138">
> +      <text
> +         text-anchor="middle"
> +         font-size="10px"
> +         x="50%"
> +         y="100%"
> +         id="text136">Text is not SVG - cannot display</text>
> +    </a>
> +  </switch>
> +</svg>
> diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst
> index 5f9bd4dfcbe9..ef31ccd12a42 100644
> --- a/doc/board/ti/k3.rst
> +++ b/doc/board/ti/k3.rst
> @@ -30,6 +30,7 @@ K3 Based SoCs
>  .. toctree::
>     :maxdepth: 1
>  
> +   am62x_beagleplay
>     am62x_sk
>     ../toradex/verdin-am62
>     am64x_evm
> -- 
> 2.40.0
Simon Glass Aug. 23, 2023, 3:30 p.m. UTC | #2
Hi Nishanth,

On Tue, 22 Aug 2023 at 12:43, Nishanth Menon <nm@ti.com> wrote:
>
> Add base documentation for BeaglePlay
>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
> Cc: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
>
> Changes Since V3:
> * Updated documentation to give a more clear overview of MMC partitions
>   and flashing information.
> * Added OpenOCD debug documentation
> * Added LED status information and indication of various boot stages
>
> V3: https://lore.kernel.org/all/20230815164440.2713726-5-nm@ti.com/
> V2: https://lore.kernel.org/u-boot/20230727234446.3651836-5-nm@ti.com/
> V1: https://lore.kernel.org/all/20230725185253.2123433-7-nm@ti.com/
>
>  doc/board/ti/am62x_beagleplay.rst    | 256 ++++++++++
>  doc/board/ti/img/beagleplay_emmc.svg | 697 +++++++++++++++++++++++++++
>  doc/board/ti/k3.rst                  |   1 +
>  3 files changed, 954 insertions(+)
>  create mode 100644 doc/board/ti/am62x_beagleplay.rst
>  create mode 100644 doc/board/ti/img/beagleplay_emmc.svg
>

Great docs, an example to others.

Some nits below.

The bigger problem is that we cannot build this with buildman since it
needs config fragments and we don't have a way to describe them. In
fact none of my existing flows can build this board and it breaks all
my scripts, etc.

I don't think anyone else sees this as a problem?

Anyway, I'll send a separate email on the topic.

> diff --git a/doc/board/ti/am62x_beagleplay.rst b/doc/board/ti/am62x_beagleplay.rst
> new file mode 100644
> index 000000000000..5adb7b4c9ace
> --- /dev/null
> +++ b/doc/board/ti/am62x_beagleplay.rst
> @@ -0,0 +1,256 @@
> +.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
> +.. sectionauthor:: Nishanth Menon <nm@ti.com>
> +
> +AM62x Beagleboard.org Beagleplay
> +================================
> +
> +Introduction:
> +-------------
> +
> +BeagleBoard.org BeaglePlay is an easy to use, affordable open source
> +hardware single board computer based on the Texas Instruments AM625
> +SoC that allows you to create connected devices that work even at long
> +distances using IEEE 802.15.4g LR-WPAN and IEEE 802.3cg 10Base-T1L.
> +Expansion is provided over open standards based mikroBUS, Grove and
> +QWIIC headers among other interfaces.
> +
> +Further information can be found at:
> +
> +* Product Page: https://beagleplay.org/
> +* Hardware documentation: https://git.beagleboard.org/beagleplay/beagleplay
> +
> +Boot Flow:
> +----------
> +Below is the pictorial representation of boot flow:
> +
> +.. image:: img/boot_diagram_k3_current.svg
> +  :alt: Boot flow diagram
> +
> +- On this platform, 'TI Foundational Security' (TIFS) functions as the
> +  security enclave master while 'Device Manager' (DM), also known as the
> +  'TISCI server' in "TI terminology", offers all the essential services.
> +  The A53/M4F (Aux core) sends requests to TIFS/DM to accomplish these
> +  services, as illustrated in the diagram above.
> +
> +Sources:
> +--------
> +.. include::  k3.rst
> +    :start-after: .. k3_rst_include_start_boot_sources
> +    :end-before: .. k3_rst_include_end_boot_sources
> +
> +Build procedure:
> +----------------
> +0. Setup the environment variables:
> +
> +.. include::  k3.rst
> +    :start-after: .. k3_rst_include_start_common_env_vars_desc
> +    :end-before: .. k3_rst_include_end_common_env_vars_desc
> +
> +.. include::  k3.rst
> +    :start-after: .. k3_rst_include_start_board_env_vars_desc
> +    :end-before: .. k3_rst_include_end_board_env_vars_desc
> +
> +Set the variables corresponding to this platform:
> +
> +.. include::  k3.rst
> +    :start-after: .. k3_rst_include_start_common_env_vars_defn
> +    :end-before: .. k3_rst_include_end_common_env_vars_defn
> +.. code-block:: bash
> +
> + $ export UBOOT_CFG_CORTEXR="am62x_evm_r5_defconfig beagleplay_r5.config"
> + $ export UBOOT_CFG_CORTEXA="am62x_evm_a53_defconfig beagleplay_a53.config"

Can you drop those two variables? It seems to just confuse the matter.
They are only used once. We are used to seeing a 'defconfig' target
when configuring, and this just obfuscates things.


> + $ export TFA_BOARD=lite
> + $ # we dont use any extra TFA parameters
> + $ unset TFA_EXTRA_ARGS
> + $ export OPTEE_PLATFORM=k3-am62x
> + $ export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y"
> +
> +.. include::  am62x_sk.rst
> +    :start-after: .. am62x_evm_rst_include_start_build_steps
> +    :end-before: .. am62x_evm_rst_include_end_build_steps
> +
> +Target Images
> +--------------
> +Copy the below images to an SD card and boot:
> +
> +* tiboot3-am62x-gp-evm.bin from R5 build as tiboot3.bin
> +* tispl.bin_unsigned from Cortex-A build as tispl.bin
> +* u-boot.img_unsigned from Cortex-A build as uboot.img
> +
> +Image formats:
> +--------------
> +
> +- tiboot3.bin
> +
> +.. image:: img/multi_cert_tiboot3.bin.svg
> +  :alt: tiboot3.bin image format
> +
> +- tispl.bin
> +
> +.. image:: img/dm_tispl.bin.svg
> +  :alt: tispl.bin image format
> +
> +Flash to eMMC
> +-------------
> +
> +The eMMC layout selected is user-friendly for developers. The
> +boot hardware partition of the eMMC only contains the fixed-size
> +tiboot3.bin image. This is because the contents of the boot partitions
> +need to run from the SoC's internal SRAM, which remains a fixed size
> +constant. The other components of the boot sequence, such as tispl.bin
> +and u-boot.img, are located in the /BOOT partition in the User Defined
> +Area (UDA) hardware partition of the eMMC. These components can vary
> +significantly in size, so readjusting the boot partition offsets is
> +not practical.
> +
> +.. image:: img/beagleplay_emmc.svg
> +  :alt: eMMC partitions and boot file organization for BeaglePlay
> +
> +The following are the steps from Linux shell to program eMMC:
> +
> +.. code-block:: bash
> +
> +  # # Enable Boot0 boot
> +  # mmc bootpart enable 1 2 /dev/mmcblk0
> +  # mmc bootbus set single_backward x1 x8 /dev/mmcblk0
> +  # mmc hwreset enable /dev/mmcblk0
> +
> +  # # Clear eMMC boot0
> +  # echo '0' >> /sys/class/block/mmcblk0boot0/force_ro
> +  # dd if=/dev/zero of=/dev/mmcblk0boot0 count=32 bs=128k
> +  # # Write tiboot3.bin
> +  # dd if=tiboot3.bin of=/dev/mmcblk0boot0 bs=128k
> +
> +  # # Copy the rest of the boot binaries
> +  # mount /dev/mmcblk0p1 /boot/firmware
> +  # cp tispl.bin /boot/firmware
> +  # cp u-boot.img /boot/firmware
> +  # sync
> +
> +.. warning ::
> +
> +  The U-Boot is configured to prioritize booting from an SD card if

U-Boot is configured

> +  it detects a valid boot partition and boot files on it, even if the
> +  system initially booted from eMMC. The boot order is set as follows:
> +
> +  * SD/MMC
> +  * eMMC
> +  * USB
> +  * PXE
> +
[..]

Regards,
Simon
Tom Rini Aug. 23, 2023, 5:15 p.m. UTC | #3
On Wed, Aug 23, 2023 at 09:30:31AM -0600, Simon Glass wrote:
> Hi Nishanth,
> 
> On Tue, 22 Aug 2023 at 12:43, Nishanth Menon <nm@ti.com> wrote:
> >
> > Add base documentation for BeaglePlay
> >
> > Signed-off-by: Nishanth Menon <nm@ti.com>
> > ---
> > Cc: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> >
> > Changes Since V3:
> > * Updated documentation to give a more clear overview of MMC partitions
> >   and flashing information.
> > * Added OpenOCD debug documentation
> > * Added LED status information and indication of various boot stages
> >
> > V3: https://lore.kernel.org/all/20230815164440.2713726-5-nm@ti.com/
> > V2: https://lore.kernel.org/u-boot/20230727234446.3651836-5-nm@ti.com/
> > V1: https://lore.kernel.org/all/20230725185253.2123433-7-nm@ti.com/
> >
> >  doc/board/ti/am62x_beagleplay.rst    | 256 ++++++++++
> >  doc/board/ti/img/beagleplay_emmc.svg | 697 +++++++++++++++++++++++++++
> >  doc/board/ti/k3.rst                  |   1 +
> >  3 files changed, 954 insertions(+)
> >  create mode 100644 doc/board/ti/am62x_beagleplay.rst
> >  create mode 100644 doc/board/ti/img/beagleplay_emmc.svg
> >
> 
> Great docs, an example to others.
> 
> Some nits below.
> 
> The bigger problem is that we cannot build this with buildman since it
> needs config fragments and we don't have a way to describe them. In
> fact none of my existing flows can build this board and it breaks all
> my scripts, etc.
> 
> I don't think anyone else sees this as a problem?
> 
> Anyway, I'll send a separate email on the topic.
> 
> > diff --git a/doc/board/ti/am62x_beagleplay.rst b/doc/board/ti/am62x_beagleplay.rst
> > new file mode 100644
> > index 000000000000..5adb7b4c9ace
> > --- /dev/null
> > +++ b/doc/board/ti/am62x_beagleplay.rst
> > @@ -0,0 +1,256 @@
> > +.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
> > +.. sectionauthor:: Nishanth Menon <nm@ti.com>
> > +
> > +AM62x Beagleboard.org Beagleplay
> > +================================
> > +
> > +Introduction:
> > +-------------
> > +
> > +BeagleBoard.org BeaglePlay is an easy to use, affordable open source
> > +hardware single board computer based on the Texas Instruments AM625
> > +SoC that allows you to create connected devices that work even at long
> > +distances using IEEE 802.15.4g LR-WPAN and IEEE 802.3cg 10Base-T1L.
> > +Expansion is provided over open standards based mikroBUS, Grove and
> > +QWIIC headers among other interfaces.
> > +
> > +Further information can be found at:
> > +
> > +* Product Page: https://beagleplay.org/
> > +* Hardware documentation: https://git.beagleboard.org/beagleplay/beagleplay
> > +
> > +Boot Flow:
> > +----------
> > +Below is the pictorial representation of boot flow:
> > +
> > +.. image:: img/boot_diagram_k3_current.svg
> > +  :alt: Boot flow diagram
> > +
> > +- On this platform, 'TI Foundational Security' (TIFS) functions as the
> > +  security enclave master while 'Device Manager' (DM), also known as the
> > +  'TISCI server' in "TI terminology", offers all the essential services.
> > +  The A53/M4F (Aux core) sends requests to TIFS/DM to accomplish these
> > +  services, as illustrated in the diagram above.
> > +
> > +Sources:
> > +--------
> > +.. include::  k3.rst
> > +    :start-after: .. k3_rst_include_start_boot_sources
> > +    :end-before: .. k3_rst_include_end_boot_sources
> > +
> > +Build procedure:
> > +----------------
> > +0. Setup the environment variables:
> > +
> > +.. include::  k3.rst
> > +    :start-after: .. k3_rst_include_start_common_env_vars_desc
> > +    :end-before: .. k3_rst_include_end_common_env_vars_desc
> > +
> > +.. include::  k3.rst
> > +    :start-after: .. k3_rst_include_start_board_env_vars_desc
> > +    :end-before: .. k3_rst_include_end_board_env_vars_desc
> > +
> > +Set the variables corresponding to this platform:
> > +
> > +.. include::  k3.rst
> > +    :start-after: .. k3_rst_include_start_common_env_vars_defn
> > +    :end-before: .. k3_rst_include_end_common_env_vars_defn
> > +.. code-block:: bash
> > +
> > + $ export UBOOT_CFG_CORTEXR="am62x_evm_r5_defconfig beagleplay_r5.config"
> > + $ export UBOOT_CFG_CORTEXA="am62x_evm_a53_defconfig beagleplay_a53.config"
> 
> Can you drop those two variables? It seems to just confuse the matter.
> They are only used once. We are used to seeing a 'defconfig' target
> when configuring, and this just obfuscates things.

This is how we have a common bit of rST for how to build N boards,
without having to do a literal copy and paste N times.
Simon Glass Aug. 23, 2023, 11:57 p.m. UTC | #4
Hi Tom,

On Wed, 23 Aug 2023 at 11:15, Tom Rini <trini@konsulko.com> wrote:
>
> On Wed, Aug 23, 2023 at 09:30:31AM -0600, Simon Glass wrote:
> > Hi Nishanth,
> >
> > On Tue, 22 Aug 2023 at 12:43, Nishanth Menon <nm@ti.com> wrote:
> > >
> > > Add base documentation for BeaglePlay
> > >
> > > Signed-off-by: Nishanth Menon <nm@ti.com>
> > > ---
> > > Cc: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> > >
> > > Changes Since V3:
> > > * Updated documentation to give a more clear overview of MMC partitions
> > >   and flashing information.
> > > * Added OpenOCD debug documentation
> > > * Added LED status information and indication of various boot stages
> > >
> > > V3: https://lore.kernel.org/all/20230815164440.2713726-5-nm@ti.com/
> > > V2: https://lore.kernel.org/u-boot/20230727234446.3651836-5-nm@ti.com/
> > > V1: https://lore.kernel.org/all/20230725185253.2123433-7-nm@ti.com/
> > >
> > >  doc/board/ti/am62x_beagleplay.rst    | 256 ++++++++++
> > >  doc/board/ti/img/beagleplay_emmc.svg | 697 +++++++++++++++++++++++++++
> > >  doc/board/ti/k3.rst                  |   1 +
> > >  3 files changed, 954 insertions(+)
> > >  create mode 100644 doc/board/ti/am62x_beagleplay.rst
> > >  create mode 100644 doc/board/ti/img/beagleplay_emmc.svg
> > >
> >
> > Great docs, an example to others.
> >
> > Some nits below.
> >
> > The bigger problem is that we cannot build this with buildman since it
> > needs config fragments and we don't have a way to describe them. In
> > fact none of my existing flows can build this board and it breaks all
> > my scripts, etc.
> >
> > I don't think anyone else sees this as a problem?
> >
> > Anyway, I'll send a separate email on the topic.
> >
> > > diff --git a/doc/board/ti/am62x_beagleplay.rst b/doc/board/ti/am62x_beagleplay.rst
> > > new file mode 100644
> > > index 000000000000..5adb7b4c9ace
> > > --- /dev/null
> > > +++ b/doc/board/ti/am62x_beagleplay.rst
> > > @@ -0,0 +1,256 @@
> > > +.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
> > > +.. sectionauthor:: Nishanth Menon <nm@ti.com>
> > > +
> > > +AM62x Beagleboard.org Beagleplay
> > > +================================
> > > +
> > > +Introduction:
> > > +-------------
> > > +
> > > +BeagleBoard.org BeaglePlay is an easy to use, affordable open source
> > > +hardware single board computer based on the Texas Instruments AM625
> > > +SoC that allows you to create connected devices that work even at long
> > > +distances using IEEE 802.15.4g LR-WPAN and IEEE 802.3cg 10Base-T1L.
> > > +Expansion is provided over open standards based mikroBUS, Grove and
> > > +QWIIC headers among other interfaces.
> > > +
> > > +Further information can be found at:
> > > +
> > > +* Product Page: https://beagleplay.org/
> > > +* Hardware documentation: https://git.beagleboard.org/beagleplay/beagleplay
> > > +
> > > +Boot Flow:
> > > +----------
> > > +Below is the pictorial representation of boot flow:
> > > +
> > > +.. image:: img/boot_diagram_k3_current.svg
> > > +  :alt: Boot flow diagram
> > > +
> > > +- On this platform, 'TI Foundational Security' (TIFS) functions as the
> > > +  security enclave master while 'Device Manager' (DM), also known as the
> > > +  'TISCI server' in "TI terminology", offers all the essential services.
> > > +  The A53/M4F (Aux core) sends requests to TIFS/DM to accomplish these
> > > +  services, as illustrated in the diagram above.
> > > +
> > > +Sources:
> > > +--------
> > > +.. include::  k3.rst
> > > +    :start-after: .. k3_rst_include_start_boot_sources
> > > +    :end-before: .. k3_rst_include_end_boot_sources
> > > +
> > > +Build procedure:
> > > +----------------
> > > +0. Setup the environment variables:
> > > +
> > > +.. include::  k3.rst
> > > +    :start-after: .. k3_rst_include_start_common_env_vars_desc
> > > +    :end-before: .. k3_rst_include_end_common_env_vars_desc
> > > +
> > > +.. include::  k3.rst
> > > +    :start-after: .. k3_rst_include_start_board_env_vars_desc
> > > +    :end-before: .. k3_rst_include_end_board_env_vars_desc
> > > +
> > > +Set the variables corresponding to this platform:
> > > +
> > > +.. include::  k3.rst
> > > +    :start-after: .. k3_rst_include_start_common_env_vars_defn
> > > +    :end-before: .. k3_rst_include_end_common_env_vars_defn
> > > +.. code-block:: bash
> > > +
> > > + $ export UBOOT_CFG_CORTEXR="am62x_evm_r5_defconfig beagleplay_r5.config"
> > > + $ export UBOOT_CFG_CORTEXA="am62x_evm_a53_defconfig beagleplay_a53.config"
> >
> > Can you drop those two variables? It seems to just confuse the matter.
> > They are only used once. We are used to seeing a 'defconfig' target
> > when configuring, and this just obfuscates things.
>
> This is how we have a common bit of rST for how to build N boards,
> without having to do a literal copy and paste N times.

How about using this?

https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#substitution-definitions

Regards,
Simon
Nishanth Menon Aug. 24, 2023, 12:18 a.m. UTC | #5
On 17:57-20230823, Simon Glass wrote:
[...]
> > This is how we have a common bit of rST for how to build N boards,
> > without having to do a literal copy and paste N times.
> 
> How about using this?
> 
> https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#substitution-definitions

I was not able to succeed with complex includes such as:
https://github.com/u-boot/u-boot/blob/master/doc/board/ti/am62x_sk.rst?plain=1#L89

am62x complete build procedure defined once and reused in other am62x
platforms.. But the am62x build procedure itself is reused from common
k3 build steps.
Simon Glass Aug. 24, 2023, 3:01 a.m. UTC | #6
Hi Nishanth,

On Wed, 23 Aug 2023 at 18:18, Nishanth Menon <nm@ti.com> wrote:
>
> On 17:57-20230823, Simon Glass wrote:
> [...]
> > > This is how we have a common bit of rST for how to build N boards,
> > > without having to do a literal copy and paste N times.
> >
> > How about using this?
> >
> > https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#substitution-definitions
>
> I was not able to succeed with complex includes such as:
> https://github.com/u-boot/u-boot/blob/master/doc/board/ti/am62x_sk.rst?plain=1#L89
>
> am62x complete build procedure defined once and reused in other am62x
> platforms.. But the am62x build procedure itself is reused from common
> k3 build steps.

I followed through these instructions. I find the env vars quite
confusing, since I don't really know what it is doing. It feels like a
script:

do $a $b $c
do $f $e

it is pretty hard to follow. I think it would be better to write
everything out in full for each board, like rockchip does.

Some other minor feedback:

- The 'make' lines should really have -j $(nproc) added
- The $ signs at the start of each command in the docs are a pain
since it stops me copying the commands into the terminal - can you
remove them?
- It doesn't build for me:

  BINMAN  .binman_stamp
Image 'ti-dm' is missing external blobs and is non-functional: blob-ext

/binman/ti-dm/blob-ext (ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f):
   Missing blob

Some images are invalid
make[1]: *** [/scratch/sglass/cosarm/src/third_party/u-boot/files/Makefile:1115:
.binman_stamp] Error 103
make[1]: Leaving directory '/tmp/b/play'
make: *** [Makefile:177: sub-make] Error 2

Regards,
Simon
Nishanth Menon Aug. 24, 2023, 3:27 a.m. UTC | #7
On 21:01-20230823, Simon Glass wrote:
> Hi Nishanth,
> 
> On Wed, 23 Aug 2023 at 18:18, Nishanth Menon <nm@ti.com> wrote:
> >
> > On 17:57-20230823, Simon Glass wrote:
> > [...]
> > > > This is how we have a common bit of rST for how to build N boards,
> > > > without having to do a literal copy and paste N times.
> > >
> > > How about using this?
> > >
> > > https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#substitution-definitions
> >
> > I was not able to succeed with complex includes such as:
> > https://github.com/u-boot/u-boot/blob/master/doc/board/ti/am62x_sk.rst?plain=1#L89
> >
> > am62x complete build procedure defined once and reused in other am62x
> > platforms.. But the am62x build procedure itself is reused from common
> > k3 build steps.
> 
> I followed through these instructions. I find the env vars quite
> confusing, since I don't really know what it is doing. It feels like a
> script:
> 
> do $a $b $c
> do $f $e
> 
> it is pretty hard to follow. I think it would be better to write
> everything out in full for each board, like rockchip does.

Unfortunately, this is a few major steps that is repeated for
(currently):
	AM62x SK
	Toradex Verdin
	(pending: beagleplay - )
	(once all the dust clears up, hopefully phytec)
	SK-LP
	....

I have no reasonable way to offer to keep them all in sync.
	https://libera.irclog.whitequark.org/u-boot/2023-07-26#34662854;
is kind of why I went down this path.S

> 
> Some other minor feedback:
> 
> - The 'make' lines should really have -j $(nproc) added

Different styles of shells..

> - The $ signs at the start of each command in the docs are a pain
> since it stops me copying the commands into the terminal - can you
> remove them?

hehe.. "dont" let people blindly copy paste without understanding what is
going on argument?

If folks are OK, I sure can send a different patch series for that.. (or
maybe motivate someone to do that instead of me ;))


> - It doesn't build for me:
> 
>   BINMAN  .binman_stamp
> Image 'ti-dm' is missing external blobs and is non-functional: blob-ext
> 
> /binman/ti-dm/blob-ext (ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f):
>    Missing blob
> 
> Some images are invalid
> make[1]: *** [/scratch/sglass/cosarm/src/third_party/u-boot/files/Makefile:1115:
> .binman_stamp] Error 103
> make[1]: Leaving directory '/tmp/b/play'
> make: *** [Makefile:177: sub-make] Error 2


^^ Neha: This is what I was complaining about.

https://u-boot.readthedocs.io/en/latest/board/ti/am62x_sk.html?highlight=am62#sources

source: https://git.ti.com/git/processor-firmware/ti-linux-firmware.git
is missing, we never used to break build previously binman converted now does.

I am wondering if I need to explicitly call out git clone instructions
out..
Mattijs Korpershoek Aug. 24, 2023, 8:21 a.m. UTC | #8
On mer., août 23, 2023 at 22:27, Nishanth Menon <nm@ti.com> wrote:

> On 21:01-20230823, Simon Glass wrote:
>> Hi Nishanth,
>> 
>> On Wed, 23 Aug 2023 at 18:18, Nishanth Menon <nm@ti.com> wrote:
>> >
>> > On 17:57-20230823, Simon Glass wrote:
>> > [...]
>> > > > This is how we have a common bit of rST for how to build N boards,
>> > > > without having to do a literal copy and paste N times.
>> > >
>> > > How about using this?
>> > >
>> > > https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#substitution-definitions
>> >
>> > I was not able to succeed with complex includes such as:
>> > https://github.com/u-boot/u-boot/blob/master/doc/board/ti/am62x_sk.rst?plain=1#L89
>> >
>> > am62x complete build procedure defined once and reused in other am62x
>> > platforms.. But the am62x build procedure itself is reused from common
>> > k3 build steps.
>> 
>> I followed through these instructions. I find the env vars quite
>> confusing, since I don't really know what it is doing. It feels like a
>> script:
>> 
>> do $a $b $c
>> do $f $e
>> 
>> it is pretty hard to follow. I think it would be better to write
>> everything out in full for each board, like rockchip does.
>
> Unfortunately, this is a few major steps that is repeated for
> (currently):
> 	AM62x SK
> 	Toradex Verdin
> 	(pending: beagleplay - )
> 	(once all the dust clears up, hopefully phytec)
> 	SK-LP
> 	....
>
> I have no reasonable way to offer to keep them all in sync.
> 	https://libera.irclog.whitequark.org/u-boot/2023-07-26#34662854;
> is kind of why I went down this path.S
>
>> 
>> Some other minor feedback:
>> 
>> - The 'make' lines should really have -j $(nproc) added
>
> Different styles of shells..
>
>> - The $ signs at the start of each command in the docs are a pain
>> since it stops me copying the commands into the terminal - can you
>> remove them?
>
> hehe.. "dont" let people blindly copy paste without understanding what is
> going on argument?
>
> If folks are OK, I sure can send a different patch series for that.. (or
> maybe motivate someone to do that instead of me ;))

Have we considered using the .. prompt:: extension ?

https://pypi.org/project/sphinx-prompt/

The prompt extension automatically adds a prompt (like $) in front of
each line and disallows copying it when copying from the html generated page.

>
>
>> - It doesn't build for me:
>> 
>>   BINMAN  .binman_stamp
>> Image 'ti-dm' is missing external blobs and is non-functional: blob-ext
>> 
>> /binman/ti-dm/blob-ext (ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f):
>>    Missing blob
>> 
>> Some images are invalid
>> make[1]: *** [/scratch/sglass/cosarm/src/third_party/u-boot/files/Makefile:1115:
>> .binman_stamp] Error 103
>> make[1]: Leaving directory '/tmp/b/play'
>> make: *** [Makefile:177: sub-make] Error 2
>
>
> ^^ Neha: This is what I was complaining about.
>
> https://u-boot.readthedocs.io/en/latest/board/ti/am62x_sk.html?highlight=am62#sources
>
> source: https://git.ti.com/git/processor-firmware/ti-linux-firmware.git
> is missing, we never used to break build previously binman converted now does.
>
> I am wondering if I need to explicitly call out git clone instructions
> out..
>
> -- 
> Regards,
> Nishanth Menon
> Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
Nishanth Menon Aug. 24, 2023, 12:07 p.m. UTC | #9
On 10:21-20230824, Mattijs Korpershoek wrote:
[...]

> >> Some other minor feedback:
> >> 
> >> - The 'make' lines should really have -j $(nproc) added
> >
> > Different styles of shells..
> >
> >> - The $ signs at the start of each command in the docs are a pain
> >> since it stops me copying the commands into the terminal - can you
> >> remove them?
> >
> > hehe.. "dont" let people blindly copy paste without understanding what is
> > going on argument?
> >
> > If folks are OK, I sure can send a different patch series for that.. (or
> > maybe motivate someone to do that instead of me ;))
> 
> Have we considered using the .. prompt:: extension ?
> 
> https://pypi.org/project/sphinx-prompt/
> 
> The prompt extension automatically adds a prompt (like $) in front of
> each line and disallows copying it when copying from the html generated page.

That does look like a very interesting option. This could very well be a
different series of it's own, if Heinrich is OK with it..
Neha Malcom Francis Aug. 24, 2023, 1:16 p.m. UTC | #10
Hi Simon, Nishanth

On 24/08/23 08:57, Nishanth Menon wrote:
> On 21:01-20230823, Simon Glass wrote:
>> Hi Nishanth,
>>
>> On Wed, 23 Aug 2023 at 18:18, Nishanth Menon <nm@ti.com> wrote:
>>>
>>> On 17:57-20230823, Simon Glass wrote:
>>> [...]
>>>>> This is how we have a common bit of rST for how to build N boards,
>>>>> without having to do a literal copy and paste N times.
>>>>
>>>> How about using this?
>>>>
>>>> https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#substitution-definitions
>>>
>>> I was not able to succeed with complex includes such as:
>>> https://github.com/u-boot/u-boot/blob/master/doc/board/ti/am62x_sk.rst?plain=1#L89
>>>
>>> am62x complete build procedure defined once and reused in other am62x
>>> platforms.. But the am62x build procedure itself is reused from common
>>> k3 build steps.
>>
>> I followed through these instructions. I find the env vars quite
>> confusing, since I don't really know what it is doing. It feels like a
>> script:
>>
>> do $a $b $c
>> do $f $e
>>
>> it is pretty hard to follow. I think it would be better to write
>> everything out in full for each board, like rockchip does.
> 
> Unfortunately, this is a few major steps that is repeated for
> (currently):
> 	AM62x SK
> 	Toradex Verdin
> 	(pending: beagleplay - )
> 	(once all the dust clears up, hopefully phytec)
> 	SK-LP
> 	....
> 
> I have no reasonable way to offer to keep them all in sync.
> 	https://libera.irclog.whitequark.org/u-boot/2023-07-26#34662854;
> is kind of why I went down this path.S
> 
>>
>> Some other minor feedback:
>>
>> - The 'make' lines should really have -j $(nproc) added
> 
> Different styles of shells..
> 
>> - The $ signs at the start of each command in the docs are a pain
>> since it stops me copying the commands into the terminal - can you
>> remove them?
> 
> hehe.. "dont" let people blindly copy paste without understanding what is
> going on argument?
> 
> If folks are OK, I sure can send a different patch series for that.. (or
> maybe motivate someone to do that instead of me ;))
> 
> 
>> - It doesn't build for me:
>>
>>    BINMAN  .binman_stamp
>> Image 'ti-dm' is missing external blobs and is non-functional: blob-ext
>>
>> /binman/ti-dm/blob-ext (ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f):
>>     Missing blob
>>
>> Some images are invalid
>> make[1]: *** [/scratch/sglass/cosarm/src/third_party/u-boot/files/Makefile:1115:
>> .binman_stamp] Error 103
>> make[1]: Leaving directory '/tmp/b/play'
>> make: *** [Makefile:177: sub-make] Error 2
> 
> 
> ^^ Neha: This is what I was complaining about.
> 
> https://u-boot.readthedocs.io/en/latest/board/ti/am62x_sk.html?highlight=am62#sources
> 
> source: https://git.ti.com/git/processor-firmware/ti-linux-firmware.git
> is missing, we never used to break build previously binman converted now does.
> 
> I am wondering if I need to explicitly call out git clone instructions
> out..
> 

Right... this does seem to be a complaint that keeps coming up.

Simon, my intention at the time of sending out the patch was that anyone 
building the board should "not NOT" have the DM binary. The way we structured 
the filename was that it looks at BINMAN_INDIRS to find 
ti-dm/ipc_echo_testb_mcu1_0_release_strip.xer5f but I guess this is a confusing 
way to put it across. Maybe we should rework that. Or not throw an error at all 
when DM isn't found.
Tom Rini Aug. 24, 2023, 2:16 p.m. UTC | #11
On Wed, Aug 23, 2023 at 10:27:09PM -0500, Nishanth Menon wrote:
> On 21:01-20230823, Simon Glass wrote:
> > Hi Nishanth,
> > 
> > On Wed, 23 Aug 2023 at 18:18, Nishanth Menon <nm@ti.com> wrote:
> > >
> > > On 17:57-20230823, Simon Glass wrote:
> > > [...]
> > > > > This is how we have a common bit of rST for how to build N boards,
> > > > > without having to do a literal copy and paste N times.
> > > >
> > > > How about using this?
> > > >
> > > > https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#substitution-definitions
> > >
> > > I was not able to succeed with complex includes such as:
> > > https://github.com/u-boot/u-boot/blob/master/doc/board/ti/am62x_sk.rst?plain=1#L89
> > >
> > > am62x complete build procedure defined once and reused in other am62x
> > > platforms.. But the am62x build procedure itself is reused from common
> > > k3 build steps.
> > 
> > I followed through these instructions. I find the env vars quite
> > confusing, since I don't really know what it is doing. It feels like a
> > script:
> > 
> > do $a $b $c
> > do $f $e
> > 
> > it is pretty hard to follow. I think it would be better to write
> > everything out in full for each board, like rockchip does.
> 
> Unfortunately, this is a few major steps that is repeated for
> (currently):
> 	AM62x SK
> 	Toradex Verdin
> 	(pending: beagleplay - )
> 	(once all the dust clears up, hopefully phytec)
> 	SK-LP
> 	....
> 
> I have no reasonable way to offer to keep them all in sync.
> 	https://libera.irclog.whitequark.org/u-boot/2023-07-26#34662854;
> is kind of why I went down this path.S

And please note that I do not like the way we're doing this in other
platforms.  That we have almost verbatim instructions for building TF-A
and OPTEE for nearly every aarch64 platform is not good.  I was hoping
for something more truly template-based and that we could expand out
from the K3 case to cover other platforms as well, but we're not there
yet.
Tom Rini Aug. 24, 2023, 2:20 p.m. UTC | #12
On Thu, Aug 24, 2023 at 06:46:57PM +0530, Neha Malcom Francis wrote:
> Hi Simon, Nishanth
> 
> On 24/08/23 08:57, Nishanth Menon wrote:
> > On 21:01-20230823, Simon Glass wrote:
> > > Hi Nishanth,
> > > 
> > > On Wed, 23 Aug 2023 at 18:18, Nishanth Menon <nm@ti.com> wrote:
> > > > 
> > > > On 17:57-20230823, Simon Glass wrote:
> > > > [...]
> > > > > > This is how we have a common bit of rST for how to build N boards,
> > > > > > without having to do a literal copy and paste N times.
> > > > > 
> > > > > How about using this?
> > > > > 
> > > > > https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#substitution-definitions
> > > > 
> > > > I was not able to succeed with complex includes such as:
> > > > https://github.com/u-boot/u-boot/blob/master/doc/board/ti/am62x_sk.rst?plain=1#L89
> > > > 
> > > > am62x complete build procedure defined once and reused in other am62x
> > > > platforms.. But the am62x build procedure itself is reused from common
> > > > k3 build steps.
> > > 
> > > I followed through these instructions. I find the env vars quite
> > > confusing, since I don't really know what it is doing. It feels like a
> > > script:
> > > 
> > > do $a $b $c
> > > do $f $e
> > > 
> > > it is pretty hard to follow. I think it would be better to write
> > > everything out in full for each board, like rockchip does.
> > 
> > Unfortunately, this is a few major steps that is repeated for
> > (currently):
> > 	AM62x SK
> > 	Toradex Verdin
> > 	(pending: beagleplay - )
> > 	(once all the dust clears up, hopefully phytec)
> > 	SK-LP
> > 	....
> > 
> > I have no reasonable way to offer to keep them all in sync.
> > 	https://libera.irclog.whitequark.org/u-boot/2023-07-26#34662854;
> > is kind of why I went down this path.S
> > 
> > > 
> > > Some other minor feedback:
> > > 
> > > - The 'make' lines should really have -j $(nproc) added
> > 
> > Different styles of shells..
> > 
> > > - The $ signs at the start of each command in the docs are a pain
> > > since it stops me copying the commands into the terminal - can you
> > > remove them?
> > 
> > hehe.. "dont" let people blindly copy paste without understanding what is
> > going on argument?
> > 
> > If folks are OK, I sure can send a different patch series for that.. (or
> > maybe motivate someone to do that instead of me ;))
> > 
> > 
> > > - It doesn't build for me:
> > > 
> > >    BINMAN  .binman_stamp
> > > Image 'ti-dm' is missing external blobs and is non-functional: blob-ext
> > > 
> > > /binman/ti-dm/blob-ext (ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f):
> > >     Missing blob
> > > 
> > > Some images are invalid
> > > make[1]: *** [/scratch/sglass/cosarm/src/third_party/u-boot/files/Makefile:1115:
> > > .binman_stamp] Error 103
> > > make[1]: Leaving directory '/tmp/b/play'
> > > make: *** [Makefile:177: sub-make] Error 2
> > 
> > 
> > ^^ Neha: This is what I was complaining about.
> > 
> > https://u-boot.readthedocs.io/en/latest/board/ti/am62x_sk.html?highlight=am62#sources
> > 
> > source: https://git.ti.com/git/processor-firmware/ti-linux-firmware.git
> > is missing, we never used to break build previously binman converted now does.
> > 
> > I am wondering if I need to explicitly call out git clone instructions
> > out..
> > 
> 
> Right... this does seem to be a complaint that keeps coming up.
> 
> Simon, my intention at the time of sending out the patch was that anyone
> building the board should "not NOT" have the DM binary. The way we
> structured the filename was that it looks at BINMAN_INDIRS to find
> ti-dm/ipc_echo_testb_mcu1_0_release_strip.xer5f but I guess this is a
> confusing way to put it across. Maybe we should rework that. Or not throw an
> error at all when DM isn't found.

Well, is DM required or not? If it's optional, we have flags to mark it
optional.  If it's required, we have flags for make and buildman to tell
binman "fake it".  I am wondering if we still have the ability to have a
more verbose "need it, can't find it" error message, and so that's where
it should say that you forgot to set BINMAN_INDIRS or clone the firmware
repository.
Simon Glass Aug. 24, 2023, 2:41 p.m. UTC | #13
Hi,

On Thu, 24 Aug 2023 at 08:20, Tom Rini <trini@konsulko.com> wrote:
>
> On Thu, Aug 24, 2023 at 06:46:57PM +0530, Neha Malcom Francis wrote:
> > Hi Simon, Nishanth
> >
> > On 24/08/23 08:57, Nishanth Menon wrote:
> > > On 21:01-20230823, Simon Glass wrote:
> > > > Hi Nishanth,
> > > >
> > > > On Wed, 23 Aug 2023 at 18:18, Nishanth Menon <nm@ti.com> wrote:
> > > > >
> > > > > On 17:57-20230823, Simon Glass wrote:
> > > > > [...]
> > > > > > > This is how we have a common bit of rST for how to build N boards,
> > > > > > > without having to do a literal copy and paste N times.
> > > > > >
> > > > > > How about using this?
> > > > > >
> > > > > > https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#substitution-definitions
> > > > >
> > > > > I was not able to succeed with complex includes such as:
> > > > > https://github.com/u-boot/u-boot/blob/master/doc/board/ti/am62x_sk.rst?plain=1#L89
> > > > >
> > > > > am62x complete build procedure defined once and reused in other am62x
> > > > > platforms.. But the am62x build procedure itself is reused from common
> > > > > k3 build steps.
> > > >
> > > > I followed through these instructions. I find the env vars quite
> > > > confusing, since I don't really know what it is doing. It feels like a
> > > > script:
> > > >
> > > > do $a $b $c
> > > > do $f $e
> > > >
> > > > it is pretty hard to follow. I think it would be better to write
> > > > everything out in full for each board, like rockchip does.
> > >
> > > Unfortunately, this is a few major steps that is repeated for
> > > (currently):
> > >     AM62x SK
> > >     Toradex Verdin
> > >     (pending: beagleplay - )
> > >     (once all the dust clears up, hopefully phytec)
> > >     SK-LP
> > >     ....
> > >
> > > I have no reasonable way to offer to keep them all in sync.
> > >     https://libera.irclog.whitequark.org/u-boot/2023-07-26#34662854;
> > > is kind of why I went down this path.S
> > >
> > > >
> > > > Some other minor feedback:
> > > >
> > > > - The 'make' lines should really have -j $(nproc) added
> > >
> > > Different styles of shells..
> > >
> > > > - The $ signs at the start of each command in the docs are a pain
> > > > since it stops me copying the commands into the terminal - can you
> > > > remove them?
> > >
> > > hehe.. "dont" let people blindly copy paste without understanding what is
> > > going on argument?
> > >
> > > If folks are OK, I sure can send a different patch series for that.. (or
> > > maybe motivate someone to do that instead of me ;))
> > >
> > >
> > > > - It doesn't build for me:
> > > >
> > > >    BINMAN  .binman_stamp
> > > > Image 'ti-dm' is missing external blobs and is non-functional: blob-ext
> > > >
> > > > /binman/ti-dm/blob-ext (ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f):
> > > >     Missing blob
> > > >
> > > > Some images are invalid
> > > > make[1]: *** [/scratch/sglass/cosarm/src/third_party/u-boot/files/Makefile:1115:
> > > > .binman_stamp] Error 103
> > > > make[1]: Leaving directory '/tmp/b/play'
> > > > make: *** [Makefile:177: sub-make] Error 2
> > >
> > >
> > > ^^ Neha: This is what I was complaining about.
> > >
> > > https://u-boot.readthedocs.io/en/latest/board/ti/am62x_sk.html?highlight=am62#sources
> > >
> > > source: https://git.ti.com/git/processor-firmware/ti-linux-firmware.git
> > > is missing, we never used to break build previously binman converted now does.
> > >
> > > I am wondering if I need to explicitly call out git clone instructions
> > > out..
> > >
> >
> > Right... this does seem to be a complaint that keeps coming up.
> >
> > Simon, my intention at the time of sending out the patch was that anyone
> > building the board should "not NOT" have the DM binary. The way we
> > structured the filename was that it looks at BINMAN_INDIRS to find
> > ti-dm/ipc_echo_testb_mcu1_0_release_strip.xer5f but I guess this is a
> > confusing way to put it across. Maybe we should rework that. Or not throw an
> > error at all when DM isn't found.
>
> Well, is DM required or not? If it's optional, we have flags to mark it
> optional.  If it's required, we have flags for make and buildman to tell
> binman "fake it".  I am wondering if we still have the ability to have a
> more verbose "need it, can't find it" error message, and so that's where
> it should say that you forgot to set BINMAN_INDIRS or clone the firmware
> repository.

If it is optional, use the 'optional' tag on the entry You will get a
warning but not an error. At the moment it is saying that the image is
non-functional, which is not good.

Regards,
Simon
Tom Rini Aug. 24, 2023, 2:43 p.m. UTC | #14
On Thu, Aug 24, 2023 at 08:41:23AM -0600, Simon Glass wrote:
> Hi,
> 
> On Thu, 24 Aug 2023 at 08:20, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Thu, Aug 24, 2023 at 06:46:57PM +0530, Neha Malcom Francis wrote:
> > > Hi Simon, Nishanth
> > >
> > > On 24/08/23 08:57, Nishanth Menon wrote:
> > > > On 21:01-20230823, Simon Glass wrote:
> > > > > Hi Nishanth,
> > > > >
> > > > > On Wed, 23 Aug 2023 at 18:18, Nishanth Menon <nm@ti.com> wrote:
> > > > > >
> > > > > > On 17:57-20230823, Simon Glass wrote:
> > > > > > [...]
> > > > > > > > This is how we have a common bit of rST for how to build N boards,
> > > > > > > > without having to do a literal copy and paste N times.
> > > > > > >
> > > > > > > How about using this?
> > > > > > >
> > > > > > > https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#substitution-definitions
> > > > > >
> > > > > > I was not able to succeed with complex includes such as:
> > > > > > https://github.com/u-boot/u-boot/blob/master/doc/board/ti/am62x_sk.rst?plain=1#L89
> > > > > >
> > > > > > am62x complete build procedure defined once and reused in other am62x
> > > > > > platforms.. But the am62x build procedure itself is reused from common
> > > > > > k3 build steps.
> > > > >
> > > > > I followed through these instructions. I find the env vars quite
> > > > > confusing, since I don't really know what it is doing. It feels like a
> > > > > script:
> > > > >
> > > > > do $a $b $c
> > > > > do $f $e
> > > > >
> > > > > it is pretty hard to follow. I think it would be better to write
> > > > > everything out in full for each board, like rockchip does.
> > > >
> > > > Unfortunately, this is a few major steps that is repeated for
> > > > (currently):
> > > >     AM62x SK
> > > >     Toradex Verdin
> > > >     (pending: beagleplay - )
> > > >     (once all the dust clears up, hopefully phytec)
> > > >     SK-LP
> > > >     ....
> > > >
> > > > I have no reasonable way to offer to keep them all in sync.
> > > >     https://libera.irclog.whitequark.org/u-boot/2023-07-26#34662854;
> > > > is kind of why I went down this path.S
> > > >
> > > > >
> > > > > Some other minor feedback:
> > > > >
> > > > > - The 'make' lines should really have -j $(nproc) added
> > > >
> > > > Different styles of shells..
> > > >
> > > > > - The $ signs at the start of each command in the docs are a pain
> > > > > since it stops me copying the commands into the terminal - can you
> > > > > remove them?
> > > >
> > > > hehe.. "dont" let people blindly copy paste without understanding what is
> > > > going on argument?
> > > >
> > > > If folks are OK, I sure can send a different patch series for that.. (or
> > > > maybe motivate someone to do that instead of me ;))
> > > >
> > > >
> > > > > - It doesn't build for me:
> > > > >
> > > > >    BINMAN  .binman_stamp
> > > > > Image 'ti-dm' is missing external blobs and is non-functional: blob-ext
> > > > >
> > > > > /binman/ti-dm/blob-ext (ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f):
> > > > >     Missing blob
> > > > >
> > > > > Some images are invalid
> > > > > make[1]: *** [/scratch/sglass/cosarm/src/third_party/u-boot/files/Makefile:1115:
> > > > > .binman_stamp] Error 103
> > > > > make[1]: Leaving directory '/tmp/b/play'
> > > > > make: *** [Makefile:177: sub-make] Error 2
> > > >
> > > >
> > > > ^^ Neha: This is what I was complaining about.
> > > >
> > > > https://u-boot.readthedocs.io/en/latest/board/ti/am62x_sk.html?highlight=am62#sources
> > > >
> > > > source: https://git.ti.com/git/processor-firmware/ti-linux-firmware.git
> > > > is missing, we never used to break build previously binman converted now does.
> > > >
> > > > I am wondering if I need to explicitly call out git clone instructions
> > > > out..
> > > >
> > >
> > > Right... this does seem to be a complaint that keeps coming up.
> > >
> > > Simon, my intention at the time of sending out the patch was that anyone
> > > building the board should "not NOT" have the DM binary. The way we
> > > structured the filename was that it looks at BINMAN_INDIRS to find
> > > ti-dm/ipc_echo_testb_mcu1_0_release_strip.xer5f but I guess this is a
> > > confusing way to put it across. Maybe we should rework that. Or not throw an
> > > error at all when DM isn't found.
> >
> > Well, is DM required or not? If it's optional, we have flags to mark it
> > optional.  If it's required, we have flags for make and buildman to tell
> > binman "fake it".  I am wondering if we still have the ability to have a
> > more verbose "need it, can't find it" error message, and so that's where
> > it should say that you forgot to set BINMAN_INDIRS or clone the firmware
> > repository.
> 
> If it is optional, use the 'optional' tag on the entry You will get a
> warning but not an error. At the moment it is saying that the image is
> non-functional, which is not good.

Yes, and I believe these are non-optional firmwares, so do we still have
the ability to produce a more specific and verbose error message?
Simon Glass Aug. 24, 2023, 2:46 p.m. UTC | #15
Hi Tom,

On Thu, 24 Aug 2023 at 08:44, Tom Rini <trini@konsulko.com> wrote:
>
> On Thu, Aug 24, 2023 at 08:41:23AM -0600, Simon Glass wrote:
> > Hi,
> >
> > On Thu, 24 Aug 2023 at 08:20, Tom Rini <trini@konsulko.com> wrote:
> > >
> > > On Thu, Aug 24, 2023 at 06:46:57PM +0530, Neha Malcom Francis wrote:
> > > > Hi Simon, Nishanth
> > > >
> > > > On 24/08/23 08:57, Nishanth Menon wrote:
> > > > > On 21:01-20230823, Simon Glass wrote:
> > > > > > Hi Nishanth,
> > > > > >
> > > > > > On Wed, 23 Aug 2023 at 18:18, Nishanth Menon <nm@ti.com> wrote:
> > > > > > >
> > > > > > > On 17:57-20230823, Simon Glass wrote:
> > > > > > > [...]
> > > > > > > > > This is how we have a common bit of rST for how to build N boards,
> > > > > > > > > without having to do a literal copy and paste N times.
> > > > > > > >
> > > > > > > > How about using this?
> > > > > > > >
> > > > > > > > https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#substitution-definitions
> > > > > > >
> > > > > > > I was not able to succeed with complex includes such as:
> > > > > > > https://github.com/u-boot/u-boot/blob/master/doc/board/ti/am62x_sk.rst?plain=1#L89
> > > > > > >
> > > > > > > am62x complete build procedure defined once and reused in other am62x
> > > > > > > platforms.. But the am62x build procedure itself is reused from common
> > > > > > > k3 build steps.
> > > > > >
> > > > > > I followed through these instructions. I find the env vars quite
> > > > > > confusing, since I don't really know what it is doing. It feels like a
> > > > > > script:
> > > > > >
> > > > > > do $a $b $c
> > > > > > do $f $e
> > > > > >
> > > > > > it is pretty hard to follow. I think it would be better to write
> > > > > > everything out in full for each board, like rockchip does.
> > > > >
> > > > > Unfortunately, this is a few major steps that is repeated for
> > > > > (currently):
> > > > >     AM62x SK
> > > > >     Toradex Verdin
> > > > >     (pending: beagleplay - )
> > > > >     (once all the dust clears up, hopefully phytec)
> > > > >     SK-LP
> > > > >     ....
> > > > >
> > > > > I have no reasonable way to offer to keep them all in sync.
> > > > >     https://libera.irclog.whitequark.org/u-boot/2023-07-26#34662854;
> > > > > is kind of why I went down this path.S
> > > > >
> > > > > >
> > > > > > Some other minor feedback:
> > > > > >
> > > > > > - The 'make' lines should really have -j $(nproc) added
> > > > >
> > > > > Different styles of shells..
> > > > >
> > > > > > - The $ signs at the start of each command in the docs are a pain
> > > > > > since it stops me copying the commands into the terminal - can you
> > > > > > remove them?
> > > > >
> > > > > hehe.. "dont" let people blindly copy paste without understanding what is
> > > > > going on argument?
> > > > >
> > > > > If folks are OK, I sure can send a different patch series for that.. (or
> > > > > maybe motivate someone to do that instead of me ;))
> > > > >
> > > > >
> > > > > > - It doesn't build for me:
> > > > > >
> > > > > >    BINMAN  .binman_stamp
> > > > > > Image 'ti-dm' is missing external blobs and is non-functional: blob-ext
> > > > > >
> > > > > > /binman/ti-dm/blob-ext (ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f):
> > > > > >     Missing blob
> > > > > >
> > > > > > Some images are invalid
> > > > > > make[1]: *** [/scratch/sglass/cosarm/src/third_party/u-boot/files/Makefile:1115:
> > > > > > .binman_stamp] Error 103
> > > > > > make[1]: Leaving directory '/tmp/b/play'
> > > > > > make: *** [Makefile:177: sub-make] Error 2
> > > > >
> > > > >
> > > > > ^^ Neha: This is what I was complaining about.
> > > > >
> > > > > https://u-boot.readthedocs.io/en/latest/board/ti/am62x_sk.html?highlight=am62#sources
> > > > >
> > > > > source: https://git.ti.com/git/processor-firmware/ti-linux-firmware.git
> > > > > is missing, we never used to break build previously binman converted now does.
> > > > >
> > > > > I am wondering if I need to explicitly call out git clone instructions
> > > > > out..
> > > > >
> > > >
> > > > Right... this does seem to be a complaint that keeps coming up.
> > > >
> > > > Simon, my intention at the time of sending out the patch was that anyone
> > > > building the board should "not NOT" have the DM binary. The way we
> > > > structured the filename was that it looks at BINMAN_INDIRS to find
> > > > ti-dm/ipc_echo_testb_mcu1_0_release_strip.xer5f but I guess this is a
> > > > confusing way to put it across. Maybe we should rework that. Or not throw an
> > > > error at all when DM isn't found.
> > >
> > > Well, is DM required or not? If it's optional, we have flags to mark it
> > > optional.  If it's required, we have flags for make and buildman to tell
> > > binman "fake it".  I am wondering if we still have the ability to have a
> > > more verbose "need it, can't find it" error message, and so that's where
> > > it should say that you forgot to set BINMAN_INDIRS or clone the firmware
> > > repository.
> >
> > If it is optional, use the 'optional' tag on the entry You will get a
> > warning but not an error. At the moment it is saying that the image is
> > non-functional, which is not good.
>
> Yes, and I believe these are non-optional firmwares, so do we still have
> the ability to produce a more specific and verbose error message?

Yes, see the 'missing-msg' tag and the 'missing-blob-help' file. This
should work for any external block, whether missing or faked, optional
or required,

Regards,
Simon
Simon Glass Aug. 25, 2023, 1:04 a.m. UTC | #16
Hi Nishanth,

On Tue, 22 Aug 2023 at 12:43, Nishanth Menon <nm@ti.com> wrote:
>
> Add base documentation for BeaglePlay
>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
> Cc: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
>
> Changes Since V3:
> * Updated documentation to give a more clear overview of MMC partitions
>   and flashing information.
> * Added OpenOCD debug documentation
> * Added LED status information and indication of various boot stages
>
> V3: https://lore.kernel.org/all/20230815164440.2713726-5-nm@ti.com/
> V2: https://lore.kernel.org/u-boot/20230727234446.3651836-5-nm@ti.com/
> V1: https://lore.kernel.org/all/20230725185253.2123433-7-nm@ti.com/
>
>  doc/board/ti/am62x_beagleplay.rst    | 256 ++++++++++
>  doc/board/ti/img/beagleplay_emmc.svg | 697 +++++++++++++++++++++++++++
>  doc/board/ti/k3.rst                  |   1 +
>  3 files changed, 954 insertions(+)
>  create mode 100644 doc/board/ti/am62x_beagleplay.rst
>  create mode 100644 doc/board/ti/img/beagleplay_emmc.svg
>
> diff --git a/doc/board/ti/am62x_beagleplay.rst b/doc/board/ti/am62x_beagleplay.rst
> new file mode 100644
> index 000000000000..5adb7b4c9ace
> --- /dev/null
> +++ b/doc/board/ti/am62x_beagleplay.rst
> @@ -0,0 +1,256 @@
> +.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
> +.. sectionauthor:: Nishanth Menon <nm@ti.com>
> +
> +AM62x Beagleboard.org Beagleplay
> +================================
> +
> +Introduction:
> +-------------
> +
> +BeagleBoard.org BeaglePlay is an easy to use, affordable open source
> +hardware single board computer based on the Texas Instruments AM625
> +SoC that allows you to create connected devices that work even at long
> +distances using IEEE 802.15.4g LR-WPAN and IEEE 802.3cg 10Base-T1L.
> +Expansion is provided over open standards based mikroBUS, Grove and
> +QWIIC headers among other interfaces.
> +
> +Further information can be found at:
> +
> +* Product Page: https://beagleplay.org/
> +* Hardware documentation: https://git.beagleboard.org/beagleplay/beagleplay
> +
> +Boot Flow:
> +----------
> +Below is the pictorial representation of boot flow:
> +
> +.. image:: img/boot_diagram_k3_current.svg
> +  :alt: Boot flow diagram
> +
> +- On this platform, 'TI Foundational Security' (TIFS) functions as the
> +  security enclave master while 'Device Manager' (DM), also known as the
> +  'TISCI server' in "TI terminology", offers all the essential services.
> +  The A53/M4F (Aux core) sends requests to TIFS/DM to accomplish these
> +  services, as illustrated in the diagram above.
> +
> +Sources:
> +--------
> +.. include::  k3.rst
> +    :start-after: .. k3_rst_include_start_boot_sources
> +    :end-before: .. k3_rst_include_end_boot_sources
> +
> +Build procedure:
> +----------------
> +0. Setup the environment variables:
> +
> +.. include::  k3.rst
> +    :start-after: .. k3_rst_include_start_common_env_vars_desc
> +    :end-before: .. k3_rst_include_end_common_env_vars_desc
> +
> +.. include::  k3.rst
> +    :start-after: .. k3_rst_include_start_board_env_vars_desc
> +    :end-before: .. k3_rst_include_end_board_env_vars_desc
> +
> +Set the variables corresponding to this platform:
> +
> +.. include::  k3.rst
> +    :start-after: .. k3_rst_include_start_common_env_vars_defn
> +    :end-before: .. k3_rst_include_end_common_env_vars_defn
> +.. code-block:: bash
> +
> + $ export UBOOT_CFG_CORTEXR="am62x_evm_r5_defconfig beagleplay_r5.config"
> + $ export UBOOT_CFG_CORTEXA="am62x_evm_a53_defconfig beagleplay_a53.config"
> + $ export TFA_BOARD=lite
> + $ # we dont use any extra TFA parameters
> + $ unset TFA_EXTRA_ARGS
> + $ export OPTEE_PLATFORM=k3-am62x
> + $ export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y"
> +
> +.. include::  am62x_sk.rst
> +    :start-after: .. am62x_evm_rst_include_start_build_steps
> +    :end-before: .. am62x_evm_rst_include_end_build_steps
> +
> +Target Images
> +--------------
> +Copy the below images to an SD card and boot:
> +
> +* tiboot3-am62x-gp-evm.bin from R5 build as tiboot3.bin
> +* tispl.bin_unsigned from Cortex-A build as tispl.bin
> +* u-boot.img_unsigned from Cortex-A build as uboot.img

I just noticed - I think this should be u-boot.img

Also I tried the mmc instructions and managed to brick the board. Is
there a recovery procedure?

I suppose I should have tries it on an SD card first. I thought that
was what I was doing, but I didn't know about the internal mmc...

Regards,
Simon
Nishanth Menon Aug. 25, 2023, 1:22 a.m. UTC | #17
On 19:04-20230824, Simon Glass wrote:
> Hi Nishanth,
> 
> On Tue, 22 Aug 2023 at 12:43, Nishanth Menon <nm@ti.com> wrote:
> >
> > Add base documentation for BeaglePlay
> >
> > Signed-off-by: Nishanth Menon <nm@ti.com>
> > ---
> > Cc: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> >
> > Changes Since V3:
> > * Updated documentation to give a more clear overview of MMC partitions
> >   and flashing information.
> > * Added OpenOCD debug documentation
> > * Added LED status information and indication of various boot stages
> >
> > V3: https://lore.kernel.org/all/20230815164440.2713726-5-nm@ti.com/
> > V2: https://lore.kernel.org/u-boot/20230727234446.3651836-5-nm@ti.com/
> > V1: https://lore.kernel.org/all/20230725185253.2123433-7-nm@ti.com/
> >
> >  doc/board/ti/am62x_beagleplay.rst    | 256 ++++++++++
> >  doc/board/ti/img/beagleplay_emmc.svg | 697 +++++++++++++++++++++++++++
> >  doc/board/ti/k3.rst                  |   1 +
> >  3 files changed, 954 insertions(+)
> >  create mode 100644 doc/board/ti/am62x_beagleplay.rst
> >  create mode 100644 doc/board/ti/img/beagleplay_emmc.svg
> >
> > diff --git a/doc/board/ti/am62x_beagleplay.rst b/doc/board/ti/am62x_beagleplay.rst
> > new file mode 100644
> > index 000000000000..5adb7b4c9ace
> > --- /dev/null
> > +++ b/doc/board/ti/am62x_beagleplay.rst
> > @@ -0,0 +1,256 @@
> > +.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
> > +.. sectionauthor:: Nishanth Menon <nm@ti.com>
> > +
> > +AM62x Beagleboard.org Beagleplay
> > +================================
> > +
> > +Introduction:
> > +-------------
> > +
> > +BeagleBoard.org BeaglePlay is an easy to use, affordable open source
> > +hardware single board computer based on the Texas Instruments AM625
> > +SoC that allows you to create connected devices that work even at long
> > +distances using IEEE 802.15.4g LR-WPAN and IEEE 802.3cg 10Base-T1L.
> > +Expansion is provided over open standards based mikroBUS, Grove and
> > +QWIIC headers among other interfaces.
> > +
> > +Further information can be found at:
> > +
> > +* Product Page: https://beagleplay.org/
> > +* Hardware documentation: https://git.beagleboard.org/beagleplay/beagleplay
> > +
> > +Boot Flow:
> > +----------
> > +Below is the pictorial representation of boot flow:
> > +
> > +.. image:: img/boot_diagram_k3_current.svg
> > +  :alt: Boot flow diagram
> > +
> > +- On this platform, 'TI Foundational Security' (TIFS) functions as the
> > +  security enclave master while 'Device Manager' (DM), also known as the
> > +  'TISCI server' in "TI terminology", offers all the essential services.
> > +  The A53/M4F (Aux core) sends requests to TIFS/DM to accomplish these
> > +  services, as illustrated in the diagram above.
> > +
> > +Sources:
> > +--------
> > +.. include::  k3.rst
> > +    :start-after: .. k3_rst_include_start_boot_sources
> > +    :end-before: .. k3_rst_include_end_boot_sources
> > +
> > +Build procedure:
> > +----------------
> > +0. Setup the environment variables:
> > +
> > +.. include::  k3.rst
> > +    :start-after: .. k3_rst_include_start_common_env_vars_desc
> > +    :end-before: .. k3_rst_include_end_common_env_vars_desc
> > +
> > +.. include::  k3.rst
> > +    :start-after: .. k3_rst_include_start_board_env_vars_desc
> > +    :end-before: .. k3_rst_include_end_board_env_vars_desc
> > +
> > +Set the variables corresponding to this platform:
> > +
> > +.. include::  k3.rst
> > +    :start-after: .. k3_rst_include_start_common_env_vars_defn
> > +    :end-before: .. k3_rst_include_end_common_env_vars_defn
> > +.. code-block:: bash
> > +
> > + $ export UBOOT_CFG_CORTEXR="am62x_evm_r5_defconfig beagleplay_r5.config"
> > + $ export UBOOT_CFG_CORTEXA="am62x_evm_a53_defconfig beagleplay_a53.config"
> > + $ export TFA_BOARD=lite
> > + $ # we dont use any extra TFA parameters
> > + $ unset TFA_EXTRA_ARGS
> > + $ export OPTEE_PLATFORM=k3-am62x
> > + $ export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y"
> > +
> > +.. include::  am62x_sk.rst
> > +    :start-after: .. am62x_evm_rst_include_start_build_steps
> > +    :end-before: .. am62x_evm_rst_include_end_build_steps
> > +
> > +Target Images
> > +--------------
> > +Copy the below images to an SD card and boot:
> > +
> > +* tiboot3-am62x-gp-evm.bin from R5 build as tiboot3.bin
> > +* tispl.bin_unsigned from Cortex-A build as tispl.bin
> > +* u-boot.img_unsigned from Cortex-A build as uboot.img
> 
> I just noticed - I think this should be u-boot.img

Thank you for catching.

> 
> Also I tried the mmc instructions and managed to brick the board. Is
Hmm.. This is just documenting what Robert has in his scripts[1]

> there a recovery procedure?

Oopsie.. Sorry you had to hit that..

> 
> I suppose I should have tries it on an SD card first. I thought that
> was what I was doing, but I didn't know about the internal mmc...

Recovery currently involves booting off sd and flashing the emmc up :(
unfortunately.. USB DFU etc are still work in progress.

A ready to go image such as [2] emmc flasher image might help speed
things up.

[1] https://git.beagleboard.org/beagleboard/repos-arm64/-/blob/main/bb-u-boot-beagleplay-mainline/suite/bookworm/debian/install-emmc.sh
[2] https://rcn-ee.net/rootfs/debian-arm64-12-bookworm-xfce-v5.10-ti/2023-08-24/
emmc flasher image
Simon Glass Aug. 25, 2023, 1:31 a.m. UTC | #18
Hi Nishanth,

On Thu, 24 Aug 2023 at 19:22, Nishanth Menon <nm@ti.com> wrote:
>
> On 19:04-20230824, Simon Glass wrote:
> > Hi Nishanth,
> >
> > On Tue, 22 Aug 2023 at 12:43, Nishanth Menon <nm@ti.com> wrote:
> > >
> > > Add base documentation for BeaglePlay
> > >
> > > Signed-off-by: Nishanth Menon <nm@ti.com>
> > > ---
> > > Cc: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> > >
> > > Changes Since V3:
> > > * Updated documentation to give a more clear overview of MMC partitions
> > >   and flashing information.
> > > * Added OpenOCD debug documentation
> > > * Added LED status information and indication of various boot stages
> > >
> > > V3: https://lore.kernel.org/all/20230815164440.2713726-5-nm@ti.com/
> > > V2: https://lore.kernel.org/u-boot/20230727234446.3651836-5-nm@ti.com/
> > > V1: https://lore.kernel.org/all/20230725185253.2123433-7-nm@ti.com/
> > >
> > >  doc/board/ti/am62x_beagleplay.rst    | 256 ++++++++++
> > >  doc/board/ti/img/beagleplay_emmc.svg | 697 +++++++++++++++++++++++++++
> > >  doc/board/ti/k3.rst                  |   1 +
> > >  3 files changed, 954 insertions(+)
> > >  create mode 100644 doc/board/ti/am62x_beagleplay.rst
> > >  create mode 100644 doc/board/ti/img/beagleplay_emmc.svg
> > >
> > > diff --git a/doc/board/ti/am62x_beagleplay.rst b/doc/board/ti/am62x_beagleplay.rst
> > > new file mode 100644
> > > index 000000000000..5adb7b4c9ace
> > > --- /dev/null
> > > +++ b/doc/board/ti/am62x_beagleplay.rst
> > > @@ -0,0 +1,256 @@
> > > +.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
> > > +.. sectionauthor:: Nishanth Menon <nm@ti.com>
> > > +
> > > +AM62x Beagleboard.org Beagleplay
> > > +================================
> > > +
> > > +Introduction:
> > > +-------------
> > > +
> > > +BeagleBoard.org BeaglePlay is an easy to use, affordable open source
> > > +hardware single board computer based on the Texas Instruments AM625
> > > +SoC that allows you to create connected devices that work even at long
> > > +distances using IEEE 802.15.4g LR-WPAN and IEEE 802.3cg 10Base-T1L.
> > > +Expansion is provided over open standards based mikroBUS, Grove and
> > > +QWIIC headers among other interfaces.
> > > +
> > > +Further information can be found at:
> > > +
> > > +* Product Page: https://beagleplay.org/
> > > +* Hardware documentation: https://git.beagleboard.org/beagleplay/beagleplay
> > > +
> > > +Boot Flow:
> > > +----------
> > > +Below is the pictorial representation of boot flow:
> > > +
> > > +.. image:: img/boot_diagram_k3_current.svg
> > > +  :alt: Boot flow diagram
> > > +
> > > +- On this platform, 'TI Foundational Security' (TIFS) functions as the
> > > +  security enclave master while 'Device Manager' (DM), also known as the
> > > +  'TISCI server' in "TI terminology", offers all the essential services.
> > > +  The A53/M4F (Aux core) sends requests to TIFS/DM to accomplish these
> > > +  services, as illustrated in the diagram above.
> > > +
> > > +Sources:
> > > +--------
> > > +.. include::  k3.rst
> > > +    :start-after: .. k3_rst_include_start_boot_sources
> > > +    :end-before: .. k3_rst_include_end_boot_sources
> > > +
> > > +Build procedure:
> > > +----------------
> > > +0. Setup the environment variables:
> > > +
> > > +.. include::  k3.rst
> > > +    :start-after: .. k3_rst_include_start_common_env_vars_desc
> > > +    :end-before: .. k3_rst_include_end_common_env_vars_desc
> > > +
> > > +.. include::  k3.rst
> > > +    :start-after: .. k3_rst_include_start_board_env_vars_desc
> > > +    :end-before: .. k3_rst_include_end_board_env_vars_desc
> > > +
> > > +Set the variables corresponding to this platform:
> > > +
> > > +.. include::  k3.rst
> > > +    :start-after: .. k3_rst_include_start_common_env_vars_defn
> > > +    :end-before: .. k3_rst_include_end_common_env_vars_defn
> > > +.. code-block:: bash
> > > +
> > > + $ export UBOOT_CFG_CORTEXR="am62x_evm_r5_defconfig beagleplay_r5.config"
> > > + $ export UBOOT_CFG_CORTEXA="am62x_evm_a53_defconfig beagleplay_a53.config"
> > > + $ export TFA_BOARD=lite
> > > + $ # we dont use any extra TFA parameters
> > > + $ unset TFA_EXTRA_ARGS
> > > + $ export OPTEE_PLATFORM=k3-am62x
> > > + $ export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y"
> > > +
> > > +.. include::  am62x_sk.rst
> > > +    :start-after: .. am62x_evm_rst_include_start_build_steps
> > > +    :end-before: .. am62x_evm_rst_include_end_build_steps
> > > +
> > > +Target Images
> > > +--------------
> > > +Copy the below images to an SD card and boot:
> > > +
> > > +* tiboot3-am62x-gp-evm.bin from R5 build as tiboot3.bin
> > > +* tispl.bin_unsigned from Cortex-A build as tispl.bin
> > > +* u-boot.img_unsigned from Cortex-A build as uboot.img
> >
> > I just noticed - I think this should be u-boot.img
>
> Thank you for catching.
>
> >
> > Also I tried the mmc instructions and managed to brick the board. Is
> Hmm.. This is just documenting what Robert has in his scripts[1]
>
> > there a recovery procedure?
>
> Oopsie.. Sorry you had to hit that..
>
> >
> > I suppose I should have tries it on an SD card first. I thought that
> > was what I was doing, but I didn't know about the internal mmc...
>
> Recovery currently involves booting off sd and flashing the emmc up :(
> unfortunately.. USB DFU etc are still work in progress.

Hmm so does that mean I need an ARM machine do to the SD
boot-partition magic, or can I use a USB reader on an x86 box

>
> A ready to go image such as [2] emmc flasher image might help speed
> things up.
>
> [1] https://git.beagleboard.org/beagleboard/repos-arm64/-/blob/main/bb-u-boot-beagleplay-mainline/suite/bookworm/debian/install-emmc.sh
> [2] https://rcn-ee.net/rootfs/debian-arm64-12-bookworm-xfce-v5.10-ti/2023-08-24/
> emmc flasher image

OK thanks. I am not sure how to use those yet, but will make a note.

>
> --
> Regards,
> Nishanth Menon
> Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

Regards,
Simon
Nishanth Menon Aug. 25, 2023, 1:59 a.m. UTC | #19
On 19:31-20230824, Simon Glass wrote:
> > >
> > > Also I tried the mmc instructions and managed to brick the board. Is
> > Hmm.. This is just documenting what Robert has in his scripts[1]
> >
> > > there a recovery procedure?
> >
> > Oopsie.. Sorry you had to hit that..
> >
> > >
> > > I suppose I should have tries it on an SD card first. I thought that
> > > was what I was doing, but I didn't know about the internal mmc...
> >
> > Recovery currently involves booting off sd and flashing the emmc up :(
> > unfortunately.. USB DFU etc are still work in progress.
> 
> Hmm so does that mean I need an ARM machine do to the SD
> boot-partition magic, or can I use a USB reader on an x86 box

I just have x86box with SDcard reader - and I use Balena etcher app
image to keep my head straight.

> 
> >
> > A ready to go image such as [2] emmc flasher image might help speed
> > things up.
> >
> > [1] https://git.beagleboard.org/beagleboard/repos-arm64/-/blob/main/bb-u-boot-beagleplay-mainline/suite/bookworm/debian/install-emmc.sh
> > [2] https://rcn-ee.net/rootfs/debian-arm64-12-bookworm-xfce-v5.10-ti/2023-08-24/

I realized I just pointed you to Robert's in-work space.. rather not do
that. Sorry.

> > emmc flasher image
> 
> OK thanks. I am not sure how to use those yet, but will make a note.

Just https://etcher.balena.io/ and flash an SD card with the official
image here: https://www.beagleboard.org/distros/beagleplay-debian-11-flasher

https://files.beagle.cc/file/beagleboard-public-2021/images/am625x-emmc-flasher-debian-11.6-xfce-arm64-2023-02-04-10gb.img.xz
Neha Malcom Francis Aug. 25, 2023, 2:17 p.m. UTC | #20
Hi Simon, Tom

On 24-Aug-23 8:16 PM, Simon Glass wrote:
> Hi Tom,
> 
> On Thu, 24 Aug 2023 at 08:44, Tom Rini <trini@konsulko.com> wrote:
>>
>> On Thu, Aug 24, 2023 at 08:41:23AM -0600, Simon Glass wrote:
>>> Hi,
>>>
>>> On Thu, 24 Aug 2023 at 08:20, Tom Rini <trini@konsulko.com> wrote:
>>>>
>>>> On Thu, Aug 24, 2023 at 06:46:57PM +0530, Neha Malcom Francis wrote:
>>>>> Hi Simon, Nishanth
>>>>>
>>>>> On 24/08/23 08:57, Nishanth Menon wrote:
>>>>>> On 21:01-20230823, Simon Glass wrote:
>>>>>>> Hi Nishanth,
>>>>>>>
>>>>>>> On Wed, 23 Aug 2023 at 18:18, Nishanth Menon <nm@ti.com> wrote:
>>>>>>>>
>>>>>>>> On 17:57-20230823, Simon Glass wrote:
>>>>>>>> [...]
>>>>>>>>>> This is how we have a common bit of rST for how to build N boards,
>>>>>>>>>> without having to do a literal copy and paste N times.
>>>>>>>>>
>>>>>>>>> How about using this?
>>>>>>>>>
>>>>>>>>> https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#substitution-definitions
>>>>>>>>
>>>>>>>> I was not able to succeed with complex includes such as:
>>>>>>>> https://github.com/u-boot/u-boot/blob/master/doc/board/ti/am62x_sk.rst?plain=1#L89
>>>>>>>>
>>>>>>>> am62x complete build procedure defined once and reused in other am62x
>>>>>>>> platforms.. But the am62x build procedure itself is reused from common
>>>>>>>> k3 build steps.
>>>>>>>
>>>>>>> I followed through these instructions. I find the env vars quite
>>>>>>> confusing, since I don't really know what it is doing. It feels like a
>>>>>>> script:
>>>>>>>
>>>>>>> do $a $b $c
>>>>>>> do $f $e
>>>>>>>
>>>>>>> it is pretty hard to follow. I think it would be better to write
>>>>>>> everything out in full for each board, like rockchip does.
>>>>>>
>>>>>> Unfortunately, this is a few major steps that is repeated for
>>>>>> (currently):
>>>>>>      AM62x SK
>>>>>>      Toradex Verdin
>>>>>>      (pending: beagleplay - )
>>>>>>      (once all the dust clears up, hopefully phytec)
>>>>>>      SK-LP
>>>>>>      ....
>>>>>>
>>>>>> I have no reasonable way to offer to keep them all in sync.
>>>>>>      https://libera.irclog.whitequark.org/u-boot/2023-07-26#34662854;
>>>>>> is kind of why I went down this path.S
>>>>>>
>>>>>>>
>>>>>>> Some other minor feedback:
>>>>>>>
>>>>>>> - The 'make' lines should really have -j $(nproc) added
>>>>>>
>>>>>> Different styles of shells..
>>>>>>
>>>>>>> - The $ signs at the start of each command in the docs are a pain
>>>>>>> since it stops me copying the commands into the terminal - can you
>>>>>>> remove them?
>>>>>>
>>>>>> hehe.. "dont" let people blindly copy paste without understanding what is
>>>>>> going on argument?
>>>>>>
>>>>>> If folks are OK, I sure can send a different patch series for that.. (or
>>>>>> maybe motivate someone to do that instead of me ;))
>>>>>>
>>>>>>
>>>>>>> - It doesn't build for me:
>>>>>>>
>>>>>>>     BINMAN  .binman_stamp
>>>>>>> Image 'ti-dm' is missing external blobs and is non-functional: blob-ext
>>>>>>>
>>>>>>> /binman/ti-dm/blob-ext (ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f):
>>>>>>>      Missing blob
>>>>>>>
>>>>>>> Some images are invalid
>>>>>>> make[1]: *** [/scratch/sglass/cosarm/src/third_party/u-boot/files/Makefile:1115:
>>>>>>> .binman_stamp] Error 103
>>>>>>> make[1]: Leaving directory '/tmp/b/play'
>>>>>>> make: *** [Makefile:177: sub-make] Error 2
>>>>>>
>>>>>>
>>>>>> ^^ Neha: This is what I was complaining about.
>>>>>>
>>>>>> https://u-boot.readthedocs.io/en/latest/board/ti/am62x_sk.html?highlight=am62#sources
>>>>>>
>>>>>> source: https://git.ti.com/git/processor-firmware/ti-linux-firmware.git
>>>>>> is missing, we never used to break build previously binman converted now does.
>>>>>>
>>>>>> I am wondering if I need to explicitly call out git clone instructions
>>>>>> out..
>>>>>>
>>>>>
>>>>> Right... this does seem to be a complaint that keeps coming up.
>>>>>
>>>>> Simon, my intention at the time of sending out the patch was that anyone
>>>>> building the board should "not NOT" have the DM binary. The way we
>>>>> structured the filename was that it looks at BINMAN_INDIRS to find
>>>>> ti-dm/ipc_echo_testb_mcu1_0_release_strip.xer5f but I guess this is a
>>>>> confusing way to put it across. Maybe we should rework that. Or not throw an
>>>>> error at all when DM isn't found.
>>>>
>>>> Well, is DM required or not? If it's optional, we have flags to mark it
>>>> optional.  If it's required, we have flags for make and buildman to tell
>>>> binman "fake it".  I am wondering if we still have the ability to have a
>>>> more verbose "need it, can't find it" error message, and so that's where
>>>> it should say that you forgot to set BINMAN_INDIRS or clone the firmware
>>>> repository.
>>>
>>> If it is optional, use the 'optional' tag on the entry You will get a
>>> warning but not an error. At the moment it is saying that the image is
>>> non-functional, which is not good.
>>
>> Yes, and I believe these are non-optional firmwares, so do we still have
>> the ability to produce a more specific and verbose error message?
> 
> Yes, see the 'missing-msg' tag and the 'missing-blob-help' file. This
> should work for any external block, whether missing or faked, optional
> or required,
> 

I'll take a future action to clean that up.

> Regards,
> Simon
Simon Glass Aug. 25, 2023, 11:45 p.m. UTC | #21
Hi Nishanth,

On Thu, 24 Aug 2023 at 19:59, Nishanth Menon <nm@ti.com> wrote:
>
> On 19:31-20230824, Simon Glass wrote:
> > > >
> > > > Also I tried the mmc instructions and managed to brick the board. Is
> > > Hmm.. This is just documenting what Robert has in his scripts[1]
> > >
> > > > there a recovery procedure?
> > >
> > > Oopsie.. Sorry you had to hit that..
> > >
> > > >
> > > > I suppose I should have tries it on an SD card first. I thought that
> > > > was what I was doing, but I didn't know about the internal mmc...
> > >
> > > Recovery currently involves booting off sd and flashing the emmc up :(
> > > unfortunately.. USB DFU etc are still work in progress.
> >
> > Hmm so does that mean I need an ARM machine do to the SD
> > boot-partition magic, or can I use a USB reader on an x86 box
>
> I just have x86box with SDcard reader - and I use Balena etcher app
> image to keep my head straight.
>
> >
> > >
> > > A ready to go image such as [2] emmc flasher image might help speed
> > > things up.
> > >
> > > [1] https://git.beagleboard.org/beagleboard/repos-arm64/-/blob/main/bb-u-boot-beagleplay-mainline/suite/bookworm/debian/install-emmc.sh
> > > [2] https://rcn-ee.net/rootfs/debian-arm64-12-bookworm-xfce-v5.10-ti/2023-08-24/
>
> I realized I just pointed you to Robert's in-work space.. rather not do
> that. Sorry.
>
> > > emmc flasher image
> >
> > OK thanks. I am not sure how to use those yet, but will make a note.
>
> Just https://etcher.balena.io/ and flash an SD card with the official
> image here: https://www.beagleboard.org/distros/beagleplay-debian-11-flasher
>
> https://files.beagle.cc/file/beagleboard-public-2021/images/am625x-emmc-flasher-debian-11.6-xfce-arm64-2023-02-04-10gb.img.xz

OK I tried that on an SD card, but it is still bricked.

Regards,
Simon
Robert Nelson Aug. 26, 2023, 1:06 a.m. UTC | #22
> > Just https://etcher.balena.io/ and flash an SD card with the official
> > image here: https://www.beagleboard.org/distros/beagleplay-debian-11-flasher
> >
> > https://files.beagle.cc/file/beagleboard-public-2021/images/am625x-emmc-flasher-debian-11.6-xfce-arm64-2023-02-04-10gb.img.xz
>
> OK I tried that on an SD card, but it is still bricked.
>

Hi Simon,

I've found the bootrom can be a little too quick and you'll get stuck
on a failed eMMC bootloader.

I find it best, with power applied, if you hold both the USR and RESET
buttons down, then lift off the RESET button.. This will ensure the
bootrom/sysboot will actually load the microSD's version of u-boot.

If it's still failing, please grab this newer small August release:

That's posted here:
https://forum.beagleboard.org/t/arm64-debian-11-x-bullseye-monthly-snapshots-2023-08-05/32318
 (updated monthly)

Specifically this flasher file:
https://rcn-ee.com/rootfs/release/2023-08-05/bullseye-minimal-arm64/beagleplay-emmc-flasher-debian-11.7-minimal-arm64-2023-08-05-4gb.img.xz

Use Balena Etcher to write it directly to a microSD.

Insert microSD in
Apply Power (leds should turn on, if not hit the PWR button to wake up
the TPS...)
Next, hold both USR and RESET buttons
Now, Lift off only the RESET button
When even more leds turn on, lift up on the USR button.

At this point the serial should be loading/booting linux, and then
running the eMMC flasher in single user mode.  Within 5 minutes or so,
it should shutdown with a new image in the eMMC..

Regards,
Simon Glass Aug. 26, 2023, 2:04 a.m. UTC | #23
Hi Robert,

On Fri, 25 Aug 2023 at 19:06, Robert Nelson <robertcnelson@gmail.com> wrote:
>
> > > Just https://etcher.balena.io/ and flash an SD card with the official
> > > image here: https://www.beagleboard.org/distros/beagleplay-debian-11-flasher
> > >
> > > https://files.beagle.cc/file/beagleboard-public-2021/images/am625x-emmc-flasher-debian-11.6-xfce-arm64-2023-02-04-10gb.img.xz
> >
> > OK I tried that on an SD card, but it is still bricked.
> >
>
> Hi Simon,
>
> I've found the bootrom can be a little too quick and you'll get stuck
> on a failed eMMC bootloader.
>
> I find it best, with power applied, if you hold both the USR and RESET
> buttons down, then lift off the RESET button.. This will ensure the
> bootrom/sysboot will actually load the microSD's version of u-boot.
>
> If it's still failing, please grab this newer small August release:
>
> That's posted here:
> https://forum.beagleboard.org/t/arm64-debian-11-x-bullseye-monthly-snapshots-2023-08-05/32318
>  (updated monthly)
>
> Specifically this flasher file:
> https://rcn-ee.com/rootfs/release/2023-08-05/bullseye-minimal-arm64/beagleplay-emmc-flasher-debian-11.7-minimal-arm64-2023-08-05-4gb.img.xz
>
> Use Balena Etcher to write it directly to a microSD.
>
> Insert microSD in
> Apply Power (leds should turn on, if not hit the PWR button to wake up
> the TPS...)
> Next, hold both USR and RESET buttons
> Now, Lift off only the RESET button
> When even more leds turn on, lift up on the USR button.
>
> At this point the serial should be loading/booting linux, and then
> running the eMMC flasher in single user mode.  Within 5 minutes or so,
> it should shutdown with a new image in the eMMC..

Thank you, that worked!

Regards,
Simon
Nishanth Menon Aug. 28, 2023, 1:01 p.m. UTC | #24
On 20:04-20230825, Simon Glass wrote:
> Hi Robert,
> 
> On Fri, 25 Aug 2023 at 19:06, Robert Nelson <robertcnelson@gmail.com> wrote:
> >
> > > > Just https://etcher.balena.io/ and flash an SD card with the official
> > > > image here: https://www.beagleboard.org/distros/beagleplay-debian-11-flasher
> > > >
> > > > https://files.beagle.cc/file/beagleboard-public-2021/images/am625x-emmc-flasher-debian-11.6-xfce-arm64-2023-02-04-10gb.img.xz
> > >
> > > OK I tried that on an SD card, but it is still bricked.
> > >
> >
> > Hi Simon,
> >
> > I've found the bootrom can be a little too quick and you'll get stuck
> > on a failed eMMC bootloader.
> >
> > I find it best, with power applied, if you hold both the USR and RESET
> > buttons down, then lift off the RESET button.. This will ensure the
> > bootrom/sysboot will actually load the microSD's version of u-boot.
> >
> > If it's still failing, please grab this newer small August release:
> >
> > That's posted here:
> > https://forum.beagleboard.org/t/arm64-debian-11-x-bullseye-monthly-snapshots-2023-08-05/32318
> >  (updated monthly)
> >
> > Specifically this flasher file:
> > https://rcn-ee.com/rootfs/release/2023-08-05/bullseye-minimal-arm64/beagleplay-emmc-flasher-debian-11.7-minimal-arm64-2023-08-05-4gb.img.xz
> >
> > Use Balena Etcher to write it directly to a microSD.
> >
> > Insert microSD in
> > Apply Power (leds should turn on, if not hit the PWR button to wake up
> > the TPS...)
> > Next, hold both USR and RESET buttons
> > Now, Lift off only the RESET button
> > When even more leds turn on, lift up on the USR button.
> >
> > At this point the serial should be loading/booting linux, and then
> > running the eMMC flasher in single user mode.  Within 5 minutes or so,
> > it should shutdown with a new image in the eMMC..
> 
> Thank you, that worked!

Thanks Robert, I did not know of that little trick. Once the everything
settles down in master, will patch that little secret into the
documentation as well.
diff mbox series

Patch

diff --git a/doc/board/ti/am62x_beagleplay.rst b/doc/board/ti/am62x_beagleplay.rst
new file mode 100644
index 000000000000..5adb7b4c9ace
--- /dev/null
+++ b/doc/board/ti/am62x_beagleplay.rst
@@ -0,0 +1,256 @@ 
+.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
+.. sectionauthor:: Nishanth Menon <nm@ti.com>
+
+AM62x Beagleboard.org Beagleplay
+================================
+
+Introduction:
+-------------
+
+BeagleBoard.org BeaglePlay is an easy to use, affordable open source
+hardware single board computer based on the Texas Instruments AM625
+SoC that allows you to create connected devices that work even at long
+distances using IEEE 802.15.4g LR-WPAN and IEEE 802.3cg 10Base-T1L.
+Expansion is provided over open standards based mikroBUS, Grove and
+QWIIC headers among other interfaces.
+
+Further information can be found at:
+
+* Product Page: https://beagleplay.org/
+* Hardware documentation: https://git.beagleboard.org/beagleplay/beagleplay
+
+Boot Flow:
+----------
+Below is the pictorial representation of boot flow:
+
+.. image:: img/boot_diagram_k3_current.svg
+  :alt: Boot flow diagram
+
+- On this platform, 'TI Foundational Security' (TIFS) functions as the
+  security enclave master while 'Device Manager' (DM), also known as the
+  'TISCI server' in "TI terminology", offers all the essential services.
+  The A53/M4F (Aux core) sends requests to TIFS/DM to accomplish these
+  services, as illustrated in the diagram above.
+
+Sources:
+--------
+.. include::  k3.rst
+    :start-after: .. k3_rst_include_start_boot_sources
+    :end-before: .. k3_rst_include_end_boot_sources
+
+Build procedure:
+----------------
+0. Setup the environment variables:
+
+.. include::  k3.rst
+    :start-after: .. k3_rst_include_start_common_env_vars_desc
+    :end-before: .. k3_rst_include_end_common_env_vars_desc
+
+.. include::  k3.rst
+    :start-after: .. k3_rst_include_start_board_env_vars_desc
+    :end-before: .. k3_rst_include_end_board_env_vars_desc
+
+Set the variables corresponding to this platform:
+
+.. include::  k3.rst
+    :start-after: .. k3_rst_include_start_common_env_vars_defn
+    :end-before: .. k3_rst_include_end_common_env_vars_defn
+.. code-block:: bash
+
+ $ export UBOOT_CFG_CORTEXR="am62x_evm_r5_defconfig beagleplay_r5.config"
+ $ export UBOOT_CFG_CORTEXA="am62x_evm_a53_defconfig beagleplay_a53.config"
+ $ export TFA_BOARD=lite
+ $ # we dont use any extra TFA parameters
+ $ unset TFA_EXTRA_ARGS
+ $ export OPTEE_PLATFORM=k3-am62x
+ $ export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y"
+
+.. include::  am62x_sk.rst
+    :start-after: .. am62x_evm_rst_include_start_build_steps
+    :end-before: .. am62x_evm_rst_include_end_build_steps
+
+Target Images
+--------------
+Copy the below images to an SD card and boot:
+
+* tiboot3-am62x-gp-evm.bin from R5 build as tiboot3.bin
+* tispl.bin_unsigned from Cortex-A build as tispl.bin
+* u-boot.img_unsigned from Cortex-A build as uboot.img
+
+Image formats:
+--------------
+
+- tiboot3.bin
+
+.. image:: img/multi_cert_tiboot3.bin.svg
+  :alt: tiboot3.bin image format
+
+- tispl.bin
+
+.. image:: img/dm_tispl.bin.svg
+  :alt: tispl.bin image format
+
+Flash to eMMC
+-------------
+
+The eMMC layout selected is user-friendly for developers. The
+boot hardware partition of the eMMC only contains the fixed-size
+tiboot3.bin image. This is because the contents of the boot partitions
+need to run from the SoC's internal SRAM, which remains a fixed size
+constant. The other components of the boot sequence, such as tispl.bin
+and u-boot.img, are located in the /BOOT partition in the User Defined
+Area (UDA) hardware partition of the eMMC. These components can vary
+significantly in size, so readjusting the boot partition offsets is
+not practical.
+
+.. image:: img/beagleplay_emmc.svg
+  :alt: eMMC partitions and boot file organization for BeaglePlay
+
+The following are the steps from Linux shell to program eMMC:
+
+.. code-block:: bash
+
+  # # Enable Boot0 boot
+  # mmc bootpart enable 1 2 /dev/mmcblk0
+  # mmc bootbus set single_backward x1 x8 /dev/mmcblk0
+  # mmc hwreset enable /dev/mmcblk0
+
+  # # Clear eMMC boot0
+  # echo '0' >> /sys/class/block/mmcblk0boot0/force_ro
+  # dd if=/dev/zero of=/dev/mmcblk0boot0 count=32 bs=128k
+  # # Write tiboot3.bin
+  # dd if=tiboot3.bin of=/dev/mmcblk0boot0 bs=128k
+
+  # # Copy the rest of the boot binaries
+  # mount /dev/mmcblk0p1 /boot/firmware
+  # cp tispl.bin /boot/firmware
+  # cp u-boot.img /boot/firmware
+  # sync
+
+.. warning ::
+
+  The U-Boot is configured to prioritize booting from an SD card if
+  it detects a valid boot partition and boot files on it, even if the
+  system initially booted from eMMC. The boot order is set as follows:
+
+  * SD/MMC
+  * eMMC
+  * USB
+  * PXE
+
+LED patterns during boot
+------------------------
+
+.. list-table:: USR LED status indication
+   :widths: 16 16
+   :header-rows: 1
+
+   * - USR LEDs (012345)
+     - Indicates
+
+   * - 00000
+     - Boot failure or R5 image not started up
+
+   * - 11111
+     - A53 SPL/U-boot has started up
+
+   * - 10101
+     - OS boot process has been initiated
+
+   * - 01010
+     - OS boot process failed and drops to U-Boot shell
+
+.. note ::
+
+  In the table above, 0 indicates LED switched off and 1 indicates LED
+  switched ON.
+
+.. warning ::
+
+  If the "red" power LED is not glowing, the system power supply is not
+  functional. Please refer to `BeaglePlay documentation
+  <https://beagleplay.org/>`_ for further information.
+
+A53 SPL DDR Memory Layout
+-------------------------
+
+.. include::  am62x_sk.rst
+    :start-after: .. am62x_evm_rst_include_start_ddr_mem_layout
+    :end-before: .. am62x_evm_rst_include_end_ddr_mem_layout
+
+Switch Setting for Boot Mode
+----------------------------
+
+The boot time option is configured via "USR" button on the board.
+See `Beagleplay Schematics <https://git.beagleboard.org/beagleplay/beagleplay/-/blob/main/BeaglePlay_sch.pdf>`_
+for details.
+
+.. list-table:: Boot Modes
+   :widths: 16 16 16
+   :header-rows: 1
+
+   * - USR Switch Position
+     - Primary Boot
+     - Secondary Boot
+
+   * - Not Pressed
+     - eMMC
+     - UART
+
+   * - Pressed
+     - SD/MMC File System (FS) mode
+     - USB Device Firmware Upgrade (DFU) mode
+
+To switch to SD card boot mode, hold the USR button while powering on
+with Type-C power supply, then release when power LED lights up.
+
+Debugging U-Boot
+----------------
+
+See :ref:`Common Debugging environment - OpenOCD<k3_rst_refer_openocd>`: for
+detailed setup and debugging information.
+
+.. warning::
+
+  **OpenOCD support since**: v0.12.0
+
+  If the default package version of OpenOCD in your development
+  environment's distribution needs to be updated, it might be necessary to
+  build OpenOCD from the source.
+
+.. include::  k3.rst
+    :start-after: .. k3_rst_include_start_openocd_connect_tag_connect
+    :end-before: .. k3_rst_include_end_openocd_connect_tag_connect
+
+.. include::  k3.rst
+    :start-after: .. k3_rst_include_start_openocd_cfg_external_intro
+    :end-before: .. k3_rst_include_end_openocd_cfg_external_intro
+
+For example, with BeaglePlay (AM62X platform), the openocd_connect.cfg:
+
+.. code-block:: tcl
+
+  # TUMPA example:
+  # http://www.tiaowiki.com/w/TIAO_USB_Multi_Protocol_Adapter_User's_Manual
+  source [find interface/ftdi/tumpa.cfg]
+
+  transport select jtag
+
+  # default JTAG configuration has only SRST and no TRST
+  reset_config srst_only srst_push_pull
+
+  # delay after SRST goes inactive
+  adapter srst delay 20
+
+  if { ![info exists SOC] } {
+    # Set the SoC of interest
+    set SOC am625
+  }
+
+  source [find target/ti_k3.cfg]
+
+  ftdi tdo_sample_edge falling
+
+  # Speeds for FT2232H are in multiples of 2, and 32MHz is tops
+  # max speed we seem to achieve is ~20MHz.. so we pick 16MHz
+  adapter speed 16000
diff --git a/doc/board/ti/img/beagleplay_emmc.svg b/doc/board/ti/img/beagleplay_emmc.svg
new file mode 100644
index 000000000000..2dec871d6fdd
--- /dev/null
+++ b/doc/board/ti/img/beagleplay_emmc.svg
@@ -0,0 +1,697 @@ 
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--SPDX-License-Identifier: GPL-2.0-or-later OR BSD-3-Clause-->
+
+<!--Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/-->
+
+<svg
+   version="1.1"
+   width="771px"
+   height="351px"
+   viewBox="-0.5 -0.5 771 351"
+   id="svg142"
+   sodipodi:docname="beagleplay_emmc.svg"
+   inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns:xhtml="http://www.w3.org/1999/xhtml">
+  <sodipodi:namedview
+     id="namedview144"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     inkscape:pagecheckerboard="0"
+     showgrid="false"
+     inkscape:zoom="1.460441"
+     inkscape:cx="380.0222"
+     inkscape:cy="175.28952"
+     inkscape:window-width="3440"
+     inkscape:window-height="1416"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="g18" />
+  <defs
+     id="defs2" />
+  <g
+     id="g132">
+    <rect
+       x="90"
+       y="0"
+       width="120"
+       height="60"
+       fill="rgb(255, 255, 255)"
+       stroke="rgb(0, 0, 0)"
+       pointer-events="all"
+       id="rect4" />
+    <rect
+       x="210"
+       y="0"
+       width="120"
+       height="60"
+       fill="rgb(255, 255, 255)"
+       stroke="rgb(0, 0, 0)"
+       pointer-events="all"
+       id="rect6" />
+    <rect
+       x="330"
+       y="0"
+       width="120"
+       height="60"
+       fill="rgb(255, 255, 255)"
+       stroke="rgb(0, 0, 0)"
+       pointer-events="all"
+       id="rect8" />
+    <rect
+       x="450"
+       y="0"
+       width="320"
+       height="60"
+       fill="rgb(255, 255, 255)"
+       stroke="rgb(0, 0, 0)"
+       pointer-events="all"
+       id="rect10" />
+    <rect
+       x="120"
+       y="15"
+       width="60"
+       height="30"
+       fill="none"
+       stroke="none"
+       pointer-events="all"
+       id="rect12" />
+    <g
+       transform="translate(-0.5 -0.5)"
+       id="g18">
+      <switch
+         id="switch16">
+        <foreignObject
+           pointer-events="none"
+           width="100%"
+           height="100%"
+           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
+           style="overflow: visible; text-align: left;">
+          <xhtml:div
+             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 30px; margin-left: 121px;">
+            <xhtml:div
+               data-drawio-colors="color: rgb(0, 0, 0); "
+               style="box-sizing: border-box; font-size: 0px; text-align: center;">
+              <xhtml:div
+                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Boot0</xhtml:div>
+            </xhtml:div>
+          </xhtml:div>
+        </foreignObject>
+        <text
+           x="150"
+           y="34"
+           fill="#000000"
+           font-family="Helvetica"
+           font-size="12px"
+           text-anchor="middle"
+           id="text14">Boot0</text>
+      </switch>
+    </g>
+    <rect
+       x="240"
+       y="15"
+       width="60"
+       height="30"
+       fill="none"
+       stroke="none"
+       pointer-events="all"
+       id="rect20" />
+    <g
+       transform="translate(-0.5 -0.5)"
+       id="g26">
+      <switch
+         id="switch24">
+        <foreignObject
+           pointer-events="none"
+           width="100%"
+           height="100%"
+           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
+           style="overflow: visible; text-align: left;">
+          <xhtml:div
+             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 30px; margin-left: 241px;">
+            <xhtml:div
+               data-drawio-colors="color: rgb(0, 0, 0); "
+               style="box-sizing: border-box; font-size: 0px; text-align: center;">
+              <xhtml:div
+                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Boot1</xhtml:div>
+            </xhtml:div>
+          </xhtml:div>
+        </foreignObject>
+        <text
+           x="270"
+           y="34"
+           fill="rgb(0, 0, 0)"
+           font-family="Helvetica"
+           font-size="12px"
+           text-anchor="middle"
+           id="text22">Boot1</text>
+      </switch>
+    </g>
+    <rect
+       x="360"
+       y="15"
+       width="60"
+       height="30"
+       fill="none"
+       stroke="none"
+       pointer-events="all"
+       id="rect28" />
+    <g
+       transform="translate(-0.5 -0.5)"
+       id="g34">
+      <switch
+         id="switch32">
+        <foreignObject
+           pointer-events="none"
+           width="100%"
+           height="100%"
+           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
+           style="overflow: visible; text-align: left;">
+          <xhtml:div
+             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 30px; margin-left: 361px;">
+            <xhtml:div
+               data-drawio-colors="color: rgb(0, 0, 0); "
+               style="box-sizing: border-box; font-size: 0px; text-align: center;">
+              <xhtml:div
+                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">RPMB</xhtml:div>
+            </xhtml:div>
+          </xhtml:div>
+        </foreignObject>
+        <text
+           x="390"
+           y="34"
+           fill="rgb(0, 0, 0)"
+           font-family="Helvetica"
+           font-size="12px"
+           text-anchor="middle"
+           id="text30">RPMB</text>
+      </switch>
+    </g>
+    <rect
+       x="480"
+       y="15"
+       width="280"
+       height="30"
+       fill="none"
+       stroke="none"
+       pointer-events="all"
+       id="rect36" />
+    <g
+       transform="translate(-0.5 -0.5)"
+       id="g42">
+      <switch
+         id="switch40">
+        <foreignObject
+           pointer-events="none"
+           width="100%"
+           height="100%"
+           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
+           style="overflow: visible; text-align: left;">
+          <xhtml:div
+             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 278px; height: 1px; padding-top: 30px; margin-left: 481px;">
+            <xhtml:div
+               data-drawio-colors="color: rgb(0, 0, 0); "
+               style="box-sizing: border-box; font-size: 0px; text-align: center;">
+              <xhtml:div
+                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">User Defined Area (UDA)</xhtml:div>
+            </xhtml:div>
+          </xhtml:div>
+        </foreignObject>
+        <text
+           x="620"
+           y="34"
+           fill="rgb(0, 0, 0)"
+           font-family="Helvetica"
+           font-size="12px"
+           text-anchor="middle"
+           id="text38">User Defined Area (UDA)</text>
+      </switch>
+    </g>
+    <rect
+       x="450"
+       y="60"
+       width="70"
+       height="60"
+       rx="9"
+       ry="9"
+       fill="rgb(255, 255, 255)"
+       stroke="rgb(0, 0, 0)"
+       pointer-events="all"
+       id="rect44" />
+    <g
+       transform="translate(-0.5 -0.5)"
+       id="g50">
+      <switch
+         id="switch48">
+        <foreignObject
+           pointer-events="none"
+           width="100%"
+           height="100%"
+           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
+           style="overflow: visible; text-align: left;">
+          <xhtml:div
+             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 68px; height: 1px; padding-top: 90px; margin-left: 451px;">
+            <xhtml:div
+               data-drawio-colors="color: rgb(0, 0, 0); "
+               style="box-sizing: border-box; font-size: 0px; text-align: center;">
+              <xhtml:div
+                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">BOOT</xhtml:div>
+            </xhtml:div>
+          </xhtml:div>
+        </foreignObject>
+        <text
+           x="485"
+           y="94"
+           fill="rgb(0, 0, 0)"
+           font-family="Helvetica"
+           font-size="12px"
+           text-anchor="middle"
+           id="text46">BOOT</text>
+      </switch>
+    </g>
+    <rect
+       x="520"
+       y="60"
+       width="120"
+       height="60"
+       rx="9"
+       ry="9"
+       fill="rgb(255, 255, 255)"
+       stroke="rgb(0, 0, 0)"
+       pointer-events="all"
+       id="rect52" />
+    <g
+       transform="translate(-0.5 -0.5)"
+       id="g58">
+      <switch
+         id="switch56">
+        <foreignObject
+           pointer-events="none"
+           width="100%"
+           height="100%"
+           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
+           style="overflow: visible; text-align: left;">
+          <xhtml:div
+             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 90px; margin-left: 521px;">
+            <xhtml:div
+               data-drawio-colors="color: rgb(0, 0, 0); "
+               style="box-sizing: border-box; font-size: 0px; text-align: center;">
+              <xhtml:div
+                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">rootfs</xhtml:div>
+            </xhtml:div>
+          </xhtml:div>
+        </foreignObject>
+        <text
+           x="580"
+           y="94"
+           fill="rgb(0, 0, 0)"
+           font-family="Helvetica"
+           font-size="12px"
+           text-anchor="middle"
+           id="text54">rootfs</text>
+      </switch>
+    </g>
+    <rect
+       x="700"
+       y="60"
+       width="70"
+       height="60"
+       rx="9"
+       ry="9"
+       fill="rgb(255, 255, 255)"
+       stroke="rgb(0, 0, 0)"
+       pointer-events="all"
+       id="rect60" />
+    <g
+       transform="translate(-0.5 -0.5)"
+       id="g66">
+      <switch
+         id="switch64">
+        <foreignObject
+           pointer-events="none"
+           width="100%"
+           height="100%"
+           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
+           style="overflow: visible; text-align: left;">
+          <xhtml:div
+             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 68px; height: 1px; padding-top: 90px; margin-left: 701px;">
+            <xhtml:div
+               data-drawio-colors="color: rgb(0, 0, 0); "
+               style="box-sizing: border-box; font-size: 0px; text-align: center;">
+              <xhtml:div
+                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">swap</xhtml:div>
+            </xhtml:div>
+          </xhtml:div>
+        </foreignObject>
+        <text
+           x="735"
+           y="94"
+           fill="rgb(0, 0, 0)"
+           font-family="Helvetica"
+           font-size="12px"
+           text-anchor="middle"
+           id="text62">swap</text>
+      </switch>
+    </g>
+    <rect
+       x="640"
+       y="60"
+       width="60"
+       height="60"
+       rx="9"
+       ry="9"
+       fill="rgb(255, 255, 255)"
+       stroke="rgb(0, 0, 0)"
+       pointer-events="all"
+       id="rect68" />
+    <g
+       transform="translate(-0.5 -0.5)"
+       id="g74">
+      <switch
+         id="switch72">
+        <foreignObject
+           pointer-events="none"
+           width="100%"
+           height="100%"
+           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
+           style="overflow: visible; text-align: left;">
+          <xhtml:div
+             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 90px; margin-left: 641px;">
+            <xhtml:div
+               data-drawio-colors="color: rgb(0, 0, 0); "
+               style="box-sizing: border-box; font-size: 0px; text-align: center;">
+              <xhtml:div
+                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">...</xhtml:div>
+            </xhtml:div>
+          </xhtml:div>
+        </foreignObject>
+        <text
+           x="670"
+           y="94"
+           fill="rgb(0, 0, 0)"
+           font-family="Helvetica"
+           font-size="12px"
+           text-anchor="middle"
+           id="text70">...</text>
+      </switch>
+    </g>
+    <path
+       d="M 130 130 L 180 130 L 180 180 L 100 180 L 100 160 Z"
+       fill="#f8cecc"
+       stroke="#b85450"
+       stroke-miterlimit="10"
+       pointer-events="all"
+       id="path76" />
+    <g
+       transform="translate(-0.5 -0.5)"
+       id="g82">
+      <switch
+         id="switch80">
+        <foreignObject
+           pointer-events="none"
+           width="100%"
+           height="100%"
+           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
+           style="overflow: visible; text-align: left;">
+          <xhtml:div
+             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 155px; margin-left: 101px;">
+            <xhtml:div
+               data-drawio-colors="color: rgb(0, 0, 0); "
+               style="box-sizing: border-box; font-size: 0px; text-align: center;">
+              <xhtml:div
+                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">tiboot3.bin</xhtml:div>
+            </xhtml:div>
+          </xhtml:div>
+        </foreignObject>
+        <text
+           x="140"
+           y="159"
+           fill="rgb(0, 0, 0)"
+           font-family="Helvetica"
+           font-size="12px"
+           text-anchor="middle"
+           id="text78">tiboot3.bin</text>
+      </switch>
+    </g>
+    <path
+       d="M 470 130 L 520 130 L 520 180 L 440 180 L 440 160 Z"
+       fill="#d5e8d4"
+       stroke="#82b366"
+       stroke-miterlimit="10"
+       pointer-events="all"
+       id="path84" />
+    <g
+       transform="translate(-0.5 -0.5)"
+       id="g90">
+      <switch
+         id="switch88">
+        <foreignObject
+           pointer-events="none"
+           width="100%"
+           height="100%"
+           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
+           style="overflow: visible; text-align: left;">
+          <xhtml:div
+             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 155px; margin-left: 441px;">
+            <xhtml:div
+               data-drawio-colors="color: rgb(0, 0, 0); "
+               style="box-sizing: border-box; font-size: 0px; text-align: center;">
+              <xhtml:div
+                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">tispl.bin</xhtml:div>
+            </xhtml:div>
+          </xhtml:div>
+        </foreignObject>
+        <text
+           x="480"
+           y="159"
+           fill="rgb(0, 0, 0)"
+           font-family="Helvetica"
+           font-size="12px"
+           text-anchor="middle"
+           id="text86">tispl.bin</text>
+      </switch>
+    </g>
+    <path
+       d="M 470 180 L 520 180 L 520 230 L 440 230 L 440 210 Z"
+       fill="#d5e8d4"
+       stroke="#82b366"
+       stroke-miterlimit="10"
+       pointer-events="all"
+       id="path92" />
+    <g
+       transform="translate(-0.5 -0.5)"
+       id="g98">
+      <switch
+         id="switch96">
+        <foreignObject
+           pointer-events="none"
+           width="100%"
+           height="100%"
+           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
+           style="overflow: visible; text-align: left;">
+          <xhtml:div
+             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 205px; margin-left: 441px;">
+            <xhtml:div
+               data-drawio-colors="color: rgb(0, 0, 0); "
+               style="box-sizing: border-box; font-size: 0px; text-align: center;">
+              <xhtml:div
+                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">u-boot.img</xhtml:div>
+            </xhtml:div>
+          </xhtml:div>
+        </foreignObject>
+        <text
+           x="480"
+           y="209"
+           fill="rgb(0, 0, 0)"
+           font-family="Helvetica"
+           font-size="12px"
+           text-anchor="middle"
+           id="text94">u-boot.img</text>
+      </switch>
+    </g>
+    <path
+       d="M 420 300 L 520 300 L 520 350 L 390 350 L 390 330 Z"
+       fill="#e1d5e7"
+       stroke="#9673a6"
+       stroke-miterlimit="10"
+       pointer-events="all"
+       id="path100" />
+    <g
+       transform="translate(-0.5 -0.5)"
+       id="g106">
+      <switch
+         id="switch104">
+        <foreignObject
+           pointer-events="none"
+           width="100%"
+           height="100%"
+           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
+           style="overflow: visible; text-align: left;">
+          <xhtml:div
+             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 128px; height: 1px; padding-top: 325px; margin-left: 391px;">
+            <xhtml:div
+               data-drawio-colors="color: rgb(0, 0, 0); "
+               style="box-sizing: border-box; font-size: 0px; text-align: center;">
+              <xhtml:div
+                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">extlinux/extlinux.conf</xhtml:div>
+            </xhtml:div>
+          </xhtml:div>
+        </foreignObject>
+        <text
+           x="455"
+           y="329"
+           fill="rgb(0, 0, 0)"
+           font-family="Helvetica"
+           font-size="12px"
+           text-anchor="middle"
+           id="text102">extlinux/extlinux.conf</text>
+      </switch>
+    </g>
+    <path
+       d="M 420 240 L 520 240 L 520 290 L 390 290 L 390 270 Z"
+       fill="#dae8fc"
+       stroke="#6c8ebf"
+       stroke-miterlimit="10"
+       pointer-events="all"
+       id="path108" />
+    <g
+       transform="translate(-0.5 -0.5)"
+       id="g114">
+      <switch
+         id="switch112">
+        <foreignObject
+           pointer-events="none"
+           width="100%"
+           height="100%"
+           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
+           style="overflow: visible; text-align: left;">
+          <xhtml:div
+             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 128px; height: 1px; padding-top: 265px; margin-left: 391px;">
+            <xhtml:div
+               data-drawio-colors="color: rgb(0, 0, 0); "
+               style="box-sizing: border-box; font-size: 0px; text-align: center;">
+              <xhtml:div
+                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">uEnv.txt / boot.scr<xhtml:br />
+(optional)</xhtml:div>
+            </xhtml:div>
+          </xhtml:div>
+        </foreignObject>
+        <text
+           x="455"
+           y="269"
+           fill="rgb(0, 0, 0)"
+           font-family="Helvetica"
+           font-size="12px"
+           text-anchor="middle"
+           id="text110">uEnv.txt / boot.scr...</text>
+      </switch>
+    </g>
+    <rect
+       x="0"
+       y="15"
+       width="60"
+       height="30"
+       fill="none"
+       stroke="none"
+       pointer-events="all"
+       id="rect116" />
+    <g
+       transform="translate(-0.5 -0.5)"
+       id="g122">
+      <switch
+         id="switch120">
+        <foreignObject
+           pointer-events="none"
+           width="100%"
+           height="100%"
+           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
+           style="overflow: visible; text-align: left;">
+          <xhtml:div
+             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 30px; margin-left: 1px;">
+            <xhtml:div
+               data-drawio-colors="color: rgb(0, 0, 0); "
+               style="box-sizing: border-box; font-size: 0px; text-align: center;">
+              <xhtml:div
+                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">eMMC<xhtml:br />
+hardware partitions</xhtml:div>
+            </xhtml:div>
+          </xhtml:div>
+        </foreignObject>
+        <text
+           x="30"
+           y="34"
+           fill="rgb(0, 0, 0)"
+           font-family="Helvetica"
+           font-size="12px"
+           text-anchor="middle"
+           id="text118">eMMC...</text>
+      </switch>
+    </g>
+    <rect
+       x="365"
+       y="75"
+       width="60"
+       height="30"
+       fill="none"
+       stroke="none"
+       pointer-events="all"
+       id="rect124" />
+    <g
+       transform="translate(-0.5 -0.5)"
+       id="g130">
+      <switch
+         id="switch128">
+        <foreignObject
+           pointer-events="none"
+           width="100%"
+           height="100%"
+           requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
+           style="overflow: visible; text-align: left;">
+          <xhtml:div
+             style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 90px; margin-left: 366px;">
+            <xhtml:div
+               data-drawio-colors="color: rgb(0, 0, 0); "
+               style="box-sizing: border-box; font-size: 0px; text-align: center;">
+              <xhtml:div
+                 style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">UDA partitions</xhtml:div>
+            </xhtml:div>
+          </xhtml:div>
+        </foreignObject>
+        <text
+           x="395"
+           y="94"
+           fill="rgb(0, 0, 0)"
+           font-family="Helvetica"
+           font-size="12px"
+           text-anchor="middle"
+           id="text126">UDA partit...</text>
+      </switch>
+    </g>
+  </g>
+  <switch
+     id="switch140">
+    <g
+       requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
+       id="g134" />
+    <a
+       transform="translate(0,-5)"
+       xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems"
+       target="_blank"
+       id="a138">
+      <text
+         text-anchor="middle"
+         font-size="10px"
+         x="50%"
+         y="100%"
+         id="text136">Text is not SVG - cannot display</text>
+    </a>
+  </switch>
+</svg>
diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst
index 5f9bd4dfcbe9..ef31ccd12a42 100644
--- a/doc/board/ti/k3.rst
+++ b/doc/board/ti/k3.rst
@@ -30,6 +30,7 @@  K3 Based SoCs
 .. toctree::
    :maxdepth: 1
 
+   am62x_beagleplay
    am62x_sk
    ../toradex/verdin-am62
    am64x_evm