blob: 0c5b4814fc2e27d510de0110487a5ef487f239bb [file] [log] [blame]
Garrett Giordanofb932622024-11-18 15:16:06 -08001.. SPDX-License-Identifier: GPL-2.0+
2.. sectionauthor:: Garrett Giordano <ggiordano@phytec.com>
3
4phyCORE-AM62Ax
5==============
6
7The `phyCORE-AM62Ax <https://www.phytec.com/product/phycore-am62a>`_ is a
8SoM (System on Module) featuring TI's AM62Ax 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 AM62Ax 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 AM62Ax 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
33.. include:: ../ti/k3.rst
34 :start-after: .. k3_rst_include_start_boot_firmwares
35 :end-before: .. k3_rst_include_end_tifsstub
36
37Build procedure
38---------------
39
40Setup the environment variables:
41
42.. include:: ../ti/k3.rst
43 :start-after: .. k3_rst_include_start_common_env_vars_desc
44 :end-before: .. k3_rst_include_end_common_env_vars_desc
45
46.. include:: ../ti/k3.rst
47 :start-after: .. k3_rst_include_start_board_env_vars_desc
48 :end-before: .. k3_rst_include_end_board_env_vars_desc
49
50Set the variables corresponding to this platform:
51
52.. include:: ../ti/k3.rst
53 :start-after: .. k3_rst_include_start_common_env_vars_defn
54 :end-before: .. k3_rst_include_end_common_env_vars_defn
55.. code-block:: bash
56
57 $ export UBOOT_CFG_CORTEXR=phycore_am62ax_r5_defconfig
58 $ export UBOOT_CFG_CORTEXA=phycore_am62ax_a53_defconfig
59 $ export TFA_BOARD=lite
60 $ # we dont use any extra TFA parameters
61 $ unset TFA_EXTRA_ARGS
62 $ export OPTEE_PLATFORM=k3-am62ax
63 $ # we dont use any extra OPTEE parameters
64 $ unset OPTEE_EXTRA_ARGS
65
661. Trusted Firmware-A:
67
68.. include:: ../ti/k3.rst
69 :start-after: .. k3_rst_include_start_build_steps_tfa
70 :end-before: .. k3_rst_include_end_build_steps_tfa
71
722. OP-TEE:
73
74.. include:: ../ti/k3.rst
75 :start-after: .. k3_rst_include_start_build_steps_optee
76 :end-before: .. k3_rst_include_end_build_steps_optee
77
783. U-Boot:
79
80* 3.1 R5:
81
82.. include:: ../ti/k3.rst
83 :start-after: .. k3_rst_include_start_build_steps_spl_r5
84 :end-before: .. k3_rst_include_end_build_steps_spl_r5
85
86* 3.2 A53:
87
88.. include:: ../ti/k3.rst
89 :start-after: .. k3_rst_include_start_build_steps_uboot
90 :end-before: .. k3_rst_include_end_build_steps_uboot
91
92uSD Card creation
93-----------------
94
95Use fdisk to partition the uSD card. The layout should look similar to:
96
97.. code-block:: bash
98
99 $ sudo fdisk -l /dev/mmcblk0
100 Disk /dev/mmcblk0: 15 GB, 15913189376 bytes, 31080448 sectors
101 242816 cylinders, 4 heads, 32 sectors/track
102 Units: sectors of 1 * 512 = 512 bytes
103
104 Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
105 /dev/mmcblk0p1 * 128,0,1 1023,3,32 16384 278527 262144 128M c Win95 FAT32 (LBA)
106 /dev/mmcblk0p2 1023,3,32 1023,3,32 278528 1693883 1415356 691M 83 Linux
107
108
109Once partitioned, the boot partition has to be formatted with a FAT filesystem.
110Assuming the uSD card is `/dev/mmcblk0`:
111
112.. code-block:: bash
113
114 $ mkfs.vfat /dev/mmcblk0p1
115
116To boot from a micro SD card on a HSFS device simply copy the following
117artifacts to the FAT partition:
118
119* tiboot3.bin from R5 build
120* tispl.bin from Cortex-A build
121* u-boot.img from Cortex-A build
122
123Boot
124----
125
126Put the uSD card in the slot on the board and apply power. Check the serial
127console for output.
128
129UART based boot
130---------------
131
132To boot the board via UART, set the switches to UART mode and connect to the
133micro USB port labeled as "Debug UART". After power-on the build artifacts
134needs to be uploaded one by one with a tool like sz.
135
136Example bash script sequence for running on a Linux host PC feeding all boot
137artifacts needed to the device. Assuming the host uses /dev/ttyUSB0 as
138the main domain serial port:
139
140.. prompt:: bash $
141
142 stty -F /dev/ttyUSB0 115200
143 sb --xmodem tiboot3.bin > /dev/ttyUSB0 < /dev/ttyUSB0
144 sb --ymodem tispl.bin > /dev/ttyUSB0 < /dev/ttyUSB0
145 sb --ymodem u-boot.img > /dev/ttyUSB0 < /dev/ttyUSB0
146
147Boot Modes
148----------
149
150The phyCORE-AM62x development kit supports booting from many different
151interfaces. By default, the development kit is set to boot from the micro-SD
152card. To change the boot device, DIP switches S5 and S6 can be used.
153Boot switches should be changed with power off.
154
155.. list-table:: Boot Modes
156 :widths: 16 16 16
157 :header-rows: 1
158
159 * - Switch Label
160 - SW5: 12345678
161 - SW6: 12345678
162
163 * - uSD
164 - 11000010
165 - 01000000
166
167 * - eMMC
168 - 11010010
169 - 00000000
170
171 * - OSPI
172 - 11010000
173 - 10000000
174
175 * - UART
176 - 11011100
177 - 00000000
178
179Further Information
180-------------------
181
182Please see :doc:`../ti/am62ax_sk` chapter for further AM62Ax SoC related documentation
183and https://docs.phytec.com/projects/yocto-phycore-am62ax/en/latest/ for vendor documentation.