arm: mach-k3: Initial support for Texas Instrument's J7200 Platform
Subsystems (2)
v4 cover arm: mach-k3: Initial support for Texas Instrument's J7200 Platform
This series adds initial support for latest new SoC, J7200, from Texas Instruments.
The J7200 SoC is a part of the K3 Multicore SoC architecture platform. It is targeted for for automotive gateway, vehicle compute systems, Vehicle-to-Vehicle (V2V) and Vehicle-to-Everything (V2X) applications. The SoC aims to meet the complex processing needs of modern embedded products.
See J7200 Technical Reference Manual (SPRUIU1, June 2020) for further details: https://www.ti.com/lit/pdf/spruiu1
Changes since v3:
- Fixed CONFIG_USB_GADGET_PRODUCT_NUM id j7200_evm_a72_defconfig
- Enable CONFIG_ENV_OVERWRITE in j7200_evm_a72_defconfig
- Dropped R5F and DSP REMOTEPROC support in j7200_evm_a72_defconfig
- Enabled TARGET_J7200_A72_EVM where ever needed.
Dave Gerlach (1):
arm: dts: k3-j7200: Add R5 specific dts support
Jean-Jacques Hiblot (1):
arm: mach-k3: Fix platform hang when SPL_MULTI_DTB_FIT is not enabled
Kishon Vijay Abraham I (1):
soc: soc_ti_k3: Add device identification for J7200 SoC
Lokesh Vutla (15):
board: ti: board_detect: Add stub functions for EEPROM detection apis
board: ti: j721e: Probe eeprom only when CONFIG_TI_I2C_BOARD_DETECT is
defined
arm: mach-k3: Move mmr_unlock to a common location
arm: mach-k3: sysfw-loader: Add support for rom loading sysfw image
arm: mach-k3: j721e: Add detection for j721e
arm: mach-k3: j721e: Fix unlocking control module registers
arm: mach-k3: j7200: Add support for SOC detection
arm: mach-k3: j7200: Add support for storing extended boot info from
ROM
arm: mach-k3: j7200: Detect if ROM has already loaded sysfw
board: ti: j7200: Introduce support for j7200 build targets
board: ti: j7200: Add board detection support for j7200
ram: k3-j721e: Relax version checks for memory controller
arm: dts: k3-j7200: Add dts support
configs: j7200_evm_r5: Add initial support
configs: j7200_evm_a72: Add Initial support
Suman Anna (1):
board: ti: j721e: Update fdt fixup logic for interconnect nodes
arch/arm/dts/Makefile | 4 +- .../k3-j7200-common-proc-board-u-boot.dtsi | 104 + arch/arm/dts/k3-j7200-common-proc-board.dts | 123 + arch/arm/dts/k3-j7200-ddr-evm-lp4-1600.dtsi | 2195 +++++++++++++++++ arch/arm/dts/k3-j7200-main.dtsi | 313 +++ arch/arm/dts/k3-j7200-mcu-wakeup.dtsi | 117 + .../arm/dts/k3-j7200-r5-common-proc-board.dts | 199 ++ arch/arm/dts/k3-j7200-som-p0.dtsi | 29 + arch/arm/dts/k3-j7200.dtsi | 175 ++ arch/arm/mach-k3/am6_init.c | 12 +- arch/arm/mach-k3/common.c | 38 + arch/arm/mach-k3/common.h | 6 + arch/arm/mach-k3/config.mk | 8 +- arch/arm/mach-k3/include/mach/hardware.h | 8 + .../arm/mach-k3/include/mach/j721e_hardware.h | 3 + arch/arm/mach-k3/include/mach/sys_proto.h | 3 + arch/arm/mach-k3/include/mach/sysfw-loader.h | 4 +- arch/arm/mach-k3/j721e_init.c | 30 +- arch/arm/mach-k3/sysfw-loader.c | 56 +- board/ti/common/board_detect.h | 13 + board/ti/j721e/Kconfig | 53 + board/ti/j721e/MAINTAINERS | 2 + board/ti/j721e/evm.c | 26 +- configs/j7200_evm_a72_defconfig | 173 ++ configs/j7200_evm_r5_defconfig | 130 + drivers/ram/k3-j721e/lpddr4.c | 16 +- drivers/soc/soc_ti_k3.c | 4 + include/configs/j721e_evm.h | 4 +- 28 files changed, 3777 insertions(+), 71 deletions(-) create mode 100644 arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi create mode 100644 arch/arm/dts/k3-j7200-common-proc-board.dts create mode 100644 arch/arm/dts/k3-j7200-ddr-evm-lp4-1600.dtsi create mode 100644 arch/arm/dts/k3-j7200-main.dtsi create mode 100644 arch/arm/dts/k3-j7200-mcu-wakeup.dtsi create mode 100644 arch/arm/dts/k3-j7200-r5-common-proc-board.dts create mode 100644 arch/arm/dts/k3-j7200-som-p0.dtsi create mode 100644 arch/arm/dts/k3-j7200.dtsi create mode 100644 configs/j7200_evm_a72_defconfig create mode 100644 configs/j7200_evm_r5_defconfig
Signature · 1 line
2.23.0
PATCH v4 1/19 board: ti: board_detect: Add stub functions for EEPROM detection apis
Current usage of eeprom apis produce a build failure when CONFIG_TI_I2C_BOARD_DETECT is not defined. Add stub function for these apis to avoid build failures.
--- board/ti/common/board_detect.h | 13 +++++++++++++ 1 file changed, 13 insertions(+)
board/ti/common/board_detect.h +13 -0
@@ -311,6 +311,7 @@ int __maybe_unused ti_i2c_eeprom_am6_get(int bus_addr, int dev_addr,*/ int __maybe_unused ti_i2c_eeprom_am6_get_base (int bus_addr,int dev_addr); +#ifdef CONFIG_TI_I2C_BOARD_DETECT /** * board_ti_is() - Board detection logic for TI EVMs * @name_tag: Tag used in eeprom for the board
@@ -454,5 +455,17 @@ bool board_ti_was_eeprom_read(void);* Return: 0 if all went fine, else return error. */ int ti_i2c_eeprom_am_set (const char *name,const char *rev); +#else +static inline bool board_ti_is (char *name_tag) {return false; }; +static inline bool board_ti_k3_is (char *name_tag) {return false; }; +static inline bool board_ti_rev_is (char *rev_tag,int cmp_len) +{return false; }; +static inline char *board_ti_get_rev (void ) {return NULL ; }; +static inline char *board_ti_get_config (void ) {return NULL ; }; +static inline char *board_ti_get_name (void ) {return NULL ; }; +static inline bool board_ti_was_eeprom_read (void ) {return false; }; +static inline int ti_i2c_eeprom_am_set (const char *name,const char *rev) +{return -EINVAL ; }; +#endif #endif /* __BOARD_DETECT_H */
Signature · 1 line
2.23.0
PATCH v4 2/19 board: ti: j721e: Probe eeprom only when CONFIG_TI_I2C_BOARD_DETECT is defined
In reply to Lokesh VutlaGuard all eeprom probe with TI_I2C_BOARD_DETECT to avoid reading eeprom when eeprom is not available
--- arch/arm/mach-k3/j721e_init.c | 3 ++- board/ti/j721e/evm.c | 16 +++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-)
arch/arm/mach-k3/j721e_init.c +2 -1
@@ -208,7 +208,8 @@ void board_init_f(ulong dummy)k3_sysfw_print_ver ();/* Perform EEPROM-based board detection */ -do_board_detect (); +if (IS_ENABLED (CONFIG_TI_I2C_BOARD_DETECT )) +do_board_detect ();#if defined(CONFIG_CPU_V7R ) && defined(CONFIG_K3_AVS0 ) ret = uclass_get_device_by_driver(UCLASS_MISC, DM_GET_DRIVER(k3_avs),
board/ti/j721e/evm.c +11 -5
@@ -100,6 +100,7 @@ int ft_board_setup(void *blob, struct bd_info *bd) }#endif +#ifdef CONFIG_TI_I2C_BOARD_DETECT int do_board_detect (void ) {int ret;
@@ -336,14 +337,17 @@ static int probe_daughtercards(void) return 0; } +#endif int board_late_init (void ) { -setup_board_eeprom_env (); -setup_serial (); +if (IS_ENABLED (CONFIG_TI_I2C_BOARD_DETECT )) { +setup_board_eeprom_env (); +setup_serial (); -/* Check for and probe any plugged-in daughtercards */ -probe_daughtercards (); +/* Check for and probe any plugged-in daughtercards */ +probe_daughtercards (); + }return 0 ; }
@@ -355,7 +359,9 @@ void spl_board_init(void)int ret;#endif -probe_daughtercards (); +if (IS_ENABLED (CONFIG_TARGET_J721E_A72_EVM ) && +IS_ENABLED (CONFIG_TI_I2C_BOARD_DETECT )) +probe_daughtercards ();#ifdef CONFIG_ESM_K3 if (board_ti_k3_is ("J721EX-PM2-SOM" )) {
Signature · 1 line
2.23.0
PATCH v4 3/19 board: ti: j721e: Update fdt fixup logic for interconnect nodes
In reply to Lokesh VutlaFrom: Suman Anna <[email protected]>
The DT nodes on J721E SoCs currently use a node name "interconnect" for the various interconnects. This name is not following the DT schema, and should simply be "bus". Update the fdt fixup logic to use both the current and the expected corrected path names so that this logic won't be broken with newer kernels.
--- board/ti/j721e/evm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
board/ti/j721e/evm.c +4 -1
@@ -92,7 +92,10 @@ int ft_board_setup(void *blob, struct bd_info *bd) {int ret; - ret =fdt_fixup_msmc_ram (blob,"/interconnect at 100000" ,"sram at 70000000" ); + ret =fdt_fixup_msmc_ram (blob,"/bus at 100000" ,"sram at 70000000" ); +if (ret <0 ) + ret =fdt_fixup_msmc_ram (blob,"/interconnect at 100000" , +"sram@70000000" );if (ret)printf ("%s: fixing up msmc ram failed %d\n" , __func__, ret);
Signature · 1 line
2.23.0
PATCH v4 4/19 arm: mach-k3: Fix platform hang when SPL_MULTI_DTB_FIT is not enabled
In reply to Lokesh VutlaFrom: Jean-Jacques Hiblot <[email protected]>
If SPL_MULTI_DTB_FIT is not enabled, then CONFIG_SPL_OF_LIST is not defined And in turn tispl.bin ends up not embedding any DTB.
Fixing it by using CONFIG_DEFAULT_DEVICE_TREE if SPL_OF_LIST is empty.
--- arch/arm/mach-k3/config.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
arch/arm/mach-k3/config.mk +7 -1
@@ -58,10 +58,16 @@ SPL_ITS := u-boot-spl-k3.its INPUTS-y += tispl.bin endif +ifeq ($(CONFIG_SPL_OF_LIST),) +LIST_OF_DTB := $(CONFIG_DEFAULT_DEVICE_TREE) +else +LIST_OF_DTB := $(CONFIG_SPL_OF_LIST) +endif + quiet_cmd_k3_mkits = MKITS $@ cmd_k3_mkits = \ $(srctree)/tools/k3_fit_atf.sh \ - $(patsubst %,$(obj)/dts/%.dtb,$(subst ",,$(CONFIG_SPL_OF_LIST))) > $@ + $(patsubst %,$(obj)/dts/%.dtb,$(subst ",,$(LIST_OF_DTB))) > $@ $(SPL_ITS): FORCE $(call cmd,k3_mkits)
Signature · 1 line
2.23.0
PATCH v4 5/19 arm: mach-k3: Move mmr_unlock to a common location
In reply to Lokesh Vutlammr_unlock api is common for all k3 devices. Move it to a common location.
--- arch/arm/mach-k3/am6_init.c | 10 ---------- arch/arm/mach-k3/common.c | 10 ++++++++++ arch/arm/mach-k3/common.h | 1 + arch/arm/mach-k3/j721e_init.c | 10 ---------- 4 files changed, 11 insertions(+), 20 deletions(-)
arch/arm/mach-k3/am6_init.c +0 -10
@@ -46,16 +46,6 @@ struct fwl_data main_cbass_fwls[] = {#endif #endif -static void mmr_unlock (u32 base,u32 partition) -{ -/* Translate the base address */ -phys_addr_t part_base = base + partition *CTRL_MMR0_PARTITION_SIZE ; - -/* Unlock the requested partition if locked using two-step sequence */ -writel (CTRLMMR_LOCK_KICK0_UNLOCK_VAL , part_base +CTRLMMR_LOCK_KICK0 ); -writel (CTRLMMR_LOCK_KICK1_UNLOCK_VAL , part_base +CTRLMMR_LOCK_KICK1 ); -} -static void ctrl_mmr_unlock (void ) {/* Unlock all WKUP_CTRL_MMR0 module registers */
arch/arm/mach-k3/common.c +10 -0
@@ -62,6 +62,16 @@ void k3_sysfw_print_ver(void) ti_sci->version.firmware_revision, fw_desc); } +void mmr_unlock (phys_addr_t base,u32 partition) +{ +/* Translate the base address */ +phys_addr_t part_base = base + partition *CTRL_MMR0_PARTITION_SIZE ; + +/* Unlock the requested partition if locked using two-step sequence */ +writel (CTRLMMR_LOCK_KICK0_UNLOCK_VAL , part_base +CTRLMMR_LOCK_KICK0 ); +writel (CTRLMMR_LOCK_KICK1_UNLOCK_VAL , part_base +CTRLMMR_LOCK_KICK1 ); +} +DECLARE_GLOBAL_DATA_PTR ;#ifdef CONFIG_K3_EARLY_CONS
arch/arm/mach-k3/common.h +1 -0
@@ -22,3 +22,4 @@ void start_non_linux_remote_cores(void);int load_firmware (char *name_fw,char *name_loadaddr,u32 *loadaddr);void k3_sysfw_print_ver (void );void spl_enable_dcache (void ); +void mmr_unlock (phys_addr_t base,u32 partition);
arch/arm/mach-k3/j721e_init.c +0 -10
@@ -64,16 +64,6 @@ struct fwl_data cbass_hc_cfg0_fwls[] = {#endif #endif -static void mmr_unlock (u32 base,u32 partition) -{ -/* Translate the base address */ -phys_addr_t part_base = base + partition *CTRL_MMR0_PARTITION_SIZE ; - -/* Unlock the requested partition if locked using two-step sequence */ -writel (CTRLMMR_LOCK_KICK0_UNLOCK_VAL , part_base +CTRLMMR_LOCK_KICK0 ); -writel (CTRLMMR_LOCK_KICK1_UNLOCK_VAL , part_base +CTRLMMR_LOCK_KICK1 ); -} -static void ctrl_mmr_unlock (void ) {/* Unlock all WKUP_CTRL_MMR0 module registers */
Signature · 1 line
2.23.0
PATCH v4 6/19 arm: mach-k3: sysfw-loader: Add support for rom loading sysfw image
In reply to Lokesh VutlaStarting J7200 SoC, ROM supports for loading sysfw directly from boot image. In such cases, SPL need not load sysfw from boot media, but need to receive boot notification message from sysfw. So separate out remoteproc calls for system controller from sysfw loader and just receive the boot notification if sysfw is already loaded.
--- arch/arm/mach-k3/am6_init.c | 2 +- arch/arm/mach-k3/include/mach/sysfw-loader.h | 4 +- arch/arm/mach-k3/j721e_init.c | 2 +- arch/arm/mach-k3/sysfw-loader.c | 56 +++++++++++++------- 4 files changed, 43 insertions(+), 21 deletions(-)
arch/arm/mach-k3/am6_init.c +1 -1
@@ -216,7 +216,7 @@ void board_init_f(ulong dummy)* Load, start up, and configure system controller firmware while * also populating the SYSFW post-PM configuration callback hook. */ -k3_sysfw_loader (k3_mmc_stop_clock, k3_mmc_restart_clock); +k3_sysfw_loader (false, k3_mmc_stop_clock, k3_mmc_restart_clock);/* Prepare console output */ preloader_console_init ();
arch/arm/mach-k3/include/mach/sysfw-loader.h +3 -1
@@ -7,6 +7,8 @@#ifndef _SYSFW_LOADER_H_#define _SYSFW_LOADER_H_ -void k3_sysfw_loader (void (*config_pm_pre_callback)(void ),void (*config_pm_done_callback)(void )); +void k3_sysfw_loader (bool rom_loaded_sysfw, +void (*config_pm_pre_callback)(void ), +void (*config_pm_done_callback)(void ));#endif
arch/arm/mach-k3/j721e_init.c +1 -1
@@ -174,7 +174,7 @@ void board_init_f(ulong dummy)* callback hook, effectively switching on (or over) the console * output. */ -k3_sysfw_loader (k3_mmc_stop_clock, k3_mmc_restart_clock); +k3_sysfw_loader (false, k3_mmc_stop_clock, k3_mmc_restart_clock);/* Prepare console output */ preloader_console_init ();
arch/arm/mach-k3/sysfw-loader.c +38 -18
86 lines not on this page · raw message
Signature · 1 line
2.23.0
PATCH v4 7/19 arm: mach-k3: j721e: Add detection for j721e
In reply to Lokesh VutlaAdd an api soc_is_j721e(), and use it to enable certain functionality that is available only on j721e. This detection is needed when DT is not available.
--- arch/arm/mach-k3/common.c | 10 ++++++++++ arch/arm/mach-k3/common.h | 2 ++ arch/arm/mach-k3/include/mach/hardware.h | 1 + arch/arm/mach-k3/include/mach/sys_proto.h | 2 ++ arch/arm/mach-k3/j721e_init.c | 3 +++ 5 files changed, 18 insertions(+)
arch/arm/mach-k3/common.c +10 -0
@@ -345,6 +345,16 @@ int print_cpuinfo(void) }#endif +bool soc_is_j721e (void ) +{ +u32 soc; + + soc = (readl (CTRLMMR_WKUP_JTAG_ID ) & +JTAG_ID_PARTNO_MASK ) >>JTAG_ID_PARTNO_SHIFT ; + +return soc ==J721E ; +} +#ifdef CONFIG_ARM64 void board_prep_linux (bootm_headers_t *images) {
arch/arm/mach-k3/common.h +2 -0
@@ -8,6 +8,8 @@#include <asm/armv7_mpu.h> +#define J721E 0xbb64 +struct fwl_data {const char *name;u16 fwl_id;
arch/arm/mach-k3/include/mach/hardware.h +1 -0
@@ -15,6 +15,7 @@#endif /* Assuming these addresses and definitions stay common across K3 devices */ +#define CTRLMMR_WKUP_JTAG_ID 0x43000014#define JTAG_ID_VARIANT_SHIFT 28#define JTAG_ID_VARIANT_MASK (0xf << 28)#define JTAG_ID_PARTNO_SHIFT 12
arch/arm/mach-k3/include/mach/sys_proto.h +2 -0
@@ -16,4 +16,6 @@ int do_board_detect(void);void release_resources_for_core_shutdown (void );int fdt_disable_node (void *blob,char *node_path); +bool soc_is_j721e (void ); +#endif
arch/arm/mach-k3/j721e_init.c +3 -0
@@ -361,6 +361,9 @@ void start_non_linux_remote_cores(void)int size =0 , ret;u32 loadaddr =0 ; +if (!soc_is_j721e ()) +return ; + size =load_firmware ("name_mainr5f0_0fw" ,"addr_mainr5f0_0load" , &loadaddr);if (size <=0 )
Signature · 1 line
2.23.0
PATCH v4 8/19 arm: mach-k3: j721e: Fix unlocking control module registers
In reply to Lokesh VutlaIn main control mmr there is no partition 4 and partition 6 is available only on J721e. Fix the same in ctrl_mmr_unlock function
--- arch/arm/mach-k3/j721e_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-k3/j721e_init.c +2 -2
@@ -87,9 +87,9 @@ static void ctrl_mmr_unlock(void)mmr_unlock (CTRL_MMR0_BASE ,1 );mmr_unlock (CTRL_MMR0_BASE ,2 );mmr_unlock (CTRL_MMR0_BASE ,3 ); -mmr_unlock (CTRL_MMR0_BASE ,4 );mmr_unlock (CTRL_MMR0_BASE ,5 ); -mmr_unlock (CTRL_MMR0_BASE ,6 ); +if (soc_is_j721e ()) +mmr_unlock (CTRL_MMR0_BASE ,6 );mmr_unlock (CTRL_MMR0_BASE ,7 ); }
Signature · 1 line
2.23.0
PATCH v4 9/19 arm: mach-k3: j7200: Add support for SOC detection
In reply to Lokesh VutlaThe J7200 SoC is a part of the K3 Multicore SoC architecture platform. It is targeted for automotive gateway, vehicle compute systems, Vehicle-to-Vehicle (V2V) and Vehicle-to-Everything (V2X) applications. The SoC aims to meet the complex processing needs of modern embedded products.
Some highlights of this SoC are:
* Dual Cortex-A72s in a single cluster, two clusters of lockstep capable dual Cortex-R5F MCUs and a Centralized Device Management and Security Controller (DMSC).
* Configurable L3 Cache and IO-coherent architecture with high data throughput capable distributed DMA architecture under NAVSS.
* Integrated Ethernet switch supporting up to a total of 4 external ports in addition to legacy Ethernet switch of up to 2 ports.
* Upto 1 PCIe-GEN3 controller, 1 USB3.0 Dual-role device subsystems, 20 MCANs, 3 McASP, eMMC and SD, OSPI/HyperBus memory controller, I3C and I2C, eCAP/eQEP, eHRPWM among other peripherals.
* One hardware accelerator block containing AES/DES/SHA/MD5 called SA2UL management.
See J7200 Technical Reference Manual (SPRUIU1, June 2020) for further details: https://www.ti.com/lit/pdf/spruiu1
Add support for detection J7200 SoC
--- arch/arm/mach-k3/common.c | 10 ++++++++++ arch/arm/mach-k3/common.h | 1 + arch/arm/mach-k3/include/mach/sys_proto.h | 1 + 3 files changed, 12 insertions(+)
arch/arm/mach-k3/common.c +10 -0
@@ -355,6 +355,16 @@ bool soc_is_j721e(void)return soc ==J721E ; } +bool soc_is_j7200 (void ) +{ +u32 soc; + + soc = (readl (CTRLMMR_WKUP_JTAG_ID ) & +JTAG_ID_PARTNO_MASK ) >>JTAG_ID_PARTNO_SHIFT ; + +return soc ==J7200 ; +} +#ifdef CONFIG_ARM64 void board_prep_linux (bootm_headers_t *images) {
arch/arm/mach-k3/common.h +1 -0
@@ -9,6 +9,7 @@#include <asm/armv7_mpu.h> #define J721E 0xbb64 +#define J7200 0xbb6dstruct fwl_data {const char *name;
arch/arm/mach-k3/include/mach/sys_proto.h +1 -0
@@ -17,5 +17,6 @@ void release_resources_for_core_shutdown(void);int fdt_disable_node (void *blob,char *node_path);bool soc_is_j721e (void ); +bool soc_is_j7200 (void );#endif
Signature · 1 line
2.23.0
PATCH v4 10/19 arm: mach-k3: j7200: Add support for storing extended boot info from ROM
In reply to Lokesh VutlaStarting J7200 SoC, ROM supports for loading sysfw directly from boot image. ROM passes this information on number of images that are loaded to bootloader at certain location. Add support for storing this information before it gets corrupted.
--- arch/arm/mach-k3/include/mach/hardware.h | 7 +++++++ arch/arm/mach-k3/include/mach/j721e_hardware.h | 3 +++ arch/arm/mach-k3/j721e_init.c | 7 +++++-- 3 files changed, 15 insertions(+), 2 deletions(-)
arch/arm/mach-k3/include/mach/hardware.h +7 -0
@@ -21,4 +21,11 @@#define JTAG_ID_PARTNO_SHIFT 12#define JTAG_ID_PARTNO_MASK (0xffff << 12) +#define K3_ROM_BOOT_HEADER_MAGIC "EXTBOOT" + +struct rom_extended_boot_data { +char header[8 ]; +u32 num_components; +}; +#endif /* _ASM_ARCH_HARDWARE_H_ */
arch/arm/mach-k3/include/mach/j721e_hardware.h +3 -0
@@ -51,6 +51,9 @@#define CTRLMMR_LOCK_KICK1 0x0100c#define CTRLMMR_LOCK_KICK1_UNLOCK_VAL 0xd172bc5a +/* ROM HANDOFF Structure location */ +#define ROM_ENTENDED_BOOT_DATA_INFO 0x41cffb00 +/* MCU SCRATCHPAD usage */ #define TI_SRAM_SCRATCH_BOARD_EEPROM_START CONFIG_SYS_K3_MCU_SCRATCHPAD_BASE
arch/arm/mach-k3/j721e_init.c +5 -2
@@ -126,10 +126,13 @@ void k3_mmc_restart_clock(void)* it to the .data section. */ u32 bootindex __attribute__((section(".data"))); +static struct rom_extended_boot_data bootdata __section(.data); -static void store_boot_index_from_rom (void ) +static void store_boot_info_from_rom (void ) { bootindex = *(u32 *)(CONFIG_SYS_K3_BOOT_PARAM_TABLE_INDEX ); +memcpy (&bootdata, (uintptr_t *)ROM_ENTENDED_BOOT_DATA_INFO , +sizeof (struct rom_extended_boot_data )); }void board_init_f (ulong dummy)
@@ -142,7 +145,7 @@ void board_init_f(ulong dummy)* Cannot delay this further as there is a chance that * K3_BOOT_PARAM_TABLE_INDEX can be over written by SPL MALLOC section. */ -store_boot_index_from_rom (); +store_boot_info_from_rom ();/* Make all control module registers accessible */ ctrl_mmr_unlock ();
Signature · 1 line
2.23.0
PATCH v4 11/19 arm: mach-k3: j7200: Detect if ROM has already loaded sysfw
In reply to Lokesh VutlaDetect if sysfw is already loaded by ROM and pass this information to sysfw loader. Based on this information sysfw loader either loads the sysfw image from boot media or just receives the boot notification message form sysfw.
--- arch/arm/mach-k3/common.c | 8 ++++++++ arch/arm/mach-k3/common.h | 2 ++ arch/arm/mach-k3/j721e_init.c | 3 ++- 3 files changed, 12 insertions(+), 1 deletion(-)
arch/arm/mach-k3/common.c +8 -0
@@ -72,6 +72,14 @@ void mmr_unlock(phys_addr_t base, u32 partition)writel (CTRLMMR_LOCK_KICK1_UNLOCK_VAL , part_base +CTRLMMR_LOCK_KICK1 ); } +bool is_rom_loaded_sysfw (struct rom_extended_boot_data *data) +{ +if (strncmp (data->header,K3_ROM_BOOT_HEADER_MAGIC ,7 )) +return false; + +return data->num_components >1 ; +} +DECLARE_GLOBAL_DATA_PTR ;#ifdef CONFIG_K3_EARLY_CONS
arch/arm/mach-k3/common.h +2 -0
@@ -7,6 +7,7 @@*/ #include <asm/armv7_mpu.h> +#include <asm/hardware.h> #define J721E 0xbb64#define J7200 0xbb6d
@@ -26,3 +27,4 @@ int load_firmware(char *name_fw, char *name_loadaddr, u32 *loadaddr);void k3_sysfw_print_ver (void );void spl_enable_dcache (void );void mmr_unlock (phys_addr_t base,u32 partition); +bool is_rom_loaded_sysfw (struct rom_extended_boot_data *data);
arch/arm/mach-k3/j721e_init.c +2 -1
@@ -177,7 +177,8 @@ void board_init_f(ulong dummy)* callback hook, effectively switching on (or over) the console * output. */ -k3_sysfw_loader (false, k3_mmc_stop_clock, k3_mmc_restart_clock); +k3_sysfw_loader (is_rom_loaded_sysfw (&bootdata), + k3_mmc_stop_clock, k3_mmc_restart_clock);/* Prepare console output */ preloader_console_init ();
Signature · 1 line
2.23.0
PATCH v4 12/19 board: ti: j7200: Introduce support for j7200 build targets
In reply to Lokesh Vutlaj7200-evm has minor differences with j721e-evm based on the IPs available in the SoC. Introduce separate build targets for j7200-evm to incorporate the differences.
--- board/ti/j721e/Kconfig | 53 +++++++++++++++++++++++++++++++++++++ board/ti/j721e/evm.c | 3 ++- include/configs/j721e_evm.h | 4 +-- 3 files changed, 57 insertions(+), 3 deletions(-)
board/ti/j721e/Kconfig +53 -0
@@ -27,6 +27,26 @@ config TARGET_J721E_R5_EVM imply SYS_K3_SPL_ATF imply TI_I2C_BOARD_DETECT +config TARGET_J7200_A72_EVM + bool "TI K3 based J7200 EVM running on A72" + select ARM64 + select SOC_K3_J721E + select BOARD_LATE_INIT + imply TI_I2C_BOARD_DETECT + select SYS_DISABLE_DCACHE_OPS + +config TARGET_J7200_R5_EVM + bool "TI K3 based J7200 EVM running on R5" + select CPU_V7R + select SYS_THUMB_BUILD + select SOC_K3_J721E + select K3_LOAD_SYSFW + select RAM + select SPL_RAM + select K3_J721E_DDRSS + imply SYS_K3_SPL_ATF + imply TI_I2C_BOARD_DETECT + endchoice if TARGET_J721E_A72_EVM
@@ -61,3 +81,36 @@ config SPL_LDSCRIPT source "board/ti/common/Kconfig" endif + +if TARGET_J7200_A72_EVM + +config SYS_BOARD + default "j721e" + +config SYS_VENDOR + default "ti" + +config SYS_CONFIG_NAME + default "j721e_evm" + +source "board/ti/common/Kconfig" + +endif + +if TARGET_J7200_R5_EVM + +config SYS_BOARD + default "j721e" + +config SYS_VENDOR + default "ti" + +config SYS_CONFIG_NAME + default "j721e_evm" + +config SPL_LDSCRIPT + default "arch/arm/mach-omap2/u-boot-spl.lds" + +source "board/ti/common/Kconfig" + +endif
board/ti/j721e/evm.c +2 -1
@@ -362,7 +362,8 @@ void spl_board_init(void)int ret;#endif -if (IS_ENABLED (CONFIG_TARGET_J721E_A72_EVM ) && +if ((IS_ENABLED (CONFIG_TARGET_J721E_A72_EVM ) || +IS_ENABLED (CONFIG_TARGET_J7200_A72_EVM )) &&IS_ENABLED (CONFIG_TI_I2C_BOARD_DETECT ))probe_daughtercards ();
include/configs/j721e_evm.h +2 -2
@@ -20,7 +20,7 @@#define CONFIG_SYS_SDRAM_BASE1 0x880000000/* SPL Loader Configuration */ -#ifdef CONFIG_TARGET_J721E_A72_EVM +#if defined(CONFIG_TARGET_J721E_A72_EVM ) || defined(CONFIG_TARGET_J7200_A72_EVM )#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SPL_TEXT_BASE + \ CONFIG_SYS_K3_NON_SECURE_MSRAM_SIZE)/* Image load address in RAM for DFU boot*/
@@ -127,7 +127,7 @@DFU_ALT_INFO_RAM \ DFU_ALT_INFO_OSPI -#ifdef CONFIG_TARGET_J721E_A72_EVM +#if defined(CONFIG_TARGET_J721E_A72_EVM ) || defined(CONFIG_TARGET_J7200_A72_EVM )#define EXTRA_ENV_J721E_BOARD_SETTINGS_MTD \ "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0"
Signature · 1 line
2.23.0
PATCH v4 13/19 board: ti: j7200: Add board detection support for j7200
In reply to Lokesh VutlaAdd board detection support for j7200 common processor board.
--- board/ti/j721e/evm.c | 4 ++++ 1 file changed, 4 insertions(+)
board/ti/j721e/evm.c +4 -0
@@ -28,6 +28,8 @@#define board_is_j721e_som () (board_ti_k3_is("J721EX-PM1-SOM") || \ board_ti_k3_is("J721EX-PM2-SOM")) +#define board_is_j7200_som () board_ti_k3_is("J7200X-PM1-SOM") +/* Max number of MAC addresses that are parsed/processed per daughter card */ #define DAUGHTER_CARD_NO_OF_MAC_ADDR 8
@@ -139,6 +141,8 @@ static void setup_board_eeprom_env(void)if (board_is_j721e_som ()) name ="j721e" ; +else if (board_is_j7200_som ()) + name ="j7200" ;else printf ("Unidentified board claims %s in eeprom header\n" ,board_ti_get_name ());
Signature · 1 line
2.23.0
PATCH v4 14/19 ram: k3-j721e: Relax version checks for memory controller
In reply to Lokesh Vutlak3-j721e ddr driver sanity checks for product id and version number. Version number gets changed for every minor update in the IP. So discard the version check and just sanity check for product id.
--- drivers/ram/k3-j721e/lpddr4.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-)
drivers/ram/k3-j721e/lpddr4.c +1 -15
@@ -199,7 +199,6 @@ uint32_t lpddr4_init(lpddr4_privatedata * pd, const lpddr4_config * cfg) {uint32_t result =0U ;uint16_t productid =0U ; -uint32_t version[2 ] = {0 ,0 }; result =lpddr4_initsf (pd, cfg);if (result == (uint32_t )CDN_EOK ) {
@@ -209,20 +208,7 @@ uint32_t lpddr4_init(lpddr4_privatedata * pd, const lpddr4_config * cfg)CPS_REG_READ (& (ctlregbase-> LPDDR4__CONTROLLER_ID__REG)))); - version[0 ] = - (uint32_t ) (CPS_FLD_READ - (LPDDR4__CONTROLLER_VERSION_0__FLD , -CPS_REG_READ (& - (ctlregbase-> - LPDDR4__CONTROLLER_VERSION_0__REG)))); - version[1 ] = - (uint32_t ) (CPS_FLD_READ - (LPDDR4__CONTROLLER_VERSION_1__FLD , -CPS_REG_READ (& - (ctlregbase-> - LPDDR4__CONTROLLER_VERSION_1__REG)))); -if ((productid ==PRODUCT_ID ) && (version[0 ] ==VERSION_0 ) - && (version[1 ] ==VERSION_1 )) { +if (productid ==PRODUCT_ID ) {/* Populating configuration data to pD */ pd->ctlbase = ctlregbase; pd->infohandler =
Signature · 1 line
2.23.0
PATCH v4 15/19 soc: soc_ti_k3: Add device identification for J7200 SoC
In reply to Lokesh VutlaFrom: Kishon Vijay Abraham I <[email protected]>
Add device identification for J7200 SoC
--- drivers/soc/soc_ti_k3.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/soc/soc_ti_k3.c +4 -0
@@ -12,6 +12,7 @@#define AM65X 0xbb5a#define J721E 0xbb64 +#define J7200 0xbb6d#define REV_SR1_0 0#define REV_SR2_0 1
@@ -40,6 +41,9 @@ static const char *get_family_string(u32 idreg)case J721E : family ="J721E" ;break ; +case J7200 : + family ="J7200" ; +break ;default : family ="Unknown Silicon" ; };
Signature · 1 line
2.23.0
PATCH v4 16/19 arm: dts: k3-j7200: Add dts support
In reply to Lokesh VutlaAdd the basic a72 dts for j7200. Following nodes were supported:
- UART
- MMC SD
- I2C
- TISCI communication
--- arch/arm/dts/Makefile | 3 +- .../k3-j7200-common-proc-board-u-boot.dtsi | 104 ++++++ arch/arm/dts/k3-j7200-common-proc-board.dts | 123 +++++++ arch/arm/dts/k3-j7200-main.dtsi | 313 ++++++++++++++++++ arch/arm/dts/k3-j7200-mcu-wakeup.dtsi | 117 +++++++ arch/arm/dts/k3-j7200-som-p0.dtsi | 29 ++ arch/arm/dts/k3-j7200.dtsi | 175 ++++++++++ 7 files changed, 863 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi create mode 100644 arch/arm/dts/k3-j7200-common-proc-board.dts create mode 100644 arch/arm/dts/k3-j7200-main.dtsi create mode 100644 arch/arm/dts/k3-j7200-mcu-wakeup.dtsi create mode 100644 arch/arm/dts/k3-j7200-som-p0.dtsi create mode 100644 arch/arm/dts/k3-j7200.dtsi
arch/arm/dts/Makefile +2 -1
@@ -955,7 +955,8 @@ dtb-$(CONFIG_STM32MP15x) += \ dtb-$(CONFIG_SOC_K3_AM6) += k3-am654-base-board.dtb k3-am654-r5-base-board.dtb dtb-$(CONFIG_SOC_K3_J721E) += k3-j721e-common-proc-board.dtb \ - k3-j721e-r5-common-proc-board.dtb + k3-j721e-r5-common-proc-board.dtb \ + k3-j7200-common-proc-board.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += \ mt7622-rfb.dtb \
arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi new file +104 -0
104 lines not on this page · raw message
arch/arm/dts/k3-j7200-common-proc-board.dts new file +123 -0
123 lines not on this page · raw message
arch/arm/dts/k3-j7200-main.dtsi new file +313 -0
313 lines not on this page · raw message
arch/arm/dts/k3-j7200-mcu-wakeup.dtsi new file +117 -0
117 lines not on this page · raw message
arch/arm/dts/k3-j7200-som-p0.dtsi new file +29 -0
@@ -0,0 +1,29 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2020 Texas Instruments Incorporated - https://www.ti.com/ + */ + +/dts-v1/; + +#include "k3-j7200.dtsi" + +/ { + memory at 80000000 { + device_type = "memory"; + /* 4G RAM */ + reg = <0x00000000 0x80000000 0x00000000 0x80000000>, + <0x00000008 0x80000000 0x00000000 0x80000000>; + }; + + reserved_memory: reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + secure_ddr: optee at 9e800000 { + reg = <0x00 0x9e800000 0x00 0x01800000>; + alignment = <0x1000>; + no-map; + }; + }; +};
arch/arm/dts/k3-j7200.dtsi new file +175 -0
175 lines not on this page · raw message
Signature · 1 line
2.23.0
PATCH v4 17/19 arm: dts: k3-j7200: Add R5 specific dts support
In reply to Lokesh VutlaFrom: Dave Gerlach <[email protected]>
Add the basic a72 basic dts for j7200. Following nodes were supported:
- UART
- MMC SD
- I2C
- TISCI communication
- LPDDR with 1600MTs configuration.
--- arch/arm/dts/Makefile | 3 +- arch/arm/dts/k3-j7200-ddr-evm-lp4-1600.dtsi | 2195 +++++++++++++++++ .../arm/dts/k3-j7200-r5-common-proc-board.dts | 199 ++ 3 files changed, 2396 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/k3-j7200-ddr-evm-lp4-1600.dtsi create mode 100644 arch/arm/dts/k3-j7200-r5-common-proc-board.dts
arch/arm/dts/Makefile +2 -1
@@ -956,7 +956,8 @@ dtb-$(CONFIG_STM32MP15x) += \ dtb-$(CONFIG_SOC_K3_AM6) += k3-am654-base-board.dtb k3-am654-r5-base-board.dtb dtb-$(CONFIG_SOC_K3_J721E) += k3-j721e-common-proc-board.dtb \ k3-j721e-r5-common-proc-board.dtb \ - k3-j7200-common-proc-board.dtb + k3-j7200-common-proc-board.dtb \ + k3-j7200-r5-common-proc-board.dtb dtb-$(CONFIG_ARCH_MEDIATEK) += \ mt7622-rfb.dtb \
arch/arm/dts/k3-j7200-ddr-evm-lp4-1600.dtsi new file +2195 -0
2,195 lines not on this page · raw message
arch/arm/dts/k3-j7200-r5-common-proc-board.dts new file +199 -0
199 lines not on this page · raw message
Signature · 1 line
2.23.0
PATCH v4 18/19 configs: j7200_evm_r5: Add initial support
In reply to Lokesh VutlaAdd initial R5 defconfig support
--- board/ti/j721e/MAINTAINERS | 1 + configs/j7200_evm_r5_defconfig | 130 +++++++++++++++++++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100644 configs/j7200_evm_r5_defconfig
board/ti/j721e/MAINTAINERS +1 -0
@@ -5,3 +5,4 @@ F: board/ti/j721e F: include/configs/j721e_evm.h F: configs/j721e_evm_r5_defconfig F: configs/j721e_evm_a72_defconfig +F: configs/j7200_evm_r5_defconfig
configs/j7200_evm_r5_defconfig new file +130 -0
130 lines not on this page · raw message
Signature · 1 line
2.23.0
PATCH v4 19/19 configs: j7200_evm_a72: Add Initial support
In reply to Lokesh VutlaAdd initial A72 defconfig support.
--- board/ti/j721e/MAINTAINERS | 1 + configs/j7200_evm_a72_defconfig | 173 ++++++++++++++++++++++++++++++++ 2 files changed, 174 insertions(+) create mode 100644 configs/j7200_evm_a72_defconfig
board/ti/j721e/MAINTAINERS +1 -0
@@ -6,3 +6,4 @@ F: include/configs/j721e_evm.h F: configs/j721e_evm_r5_defconfig F: configs/j721e_evm_a72_defconfig F: configs/j7200_evm_r5_defconfig +F: configs/j7200_evm_a72_defconfig
configs/j7200_evm_a72_defconfig new file +173 -0
173 lines not on this page · raw message
Signature · 1 line
2.23.0
v4 cover arm: mach-k3: Initial support for Texas Instrument's J7200 Platform
In reply to Lokesh VutlaQuoted 7 lines · Lokesh Vutla
This series adds initial support for latest new SoC, J7200, from Texas Instruments.
The J7200 SoC is a part of the K3 Multicore SoC architecture platform. It is targeted for for automotive gateway, vehicle compute systems, Vehicle-to-Vehicle (V2V) and Vehicle-to-Everything (V2X) applications. The SoC aims to meet the complex processing needs of modern embedded products.
Quoted 8 lines
See J7200 Technical Reference Manual (SPRUIU1, June 2020) for further details: https://www.ti.com/lit/pdf/spruiu1
Changes since v3:
- FixedCONFIG_USB_GADGET_PRODUCT_NUMidj7200_evm_a72_defconfig
- EnableCONFIG_ENV_OVERWRITEinj7200_evm_a72_defconfig
- Dropped R5F and DSP REMOTEPROC support inj7200_evm_a72_defconfig
- EnabledTARGET_J7200_A72_EVMwhere ever needed.
Applied to u-boot-ti
Thanks and regards,
Lokesh