Skip to contentSkip to conversation

Add support for J721E SK

PATCH Superseded Sinthu Raja 2 participants 33 messages Nov 2, 2021 – Nov 12, 2021

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Add support for J721E SK

From: Sinthu Raja <[email protected]>

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

Changes in V2:
Board name updated from EAIK to SK.
* So changed the occurrences of EAIK to SK.
* Rename files from eaik to sk.

[1] https://www.ti.com/tool/SK-TDA4VM

Sinthu Raja (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-sk
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-sk: Add initial A72 specific dts support
  arm: dts: k3-j721e-r5-sk: Add initial R5 specific dts support for
    j721e-sk

configs: j721e_evm_r5: Enable support for building multiple dtbs into
FIT
configs: j721e_evm_a72: Add SK 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 +-
 .../arm/dts/k3-j721e-r5-common-proc-board.dts |   5 +
 arch/arm/dts/k3-j721e-r5-sk-u-boot.dtsi       |  31 +
 arch/arm/dts/k3-j721e-r5-sk.dts               | 646 ++++++++++++++
 arch/arm/dts/k3-j721e-sk-u-boot.dtsi          | 280 +++++++
 arch/arm/dts/k3-j721e-sk.dts                  | 791 ++++++++++++++++++
 arch/arm/mach-k3/j721e_init.c                 |  62 ++
 board/ti/j721e/evm.c                          |  46 +-
 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, 1876 insertions(+), 14 deletions(-)
 create mode 100644 arch/arm/dts/k3-j721e-r5-sk-u-boot.dtsi
 create mode 100644 arch/arm/dts/k3-j721e-r5-sk.dts
 create mode 100644 arch/arm/dts/k3-j721e-sk-u-boot.dtsi
 create mode 100644 arch/arm/dts/k3-j721e-sk.dts
Signature · 1 line
2.31.1
#1 lore raw

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

From: Sinthu Raja <[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 e7839027b6..55e455c5b8 100644
@@ -19,7 +19,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
@@ -61,6 +60,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

Re: [PATCH V2 01/17] common: make: Support show_board_info() as part of SPL build

Quoted 5 lines · Sinthu Raja

From: Sinthu Raja <[email protected]>

Enable support for show_board_info() in SPL build.

OK, but why do we need this, and won't it cause every platform that has this defined to now grow in size?

Signature · 1 line
Tom
#3 lore raw

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

In reply to Sinthu Raja

From: Sinthu Raja <[email protected]>

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

---

No changes in V2.

 drivers/power/pmic/tps65941.c | 1 +
 1 file changed, 1 insertion(+)
drivers/power/pmic/tps65941.c +1 -0
index 114ef4d238..83d0f83c64 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 = TPS659411 },
 	{ .compatible = "ti,tps659413", .data = TPS659413 },
 	{ .compatible = "ti,lp876441",  .data =  LP876441 },
 	{ }
Signature · 1 line
2.31.1
#4 lore raw

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

In reply to Sinthu Raja

From: Sinthu Raja <[email protected]>

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

---

No changes in V2.

 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
#5 lore raw

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

In reply to Sinthu Raja

From: Sinthu Raja <[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.

---

No chnages in V2.

 board/ti/j721e/evm.c | 4 ++++
 1 file changed, 4 insertions(+)
board/ti/j721e/evm.c +4 -0
index 077d83420c..9cdb963221 100644
@@ -172,6 +172,7 @@ int checkboard(void)
 	return 0;
 }
 
+#ifdef CONFIG_BOARD_LATE_INIT
 static void setup_board_eeprom_env(void)
 {
 	char *name = "j721e";
@@ -210,6 +211,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
@@ -413,6 +415,7 @@ void configure_serdes_torrent(void)
 		printf("phy_power_on failed !!\n");
 }
 
+#ifdef CONFIG_BOARD_LATE_INIT
 int board_late_init(void)
 {
 	if (IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT)) {
@@ -428,6 +431,7 @@ int board_late_init(void)
 
 	return 0;
 }
+#endif
 
 void spl_board_init(void)
 {
Signature · 1 line
2.31.1
#6 lore raw

Re: [PATCH V2 04/17] board: ti: j721e: Guard functions with right #ifdef to avoid build warnings

Quoted 6 lines · Sinthu Raja

From: Sinthu Raja <[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.

Quoted 7 lines

---

No chnages in V2.

 board/ti/j721e/evm.c | 4 ++++
 1 file changed, 4 insertions(+)

We should probably re-order the code so that everything is under a single #ifdef.

Signature · 1 line
Tom
#7 lore raw

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

In reply to Sinthu Raja

From: Sinthu Raja <[email protected]>

J721E EVM has EEPROM populated at 0x50. J721E SK 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.

---

No changes in V2.

 board/ti/j721e/evm.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
board/ti/j721e/evm.c +9 -3
index 9cdb963221..989e15e666 100644
@@ -152,9 +152,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

Re: [PATCH V2 05/17] board: ti: j721e: Enable support for reading EEPROM at next alternate address

Quoted 6 lines · Sinthu Raja

From: Sinthu Raja <[email protected]>

J721E EVM has EEPROM populated at 0x50. J721E SK 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.

Minor, since I'm asking for other changes, please say "RPi" or "Raspberry Pi" not "RBPi".

Signature · 1 line
Tom
#9 lore raw

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

In reply to Sinthu Raja

From: Sinthu Raja <[email protected]>

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

---

Changes in V2:
* J721E EAIK board name is changed to J721E SK, rename all occurrences of eaik to sk
* Quite amount of SK boards are preprogrammed as EAIK in EEPROM, so retaining the condition to check the board name as eaik.

 board/ti/j721e/evm.c | 5 +++++
 1 file changed, 5 insertions(+)
board/ti/j721e/evm.c +5 -0
index 989e15e666..9d4609cfe9 100644
@@ -30,6 +30,9 @@
 #define board_is_j721e_som()	(board_ti_k3_is("J721EX-PM1-SOM") || \
 				 board_ti_k3_is("J721EX-PM2-SOM"))
 
+#define board_is_j721e_sk()	(board_ti_k3_is("J721EX-EAIK") || \
+				 board_ti_k3_is("J721EX-SK"))
+
 #define board_is_j7200_som()	(board_ti_k3_is("J7200X-PM1-SOM") || \
 				 board_ti_k3_is("J7200X-PM2-SOM"))
 
@@ -188,6 +191,8 @@ static void setup_board_eeprom_env(void)
 
 	if (board_is_j721e_som())
 		name = "j721e";
+	else if (board_is_j721e_sk())
+		name = "j721e-sk";
 	else if (board_is_j7200_som())
 		name = "j7200";
 	else
Signature · 1 line
2.31.1
#10 lore raw

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

In reply to Sinthu Raja

From: Sinthu Raja <[email protected]>

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

---

Changes in V2:
* J721E EAIK board name is changed to J721E SK, rename all occurrences of eaik to sk.

 board/ti/j721e/evm.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
board/ti/j721e/evm.c +6 -3
index 9d4609cfe9..cb491ad950 100644
@@ -434,7 +434,8 @@ int board_late_init(void)
 		setup_serial();
 
 		/* Check for and probe any plugged-in daughtercards */
-		probe_daughtercards();
+		if (!board_is_j721e_sk())
+			probe_daughtercards();
 	}
 
 	if (board_is_j7200_som())
@@ -453,8 +454,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_sk())
+			probe_daughtercards();
+	}
 
 #ifdef CONFIG_ESM_K3
 	if (board_ti_k3_is("J721EX-PM2-SOM")) {
Signature · 1 line
2.31.1
#11 lore raw

Re: [PATCH V2 07/17] board: ti: j721e: Disable probing of daughtercards

Quoted 21 lines · Sinthu Raja

From: Sinthu Raja <[email protected]>

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

---

Changes in V2:
* J721E EAIK board name is changed to J721E SK, rename all occurrences of eaik to sk.

 board/ti/j721e/evm.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
board/ti/j721e/evm.c +0 -0
index 9d4609cfe9..cb491ad950 100644

board/ti/j721e/evm.c int board_late_init(void) · line 438

Quoted 6 lines
board/ti/j721e/evm.c +2 -1
@@ -434,7 +434,8 @@ int board_late_init(void)
 		setup_serial();
 
 		/* Check for and probe any plugged-in daughtercards */
-		probe_daughtercards();
+		if (!board_is_j721e_sk())
+			probe_daughtercards();

This should be a positive check for the board(s) which can even have daughtercards.

Signature · 1 line
Tom
#12 lore raw

Re: [PATCH V2 07/17] board: ti: j721e: Disable probing of daughtercards

Hi Tom,

Quoted 25 lines · Tom Rini
Quoted 23 lines · Sinthu Raja

From: Sinthu Raja <[email protected]>

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

---

Changes in V2:
* J721E EAIK board name is changed to J721E SK, rename all occurrences of eaik to sk.

 board/ti/j721e/evm.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
board/ti/j721e/evm.c +0 -0
index 9d4609cfe9..cb491ad950 100644
@@ -434,7 +434,8 @@ int board_late_init(void)
              setup_serial();
 
Quoted 7 lines

board/ti/j721e/evm.c int board_late_init(void) · line 438

Quoted 4 lines
board/ti/j721e/evm.c +2 -1
              /* Check for and probe any plugged-in daughtercards */
-             probe_daughtercards();
+             if (!board_is_j721e_sk())
+                     probe_daughtercards();

This should be a positive check for the board(s) which can even have daughtercards.

Agreed, will update as positive check.

Regards
Sinthu Raja

Quoted 3 lines

--
Tom

Signature · 2 lines
With Regards
Sinthu Raja
#13 lore raw

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

In reply to Sinthu Raja

From: Sinthu Raja <[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.

---

Changes in V2:
* J721E EAIK board name is changed to J721E SK, rename all occurrences of eaik to sk.

 board/ti/j721e/evm.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
board/ti/j721e/evm.c +14 -2
index cb491ad950..31de53ea71 100644
@@ -88,8 +88,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_sk()) {
+		if (!strcmp(name, "k3-j721e-sk") ||
+		    !strcmp(name, "k3-j721e-r5-sk"))
+			return 0;
+	}
 
 	return -1;
 }
@@ -153,6 +162,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
#14 lore raw

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

In reply to Sinthu Raja

From: Sinthu Raja <[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 SK.

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.

---

No changes in V2.

 arch/arm/mach-k3/j721e_init.c | 62 +++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)
arch/arm/mach-k3/j721e_init.c +62 -0
index 78d80be175..53ea4692f6 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
#15 lore raw

Re: [PATCH V2 09/17] arm: j721e: Add support for selecting DT based on EEPROM

Quoted 10 lines · Sinthu Raja

From: Sinthu Raja <[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 SK.

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.

Quoted 7 lines

---

No changes in V2.

 arch/arm/mach-k3/j721e_init.c | 62 +++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

The EEPROM scheme is not K3-generic, but rather TI reference platform specific, so this needs to be abstracted to exist and be called from under board/ti/j721e/.. thanks.

Signature · 1 line
Tom
#16 lore raw

Re: [PATCH V2 09/17] arm: j721e: Add support for selecting DT based on EEPROM

Hi Tom,

Quoted 16 lines · Tom Rini
Quoted 13 lines · Sinthu Raja

From: Sinthu Raja <[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 SK.

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.

---

Quoted 9 lines
Quoted 4 lines

No changes in V2.

 arch/arm/mach-k3/j721e_init.c | 62 +++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

The EEPROM scheme is not K3-generic, but rather TI reference platform specific, so this needs to be abstracted to exist and be called from under board/ti/j721e/.. thanks.

I guess the commit description is a little misleading. It just calls the board_detect function which is existed under the board/ti/j721e. Printing of board info is not required here which can be removed.

Regards,
Sinthu Raja.

Quoted 2 lines

--
Tom

Signature · 2 lines
With Regards
Sinthu Raja
#17 lore raw

Re: [PATCH V2 09/17] arm: j721e: Add support for selecting DT based on EEPROM

Quoted 24 lines · Sinthu Raja M

Hi Tom,

Quoted 21 lines · Tom Rini
Quoted 17 lines · Sinthu Raja

From: Sinthu Raja <[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 SK.

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.

---

No changes in V2.

 arch/arm/mach-k3/j721e_init.c | 62 +++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)
Quoted 7 lines
Quoted 3 lines

The EEPROM scheme is not K3-generic, but rather TI reference platform specific, so this needs to be abstracted to exist and be called from under board/ti/j721e/.. thanks.

I guess the commit description is a little misleading. It just calls the board_detect function which is existed under the board/ti/j721e. Printing of board info is not required here which can be removed.

Right, but board/ti/j721e/ code is not relevant to non-TI reference platforms. The code under arch/arm/mach-k3/ needs to be SoC centric, and the TI reference platforms and their shared EEPROM stuff needs to be under board/ti/. It also needs to be as clear as possible how to remove it as custom platforms don't usually copy this EEPROM scheme and this adds confusion on their part.

Signature · 1 line
Tom
#18 lore raw

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

In reply to Sinthu Raja

From: Sinthu Raja <[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.

---

No Changes in V2.

 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 4b2362a5dd..88a69bf066 100644
@@ -361,3 +361,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
#19 lore raw

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

Quoted 19 lines · Sinthu Raja

From: Sinthu Raja <[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.

---

No Changes in V2.

 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 +0 -0
index 4b2362a5dd..88a69bf066 100644

arch/arm/dts/k3-j721e-r5-common-proc-board.dts line 368

Quoted 8 lines
arch/arm/dts/k3-j721e-r5-common-proc-board.dts +5 -0
@@ -361,3 +361,8 @@
 &mcu_udmap {
 	ti,sci = <&dm_tifs>;
 };
+
+/* EEPROM might be read before SYSFW is available */
+&wkup_i2c0 {
+	/delete-property/ power-domains;
+};

Has this been queued up for linux-next or similar yet?

Signature · 1 line
Tom
#20 lore raw

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

Hi Tom,

Quoted 16 lines · Tom Rini
Quoted 14 lines · Sinthu Raja

From: Sinthu Raja <[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.

---

No Changes in V2.

 arch/arm/dts/k3-j721e-r5-common-proc-board.dts | 5 +++++
 1 file changed, 5 insertions(+)
Quoted 15 lines

arch/arm/dts/k3-j721e-r5-common-proc-board.dts line 368

Quoted 13 lines
arch/arm/dts/k3-j721e-r5-common-proc-board.dts +5 -0
index 4b2362a5dd..88a69bf066 100644
@@ -361,3 +361,8 @@
 &mcu_udmap {
      ti,sci = <&dm_tifs>;
 };
+
+/* EEPROM might be read before SYSFW is available */
+&wkup_i2c0 {
+     /delete-property/ power-domains;
+};

Has this been queued up for linux-next or similar yet?

Yes, this is queued in linux-next [1].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/arm64/boot/dts/ti/k3-j721e-sk.dts

Quoted 3 lines

--
Tom

Signature · 2 lines
With Regards
Sinthu Raja
#21 lore raw

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

Quoted 34 lines · Sinthu Raja M

Hi Tom,

Quoted 16 lines · Tom Rini
Quoted 14 lines · Sinthu Raja

From: Sinthu Raja <[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.

---

No Changes in V2.

 arch/arm/dts/k3-j721e-r5-common-proc-board.dts | 5 +++++
 1 file changed, 5 insertions(+)
Quoted 15 lines

arch/arm/dts/k3-j721e-r5-common-proc-board.dts line 368

Quoted 13 lines
arch/arm/dts/k3-j721e-r5-common-proc-board.dts +5 -0
index 4b2362a5dd..88a69bf066 100644
@@ -361,3 +361,8 @@
 &mcu_udmap {
      ti,sci = <&dm_tifs>;
 };
+
+/* EEPROM might be read before SYSFW is available */
+&wkup_i2c0 {
+     /delete-property/ power-domains;
+};

Has this been queued up for linux-next or similar yet?

Quoted 3 lines

Yes, this is queued in linux-next [1].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/arm64/boot/dts/ti/k3-j721e-sk.dts

OK, since all of the dts stuff is queued up, that's good and important as it will also be re-synced later directly from kernel.org so anything not there must be in -u-boot.dtsi files and with very good reasoning.

Signature · 1 line
Tom
#22 lore raw

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

In reply to Sinthu Raja

From: Sinthu Raja <[email protected]>

J721E Starter Kit (SK)[1] 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 industrial and automotive applications.

J721E SK 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
* x2 CSI2 Camera interface (RPi and TI Camera connector)
* 40-pin Raspberry Pi GPIO header

Add A72 specific dts for J721E-SK.

[1] https://www.ti.com/tool/SK-TDA4VM

---

Changes in V2:
* J721E EAIK board name is changed to J721E SK, rename all occurrences of eaik to sk.
* Rename file from eaik to sk.

 arch/arm/dts/Makefile                |   3 +-
 arch/arm/dts/k3-j721e-sk-u-boot.dtsi | 280 ++++++++++
 arch/arm/dts/k3-j721e-sk.dts         | 791 +++++++++++++++++++++++++++
 3 files changed, 1073 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/k3-j721e-sk-u-boot.dtsi
 create mode 100644 arch/arm/dts/k3-j721e-sk.dts
arch/arm/dts/Makefile +2 -1
index a88aecc5bd..8918dfc48e 100644
@@ -1113,7 +1113,8 @@ dtb-$(CONFIG_SOC_K3_AM6) += \
 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-sk.dtb
 dtb-$(CONFIG_SOC_K3_AM642) += k3-am642-evm.dtb \
 			      k3-am642-r5-evm.dtb \
 			      k3-am642-sk.dtb \
arch/arm/dts/k3-j721e-sk-u-boot.dtsi new file +280 -0

280 lines not on this page · raw message

arch/arm/dts/k3-j721e-sk.dts new file +791 -0

791 lines not on this page · raw message

Signature · 1 line
2.31.1
#23 lore raw

Re: [PATCH V2 11/17] arm: dts: k3-j721e-sk: Add initial A72 specific dts support

Quoted 33 lines · Sinthu Raja

From: Sinthu Raja <[email protected]>

J721E Starter Kit (SK)[1] 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 industrial and automotive applications.

J721E SK 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
* x2 CSI2 Camera interface (RPi and TI Camera connector)
* 40-pin Raspberry Pi GPIO header

Add A72 specific dts for J721E-SK.

[1] https://www.ti.com/tool/SK-TDA4VM

---

Changes in V2:
* J721E EAIK board name is changed to J721E SK, rename all occurrences of eaik to sk.
* Rename file from eaik to sk.

Quoted 6 lines
 arch/arm/dts/Makefile                |   3 +-
 arch/arm/dts/k3-j721e-sk-u-boot.dtsi | 280 ++++++++++
 arch/arm/dts/k3-j721e-sk.dts         | 791 +++++++++++++++++++++++++++
 3 files changed, 1073 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/k3-j721e-sk-u-boot.dtsi
 create mode 100644 arch/arm/dts/k3-j721e-sk.dts

Has arch/arm/dts/k3-j721e-sk.dts been queued up in linux-next or similar yet?

Signature · 1 line
Tom
#24 lore raw

Re: [PATCH V2 11/17] arm: dts: k3-j721e-sk: Add initial A72 specific dts support

Hi Tom,

Quoted 43 lines · Tom Rini
Quoted 33 lines · Sinthu Raja

From: Sinthu Raja <[email protected]>

J721E Starter Kit (SK)[1] 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 industrial and automotive applications.

J721E SK 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
* x2 CSI2 Camera interface (RPi and TI Camera connector)
* 40-pin Raspberry Pi GPIO header

Add A72 specific dts for J721E-SK.

[1] https://www.ti.com/tool/SK-TDA4VM

---

Changes in V2:
* J721E EAIK board name is changed to J721E SK, rename all occurrences of eaik to sk.
* Rename file from eaik to sk.

Quoted 6 lines
 arch/arm/dts/Makefile                |   3 +-
 arch/arm/dts/k3-j721e-sk-u-boot.dtsi | 280 ++++++++++
 arch/arm/dts/k3-j721e-sk.dts         | 791 +++++++++++++++++++++++++++
 3 files changed, 1073 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/k3-j721e-sk-u-boot.dtsi
 create mode 100644 arch/arm/dts/k3-j721e-sk.dts
Quoted 2 lines

Has arch/arm/dts/k3-j721e-sk.dts been queued up in linux-next or similar yet?

Yes, this is queued in linux-next [1].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/arm64/boot/dts/ti/k3-j721e-sk.dts

Regards,
Sinthu Raja.

Quoted 3 lines

--
Tom

Signature · 2 lines
With Regards
Sinthu Raja
#25 lore raw

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

In reply to Sinthu Raja

From: Sinthu Raja <[email protected]>

Add R5 specific dts for J721E-SK

---

Changes in V2:
* J721E EAIK board name is changed to J721E SK, rename all occurrences of eaik to sk.
* Rename file from eaik to sk.

 arch/arm/dts/Makefile                   |   3 +-
 arch/arm/dts/k3-j721e-r5-sk-u-boot.dtsi |  31 ++
 arch/arm/dts/k3-j721e-r5-sk.dts         | 646 ++++++++++++++++++++++++
 3 files changed, 679 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/k3-j721e-r5-sk-u-boot.dtsi
 create mode 100644 arch/arm/dts/k3-j721e-r5-sk.dts
arch/arm/dts/Makefile +2 -1
index 8918dfc48e..3581c925fc 100644
@@ -1114,7 +1114,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-sk.dtb
+			      k3-j721e-sk.dtb \
+			      k3-j721e-r5-sk.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-sk-u-boot.dtsi new file +31 -0
new file mode 100644
index 0000000000..71d16f193f
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2021 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+#include "k3-j721e-sk-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-sk.dts new file +646 -0

646 lines not on this page · raw message

Signature · 1 line
2.31.1
#26 lore raw

Re: [PATCH V2 12/17] arm: dts: k3-j721e-r5-sk: Add initial R5 specific dts support for j721e-sk

Quoted 12 lines · Sinthu Raja

From: Sinthu Raja <[email protected]>

Add R5 specific dts for J721E-SK

---

Changes in V2:
* J721E EAIK board name is changed to J721E SK, rename all occurrences of eaik to sk.
* Rename file from eaik to sk.

Quoted 6 lines
 arch/arm/dts/Makefile                   |   3 +-
 arch/arm/dts/k3-j721e-r5-sk-u-boot.dtsi |  31 ++
 arch/arm/dts/k3-j721e-r5-sk.dts         | 646 ++++++++++++++++++++++++
 3 files changed, 679 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/k3-j721e-r5-sk-u-boot.dtsi
 create mode 100644 arch/arm/dts/k3-j721e-r5-sk.dts

Has arch/arm/dts/k3-j721e-r5-sk.dts been queued up in linux-next or similar yet?

Signature · 1 line
Tom
#27 lore raw

Re: [PATCH V2 12/17] arm: dts: k3-j721e-r5-sk: Add initial R5 specific dts support for j721e-sk

Hi Tom,

Quoted 21 lines · Tom Rini
Quoted 12 lines · Sinthu Raja

From: Sinthu Raja <[email protected]>

Add R5 specific dts for J721E-SK

---

Changes in V2:
* J721E EAIK board name is changed to J721E SK, rename all occurrences of eaik to sk.
* Rename file from eaik to sk.

Quoted 6 lines
 arch/arm/dts/Makefile                   |   3 +-
 arch/arm/dts/k3-j721e-r5-sk-u-boot.dtsi |  31 ++
 arch/arm/dts/k3-j721e-r5-sk.dts         | 646 ++++++++++++++++++++++++
 3 files changed, 679 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/k3-j721e-r5-sk-u-boot.dtsi
 create mode 100644 arch/arm/dts/k3-j721e-r5-sk.dts
Quoted 2 lines

Has arch/arm/dts/k3-j721e-r5-sk.dts been queued up in linux-next or similar yet?

Yes, this is queued in linux-next [1].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/arm64/boot/dts/ti/k3-j721e-sk.dts

Quoted 3 lines

--
Tom

Signature · 2 lines
With Regards
Sinthu Raja
#28 lore raw

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

In reply to Sinthu Raja

From: Sinthu Raja <[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 J721E EVM and SK boards.

---

Changes in V2:
* J721E EAIK board name is changed to J721E SK, rename all occurrences of eaik to sk.

 configs/j721e_evm_r5_defconfig | 3 +++
 1 file changed, 3 insertions(+)
configs/j721e_evm_r5_defconfig +3 -0
index 1a58135da4..43bddfdb19 100644
@@ -63,6 +63,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-sk"
+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
#29 lore raw

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

In reply to Sinthu Raja

From: Sinthu Raja <[email protected]>

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

---

Changes in V2:
* J721E EAIK board name is changed to J721E SK, rename all occurrences of eaik to sk.

 configs/j721e_evm_a72_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/j721e_evm_a72_defconfig +2 -0
index df1b850f42..81bd5937be 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-sk"
+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
#30 lore raw

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

In reply to Sinthu Raja

From: Sinthu Raja <[email protected]>

S28HS512T on TI SK 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.

---

No changes in V2.

 configs/j721e_evm_a72_defconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configs/j721e_evm_a72_defconfig +2 -2
index 81bd5937be..18a66cb051 100644
@@ -18,7 +18,7 @@ CONFIG_SPL_MMC=y
 CONFIG_SPL_SERIAL=y
 CONFIG_SPL_DRIVERS_MISC=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
#31 lore raw

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

In reply to Sinthu Raja

From: Sinthu Raja <[email protected]>

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

---

No changes in v2.

 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 18a66cb051..1de4d85336 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 43bddfdb19..38ac0b4296 100644
@@ -67,6 +67,7 @@ CONFIG_SPL_MULTI_DTB_FIT=y
 CONFIG_SPL_OF_LIST="k3-j721e-r5-common-proc-board k3-j721e-r5-sk"
 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
#32 lore raw

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

In reply to Sinthu Raja

From: Sinthu Raja <[email protected]>

Now that single defconfig can be used for booting J721E EVM and SK, 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.

---

No Changes in V2.

 include/configs/j721e_evm.h | 4 ++++
 1 file changed, 4 insertions(+)
include/configs/j721e_evm.h +4 -0
index 10555d1a6c..f7e2962efd 100644
@@ -67,6 +67,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 || test $board_name = j721e-sk; then "		\
+			"setenv name_fdt k3-j721e-sk.dtb; fi;"	\
 		"setenv fdtfile ${name_fdt}\0"				\
 	"name_kern=Image\0"						\
 	"console=ttyS2,115200n8\0"					\
Signature · 1 line
2.31.1