arm: am654: Add r5 support for am654-evm
Subsystems (2)
v2 cover arm: am654: Add r5 support for am654-evm
This series adds r5 build support for booting am654 evm.
There is still 1 step(loading system firmware) missing to complete the full boot. This will be posted as a separate series.
Changes since v1:
- Fixed SPDX headers in patch 1/10
- Updated Linux tag from which dts got synced.
- Updated Reviewed-by tags
Lokesh Vutla (10):
ram: Introduce K3 AM654 DDR Sub System driver
armv7R: K3: am654: Enable MPU regions
armv7R: K3: am654: Add support for generating build targets
armv7R: K3: am654: Add support to start ATF from R5 SPL
armv7R: K3: am654: Add support for triggering ddr init from SPL
board: ti: am654: r5: Add initial support for am654
arm: dts: k3: Sync dts from Linux
armv7r: dts: am654: Add initial support
configs: am65x_evm_r5: Add initial support
board: ti: am65x: Update README to add R5 build support
arch/arm/dts/Makefile | 2 +- arch/arm/dts/k3-am65-main.dtsi | 51 +- arch/arm/dts/k3-am65-mcu.dtsi | 18 + arch/arm/dts/k3-am65-wakeup.dtsi | 46 + arch/arm/dts/k3-am65.dtsi | 54 +- .../dts/k3-am654-base-board-ddr4-1333MHz.dtsi | 195 +++ arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 94 +- arch/arm/dts/k3-am654-ddr.dtsi | 241 ++++ arch/arm/dts/k3-am654-r5-base-board.dts | 139 ++ arch/arm/mach-k3/Kconfig | 18 + arch/arm/mach-k3/Makefile | 2 + arch/arm/mach-k3/am6_init.c | 18 + arch/arm/mach-k3/common.c | 52 + arch/arm/mach-k3/common.h | 11 + arch/arm/mach-k3/config.mk | 59 + arch/arm/mach-k3/include/mach/sys_proto.h | 14 + arch/arm/mach-k3/r5_mpu.c | 47 + board/ti/am65x/Kconfig | 24 + board/ti/am65x/MAINTAINERS | 1 + board/ti/am65x/README | 114 +- configs/am65x_evm_r5_defconfig | 87 ++ .../ram/k3-am654-ddrss.txt | 46 + drivers/ram/Kconfig | 11 + drivers/ram/Makefile | 2 + drivers/ram/k3-am654-ddrss.c | 776 +++++++++++ drivers/ram/k3-am654-ddrss.h | 1227 +++++++++++++++++ include/configs/am65x_evm.h | 6 + include/configs/ti_armv7_common.h | 2 + tools/k3_x509template.txt | 48 + 29 files changed, 3290 insertions(+), 115 deletions(-) create mode 100644 arch/arm/dts/k3-am65-mcu.dtsi create mode 100644 arch/arm/dts/k3-am65-wakeup.dtsi create mode 100644 arch/arm/dts/k3-am654-base-board-ddr4-1333MHz.dtsi create mode 100644 arch/arm/dts/k3-am654-ddr.dtsi create mode 100644 arch/arm/dts/k3-am654-r5-base-board.dts create mode 100644 arch/arm/mach-k3/common.c create mode 100644 arch/arm/mach-k3/common.h create mode 100644 arch/arm/mach-k3/include/mach/sys_proto.h create mode 100644 arch/arm/mach-k3/r5_mpu.c create mode 100644 configs/am65x_evm_r5_defconfig create mode 100644 doc/device-tree-bindings/ram/k3-am654-ddrss.txt create mode 100644 drivers/ram/k3-am654-ddrss.c create mode 100644 drivers/ram/k3-am654-ddrss.h create mode 100644 tools/k3_x509template.txt
Signature · 1 line
2.19.1
PATCH v2 1/10 ram: Introduce K3 AM654 DDR Sub System driver
K3 based AM654 devices has DDR memory subsystem that comprises Synopys DDR controller, Synopsis DDR phy and wrapper logic to intergrate these blocks into the device. This DDR subsystem provides an interface to external SDRAM devices. Adding support for the initialization of the external SDRAM devices by configuring the DDRSS registers and using the buitin PHY routines.
--- arch/arm/mach-k3/include/mach/sys_proto.h | 14 + .../ram/k3-am654-ddrss.txt | 46 + drivers/ram/Kconfig | 11 + drivers/ram/Makefile | 2 + drivers/ram/k3-am654-ddrss.c | 776 +++++++++++ drivers/ram/k3-am654-ddrss.h | 1227 +++++++++++++++++ 6 files changed, 2076 insertions(+) create mode 100644 arch/arm/mach-k3/include/mach/sys_proto.h create mode 100644 doc/device-tree-bindings/ram/k3-am654-ddrss.txt create mode 100644 drivers/ram/k3-am654-ddrss.c create mode 100644 drivers/ram/k3-am654-ddrss.h
arch/arm/mach-k3/include/mach/sys_proto.h new file +14 -0
@@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/ +* Andreas Dannenberg <[email protected]> +*/ + +#ifndef _SYS_PROTO_H_ +#define _SYS_PROTO_H_ + +void sdelay (unsigned long loops); +u32 wait_on_value (u32 read_bit_mask,u32 match_value,void *read_addr, +u32 bound); + +#endif
doc/device-tree-bindings/ram/k3-am654-ddrss.txt new file +46 -0
46 lines not on this page · raw message
drivers/ram/Kconfig +11 -0
@@ -43,4 +43,15 @@ config MPC83XX_SDRAM the RAM through the use of SPD (Serial Presence Detect) is supported via device tree settings. +config K3_AM654_DDRSS + bool "Enable AM654 DDRSS support" + depends on RAM && SOC_K3_AM6 + help + K3 based AM654 devices has DDR memory subsystem that comprises + Synopys DDR controller, Synopsis DDR phy and wrapper logic to + intergrate these blocks into the device. This DDR subsystem + provides an interface to external SDRAM devices. Enabling this + config add support for the initialization of the external + SDRAM devices connected to DDR subsystem. + source "drivers/ram/stm32mp1/Kconfig"
drivers/ram/Makefile +2 -0
@@ -12,3 +12,5 @@ obj-$(CONFIG_STM32_SDRAM) += stm32_sdram.o obj-$(CONFIG_ARCH_BMIPS) += bmips_ram.o obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/ + +obj-$(CONFIG_K3_AM654_DDRSS) += k3-am654-ddrss.o
drivers/ram/k3-am654-ddrss.c new file +776 -0
776 lines not on this page · raw message
drivers/ram/k3-am654-ddrss.h new file +1227 -0
1,227 lines not on this page · raw message
Signature · 1 line
2.19.1
PATCH v2 2/10 armv7R: K3: am654: Enable MPU regions
In reply to Lokesh VutlaEnable MPU regions for AM654 evm:
- Region0: 0x00000000 - 0xFFFFFFFF: Device memory, not executable
- Region1: 0x41c00000 - 0x42400000: Normal, executable, WB, Write alloc
- Region2: 0x80000000 - 0xFFFFFFFF: Normal, executable, WB, Write alloc
- region3-15: Disabled
With this dcache can be enabled either in SPL or U-Boot.
--- arch/arm/mach-k3/Makefile | 1 + arch/arm/mach-k3/am6_init.c | 5 ++++ arch/arm/mach-k3/common.h | 11 +++++++++ arch/arm/mach-k3/r5_mpu.c | 47 +++++++++++++++++++++++++++++++++++++ 4 files changed, 64 insertions(+) create mode 100644 arch/arm/mach-k3/common.h create mode 100644 arch/arm/mach-k3/r5_mpu.c
arch/arm/mach-k3/Makefile +1 -0
@@ -5,3 +5,4 @@ obj-$(CONFIG_SOC_K3_AM6) += am6_init.o obj-$(CONFIG_ARM64) += arm64-mmu.o +obj-$(CONFIG_CPU_V7R) += r5_mpu.o
arch/arm/mach-k3/am6_init.c +5 -0
@@ -10,6 +10,7 @@#include <asm/io.h> #include <spl.h> #include <asm/arch/hardware.h> +#include "common.h" #ifdef CONFIG_SPL_BUILD static void mmr_unlock (u32 base,u32 partition)
@@ -65,6 +66,10 @@ void board_init_f(ulong dummy)/* Make all control module registers accessible */ ctrl_mmr_unlock (); +#ifdef CONFIG_CPU_V7R +setup_k3_mpu_regions (); +#endif +/* Init DM early in-order to invoke system controller */ spl_early_init ();
arch/arm/mach-k3/common.h new file +11 -0
@@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* K3: Architecture common definitions +* +* Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/ +* Lokesh Vutla <[email protected]> +*/ + +#include <asm/armv7_mpu.h> + +void setup_k3_mpu_regions (void );
arch/arm/mach-k3/r5_mpu.c new file +47 -0
47 lines not on this page · raw message
Signature · 1 line
2.19.1
PATCH v2 3/10 armv7R: K3: am654: Add support for generating build targets
In reply to Lokesh VutlaUpdate Makefiles to generate:
- tiboot3.bin: Image format that can be processed by ROM.
Below is the tiboot3.bin image format that is required by ROM:
_______________________ | X509 | | Certificate | | ____________________ | | | | | | | u-boot-spl.bin | | | | | | | |___________________| | |_______________________|
--- arch/arm/mach-k3/Kconfig | 11 +++++++ arch/arm/mach-k3/config.mk | 59 ++++++++++++++++++++++++++++++++++++++ tools/k3_x509template.txt | 48 +++++++++++++++++++++++++++++++ 3 files changed, 118 insertions(+) create mode 100644 tools/k3_x509template.txt
arch/arm/mach-k3/Kconfig +11 -0
@@ -47,5 +47,16 @@ config SYS_K3_BOOT_PARAM_TABLE_INDEX Address at which ROM stores the value which determines if SPL is booted up by primary boot media or secondary boot media. +config SYS_K3_KEY + string "Key used to generate x509 certificate" + help + This option enables to provide a custom key that can be used for + generating x509 certificate for spl binary. If not needed leave + it blank so that a random key is generated and used. + +config SYS_K3_BOOT_CORE_ID + int + default 16 + source "board/ti/am65x/Kconfig" endif
arch/arm/mach-k3/config.mk +59 -0
65 lines not on this page · raw message
tools/k3_x509template.txt new file +48 -0
48 lines not on this page · raw message
Signature · 1 line
2.19.1
PATCH v2 4/10 armv7R: K3: am654: Add support to start ATF from R5 SPL
In reply to Lokesh VutlaConsidering the boot time requirements, Cortex-A core should be able to start immediately after SPL on R5. Add support for the same.
--- arch/arm/mach-k3/Kconfig | 7 ++++++ arch/arm/mach-k3/Makefile | 1 + arch/arm/mach-k3/common.c | 52 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 arch/arm/mach-k3/common.c
arch/arm/mach-k3/Kconfig +7 -0
@@ -58,5 +58,12 @@ config SYS_K3_BOOT_CORE_ID int default 16 +config SYS_K3_SPL_ATF + bool "Start Cortex-A from SPL" + depends on SPL && CPU_V7R + help + Enabling this will try to start Cortex-A (typically with ATF) + after SPL from R5. + source "board/ti/am65x/Kconfig" endif
arch/arm/mach-k3/Makefile +1 -0
@@ -6,3 +6,4 @@ obj-$(CONFIG_SOC_K3_AM6) += am6_init.o obj-$(CONFIG_ARM64) += arm64-mmu.o obj-$(CONFIG_CPU_V7R) += r5_mpu.o +obj-y += common.o
arch/arm/mach-k3/common.c new file +52 -0
52 lines not on this page · raw message
Signature · 1 line
2.19.1
PATCH v2 5/10 armv7R: K3: am654: Add support for triggering ddr init from SPL
In reply to Lokesh VutlaIn SPL, DDR should be made available by the end of board_init_f() so that apis in board_init_r() can use ddr. Adding support for triggering DDR initialization from board_init_f().
--- arch/arm/mach-k3/am6_init.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
arch/arm/mach-k3/am6_init.c +13 -0
@@ -11,6 +11,7 @@#include <spl.h> #include <asm/arch/hardware.h> #include "common.h" +#include <dm.h> #ifdef CONFIG_SPL_BUILD static void mmr_unlock (u32 base,u32 partition)
@@ -57,6 +58,10 @@ static void store_boot_index_from_rom(void)void board_init_f (ulong dummy) { +#if defined(CONFIG_K3_AM654_DDRSS ) +struct udevice *dev; +int ret; +#endif /* * Cannot delay this further as there is a chance that * K3_BOOT_PARAM_TABLE_INDEX can be over written by SPL MALLOC section.
@@ -75,6 +80,14 @@ void board_init_f(ulong dummy)/* Prepare console output */ preloader_console_init (); + +#ifdef CONFIG_K3_AM654_DDRSS + ret =uclass_get_device (UCLASS_RAM ,0 , &dev); +if (ret) { +printf ("DRAM init failed: %d\n" , ret); +return ; + } +#endif }u32 spl_boot_mode (const u32 boot_device)
Signature · 1 line
2.19.1
PATCH v2 6/10 board: ti: am654: r5: Add initial support for am654
In reply to Lokesh VutlaAdd initial support for AM654 based EVM running on R5.
--- board/ti/am65x/Kconfig | 24 ++++++++++++++++++++++++ include/configs/am65x_evm.h | 6 ++++++ include/configs/ti_armv7_common.h | 2 ++ 3 files changed, 32 insertions(+)
board/ti/am65x/Kconfig +24 -0
@@ -12,6 +12,14 @@ config TARGET_AM654_A53_EVM select ARM64 select SOC_K3_AM6 +config TARGET_AM654_R5_EVM + bool "TI K3 based AM654 EVM running on R5" + select CPU_V7R + select SYS_THUMB_BUILD + select SOC_K3_AM6 + select K3_AM654_DDRSS + imply SYS_K3_SPL_ATF + endchoice if TARGET_AM654_A53_EVM
@@ -26,3 +34,19 @@ config SYS_CONFIG_NAME default "am65x_evm" endif + +if TARGET_AM654_R5_EVM + +config SYS_BOARD + default "am65x" + +config SYS_VENDOR + default "ti" + +config SYS_CONFIG_NAME + default "am65x_evm" + +config SPL_LDSCRIPT + default "arch/arm/mach-omap2/u-boot-spl.lds" + +endif
include/configs/am65x_evm.h +6 -0
@@ -21,6 +21,12 @@/* SPL Loader Configuration */ #ifdef CONFIG_TARGET_AM654_A53_EVM #define CONFIG_SPL_TEXT_BASE 0x80080000 +#else +#define CONFIG_SPL_TEXT_BASE 0x41c00000 +#endif + +#ifdef CONFIG_SYS_K3_SPL_ATF +#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "tispl.bin"#endif #define CONFIG_SKIP_LOWLEVEL_INIT
include/configs/ti_armv7_common.h +2 -0
@@ -165,7 +165,9 @@/* FAT sd card locations. */ #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 +#ifndef CONFIG_SPL_FS_LOAD_PAYLOAD_NAME #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img" +#endif #ifdef CONFIG_SPL_OS_BOOT /* FAT */
Signature · 1 line
2.19.1
PATCH v2 7/10 arm: dts: k3: Sync dts from Linux
In reply to Lokesh VutlaSync the k3-am654 specific dts files from Linux next with tag 20181019. This changes are in queue for Linux v4.20-rc1
--- arch/arm/dts/k3-am65-main.dtsi | 51 +++++++++-- arch/arm/dts/k3-am65-mcu.dtsi | 18 ++++ arch/arm/dts/k3-am65-wakeup.dtsi | 46 ++++++++++ arch/arm/dts/k3-am65.dtsi | 54 ++++++----- arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 94 ++++++-------------- 5 files changed, 171 insertions(+), 92 deletions(-) create mode 100644 arch/arm/dts/k3-am65-mcu.dtsi create mode 100644 arch/arm/dts/k3-am65-wakeup.dtsi
arch/arm/dts/k3-am65-main.dtsi +46 -5
@@ -8,13 +8,13 @@ &cbass_main { gic500: interrupt-controller at 1800000 { compatible = "arm,gic-v3"; - #address-cells = <1>; - #size-cells = <1>; + #address-cells = <2>; + #size-cells = <2>; ranges; #interrupt-cells = <3>; interrupt-controller; - reg = <0x01800000 0x10000>, /* GICD */ - <0x01880000 0x90000>; /* GICR */ + reg = <0x00 0x01800000 0x00 0x10000>, /* GICD */ + <0x00 0x01880000 0x00 0x90000>; /* GICR */ /* * vcpumntirq: * virtual CPU interface maintenance interrupt
@@ -23,9 +23,50 @@ gic_its: gic-its at 18200000 { compatible = "arm,gic-v3-its"; - reg = <0x01820000 0x10000>; + reg = <0x00 0x01820000 0x00 0x10000>; msi-controller; #msi-cells = <1>; }; }; + + secure_proxy_main: mailbox at 32c00000 { + compatible = "ti,am654-secure-proxy"; + #mbox-cells = <1>; + reg-names = "target_data", "rt", "scfg"; + reg = <0x00 0x32c00000 0x00 0x100000>, + <0x00 0x32400000 0x00 0x100000>, + <0x00 0x32800000 0x00 0x100000>; + interrupt-names = "rx_011"; + interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; + }; + + main_uart0: serial at 2800000 { + compatible = "ti,am654-uart"; + reg = <0x00 0x02800000 0x00 0x100>; + reg-shift = <2>; + reg-io-width = <4>; + interrupts = <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>; + clock-frequency = <48000000>; + current-speed = <115200>; + }; + + main_uart1: serial at 2810000 { + compatible = "ti,am654-uart"; + reg = <0x00 0x02810000 0x00 0x100>; + reg-shift = <2>; + reg-io-width = <4>; + interrupts = <GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>; + clock-frequency = <48000000>; + current-speed = <115200>; + }; + + main_uart2: serial at 2820000 { + compatible = "ti,am654-uart"; + reg = <0x00 0x02820000 0x00 0x100>; + reg-shift = <2>; + reg-io-width = <4>; + interrupts = <GIC_SPI 194 IRQ_TYPE_LEVEL_HIGH>; + clock-frequency = <48000000>; + current-speed = <115200>; + }; };
arch/arm/dts/k3-am65-mcu.dtsi new file +18 -0
@@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device Tree Source for AM6 SoC Family MCU Domain peripherals + * + * Copyright (C) 2016-2018 Texas Instruments Incorporated - http://www.ti.com/ + */ + +&cbass_mcu { + mcu_uart0: serial at 40a00000 { + compatible = "ti,am654-uart"; + reg = <0x00 0x40a00000 0x00 0x100>; + reg-shift = <2>; + reg-io-width = <4>; + interrupts = <GIC_SPI 565 IRQ_TYPE_LEVEL_HIGH>; + clock-frequency = <96000000>; + current-speed = <115200>; + }; +};
arch/arm/dts/k3-am65-wakeup.dtsi new file +46 -0
46 lines not on this page · raw message
arch/arm/dts/k3-am65.dtsi +32 -22
79 lines not on this page · raw message
arch/arm/dts/k3-am654-base-board-u-boot.dtsi +29 -65
151 lines not on this page · raw message
Signature · 1 line
2.19.1
PATCH v2 7/10 arm: dts: k3: Sync dts from Linux
Quoted 4 lines · Lokesh Vutla
Sync the k3-am654 specific dts files from Linux next with tag 20181019. This changes are in queue for Linux v4.20-rc1
Signed-off-by Lokesh Vutla <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181024/3d19e7e5/attachment.sig>
PATCH v2 8/10 armv7r: dts: am654: Add initial support
In reply to Lokesh VutlaAdd R5 specific dts for am654-evm.
--- arch/arm/dts/Makefile | 2 +- .../dts/k3-am654-base-board-ddr4-1333MHz.dtsi | 195 ++++++++++++++ arch/arm/dts/k3-am654-ddr.dtsi | 241 ++++++++++++++++++ arch/arm/dts/k3-am654-r5-base-board.dts | 139 ++++++++++ 4 files changed, 576 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/k3-am654-base-board-ddr4-1333MHz.dtsi create mode 100644 arch/arm/dts/k3-am654-ddr.dtsi create mode 100644 arch/arm/dts/k3-am654-r5-base-board.dts
arch/arm/dts/Makefile +1 -1
@@ -554,7 +554,7 @@ dtb-$(CONFIG_TARGET_STM32MP1) += \ stm32mp157c-ed1.dtb \ stm32mp157c-ev1.dtb -dtb-$(CONFIG_SOC_K3_AM6) += k3-am654-base-board.dtb +dtb-$(CONFIG_SOC_K3_AM6) += k3-am654-base-board.dtb k3-am654-r5-base-board.dtb targets += $(dtb-y)
arch/arm/dts/k3-am654-base-board-ddr4-1333MHz.dtsi new file +195 -0
195 lines not on this page · raw message
arch/arm/dts/k3-am654-ddr.dtsi new file +241 -0
241 lines not on this page · raw message
arch/arm/dts/k3-am654-r5-base-board.dts new file +139 -0
139 lines not on this page · raw message
Signature · 1 line
2.19.1
PATCH v2 9/10 configs: am65x_evm_r5: Add initial support
In reply to Lokesh VutlaAdd initial defconfig support for AM65x
that runs on R5.
--- board/ti/am65x/MAINTAINERS | 1 + configs/am65x_evm_r5_defconfig | 87 ++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 configs/am65x_evm_r5_defconfig
board/ti/am65x/MAINTAINERS +1 -0
@@ -4,3 +4,4 @@ S: Maintained F: board/ti/am65x/ F: include/configs/am65x_evm.h F: configs/am65x_evm_a53_defconfig +F: configs/am65x_evm_r5_defconfig
configs/am65x_evm_r5_defconfig new file +87 -0
87 lines not on this page · raw message
Signature · 1 line
2.19.1
PATCH v2 10/10 board: ti: am65x: Update README to add R5 build support
In reply to Lokesh VutlaUpdate the README file to add r5 build support and system firmware support.
--- board/ti/am65x/README | 114 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 92 insertions(+), 22 deletions(-)
board/ti/am65x/README +92 -22
@@ -37,13 +37,13 @@ instead use Flacon boot flow to reduce boot time. | +--------+ | | | | : | | | | +--------+ | +-----------+ | | -| | *rom* |----------|-->| Reset rls | | | +| | *ROM* |----------|-->| Reset rls | | | | +--------+ | +-----------+ | | | | | | : | | -| | rom | | : | | +| | ROM | | : | | | |services| | : | | | | | | +-------------+ | | -| | | | | *R5 rom* | | | +| | | | | *R5 ROM* | | | | | | | +-------------+ | | | | |<---------|---|Load and auth| | | | | | | | tiboot3.bin | | |
@@ -52,17 +52,25 @@ instead use Flacon boot flow to reduce boot time. | | | | : | | | | | | : | | | | | | +-------------+ | | -| | Start | | | *R5 SPL* | | | -| | System | | +-------------+ | | -| |Firmware|<---------|---|Load and auth| | | -| +--------+ | | sysfw bin | | | -| : | +-------------+ | | -| +---------+ | | DDR | | | -| | *SYSFW* | | | config | | | -| +---------+ | +-------------+ | | -| | |<--------|---| Load | | | -| | | | | tispl.bin | | | +| | | | | *R5 SPL* | | | +| | | | +-------------+ | | +| | | | | Load | | | +| | | | | sysfw.itb | | | +| | Start | | +-------------+ | | +| | System |<---------|---| Start | | | +| |Firmware| | | SYSFW | | | +| +--------+ | +-------------+ | | +| : | | | | | +| +---------+ | | Load | | | +| | *SYSFW* | | | system | | | +| +---------+ | | Config data | | | +| | |<--------|---| | | | +| | | | +-------------+ | | +| | | | | | | | +| | | | | DDR | | | +| | | | | config | | | | | | | +-------------+ | | +| | | | | | | | | | |<--------|---| Start A53 | | | | | | | | and Reset | | | | | | | +-------------+ | |
@@ -82,7 +90,7 @@ instead use Flacon boot flow to reduce boot time. | | | | | +-----------+ | | | | | | : | | | | | | +-----------+ | -| | |<--------|-----------------------|---->| *u-boot* | | +| | |<--------|-----------------------|---->| *U-Boot* | | | | | | | +-----------+ | | | | | | | prompt | | | | | | | +-----------+ |
@@ -96,9 +104,8 @@ requests DMSC to get these services done as shown in the above diagram. Sources: -------- 1. SYSFW: - System Firmware repo is closed source and the binaries are delivered - to users with NDA. Please contact TI to get the System Firmware - Binary named ti-sci-firmware-am6x.bin that runs on AM65x SoC. + Tree: git://git.ti.com/processor-firmware/system-firmware-image-gen.git + Branch: master 2. ATF: Tree: https://github.com/ARM-software/arm-trusted-firmware.git
@@ -115,9 +122,7 @@ Sources: Build procedure: ---------------- 1. SYSFW: - ROM expects a signed binary that contains the X509 certificate. So -the binary ti-sci-firmware-am6x.bin cannot be uses as-is and needs to be signed. -Contact TI on the procedure to sign the system firmware binary. +$ make CROSS_COMPILE=arm-linux-gnueabihf- 2. ATF: $ make CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64 PLAT=k3 TARGET_BOARD=generic SPD=opteed
@@ -128,14 +133,79 @@ $ make PLATFORM=k3-am65x CFG_ARM64_core=y 4. U-Boot: 4.1. R5: - TBD. +$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am65x_evm_r5_defconfig O=/tmp/r5 +$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=/tmp/r5 4.2. A53: $ make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- am65x_evm_a53_defconfig O=/tmp/a53 -$ make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- ATF=<path to ATF dir>/build/k3/generic/release/bl31.bin TEE=<path to OPTEE OS dir>/out/arm-plat-k3/core/tee-pager.bin O=/tmp/a53 +$ make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- ATF=<path to ATF dir>/build/k3/generic/release/bl31.bin TEE=<path to OPTEE OS dir>/out/arm-plat-k3/core/tee-pager.bin O=/tmp/a53 Target Images -------------- Copy the below images to an SD card and boot: +- sysfw.itb from step 1 - tiboot3.bin from step 4.1 - tispl.bin, u-boot.img from 4.2 + +Image formats: +-------------- + +- tiboot3.bin: + +-----------------------+ + | X.509 | + | Certificate | + | +-------------------+ | + | | | | + | | R5 | | + | | u-boot-spl.bin | | + | | | | + | +-------------------+ | + | | | | + | | FIT header | | + | | +---------------+ | | + | | | | | | + | | | DTB 1...N | | | + | | +---------------+ | | + | +-------------------+ | + +-----------------------+ + +- tispl.bin + +-----------------------+ + | | + | FIT HEADER | + | +-------------------+ | + | | | | + | | A53 ATF | | + | +-------------------+ | + | | | | + | | A53 OPTEE | | + | +-------------------+ | + | | | | + | | A53 SPL | | + | +-------------------+ | + | | | | + | | SPL DTB 1...N | | + | +-------------------+ | + +-----------------------+ + +- sysfw.itb + +-----------------------+ + | | + | FIT HEADER | + | +-------------------+ | + | | | | + | | sysfw.bin | | + | +-------------------+ | + | | | | + | | board config | | + | +-------------------+ | + | | | | + | | PM config | | + | +-------------------+ | + | | | | + | | RM config | | + | +-------------------+ | + | | | | + | | Secure config | | + | +-------------------+ | + +-----------------------+
Signature · 1 line
2.19.1