blob: 1d641a78cf879bcae4da1fe5ea1e09091bac5451 [file] [log] [blame]
Wadim Egorov12722a42023-12-20 10:18:11 +01001.. SPDX-License-Identifier: GPL-2.0+
2.. sectionauthor:: Wadim Egorov <w.egorov@phytec.de>
3
4phyCORE-AM62x
5=============
6
7The `phyCORE-AM62x <https://www.phytec.com/product/phycore-am62x>`_ is a
8SoM (System on Module) featuring TI's AM62x SoC. It can be used in combination
9with different carrier boards. This module can come with different sizes and
10models for DDR, eMMC, SPI NOR Flash and various SoCs from the AM62x family.
11
12A development Kit, called `phyBOARD-Lyra <https://www.phytec.com/product/phyboard-am62x>`_
13is used as a carrier board reference design around the AM62x SoM.
14
15Quickstart
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
26Sources
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
33Build procedure
34---------------
35
36Setup 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
46Set 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_am62x_r5_defconfig
54 $ export UBOOT_CFG_CORTEXA=phycore_am62x_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-am62x
59 $ export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y"
60
61.. include:: ../ti/am62x_sk.rst
62 :start-after: .. am62x_evm_rst_include_start_build_steps
63 :end-before: .. am62x_evm_rst_include_end_build_steps
64
65uSD Card creation
66-----------------
67
68Use fdisk to partition the uSD card. The layout should look similar to:
69
70.. code-block:: bash
71
72 $ sudo fdisk -l /dev/mmcblk0
73 Disk /dev/mmcblk0: 7.56 GiB, 8120172544 bytes, 15859712 sectors
74 Units: sectors of 1 * 512 = 512 bytes
75 Sector size (logical/physical): 512 bytes / 512 bytes
76 I/O size (minimum/optimal): 512 bytes / 512 bytes
77 Disklabel type: dos
78 Disk identifier: 0x6583d9a3
79
80 Device Boot Start End Sectors Size Id Type
81 /dev/mmcblk0p1 * 2048 264191 262144 128M c W95 FAT32 (LBA)
82 /dev/mmcblk0p2 264192 1934953 1670762 815.8M 83 Linux
83
84
85Once partitioned, the boot partition has to be formatted with a FAT filesystem.
86Assuming the uSD card is `/dev/mmcblk0`:
87
88.. code-block:: bash
89
90 $ mkfs.vfat /dev/mmcblk0p1
91
92To boot from a micro SD card on a HSFS device simply copy the following
93artifacts to the FAT partition:
94
95* tiboot3.bin from R5 build as tiboot3.bin
96* tispl.bin_unsigned from Cortex-A build as tispl.bin
97* u-boot.img_unsigned from Cortex-A build as u-boot.img
98
99Boot
100----
101
102Put the uSD card in the slot on the board and apply power. Check the serial
103console for output.
104
105Flash to SPI NOR
106----------------
107
108Below commands can be used to flash the SPI NOR flash; assuming
109tiboot3.bin, tispl.bin and u-boot.img are stored on the uSD card.
110
111.. code-block:: bash
112
113 sf probe
114 fatload mmc 1 ${loadaddr} tiboot3.bin
115 sf update $loadaddr 0x0 $filesize
116 fatload mmc 1 ${loadaddr} tispl.bin
117 sf update $loadaddr 0x80000 $filesize
118 fatload mmc 1 ${loadaddr} u-boot.img
119 sf update $loadaddr 0x280000 $filesize
120
121
122Boot Modes
123----------
124
125The phyCORE-AM62x development kit supports booting from many different
126interfaces. By default, the development kit is set to boot from the micro-SD
127card. To change the boot device, DIP switches S5 and S6 can be used.
128Boot switches should be changed with power off.
129
130.. list-table:: Boot Modes
131 :widths: 16 16 16
132 :header-rows: 1
133
134 * - Switch Label
135 - SW5: 12345678
136 - SW6: 12345678
137
138 * - uSD
139 - 11000010
140 - 01000000
141
142 * - eMMC
143 - 11010010
144 - 00000000
145
146 * - OSPI
147 - 11010000
148 - 10000000
149
150 * - UART
151 - 11011100
152 - 00000000
153
154Further Information
155-------------------
156
157Please see :doc:`../ti/am62x_sk` chapter for further AM62 SoC related documentation
158and https://docs.phytec.com/phycore-am62x for vendor documentation.