arm: am654: Add r5 support for am654-evm
Subsystems (2)
v3 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.
Series depends on the following 2 pathces:
- https://patchwork.ozlabs.org/patch/985201/
- https://patchwork.ozlabs.org/patch/988704/
Changes since v2:
- Enabled CONFIG_SPL_DM_REGULATOR_GPIO in PATCH 9
- Remove the quotes in string CONFIG_SYS_K3_KEY when using
- Add dependency on $(KEY) for generating u-boot-spl-cert.bin
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 v3 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 v3 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 v3 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 v3 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 v3 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 v3 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 v3 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 v3 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 v3 8/10 armv7r: dts: am654: Add initial support
arch/arm/dts/k3-am654-base-board-ddr4-1333MHz.dtsi
Quoted 7 lines
arch/arm/dts/k3-am654-base-board-ddr4-1333MHz.dtsi new file +0
-0
There is a nice EMIF tool[1] that HW team created to auto generate this data. Also they have provided 1600MHz DDR configuration for AM654. Will Repost the series with the auto generated data.
[1] http://www.ti.com/lit/pdf/spracj0
Thanks and regards,
Lokesh
Quoted 196 lines
arch/arm/dts/k3-am654-base-board-ddr4-1333MHz.dtsi new file +195
-0@@ -0,0 +1,195 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/ + */ + +#define DDRCTL_DFIMISC 0x00000000 +#define DDRCTL_DFITMG0 0x04878206 +#define DDRCTL_DFITMG1 0x00060606 +#define DDRCTL_DFITMG2 0x00000504 +#define DDRCTL_INIT0 0x400100A3 +#define DDRCTL_INIT1 0x00420000 +#define DDRCTL_INIT2 0x00000000 +#define DDRCTL_INIT3 0x00100501 +#define DDRCTL_INIT4 0x00000020 +#define DDRCTL_INIT5 0x00100000 +#define DDRCTL_INIT6 0x00000480 +#define DDRCTL_INIT7 0x00000097 +#define DDRCTL_MSTR 0x41040010 +#define DDRCTL_ODTCFG 0x06000608 +#define DDRCTL_ODTMAP 0x00000001 +#define DDRCTL_RANKCTL 0x00000000 +#define DDRCTL_RFSHCTL0 0x00210070 +#define DDRCTL_RFSHCTL3 0x00000000 +#define DDRCTL_RFSHTMG 0x00510075 +#define DDRCTL_STAT 0x00000000 +#define DDRCTL_SWCTL 0x00000000 +#define DDRCTL_SWSTAT 0x00000000 +#define DDRCTL_ZQCTL0 0x21000040 +#define DDRCTL_ZQCTL1 0x00027bc8 +#define DDRCTL_CRCPARCTL0 0x1A000000 +#define DDRCTL_CRCPARCTL1 0x0048051E +#define DDRCTL_ECCCFG0 0x00000000 +#define DDRCTL_ADDRMAP0 0x001F1F1F +#define DDRCTL_ADDRMAP1 0x003f0808 +#define DDRCTL_ADDRMAP2 0x00000000 +#define DDRCTL_ADDRMAP3 0x00000000 +#define DDRCTL_ADDRMAP4 0x00001f1f +#define DDRCTL_ADDRMAP5 0x08080808 +#define DDRCTL_ADDRMAP6 0x08080808 +#define DDRCTL_ADDRMAP7 0x00000f0f +#define DDRCTL_ADDRMAP8 0x00000a0a +#define DDRCTL_ADDRMAP9 0x0000000 +#define DDRCTL_ADDRMAP10 0x0000000 +#define DDRCTL_ADDRMAP11 0x001f1f00 +#define DDRCTL_DQMAP0 0x00000000 +#define DDRCTL_DQMAP1 0x00000000 +#define DDRCTL_DQMAP4 0x00000000 +#define DDRCTL_DQMAP5 0x00000000 +#define DDRCTL_PWRCTL 0x00000000 +#define DDRCTL_DRAMTMG0 0x0b0a160b +#define DDRCTL_DRAMTMG1 0x00020310 +#define DDRCTL_DRAMTMG2 0x0506040a +#define DDRCTL_DRAMTMG3 0x0000400C +#define DDRCTL_DRAMTMG4 0x05020205 +#define DDRCTL_DRAMTMG5 0x04040302 +#define DDRCTL_DRAMTMG6 0x0000000 +#define DDRCTL_DRAMTMG7 0x00000000 +#define DDRCTL_DRAMTMG8 0x02020C04 +#define DDRCTL_DRAMTMG9 0x00020208 +#define DDRCTL_DRAMTMG11 0x1005010E +#define DDRCTL_DRAMTMG12 0x00000008 +#define DDRCTL_DRAMTMG13 0x00000000 +#define DDRCTL_DRAMTMG14 0x00000000 +#define DDRCTL_DRAMTMG15 0x00000035 +#define DDRCTL_DRAMTMG17 0x00000000 +#define DDRPHY_DCR 0x0000040C +#define DDRPHY_DSGCR 0x02A0C129 +#define DDRPHY_DX0GCR0 0x00000000 +#define DDRPHY_DX0GCR1 0x00000000 +#define DDRPHY_DX0GCR2 0x00000000 +#define DDRPHY_DX0GCR3 0x00000000 +#define DDRPHY_DX0GCR4 0x0E00c93C +#define DDRPHY_DX0GCR5 0x00000049 +#define DDRPHY_DX0GSR0 0x00000000 +#define DDRPHY_DX0GSR1 0x00000000 +#define DDRPHY_DX0GSR2 0x00000000 +#define DDRPHY_DX0GSR3 0x00000000 +#define DDRPHY_DX0GSR4 0x00000000 +#define DDRPHY_DX0GSR5 0x00000000 +#define DDRPHY_DX0GSR6 0x00000000 +#define DDRPHY_DX0GTR0 0x00020002 +#define DDRPHY_DX1GCR0 0x00000000 +#define DDRPHY_DX1GCR1 0x00000000 +#define DDRPHY_DX1GCR2 0x00000000 +#define DDRPHY_DX1GCR3 0x00000000 +#define DDRPHY_DX1GCR4 0x0E00c93C +#define DDRPHY_DX1GCR5 0x00000049 +#define DDRPHY_DX1GSR0 0x00000000 +#define DDRPHY_DX1GSR1 0x00000000 +#define DDRPHY_DX1GSR2 0x00000000 +#define DDRPHY_DX1GSR3 0x00000000 +#define DDRPHY_DX1GSR4 0x00000000 +#define DDRPHY_DX1GSR5 0x00000000 +#define DDRPHY_DX1GSR6 0x00000000 +#define DDRPHY_DX1GTR0 0x00020002 +#define DDRPHY_DX2GCR0 0x00000000 +#define DDRPHY_DX2GCR1 0x00000000 +#define DDRPHY_DX2GCR2 0x00000000 +#define DDRPHY_DX2GCR3 0x00000000 +#define DDRPHY_DX2GCR4 0x0E00c93C +#define DDRPHY_DX2GCR5 0x00000049 +#define DDRPHY_DX2GSR0 0x00000000 +#define DDRPHY_DX2GSR1 0x00000000 +#define DDRPHY_DX2GSR2 0x00000000 +#define DDRPHY_DX2GSR3 0x00000000 +#define DDRPHY_DX2GSR4 0x00000000 +#define DDRPHY_DX2GSR5 0x00000000 +#define DDRPHY_DX2GSR6 0x00000000 +#define DDRPHY_DX2GTR0 0x00020002 +#define DDRPHY_DX3GCR0 0x00000000 +#define DDRPHY_DX3GCR1 0x00000000 +#define DDRPHY_DX3GCR2 0x00000000 +#define DDRPHY_DX3GCR3 0x00000000 +#define DDRPHY_DX3GCR4 0x0E00c93C +#define DDRPHY_DX3GCR5 0x00000049 +#define DDRPHY_DX3GSR0 0x00000000 +#define DDRPHY_DX3GSR1 0x00000000 +#define DDRPHY_DX3GSR2 0x00000000 +#define DDRPHY_DX3GSR3 0x00000000 +#define DDRPHY_DX3GSR4 0x00000000 +#define DDRPHY_DX3GSR5 0x00000000 +#define DDRPHY_DX3GSR6 0x00000000 +#define DDRPHY_DX3GTR0 0x00020002 +#define DDRPHY_DX4GCR0 0x40703260 +#define DDRPHY_DX4GCR1 0x55556000 +#define DDRPHY_DX4GCR2 0xaaaa0000 +#define DDRPHY_DX4GCR3 0xffe18587 +#define DDRPHY_DX4GCR4 0x00000000 +#define DDRPHY_DX4GCR5 0x00000000 +#define DDRPHY_DX4GSR0 0x00000000 +#define DDRPHY_DX4GSR1 0x00000000 +#define DDRPHY_DX4GSR2 0x00000000 +#define DDRPHY_DX4GSR3 0x00000000 +#define DDRPHY_DX4GSR4 0x00000000 +#define DDRPHY_DX4GSR5 0x00000000 +#define DDRPHY_DX4GSR6 0x00000000 +#define DDRPHY_DX4GTR0 0x00000000 +#define DDRPHY_DX8SL0DQSCTL 0x00000000 +#define DDRPHY_DX8SL0DXCTL2 0x00141830 +#define DDRPHY_DX8SL0IOCR 0x04800000 +#define DDRPHY_DX8SL0PLLCR0 0x021c4000 +#define DDRPHY_DX8SL1DQSCTL 0x00000000 +#define DDRPHY_DX8SL1DXCTL2 0x00141830 +#define DDRPHY_DX8SL1IOCR 0x04800000 +#define DDRPHY_DX8SL1PLLCR0 0x021c4000 +#define DDRPHY_DX8SL2DQSCTL 0x00000000 +#define DDRPHY_DX8SL2DXCTL2 0x00141830 +#define DDRPHY_DX8SL2IOCR 0x04800000 +#define DDRPHY_DX8SL2PLLCR0 0x021c4000 +#define DDRPHY_DXCCR 0x00000038 +#define DDRPHY_ODTCR 0x00010000 +#define DDRPHY_PGCR0 0x00000000 +#define DDRPHY_PGCR1 0x020046C0 +#define DDRPHY_PGCR2 0x00F09f60 +#define DDRPHY_PGCR3 0x55AA0080 +#define DDRPHY_PGCR5 0x01010004 +#define DDRPHY_PGCR6 0x00013001 +#define DDRPHY_PGSR0 0x00000000 +#define DDRPHY_DTCR0 0x8000B1c7 +#define DDRPHY_DTCR1 0x00010236 +#define DDRPHY_MR0 0x00000010 +#define DDRPHY_MR1 0x00000501 +#define DDRPHY_MR2 0x00000000 +#define DDRPHY_MR3 0x00000020 +#define DDRPHY_MR4 0x00000000 +#define DDRPHY_MR5 0x00000480 +#define DDRPHY_MR6 0x00000097 +#define DDRPHY_MR11 0x00000000 +#define DDRPHY_MR12 0x00000000 +#define DDRPHY_MR13 0x00000000 +#define DDRPHY_MR14 0x00000000 +#define DDRPHY_MR22 0x00000000 +#define DDRPHY_PIR 0x00000000 +#define DDRPHY_PLLCR0 0x021c4000 +#define DDRPHY_RANKIDR 0x0000000 +#define DDRPHY_VTCR0 0xF3C32017 +#define DDRPHY_ACIOCR5 0x04800000 +#define DDRPHY_IOVCR0 0x0F0C0C0C +#define DDRPHY_DTPR0 0x04160905 +#define DDRPHY_DTPR1 0x28140000 +#define DDRPHY_DTPR2 0x00040300 +#define DDRPHY_DTPR3 0x02800000 +#define DDRPHY_DTPR4 0x00ea0704 +#define DDRPHY_DTPR5 0x001f0905 +#define DDRPHY_DTPR6 0x00000505 +#define DDRPHY_PTR2 0x00000000 +#define DDRPHY_PTR3 0x00061A80 +#define DDRPHY_PTR4 0x000000E0 +#define DDRPHY_PTR5 0x00027100 +#define DDRPHY_PTR6 0x04000320 +#define DDRPHY_ZQCR 0x008A2A58 +#define DDRPHY_ZQ0PR0 0x000077DD +#define DDRPHY_ZQ1PR0 0x000077DD +#define DDRPHY_ZQ2PR0 0x000077DD +#define DDRPHY_ZQ3PR0 0x000077DD
PATCH v3 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 v3 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