Wadim Egorov | 1edb098 | 2024-02-28 09:42:17 +0100 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | .. sectionauthor:: Wadim Egorov <w.egorov@phytec.de> |
| 3 | |
| 4 | phyCORE-AM64x |
| 5 | ============= |
| 6 | |
| 7 | The `phyCORE-AM64x <https://www.phytec.com/product/phycore-am64x>`_ is a |
| 8 | SoM (System on Module) featuring TI's AM64x SoC. It can be used in combination |
| 9 | with different carrier boards. This module can come with different sizes and |
| 10 | models for DDR, eMMC, SPI NOR Flash and various SoCs from the AM64x family. |
| 11 | |
| 12 | A development Kit, called `phyBOARD-Lyra <https://www.phytec.com/product/phyboard-am64x>`_ |
| 13 | is used as a carrier board reference design around the AM64x SoM. |
| 14 | |
| 15 | Quickstart |
| 16 | ---------- |
| 17 | |
| 18 | * Download sources and TI firmware blobs |
| 19 | * Build Trusted Firmware-A |
| 20 | * Build OP-TEE |
| 21 | * Build U-Boot for the R5 |
| 22 | * Build U-Boot for the A53 |
| 23 | * Create bootable uSD Card |
| 24 | * Boot |
| 25 | |
| 26 | Sources |
| 27 | ------- |
| 28 | |
| 29 | .. include:: ../ti/k3.rst |
| 30 | :start-after: .. k3_rst_include_start_boot_sources |
| 31 | :end-before: .. k3_rst_include_end_boot_sources |
| 32 | |
| 33 | Build procedure |
| 34 | --------------- |
| 35 | |
| 36 | Setup the environment variables: |
| 37 | |
| 38 | .. include:: ../ti/k3.rst |
| 39 | :start-after: .. k3_rst_include_start_common_env_vars_desc |
| 40 | :end-before: .. k3_rst_include_end_common_env_vars_desc |
| 41 | |
| 42 | .. include:: ../ti/k3.rst |
| 43 | :start-after: .. k3_rst_include_start_board_env_vars_desc |
| 44 | :end-before: .. k3_rst_include_end_board_env_vars_desc |
| 45 | |
| 46 | Set the variables corresponding to this platform: |
| 47 | |
| 48 | .. include:: ../ti/k3.rst |
| 49 | :start-after: .. k3_rst_include_start_common_env_vars_defn |
| 50 | :end-before: .. k3_rst_include_end_common_env_vars_defn |
| 51 | .. code-block:: bash |
| 52 | |
| 53 | $ export UBOOT_CFG_CORTEXR=phycore_am64x_r5_defconfig |
| 54 | $ export UBOOT_CFG_CORTEXA=phycore_am64x_a53_defconfig |
| 55 | $ export TFA_BOARD=lite |
| 56 | $ # we don't use any extra TFA parameters |
| 57 | $ unset TFA_EXTRA_ARGS |
| 58 | $ export OPTEE_PLATFORM=k3-am64x |
| 59 | # we don't use any extra OPTEE parameters |
| 60 | unset OPTEE_EXTRA_ARGS |
| 61 | |
| 62 | .. include:: ../ti/am62x_sk.rst |
| 63 | :start-after: .. am62x_evm_rst_include_start_build_steps |
| 64 | :end-before: .. am62x_evm_rst_include_end_build_steps |
| 65 | |
| 66 | uSD Card creation |
| 67 | ----------------- |
| 68 | |
| 69 | Use fdisk to partition the uSD card. The layout should look similar to: |
| 70 | |
| 71 | .. code-block:: bash |
| 72 | |
| 73 | $ sudo fdisk -l /dev/mmcblk0 |
| 74 | Disk /dev/mmcblk0: 7.56 GiB, 8120172544 bytes, 15859712 sectors |
| 75 | Units: sectors of 1 * 512 = 512 bytes |
| 76 | Sector size (logical/physical): 512 bytes / 512 bytes |
| 77 | I/O size (minimum/optimal): 512 bytes / 512 bytes |
| 78 | Disklabel type: dos |
| 79 | Disk identifier: 0x6583d9a3 |
| 80 | |
| 81 | Device Boot Start End Sectors Size Id Type |
| 82 | /dev/mmcblk0p1 * 2048 264191 262144 128M c W95 FAT32 (LBA) |
| 83 | /dev/mmcblk0p2 264192 1934953 1670762 815.8M 83 Linux |
| 84 | |
| 85 | |
| 86 | Once partitioned, the boot partition has to be formatted with a FAT filesystem. |
| 87 | Assuming the uSD card is `/dev/mmcblk0`: |
| 88 | |
| 89 | .. code-block:: bash |
| 90 | |
| 91 | $ mkfs.vfat /dev/mmcblk0p1 |
| 92 | |
| 93 | To boot from a micro SD card on a HSFS device simply copy the following |
| 94 | artifacts to the FAT partition: |
| 95 | |
| 96 | * tiboot3.bin from R5 build |
| 97 | * tispl.bin from Cortex-A build |
| 98 | * u-boot.img from Cortex-A build |
| 99 | |
| 100 | Boot |
| 101 | ---- |
| 102 | |
| 103 | Put the uSD card in the slot on the board and apply power. Check the serial |
| 104 | console for output. |
| 105 | |
| 106 | Flash to SPI NOR |
| 107 | ---------------- |
| 108 | |
| 109 | Below commands can be used to flash the SPI NOR flash; assuming |
| 110 | tiboot3.bin, tispl.bin and u-boot.img are stored on the uSD card. |
| 111 | |
| 112 | .. code-block:: bash |
| 113 | |
| 114 | sf probe |
| 115 | fatload mmc 1 ${loadaddr} tiboot3.bin |
| 116 | sf update $loadaddr 0x0 $filesize |
| 117 | fatload mmc 1 ${loadaddr} tispl.bin |
| 118 | sf update $loadaddr 0x80000 $filesize |
| 119 | fatload mmc 1 ${loadaddr} u-boot.img |
| 120 | sf update $loadaddr 0x280000 $filesize |
| 121 | |
| 122 | |
| 123 | Boot Modes |
| 124 | ---------- |
| 125 | |
| 126 | The phyCORE-AM64x development kit supports booting from many different |
| 127 | interfaces. By default, the development kit is set to boot from the micro-SD |
| 128 | card. To change the boot device, DIP switches S5 and S6 can be used. |
| 129 | Boot switches should be changed with power off. |
| 130 | |
| 131 | .. list-table:: Boot Modes |
| 132 | :widths: 16 16 16 |
| 133 | :header-rows: 1 |
| 134 | |
| 135 | * - Switch Label |
| 136 | - SW3: 12345678 |
| 137 | - SW4: 12345678 |
| 138 | |
| 139 | * - uSD |
| 140 | - 11000010 |
| 141 | - 01000000 |
| 142 | |
| 143 | * - eMMC |
| 144 | - 11010010 |
| 145 | - 00000000 |
| 146 | |
| 147 | * - OSPI |
| 148 | - 11010000 |
| 149 | - 10000000 |
| 150 | |
| 151 | * - UART |
| 152 | - 11011100 |
| 153 | - 00000000 |
| 154 | |
| 155 | Further Information |
| 156 | ------------------- |
| 157 | |
| 158 | Please see :doc:`../ti/am64x_evm` chapter for further AM64 SoC related documentation |
Daniel Schultz | a2fca42 | 2024-06-12 09:16:38 -0700 | [diff] [blame^] | 159 | and https://docs.phytec.com/projects/yocto-phycore-am64x/en/latest/ for vendor documentation. |