Skip to contentSkip to conversation

arm: k3-j721e: Add support for J721E EAIK

PATCH Superseded Sinthu Raja 2 participants 20 messages Jun 26, 2021 – Jun 27, 2021

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover arm: k3-j721e: Add support for J721E EAIK

Hi All,
This series adds support for J721E EAIK. Below is the detailed description of the J721E SoC and the EAIK board supporting features.

J721E EdgeAI Kit (EAIK) is a low cost, small form factor board designed for TI’s J721E SoC. TI’s J721E SoC comprises of dual core A72, high performance vision accelerators, video codec accelerators, latest C71x and C66x DSP, high bandwidth real-time IPs for capture and display, GPU, dedicated safety island and security accelerators. The SoC is power optimized to provide best in class performance for perception, sensor fusion, localization, path planning tasks in robotics, industrial and automotive applications.

See J721E Technical Reference Manual (SPRUIL1B, REVISED DECEMBER 2020) for more details about J721E SoC: http://www.ti.com/lit/pdf/spruil1

J721E EAIK supports the following interfaces:
* 4 GB LPDDR4 RAM
* x1 Gigabit Ethernet interface
* x1 USB 3.0 Type-C port
* x3 USB 3.0 Type-A ports
* x1 PCIe M.2 E Key
* x1 PCIe M.2 M Key
* 512 Mbit OSPI flash
* x4 CAN-FD interface
* x1 DP interface
* x1 HDMI interface
* x2 CSI2 Camera interface (RPi and TI Camera connector)
* 40-pin Raspberry Pi compatible GPIO header

Amarnath MB (17):
common: make: Support show_board_info() as part of SPL build
drivers: power: pmic: Add support for tps659412 PMIC
drivers: power: regulator: tps65941_regulator: Add support for 3Phase
buck
board: ti: j721e: Guard functions with right #ifdef to avoid build
warnings
board: ti: j721e: Enable support for reading EEPROM at next alternate
address
board: ti: j721e: Add support to update board_name for j721e-eaik
board: ti: j721e: Disable probing of daughtercards
board: ti: j721e: Add support for detecting multiple device trees
arm: j721e: Add support for selecting DT based on EEPROM
arm: dts: k3-j721e-r5-common-proc-board: Do not use power-domains for

    I2C
  arm: dts: k3-j721e-eaik: Add initial A72 specific dts support
  arm: dts: k3-j721e-r5-eaik: Add initial R5 specific dts support for
    j721e-eaik

configs: j721e_evm_r5: Enable support for building multiple dtbs into
FIT
configs: j721e_evm_a72: Add EAIK dtb as part of DTB FIT
configs: j721e_evm_a72: Align OSPI partitions on erase block boundary
configs: j721e_evm: Store env in MMC FAT partition
include: configs: Update env for selecting right dtb

 arch/arm/dts/Makefile                         |   4 +-
 arch/arm/dts/k3-j721e-eaik-u-boot.dtsi        | 280 ++++++
 arch/arm/dts/k3-j721e-eaik.dts                | 796 ++++++++++++++++++
 .../arm/dts/k3-j721e-r5-common-proc-board.dts |   5 +
 arch/arm/dts/k3-j721e-r5-eaik-u-boot.dtsi     |  31 +
 arch/arm/dts/k3-j721e-r5-eaik.dts             | 650 ++++++++++++++
 arch/arm/mach-k3/j721e_init.c                 |  62 ++
 board/ti/j721e/evm.c                          |  45 +-
 common/Makefile                               |   3 +-
 configs/j721e_evm_a72_defconfig               |  11 +-
 configs/j721e_evm_r5_defconfig                |   4 +
 drivers/power/pmic/tps65941.c                 |   1 +
 drivers/power/regulator/tps65941_regulator.c  |   2 +
 include/configs/j721e_evm.h                   |   4 +
 14 files changed, 1884 insertions(+), 14 deletions(-)
 create mode 100644 arch/arm/dts/k3-j721e-eaik-u-boot.dtsi
 create mode 100644 arch/arm/dts/k3-j721e-eaik.dts
 create mode 100644 arch/arm/dts/k3-j721e-r5-eaik-u-boot.dtsi
 create mode 100644 arch/arm/dts/k3-j721e-r5-eaik.dts
Signature · 1 line
2.31.1
#1 lore raw

PATCH 1/17 common: make: Support show_board_info() as part of SPL build

From: Amarnath MB <[email protected]>

Enable support for show_board_info() in SPL build.

---
 common/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
common/Makefile +2 -1
index 829ea5fb42..d84886986e 100644
@@ -20,7 +20,6 @@ endif
 # # boards
 obj-y += board_f.o
 obj-y += board_r.o
-obj-$(CONFIG_DISPLAY_BOARDINFO) += board_info.o
 obj-$(CONFIG_DISPLAY_BOARDINFO_LATE) += board_info.o
 
 obj-$(CONFIG_CMD_BOOTM) += bootm.o bootm_os.o
@@ -62,6 +61,8 @@ endif # !CONFIG_SPL_BUILD
 obj-$(CONFIG_$(SPL_TPL_)BOOTSTAGE) += bootstage.o
 obj-$(CONFIG_$(SPL_TPL_)BLOBLIST) += bloblist.o
 
+obj-$(CONFIG_DISPLAY_BOARDINFO) += board_info.o
+
 ifdef CONFIG_SPL_BUILD
 ifdef CONFIG_SPL_DFU
 obj-$(CONFIG_DFU_OVER_USB) += dfu.o
Signature · 1 line
2.31.1
#2 lore raw

PATCH 2/17 drivers: power: pmic: Add support for tps659412 PMIC

In reply to Sinthu Raja

From: Amarnath MB <[email protected]>

Since TPS659412 and TPS659413 are both software compatible, add a compatible string for the same inside tps65941.c.

---
 drivers/power/pmic/tps65941.c | 1 +
 1 file changed, 1 insertion(+)
drivers/power/pmic/tps65941.c +1 -0
index 3dfc1918d5..81b9057c9f 100644
@@ -71,6 +71,7 @@ static struct dm_pmic_ops tps65941_ops = {
 
 static const struct udevice_id tps65941_ids[] = {
 	{ .compatible = "ti,tps659411", .data = TPS659411 },
+	{ .compatible = "ti,tps659412", .data = TPS659412 },
 	{ .compatible = "ti,tps659413", .data = TPS659413 },
 	{ }
 };
Signature · 1 line
2.31.1
Acked-by on v1 2/17
#3 lore raw

Re: [PATCH 02/17] drivers: power: pmic: Add support for tps659412 PMIC

Quoted 7 lines · Sinthu Raja

From: Amarnath MB <[email protected]>

Since TPS659412 and TPS659413 are both software compatible, add a compatible string for the same inside tps65941.c.

Best Regards,
Jaehoon Chung

Quoted 17 lines
---
 drivers/power/pmic/tps65941.c | 1 +
 1 file changed, 1 insertion(+)
drivers/power/pmic/tps65941.c +1 -0
index 3dfc1918d5..81b9057c9f 100644
@@ -71,6 +71,7 @@ static struct dm_pmic_ops tps65941_ops = {
 
 static const struct udevice_id tps65941_ids[] = {
 	{ .compatible = "ti,tps659411", .data = TPS659411 },
+	{ .compatible = "ti,tps659412", .data = TPS659412 },
 	{ .compatible = "ti,tps659413", .data = TPS659413 },
 	{ }
 };
#4 lore raw

PATCH 3/17 drivers: power: regulator: tps65941_regulator: Add support for 3Phase buck

In reply to Sinthu Raja

From: Amarnath MB <[email protected]>

Buck regulator 1, 2 and 3 of TPS6594132 on j721e-eaik is in 3 Phase confguration, in-order to support this, add configuring 3 Phase buck in tps65941 while driver probing.

---
 drivers/power/regulator/tps65941_regulator.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/power/regulator/tps65941_regulator.c +2 -0
index d73f832483..89918c38fa 100644
@@ -299,6 +299,8 @@ static int tps65941_buck_probe(struct udevice *dev)
 		idx = 1;
 	} else if (idx == 34) {
 		idx = 3;
+	} else if (idx == 123) {
+		idx = 1;
 	} else if (idx == 1234) {
 		idx = 1;
 	} else {
Signature · 1 line
2.31.1
Acked-by on v1 3/17
#5 lore raw

Re: [PATCH 03/17] drivers: power: regulator: tps65941_regulator: Add support for 3Phase buck

Quoted 8 lines · Sinthu Raja

From: Amarnath MB <[email protected]>

Buck regulator 1, 2 and 3 of TPS6594132 on j721e-eaik is in 3 Phase confguration, in-order to support this, add configuring 3 Phase buck in tps65941 while driver probing.

Best Regards,
Jaehoon Chung

Quoted 18 lines
---
 drivers/power/regulator/tps65941_regulator.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/power/regulator/tps65941_regulator.c +2 -0
index d73f832483..89918c38fa 100644
@@ -299,6 +299,8 @@ static int tps65941_buck_probe(struct udevice *dev)
 		idx = 1;
 	} else if (idx == 34) {
 		idx = 3;
+	} else if (idx == 123) {
+		idx = 1;
 	} else if (idx == 1234) {
 		idx = 1;
 	} else {
#6 lore raw

PATCH 4/17 board: ti: j721e: Guard functions with right #ifdef to avoid build warnings

In reply to Sinthu Raja

From: Amarnath MB <[email protected]>

board_late_init(), setup_board_eeprom_env() and setup_serial() is called only under CONFIG_BOARD_LATE_INIT, so guard these functions with the same.

---
 board/ti/j721e/evm.c | 4 ++++
 1 file changed, 4 insertions(+)
board/ti/j721e/evm.c +4 -0
index b9a9f19552..23e739bcd3 100644
@@ -170,6 +170,7 @@ int checkboard(void)
 	return 0;
 }
 
+#ifdef CONFIG_BOARD_LATE_INIT
 static void setup_board_eeprom_env(void)
 {
 	char *name = "j721e";
@@ -208,6 +209,7 @@ static void setup_serial(void)
 	snprintf(serial_string, sizeof(serial_string), "%016lx", board_serial);
 	env_set("serial#", serial_string);
 }
+#endif
 
 /*
  * Declaration of daughtercards to probe. Note that when adding more
@@ -384,6 +386,7 @@ static int probe_daughtercards(void)
 }
 #endif
 
+#ifdef CONFIG_BOARD_LATE_INIT
 int board_late_init(void)
 {
 	if (IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT)) {
@@ -396,6 +399,7 @@ int board_late_init(void)
 
 	return 0;
 }
+#endif
 
 void spl_board_init(void)
 {
Signature · 1 line
2.31.1
#7 lore raw

PATCH 5/17 board: ti: j721e: Enable support for reading EEPROM at next alternate address

In reply to Sinthu Raja

From: Amarnath MB <[email protected]>

J721E EVM has EEPROM populated at 0x50. J721E EAIK has EEPROM populated at next address 0x51 in order to be compatible with RBPi. So start looking for TI specific EEPROM at 0x50, if not found look for EEPROM at 0x51.

---
 board/ti/j721e/evm.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
board/ti/j721e/evm.c +9 -3
index 23e739bcd3..b618325627 100644
@@ -150,9 +150,15 @@ int do_board_detect(void)
 
 	ret = ti_i2c_eeprom_am6_get_base(CONFIG_EEPROM_BUS_ADDRESS,
 					 CONFIG_EEPROM_CHIP_ADDRESS);
-	if (ret)
-		pr_err("Reading on-board EEPROM at 0x%02x failed %d\n",
-		       CONFIG_EEPROM_CHIP_ADDRESS, ret);
+	if (ret) {
+		printf("EEPROM not available at 0x%02x, trying to read at 0x%02x\n",
+		       CONFIG_EEPROM_CHIP_ADDRESS, CONFIG_EEPROM_CHIP_ADDRESS + 1);
+		ret = ti_i2c_eeprom_am6_get_base(CONFIG_EEPROM_BUS_ADDRESS,
+						 CONFIG_EEPROM_CHIP_ADDRESS + 1);
+		if (ret)
+			pr_err("Reading on-board EEPROM at 0x%02x failed %d\n",
+			       CONFIG_EEPROM_CHIP_ADDRESS + 1, ret);
+	}
 
 	return ret;
 }
Signature · 1 line
2.31.1
#8 lore raw

PATCH 6/17 board: ti: j721e: Add support to update board_name for j721e-eaik

In reply to Sinthu Raja

From: Amarnath MB <[email protected]>

Update setup_board_eeprom_env() to choose the right board name for j721e-eaik.

---
 board/ti/j721e/evm.c | 4 ++++
 1 file changed, 4 insertions(+)
board/ti/j721e/evm.c +4 -0
index b618325627..a847b2c607 100644
@@ -29,6 +29,8 @@
 #define board_is_j721e_som()	(board_ti_k3_is("J721EX-PM1-SOM") || \
 				 board_ti_k3_is("J721EX-PM2-SOM"))
 
+#define board_is_j721e_eaik()	 board_ti_k3_is("J721EX-EAIK")
+
 #define board_is_j7200_som()	board_ti_k3_is("J7200X-PM1-SOM")
 
 /* Max number of MAC addresses that are parsed/processed per daughter card */
@@ -186,6 +188,8 @@ static void setup_board_eeprom_env(void)
 
 	if (board_is_j721e_som())
 		name = "j721e";
+	else if (board_is_j721e_eaik())
+		name = "j721e-eaik";
 	else if (board_is_j7200_som())
 		name = "j7200";
 	else
Signature · 1 line
2.31.1
#9 lore raw

PATCH 7/17 board: ti: j721e: Disable probing of daughtercards

In reply to Sinthu Raja

From: Amarnath MB <[email protected]>

j721e-eaik doesn't have any daughter cards, so disable daughter card probing inside board_late_init() and spl_board_init() for j721e-eaik.

---
 board/ti/j721e/evm.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
board/ti/j721e/evm.c +6 -3
index a847b2c607..0de22da5b7 100644
@@ -404,7 +404,8 @@ int board_late_init(void)
 		setup_serial();
 
 		/* Check for and probe any plugged-in daughtercards */
-		probe_daughtercards();
+		if (!board_is_j721e_eaik())
+			probe_daughtercards();
 	}
 
 	return 0;
@@ -420,8 +421,10 @@ void spl_board_init(void)
 
 	if ((IS_ENABLED(CONFIG_TARGET_J721E_A72_EVM) ||
 	     IS_ENABLED(CONFIG_TARGET_J7200_A72_EVM)) &&
-	    IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT))
-		probe_daughtercards();
+	    IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT)) {
+		if (!board_is_j721e_eaik())
+			probe_daughtercards();
+	}
 
 #ifdef CONFIG_ESM_K3
 	if (board_ti_k3_is("J721EX-PM2-SOM")) {
Signature · 1 line
2.31.1
#10 lore raw

PATCH 8/17 board: ti: j721e: Add support for detecting multiple device trees

In reply to Sinthu Raja

From: Amarnath MB <[email protected]>

Update the board_fit_config_name_match() to choose the right dtb based on the board name read from EEPROM.

Also restrict multpile EEPROM reads by verifying if EEPROM is already read.

---
 board/ti/j721e/evm.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
board/ti/j721e/evm.c +14 -2
index 0de22da5b7..39db148321 100644
@@ -85,8 +85,17 @@ int dram_init_banksize(void)
 #ifdef CONFIG_SPL_LOAD_FIT
 int board_fit_config_name_match(const char *name)
 {
-	if (!strcmp(name, "k3-j721e-common-proc-board"))
-		return 0;
+	bool eeprom_read = board_ti_was_eeprom_read();
+
+	if (!eeprom_read || board_is_j721e_som()) {
+		if (!strcmp(name, "k3-j721e-common-proc-board") ||
+		    !strcmp(name, "k3-j721e-r5-common-proc-board"))
+			return 0;
+	} else if (board_is_j721e_eaik()) {
+		if (!strcmp(name, "k3-j721e-eaik") ||
+		    !strcmp(name, "k3-j721e-r5-eaik"))
+			return 0;
+	}
 
 	return -1;
 }
@@ -150,6 +159,9 @@ int do_board_detect(void)
 {
 	int ret;
 
+	if (board_ti_was_eeprom_read())
+		return 0;
+
 	ret = ti_i2c_eeprom_am6_get_base(CONFIG_EEPROM_BUS_ADDRESS,
 					 CONFIG_EEPROM_CHIP_ADDRESS);
 	if (ret) {
Signature · 1 line
2.31.1
#11 lore raw

PATCH 9/17 arm: j721e: Add support for selecting DT based on EEPROM

In reply to Sinthu Raja

From: Amarnath MB <[email protected]>

Enable support for selecting DTB from FIT within SPL based on the board name read from EEPROM. This will help to use single defconfig for both EVM and EAIK.

Also print FDT model name and board name read from EEPROM on SPL debug console. This is useful to verify that right dtb is loaded in each boot stage.

---
 arch/arm/mach-k3/j721e_init.c | 62 +++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)
arch/arm/mach-k3/j721e_init.c +62 -0
index e9e076c9e7..5e85189e06 100644
@@ -21,6 +21,7 @@
 #include <dm/pinctrl.h>
 #include <mmc.h>
 #include <remoteproc.h>
+#include <dm/root.h>
 
 #ifdef CONFIG_SPL_BUILD
 #ifdef CONFIG_K3_LOAD_SYSFW
@@ -135,6 +136,59 @@ static void store_boot_info_from_rom(void)
 	       sizeof(struct rom_extended_boot_data));
 }
 
+#ifdef CONFIG_SPL_OF_LIST
+void do_dt_magic(void)
+{
+	int ret, rescan, mmc_dev = -1;
+	static struct mmc *mmc;
+
+	if (IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT))
+		do_board_detect();
+
+	/*
+	 * Board detection has been done.
+	 * Let us see if another dtb wouldn't be a better match
+	 * for our board
+	 */
+	if (IS_ENABLED(CONFIG_CPU_V7R)) {
+		ret = fdtdec_resetup(&rescan);
+		if (!ret && rescan) {
+			dm_uninit();
+			dm_init_and_scan(true);
+		}
+	}
+
+	/*
+	 * Because of multi DTB configuration, the MMC device has
+	 * to be re-initialized after reconfiguring FDT inorder to
+	 * boot from MMC. Do this when boot mode is MMC and ROM has
+	 * not loaded SYSFW.
+	 */
+	switch (spl_boot_device()) {
+	case BOOT_DEVICE_MMC1:
+		mmc_dev = 0;
+		break;
+	case BOOT_DEVICE_MMC2:
+	case BOOT_DEVICE_MMC2_2:
+		mmc_dev = 1;
+		break;
+	}
+
+	if (mmc_dev > 0 && !is_rom_loaded_sysfw(&bootdata)) {
+		ret = mmc_init_device(mmc_dev);
+		if (!ret) {
+			mmc = find_mmc_device(mmc_dev);
+			if (mmc) {
+				ret = mmc_init(mmc);
+				if (ret) {
+					printf("mmc init failed with error: %d\n", ret);
+				}
+			}
+		}
+	}
+}
+#endif
+
 void board_init_f(ulong dummy)
 {
 #if defined(CONFIG_K3_J721E_DDRSS) || defined(CONFIG_K3_LOAD_SYSFW)
@@ -180,6 +234,10 @@ void board_init_f(ulong dummy)
 	k3_sysfw_loader(is_rom_loaded_sysfw(&bootdata),
 			k3_mmc_stop_clock, k3_mmc_restart_clock);
 
+#ifdef CONFIG_SPL_OF_LIST
+	do_dt_magic();
+#endif
+
 	/*
 	 * Force probe of clk_k3 driver here to ensure basic default clock
 	 * configuration is always done.
@@ -210,6 +268,10 @@ void board_init_f(ulong dummy)
 	preloader_console_init();
 #endif
 
+#if defined(CONFIG_DISPLAY_BOARDINFO)
+	show_board_info();
+#endif
+
 	/* Output System Firmware version info */
 	k3_sysfw_print_ver();
 
Signature · 1 line
2.31.1
#12 lore raw

PATCH 10/17 arm: dts: k3-j721e-r5-common-proc-board: Do not use power-domains for I2C

In reply to Sinthu Raja

From: Amarnath MB <[email protected]>

Board ID I2C EEPROM will be probed before SYSFW is available. So drop the power-domains property for wakup_i2c0 on which board ID EEPROM is connected.

---
 arch/arm/dts/k3-j721e-r5-common-proc-board.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/dts/k3-j721e-r5-common-proc-board.dts +5 -0
index 0542b2f8b8..e878f8f879 100644
@@ -363,3 +363,8 @@
 &mcu_udmap {
 	ti,sci = <&dm_tifs>;
 };
+
+/* EEPROM might be read before SYSFW is available */
+&wkup_i2c0 {
+	/delete-property/ power-domains;
+};
Signature · 1 line
2.31.1
#13 lore raw

PATCH 11/17 arm: dts: k3-j721e-eaik: Add initial A72 specific dts support

In reply to Sinthu Raja

From: Amarnath MB <[email protected]>

J721E EdgeAI Kit (EAIK) is a low cost, small form factor board designed for TI’s J721E SoC. TI’s J721E SoC comprises of dual core A72, high performance vision accelerators, video codec accelerators, latest C71x and C66x DSP, high bandwidth real-time IPs for capture and display, GPU, dedicated safety island and security accelerators. The SoC is power optimized to provide best in class performance for perception, sensor fusion, localization, path planning tasks in robotics, industrial and automotive applications.

See J721E Technical Reference Manual (SPRUIL1B, REVISED DECEMBER 2020) for more details about J721E SoC: http://www.ti.com/lit/pdf/spruil1

J721E EAIK supports the following interfaces:
* 4 GB LPDDR4 RAM
* x1 Gigabit Ethernet interface
* x1 USB 3.0 Type-C port
* x3 USB 3.0 Type-A ports
* x1 UHS-1 capable µSD card slot
* x1 PCIe M.2 E Key with x1 USB2.0, x1 MCASP, x1 MMC, x1 UART
* x1 PCIe M.2 M Key
* 512 Mbit OSPI flash
* x4 UART through UART-USB bridge
* x4 CAN-FD interface
* x1 DP interface
* x1 HDMI interface
* x2 CSI2 Camera interface (RPi and TI Camera connector)
* 40-pin Raspberry Pi compatible GPIO header
* Compact TI 20-Pin connector for JTAG debug
* Interface for remote automation. Includes:
* power measurement and reset control
* boot mode change

Add A72 specific dts for J721E-EAIK.

---
 arch/arm/dts/Makefile                  |   3 +-
 arch/arm/dts/k3-j721e-eaik-u-boot.dtsi | 280 +++++++++
 arch/arm/dts/k3-j721e-eaik.dts         | 796 +++++++++++++++++++++++++
 3 files changed, 1078 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/k3-j721e-eaik-u-boot.dtsi
 create mode 100644 arch/arm/dts/k3-j721e-eaik.dts
arch/arm/dts/Makefile +2 -1
index 9918e46633..802dffb17a 100644
@@ -1072,7 +1072,8 @@ 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-r5-common-proc-board.dtb
+			      k3-j7200-r5-common-proc-board.dtb \
+			      k3-j721e-eaik.dtb
 dtb-$(CONFIG_SOC_K3_AM642) += k3-am642-evm.dtb \
 			      k3-am642-r5-evm.dtb \
 			      k3-am642-sk.dtb \
arch/arm/dts/k3-j721e-eaik-u-boot.dtsi new file +280 -0

280 lines not on this page · raw message

arch/arm/dts/k3-j721e-eaik.dts new file +796 -0

796 lines not on this page · raw message

Signature · 1 line
2.31.1
#14 lore raw

PATCH 12/17 arm: dts: k3-j721e-r5-eaik: Add initial R5 specific dts support for j721e-eaik

In reply to Sinthu Raja

From: Amarnath MB <[email protected]>

Add R5 specific dts for J721E-EAIK

---
 arch/arm/dts/Makefile                     |   3 +-
 arch/arm/dts/k3-j721e-r5-eaik-u-boot.dtsi |  31 ++
 arch/arm/dts/k3-j721e-r5-eaik.dts         | 650 ++++++++++++++++++++++
 3 files changed, 683 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/k3-j721e-r5-eaik-u-boot.dtsi
 create mode 100644 arch/arm/dts/k3-j721e-r5-eaik.dts
arch/arm/dts/Makefile +2 -1
index 802dffb17a..e5c7f543f6 100644
@@ -1073,7 +1073,8 @@ 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-r5-common-proc-board.dtb \
-			      k3-j721e-eaik.dtb
+			      k3-j721e-eaik.dtb \
+			      k3-j721e-r5-eaik.dtb
 dtb-$(CONFIG_SOC_K3_AM642) += k3-am642-evm.dtb \
 			      k3-am642-r5-evm.dtb \
 			      k3-am642-sk.dtb \
arch/arm/dts/k3-j721e-r5-eaik-u-boot.dtsi new file +31 -0
new file mode 100644
index 0000000000..0735c25f3c
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2021 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+#include "k3-j721e-eaik-u-boot.dtsi"
+
+/ {
+	chosen {
+		firmware-loader = &fs_loader0;
+	};
+
+	aliases {
+		remoteproc0 = &sysctrler;
+		remoteproc1 = &a72_0;
+		remoteproc2 = &main_r5fss0_core0;
+		remoteproc3 = &main_r5fss0_core1;
+	};
+
+	fs_loader0: fs_loader@0 {
+		u-boot,dm-pre-reloc;
+		compatible = "u-boot,fs-loader";
+	};
+};
+
+&tps659412 {
+	esm: esm {
+		compatible = "ti,tps659413-esm";
+		u-boot,dm-spl;
+	};
+};
arch/arm/dts/k3-j721e-r5-eaik.dts new file +650 -0

650 lines not on this page · raw message

Signature · 1 line
2.31.1
#15 lore raw

PATCH 13/17 configs: j721e_evm_r5: Enable support for building multiple dtbs into FIT

In reply to Sinthu Raja

From: Amarnath MB <[email protected]>

Enable configs for building multiple dtbs into a single fit image and load the right dtb for next stage. This will help to use same defconfig for both EVM and EAIK.

---
 configs/j721e_evm_r5_defconfig | 3 +++
 1 file changed, 3 insertions(+)
configs/j721e_evm_r5_defconfig +3 -0
index 8a9b20141b..40a4a70769 100644
@@ -62,6 +62,9 @@ CONFIG_CMD_TIME=y
 CONFIG_CMD_FAT=y
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
+CONFIG_SPL_MULTI_DTB_FIT=y
+CONFIG_SPL_OF_LIST="k3-j721e-r5-common-proc-board k3-j721e-r5-eaik"
+CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
Signature · 1 line
2.31.1
#16 lore raw

PATCH 14/17 configs: j721e_evm_a72: Add EAIK dtb as part of DTB FIT

In reply to Sinthu Raja

From: Amarnath MB <[email protected]>

Add k3-j721e-eaik dtb along with other dtbs inside DTB FIT image.

---
 configs/j721e_evm_a72_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/j721e_evm_a72_defconfig +2 -0
index f2a293480f..1aca1fa449 100644
@@ -75,6 +75,8 @@ CONFIG_CMD_UBI=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_LIST="k3-j721e-common-proc-board k3-j721e-eaik"
+CONFIG_MULTI_DTB_FIT=y
 CONFIG_SPL_MULTI_DTB_FIT=y
 CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
 CONFIG_ENV_OVERWRITE=y
Signature · 1 line
2.31.1
#17 lore raw

PATCH 15/17 configs: j721e_evm_a72: Align OSPI partitions on erase block boundary

In reply to Sinthu Raja

From: Amarnath MB <[email protected]>

S28HS512T on TI EAIK has sector size of 256KB, so update OSPI partition to align on 256KB sector size. Since the sector size for MT35XU512ABA on EVM is 128KB, partitions will remain aligned for EVM.

Also, now since the sector size is 256KB ospi.env.backup will collide with ospi.sysfw, so move ospi.env.backup to the padding space (0x7C0000) before ospi.rootfs partition.

---
 configs/j721e_evm_a72_defconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configs/j721e_evm_a72_defconfig +2 -2
index 1aca1fa449..f56abc451f 100644
@@ -17,7 +17,7 @@ CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
-CONFIG_ENV_OFFSET_REDUND=0x6A0000
+CONFIG_ENV_OFFSET_REDUND=0x7C0000
 CONFIG_SPL_FS_FAT=y
 CONFIG_SPL_LIBDISK_SUPPORT=y
 CONFIG_SPL_SPI_FLASH_SUPPORT=y
@@ -69,7 +69,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y
 CONFIG_CMD_TIME=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_MTDIDS_DEFAULT="nor0=47040000.spi.0,nor0=47034000.hyperbus"
-CONFIG_MTDPARTS_DEFAULT="mtdparts=47040000.spi.0:512k(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),128k(ospi.env),128k(ospi.env.backup),1m(ospi.sysfw),-@8m(ospi.rootfs);47034000.hyperbus:512k(hbmc.tiboot3),2m(hbmc.tispl),4m(hbmc.u-boot),256k(hbmc.env),1m(hbmc.sysfw),-@8m(hbmc.rootfs)"
+CONFIG_MTDPARTS_DEFAULT="mtdparts=47040000.spi.0:512k(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),256k(ospi.env),1m(ospi.sysfw),256k(ospi.env.backup),57344k@8m(ospi.rootfs),256k(ospi.phypattern);47034000.hyperbus:512k(hbmc.tiboot3),2m(hbmc.tispl),4m(hbmc.u-boot),256k(hbmc.env),1m(hbmc.sysfw),-@8m(hbmc.rootfs)"
 CONFIG_CMD_UBI=y
 # CONFIG_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
Signature · 1 line
2.31.1
#18 lore raw

PATCH 16/17 configs: j721e_evm: Store env in MMC FAT partition

In reply to Sinthu Raja

From: Amarnath MB <[email protected]>

Enable defconfigs relevant for storing env on FAT partion of MMC.

---
 configs/j721e_evm_a72_defconfig | 5 +++--
 configs/j721e_evm_r5_defconfig  | 1 +
 2 files changed, 4 insertions(+), 2 deletions(-)
configs/j721e_evm_a72_defconfig +3 -2
index f56abc451f..5c8559b626 100644
@@ -80,10 +80,11 @@ CONFIG_MULTI_DTB_FIT=y
 CONFIG_SPL_MULTI_DTB_FIT=y
 CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
 CONFIG_ENV_OVERWRITE=y
-CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SYS_MMC_ENV_PART=1
+CONFIG_ENV_IS_NOWHERE=y
+CONFIG_ENV_IS_IN_FAT=y
+CONFIG_ENV_FAT_DEVICE_AND_PART="1:1"
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM=y
 CONFIG_SPL_DM=y
configs/j721e_evm_r5_defconfig +1 -0
index 40a4a70769..8473c57dc5 100644
@@ -66,6 +66,7 @@ CONFIG_SPL_MULTI_DTB_FIT=y
 CONFIG_SPL_OF_LIST="k3-j721e-r5-common-proc-board k3-j721e-r5-eaik"
 CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
 CONFIG_ENV_OVERWRITE=y
+CONFIG_ENV_IS_NOWHERE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
 CONFIG_SPL_DM=y
Signature · 1 line
2.31.1
#19 lore raw

PATCH 17/17 include: configs: Update env for selecting right dtb

In reply to Sinthu Raja

From: Amarnath MB <[email protected]>

Now that single defconfig can be used for booting J721E EVM and EAIK, default device tree will not work for selecting dtb for kernel. Update the findfdt env to select right dtb based on board_name env variable.

---
 include/configs/j721e_evm.h | 4 ++++
 1 file changed, 4 insertions(+)
include/configs/j721e_evm.h +4 -0
index b707fc4e89..4de59dfe32 100644
@@ -68,6 +68,10 @@
 	"default_device_tree=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0"	\
 	"findfdt="							\
 		"setenv name_fdt ${default_device_tree};"		\
+		"if test $board_name = j721e; then "			\
+			"setenv name_fdt k3-j721e-common-proc-board.dtb; fi;" \
+		"if test $board_name = j721e-eaik; then "		\
+			"setenv name_fdt k3-j721e-eaik.dtb; fi;"	\
 		"setenv fdtfile ${name_fdt}\0"				\
 	"name_kern=Image\0"						\
 	"console=ttyS2,115200n8\0"					\
Signature · 1 line
2.31.1