*** Add support for phyCORE-AM62x ***
Subsystems (2)
v2 cover *** Add support for phyCORE-AM62x ***
As requested by Dhruva, this patch set comes now with a cover-letter :). This is a rebase on top of -next to address recent K3 updates.
It should be noted that the huge files are generated or copy pasted from TI's evm. So I do not think they need big attention in the review process.
- All yaml files are identical to TI's evm
- k3-am62-phycore-som-ddr4-2gb.dtsi generated with TI's SysConfig DDR Tool
- k3-am62-phycore-som.dtsi & k3-am625-phyboard-lyra-rdk.dts are 1:1 copies
from Linux v6.7-rc3
v2:
- Add cover-letter & mention Linux version I took the DTs from
- Move board selection to mach-k3
- Add missing SPL_LDSCRIPT definition
- Refactore binman file for templated FITs & drop key overrides
- Drop SoC provided bootph params from dt files
Note: Later we can drop more bootph params after we added them to Linux
- Drop CONFIG_TI_SECURE_DEVICE as it is set as default for K3
- Drop cpsw3g custom DT property 'mac_efuse' and custom DT node cpsw-phy-sel as driver picks these from standard property/node (-u-boot.dtsi)
- Add a53 cluster power to control from the rproc driver (a53 dt node)
v1: https://lists.denx.de/pipermail/u-boot/2023-October/535750.html
Wadim Egorov (2):
board: phytec: am62x: Add PHYTEC phyCORE-AM62x SoM
doc: board: phytec: Add phyCORE-AM62x
arch/arm/dts/Makefile | 4 +- .../arm/dts/k3-am62-phycore-som-ddr4-2gb.dtsi | 2190 +++++++++++++++++ arch/arm/dts/k3-am62-phycore-som.dtsi | 324 +++ .../k3-am625-phyboard-lyra-rdk-u-boot.dtsi | 166 ++ arch/arm/dts/k3-am625-phyboard-lyra-rdk.dts | 266 ++ arch/arm/dts/k3-am625-phycore-som-binman.dtsi | 380 +++ arch/arm/dts/k3-am625-r5-phycore-som-2gb.dts | 118 + arch/arm/mach-k3/am62x/Kconfig | 17 + board/phytec/phycore_am62x/Kconfig | 33 + board/phytec/phycore_am62x/MAINTAINERS | 15 + board/phytec/phycore_am62x/Makefile | 8 + board/phytec/phycore_am62x/board-cfg.yaml | 36 + board/phytec/phycore_am62x/phycore-am62x.c | 59 + board/phytec/phycore_am62x/phycore_am62x.env | 23 + board/phytec/phycore_am62x/pm-cfg.yaml | 12 + board/phytec/phycore_am62x/rm-cfg.yaml | 1088 ++++++++ board/phytec/phycore_am62x/sec-cfg.yaml | 379 +++ configs/phycore_am62x_a53_defconfig | 115 + configs/phycore_am62x_r5_defconfig | 130 + doc/board/phytec/index.rst | 1 + doc/board/phytec/phycore-am62x.rst | 125 + doc/board/ti/k3.rst | 1 + include/configs/phycore_am62x.h | 15 + 23 files changed, 5504 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/k3-am62-phycore-som-ddr4-2gb.dtsi create mode 100644 arch/arm/dts/k3-am62-phycore-som.dtsi create mode 100644 arch/arm/dts/k3-am625-phyboard-lyra-rdk-u-boot.dtsi create mode 100644 arch/arm/dts/k3-am625-phyboard-lyra-rdk.dts create mode 100644 arch/arm/dts/k3-am625-phycore-som-binman.dtsi create mode 100644 arch/arm/dts/k3-am625-r5-phycore-som-2gb.dts create mode 100644 board/phytec/phycore_am62x/Kconfig create mode 100644 board/phytec/phycore_am62x/MAINTAINERS create mode 100644 board/phytec/phycore_am62x/Makefile create mode 100644 board/phytec/phycore_am62x/board-cfg.yaml create mode 100644 board/phytec/phycore_am62x/phycore-am62x.c create mode 100644 board/phytec/phycore_am62x/phycore_am62x.env create mode 100644 board/phytec/phycore_am62x/pm-cfg.yaml create mode 100644 board/phytec/phycore_am62x/rm-cfg.yaml create mode 100644 board/phytec/phycore_am62x/sec-cfg.yaml create mode 100644 configs/phycore_am62x_a53_defconfig create mode 100644 configs/phycore_am62x_r5_defconfig create mode 100644 doc/board/phytec/phycore-am62x.rst create mode 100644 include/configs/phycore_am62x.h
Signature · 1 line
2.34.1
PATCH v2 1/2 board: phytec: am62x: Add PHYTEC phyCORE-AM62x SoM
Add basic support for PHYTEC phyCORE-AM62x SoM.
Supported features:
- 2GB DDR4 RAM
- eMMC Flash
- OSPI NOR Flash
- external uSD
- Ethernet
- debug UART
Product page SoM: https://www.phytec.com/product/phycore-am62x
Device trees were taken from Linux v6.7-rc3.
---
v2:
- Add cover-letter & mention Linux version I took the DTs from
- Move board selection to mach-k3
- Add missing SPL_LDSCRIPT definition
- Refactore binman file for templated FITs & drop key overrides
- Drop SoC provided bootph params from dt files
Note: Later we can drop more bootph params after we added them to Linux
- Drop CONFIG_TI_SECURE_DEVICE as it is set as default for K3
- Drop cpsw3g custom DT property 'mac_efuse' and custom DT node cpsw-phy-sel as driver picks these from standard property/node (-u-boot.dtsi)
- Add a53 cluster power to control from the rproc driver (a53 dt node)
--- arch/arm/dts/Makefile | 4 +- .../arm/dts/k3-am62-phycore-som-ddr4-2gb.dtsi | 2190 +++++++++++++++++ arch/arm/dts/k3-am62-phycore-som.dtsi | 324 +++ .../k3-am625-phyboard-lyra-rdk-u-boot.dtsi | 166 ++ arch/arm/dts/k3-am625-phyboard-lyra-rdk.dts | 266 ++ arch/arm/dts/k3-am625-phycore-som-binman.dtsi | 380 +++ arch/arm/dts/k3-am625-r5-phycore-som-2gb.dts | 119 + arch/arm/mach-k3/am62x/Kconfig | 17 + board/phytec/phycore_am62x/Kconfig | 33 + board/phytec/phycore_am62x/MAINTAINERS | 15 + board/phytec/phycore_am62x/Makefile | 8 + board/phytec/phycore_am62x/board-cfg.yaml | 36 + board/phytec/phycore_am62x/phycore-am62x.c | 59 + board/phytec/phycore_am62x/phycore_am62x.env | 23 + board/phytec/phycore_am62x/pm-cfg.yaml | 12 + board/phytec/phycore_am62x/rm-cfg.yaml | 1088 ++++++++ board/phytec/phycore_am62x/sec-cfg.yaml | 379 +++ configs/phycore_am62x_a53_defconfig | 115 + configs/phycore_am62x_r5_defconfig | 130 + include/configs/phycore_am62x.h | 15 + 20 files changed, 5378 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/k3-am62-phycore-som-ddr4-2gb.dtsi create mode 100644 arch/arm/dts/k3-am62-phycore-som.dtsi create mode 100644 arch/arm/dts/k3-am625-phyboard-lyra-rdk-u-boot.dtsi create mode 100644 arch/arm/dts/k3-am625-phyboard-lyra-rdk.dts create mode 100644 arch/arm/dts/k3-am625-phycore-som-binman.dtsi create mode 100644 arch/arm/dts/k3-am625-r5-phycore-som-2gb.dts create mode 100644 board/phytec/phycore_am62x/Kconfig create mode 100644 board/phytec/phycore_am62x/MAINTAINERS create mode 100644 board/phytec/phycore_am62x/Makefile create mode 100644 board/phytec/phycore_am62x/board-cfg.yaml create mode 100644 board/phytec/phycore_am62x/phycore-am62x.c create mode 100644 board/phytec/phycore_am62x/phycore_am62x.env create mode 100644 board/phytec/phycore_am62x/pm-cfg.yaml create mode 100644 board/phytec/phycore_am62x/rm-cfg.yaml create mode 100644 board/phytec/phycore_am62x/sec-cfg.yaml create mode 100644 configs/phycore_am62x_a53_defconfig create mode 100644 configs/phycore_am62x_r5_defconfig create mode 100644 include/configs/phycore_am62x.h
arch/arm/dts/Makefile +3 -1
@@ -1418,7 +1418,9 @@ dtb-$(CONFIG_SOC_K3_AM625) += k3-am625-sk.dtb \ k3-am625-beagleplay.dtb \ k3-am625-r5-beagleplay.dtb \ k3-am625-verdin-wifi-dev.dtb \ - k3-am625-verdin-r5.dtb + k3-am625-verdin-r5.dtb \ + k3-am625-phyboard-lyra-rdk.dtb \ + k3-am625-r5-phycore-som-2gb.dtb dtb-$(CONFIG_SOC_K3_AM62A7) += k3-am62a7-sk.dtb \ k3-am62a7-r5-sk.dtb
arch/arm/dts/k3-am62-phycore-som-ddr4-2gb.dtsi new file +2190 -0
2,190 lines not on this page · raw message
arch/arm/dts/k3-am62-phycore-som.dtsi new file +324 -0
324 lines not on this page · raw message
arch/arm/dts/k3-am625-phyboard-lyra-rdk-u-boot.dtsi new file +166 -0
166 lines not on this page · raw message
arch/arm/dts/k3-am625-phyboard-lyra-rdk.dts new file +266 -0
266 lines not on this page · raw message
arch/arm/dts/k3-am625-phycore-som-binman.dtsi new file +380 -0
44 lines not on this page · raw message
arch/arm/dts/k3-am625-r5-phycore-som-2gb.dts new file +119 -0
119 lines not on this page · raw message
board/phytec/phycore_am62x/Kconfig new file +33 -0
Lines of this file are not shown. View the raw message.
board/phytec/phycore_am62x/MAINTAINERS new file +15 -0
Lines of this file are not shown. View the raw message.
board/phytec/phycore_am62x/Makefile new file +8 -0
Lines of this file are not shown. View the raw message.
board/phytec/phycore_am62x/board-cfg.yaml new file +36 -0
Lines of this file are not shown. View the raw message.
board/phytec/phycore_am62x/phycore-am62x.c new file +59 -0
59 lines not on this page · raw message
board/phytec/phycore_am62x/phycore_am62x.env new file +23 -0
Lines of this file are not shown. View the raw message.
board/phytec/phycore_am62x/pm-cfg.yaml new file +12 -0
Lines of this file are not shown. View the raw message.
board/phytec/phycore_am62x/rm-cfg.yaml new file +1088 -0
1,088 lines not on this page · raw message
board/phytec/phycore_am62x/sec-cfg.yaml new file +379 -0
379 lines not on this page · raw message
configs/phycore_am62x_a53_defconfig new file +115 -0
115 lines not on this page · raw message
configs/phycore_am62x_r5_defconfig new file +130 -0
130 lines not on this page · raw message
include/configs/phycore_am62x.h new file +15 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.34.1
Part of the diff is not shown here. View the raw message.
Re: [PATCH v2 1/2] board: phytec: am62x: Add PHYTEC phyCORE-AM62x SoM
Hi,
Quoted 10 lines · Wadim Egorov
Add basic support for PHYTEC phyCORE-AM62x SoM.
Supported features:
- 2GB DDR4 RAM
- eMMC Flash
- OSPI NOR Flash
- external uSD
- Ethernet
- debug UART
Quoted 3 lines
Product page SoM: https://www.phytec.com/product/phycore-am62x
Device trees were taken from Linux v6.7-rc3.
Thanks for providing the Linux tag, since DT changes are in sync with kernel,
Quoted 56 lines
Signed-off-by Wadim Egorov <[email protected]>---
v2:
- Add cover-letter & mention Linux version I took the DTs from
- Move board selection to mach-k3
- Add missingSPL_LDSCRIPTdefinition
- Refactore binman file for templated FITs & drop key overrides
- Drop SoC provided bootph params from dt files
Note: Later we can drop more bootph params after we added them to Linux
- DropCONFIG_TI_SECURE_DEVICEas it is set as default for K3
- Drop cpsw3g custom DT property 'mac_efuse' and custom DT node cpsw-phy-sel as driver picks these from standard property/node (-u-boot.dtsi)
- Add a53 cluster power to control from the rproc driver (a53 dt node)--- arch/arm/dts/Makefile | 4 +- .../arm/dts/k3-am62-phycore-som-ddr4-2gb.dtsi | 2190 +++++++++++++++++ arch/arm/dts/k3-am62-phycore-som.dtsi | 324 +++ .../k3-am625-phyboard-lyra-rdk-u-boot.dtsi | 166 ++ arch/arm/dts/k3-am625-phyboard-lyra-rdk.dts | 266 ++ arch/arm/dts/k3-am625-phycore-som-binman.dtsi | 380 +++ arch/arm/dts/k3-am625-r5-phycore-som-2gb.dts | 119 + arch/arm/mach-k3/am62x/Kconfig | 17 + board/phytec/phycore_am62x/Kconfig | 33 + board/phytec/phycore_am62x/MAINTAINERS | 15 + board/phytec/phycore_am62x/Makefile | 8 + board/phytec/phycore_am62x/board-cfg.yaml | 36 + board/phytec/phycore_am62x/phycore-am62x.c | 59 + board/phytec/phycore_am62x/phycore_am62x.env | 23 + board/phytec/phycore_am62x/pm-cfg.yaml | 12 + board/phytec/phycore_am62x/rm-cfg.yaml | 1088 ++++++++ board/phytec/phycore_am62x/sec-cfg.yaml | 379 +++ configs/phycore_am62x_a53_defconfig | 115 + configs/phycore_am62x_r5_defconfig | 130 + include/configs/phycore_am62x.h | 15 + 20 files changed, 5378 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/k3-am62-phycore-som-ddr4-2gb.dtsi create mode 100644 arch/arm/dts/k3-am62-phycore-som.dtsi create mode 100644 arch/arm/dts/k3-am625-phyboard-lyra-rdk-u-boot.dtsi create mode 100644 arch/arm/dts/k3-am625-phyboard-lyra-rdk.dts create mode 100644 arch/arm/dts/k3-am625-phycore-som-binman.dtsi create mode 100644 arch/arm/dts/k3-am625-r5-phycore-som-2gb.dts create mode 100644 board/phytec/phycore_am62x/Kconfig create mode 100644 board/phytec/phycore_am62x/MAINTAINERS create mode 100644 board/phytec/phycore_am62x/Makefile create mode 100644 board/phytec/phycore_am62x/board-cfg.yaml create mode 100644 board/phytec/phycore_am62x/phycore-am62x.c create mode 100644 board/phytec/phycore_am62x/phycore_am62x.env create mode 100644 board/phytec/phycore_am62x/pm-cfg.yaml create mode 100644 board/phytec/phycore_am62x/rm-cfg.yaml create mode 100644 board/phytec/phycore_am62x/sec-cfg.yaml create mode 100644 configs/phycore_am62x_a53_defconfig create mode 100644 configs/phycore_am62x_r5_defconfig create mode 100644 include/configs/phycore_am62x.h
[....]
Signature · 2 lines
Best regards, Dhruva Gole <[email protected]>
PATCH v2 2/2 doc: board: phytec: Add phyCORE-AM62x
In reply to Wadim EgorovAdd documentation for PHYTEC phyCORE-AM62x SoM.
---
v2: Rebased on top of -next
--- doc/board/phytec/index.rst | 1 + doc/board/phytec/phycore-am62x.rst | 125 +++++++++++++++++++++++++++++ doc/board/ti/k3.rst | 1 + 3 files changed, 127 insertions(+) create mode 100644 doc/board/phytec/phycore-am62x.rst
doc/board/phytec/index.rst +1 -0
@@ -6,5 +6,6 @@ PHYTEC .. toctree:: :maxdepth: 2 + phycore-am62x phycore-imx8mm phycore-imx8mp
doc/board/phytec/phycore-am62x.rst new file +125 -0
125 lines not on this page · raw message
doc/board/ti/k3.rst +1 -0
@@ -33,6 +33,7 @@ K3 Based SoCs am62ax_sk am62x_sk ../beagle/am62x_beagleplay + ../phytec/phycore-am62x ../toradex/verdin-am62 am64x_evm am65x_evm
Signature · 1 line
2.34.1
Re: [PATCH v2 2/2] doc: board: phytec: Add phyCORE-AM62x
Hi,
Quoted 6 lines · Wadim Egorov
Add documentation for PHYTEC phyCORE-AM62x SoM.
Signed-off-by Wadim Egorov <[email protected]>---
v2: Rebased on top of -next
Please CC Tom Rini <[email protected]> on the series.
Quoted 73 lines
--- doc/board/phytec/index.rst | 1 + doc/board/phytec/phycore-am62x.rst | 125 +++++++++++++++++++++++++++++ doc/board/ti/k3.rst | 1 + 3 files changed, 127 insertions(+) create mode 100644 doc/board/phytec/phycore-am62x.rstdoc/board/phytec/index.rst +1
-0@@ -6,5 +6,6 @@ PHYTEC .. toctree:: :maxdepth: 2 + phycore-am62x phycore-imx8mm phycore-imx8mpdoc/board/phytec/phycore-am62x.rst new file +49
-0@@ -0,0 +1,125 @@ +.. SPDX-License-Identifier: GPL-2.0+ +.. sectionauthor:: Wadim Egorov <[email protected]> + +phyCORE-AM62x +============= + +The `phyCORE-AM62x <https://www.phytec.com/product/phycore-am62x>`_ is a +SoM (System on Module) featuring TI's AM62x SoC. It can be used in combination +with different carrier boards. This module can come with different sizes and +models for DDR, eMMC, SPI NOR Flash and various SoCs from the AM62x family. + +A development Kit, called `phyBOARD-Lyra <https://www.phytec.com/product/phyboard-am62x>`_ +is used as a carrier board reference design around the AM62x SoM. + +Quickstart +---------- + +* Download sources and TI firmware blobs +* Build Trusted Firmware-A +* Build OP-TEE +* Build U-Boot for the R5 +* Build U-Boot for the A53 +* Create bootable uSD Card +* Boot + +Sources +------- + +.. include:: ../ti/k3.rst + :start-after: .. k3_rst_include_start_boot_sources + :end-before: .. k3_rst_include_end_boot_sources + +Build procedure +--------------- + +Setup the environment variables: + +.. include:: ../ti/k3.rst + :start-after: .. k3_rst_include_start_common_env_vars_desc + :end-before: .. k3_rst_include_end_common_env_vars_desc + +.. include:: ../ti/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:: ../ti/k3.rst + :start-after: .. k3_rst_include_start_common_env_vars_defn
doc/board/phytec/phycore-am62x.rst line 59
Quoted 10 lines
doc/board/phytec/phycore-am62x.rst new file +10
-0+ :end-before: .. k3_rst_include_end_common_env_vars_defn +.. code-block:: bash + + $ export UBOOT_CFG_CORTEXR=phycore_am62x_r5_defconfig + $ export UBOOT_CFG_CORTEXA=phycore_am62x_a53_defconfig + $ export TFA_BOARD=lite + $ # we don't use any extra TFA parameters + $ unset TFA_EXTRA_ARGS + $ export OPTEE_PLATFORM=k3-am62x + $ export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y"
Does this need to be the case? If it's just copied from AM62x then I think I need to fix that documentation, not sure if we necessarily need SW_RNG and thus disable HW_RNG upstream.
The context here was we were enabling SW_RNG a while back due to a crash after suspend resume on AM62x, however that issue no longer seems to cause any lock ups/ crash.
Quoted 23 lines
doc/board/phytec/phycore-am62x.rst new file +23
-0+ +.. include:: ../ti/am62x_sk.rst + :start-after: .. am62x_evm_rst_include_start_build_steps + :end-before: .. am62x_evm_rst_include_end_build_steps + +uSD Card creation +----------------- + +Use fdisk to partition the uSD card. The layout should look similar to: + +.. code-block:: bash + + $ sudo fdisk -l /dev/mmcblk0 + Disk /dev/mmcblk0: 7.56 GiB, 8120172544 bytes, 15859712 sectors + Units: sectors of 1 * 512 = 512 bytes + Sector size (logical/physical): 512 bytes / 512 bytes + I/O size (minimum/optimal): 512 bytes / 512 bytes + Disklabel type: dos + Disk identifier: 0x6583d9a3 + + Device Boot Start End Sectors Size Id Type + /dev/mmcblk0p1 * 2048 264191 262144 128M c W95 FAT32 (LBA) + /dev/mmcblk0p2 264192 1934953 1670762 815.8M 83 Linux
doc/board/phytec/phycore-am62x.rst line 92
Quoted 10 lines
doc/board/phytec/phycore-am62x.rst new file +10
-0+ + +Once partitioned, the boot partition has to be formatted with a FAT filesystem. +Assuming the uSD card is `/dev/mmcblk0`: + +.. code-block:: bash + + $ mkfs.vfat /dev/mmcblk0p1 + +To boot from an uSD on a GP device simply copy the following artifacts to the
nit: "a" micro SD card not an
Are most of the SoM's GP devices? Otherwise thinking if we should make the documentation for HSFS as a default and GP as an exception?
Or else just say copy tiboot3.bin as is on the SD card for HSFS devices and for GP.... (as you have done below)
Quoted 18 lines
doc/board/phytec/phycore-am62x.rst new file +18
-0+FAT partition: + +* tiboot3-am62x-gp-phycore-som.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 u-boot.img + +Boot +---- + +Put the uSD card in the slot on the board and apply power. Check the serial +console for output. + +Flash to SPI NOR +---------------- + +Below commands can be used to flash the SPI NOR flash; assuming +tiboot3.bin, tispl.bin and u-boot.img are stored on the uSD card. +
doc/board/phytec/phycore-am62x.rst line 120
Quoted 10 lines
doc/board/phytec/phycore-am62x.rst new file +10
-0+.. code-block:: bash + + sf probe + fatload mmc 1 ${loadaddr} tiboot3.bin + sf update $loadaddr 0x0 $filesize + fatload mmc 1 ${loadaddr} tispl.bin + sf update $loadaddr 0x80000 $filesize + fatload mmc 1 ${loadaddr} u-boot.img + sf update $loadaddr 0x280000 $filesize +
Want to add some documentation on Boot Modes? Something like [0]?
Quoted 10 lines
doc/board/phytec/phycore-am62x.rst new file +5
-0+Further Information +------------------- + +Please see :doc:`../ti/am62x_sk` chapter for further AM62 SoC related documentation +and https://docs.phytec.com/phycore-am62x for vendor documentation.doc/board/ti/k3.rst +0
-0
doc/board/ti/k3.rst K3 Based SoCs · line 38
Quoted 6 lines
doc/board/ti/k3.rst +1
-0@@ -33,6 +33,7 @@ K3 Based SoCs am62ax_sk am62x_sk ../beagle/am62x_beagleplay + ../phytec/phycore-am62x ../toradex/verdin-am62 am64x_evm
Rest looks good, so with the above suggestions,
[0] https://docs.u-boot.org/en/v2023.07.02/board/ti/am62x_sk.html
Signature · 2 lines
Best regards, Dhruva Gole <[email protected]>
Re: [PATCH v2 2/2] doc: board: phytec: Add phyCORE-AM62x
Hi Dhruva,
Am 01.12.23 um 11:10 schrieb Dhruva Gole:
Quoted 98 lines
Hi,
Quoted 6 lines · Wadim Egorov
Add documentation for PHYTEC phyCORE-AM62x SoM.
Signed-off-by Wadim Egorov <[email protected]>---
v2: Rebased on top of -nextPlease CC Tom Rini <[email protected]> on the series.
Quoted 73 lines
--- doc/board/phytec/index.rst | 1 + doc/board/phytec/phycore-am62x.rst | 125 +++++++++++++++++++++++++++++ doc/board/ti/k3.rst | 1 + 3 files changed, 127 insertions(+)create mode 100644
doc/board/phytec/phycore-am62x.rstdoc/board/phytec/index.rst +1
-0@@ -6,5 +6,6 @@ PHYTEC .. toctree:: :maxdepth: 2 + phycore-am62x phycore-imx8mm phycore-imx8mpdoc/board/phytec/phycore-am62x.rst new file +49
-0@@ -0,0 +1,125 @@ +.. SPDX-License-Identifier: GPL-2.0+ +.. sectionauthor:: Wadim Egorov <[email protected]> + +phyCORE-AM62x +============= + +The `phyCORE-AM62x <https://www.phytec.com/product/phycore-am62x>`_ is a +SoM (System on Module) featuring TI's AM62x SoC. It can be used in combination +with different carrier boards. This module can come with different sizes and +models for DDR, eMMC, SPI NOR Flash and various SoCs from the AM62x family. + +A development Kit, called `phyBOARD-Lyra <https://www.phytec.com/product/phyboard-am62x>`_ +is used as a carrier board reference design around the AM62x SoM. + +Quickstart +---------- + +* Download sources and TI firmware blobs +* Build Trusted Firmware-A +* Build OP-TEE +* Build U-Boot for the R5 +* Build U-Boot for the A53 +* Create bootable uSD Card +* Boot + +Sources +------- + +.. include:: ../ti/k3.rst + :start-after: .. k3_rst_include_start_boot_sources + :end-before: .. k3_rst_include_end_boot_sources + +Build procedure +--------------- + +Setup the environment variables: + +.. include:: ../ti/k3.rst + :start-after: .. k3_rst_include_start_common_env_vars_desc + :end-before: .. k3_rst_include_end_common_env_vars_desc + +.. include:: ../ti/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:: ../ti/k3.rst + :start-after: .. k3_rst_include_start_common_env_vars_defndoc/board/phytec/phycore-am62x.rst line 59
Quoted 10 lines
doc/board/phytec/phycore-am62x.rst new file +10
-0+ :end-before: .. k3_rst_include_end_common_env_vars_defn +.. code-block:: bash + + $ export UBOOT_CFG_CORTEXR=phycore_am62x_r5_defconfig + $ export UBOOT_CFG_CORTEXA=phycore_am62x_a53_defconfig + $ export TFA_BOARD=lite + $ # we don't use any extra TFA parameters + $ unset TFA_EXTRA_ARGS + $ export OPTEE_PLATFORM=k3-am62x + $ export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y"Does this need to be the case? If it's just copied from AM62x then I think I need to fix that documentation, not sure if we necessarily need
SW_RNGand thus disableHW_RNGupstream.
Quoted 3 lines
The context here was we were enabling
SW_RNGa while back due to a crash after suspend resume on AM62x, however that issue no longer seems to cause any lock ups/ crash.
Yep, copy&paste. I'll remove it.
Quoted 37 lines
Quoted 24 lines
doc/board/phytec/phycore-am62x.rst new file +23
-0+ +.. include:: ../ti/am62x_sk.rst + :start-after: .. am62x_evm_rst_include_start_build_steps + :end-before: .. am62x_evm_rst_include_end_build_steps + +uSD Card creation +----------------- + +Use fdisk to partition the uSD card. The layout should look similar to: + +.. code-block:: bash + + $ sudo fdisk -l /dev/mmcblk0 + Disk /dev/mmcblk0: 7.56 GiB, 8120172544 bytes, 15859712 sectors + Units: sectors of 1 * 512 = 512 bytes + Sector size (logical/physical): 512 bytes / 512 bytes + I/O size (minimum/optimal): 512 bytes / 512 bytes + Disklabel type: dos + Disk identifier: 0x6583d9a3 + + Device Boot Start End Sectors Size Id Type + /dev/mmcblk0p1 * 2048 264191 262144 128M c W95 FAT32 (LBA) + /dev/mmcblk0p2 264192 1934953 1670762 815.8M 83 Linuxdoc/board/phytec/phycore-am62x.rst line 92
Quoted 10 lines
doc/board/phytec/phycore-am62x.rst new file +10
-0+ + +Once partitioned, the boot partition has to be formatted with a FAT filesystem. +Assuming the uSD card is `/dev/mmcblk0`: + +.. code-block:: bash + + $ mkfs.vfat /dev/mmcblk0p1 + +To boot from an uSD on a GP device simply copy the following artifacts to thenit: "a" micro SD card not an
Quoted 5 lines
Are most of the SoM's GP devices? Otherwise thinking if we should make the documentation for HSFS as a default and GP as an exception?
Or else just say copy tiboot3.bin as is on the SD card for HSFS devices and for GP.... (as you have done below)
Currently, most devices around are GPs. But this will change. So making HSFS as default makes sense.
Quoted 22 lines
Quoted 22 lines
doc/board/phytec/phycore-am62x.rst new file +21
-0+FAT partition: + +* tiboot3-am62x-gp-phycore-som.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 u-boot.img + +Boot +---- + +Put the uSD card in the slot on the board and apply power. Check the serial +console for output. + +Flash to SPI NOR +---------------- + +Below commands can be used to flash the SPI NOR flash; assuming +tiboot3.bin, tispl.bin and u-boot.img are stored on the uSD card. + +.. code-block:: bash + + sf probe
Quoted 8 lines
doc/board/phytec/phycore-am62x.rst line 120
Quoted 7 lines
doc/board/phytec/phycore-am62x.rst new file +7
-0+ fatload mmc 1 ${loadaddr} tiboot3.bin + sf update $loadaddr 0x0 $filesize + fatload mmc 1 ${loadaddr} tispl.bin + sf update $loadaddr 0x80000 $filesize + fatload mmc 1 ${loadaddr} u-boot.img + sf update $loadaddr 0x280000 $filesize +Want to add some documentation on Boot Modes? Something like [0]?
Good idea.
Quoted 20 lines
Quoted 12 lines
doc/board/phytec/phycore-am62x.rst new file +5
-0+Further Information +------------------- + +Please see :doc:`../ti/am62x_sk` chapter for further AM62 SoC related documentation +and https://docs.phytec.com/phycore-am62x for vendor documentation.doc/board/ti/k3.rst +0
-0doc/board/ti/k3.rst K3 Based SoCs · line 38
Quoted 6 lines
doc/board/ti/k3.rst +1
-0@@ -33,6 +33,7 @@ K3 Based SoCs am62ax_sk am62x_sk ../beagle/am62x_beagleplay + ../phytec/phycore-am62x ../toradex/verdin-am62 am64x_evmRest looks good, so with the above suggestions,
Quoted 1 line
Reviewed-by Dhruva Gole <[email protected]>
For both patches or only for the docs part?
Regards,
Wadim
Quoted 3 lines
[0] https://docs.u-boot.org/en/v2023.07.02/board/ti/am62x_sk.html