Skip to contentSkip to conversation

*** Add support for phyCORE-AM64x ***

PATCH Superseded Wadim Egorov 2 participants 5 messages Feb 26, 2024 – Feb 28, 2024

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover *** Add support for phyCORE-AM64x ***

Add basic support for the phyCORE-AM64x.

v1: https://lists.denx.de/pipermail/u-boot/2024-January/544649.html
v2:
- Resync configs after savedefconfig
- Set CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400 in R5 config

Wadim Egorov (2):
board: phytec: am64x: Add PHYTEC phyCORE-AM64x SoM
doc: board: phytec: Add phyCORE-AM64x

 arch/arm/dts/Makefile                         |    4 +-
 .../arm/dts/k3-am64-phycore-som-ddr4-2gb.dtsi | 2189 +++++++++++++++++
 arch/arm/dts/k3-am64-phycore-som.dtsi         |  320 +++
 .../k3-am642-phyboard-electra-rdk-u-boot.dtsi |  147 ++
 .../arm/dts/k3-am642-phyboard-electra-rdk.dts |  302 +++
 arch/arm/dts/k3-am642-phycore-som-binman.dtsi |  457 ++++
 arch/arm/dts/k3-am642-r5-phycore-som-2gb.dts  |  140 ++
 arch/arm/mach-k3/am64x/Kconfig                |   19 +
 board/phytec/phycore_am64x/Kconfig            |   33 +
 board/phytec/phycore_am64x/MAINTAINERS        |   15 +
 board/phytec/phycore_am64x/Makefile           |    9 +
 board/phytec/phycore_am64x/board-cfg.yaml     |   36 +
 board/phytec/phycore_am64x/phycore-am64x.c    |   50 +
 board/phytec/phycore_am64x/phycore_am64x.env  |   23 +
 board/phytec/phycore_am64x/pm-cfg.yaml        |   12 +
 board/phytec/phycore_am64x/rm-cfg.yaml        | 1215 +++++++++
 board/phytec/phycore_am64x/sec-cfg.yaml       |  379 +++
 configs/phycore_am64x_a53_defconfig           |  167 ++
 configs/phycore_am64x_r5_defconfig            |  179 ++
 doc/board/phytec/index.rst                    |    1 +
 doc/board/phytec/phycore-am64x.rst            |  159 ++
 include/configs/phycore_am64x.h               |   15 +
 22 files changed, 5870 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/k3-am64-phycore-som-ddr4-2gb.dtsi
 create mode 100644 arch/arm/dts/k3-am64-phycore-som.dtsi
 create mode 100644 arch/arm/dts/k3-am642-phyboard-electra-rdk-u-boot.dtsi
 create mode 100644 arch/arm/dts/k3-am642-phyboard-electra-rdk.dts
 create mode 100644 arch/arm/dts/k3-am642-phycore-som-binman.dtsi
 create mode 100644 arch/arm/dts/k3-am642-r5-phycore-som-2gb.dts
 create mode 100644 board/phytec/phycore_am64x/Kconfig
 create mode 100644 board/phytec/phycore_am64x/MAINTAINERS
 create mode 100644 board/phytec/phycore_am64x/Makefile
 create mode 100644 board/phytec/phycore_am64x/board-cfg.yaml
 create mode 100644 board/phytec/phycore_am64x/phycore-am64x.c
 create mode 100644 board/phytec/phycore_am64x/phycore_am64x.env
 create mode 100644 board/phytec/phycore_am64x/pm-cfg.yaml
 create mode 100644 board/phytec/phycore_am64x/rm-cfg.yaml
 create mode 100644 board/phytec/phycore_am64x/sec-cfg.yaml
 create mode 100644 configs/phycore_am64x_a53_defconfig
 create mode 100644 configs/phycore_am64x_r5_defconfig
 create mode 100644 doc/board/phytec/phycore-am64x.rst
 create mode 100644 include/configs/phycore_am64x.h
Signature · 1 line
2.34.1
#1 lore raw

PATCH v2 1/2 board: phytec: am64x: Add PHYTEC phyCORE-AM64x SoM

Add support for PHYTEC phyCORE-AM64x SoM.

Supported features:
- 2GB DDR4 RAM
- eMMC Flash
- external uSD
- OSPI NOR Flash
- debug UART

Product page SoM: https://www.phytec.com/product/phycore-am64x

Device trees were taken from Linux v6.8-rc2.

---
v2:
- Resync configs after savedefconfig
- Set CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400 in R5 config

---
 arch/arm/dts/Makefile                         |    4 +-
 .../arm/dts/k3-am64-phycore-som-ddr4-2gb.dtsi | 2189 +++++++++++++++++
 arch/arm/dts/k3-am64-phycore-som.dtsi         |  320 +++
 .../k3-am642-phyboard-electra-rdk-u-boot.dtsi |  147 ++
 .../arm/dts/k3-am642-phyboard-electra-rdk.dts |  302 +++
 arch/arm/dts/k3-am642-phycore-som-binman.dtsi |  457 ++++
 arch/arm/dts/k3-am642-r5-phycore-som-2gb.dts  |  140 ++
 arch/arm/mach-k3/am64x/Kconfig                |   19 +
 board/phytec/phycore_am64x/Kconfig            |   33 +
 board/phytec/phycore_am64x/MAINTAINERS        |   15 +
 board/phytec/phycore_am64x/Makefile           |    9 +
 board/phytec/phycore_am64x/board-cfg.yaml     |   36 +
 board/phytec/phycore_am64x/phycore-am64x.c    |   50 +
 board/phytec/phycore_am64x/phycore_am64x.env  |   23 +
 board/phytec/phycore_am64x/pm-cfg.yaml        |   12 +
 board/phytec/phycore_am64x/rm-cfg.yaml        | 1215 +++++++++
 board/phytec/phycore_am64x/sec-cfg.yaml       |  379 +++
 configs/phycore_am64x_a53_defconfig           |  167 ++
 configs/phycore_am64x_r5_defconfig            |  179 ++
 include/configs/phycore_am64x.h               |   15 +
 20 files changed, 5710 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/k3-am64-phycore-som-ddr4-2gb.dtsi
 create mode 100644 arch/arm/dts/k3-am64-phycore-som.dtsi
 create mode 100644 arch/arm/dts/k3-am642-phyboard-electra-rdk-u-boot.dtsi
 create mode 100644 arch/arm/dts/k3-am642-phyboard-electra-rdk.dts
 create mode 100644 arch/arm/dts/k3-am642-phycore-som-binman.dtsi
 create mode 100644 arch/arm/dts/k3-am642-r5-phycore-som-2gb.dts
 create mode 100644 board/phytec/phycore_am64x/Kconfig
 create mode 100644 board/phytec/phycore_am64x/MAINTAINERS
 create mode 100644 board/phytec/phycore_am64x/Makefile
 create mode 100644 board/phytec/phycore_am64x/board-cfg.yaml
 create mode 100644 board/phytec/phycore_am64x/phycore-am64x.c
 create mode 100644 board/phytec/phycore_am64x/phycore_am64x.env
 create mode 100644 board/phytec/phycore_am64x/pm-cfg.yaml
 create mode 100644 board/phytec/phycore_am64x/rm-cfg.yaml
 create mode 100644 board/phytec/phycore_am64x/sec-cfg.yaml
 create mode 100644 configs/phycore_am64x_a53_defconfig
 create mode 100644 configs/phycore_am64x_r5_defconfig
 create mode 100644 include/configs/phycore_am64x.h
arch/arm/dts/Makefile +3 -1
index d9725030d5..cbd34f5bdc 100644
@@ -1423,7 +1423,9 @@ dtb-$(CONFIG_SOC_K3_J721S2) += k3-am68-sk-base-board.dtb\
 dtb-$(CONFIG_SOC_K3_AM642) += k3-am642-evm.dtb \
 			      k3-am642-r5-evm.dtb \
 			      k3-am642-sk.dtb \
-			      k3-am642-r5-sk.dtb
+			      k3-am642-r5-sk.dtb \
+			      k3-am642-phyboard-electra-rdk.dtb \
+			      k3-am642-r5-phycore-som-2gb.dtb
 
 dtb-$(CONFIG_SOC_K3_AM625) += k3-am625-sk.dtb \
 			      k3-am625-r5-sk.dtb \
arch/arm/dts/k3-am64-phycore-som-ddr4-2gb.dtsi new file +2189 -0

2,189 lines not on this page · raw message

arch/arm/dts/k3-am64-phycore-som.dtsi new file +320 -0

320 lines not on this page · raw message

arch/arm/dts/k3-am642-phyboard-electra-rdk-u-boot.dtsi new file +147 -0

147 lines not on this page · raw message

arch/arm/dts/k3-am642-phyboard-electra-rdk.dts new file +302 -0

302 lines not on this page · raw message

arch/arm/dts/k3-am642-phycore-som-binman.dtsi new file +457 -0

32 lines not on this page · raw message

arch/arm/dts/k3-am642-r5-phycore-som-2gb.dts new file +140 -0

140 lines not on this page · raw message

arch/arm/mach-k3/am64x/Kconfig +19 -0
index 6f7b003961..b8fea8716e 100644

Lines of this file are not shown. View the raw message.

board/phytec/phycore_am64x/Kconfig new file +33 -0
new file mode 100644
index 0000000000..427adb6fed

Lines of this file are not shown. View the raw message.

board/phytec/phycore_am64x/MAINTAINERS new file +15 -0
new file mode 100644
index 0000000000..0612c8c318

Lines of this file are not shown. View the raw message.

board/phytec/phycore_am64x/Makefile new file +9 -0
new file mode 100644
index 0000000000..78b8f1b1b8

Lines of this file are not shown. View the raw message.

board/phytec/phycore_am64x/board-cfg.yaml new file +36 -0
new file mode 100644
index 0000000000..8981b75caa

Lines of this file are not shown. View the raw message.

board/phytec/phycore_am64x/phycore-am64x.c new file +50 -0

50 lines not on this page · raw message

board/phytec/phycore_am64x/phycore_am64x.env new file +23 -0
new file mode 100644
index 0000000000..ada3a9233b

Lines of this file are not shown. View the raw message.

board/phytec/phycore_am64x/pm-cfg.yaml new file +12 -0
new file mode 100644
index 0000000000..7afb296210

Lines of this file are not shown. View the raw message.

board/phytec/phycore_am64x/rm-cfg.yaml new file +1215 -0

1,215 lines not on this page · raw message

board/phytec/phycore_am64x/sec-cfg.yaml new file +379 -0

379 lines not on this page · raw message

configs/phycore_am64x_a53_defconfig new file +167 -0

167 lines not on this page · raw message

configs/phycore_am64x_r5_defconfig new file +179 -0

179 lines not on this page · raw message

include/configs/phycore_am64x.h new file +15 -0
new file mode 100644
index 0000000000..9377db30a9

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.

#2 lore raw

PATCH v2 2/2 doc: board: phytec: Add phyCORE-AM64x

In reply to Wadim Egorov

Add documentation for PHYTEC phyCORE-AM64x SoM.

---
 doc/board/phytec/index.rst         |   1 +
 doc/board/phytec/phycore-am64x.rst | 159 +++++++++++++++++++++++++++++
 2 files changed, 160 insertions(+)
 create mode 100644 doc/board/phytec/phycore-am64x.rst
doc/board/phytec/index.rst +1 -0
index fea0b07620..99848a9e95 100644
@@ -9,5 +9,6 @@ PHYTEC
    imx8mm-phygate-tauri-l
    imx93-phyboard-segin
    phycore-am62x
+   phycore-am64x
    phycore-imx8mm
    phycore-imx8mp
doc/board/phytec/phycore-am64x.rst new file +159 -0

159 lines not on this page · raw message

Signature · 1 line
2.34.1
Reviewed-by on v2 2/2
#3 lore raw

Re: [PATCH v2 2/2] doc: board: phytec: Add phyCORE-AM64x

Hi,

Quoted 114 lines · Wadim Egorov

Add documentation for PHYTEC phyCORE-AM64x SoM.

---
 doc/board/phytec/index.rst         |   1 +
 doc/board/phytec/phycore-am64x.rst | 159 +++++++++++++++++++++++++++++
 2 files changed, 160 insertions(+)
 create mode 100644 doc/board/phytec/phycore-am64x.rst
doc/board/phytec/index.rst +1 -0
index fea0b07620..99848a9e95 100644
@@ -9,5 +9,6 @@ PHYTEC
    imx8mm-phygate-tauri-l
    imx93-phyboard-segin
    phycore-am62x
+   phycore-am64x
    phycore-imx8mm
    phycore-imx8mp
doc/board/phytec/phycore-am64x.rst new file +88 -0
new file mode 100644
index 0000000000..202b756dc4
@@ -0,0 +1,159 @@
+.. SPDX-License-Identifier: GPL-2.0+
+.. sectionauthor:: Wadim Egorov <[email protected]>
+
+phyCORE-AM64x
+=============
+
+The `phyCORE-AM64x <https://www.phytec.com/product/phycore-am64x>`_ is a
+SoM (System on Module) featuring TI's AM64x 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 AM64x family.
+
+A development Kit, called `phyBOARD-Lyra <https://www.phytec.com/product/phyboard-am64x>`_
+is used as a carrier board reference design around the AM64x 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
+    :end-before: .. k3_rst_include_end_common_env_vars_defn
+.. code-block:: bash
+
+ $ export UBOOT_CFG_CORTEXR=phycore_am64x_r5_defconfig
+ $ export UBOOT_CFG_CORTEXA=phycore_am64x_a53_defconfig
+ $ export TFA_BOARD=lite
+ $ # we don't use any extra TFA parameters
+ $ unset TFA_EXTRA_ARGS
+ $ export OPTEE_PLATFORM=k3-am64x
+ # we don't use any extra OPTEE parameters
+ unset OPTEE_EXTRA_ARGS
+
+.. 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
+
+
+Once partitioned, the boot partition has to be formatted with a FAT filesystem.
+Assuming the uSD card is `/dev/mmcblk0`:
+

doc/board/phytec/phycore-am64x.rst line 98

Quoted 10 lines
doc/board/phytec/phycore-am64x.rst new file +10 -0
+.. code-block:: bash
+
+ $ mkfs.vfat /dev/mmcblk0p1
+
+To boot from a micro SD card on a HSFS device simply copy the following
+artifacts to the FAT partition:
+
+* tiboot3.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

Is the _unsigned really required? I guess the regular tispl and u-boot.img should also work right? It will just skip auth I guess.

[...]

Mostly looks good, thanks!

Signature · 2 lines
Best regards,
Dhruva Gole <[email protected]>
#4 lore raw

Re: [PATCH v2 2/2] doc: board: phytec: Add phyCORE-AM64x

Am 28.02.24 um 06:45 schrieb Dhruva Gole:

Quoted 121 lines

Hi,

Quoted 118 lines · Wadim Egorov

Add documentation for PHYTEC phyCORE-AM64x SoM.

---
  doc/board/phytec/index.rst         |   1 +
  doc/board/phytec/phycore-am64x.rst | 159 +++++++++++++++++++++++++++++
  2 files changed, 160 insertions(+)

create mode 100644 doc/board/phytec/phycore-am64x.rst

doc/board/phytec/index.rst +1 -0
index fea0b07620..99848a9e95 100644
@@ -9,5 +9,6 @@ PHYTEC
     imx8mm-phygate-tauri-l
     imx93-phyboard-segin
     phycore-am62x
+   phycore-am64x
     phycore-imx8mm
     phycore-imx8mp
doc/board/phytec/phycore-am64x.rst new file +92 -0
new file mode 100644
index 0000000000..202b756dc4
@@ -0,0 +1,159 @@
+.. SPDX-License-Identifier: GPL-2.0+
+.. sectionauthor:: Wadim Egorov <[email protected]>
+
+phyCORE-AM64x
+=============
+
+The `phyCORE-AM64x <https://www.phytec.com/product/phycore-am64x>`_ is a
+SoM (System on Module) featuring TI's AM64x 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 AM64x family.
+
+A development Kit, called `phyBOARD-Lyra <https://www.phytec.com/product/phyboard-am64x>`_
+is used as a carrier board reference design around the AM64x 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
+    :end-before: .. k3_rst_include_end_common_env_vars_defn
+.. code-block:: bash
+
+ $ export UBOOT_CFG_CORTEXR=phycore_am64x_r5_defconfig
+ $ export UBOOT_CFG_CORTEXA=phycore_am64x_a53_defconfig
+ $ export TFA_BOARD=lite
+ $ # we don't use any extra TFA parameters
+ $ unset TFA_EXTRA_ARGS
+ $ export OPTEE_PLATFORM=k3-am64x
+ # we don't use any extra OPTEE parameters
+ unset OPTEE_EXTRA_ARGS
+
+.. 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
+
+
+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
+
Quoted 8 lines

doc/board/phytec/phycore-am64x.rst line 98

Quoted 6 lines
doc/board/phytec/phycore-am64x.rst new file +6 -0
+To boot from a micro SD card on a HSFS device simply copy the following
+artifacts to the FAT partition:
+
+* tiboot3.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

Is the _unsigned really required? I guess the regular tispl and u-boot.img should also work right? It will just skip auth I guess.

No, it is not required. Copy&pasted it from phycore-am62x.rst. Thanks, I will update both doc files.

Quoted 6 lines

[...]

Mostly looks good, thanks!