Skip to contentSkip to conversation

Add support for Ethboot for AM68-SK AM62p-SK

PATCH Superseded Chintan Vankar 3 participants 24 messages Feb 19, 2025 – Feb 23, 2025

Subsystems (5)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v2 cover Add support for Ethboot for AM68-SK AM62p-SK

This series adds support to enable Ethernet boot for AM68-SK and AM62p-SK devices.

This seies is based on commit '7a45cb4ffeff0' of origin/master branch of U-Boot.

Link to v1:
https://lore.kernel.org/r/[email protected]/

Logs for Ethernet boot:
AM68: https://gist.github.com/chintan013/3117d2bc8b589154a7d5d47b8d8c0920
AM62p: https://gist.github.com/chintan013/39802b693a15776e7f696df401999a79
AM62x: https://gist.github.com/chintan013/d35ca61f7fa57cedd3c34d5639886186

Changes from v1 to v2:
-> Updated commit message for [PATCH 01/13] in this series. -> Defined bind method and replace it with probe method for CPSW driver. -> Added new patch [PATCH v2 03/16] in this series which removes
explicit probing of CPSW driver
-> Added Reviewed-by tag for [PATCH 02/13] from Bryan Brattlof. -> Removed unnecessary config options and updated commit message to add
configs for AM62p and AM68.
-> Updated commit message for [PATCH 08/13].

Andreas Dannenberg (3):
arm: mach-k3: am62p: Update SoC auto-gen data to enable CPSW boot
board: ti: am62px: evm: Enable cache for AM62p
configs: am62p: Add configs for enabling ETHBOOT in R5SPL

Chintan Vankar (10):
net: tftp: Increase TFTP pkt string length to include null character
net: ti: am65-cpsw-nuss: Define and switch to bind method for CPSW
driver
arm: mach-k3: am62x: am625_init: Remove explicit probing of CPSW
driver
arm: mach-k3: j721s2: Update SoC auto-gen data to enable Ethernet boot
arm: mach-k3: j721s2_spl: Alias Ethernet boot to CPGMAC
configs: am68: Add configs for enabling Ethboot in R5SPL
configs: am68: Enable configs required for Ethernet boot
arm: dts: k3-am68-sk-base-board-u-boot: Add bootph-all property to
necessary nodes
configs: am62p: Enable configs required for Ethboot
arch: arm: dts: k3-am62p5-sk-u-boot: Add bootph-all property to
necessary nodes

 arch/arm/dts/k3-am62p5-sk-u-boot.dtsi         |  32 +++++
 .../arm/dts/k3-am68-sk-base-board-u-boot.dtsi |  28 ++++
 arch/arm/mach-k3/am62x/am625_init.c           |   9 --
 arch/arm/mach-k3/include/mach/j721s2_spl.h    |   1 +
 arch/arm/mach-k3/r5/am62px/clk-data.c         |  44 +++++-
 arch/arm/mach-k3/r5/am62px/dev-data.c         |  24 ++--
 arch/arm/mach-k3/r5/j721s2/clk-data.c         |  58 +++++++-
 arch/arm/mach-k3/r5/j721s2/dev-data.c         |   3 +-
 board/ti/am62px/evm.c                         |   8 ++
 configs/am62px_evm_a53_ethboot_defconfig      |  14 ++
 configs/am62px_evm_r5_ethboot_defconfig       |  30 ++++
 configs/am68_sk_a72_ethboot_defconfig         |  15 ++
 configs/am68_sk_r5_ethboot_defconfig          |  60 ++++++++
 drivers/net/ti/am65-cpsw-nuss.c               | 129 ++++++++++--------
 net/tftp.c                                    |   6 +-
 15 files changed, 377 insertions(+), 84 deletions(-)
 create mode 100644 configs/am62px_evm_a53_ethboot_defconfig
 create mode 100644 configs/am62px_evm_r5_ethboot_defconfig
 create mode 100644 configs/am68_sk_a72_ethboot_defconfig
 create mode 100644 configs/am68_sk_r5_ethboot_defconfig
Signature · 1 line
2.34.1
#1 lore raw

PATCH v2 1/13 net: tftp: Increase TFTP pkt string length to include null character

To append a string to a tftp pkt, "tftp_send()" API invokes "sprintf()" function which copies a string excluding a null character causing TFTP not-null terminated string error. Increase TFTP pkt string by 1 to avoid this error.

---

Link to v1:
https://lore.kernel.org/r/[email protected]/

Changes from v1 to v2:
-> Updated commit message.

 net/tftp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
net/tftp.c +3 -3
index fd9c9492929..420ea9ecf6c 100644
@@ -347,11 +347,11 @@ static void tftp_send(void)
 		pkt += strlen((char *)pkt) + 1;
 #ifdef CONFIG_TFTP_TSIZE
 		pkt += sprintf((char *)pkt, "tsize%c%u%c",
-				0, net_boot_file_size, 0);
+				0, net_boot_file_size, 0) + 1;
 #endif
 		/* try for more effic. blk size */
 		pkt += sprintf((char *)pkt, "blksize%c%d%c",
-				0, tftp_block_size_option, 0);
+				0, tftp_block_size_option, 0) + 1;
 
 		/* try for more effic. window size.
 		 * Implemented only for tftp get.
@@ -359,7 +359,7 @@ static void tftp_send(void)
 		 */
 		if (tftp_state == STATE_SEND_RRQ && tftp_window_size_option > 1)
 			pkt += sprintf((char *)pkt, "windowsize%c%d%c",
-					0, tftp_window_size_option, 0);
+					0, tftp_window_size_option, 0) + 1;
 		len = pkt - xp;
 		break;
 
Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH v2 01/13] net: tftp: Increase TFTP pkt string length to include null character

Hi Chintan!

Quoted 3 lines · Chintan Vankar

To append a string to a tftp pkt, "tftp_send()" API invokes "sprintf()" function which copies a string excluding a null character causing TFTP not-null terminated string error. Increase TFTP pkt string by 1 to avoid

Is this error visible somehow? How did you stop this problem?

Quoted 19 lines

this error.

---

Link to v1:
https://lore.kernel.org/r/[email protected]/

Changes from v1 to v2:
-> Updated commit message.

 net/tftp.c | 6 +++---

 1 file changed, 3 insertions(+), 3 deletions(-)
net/tftp.c +0 -0
index fd9c9492929..420ea9ecf6c 100644

net/tftp.c static void tftp_send(void) · line 350

Quoted 5 lines
net/tftp.c +1 -1
@@ -347,11 +347,11 @@ static void tftp_send(void)
  		pkt += strlen((char *)pkt) + 1;
  #ifdef CONFIG_TFTP_TSIZE
  		pkt += sprintf((char *)pkt, "tsize%c%u%c",
-				0, net_boot_file_size, 0);
+				0, net_boot_file_size, 0) + 1;

But it does indeed produce \000 octets, because of %c with "0" argument, doesn't it?

Quoted 16 lines
net/tftp.c +1 -1
  #endif
  		/* try for more effic. blk size */
  		pkt += sprintf((char *)pkt, "blksize%c%d%c",
-				0, tftp_block_size_option, 0);
+				0, tftp_block_size_option, 0) + 1;


  /* try for more effic. window size.
  * Implemented only for tftp get.

net/tftp.c +1 -1
@@ -359,7 +359,7 @@ static void tftp_send(void)
  		 */
  		if (tftp_state == STATE_SEND_RRQ && tftp_window_size_option > 1)
  			pkt += sprintf((char *)pkt, "windowsize%c%d%c",
-					0, tftp_window_size_option, 0);
+					0, tftp_window_size_option, 0) + 1;
  		len = pkt - xp;
  		break;
Signature · 3 lines
Alexander Sverdlin
Siemens AG
www.siemens.com
#3 lore raw

Re: [PATCH v2 01/13] net: tftp: Increase TFTP pkt string length to include null character

Hello Alexander,

Quoted 9 lines · Alexander

Hi Chintan!

Quoted 3 lines · Chintan Vankar

To append a string to a tftp pkt, "tftp_send()" API invokes "sprintf()" function which copies a string excluding a null character causing TFTP not-null terminated string error. Increase TFTP pkt string by 1 to avoid

Is this error visible somehow? How did you stop this problem?

Yes this error is visible while loading the file via TFTP. I tried tracing back the error and it was due to string copying in "tftp.c" file that I modified.

Since commit 'e2d96ac9ee9f81c8f72435bff55f924d27ad92d1' has modified sprintf() function to return the string length instead of 0 so it was not seen before. Also from:
https://github.com/u-boot/u-boot/blob/master/net/tftp.c#L347,
you can see that we are incrementing pkt length by 1 on every sprintf() call but that was not done for the later part that I modified and that's how I come to this approach.

Quoted 14 lines
Quoted 14 lines

this error.

---

Link to v1:
https://lore.kernel.org/r/[email protected]/

Changes from v1 to v2:
-> Updated commit message.

  net/tftp.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
Quoted 13 lines

net/tftp.c static void tftp_send(void) · line 350

Quoted 10 lines
net/tftp.c +1 -1
index fd9c9492929..420ea9ecf6c 100644
@@ -347,11 +347,11 @@ static void tftp_send(void)
  		pkt += strlen((char *)pkt) + 1;
  #ifdef CONFIG_TFTP_TSIZE
  		pkt += sprintf((char *)pkt, "tsize%c%u%c",
-				0, net_boot_file_size, 0);
+				0, net_boot_file_size, 0) + 1;

But it does indeed produce \000 octets, because of %c with "0" argument, doesn't it?

While debugging I tried to debug the pkt string and I come to know that before this point 'null character' was getting appended because of incrementing a pkt length by one, but not after this. It was just appending a string, so it was not producing a '\0'.

Quoted 17 lines
Quoted 16 lines
net/tftp.c +2 -2
  #endif
  		/* try for more effic. blk size */
  		pkt += sprintf((char *)pkt, "blksize%c%d%c",
-				0, tftp_block_size_option, 0);
+				0, tftp_block_size_option, 0) + 1;
 
  		/* try for more effic. window size.
  		 * Implemented only for tftp get.
@@ -359,7 +359,7 @@ static void tftp_send(void)
  		 */
  		if (tftp_state == STATE_SEND_RRQ && tftp_window_size_option > 1)
  			pkt += sprintf((char *)pkt, "windowsize%c%d%c",
-					0, tftp_window_size_option, 0);
+					0, tftp_window_size_option, 0) + 1;
  		len = pkt - xp;
  		break;
#4 lore raw

Re: [PATCH v2 01/13] net: tftp: Increase TFTP pkt string length to include null character

Quoted 48 lines · Chintan
Quoted 7 lines · Chintan Vankar
Quoted 3 lines

To append a string to a tftp pkt, "tftp_send()" API invokes "sprintf()" function which copies a string excluding a null character causing TFTP not-null terminated string error. Increase TFTP pkt string by 1 to avoid

Is this error visible somehow? How did you stop this problem?

Yes this error is visible while loading the file via TFTP. I tried tracing back the error and it was due to string copying in "tftp.c" file that I modified.

Since commit 'e2d96ac9ee9f81c8f72435bff55f924d27ad92d1' has modified sprintf() function to return the string length instead of 0 so it was not seen before. Also from:
https://github.com/u-boot/u-boot/blob/master/net/tftp.c#L347,
you can see that we are incrementing pkt length by 1 on every sprintf() call but that was not done for the later part that I modified and that's how I come to this approach.

Quoted 14 lines
Quoted 14 lines

this error.

---

Link to v1:
https://lore.kernel.org/r/[email protected]/

Changes from v1 to v2:
-> Updated commit message.

   net/tftp.c | 6 +++---

   1 file changed, 3 insertions(+), 3 deletions(-)
Quoted 13 lines

net/tftp.c static void tftp_send(void) · line 350

Quoted 10 lines
net/tftp.c +1 -1
index fd9c9492929..420ea9ecf6c 100644
@@ -347,11 +347,11 @@ static void tftp_send(void)
    		pkt += strlen((char *)pkt) + 1;
    #ifdef CONFIG_TFTP_TSIZE
    		pkt += sprintf((char *)pkt, "tsize%c%u%c",
-				0, net_boot_file_size, 0);
+				0, net_boot_file_size, 0) + 1;

But it does indeed produce \000 octets, because of %c with "0" argument, doesn't it?

Quoted 4 lines

While debugging I tried to debug the pkt string and I come to know that before this point 'null character' was getting appended because of incrementing a pkt length by one, but not after this. It was just appending a string, so it was not producing a '\0'.

Does it produce \000 octet between tsize and net_boot_file_size value? I suppose TFTP protocol requires it?
Looking into _vprintf() implementation, I'd say it would have problems emitting %c with parameter 0, no matter if at the end of the string, or in the middle.

Would the following patch fix the problem you observe?

lib/tiny-printf.c +1 -1
index 0503c17341f..0e620b272d8 100644
@@ -299,7 +299,7 @@ static int _vprintf(struct printf_info *info, const char *fmt, va_list va)
 				}
 				break;
 			case 'c':
-				out(info, (char)(va_arg(va, int)));
+				info->putc(info, (char)(va_arg(va, int)));
 				break;
 			case 's':
 				p = va_arg(va, char*);
Signature · 3 lines
Alexander Sverdlin
Siemens AG
www.siemens.com
#5 lore raw

Re: [PATCH v2 01/13] net: tftp: Increase TFTP pkt string length to include null character

In reply to Vankar, Chintan

Hi Chintan!

Quoted 48 lines · Chintan
Quoted 7 lines · Chintan Vankar
Quoted 3 lines

To append a string to a tftp pkt, "tftp_send()" API invokes "sprintf()" function which copies a string excluding a null character causing TFTP not-null terminated string error. Increase TFTP pkt string by 1 to avoid

Is this error visible somehow? How did you stop this problem?

Yes this error is visible while loading the file via TFTP. I tried tracing back the error and it was due to string copying in "tftp.c" file that I modified.

Since commit 'e2d96ac9ee9f81c8f72435bff55f924d27ad92d1' has modified sprintf() function to return the string length instead of 0 so it was not seen before. Also from:
https://github.com/u-boot/u-boot/blob/master/net/tftp.c#L347,
you can see that we are incrementing pkt length by 1 on every sprintf() call but that was not done for the later part that I modified and that's how I come to this approach.

Quoted 14 lines
Quoted 14 lines

this error.

---

Link to v1:
https://lore.kernel.org/r/[email protected]/

Changes from v1 to v2:
-> Updated commit message.

   net/tftp.c | 6 +++---

   1 file changed, 3 insertions(+), 3 deletions(-)
Quoted 13 lines

net/tftp.c static void tftp_send(void) · line 350

Quoted 10 lines
net/tftp.c +1 -1
index fd9c9492929..420ea9ecf6c 100644
@@ -347,11 +347,11 @@ static void tftp_send(void)
    		pkt += strlen((char *)pkt) + 1;
    #ifdef CONFIG_TFTP_TSIZE
    		pkt += sprintf((char *)pkt, "tsize%c%u%c",
-				0, net_boot_file_size, 0);
+				0, net_boot_file_size, 0) + 1;

But it does indeed produce \000 octets, because of %c with "0" argument, doesn't it?

Quoted 4 lines

While debugging I tried to debug the pkt string and I come to know that before this point 'null character' was getting appended because of incrementing a pkt length by one, but not after this. It was just appending a string, so it was not producing a '\0'.

I've made some test on my side and can confirm that:
- the above fix is not correct because the output is actually short by 2, not by one in the above case (two times %c missing)
- the root cause lies in tiny-printf, not in TFTP code

I believe this is one of the ways to fix the root cause:
https://lists.denx.de/pipermail/u-boot/2025-February/581142.html

Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
net/tftp.c +1 -1
    #endif
    		/* try for more effic. blk size */
    		pkt += sprintf((char *)pkt, "blksize%c%d%c",
-				0, tftp_block_size_option, 0);
+				0, tftp_block_size_option, 0) + 1;


    /* try for more effic. window size.
    * Implemented only for tftp get.

net/tftp.c +1 -1
@@ -359,7 +359,7 @@ static void tftp_send(void)
    		 */
    		if (tftp_state == STATE_SEND_RRQ && tftp_window_size_option > 1)
    			pkt += sprintf((char *)pkt, "windowsize%c%d%c",
-					0, tftp_window_size_option, 0);
+					0, tftp_window_size_option, 0) + 1;
    		len = pkt - xp;
    		break;
Signature · 3 lines
Alexander Sverdlin
Siemens AG
www.siemens.com
#6 lore raw

PATCH v2 2/13 net: ti: am65-cpsw-nuss: Define and switch to bind method for CPSW driver

In reply to Chintan Vankar

CPSW driver is defined as UCLASS_MISC driver which needs to be probed explicitly. Define bind method for CPSW driver to scan and bind ethernet-ports with UCLASS_ETH driver which will eventually probe CPSW driver and avoids probing CPSW driver explicitly.

---

This patch is new in this series.

 drivers/net/ti/am65-cpsw-nuss.c | 129 +++++++++++++++++++-------------
 1 file changed, 75 insertions(+), 54 deletions(-)
drivers/net/ti/am65-cpsw-nuss.c +75 -54
index c70b42f6bcc..12c66095cce 100644
@@ -132,6 +132,7 @@ struct am65_cpsw_priv {
 	struct am65_cpsw_common	*cpsw_common;
 	u32			port_id;
 	struct phy_device	*phydev;
+	bool			probe_done;
 };
 
 #ifdef PKTSIZE_ALIGN
@@ -667,6 +668,59 @@ static int am65_cpsw_ofdata_parse_phy(struct udevice *dev)
 	return 0;
 }
 
+static int am65_cpsw_probe_nuss(struct udevice *dev)
+{
+	struct am65_cpsw_common *cpsw_common = dev_get_priv(dev);
+	int ret, i;
+
+	cpsw_common->dev = dev;
+	cpsw_common->ss_base = dev_read_addr(dev);
+	if (cpsw_common->ss_base == FDT_ADDR_T_NONE)
+		return -EINVAL;
+
+	ret = power_domain_get_by_index(dev, &cpsw_common->pwrdmn, 0);
+	if (ret) {
+		dev_err(dev, "failed to get pwrdmn: %d\n", ret);
+		return ret;
+	}
+
+	ret = clk_get_by_name(dev, "fck", &cpsw_common->fclk);
+	if (ret) {
+		power_domain_free(&cpsw_common->pwrdmn);
+		dev_err(dev, "failed to get clock %d\n", ret);
+		return ret;
+	}
+
+	cpsw_common->cpsw_base = cpsw_common->ss_base + AM65_CPSW_CPSW_NU_BASE;
+	cpsw_common->ale_base = cpsw_common->cpsw_base +
+				AM65_CPSW_CPSW_NU_ALE_BASE;
+
+	for (i = 0; i < AM65_CPSW_CPSWNU_MAX_PORTS; i++) {
+		struct am65_cpsw_port *port = &cpsw_common->ports[i];
+
+		port->port_base = cpsw_common->cpsw_base +
+				  AM65_CPSW_CPSW_NU_PORTS_OFFSET +
+				  (i * AM65_CPSW_CPSW_NU_PORTS_OFFSET);
+		port->port_sgmii_base = cpsw_common->ss_base +
+					(i * AM65_CPSW_SGMII_BASE);
+		port->macsl_base = port->port_base +
+				   AM65_CPSW_CPSW_NU_PORT_MACSL_OFFSET;
+	}
+
+	cpsw_common->bus_freq =
+			dev_read_u32_default(dev, "bus_freq",
+					     AM65_CPSW_MDIO_BUS_FREQ_DEF);
+
+	dev_info(dev, "K3 CPSW: nuss_ver: 0x%08X cpsw_ver: 0x%08X ale_ver: 0x%08X Ports:%u\n",
+		 readl(cpsw_common->ss_base),
+		 readl(cpsw_common->cpsw_base),
+		 readl(cpsw_common->ale_base),
+		 cpsw_common->port_num);
+
+	power_domain_free(&cpsw_common->pwrdmn);
+	return ret;
+}
+
 static int am65_cpsw_port_probe(struct udevice *dev)
 {
 	struct am65_cpsw_priv *priv = dev_get_priv(dev);
@@ -675,6 +729,13 @@ static int am65_cpsw_port_probe(struct udevice *dev)
 	char portname[32];
 	int ret;
 
+	if (!priv->probe_done) {
+		ret = am65_cpsw_probe_nuss(dev->parent);
+		if (ret < 0)
+			return ret;
+		priv->probe_done = true;
+	}
+
 	priv->dev = dev;
 
 	cpsw_common = dev_get_priv(dev->parent);
@@ -697,45 +758,30 @@ out:
 	return ret;
 }
 
-static int am65_cpsw_probe_nuss(struct udevice *dev)
+static int am65_cpsw_nuss_bind(struct udevice *dev)
 {
 	struct am65_cpsw_common *cpsw_common = dev_get_priv(dev);
-	ofnode ports_np, node;
-	int ret, i;
+	struct uclass_driver *drv;
 	struct udevice *port_dev;
+	ofnode ports_np, node;
+	int ret;
 
-	cpsw_common->dev = dev;
-	cpsw_common->ss_base = dev_read_addr(dev);
-	if (cpsw_common->ss_base == FDT_ADDR_T_NONE)
-		return -EINVAL;
-
-	ret = power_domain_get_by_index(dev, &cpsw_common->pwrdmn, 0);
-	if (ret) {
-		dev_err(dev, "failed to get pwrdmn: %d\n", ret);
-		return ret;
-	}
-
-	ret = clk_get_by_name(dev, "fck", &cpsw_common->fclk);
-	if (ret) {
-		power_domain_free(&cpsw_common->pwrdmn);
-		dev_err(dev, "failed to get clock %d\n", ret);
-		return ret;
+	drv = lists_uclass_lookup(UCLASS_ETH);
+	if (!drv) {
+		puts("Cannot find eth driver");
+		return -ENOENT;
 	}
 
-	cpsw_common->cpsw_base = cpsw_common->ss_base + AM65_CPSW_CPSW_NU_BASE;
-	cpsw_common->ale_base = cpsw_common->cpsw_base +
-				AM65_CPSW_CPSW_NU_ALE_BASE;
-
+	cpsw_common->dev = dev;
 	ports_np = dev_read_subnode(dev, "ethernet-ports");
 	if (!ofnode_valid(ports_np)) {
-		ret = -ENOENT;
-		goto out;
+		return -ENOENT;
 	}
 
 	ofnode_for_each_subnode(node, ports_np) {
 		const char *node_name;
-		u32 port_id;
 		bool disabled;
+		u32 port_id;
 
 		node_name = ofnode_get_name(node);
 
@@ -745,14 +791,13 @@ static int am65_cpsw_probe_nuss(struct udevice *dev)
 		if (ret) {
 			dev_err(dev, "%s: failed to get port_id (%d)\n",
 				node_name, ret);
-			goto out;
+			return ret;
 		}
 
 		if (port_id >= AM65_CPSW_CPSWNU_MAX_PORTS) {
 			dev_err(dev, "%s: invalid port_id (%d)\n",
 				node_name, port_id);
-			ret = -EINVAL;
-			goto out;
+			return -EINVAL;
 		}
 		cpsw_common->port_num++;
 
@@ -768,30 +813,6 @@ static int am65_cpsw_probe_nuss(struct udevice *dev)
 			dev_err(dev, "Failed to bind to %s node\n", ofnode_get_name(node));
 	}
 
-	for (i = 0; i < AM65_CPSW_CPSWNU_MAX_PORTS; i++) {
-		struct am65_cpsw_port *port = &cpsw_common->ports[i];
-
-		port->port_base = cpsw_common->cpsw_base +
-				  AM65_CPSW_CPSW_NU_PORTS_OFFSET +
-				  (i * AM65_CPSW_CPSW_NU_PORTS_OFFSET);
-		port->port_sgmii_base = cpsw_common->ss_base +
-					(i * AM65_CPSW_SGMII_BASE);
-		port->macsl_base = port->port_base +
-				   AM65_CPSW_CPSW_NU_PORT_MACSL_OFFSET;
-	}
-
-	cpsw_common->bus_freq =
-			dev_read_u32_default(dev, "bus_freq",
-					     AM65_CPSW_MDIO_BUS_FREQ_DEF);
-
-	dev_info(dev, "K3 CPSW: nuss_ver: 0x%08X cpsw_ver: 0x%08X ale_ver: 0x%08X Ports:%u\n",
-		 readl(cpsw_common->ss_base),
-		 readl(cpsw_common->cpsw_base),
-		 readl(cpsw_common->ale_base),
-		 cpsw_common->port_num);
-
-out:
-	power_domain_free(&cpsw_common->pwrdmn);
 	return ret;
 }
 
@@ -806,7 +827,7 @@ U_BOOT_DRIVER(am65_cpsw_nuss) = {
 	.name	= "am65_cpsw_nuss",
 	.id	= UCLASS_MISC,
 	.of_match = am65_cpsw_nuss_ids,
-	.probe	= am65_cpsw_probe_nuss,
+	.bind	= am65_cpsw_nuss_bind,
 	.priv_auto = sizeof(struct am65_cpsw_common),
 };
 
Signature · 1 line
2.34.1
#7 lore raw

Re: [PATCH v2 02/13] net: ti: am65-cpsw-nuss: Define and switch to bind method for CPSW driver

Hi Chintan!

Quoted 25 lines · Chintan Vankar

CPSW driver is defined as UCLASS_MISC driver which needs to be probed explicitly. Define bind method for CPSW driver to scan and bind ethernet-ports with UCLASS_ETH driver which will eventually probe CPSW driver and avoids probing CPSW driver explicitly.

---

This patch is new in this series.

 drivers/net/ti/am65-cpsw-nuss.c | 129 +++++++++++++++++++-------------
 1 file changed, 75 insertions(+), 54 deletions(-)
drivers/net/ti/am65-cpsw-nuss.c +1 -0
index c70b42f6bcc..12c66095cce 100644
@@ -132,6 +132,7 @@ struct am65_cpsw_priv {
 	struct am65_cpsw_common	*cpsw_common;
 	u32			port_id;
 	struct phy_device	*phydev;
+	bool			probe_done;
 };
 
 #ifdef PKTSIZE_ALIGN

[...]

drivers/net/ti/am65-cpsw-nuss.c static int am65_cpsw_port_probe(struct udevice *dev) · line 738

Quoted 11 lines
drivers/net/ti/am65-cpsw-nuss.c +7 -0
@@ -675,6 +729,13 @@ static int am65_cpsw_port_probe(struct udevice *dev)
 	char portname[32];
 	int ret;
 
+	if (!priv->probe_done) {
+		ret = am65_cpsw_probe_nuss(dev->parent);
+		if (ret < 0)
+			return ret;
+		priv->probe_done = true;
+	}
+

So this particular port will probe the parent device only once... But what about the next port? Will it probe the same parent once again?

Is it actually necessary if device_probe() actually ensures, that all parents are being probed first?

The probe_done you invent is probably much better served with "dev_get_flags(dev) & DM_FLAG_ACTIVATED"?

Quoted 3 lines
drivers/net/ti/am65-cpsw-nuss.c +0 -0
 	priv->dev = dev;
 
 	cpsw_common = dev_get_priv(dev->parent);
Signature · 3 lines
Alexander Sverdlin
Siemens AG
www.siemens.com
#8 lore raw

Re: [PATCH v2 02/13] net: ti: am65-cpsw-nuss: Define and switch to bind method for CPSW driver

Hello Alexander and Roger,

Quoted 46 lines · Alexander

Hi Chintan!

Quoted 25 lines · Chintan Vankar

CPSW driver is defined as UCLASS_MISC driver which needs to be probed explicitly. Define bind method for CPSW driver to scan and bind ethernet-ports with UCLASS_ETH driver which will eventually probe CPSW driver and avoids probing CPSW driver explicitly.

---

This patch is new in this series.

  drivers/net/ti/am65-cpsw-nuss.c | 129 +++++++++++++++++++-------------
  1 file changed, 75 insertions(+), 54 deletions(-)
drivers/net/ti/am65-cpsw-nuss.c +1 -0
index c70b42f6bcc..12c66095cce 100644
@@ -132,6 +132,7 @@ struct am65_cpsw_priv {
  	struct am65_cpsw_common	*cpsw_common;
  	u32			port_id;
  	struct phy_device	*phydev;
+	bool			probe_done;
  };
 
  #ifdef PKTSIZE_ALIGN

[...]

drivers/net/ti/am65-cpsw-nuss.c static int am65_cpsw_port_probe(struct udevice *dev) · line 738

Quoted 11 lines
drivers/net/ti/am65-cpsw-nuss.c +7 -0
@@ -675,6 +729,13 @@ static int am65_cpsw_port_probe(struct udevice *dev)
  	char portname[32];
  	int ret;
 
+	if (!priv->probe_done) {
+		ret = am65_cpsw_probe_nuss(dev->parent);
+		if (ret < 0)
+			return ret;
+		priv->probe_done = true;
+	}
+

So this particular port will probe the parent device only once... But what about the next port? Will it probe the same parent once again?

Quoted 5 lines

Is it actually necessary if device_probe() actually ensures, that all parents are being probed first?

The probe_done you invent is probably much better served with "dev_get_flags(dev) & DM_FLAG_ACTIVATED"?

Thank you Alexander for reviewing the patch and pointing out this since I was not aware of dev->flags.

We can observe in device_probe() method that while probing a driver for the dev we first check whether it's parents are probed or not. That is also true for "am65_cpsw_port_probe" and that's why I don't think we need to probe "am65_cpsw_probe_nuss" from it's child am65_cpsw_port_probe since every time we probe child it's parent will eventually get probed from device_probe method.

Also I have defined bind method by replacing a probe for "am65_cpsw_probe_nuss" but also removed probe from the U_BOOT_DRIVER definition by mistake, I will correct it in next version.

Let me know what you think.

Regards,
Chintan.

Quoted 5 lines
Quoted 4 lines
drivers/net/ti/am65-cpsw-nuss.c +0 -0
  	priv->dev = dev;
 
  	cpsw_common = dev_get_priv(dev->parent);
#9 lore raw

PATCH v2 3/13 arm: mach-k3: am62x: am625_init: Remove explicit probing of CPSW driver

In reply to Chintan Vankar

Probe method of CPSW driver is replaced with the bind method which eventually probes CPSW driver. Hence remove explicit probing of CPSW.

---

This patch is new in this series.

 arch/arm/mach-k3/am62x/am625_init.c | 9 ---------
 1 file changed, 9 deletions(-)
arch/arm/mach-k3/am62x/am625_init.c +0 -9
index 595fc391ac5..72a752d38e8 100644
@@ -282,15 +282,6 @@ void board_init_f(ulong dummy)
 	}
 	spl_enable_cache();
 
-	if (IS_ENABLED(CONFIG_SPL_ETH) && IS_ENABLED(CONFIG_TI_AM65_CPSW_NUSS) &&
-	    spl_boot_device() == BOOT_DEVICE_ETHERNET) {
-		struct udevice *cpswdev;
-
-		if (uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(am65_cpsw_nuss),
-						&cpswdev))
-			printf("Failed to probe am65_cpsw_nuss driver\n");
-	}
-
 	fixup_a53_cpu_freq_by_speed_grade();
 }
 
Signature · 1 line
2.34.1
#10 lore raw

PATCH v2 4/13 arm: mach-k3: j721s2: Update SoC auto-gen data to enable Ethernet boot

In reply to Chintan Vankar

Update dev-data and clk-data generated using ksswtool-autogen to include CPSW device which is required for Ethernet Boot, also use ARRAY_SIZE() MACRO to avoid hard-coding array size.

---

Link to v1:
https://lore.kernel.org/r/[email protected]/

Changes from v1 to v2:
- No change.

 arch/arm/mach-k3/r5/j721s2/clk-data.c | 58 +++++++++++++++++++++++++--
 arch/arm/mach-k3/r5/j721s2/dev-data.c |  3 +-
 2 files changed, 57 insertions(+), 4 deletions(-)
arch/arm/mach-k3/r5/j721s2/clk-data.c +55 -3
index 0c5c321c1eb..0130c9c4b86 100644
@@ -5,7 +5,7 @@
  * This file is auto generated. Please do not hand edit and report any issues
  * to Dave Gerlach <[email protected]>.
  *
- * Copyright (C) 2020-2021 Texas Instruments Incorporated - https://www.ti.com/
+ * Copyright (C) 2020-2025 Texas Instruments Incorporated - https://www.ti.com/
  */
 
 #include <linux/clk-provider.h>
@@ -55,6 +55,32 @@ static const char * const mcu_ospi_ref_clk_sel_out1_parents[] = {
 	"hsdiv4_16fft_mcu_2_hsdivout4_clk",
 };
 
+static const char * const wkup_gpio0_clksel_out0_parents[] = {
+	"k3_pll_ctrl_wrap_wkup_0_chip_div1_clk_clk",
+	"k3_pll_ctrl_wrap_wkup_0_chip_div1_clk_clk",
+	"j7am_wakeup_16ff_wkup_0_wkup_rcosc_32k_clk",
+	"j7am_wakeup_16ff_wkup_0_wkup_rcosc_12p5m_clk",
+};
+
+static const char * const cpsw2g_cpts_rclk_sel_out0_parents[] = {
+	"hsdiv4_16fft_main_3_hsdivout1_clk",
+	"postdiv3_16fft_main_0_hsdivout6_clk",
+	"board_0_mcu_cpts0_rft_clk_out",
+	"board_0_cpts0_rft_clk_out",
+	"board_0_mcu_ext_refclk0_out",
+	"board_0_ext_refclk1_out",
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	"hsdiv4_16fft_mcu_2_hsdivout1_clk",
+	"k3_pll_ctrl_wrap_wkup_0_chip_div1_clk_clk",
+};
+
 static const char * const mcu_usart_clksel_out0_parents[] = {
 	"hsdiv4_16fft_mcu_1_hsdivout3_clk",
 	"postdiv3_16fft_main_1_hsdivout5_clk",
@@ -174,7 +200,11 @@ static const struct clk_data clk_list[] = {
 	CLK_FIXED_RATE("board_0_hfosc1_clk_out", 0, 0),
 	CLK_FIXED_RATE("board_0_mcu_ospi0_dqs_out", 0, 0),
 	CLK_FIXED_RATE("board_0_mcu_ospi1_dqs_out", 0, 0),
+	CLK_FIXED_RATE("board_0_mcu_rgmii1_rxc_out", 0, 0),
+	CLK_FIXED_RATE("board_0_mcu_rmii1_ref_clk_out", 0, 0),
 	CLK_FIXED_RATE("board_0_wkup_i2c0_scl_out", 0, 0),
+	CLK_FIXED_RATE("cpsw_2guss_mcu_0_mdio_mdclk_o", 0, 0),
+	CLK_FIXED_RATE("cpsw_2guss_mcu_0_rgmii1_txc_o", 0, 0),
 	CLK_FIXED_RATE("fss_mcu_0_hyperbus1p0_0_hpb_out_clk_n", 0, 0),
 	CLK_FIXED_RATE("fss_mcu_0_hyperbus1p0_0_hpb_out_clk_p", 0, 0),
 	CLK_FIXED_RATE("fss_mcu_0_ospi_0_ospi_oclk_clk", 0, 0),
@@ -199,6 +229,8 @@ static const struct clk_data clk_list[] = {
 	CLK_DIV("k3_pll_ctrl_wrap_wkup_0_chip_div1_clk_clk", "k3_pll_ctrl_wrap_wkup_0_sysclkout_clk", 0x42010118, 0, 5, 0, 0),
 	CLK_MUX("mcu_ospi_ref_clk_sel_out0", mcu_ospi_ref_clk_sel_out0_parents, 2, 0x40f08030, 0, 1, 0),
 	CLK_MUX("mcu_ospi_ref_clk_sel_out1", mcu_ospi_ref_clk_sel_out1_parents, 2, 0x40f08034, 0, 1, 0),
+	CLK_MUX("wkup_gpio0_clksel_out0", wkup_gpio0_clksel_out0_parents, 4, 0x43008070, 0, 2, 0),
+	CLK_MUX("cpsw2g_cpts_rclk_sel_out0", cpsw2g_cpts_rclk_sel_out0_parents, 16, 0x40f08050, 8, 4, 0),
 	CLK_MUX("mcu_usart_clksel_out0", mcu_usart_clksel_out0_parents, 2, 0x40f081c0, 0, 1, 0),
 	CLK_MUX("wkup_i2c_mcupll_bypass_out0", wkup_i2c_mcupll_bypass_out0_parents, 2, 0x43008060, 0, 1, 0),
 	CLK_MUX("main_pll_hfosc_sel_out0", main_pll_hfosc_sel_out0_parents, 2, 0x43008080, 0, 1, 0),
@@ -275,6 +307,24 @@ static const struct dev_clk soc_dev_clk_data[] = {
 	DEV_CLK(4, 0, "hsdiv0_16fft_main_8_hsdivout0_clk"),
 	DEV_CLK(4, 1, "hsdiv0_16fft_main_7_hsdivout0_clk"),
 	DEV_CLK(4, 2, "k3_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(29, 3, "cpsw2g_cpts_rclk_sel_out0"),
+	DEV_CLK(29, 4, "hsdiv4_16fft_main_3_hsdivout1_clk"),
+	DEV_CLK(29, 5, "postdiv3_16fft_main_0_hsdivout6_clk"),
+	DEV_CLK(29, 6, "board_0_mcu_cpts0_rft_clk_out"),
+	DEV_CLK(29, 7, "board_0_cpts0_rft_clk_out"),
+	DEV_CLK(29, 8, "board_0_mcu_ext_refclk0_out"),
+	DEV_CLK(29, 9, "board_0_ext_refclk1_out"),
+	DEV_CLK(29, 18, "hsdiv4_16fft_mcu_2_hsdivout1_clk"),
+	DEV_CLK(29, 19, "k3_pll_ctrl_wrap_wkup_0_chip_div1_clk_clk"),
+	DEV_CLK(29, 20, "hsdiv4_16fft_mcu_2_hsdivout0_clk"),
+	DEV_CLK(29, 21, "hsdiv4_16fft_mcu_2_hsdivout0_clk"),
+	DEV_CLK(29, 22, "board_0_mcu_rgmii1_rxc_out"),
+	DEV_CLK(29, 26, "board_0_mcu_rmii1_ref_clk_out"),
+	DEV_CLK(29, 28, "k3_pll_ctrl_wrap_wkup_0_chip_div1_clk_clk"),
+	DEV_CLK(29, 29, "hsdiv4_16fft_mcu_2_hsdivout0_clk"),
+	DEV_CLK(29, 30, "hsdiv4_16fft_mcu_2_hsdivout0_clk"),
+	DEV_CLK(29, 32, "hsdiv4_16fft_mcu_2_hsdivout0_clk"),
+	DEV_CLK(29, 33, "hsdiv4_16fft_mcu_2_hsdivout0_clk"),
 	DEV_CLK(43, 0, "postdiv3_16fft_main_0_hsdivout8_clk"),
 	DEV_CLK(43, 1, "hsdiv4_16fft_main_0_hsdivout3_clk"),
 	DEV_CLK(43, 2, "gluelogic_hfosc0_clkout"),
@@ -367,6 +417,7 @@ static const struct dev_clk soc_dev_clk_data[] = {
 	DEV_CLK(157, 187, "fss_mcu_0_ospi_1_ospi_oclk_clk"),
 	DEV_CLK(157, 194, "emmcsd4ss_main_0_emmcsdss_io_clk_o"),
 	DEV_CLK(157, 197, "j7am_ddr_ew_wrap_dv_wrap_main_0_ddrss_io_ck_n"),
+	DEV_CLK(157, 207, "cpsw_2guss_mcu_0_mdio_mdclk_o"),
 	DEV_CLK(157, 208, "j7am_ddr_ew_wrap_dv_wrap_main_1_ddrss_io_ck_n"),
 	DEV_CLK(157, 214, "fss_mcu_0_hyperbus1p0_0_hpb_out_clk_p"),
 	DEV_CLK(157, 221, "mcu_clkout_mux_out0"),
@@ -374,6 +425,7 @@ static const struct dev_clk soc_dev_clk_data[] = {
 	DEV_CLK(157, 223, "hsdiv4_16fft_mcu_2_hsdivout0_clk"),
 	DEV_CLK(157, 225, "emmc8ss_16ffc_main_0_emmcss_io_clk"),
 	DEV_CLK(157, 231, "fss_mcu_0_hyperbus1p0_0_hpb_out_clk_n"),
+	DEV_CLK(157, 244, "cpsw_2guss_mcu_0_rgmii1_txc_o"),
 	DEV_CLK(157, 352, "dpi0_ext_clksel_out0"),
 	DEV_CLK(180, 0, "gluelogic_hfosc0_clkout"),
 	DEV_CLK(180, 2, "k3_pll_ctrl_wrap_wkup_0_chip_div1_clk_clk"),
@@ -400,7 +452,7 @@ static const struct dev_clk soc_dev_clk_data[] = {
 
 const struct ti_k3_clk_platdata j721s2_clk_platdata = {
 	.clk_list = clk_list,
-	.clk_list_cnt = 105,
+	.clk_list_cnt = ARRAY_SIZE(clk_list),
 	.soc_dev_clk_data = soc_dev_clk_data,
-	.soc_dev_clk_data_cnt = 124,
+	.soc_dev_clk_data_cnt = ARRAY_SIZE(soc_dev_clk_data),
 };
arch/arm/mach-k3/r5/j721s2/dev-data.c +2 -1
index df70c5e5d7c..b78550707c5 100644
@@ -5,7 +5,7 @@
  * This file is auto generated. Please do not hand edit and report any issues
  * to Dave Gerlach <[email protected]>.
  *
- * Copyright (C) 2020-2021 Texas Instruments Incorporated - https://www.ti.com/
+ * Copyright (C) 2020-2025 Texas Instruments Incorporated - https://www.ti.com/
  */
 
 #include "k3-dev.h"
@@ -47,6 +47,7 @@ static struct ti_lpsc soc_lpsc_list[] = {
 };
 
 static struct ti_dev soc_dev_list[] = {
+	PSC_DEV(29, &soc_lpsc_list[0]),
 	PSC_DEV(35, &soc_lpsc_list[0]),
 	PSC_DEV(108, &soc_lpsc_list[0]),
 	PSC_DEV(109, &soc_lpsc_list[0]),
Signature · 1 line
2.34.1
#11 lore raw

PATCH v2 5/13 arm: mach-k3: j721s2_spl: Alias Ethernet boot to CPGMAC

In reply to Chintan Vankar

This is required to enable spl_net boot on AM68-SK.

---

Link to v1:
https://lore.kernel.org/r/[email protected]/

Changes from v1 to v2:
- No changes.

 arch/arm/mach-k3/include/mach/j721s2_spl.h | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-k3/include/mach/j721s2_spl.h +1 -0
index d8fae2c8b45..47a61281d94 100644
@@ -12,6 +12,7 @@
 #define BOOT_DEVICE_OSPI		0x01
 #define BOOT_DEVICE_QSPI		0x02
 #define BOOT_DEVICE_SPI			0x03
+#define BOOT_DEVICE_CPGMAC		0x04
 #define BOOT_DEVICE_ETHERNET		0x04
 #define BOOT_DEVICE_I2C			0x06
 #define BOOT_DEVICE_UART		0x07
Signature · 1 line
2.34.1
#12 lore raw

PATCH v2 6/13 configs: am68: Add configs for enabling Ethboot in R5SPL

In reply to Chintan Vankar

Add configs for enabling Ethernet boot in R5SPL, also disable not required configs to avoid memory limitation.

---

Link to v1:
https://lore.kernel.org/r/[email protected]/

Changes from v1 to v2:
- Updated commit message.

 configs/am68_sk_r5_ethboot_defconfig | 60 ++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)
 create mode 100644 configs/am68_sk_r5_ethboot_defconfig
configs/am68_sk_r5_ethboot_defconfig new file +60 -0
new file mode 100644
index 00000000000..d4d279cad3b
@@ -0,0 +1,60 @@
+#include <configs/am68_sk_r5_defconfig>
+
+CONFIG_ARM=y
+CONFIG_ARCH_K3=y
+CONFIG_SOC_K3_J721S2=y
+CONFIG_TARGET_J721S2_R5_EVM=y
+CONFIG_DEFAULT_DEVICE_TREE="k3-am68-sk-r5-base-board"
+CONFIG_SPL_BOARD_INIT=y
+CONFIG_SPL_DMA=y
+CONFIG_SPL_ETH=y
+CONFIG_SPL_NET=y
+CONFIG_SPL_NET_VCI_STRING="AM68 U-Boot R5 SPL"
+CONFIG_SPL_SYSCON=y
+CONFIG_TI_K3_NAVSS_UDMA=y
+CONFIG_TI_AM65_CPSW_NUSS=y
+CONFIG_SPI=n
+CONFIG_SPL_SPI=n
+CONFIG_DM_SPI=n
+CONFIG_SPL_DM_SPI=n
+CONFIG_SPI_MEM=n
+CONFIG_CMD_FAT=n
+CONFIG_FS_FAT=n
+CONFIG_SPL_FS_FAT=n
+CONFIG_MMC_SDHCI=n
+CONFIG_MTD=n
+CONFIG_CMD_FAT=n
+CONFIG_SPL_DM_SPI_FLASH=n
+CONFIG_SPL_HAS_CUSTOM_MALLOC_START=n
+CONFIG_HUSH_PARSER=n
+CONFIG_CMD_DFU=n
+CONFIG_CMD_GPT=n
+CONFIG_SPL_YMODEM_SUPPORT=n
+CONFIG_ARCH_FIXUP_FDT_MEMORY=n
+CONFIG_INPUT=n
+CONFIG_DFU=n
+CONFIG_SPL_DFU=n
+CONFIG_K3_EARLY_CONS=n
+CONFIG_K3_QOS=n
+CONFIG_USE_BOOTCOMMAND=n
+CONFIG_SPL_MTD=n
+CONFIG_SPL_NAND_SPI_SUPPORT=n
+CONFIG_USB=n
+CONFIG_FS_LOADER=n
+CONFIG_SPL_FS_LOADER=n
+CONFIG_PINCTRL_GENERIC=n
+CONFIG_PINMUX=n
+CONFIG_SPL_PINCTRL_GENERIC=n
+CONFIG_SPL_PINMUX=n
+CONFIG_DM_REGULATOR=n
+CONFIG_TI_SCI_POWER_DOMAIN=n
+CONFIG_SYSRESET=n
+CONFIG_OF_UPSTREAM=n
+CONFIG_SPL_SPI_LOAD=n
+CONFIG_SPL_DM_SPI=n
+CONFIG_NOR_SUPPORT=n
+CONFIG_SPL_NOR_SUPPORT=n
+CONFIG_SPL_DM_SPI=n
+CONFIG_SYS_MALLOC_CLEAR_ON_INIT=n
+CONFIG_SPL_SYS_MALLOC_CLEAR_ON_INIT=n
+CONFIG_BOOTDEV_ETH=n
Signature · 1 line
2.34.1
#13 lore raw

Re: [PATCH v2 06/13] configs: am68: Add configs for enabling Ethboot in R5SPL

Quoted 25 lines · Chintan Vankar

Add configs for enabling Ethernet boot in R5SPL, also disable not required configs to avoid memory limitation.

---

Link to v1:
https://lore.kernel.org/r/[email protected]/

Changes from v1 to v2:
- Updated commit message.

  configs/am68_sk_r5_ethboot_defconfig | 60 ++++++++++++++++++++++++++++
  1 file changed, 60 insertions(+)

create mode 100644 configs/am68_sk_r5_ethboot_defconfig

configs/am68_sk_r5_ethboot_defconfig new file +3 -0
new file mode 100644
index 00000000000..d4d279cad3b
@@ -0,0 +1,60 @@
+#include <configs/am68_sk_r5_defconfig>
+
+CONFIG_ARM=y

configs/am68_sk_r5_ethboot_defconfig line 13

Quoted 10 lines
configs/am68_sk_r5_ethboot_defconfig new file +10 -0
+CONFIG_ARCH_K3=y
+CONFIG_SOC_K3_J721S2=y
+CONFIG_TARGET_J721S2_R5_EVM=y
+CONFIG_DEFAULT_DEVICE_TREE="k3-am68-sk-r5-base-board"
+CONFIG_SPL_BOARD_INIT=y
+CONFIG_SPL_DMA=y
+CONFIG_SPL_ETH=y
+CONFIG_SPL_NET=y
+CONFIG_SPL_NET_VCI_STRING="AM68 U-Boot R5 SPL"
+CONFIG_SPL_SYSCON=y

Assuming the above CONFIG is needed by one of the below two drivers? Could the above be selected by one of them in their Kconfig instead of in each defconfig?

configs/am68_sk_r5_ethboot_defconfig line 21

Quoted 8 lines
configs/am68_sk_r5_ethboot_defconfig new file +8 -0
+CONFIG_TI_K3_NAVSS_UDMA=y
+CONFIG_TI_AM65_CPSW_NUSS=y
+CONFIG_SPI=n
+CONFIG_SPL_SPI=n
+CONFIG_DM_SPI=n
+CONFIG_SPL_DM_SPI=n
+CONFIG_SPI_MEM=n
+CONFIG_CMD_FAT=n

The *_r5_defconfigs build both SPL and U-Boot proper, but we only use SPL. Changing options that only affect U-Boot and not SPL shouldn't be needed.

Andrew

Quoted 39 lines
configs/am68_sk_r5_ethboot_defconfig new file +39 -0
+CONFIG_FS_FAT=n
+CONFIG_SPL_FS_FAT=n
+CONFIG_MMC_SDHCI=n
+CONFIG_MTD=n
+CONFIG_CMD_FAT=n
+CONFIG_SPL_DM_SPI_FLASH=n
+CONFIG_SPL_HAS_CUSTOM_MALLOC_START=n
+CONFIG_HUSH_PARSER=n
+CONFIG_CMD_DFU=n
+CONFIG_CMD_GPT=n
+CONFIG_SPL_YMODEM_SUPPORT=n
+CONFIG_ARCH_FIXUP_FDT_MEMORY=n
+CONFIG_INPUT=n
+CONFIG_DFU=n
+CONFIG_SPL_DFU=n
+CONFIG_K3_EARLY_CONS=n
+CONFIG_K3_QOS=n
+CONFIG_USE_BOOTCOMMAND=n
+CONFIG_SPL_MTD=n
+CONFIG_SPL_NAND_SPI_SUPPORT=n
+CONFIG_USB=n
+CONFIG_FS_LOADER=n
+CONFIG_SPL_FS_LOADER=n
+CONFIG_PINCTRL_GENERIC=n
+CONFIG_PINMUX=n
+CONFIG_SPL_PINCTRL_GENERIC=n
+CONFIG_SPL_PINMUX=n
+CONFIG_DM_REGULATOR=n
+CONFIG_TI_SCI_POWER_DOMAIN=n
+CONFIG_SYSRESET=n
+CONFIG_OF_UPSTREAM=n
+CONFIG_SPL_SPI_LOAD=n
+CONFIG_SPL_DM_SPI=n
+CONFIG_NOR_SUPPORT=n
+CONFIG_SPL_NOR_SUPPORT=n
+CONFIG_SPL_DM_SPI=n
+CONFIG_SYS_MALLOC_CLEAR_ON_INIT=n
+CONFIG_SPL_SYS_MALLOC_CLEAR_ON_INIT=n
+CONFIG_BOOTDEV_ETH=n
#14 lore raw

PATCH v2 7/13 configs: am68: Enable configs required for Ethernet boot

In reply to Chintan Vankar

Enable config options needed to support Ethernet boot on AM68-SK.

---

Link to v1:
https://lore.kernel.org/r/[email protected]/

Changes from v1 to v2:
- No changes.

 configs/am68_sk_a72_ethboot_defconfig | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 configs/am68_sk_a72_ethboot_defconfig
configs/am68_sk_a72_ethboot_defconfig new file +15 -0
new file mode 100644
index 00000000000..a6fe4c238ca
@@ -0,0 +1,15 @@
+#include <configs/am68_sk_a72_defconfig>
+
+CONFIG_ARM=y
+CONFIG_ARCH_K3=y
+CONFIG_SOC_K3_J721S2=y
+CONFIG_TARGET_J721S2_A72_EVM=y
+CONFIG_DEFAULT_DEVICE_TREE="ti/k3-am68-sk-base-board"
+CONFIG_SPL_STACK_R_ADDR=0x82000000
+CONFIG_SPL_DRIVERS_MISC=y
+CONFIG_SPL_BOARD_INIT=y
+CONFIG_SPL_DMA=y
+CONFIG_SPL_ETH=y
+CONFIG_SPL_NET=y
+CONFIG_SPL_NET_VCI_STRING="AM68 U-Boot A72 SPL"
+CONFIG_SPL_SYSCON=y
Signature · 1 line
2.34.1
#15 lore raw

PATCH v2 8/13 arm: dts: k3-am68-sk-base-board-u-boot: Add bootph-all property to necessary nodes

In reply to Chintan Vankar

Add "bootph-all" property to necessary nodes required for Ethernet boot starting from R5 SPL stage.

---

Link to v1:
https://lore.kernel.org/r/[email protected]/

Changes from v1 to v2:
- No changes.

 .../arm/dts/k3-am68-sk-base-board-u-boot.dtsi | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi +28 -0
index 4ca05f32f0b..67db35fd3e3 100644
@@ -41,6 +41,34 @@
 	bootph-all;
 };
 
+&cpsw_mac_syscon {
+	bootph-all;
+};
+
+&cpsw_port1 {
+	bootph-all;
+};
+
+&mcu_cpsw {
+	bootph-all;
+};
+
+&mcu_cpsw_pins_default {
+	bootph-all;
+};
+
+&mcu_mdio_pins_default {
+	bootph-all;
+};
+
+&phy0 {
+	bootph-all;
+};
+
+&phy_gmii_sel {
+	bootph-all;
+};
+
 &secure_proxy_main {
 	bootph-all;
 };
Signature · 1 line
2.34.1
Reviewed-by on v2 8/13
#16 lore raw

Re: [PATCH v2 08/13] arm: dts: k3-am68-sk-base-board-u-boot: Add bootph-all property to necessary nodes

Quoted 4 lines · Chintan Vankar

Add "bootph-all" property to necessary nodes required for Ethernet boot starting from R5 SPL stage.

Quoted 50 lines

---

Link to v1:
https://lore.kernel.org/r/[email protected]/

Changes from v1 to v2:
- No changes.

 .../arm/dts/k3-am68-sk-base-board-u-boot.dtsi | 28 +++++++++++++++++++

 1 file changed, 28 insertions(+)
arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi +0 -0
index 4ca05f32f0b..67db35fd3e3 100644
@@ -41,6 +41,34 @@
  	bootph-all;
  };


+&cpsw_mac_syscon {

arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi +27 -0
+	bootph-all;
+};
+
+&cpsw_port1 {
+	bootph-all;
+};
+
+&mcu_cpsw {
+	bootph-all;
+};
+
+&mcu_cpsw_pins_default {
+	bootph-all;
+};
+
+&mcu_mdio_pins_default {
+	bootph-all;
+};
+
+&phy0 {
+	bootph-all;
+};
+
+&phy_gmii_sel {
+	bootph-all;
+};
+

 &secure_proxy_main {
  bootph-all;
 };

Signature · 3 lines
Alexander Sverdlin
Siemens AG
www.siemens.com
#17 lore raw

PATCH v2 9/13 arm: mach-k3: am62p: Update SoC auto-gen data to enable CPSW boot

In reply to Chintan Vankar

From: Andreas Dannenberg <[email protected]>

Update dev-data and clk-data for AM62p to enable Ethernet boot using CPSW.

---

Link to v1:
https://lore.kernel.org/r/[email protected]/

Changes from v1 to v2:
- Updated commit message.

 arch/arm/mach-k3/r5/am62px/clk-data.c | 44 +++++++++++++++++++++++++--
 arch/arm/mach-k3/r5/am62px/dev-data.c | 24 ++++++++-------
 2 files changed, 54 insertions(+), 14 deletions(-)
arch/arm/mach-k3/r5/am62px/clk-data.c +41 -3
index 4b9892fe051..24e912f2e25 100644
@@ -5,7 +5,7 @@
  * This file is auto generated. Please do not hand edit and report any issues
  * to Bryan Brattlof <[email protected]>.
  *
- * Copyright (C) 2020-2023 Texas Instruments Incorporated - https://www.ti.com/
+ * Copyright (C) 2020-2025 Texas Instruments Incorporated - https://www.ti.com/
  */
 
 #include <linux/clk-provider.h>
@@ -62,6 +62,17 @@ static const char * const clkout0_ctrl_out0_parents[] = {
 	"hsdiv4_16fft_main_2_hsdivout1_clk",
 };
 
+static const char * const main_cp_gemac_cpts_clk_sel_out0_parents[] = {
+	"postdiv4_16ff_main_2_hsdivout5_clk",
+	"postdiv4_16ff_main_0_hsdivout6_clk",
+	"board_0_cp_gemac_cpts0_rft_clk_out",
+	NULL,
+	"board_0_mcu_ext_refclk0_out",
+	"board_0_ext_refclk1_out",
+	NULL,
+	"sam62_pll_ctrl_wrap_main_0_chip_div1_clk_clk",
+};
+
 static const char * const main_emmcsd0_refclk_sel_out0_parents[] = {
 	"postdiv4_16ff_main_0_hsdivout5_clk",
 	"hsdiv4_16fft_main_2_hsdivout2_clk",
@@ -99,8 +110,8 @@ static const char * const main_timerclkn_sel_out0_parents[] = {
 	"board_0_cp_gemac_cpts0_rft_clk_out",
 	"hsdiv4_16fft_main_1_hsdivout3_clk",
 	"postdiv4_16ff_main_2_hsdivout6_clk",
-	NULL,
-	NULL,
+	"cpsw_3guss_am67_main_0_cpts_genf0",
+	"cpsw_3guss_am67_main_0_cpts_genf1",
 	NULL,
 	NULL,
 	NULL,
@@ -148,7 +159,12 @@ static const struct clk_data clk_list[] = {
 	CLK_FIXED_RATE("board_0_mmc1_clk_out", 0, 0),
 	CLK_FIXED_RATE("board_0_ospi0_dqs_out", 0, 0),
 	CLK_FIXED_RATE("board_0_ospi0_lbclko_out", 0, 0),
+	CLK_FIXED_RATE("board_0_rmii1_ref_clk_out", 0, 0),
+	CLK_FIXED_RATE("board_0_rmii2_ref_clk_out", 0, 0),
 	CLK_FIXED_RATE("board_0_tck_out", 0, 0),
+	CLK_FIXED_RATE("cpsw_3guss_am67_main_0_cpts_genf0", 0, 0),
+	CLK_FIXED_RATE("cpsw_3guss_am67_main_0_cpts_genf1", 0, 0),
+	CLK_FIXED_RATE("cpsw_3guss_am67_main_0_mdio_mdclk_o", 0, 0),
 	CLK_FIXED_RATE("dmtimer_dmc1ms_main_0_timer_pwm", 0, 0),
 	CLK_FIXED_RATE("emmcsd4ss_main_0_emmcsdss_io_clk_o", 0, 0),
 	CLK_FIXED_RATE("fss_ul_main_0_ospi_0_ospi_oclk_clk", 0, 0),
@@ -200,6 +216,7 @@ static const struct clk_data clk_list[] = {
 	CLK_MUX_PLLCTRL("sam62_pll_ctrl_wrap_mcu_0_sysclkout_clk", sam62_pll_ctrl_wrap_mcu_0_sysclkout_clk_parents, 2, 0x4020000, 0),
 	CLK_DIV("sam62_pll_ctrl_wrap_mcu_0_chip_div1_clk_clk", "sam62_pll_ctrl_wrap_mcu_0_sysclkout_clk", 0x4020118, 0, 5, 0, 0),
 	CLK_MUX("clkout0_ctrl_out0", clkout0_ctrl_out0_parents, 2, 0x108010, 0, 1, 0),
+	CLK_MUX("main_cp_gemac_cpts_clk_sel_out0", main_cp_gemac_cpts_clk_sel_out0_parents, 8, 0x108140, 0, 3, 0),
 	CLK_MUX("main_emmcsd0_refclk_sel_out0", main_emmcsd0_refclk_sel_out0_parents, 2, 0x108160, 0, 1, 0),
 	CLK_MUX("main_emmcsd1_refclk_sel_out0", main_emmcsd1_refclk_sel_out0_parents, 2, 0x108168, 0, 1, 0),
 	CLK_MUX("main_gtcclk_sel_out0", main_gtcclk_sel_out0_parents, 8, 0x43008030, 0, 3, 0),
@@ -215,6 +232,24 @@ static const struct clk_data clk_list[] = {
 };
 
 static const struct dev_clk soc_dev_clk_data[] = {
+	DEV_CLK(13, 0, "sam62_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(13, 3, "main_cp_gemac_cpts_clk_sel_out0"),
+	DEV_CLK(13, 4, "postdiv4_16ff_main_2_hsdivout5_clk"),
+	DEV_CLK(13, 5, "postdiv4_16ff_main_0_hsdivout6_clk"),
+	DEV_CLK(13, 6, "board_0_cp_gemac_cpts0_rft_clk_out"),
+	DEV_CLK(13, 8, "board_0_mcu_ext_refclk0_out"),
+	DEV_CLK(13, 9, "board_0_ext_refclk1_out"),
+	DEV_CLK(13, 11, "sam62_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
+	DEV_CLK(13, 13, "hsdiv4_16fft_main_2_hsdivout1_clk"),
+	DEV_CLK(13, 14, "hsdiv4_16fft_main_2_hsdivout1_clk"),
+	DEV_CLK(13, 15, "hsdiv4_16fft_main_2_hsdivout1_clk"),
+	DEV_CLK(13, 16, "hsdiv4_16fft_main_2_hsdivout1_clk"),
+	DEV_CLK(13, 17, "hsdiv4_16fft_main_2_hsdivout1_clk"),
+	DEV_CLK(13, 19, "hsdiv4_16fft_main_2_hsdivout1_clk"),
+	DEV_CLK(13, 20, "hsdiv4_16fft_main_2_hsdivout1_clk"),
+	DEV_CLK(13, 21, "hsdiv4_16fft_main_2_hsdivout1_clk"),
+	DEV_CLK(13, 22, "board_0_rmii1_ref_clk_out"),
+	DEV_CLK(13, 23, "board_0_rmii2_ref_clk_out"),
 	DEV_CLK(16, 0, "hsdiv4_16fft_main_0_hsdivout1_clk"),
 	DEV_CLK(16, 1, "hsdiv4_16fft_main_0_hsdivout2_clk"),
 	DEV_CLK(16, 2, "hsdiv4_16fft_main_0_hsdivout3_clk"),
@@ -239,6 +274,8 @@ static const struct dev_clk soc_dev_clk_data[] = {
 	DEV_CLK(36, 10, "board_0_cp_gemac_cpts0_rft_clk_out"),
 	DEV_CLK(36, 11, "hsdiv4_16fft_main_1_hsdivout3_clk"),
 	DEV_CLK(36, 12, "postdiv4_16ff_main_2_hsdivout6_clk"),
+	DEV_CLK(36, 13, "cpsw_3guss_am67_main_0_cpts_genf0"),
+	DEV_CLK(36, 14, "cpsw_3guss_am67_main_0_cpts_genf1"),
 	DEV_CLK(57, 1, "sam62_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
 	DEV_CLK(57, 2, "main_emmcsd0_refclk_sel_out0"),
 	DEV_CLK(57, 3, "postdiv4_16ff_main_0_hsdivout5_clk"),
@@ -285,6 +322,7 @@ static const struct dev_clk soc_dev_clk_data[] = {
 	DEV_CLK(157, 40, "sam62_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
 	DEV_CLK(157, 54, "mshsi2c_main_0_porscl"),
 	DEV_CLK(157, 91, "sam62_pll_ctrl_wrap_mcu_0_sysclkout_clk"),
+	DEV_CLK(157, 96, "cpsw_3guss_am67_main_0_mdio_mdclk_o"),
 	DEV_CLK(157, 101, "emmcsd4ss_main_0_emmcsdss_io_clk_o"),
 	DEV_CLK(157, 103, "emmcsd4ss_main_0_emmcsdss_io_clk_o"),
 	DEV_CLK(157, 143, "fss_ul_main_0_ospi_0_ospi_oclk_clk"),
arch/arm/mach-k3/r5/am62px/dev-data.c +13 -11
index 3cc211ea202..63e6beb4d57 100644
@@ -5,7 +5,7 @@
  * This file is auto generated. Please do not hand edit and report any issues
  * to Bryan Brattlof <[email protected]>.
  *
- * Copyright (C) 2020-2023 Texas Instruments Incorporated - https://www.ti.com/
+ * Copyright (C) 2020-2025 Texas Instruments Incorporated - https://www.ti.com/
  */
 
 #include "k3-dev.h"
@@ -31,11 +31,12 @@ static struct ti_lpsc soc_lpsc_list[] = {
 	[6] = PSC_LPSC(24, &soc_psc_list[0], &soc_pd_list[0], &soc_lpsc_list[8]),
 	[7] = PSC_LPSC(28, &soc_psc_list[0], &soc_pd_list[0], &soc_lpsc_list[8]),
 	[8] = PSC_LPSC(34, &soc_psc_list[0], &soc_pd_list[0], &soc_lpsc_list[8]),
-	[9] = PSC_LPSC(53, &soc_psc_list[0], &soc_pd_list[1], &soc_lpsc_list[8]),
-	[10] = PSC_LPSC(56, &soc_psc_list[0], &soc_pd_list[2], &soc_lpsc_list[9]),
-	[11] = PSC_LPSC(72, &soc_psc_list[0], &soc_pd_list[3], &soc_lpsc_list[8]),
-	[12] = PSC_LPSC(73, &soc_psc_list[0], &soc_pd_list[3], &soc_lpsc_list[11]),
-	[13] = PSC_LPSC(74, &soc_psc_list[0], &soc_pd_list[3], &soc_lpsc_list[12]),
+	[9] = PSC_LPSC(42, &soc_psc_list[0], &soc_pd_list[0], &soc_lpsc_list[8]),
+	[10] = PSC_LPSC(53, &soc_psc_list[0], &soc_pd_list[1], &soc_lpsc_list[8]),
+	[11] = PSC_LPSC(56, &soc_psc_list[0], &soc_pd_list[2], &soc_lpsc_list[10]),
+	[12] = PSC_LPSC(72, &soc_psc_list[0], &soc_pd_list[3], &soc_lpsc_list[8]),
+	[13] = PSC_LPSC(73, &soc_psc_list[0], &soc_pd_list[3], &soc_lpsc_list[12]),
+	[14] = PSC_LPSC(74, &soc_psc_list[0], &soc_pd_list[3], &soc_lpsc_list[13]),
 };
 
 static struct ti_dev soc_dev_list[] = {
@@ -52,11 +53,12 @@ static struct ti_dev soc_dev_list[] = {
 	PSC_DEV(36, &soc_lpsc_list[8]),
 	PSC_DEV(102, &soc_lpsc_list[8]),
 	PSC_DEV(146, &soc_lpsc_list[8]),
-	PSC_DEV(166, &soc_lpsc_list[9]),
-	PSC_DEV(135, &soc_lpsc_list[10]),
-	PSC_DEV(170, &soc_lpsc_list[11]),
-	PSC_DEV(177, &soc_lpsc_list[12]),
-	PSC_DEV(55, &soc_lpsc_list[13]),
+	PSC_DEV(13, &soc_lpsc_list[9]),
+	PSC_DEV(166, &soc_lpsc_list[10]),
+	PSC_DEV(135, &soc_lpsc_list[11]),
+	PSC_DEV(170, &soc_lpsc_list[12]),
+	PSC_DEV(177, &soc_lpsc_list[13]),
+	PSC_DEV(55, &soc_lpsc_list[14]),
 };
 
 const struct ti_k3_pd_platdata am62px_pd_platdata = {
Signature · 1 line
2.34.1
#18 lore raw

PATCH v2 10/13 board: ti: am62px: evm: Enable cache for AM62p

In reply to Chintan Vankar

From: Andreas Dannenberg <[email protected]>

Enable cache for AM62p to optimize performance of CPU to access data from memory.

---

Link to v1:
https://lore.kernel.org/r/[email protected]/

Changes from v1 to v2:
- Updated commit message.

 board/ti/am62px/evm.c | 8 ++++++++
 1 file changed, 8 insertions(+)
board/ti/am62px/evm.c +8 -0
index 75359fa1614..0be9817064b 100644
@@ -9,6 +9,7 @@
 #include <efi_loader.h>
 #include <asm/arch/hardware.h>
 #include <asm/io.h>
+#include <cpu_func.h>
 #include <dm/uclass.h>
 #include <env.h>
 #include <fdt_support.h>
@@ -54,6 +55,13 @@ int board_init(void)
 	return 0;
 }
 
+#if IS_ENABLED(CONFIG_SPL_BUILD)
+void spl_board_init(void)
+{
+	enable_caches();
+}
+#endif
+
 #if defined(CONFIG_XPL_BUILD)
 void spl_perform_fixups(struct spl_image_info *spl_image)
 {
Signature · 1 line
2.34.1
Reviewed-by on v2 10/13
#19 lore raw

Re: [PATCH v2 10/13] board: ti: am62px: evm: Enable cache for AM62p

Quoted 7 lines · Chintan Vankar

From: Andreas Dannenberg <[email protected]>

Enable cache for AM62p to optimize performance of CPU to access data from memory.

Quoted 37 lines

---

Link to v1:
https://lore.kernel.org/r/[email protected]/

Changes from v1 to v2:
- Updated commit message.

 board/ti/am62px/evm.c | 8 ++++++++

 1 file changed, 8 insertions(+)
board/ti/am62px/evm.c +1 -0
index 75359fa1614..0be9817064b 100644
@@ -9,6 +9,7 @@
  #include <efi_loader.h>
  #include <asm/arch/hardware.h>
  #include <asm/io.h>
+#include <cpu_func.h>
  #include <dm/uclass.h>
  #include <env.h>
  #include <fdt_support.h>
@@ -54,6 +55,13 @@ int board_init(void)
  	return 0;
  }

board/ti/am62px/evm.c +7 -0
+#if IS_ENABLED(CONFIG_SPL_BUILD)
+void spl_board_init(void)
+{
+	enable_caches();
+}
+#endif
+

 #if defined(CONFIG_XPL_BUILD)
 void spl_perform_fixups(struct spl_image_info *spl_image) {

Signature · 3 lines
Alexander Sverdlin
Siemens AG
www.siemens.com
#20 lore raw

PATCH v2 11/13 configs: am62p: Add configs for enabling ETHBOOT in R5SPL

In reply to Chintan Vankar

From: Andreas Dannenberg <[email protected]>

Add configs for enabling ETHBOOT in R5SPL, also disable not required configs to avoid memory limitation.

---

Link to v1:
https://lore.kernel.org/r/[email protected]/

Changes from v1 to v2:
- Updated commit message.

 configs/am62px_evm_r5_ethboot_defconfig | 30 +++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 configs/am62px_evm_r5_ethboot_defconfig
configs/am62px_evm_r5_ethboot_defconfig new file +30 -0
new file mode 100644
index 00000000000..3513d6436f1
@@ -0,0 +1,30 @@
+#include<configs/am62px_evm_r5_defconfig>
+
+CONFIG_ARM=y
+CONFIG_ARCH_K3=y
+CONFIG_SOC_K3_AM62P5=y
+CONFIG_TARGET_AM62P5_R5_EVM=y
+CONFIG_DEFAULT_DEVICE_TREE="k3-am62p5-r5-sk"
+CONFIG_NET=y
+CONFIG_SPL_BOARD_INIT=y
+CONFIG_SPL_DMA=y
+CONFIG_SPL_ENV_SUPPORT=y
+CONFIG_SPL_ETH=y
+CONFIG_SPL_I2C=y
+CONFIG_SPL_NET=y
+CONFIG_SPL_NET_VCI_STRING="AM62PX U-Boot R5 SPL"
+CONFIG_SPL_DRIVERS_MISC=y
+CONFIG_SPL_SYSCON=y
+CONFIG_TI_AM65_CPSW_NUSS=y
+CONFIG_TI_K3_NAVSS_UDMA=y
+CONFIG_SPL_SPI=n
+CONFIG_SPL_MMC=n
+CONFIG_SPL_MTD_LOAD=n
+CONFIG_SPL_NAND_SPI_SUPPORT=n
+CONFIG_SPL_DM_DEVICE_REMOVE=n
+CONFIG_DM_MTD=n
+CONFIG_MTD_SPI_NAND=n
+CONFIG_DM_SPI_FLASH=n
+CONFIG_SPI=n
+CONFIG_DM_SPI=n
+CONFIG_CADENCE_QSPI=n
Signature · 1 line
2.34.1
#21 lore raw

PATCH v2 12/13 configs: am62p: Enable configs required for Ethboot

In reply to Chintan Vankar

Enable config options needed to support Ethernet boot on AM62p SK.

---

Link to v1:
https://lore.kernel.org/r/[email protected]/

Changes from v1 to v2:
- Removed commented config option which was not required.

 configs/am62px_evm_a53_ethboot_defconfig | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 configs/am62px_evm_a53_ethboot_defconfig
configs/am62px_evm_a53_ethboot_defconfig new file +14 -0
new file mode 100644
index 00000000000..0bdb4501c34
@@ -0,0 +1,14 @@
+#include <configs/am62px_evm_a53_defconfig>
+
+CONFIG_ARM=y
+CONFIG_ARCH_K3=y
+CONFIG_SOC_K3_AM62P5=y
+CONFIG_TARGET_AM62P5_A53_EVM=y
+CONFIG_DEFAULT_DEVICE_TREE="ti/k3-am62p5-sk"
+CONFIG_SPL_STACK_R_ADDR=0x82000000
+CONFIG_SPL_DRIVERS_MISC=y
+CONFIG_SPL_DMA=y
+CONFIG_SPL_ETH=y
+CONFIG_SPL_NET=y
+CONFIG_SPL_NET_VCI_STRING="AM62PX U-Boot A53 SPL"
+CONFIG_SPL_SYSCON=y
Signature · 1 line
2.34.1
#22 lore raw

PATCH v2 13/13 arch: arm: dts: k3-am62p5-sk-u-boot: Add bootph-all property to necessary nodes

In reply to Chintan Vankar

Add "bootph-all" property to necessary nodes required for Ethernet boot starting from R5 SPL stage.

---

Link to v1:
https://lore.kernel.org/r/[email protected]/

Changes from v1 to v2:
- No changes.

The changed made by this patch can be dropped in the future when the DT-sync is performed with upstream linux.

Linux patch for the same is posted at:
https://lore.kernel.org/r/[email protected]/

 arch/arm/dts/k3-am62p5-sk-u-boot.dtsi | 32 +++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
arch/arm/dts/k3-am62p5-sk-u-boot.dtsi +32 -0
index cf087c6e343..be62cac7694 100644
@@ -16,3 +16,35 @@
 &dmsc {
 	bootph-pre-ram;
 };
+
+&cpsw_mac_syscon {
+	bootph-all;
+};
+
+&cpsw_port1 {
+	bootph-all;
+};
+
+&main_pktdma {
+	bootph-all;
+};
+
+&main_rgmii1_pins_default {
+	bootph-all;
+};
+
+&main_mdio1_pins_default {
+	bootph-all;
+};
+
+&cpsw3g_phy0 {
+	bootph-all;
+};
+
+&cpsw3g_mdio {
+	bootph-all;
+};
+
+&phy_gmii_sel {
+	bootph-all;
+};
Signature · 1 line
2.34.1
Reviewed-by on v2 13/13
#23 lore raw

Re: [PATCH v2 13/13] arch: arm: dts: k3-am62p5-sk-u-boot: Add bootph-all property to necessary nodes

Quoted 4 lines · Chintan Vankar

Add "bootph-all" property to necessary nodes required for Ethernet boot starting from R5 SPL stage.

Quoted 57 lines

---

Link to v1:
https://lore.kernel.org/r/[email protected]/

Changes from v1 to v2:
- No changes.

The changed made by this patch can be dropped in the future when the DT-sync is performed with upstream linux.

Linux patch for the same is posted at:
https://lore.kernel.org/r/[email protected]/

 arch/arm/dts/k3-am62p5-sk-u-boot.dtsi | 32 +++++++++++++++++++++++++++

 1 file changed, 32 insertions(+)
arch/arm/dts/k3-am62p5-sk-u-boot.dtsi +32 -0
index cf087c6e343..be62cac7694 100644
@@ -16,3 +16,35 @@
  &dmsc {
  	bootph-pre-ram;
  };
+
+&cpsw_mac_syscon {
+	bootph-all;
+};
+
+&cpsw_port1 {
+	bootph-all;
+};
+
+&main_pktdma {
+	bootph-all;
+};
+
+&main_rgmii1_pins_default {
+	bootph-all;
+};
+
+&main_mdio1_pins_default {
+	bootph-all;
+};
+
+&cpsw3g_phy0 {
+	bootph-all;
+};
+
+&cpsw3g_mdio {
+	bootph-all;
+};
+
+&phy_gmii_sel {
+	bootph-all;
+};
Signature · 3 lines
Alexander Sverdlin
Siemens AG
www.siemens.com