Skip to contentSkip to conversation

Add support for J721E SK

PATCH In review Sinthu Raja 2 participants 33 messages Feb 9, 2022 – Feb 17, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v3 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.
The arch/arm/dts/k3-j721e-r5-sk.dts been queued up in linux-next [2].

Changes in V3:
Addressed review comments such as
* Removed board_info in the SPL build.
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
* Removed K3-generic function call from mach-k3/j721e_init.c
* Updated the conditional check to be a positive check for the board(s) which may have daugther cards
* Re-order the code in board/ti/j721e/evm.c so that everything is under a single #ifdef

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
[2] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/arm64/boot/dts/ti/k3-j721e-sk.dts

V2: https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/
V1: https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/

Sinthu Raja (16):
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 board name
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                 |  58 ++
 board/ti/j721e/evm.c                          | 122 +--
 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 +
 13 files changed, 1907 insertions(+), 52 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.35.0
#1 lore raw

PATCH v3 1/16 drivers: power: pmic: Add support for tps659412 PMIC

From: Sinthu Raja <[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 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.35.0
#3 lore raw

PATCH v3 2/16 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.

---
 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.35.0
#4 lore raw

Re: [PATCH V3 02/16] drivers: power: regulator: tps65941_regulator: Add support for 3Phase buck

Quoted 8 lines · 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.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#5 lore raw

PATCH v3 3/16 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. Also, reorder these functions to place it under single #ifdef

---

Changes in V3:
* re-order the code so that everything is under a single #ifdef.

V2: https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

 board/ti/j721e/evm.c | 80 +++++++++++++++++++++++---------------------
 1 file changed, 41 insertions(+), 39 deletions(-)
board/ti/j721e/evm.c +41 -39
index 077d83420c..e924321557 100644
@@ -172,45 +172,6 @@ int checkboard(void)
 	return 0;
 }
 
-static void setup_board_eeprom_env(void)
-{
-	char *name = "j721e";
-
-	if (do_board_detect())
-		goto invalid_eeprom;
-
-	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());
-
-invalid_eeprom:
-	set_board_info_env_am6(name);
-}
-
-static void setup_serial(void)
-{
-	struct ti_am6_eeprom *ep = TI_AM6_EEPROM_DATA;
-	unsigned long board_serial;
-	char *endp;
-	char serial_string[17] = { 0 };
-
-	if (env_get("serial#"))
-		return;
-
-	board_serial = hextoul(ep->serial, &endp);
-	if (*endp != '\0') {
-		pr_err("Error: Can't set serial# to %s\n", ep->serial);
-		return;
-	}
-
-	snprintf(serial_string, sizeof(serial_string), "%016lx", board_serial);
-	env_set("serial#", serial_string);
-}
-
 /*
  * Declaration of daughtercards to probe. Note that when adding more
  * cards they should be grouped by the 'i2c_addr' field to allow for a
@@ -413,6 +374,46 @@ void configure_serdes_torrent(void)
 		printf("phy_power_on failed !!\n");
 }
 
+#ifdef CONFIG_BOARD_LATE_INIT
+static void setup_board_eeprom_env(void)
+{
+	char *name = "j721e";
+
+	if (do_board_detect())
+		goto invalid_eeprom;
+
+	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());
+
+invalid_eeprom:
+	set_board_info_env_am6(name);
+}
+
+static void setup_serial(void)
+{
+	struct ti_am6_eeprom *ep = TI_AM6_EEPROM_DATA;
+	unsigned long board_serial;
+	char *endp;
+	char serial_string[17] = { 0 };
+
+	if (env_get("serial#"))
+		return;
+
+	board_serial = hextoul(ep->serial, &endp);
+	if (*endp != '\0') {
+		pr_err("Error: Can't set serial# to %s\n", ep->serial);
+		return;
+	}
+
+	snprintf(serial_string, sizeof(serial_string), "%016lx", board_serial);
+	env_set("serial#", serial_string);
+}
+
 int board_late_init(void)
 {
 	if (IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT)) {
@@ -428,6 +429,7 @@ int board_late_init(void)
 
 	return 0;
 }
+#endif
 
 void spl_board_init(void)
 {
Signature · 1 line
2.35.0
#6 lore raw

Re: [PATCH V3 03/16] board: ti: j721e: Guard functions with right #ifdef to avoid build warnings

Quoted 8 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. Also, reorder these functions to place it under single #ifdef

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#7 lore raw

PATCH v3 4/16 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 RPi. So start looking for TI specific EEPROM at 0x50, if not found look for EEPROM at 0x51.

---

Changes in V3:
Updated Commit description as per review comments.

V2: https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

 board/ti/j721e/evm.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
board/ti/j721e/evm.c +9 -3
index e924321557..dc1c310861 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.35.0
#8 lore raw

Re: [PATCH V3 04/16] board: ti: j721e: Enable support for reading EEPROM at next alternate address

Quoted 8 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 RPi. So start looking for TI specific EEPROM at 0x50, if not found look for EEPROM at 0x51.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#9 lore raw

PATCH v3 5/16 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.

---
 board/ti/j721e/evm.c | 5 +++++
 1 file changed, 5 insertions(+)
board/ti/j721e/evm.c +5 -0
index dc1c310861..b6810eb0c9 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"))
 
@@ -390,6 +393,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.35.0
#10 lore raw

Re: [PATCH V3 05/16] board: ti: j721e: Add support to update board_name for j721e-sk

Quoted 6 lines · Sinthu Raja

From: Sinthu Raja <[email protected]>

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

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#11 lore raw

PATCH v3 6/16 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 V3:
* Updated the conditional check to be a positive check for the board(s) which may have daugther cards.

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

V2: https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

 board/ti/j721e/evm.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
board/ti/j721e/evm.c +6 -3
index b6810eb0c9..c70ed7a84c 100644
@@ -432,7 +432,8 @@ int board_late_init(void)
 		setup_serial();
 
 		/* Check for and probe any plugged-in daughtercards */
-		probe_daughtercards();
+		if (board_is_j721e_som() || board_is_j7200_som())
+			probe_daughtercards();
 	}
 
 	if (board_is_j7200_som())
@@ -451,8 +452,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.35.0
#12 lore raw

Re: [PATCH V3 06/16] board: ti: j721e: Disable probing of daughtercards

Quoted 7 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.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#13 lore raw

PATCH v3 7/16 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.

---
 board/ti/j721e/evm.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
board/ti/j721e/evm.c +14 -2
index c70ed7a84c..4c40f984ef 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.35.0
#14 lore raw

Re: [PATCH V3 07/16] board: ti: j721e: Add support for detecting multiple device trees

Quoted 9 lines · 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.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#15 lore raw

PATCH v3 8/16 arm: j721e: Add support for selecting DT based on board name

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.

---
 arch/arm/mach-k3/j721e_init.c | 58 +++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)
arch/arm/mach-k3/j721e_init.c +58 -0
index 78d80be175..3d99ef0444 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.
Signature · 1 line
2.35.0
#16 lore raw

Re: [PATCH V3 08/16] arm: j721e: Add support for selecting DT based on board name

Quoted 7 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.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#17 lore raw

PATCH v3 9/16 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.

---
 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.35.0
#18 lore raw

Re: [PATCH V3 09/16] arm: dts: k3-j721e-r5-common-proc-board: Do not use power-domains for I2C

Quoted 7 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.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#19 lore raw

PATCH v3 10/16 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

---
 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 75ea7e8e37..b04c4615ae 100644
@@ -1136,7 +1136,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.35.0
#20 lore raw

Re: [PATCH V3 10/16] arm: dts: k3-j721e-sk: Add initial A72 specific dts support

Quoted 21 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

Quoted 5 lines

Add A72 specific dts for J721E-SK.

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

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#21 lore raw

PATCH v3 11/16 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

---
 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 b04c4615ae..2f064a6090 100644
@@ -1137,7 +1137,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.35.0
#22 lore raw

Re: [PATCH V3 11/16] arm: dts: k3-j721e-r5-sk: Add initial R5 specific dts support for j721e-sk

Quoted 5 lines · Sinthu Raja

From: Sinthu Raja <[email protected]>

Add R5 specific dts for J721E-SK

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#23 lore raw

PATCH v3 12/16 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.

---
 configs/j721e_evm_r5_defconfig | 3 +++
 1 file changed, 3 insertions(+)
configs/j721e_evm_r5_defconfig +3 -0
index b0759d1f30..a8b6346940 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.35.0
#24 lore raw

Re: [PATCH V3 12/16] configs: j721e_evm_r5: Enable support for building multiple dtbs into FIT

Quoted 7 lines · 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.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#25 lore raw

PATCH v3 13/16 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.

---
 configs/j721e_evm_a72_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/j721e_evm_a72_defconfig +2 -0
index 2e45273903..4fb98037ae 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.35.0
#26 lore raw

Re: [PATCH V3 13/16] configs: j721e_evm_a72: Add SK dtb as part of DTB FIT

Quoted 5 lines · Sinthu Raja

From: Sinthu Raja <[email protected]>

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

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#27 lore raw

PATCH v3 14/16 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.

---
 configs/j721e_evm_a72_defconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configs/j721e_evm_a72_defconfig +2 -2
index 4fb98037ae..e8a049746c 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.35.0
#28 lore raw

Re: [PATCH V3 14/16] configs: j721e_evm_a72: Align OSPI partitions on erase block boundary

Quoted 11 lines · 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.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#29 lore raw

PATCH v3 15/16 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.

---
 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 e8a049746c..61832abb02 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 a8b6346940..82372906ee 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.35.0
#30 lore raw

Re: [PATCH V3 15/16] configs: j721e_evm: Store env in MMC FAT partition

Quoted 5 lines · Sinthu Raja

From: Sinthu Raja <[email protected]>

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

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#31 lore raw

PATCH v3 16/16 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.

---
 include/configs/j721e_evm.h | 4 ++++
 1 file changed, 4 insertions(+)
include/configs/j721e_evm.h +4 -0
index abea7517e8..abed987ea1 100644
@@ -66,6 +66,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.35.0
#32 lore raw

Re: [PATCH V3 16/16] include: configs: Update env for selecting right dtb

Quoted 8 lines · 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.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom