Skip to contentSkip to conversation

Add support for Ethernet boot on AM62p-SK and AM68-SK

PATCH Superseded Chintan Vankar 6 participants 36 messages Jan 7, 2025 – Mar 20, 2025

Subsystems (3)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

cover Add support for Ethernet boot on AM62p-SK and AM68-SK

This series enables Ethernet boot on AM62p-SK and AM68-SK.

This series is based on commit '6d41f0a39d6423c8e57e92ebbe9f8c0333a63f72' of origin/master branch of U-Boot.

Logs:
AM62p-SK Ethernet boot:
https://gist.github.com/chintan013/cd622d329b0a5b894808daff3191bb9f
AM68-SK Etherent boot:
https://gist.github.com/chintan013/39e67a173327bcbdae1724c35341b445

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
arm: mach-k3: j721s2: Update SoC auto-gen data to enable Ethernet boot
arm: mach-k3: j721s2_spl: Alias Ethernet boot to CPGMAC
arm: mach-k3: j721s2_init: Probe AM65 CPSW NUSS for R5/A72 SPL
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
arm: mach-k3: am62p5_init: Probe AM65 CPSW NUSS for R5/A53 SPL
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/am62px/am62p5_init.c         | 10 +++
 arch/arm/mach-k3/include/mach/j721s2_spl.h    |  1 +
 arch/arm/mach-k3/j721s2/j721s2_init.c         | 10 +++
 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      | 17 ++++
 configs/am62px_evm_r5_ethboot_defconfig       | 35 ++++++++
 configs/am68_sk_a72_ethboot_defconfig         | 18 +++++
 configs/am68_sk_r5_ethboot_defconfig          | 80 +++++++++++++++++++
 net/tftp.c                                    |  6 +-
 15 files changed, 353 insertions(+), 21 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 1/13 net: tftp: Increase TFTP pkt string length to include null character

'sprintf()' function defined in 'tiny-printf.c' is returning length of the string excluding null character. Fix this by increasing TFTP pkt length by 1 to avoid TFTP error of request being not-null terminated while requesting length of packet.

---
 net/tftp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
net/tftp.c +3 -3
index 704b20b4ff8..db1d4aacb0e 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 01/13] net: tftp: Increase TFTP pkt string length to include null character

Quoted 6 lines · Chintan Vankar

'sprintf()' function defined in 'tiny-printf.c' is returning length of the string excluding null character. Fix this by increasing TFTP pkt length by 1 to avoid TFTP error of request being not-null terminated while requesting length of packet.

Erm, if tiny-printf's sprintf doesn't work like lib/vsprintf.c's sprintf in this regard, we should be fixing tiny-printf.

Signature · 1 line
Tom
#3 lore raw

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

Quoted 7 lines · Tom Rini
Quoted 5 lines · Chintan Vankar

'sprintf()' function defined in 'tiny-printf.c' is returning length of the string excluding null character. Fix this by increasing TFTP pkt length by 1 to avoid TFTP error of request being not-null terminated while requesting length of packet.

Quoted 5 lines
Quoted 1 line

Erm, if tiny-printf's sprintf doesn't work like lib/vsprintf.c's sprintf in this regard, we should be fixing tiny-printf.

Hello Tom, I have observed that 'sprintf()' defined in lib/vsprintf.c at here:
https://github.com/torvalds/linux/blob/master/lib/vsprintf.c#L3035
also behaves the same way, that returns length of the string excluding null character.

#4 lore raw

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

Quoted 16 lines · Chintan
Quoted 7 lines · Tom Rini
Quoted 5 lines · Chintan Vankar

'sprintf()' function defined in 'tiny-printf.c' is returning length of the string excluding null character. Fix this by increasing TFTP pkt length by 1 to avoid TFTP error of request being not-null terminated while requesting length of packet.

Quoted 5 lines
Quoted 1 line

Erm, if tiny-printf's sprintf doesn't work like lib/vsprintf.c's sprintf in this regard, we should be fixing tiny-printf.

Quoted 5 lines

Hello Tom, I have observed that 'sprintf()' defined in lib/vsprintf.c at here:
https://github.com/torvalds/linux/blob/master/lib/vsprintf.c#L3035
also behaves the same way, that returns length of the string excluding null character.

Then please rework the commit message, thanks.

Signature · 1 line
Tom
Tested-by
#5 lore raw

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

Am 09.01.25 um 23:27 schrieb Tom Rini:

Quoted 12 lines · Chintan
Quoted 11 lines · Tom Rini
Quoted 8 lines · Chintan Vankar
Quoted 7 lines

'sprintf()' function defined in 'tiny-printf.c' is returning length of the string excluding null character. Fix this by increasing TFTP pkt length by 1 to avoid TFTP error of request being not-null terminated while requesting length of packet.

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

Erm, if tiny-printf's sprintf doesn't work like lib/vsprintf.c's sprintf in this regard, we should be fixing tiny-printf.

Quoted 7 lines
Quoted 5 lines

Hello Tom, I have observed that 'sprintf()' defined in lib/vsprintf.c at here:
https://github.com/torvalds/linux/blob/master/lib/vsprintf.c#L3035
also behaves the same way, that returns length of the string excluding null character.

Then please rework the commit message, thanks.

Any updates on this patch?

I can see the exact same error when using ethernet boot on phycore-am62x:

Filename 'phyboard-lyra-am62xx-3/tispl.bin'.
Load address: 0x82000000
Loading: *
TFTP error: 'Request not null-terminated' (4)

#6 lore raw

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

Hello Wadim,

Quoted 7 lines · Wadim Egorov

Am 09.01.25 um 23:27 schrieb Tom Rini:

Quoted 6 lines · Chintan
Quoted 5 lines · Tom Rini
Quoted 2 lines · Chintan Vankar
Quoted 9 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

'sprintf()' function defined in 'tiny-printf.c' is returning length of the string excluding null character. Fix this by increasing TFTP pkt length by 1 to avoid TFTP error of request being not-null terminated while requesting length of packet.

Thank you for testing the patch.

Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 4 lines

Erm, if tiny-printf's sprintf doesn't work like lib/vsprintf.c's sprintf in this regard, we should be fixing tiny-printf.

Hello Tom, I have observed that 'sprintf()' defined in lib/vsprintf.c at here:
https://github.com/torvalds/linux/blob/master/lib/vsprintf.c#L3035
also behaves the same way, that returns length of the string excluding null character.

Quoted 6 lines
Quoted 1 line

Then please rework the commit message, thanks.

Any updates on this patch?

I can see the exact same error when using ethernet boot on phycore-am62x:

The fixed for this issue is there in "tiny-printf.c" file itself and fix for the same is posted by Alexander at:
https://lore.kernel.org/r/[email protected]/

Regards,
Chintan.

Quoted 5 lines

Filename 'phyboard-lyra-am62xx-3/tispl.bin'.
Load address: 0x82000000
Loading: *
TFTP error: 'Request not null-terminated' (4)

#7 lore raw

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

---
 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
Reviewed-by on v1 2/13
#8 lore raw

Re: [PATCH 02/13] arm: mach-k3: j721s2: Update SoC auto-gen data to enable Ethernet boot

On January 7, 2025 thus sayeth Chintan Vankar:

Quoted 10 lines

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.

---
 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(-)

~Bryan

#9 lore raw

PATCH 3/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.

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

PATCH 4/13 arm: mach-k3: j721s2_init: Probe AM65 CPSW NUSS for R5/A72 SPL

In reply to Chintan Vankar

To support Ethernet boot on AM68-SK, probe AM65 CPSW NUSS driver in board_init_f().

---
 arch/arm/mach-k3/j721s2/j721s2_init.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/mach-k3/j721s2/j721s2_init.c +10 -0
index 6ce3eb87efb..7208bee5785 100644
@@ -329,6 +329,16 @@ void board_init_f(ulong dummy)
 
 	setup_qos();
 
+	if (IS_ENABLED(CONFIG_SPL_ETH) && IS_ENABLED(CONFIG_TI_AM65_CPSW_NUSS) &&
+	    spl_boot_device() == BOOT_DEVICE_ETHERNET) {
+		struct udevice *cpswdev;
+
+		ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(am65_cpsw_nuss),
+						  &cpswdev);
+		if (ret)
+			printf("Failed to probe am65_cpsw_nuss driver..\n");
+	}
+
 	if (IS_ENABLED(CONFIG_CPU_V7R) && IS_ENABLED(CONFIG_K3_AVS0)) {
 		ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(k3_avs),
 						  &dev);
Signature · 1 line
2.34.1
#11 lore raw

Re: [PATCH 04/13] arm: mach-k3: j721s2_init: Probe AM65 CPSW NUSS for R5/A72 SPL

Quoted 16 lines · Chintan Vankar

To support Ethernet boot on AM68-SK, probe AM65 CPSW NUSS driver in board_init_f().

---
 arch/arm/mach-k3/j721s2/j721s2_init.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/mach-k3/j721s2/j721s2_init.c +0 -0
index 6ce3eb87efb..7208bee5785 100644
@@ -329,6 +329,16 @@ void board_init_f(ulong dummy)
 
 	setup_qos();
 

arch/arm/mach-k3/j721s2/j721s2_init.c void board_init_f(ulong dummy) · line 341

Quoted 10 lines
arch/arm/mach-k3/j721s2/j721s2_init.c +10 -0
+	if (IS_ENABLED(CONFIG_SPL_ETH) && IS_ENABLED(CONFIG_TI_AM65_CPSW_NUSS) &&
+	    spl_boot_device() == BOOT_DEVICE_ETHERNET) {
+		struct udevice *cpswdev;
+
+		ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(am65_cpsw_nuss),
+						  &cpswdev);
+		if (ret)
+			printf("Failed to probe am65_cpsw_nuss driver..\n");
+	}
+

This looks like a hack. Please find out why the Ethernet driver is not being probed when SPL tries to load image over net.

We have the following defined at the am65-cpsw-nuss driver.

U_BOOT_DRIVER(am65_cpsw_nuss) = {
        .name   = "am65_cpsw_nuss",
        .id     = UCLASS_MISC,
        .of_match = am65_cpsw_nuss_ids,
        .probe  = am65_cpsw_probe_nuss,
        .priv_auto = sizeof(struct am65_cpsw_common),
};

U_BOOT_DRIVER(am65_cpsw_nuss_port) = {

        .name   = "am65_cpsw_nuss_port",
        .id     = UCLASS_ETH,
        .probe  = am65_cpsw_port_probe,
        .ops    = &am65_cpsw_ops,

.priv_auto = sizeof(struct am65_cpsw_priv),
.plat_auto = sizeof(struct eth_pdata),
.flags = DM_FLAG_ALLOC_PRIV_DMA | DM_FLAG_OS_PREPARE,
};

It looks like am65_cpsw_probe_nuss() is not being invoked for you.

Can you please check if am65_cpsw_port_probe() was invoked? If yes but am65_cpsw_probe_nuss() was not then we need to fix the DM hierarchy for AM65_CPSW?

Quoted 3 lines
arch/arm/mach-k3/j721s2/j721s2_init.c +0 -0
 	if (IS_ENABLED(CONFIG_CPU_V7R) && IS_ENABLED(CONFIG_K3_AVS0)) {
 		ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(k3_avs),
 						  &dev);
Signature · 2 lines
cheers,
-roger
#12 lore raw

Re: [PATCH 04/13] arm: mach-k3: j721s2_init: Probe AM65 CPSW NUSS for R5/A72 SPL

Quoted 19 lines · Roger Quadros
Quoted 16 lines · Chintan Vankar

To support Ethernet boot on AM68-SK, probe AM65 CPSW NUSS driver in board_init_f().

---
  arch/arm/mach-k3/j721s2/j721s2_init.c | 10 ++++++++++
  1 file changed, 10 insertions(+)
arch/arm/mach-k3/j721s2/j721s2_init.c +0 -0
index 6ce3eb87efb..7208bee5785 100644
@@ -329,6 +329,16 @@ void board_init_f(ulong dummy)
 
  	setup_qos();
 
Quoted 14 lines

arch/arm/mach-k3/j721s2/j721s2_init.c void board_init_f(ulong dummy) · line 341

Quoted 10 lines
arch/arm/mach-k3/j721s2/j721s2_init.c +10 -0
+	if (IS_ENABLED(CONFIG_SPL_ETH) && IS_ENABLED(CONFIG_TI_AM65_CPSW_NUSS) &&
+	    spl_boot_device() == BOOT_DEVICE_ETHERNET) {
+		struct udevice *cpswdev;
+
+		ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(am65_cpsw_nuss),
+						  &cpswdev);
+		if (ret)
+			printf("Failed to probe am65_cpsw_nuss driver..\n");
+	}
+

This looks like a hack. Please find out why the Ethernet driver is not being probed when SPL tries to load image over net.

Hello Roger,

The driver is defined as UCLASS_MISC which should be probed explicitly, I have discussed the same with Nishanth in following thread:
https://lore.kernel.org/all/[email protected]/

Quoted 20 lines

We have the following defined at the am65-cpsw-nuss driver.

U_BOOT_DRIVER(am65_cpsw_nuss) = {
         .name   = "am65_cpsw_nuss",
         .id     = UCLASS_MISC,
         .of_match = am65_cpsw_nuss_ids,
         .probe  = am65_cpsw_probe_nuss,
         .priv_auto = sizeof(struct am65_cpsw_common),
};

U_BOOT_DRIVER(am65_cpsw_nuss_port) = {

         .name   = "am65_cpsw_nuss_port",
         .id     = UCLASS_ETH,
         .probe  = am65_cpsw_port_probe,
         .ops    = &am65_cpsw_ops,

.priv_auto = sizeof(struct am65_cpsw_priv),
.plat_auto = sizeof(struct eth_pdata),
.flags = DM_FLAG_ALLOC_PRIV_DMA | DM_FLAG_OS_PREPARE,
};

Quoted 6 lines

It looks like am65_cpsw_probe_nuss() is not being invoked for you.

Can you please check if am65_cpsw_port_probe() was invoked? If yes but am65_cpsw_probe_nuss() was not then we need to fix the DM hierarchy for AM65_CPSW?

None of the probe function is getting invoked here, since we need Ethernet functionality here we need to probe function in board_init_f(). We have discussed the same at here:
https://lore.kernel.org/r/[email protected]/#t

Quoted 4 lines
Quoted 3 lines
arch/arm/mach-k3/j721s2/j721s2_init.c +0 -0
  	if (IS_ENABLED(CONFIG_CPU_V7R) && IS_ENABLED(CONFIG_K3_AVS0)) {
  		ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(k3_avs),
  						  &dev);
#13 lore raw

Re: [PATCH 04/13] arm: mach-k3: j721s2_init: Probe AM65 CPSW NUSS for R5/A72 SPL

+Vignesh & Siddharth

Quoted 35 lines · Chintan Vankar
Quoted 22 lines · Roger Quadros
Quoted 19 lines · Chintan Vankar

To support Ethernet boot on AM68-SK, probe AM65 CPSW NUSS driver in board_init_f().

---
  arch/arm/mach-k3/j721s2/j721s2_init.c | 10 ++++++++++

  1 file changed, 10 insertions(+)
arch/arm/mach-k3/j721s2/j721s2_init.c +0 -0
index 6ce3eb87efb..7208bee5785 100644
@@ -329,6 +329,16 @@ void board_init_f(ulong dummy)
         setup_qos();

  +    if (IS_ENABLED(CONFIG_SPL_ETH) && IS_ENABLED(CONFIG_TI_AM65_CPSW_NUSS) && +        spl_boot_device() == BOOT_DEVICE_ETHERNET) {
+        struct udevice *cpswdev;
+
+        ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(am65_cpsw_nuss),

Quoted 9 lines
Quoted 5 lines

+                          &cpswdev);
+        if (ret)
+            printf("Failed to probe am65_cpsw_nuss driver..\n"); +    }
+

This looks like a hack. Please find out why the Ethernet driver is not being probed when SPL tries to load image over net.

Quoted 3 lines

Hello Roger,

The driver is defined as UCLASS_MISC which should be probed explicitly,

The driver was originally built without UCLASS_MISC, but

commit 38922b1f4acc ("net: ti: am65-cpsw: Add support for multi port independent MAC mode")

Added UCLASS_MISC and states there that
" Since top level driver is now UCLASS_MISC, board files would need to
instantiate this driver explicitly."

Not an elegant solution. So we need to fix something in the am65-cpuss driver.

Looking at drivers/net/mvpp2.c we can see a possible solution.
1) don't define .probe for the parent driver (UCLASS_MISC). Instead define .bind that will scan the device tree for ports and bind the port device and driver. e.g. see mvpp2_base_bind()
2) in port driver .probe (UCLASS_ETH), if parent has not been probed then call the parent probe (am65_cpsw_probe_nuss) . Also set a flag so parent probe only gets called once.
3) update all board files no not explicitly probe the am65-cpsw UCLASS_MISC driver.

Siddharth / Vignesh do you see any issues with this solution?

Quoted 23 lines

I have discussed the same with Nishanth in following thread:
https://lore.kernel.org/all/[email protected]/

Quoted 20 lines

We have the following defined at the am65-cpsw-nuss driver.

U_BOOT_DRIVER(am65_cpsw_nuss) = {
         .name   = "am65_cpsw_nuss",
         .id     = UCLASS_MISC,
         .of_match = am65_cpsw_nuss_ids, .probe  = am65_cpsw_probe_nuss, .priv_auto = sizeof(struct am65_cpsw_common), };

U_BOOT_DRIVER(am65_cpsw_nuss_port) = {
         .name   = "am65_cpsw_nuss_port",
         .id     = UCLASS_ETH,
         .probe  = am65_cpsw_port_probe,
         .ops    = &am65_cpsw_ops,
         .priv_auto      = sizeof(struct am65_cpsw_priv), .plat_auto      = sizeof(struct eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA | DM_FLAG_OS_PREPARE, };

Quoted 7 lines
Quoted 6 lines

It looks like am65_cpsw_probe_nuss() is not being invoked for you.

Can you please check if am65_cpsw_port_probe() was invoked? If yes but am65_cpsw_probe_nuss() was not then we need to fix the DM hierarchy for AM65_CPSW?

None of the probe function is getting invoked here, since we need

That is strange. am65_cpsw_probe_nuss() should be called at least for port 0 since it is defined as UCLASS_ETH.

Quoted 9 lines

Ethernet functionality here we need to probe function in board_init_f(). We have discussed the same at here:
https://lore.kernel.org/r/[email protected]/#t

Quoted 4 lines
Quoted 3 lines

      if (IS_ENABLED(CONFIG_CPU_V7R) && IS_ENABLED(CONFIG_K3_AVS0)) { ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(k3_avs), &dev);

Signature · 2 lines
cheers,
-roger
#14 lore raw

Re: [PATCH 04/13] arm: mach-k3: j721s2_init: Probe AM65 CPSW NUSS for R5/A72 SPL

Quoted 22 lines · Roger Quadros
Quoted 3 lines

Hello Roger,

The driver is defined as UCLASS_MISC which should be probed explicitly,

The driver was originally built without UCLASS_MISC, but

commit 38922b1f4acc ("net: ti: am65-cpsw: Add support for multi port independent MAC mode")

Added UCLASS_MISC and states there that
" Since top level driver is now UCLASS_MISC, board files would need to
instantiate this driver explicitly."

Not an elegant solution. So we need to fix something in the am65-cpuss driver.

Looking at drivers/net/mvpp2.c we can see a possible solution.
1) don't define .probe for the parent driver (UCLASS_MISC). Instead define .bind that will scan the device tree for ports and bind the port device and driver. e.g. see mvpp2_base_bind()
2) in port driver .probe (UCLASS_ETH), if parent has not been probed then call the parent probe (am65_cpsw_probe_nuss) . Also set a flag so parent probe only gets called once.
3) update all board files no not explicitly probe the am65-cpsw UCLASS_MISC driver.

Quoted 1 line

Siddharth / Vignesh do you see any issues with this solution?

I like this idea. It may need bit more than moving probe to bind as there are some reg accesses which shouldn't ideally be done at bind phase. But should be feasible to drop them.

Signature · 3 lines
Regards
Vignesh
https://ti.com/opensource
#15 lore raw

Re: [PATCH 04/13] arm: mach-k3: j721s2_init: Probe AM65 CPSW NUSS for R5/A72 SPL

In reply to Roger Quadros
Quoted 61 lines · Roger Quadros

+Vignesh & Siddharth

Quoted 35 lines · Chintan Vankar
Quoted 22 lines · Roger Quadros
Quoted 19 lines · Chintan Vankar

To support Ethernet boot on AM68-SK, probe AM65 CPSW NUSS driver in board_init_f().

---
   arch/arm/mach-k3/j721s2/j721s2_init.c | 10 ++++++++++
   1 file changed, 10 insertions(+)
arch/arm/mach-k3/j721s2/j721s2_init.c +4 -0
index 6ce3eb87efb..7208bee5785 100644
@@ -329,6 +329,16 @@ void board_init_f(ulong dummy)
         setup_qos();
   +    if (IS_ENABLED(CONFIG_SPL_ETH) && IS_ENABLED(CONFIG_TI_AM65_CPSW_NUSS) &&
+        spl_boot_device() == BOOT_DEVICE_ETHERNET) {
+        struct udevice *cpswdev;
+
+        ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(am65_cpsw_nuss),
Quoted 9 lines

arch/arm/mach-k3/j721s2/j721s2_init.c void board_init_f(ulong dummy) · line 341

Quoted 5 lines
arch/arm/mach-k3/j721s2/j721s2_init.c +5 -0
+                          &cpswdev);
+        if (ret)
+            printf("Failed to probe am65_cpsw_nuss driver..\n");
+    }
+

This looks like a hack. Please find out why the Ethernet driver is not being probed when SPL tries to load image over net.

Quoted 3 lines

Hello Roger,

The driver is defined as UCLASS_MISC which should be probed explicitly,

The driver was originally built without UCLASS_MISC, but

commit 38922b1f4acc ("net: ti: am65-cpsw: Add support for multi port independent MAC mode")

Added UCLASS_MISC and states there that
" Since top level driver is now UCLASS_MISC, board files would need to
instantiate this driver explicitly."

Not an elegant solution. So we need to fix something in the am65-cpuss driver.

Looking at drivers/net/mvpp2.c we can see a possible solution.
1) don't define .probe for the parent driver (UCLASS_MISC). Instead define .bind that will scan the device tree for ports and bind the port device and driver. e.g. see mvpp2_base_bind()
2) in port driver .probe (UCLASS_ETH), if parent has not been probed then call the parent probe (am65_cpsw_probe_nuss) . Also set a flag so parent probe only gets called once.
3) update all board files no not explicitly probe the am65-cpsw UCLASS_MISC driver.

Quoted 2 lines

Siddharth / Vignesh do you see any issues with this solution?

Hello Roger, I have tried to understand your approach, I will work on that. But for now, is it possible to merge the seris with the existing approach ?

Quoted 25 lines
Quoted 25 lines

I have discussed the same with Nishanth in following thread:
https://lore.kernel.org/all/[email protected]/

Quoted 22 lines

We have the following defined at the am65-cpsw-nuss driver.

U_BOOT_DRIVER(am65_cpsw_nuss) = {
         .name   = "am65_cpsw_nuss",
         .id     = UCLASS_MISC,
         .of_match = am65_cpsw_nuss_ids, .probe  = am65_cpsw_probe_nuss, .priv_auto = sizeof(struct am65_cpsw_common),
};

U_BOOT_DRIVER(am65_cpsw_nuss_port) = {
         .name   = "am65_cpsw_nuss_port",
         .id     = UCLASS_ETH,
         .probe  = am65_cpsw_port_probe,
         .ops    = &am65_cpsw_ops,
         .priv_auto      = sizeof(struct am65_cpsw_priv), .plat_auto      = sizeof(struct eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA | DM_FLAG_OS_PREPARE,
};

It looks like am65_cpsw_probe_nuss() is not being invoked for you.

Quoted 9 lines
Quoted 5 lines
Quoted 4 lines

Can you please check if am65_cpsw_port_probe() was invoked? If yes but am65_cpsw_probe_nuss() was not then we need to fix the DM hierarchy for AM65_CPSW?

None of the probe function is getting invoked here, since we need

That is strange. am65_cpsw_probe_nuss() should be called at least for port 0 since it is defined as UCLASS_ETH.

am65_cpsw_probe_nuss() is defined as UCLASS_MISC and not UCLASS_ETH, it will get invoked if declared as UCLASS_ETH, as per your suggestion above it will need driver changes to invoke the probe function without being called explicitly and work properly.

Quoted 10 lines
Quoted 9 lines

Ethernet functionality here we need to probe function in board_init_f(). We have discussed the same at here:
https://lore.kernel.org/r/[email protected]/#t

Quoted 4 lines
Quoted 3 lines
arch/arm/mach-k3/j721s2/j721s2_init.c +0 -0
       if (IS_ENABLED(CONFIG_CPU_V7R) && IS_ENABLED(CONFIG_K3_AVS0)) {
           ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(k3_avs),
                             &dev);
#16 lore raw

Re: [PATCH 04/13] arm: mach-k3: j721s2_init: Probe AM65 CPSW NUSS for R5/A72 SPL

Quoted 64 lines · Chintan Vankar
Quoted 61 lines · Roger Quadros

+Vignesh & Siddharth

Quoted 35 lines · Chintan Vankar
Quoted 22 lines · Roger Quadros
Quoted 19 lines · Chintan Vankar

To support Ethernet boot on AM68-SK, probe AM65 CPSW NUSS driver in board_init_f().

---
   arch/arm/mach-k3/j721s2/j721s2_init.c | 10 ++++++++++

   1 file changed, 10 insertions(+)
arch/arm/mach-k3/j721s2/j721s2_init.c +0 -0
index 6ce3eb87efb..7208bee5785 100644
@@ -329,6 +329,16 @@ void board_init_f(ulong dummy)
          setup_qos();

   +    if (IS_ENABLED(CONFIG_SPL_ETH) && IS_ENABLED(CONFIG_TI_AM65_CPSW_NUSS) && +        spl_boot_device() == BOOT_DEVICE_ETHERNET) {
+        struct udevice *cpswdev;
+
+        ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(am65_cpsw_nuss),

Quoted 9 lines
Quoted 5 lines

+                          &cpswdev);
+        if (ret)
+            printf("Failed to probe am65_cpsw_nuss driver..\n"); +    }
+

This looks like a hack. Please find out why the Ethernet driver is not being probed when SPL tries to load image over net.

Quoted 3 lines

Hello Roger,

The driver is defined as UCLASS_MISC which should be probed explicitly,

The driver was originally built without UCLASS_MISC, but

commit 38922b1f4acc ("net: ti: am65-cpsw: Add support for multi port independent MAC mode")

Added UCLASS_MISC and states there that
" Since top level driver is now UCLASS_MISC, board files would need to instantiate this driver explicitly."

Not an elegant solution. So we need to fix something in the am65-cpuss driver.

Looking at drivers/net/mvpp2.c we can see a possible solution.
1) don't define .probe for the parent driver (UCLASS_MISC). Instead define .bind that will scan the device tree for ports and bind the port device and driver. e.g. see mvpp2_base_bind()
2) in port driver .probe (UCLASS_ETH), if parent has not been probed then call the parent probe (am65_cpsw_probe_nuss) . Also set a flag so parent probe only gets called once.
3) update all board files no not explicitly probe the am65-cpsw UCLASS_MISC driver.

Quoted 6 lines
Quoted 2 lines

Siddharth / Vignesh do you see any issues with this solution?

Hello Roger, I have tried to understand your approach, I will work on that. But for now, is it possible to merge the seris with the existing approach ?

Hi Chintan,

I'm afraid that if we allow this for one board it will set a wrong example for others.
It is a very simple solution and shouldn't take much time. In case you are stuck me or Siddharth could help. Thanks!

Quoted 51 lines
Quoted 26 lines
Quoted 26 lines

I have discussed the same with Nishanth in following thread:
https://lore.kernel.org/all/[email protected]/

Quoted 22 lines

We have the following defined at the am65-cpsw-nuss driver.

U_BOOT_DRIVER(am65_cpsw_nuss) = {
          .name   = "am65_cpsw_nuss",
          .id     = UCLASS_MISC,
          .of_match = am65_cpsw_nuss_ids, .probe  = am65_cpsw_probe_nuss, .priv_auto = sizeof(struct am65_cpsw_common), };

U_BOOT_DRIVER(am65_cpsw_nuss_port) = {
          .name   = "am65_cpsw_nuss_port",
          .id     = UCLASS_ETH,
          .probe  = am65_cpsw_port_probe,
          .ops    = &am65_cpsw_ops,
          .priv_auto      = sizeof(struct am65_cpsw_priv), .plat_auto      = sizeof(struct eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA | DM_FLAG_OS_PREPARE, };

It looks like am65_cpsw_probe_nuss() is not being invoked for you.

Quoted 9 lines
Quoted 5 lines
Quoted 4 lines

Can you please check if am65_cpsw_port_probe() was invoked? If yes but am65_cpsw_probe_nuss() was not then we need to fix the DM hierarchy for AM65_CPSW?

None of the probe function is getting invoked here, since we need

That is strange. am65_cpsw_probe_nuss() should be called at least for port 0 since it is defined as UCLASS_ETH.

am65_cpsw_probe_nuss() is defined as UCLASS_MISC and not UCLASS_ETH, it will get invoked if declared as UCLASS_ETH, as per your suggestion above it will need driver changes to invoke the probe function without being called explicitly and work properly.

Quoted 10 lines
Quoted 9 lines

Ethernet functionality here we need to probe function in board_init_f(). We have discussed the same at here:
https://lore.kernel.org/r/[email protected]/#t

Quoted 4 lines
Quoted 3 lines

       if (IS_ENABLED(CONFIG_CPU_V7R) && IS_ENABLED(CONFIG_K3_AVS0)) { ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(k3_avs), &dev);

Signature · 2 lines
cheers,
-roger
#17 lore raw

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

In reply to Chintan Vankar

Add configs for enabling Ethernet boot in R5SPL.

---
 configs/am68_sk_r5_ethboot_defconfig | 80 ++++++++++++++++++++++++++++
 1 file changed, 80 insertions(+)
 create mode 100644 configs/am68_sk_r5_ethboot_defconfig
configs/am68_sk_r5_ethboot_defconfig new file +80 -0
new file mode 100644
index 00000000000..9bfbb5a3bfe
@@ -0,0 +1,80 @@
+#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_GPIO=y
+CONFIG_SPL_BOARD_INIT=y
+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x200000
+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="AM68 U-Boot R5 SPL"
+CONFIG_CMD_DHCP=y
+CONFIG_SPL_SYSCON=y
+CONFIG_DMA_CHANNELS=y
+CONFIG_TI_K3_NAVSS_UDMA=y
+CONFIG_DM_I2C=y
+CONFIG_PHY_TI_DP83867=y
+CONFIG_TI_AM65_CPSW_NUSS=y
+CONFIG_SPI=n
+CONFIG_SPL_SPI=n
+CONFIG_DM_SPI=n
+CONFIG_SPL_DM_SPI=n
+CONFIG_SPL_SYS_MALLOC=y
+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_SYS_RELOC_GD_ENV_ADD=y
+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_SPL_ENV_IS_NOWHERE=y
+CONFIG_DM_EVENT=y
+CONFIG_INPUT=n
+CONFIG_ESM_K3=y
+CONFIG_SPL_LOAD_BLOCK=y
+CONFIG_DFU=n
+CONFIG_SPL_DFU=n
+CONFIG_TI_I2C_BOARD_DETECT=y
+CONFIG_K3_EARLY_CONS=n
+CONFIG_K3_QOS=n
+CONFIG_USE_BOOTCOMMAND=n
+CONFIG_SPL_MTD=n
+CONFIG_SPL_NAND_SPI_SUPPORT=n
+CONFIG_BOOTDEV_ETH=y
+CONFIG_USB=n
+CONFIG_FS_LOADER=n
+CONFIG_SPL_FS_LOADER=n
+CONFIG_SPL_DM_SPI=y
+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_CMD_REMOTEPROC=y
+CONFIG_SYSRESET=n
+CONFIG_LAST_STAGE_INIT=y
+CONFIG_OF_UPSTREAM=n
+CONFIG_K3_DM_FW=y
+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
#18 lore raw

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

Quoted 14 lines · Chintan Vankar

Add configs for enabling Ethernet boot in R5SPL.

---
 configs/am68_sk_r5_ethboot_defconfig | 80 ++++++++++++++++++++++++++++
 1 file changed, 80 insertions(+)
 create mode 100644 configs/am68_sk_r5_ethboot_defconfig
configs/am68_sk_r5_ethboot_defconfig new file +0 -0
new file mode 100644
index 00000000000..9bfbb5a3bfe

configs/am68_sk_r5_ethboot_defconfig line 7

Quoted 7 lines
configs/am68_sk_r5_ethboot_defconfig new file +7 -0
@@ -0,0 +1,80 @@
+#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"

Please don't add duplicates that are already included in configs/am68_sk_r5_defconfig or configs/j721s2_evm_r5_defconfig

Quoted 18 lines
configs/am68_sk_r5_ethboot_defconfig new file +18 -0
+CONFIG_SPL_GPIO=y
+CONFIG_SPL_BOARD_INIT=y
+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x200000
+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="AM68 U-Boot R5 SPL"
+CONFIG_CMD_DHCP=y
+CONFIG_SPL_SYSCON=y
+CONFIG_DMA_CHANNELS=y
+CONFIG_TI_K3_NAVSS_UDMA=y
+CONFIG_DM_I2C=y
+CONFIG_PHY_TI_DP83867=y
+CONFIG_TI_AM65_CPSW_NUSS=y
+CONFIG_SPI=n
+CONFIG_SPL_SPI=n

configs/am68_sk_r5_ethboot_defconfig line 35

Quoted 10 lines
configs/am68_sk_r5_ethboot_defconfig new file +10 -0
+CONFIG_DM_SPI=n
+CONFIG_SPL_DM_SPI=n
+CONFIG_SPL_SYS_MALLOC=y
+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

Please explain in commit log why you are setting many of the options to "n". Is it due to memory limitation?

Quoted 26 lines
configs/am68_sk_r5_ethboot_defconfig new file +26 -0
+CONFIG_SYS_RELOC_GD_ENV_ADD=y
+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_SPL_ENV_IS_NOWHERE=y
+CONFIG_DM_EVENT=y
+CONFIG_INPUT=n
+CONFIG_ESM_K3=y
+CONFIG_SPL_LOAD_BLOCK=y
+CONFIG_DFU=n
+CONFIG_SPL_DFU=n
+CONFIG_TI_I2C_BOARD_DETECT=y
+CONFIG_K3_EARLY_CONS=n
+CONFIG_K3_QOS=n
+CONFIG_USE_BOOTCOMMAND=n
+CONFIG_SPL_MTD=n
+CONFIG_SPL_NAND_SPI_SUPPORT=n
+CONFIG_BOOTDEV_ETH=y
+CONFIG_USB=n
+CONFIG_FS_LOADER=n
+CONFIG_SPL_FS_LOADER=n
+CONFIG_SPL_DM_SPI=y

configs/am68_sk_r5_ethboot_defconfig line 71

Quoted 10 lines
configs/am68_sk_r5_ethboot_defconfig new file +10 -0
+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_CMD_REMOTEPROC=y
+CONFIG_SYSRESET=n
+CONFIG_LAST_STAGE_INIT=y
+CONFIG_OF_UPSTREAM=n

Why no OF_UPSTREAM?

Quoted 9 lines
configs/am68_sk_r5_ethboot_defconfig new file +9 -0
+CONFIG_K3_DM_FW=y
+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 · 2 lines
cheers,
-roger
#19 lore raw

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

Quoted 11 lines · Roger Quadros
Quoted 8 lines · Chintan Vankar

Add configs for enabling Ethernet boot in R5SPL.

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

create mode 100644 configs/am68_sk_r5_ethboot_defconfig

Quoted 17 lines

configs/am68_sk_r5_ethboot_defconfig line 7

Quoted 13 lines
configs/am68_sk_r5_ethboot_defconfig new file +7 -0
new file mode 100644
index 00000000000..9bfbb5a3bfe
@@ -0,0 +1,80 @@
+#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"

Please don't add duplicates that are already included in configs/am68_sk_r5_defconfig or configs/j721s2_evm_r5_defconfig

Hello Roger, These config options are required despite of they are present in the file that is being included for buildman to work, you can refer to Tom's comment at here:
https://lore.kernel.org/r/20240705153721.GF38804@bill-the-cat/
after which I included the same while posting config file for AM62x-SK.

Quoted 23 lines
Quoted 23 lines
configs/am68_sk_r5_ethboot_defconfig new file +23 -0
+CONFIG_SPL_GPIO=y
+CONFIG_SPL_BOARD_INIT=y
+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x200000
+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="AM68 U-Boot R5 SPL"
+CONFIG_CMD_DHCP=y
+CONFIG_SPL_SYSCON=y
+CONFIG_DMA_CHANNELS=y
+CONFIG_TI_K3_NAVSS_UDMA=y
+CONFIG_DM_I2C=y
+CONFIG_PHY_TI_DP83867=y
+CONFIG_TI_AM65_CPSW_NUSS=y
+CONFIG_SPI=n
+CONFIG_SPL_SPI=n
+CONFIG_DM_SPI=n
+CONFIG_SPL_DM_SPI=n
+CONFIG_SPL_SYS_MALLOC=y
+CONFIG_SPI_MEM=n
+CONFIG_CMD_FAT=n
Quoted 9 lines

configs/am68_sk_r5_ethboot_defconfig line 35

Quoted 5 lines
configs/am68_sk_r5_ethboot_defconfig new file +5 -0
+CONFIG_FS_FAT=n
+CONFIG_SPL_FS_FAT=n
+CONFIG_MMC_SDHCI=n
+CONFIG_MTD=n
+CONFIG_CMD_FAT=n

Please explain in commit log why you are setting many of the options to "n". Is it due to memory limitation?

Yes, that is because of memory limitation, we have faced the same limitation while working with AM62x Ethernet boot.

Quoted 30 lines
Quoted 30 lines
configs/am68_sk_r5_ethboot_defconfig new file +30 -0
+CONFIG_SYS_RELOC_GD_ENV_ADD=y
+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_SPL_ENV_IS_NOWHERE=y
+CONFIG_DM_EVENT=y
+CONFIG_INPUT=n
+CONFIG_ESM_K3=y
+CONFIG_SPL_LOAD_BLOCK=y
+CONFIG_DFU=n
+CONFIG_SPL_DFU=n
+CONFIG_TI_I2C_BOARD_DETECT=y
+CONFIG_K3_EARLY_CONS=n
+CONFIG_K3_QOS=n
+CONFIG_USE_BOOTCOMMAND=n
+CONFIG_SPL_MTD=n
+CONFIG_SPL_NAND_SPI_SUPPORT=n
+CONFIG_BOOTDEV_ETH=y
+CONFIG_USB=n
+CONFIG_FS_LOADER=n
+CONFIG_SPL_FS_LOADER=n
+CONFIG_SPL_DM_SPI=y
+CONFIG_PINCTRL_GENERIC=n
+CONFIG_PINMUX=n
+CONFIG_SPL_PINCTRL_GENERIC=n
+CONFIG_SPL_PINMUX=n
Quoted 9 lines

configs/am68_sk_r5_ethboot_defconfig line 71

Quoted 6 lines
configs/am68_sk_r5_ethboot_defconfig new file +6 -0
+CONFIG_DM_REGULATOR=n
+CONFIG_TI_SCI_POWER_DOMAIN=n
+CONFIG_CMD_REMOTEPROC=y
+CONFIG_SYSRESET=n
+CONFIG_LAST_STAGE_INIT=y
+CONFIG_OF_UPSTREAM=n

Why no OF_UPSTREAM?

Device tree files are not in-sync with upstream linux for AM68, getting compile time errors for the same, that's the reason I have disabled this config option.

Quoted 10 lines
Quoted 9 lines
configs/am68_sk_r5_ethboot_defconfig new file +9 -0
+CONFIG_K3_DM_FW=y
+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
#20 lore raw

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

Quoted 32 lines · Chintan
Quoted 11 lines · Roger Quadros
Quoted 8 lines · Chintan Vankar

Add configs for enabling Ethernet boot in R5SPL.

---
  configs/am68_sk_r5_ethboot_defconfig | 80 ++++++++++++++++++++++++++++

  1 file changed, 80 insertions(+)

  create mode 100644 configs/am68_sk_r5_ethboot_defconfig

Quoted 17 lines

configs/am68_sk_r5_ethboot_defconfig line 7

Quoted 13 lines
configs/am68_sk_r5_ethboot_defconfig new file +7 -0
new file mode 100644
index 00000000000..9bfbb5a3bfe
@@ -0,0 +1,80 @@
+#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"

Please don't add duplicates that are already included in configs/am68_sk_r5_defconfig or configs/j721s2_evm_r5_defconfig

Quoted 6 lines

Hello Roger, These config options are required despite of they are present in the file that is being included for buildman to work, you can refer to Tom's comment at here:
https://lore.kernel.org/r/20240705153721.GF38804@bill-the-cat/
after which I included the same while posting config file for AM62x-SK.

Understood. Thanks!

Quoted 76 lines
Quoted 23 lines
Quoted 23 lines
configs/am68_sk_r5_ethboot_defconfig new file +23 -0
+CONFIG_SPL_GPIO=y
+CONFIG_SPL_BOARD_INIT=y
+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x200000
+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="AM68 U-Boot R5 SPL"
+CONFIG_CMD_DHCP=y
+CONFIG_SPL_SYSCON=y
+CONFIG_DMA_CHANNELS=y
+CONFIG_TI_K3_NAVSS_UDMA=y
+CONFIG_DM_I2C=y
+CONFIG_PHY_TI_DP83867=y
+CONFIG_TI_AM65_CPSW_NUSS=y
+CONFIG_SPI=n
+CONFIG_SPL_SPI=n
+CONFIG_DM_SPI=n
+CONFIG_SPL_DM_SPI=n
+CONFIG_SPL_SYS_MALLOC=y
+CONFIG_SPI_MEM=n
+CONFIG_CMD_FAT=n
Quoted 9 lines

configs/am68_sk_r5_ethboot_defconfig line 35

Quoted 5 lines
configs/am68_sk_r5_ethboot_defconfig new file +5 -0
+CONFIG_FS_FAT=n
+CONFIG_SPL_FS_FAT=n
+CONFIG_MMC_SDHCI=n
+CONFIG_MTD=n
+CONFIG_CMD_FAT=n

Please explain in commit log why you are setting many of the options to "n". Is it due to memory limitation?

Yes, that is because of memory limitation, we have faced the same limitation while working with AM62x Ethernet boot.

Quoted 30 lines
Quoted 30 lines
configs/am68_sk_r5_ethboot_defconfig new file +30 -0
+CONFIG_SYS_RELOC_GD_ENV_ADD=y
+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_SPL_ENV_IS_NOWHERE=y
+CONFIG_DM_EVENT=y
+CONFIG_INPUT=n
+CONFIG_ESM_K3=y
+CONFIG_SPL_LOAD_BLOCK=y
+CONFIG_DFU=n
+CONFIG_SPL_DFU=n
+CONFIG_TI_I2C_BOARD_DETECT=y
+CONFIG_K3_EARLY_CONS=n
+CONFIG_K3_QOS=n
+CONFIG_USE_BOOTCOMMAND=n
+CONFIG_SPL_MTD=n
+CONFIG_SPL_NAND_SPI_SUPPORT=n
+CONFIG_BOOTDEV_ETH=y
+CONFIG_USB=n
+CONFIG_FS_LOADER=n
+CONFIG_SPL_FS_LOADER=n
+CONFIG_SPL_DM_SPI=y
+CONFIG_PINCTRL_GENERIC=n
+CONFIG_PINMUX=n
+CONFIG_SPL_PINCTRL_GENERIC=n
+CONFIG_SPL_PINMUX=n
Quoted 9 lines

configs/am68_sk_r5_ethboot_defconfig line 71

Quoted 6 lines
configs/am68_sk_r5_ethboot_defconfig new file +6 -0
+CONFIG_DM_REGULATOR=n
+CONFIG_TI_SCI_POWER_DOMAIN=n
+CONFIG_CMD_REMOTEPROC=y
+CONFIG_SYSRESET=n
+CONFIG_LAST_STAGE_INIT=y
+CONFIG_OF_UPSTREAM=n

Why no OF_UPSTREAM?

Quoted 3 lines

Device tree files are not in-sync with upstream linux for AM68, getting compile time errors for the same, that's the reason I have disabled this config option.

I suggest to do a sync and not disable CONFIG_OF_UPSTREAM.

Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
configs/am68_sk_r5_ethboot_defconfig new file +9 -0
+CONFIG_K3_DM_FW=y
+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 · 2 lines
cheers,
-roger
#21 lore raw

PATCH 6/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.

---
 configs/am68_sk_a72_ethboot_defconfig | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 configs/am68_sk_a72_ethboot_defconfig
configs/am68_sk_a72_ethboot_defconfig new file +18 -0
new file mode 100644
index 00000000000..42469861961
@@ -0,0 +1,18 @@
+#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_DRIVERS_MISC=y
+CONFIG_SPL_BOARD_INIT=y
+CONFIG_SPL_DMA=y
+CONFIG_SPL_ENV_SUPPORT=y
+CONFIG_SPL_ETH=y
+CONFIG_SPL_NET=y
+CONFIG_SPL_NET_VCI_STRING="AM68 U-Boot A72 SPL"
+CONFIG_SPL_SYSCON=y
+CONFIG_SPL_RAW_IMAGE_SUPPORT=y
+CONFIG_OF_UPSTREAM=y
+CONFIG_SPL_STACK_R_ADDR=0x83000000
Signature · 1 line
2.34.1
#22 lore raw

Re: [PATCH 06/13] configs: am68: Enable configs required for Ethernet boot

Quoted 22 lines · Chintan Vankar

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

---
 configs/am68_sk_a72_ethboot_defconfig | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 configs/am68_sk_a72_ethboot_defconfig
configs/am68_sk_a72_ethboot_defconfig new file +8 -0
new file mode 100644
index 00000000000..42469861961
@@ -0,0 +1,18 @@
+#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_DRIVERS_MISC=y

configs/am68_sk_a72_ethboot_defconfig line 18

Quoted 10 lines
configs/am68_sk_a72_ethboot_defconfig new file +10 -0
+CONFIG_SPL_BOARD_INIT=y
+CONFIG_SPL_DMA=y
+CONFIG_SPL_ENV_SUPPORT=y
+CONFIG_SPL_ETH=y
+CONFIG_SPL_NET=y
+CONFIG_SPL_NET_VCI_STRING="AM68 U-Boot A72 SPL"
+CONFIG_SPL_SYSCON=y
+CONFIG_SPL_RAW_IMAGE_SUPPORT=y
+CONFIG_OF_UPSTREAM=y
+CONFIG_SPL_STACK_R_ADDR=0x83000000

Please avoid duplicates already in configs/am68_sk_a72_defconfig or configs/j721s2_evm_a72_defconfig

Signature · 2 lines
cheers,
-roger
#23 lore raw

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

---

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]/

 .../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 4b8d73a92d6..ccf0c4c7a0c 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
#24 lore raw

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

In reply to Chintan Vankar

From: Andreas Dannenberg <[email protected]>

This data was generated using the ksswtool-autogen project with the followig commit:

cd9dfa5 ("soc: am62px: Add cpsw_3guss_am67_main_0 id to the dev list")

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

Re: [PATCH 08/13] arm: mach-k3: am62p: Update SoC auto-gen data to enable CPSW boot

On January 7, 2025 thus sayeth Chintan Vankar:

Quoted 7 lines

From: Andreas Dannenberg <[email protected]>

This data was generated using the ksswtool-autogen project with the followig commit:

cd9dfa5 ("soc: am62px: Add cpsw_3guss_am67_main_0 id to the dev list")

Unfortunately because these scripts are so closely tied to our HW designs tools they will never be seen by anyone outside of TI. We should probably update this commit message for Andreas.

Or find a way to publish these scripts ;)

~Bryan

Quoted 2 lines

~Bryan

#26 lore raw

PATCH 9/13 arm: mach-k3: am62p5_init: Probe AM65 CPSW NUSS for R5/A53 SPL

In reply to Chintan Vankar

In order to support Ethernet boot on AM62p, probe AM65 CPSW NUSS driver in board_init_f().

---
 arch/arm/mach-k3/am62px/am62p5_init.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/mach-k3/am62px/am62p5_init.c +10 -0
index 34ed01cd78c..f8e98b09402 100644
@@ -159,6 +159,16 @@ 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");
+	}
+
 	debug("am62px_init: %s done\n", __func__);
 }
 
Signature · 1 line
2.34.1
#27 lore raw

Re: [PATCH 09/13] arm: mach-k3: am62p5_init: Probe AM65 CPSW NUSS for R5/A53 SPL

Hi Chintan!

On January 7, 2025 thus sayeth Chintan Vankar:

Quoted 19 lines

In order to support Ethernet boot on AM62p, probe AM65 CPSW NUSS driver in board_init_f().

---
 arch/arm/mach-k3/am62px/am62p5_init.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/mach-k3/am62px/am62p5_init.c +3 -0
index 34ed01cd78c..f8e98b09402 100644
@@ -159,6 +159,16 @@ 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) {

arch/arm/mach-k3/am62px/am62p5_init.c void board_init_f(ulong dummy) · line 174

Quoted 10 lines
arch/arm/mach-k3/am62px/am62p5_init.c +7 -0
+		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");
+	}
+
 	debug("am62px_init: %s done\n", __func__);
 }
 

Unfortunately with all the release activities we now have a simple merge conflict with -next merging into -master.

~Bryan

#28 lore raw

Re: [PATCH 09/13] arm: mach-k3: am62p5_init: Probe AM65 CPSW NUSS for R5/A53 SPL

In reply to Chintan Vankar
Quoted 16 lines · Chintan Vankar

In order to support Ethernet boot on AM62p, probe AM65 CPSW NUSS driver in board_init_f().

---
 arch/arm/mach-k3/am62px/am62p5_init.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/mach-k3/am62px/am62p5_init.c +0 -0
index 34ed01cd78c..f8e98b09402 100644
@@ -159,6 +159,16 @@ void board_init_f(ulong dummy)
 	}
 
 	spl_enable_cache();

arch/arm/mach-k3/am62px/am62p5_init.c void board_init_f(ulong dummy) · line 171

Quoted 10 lines
arch/arm/mach-k3/am62px/am62p5_init.c +10 -0
+
+	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");
+	}
+

Why do you need to do this?

from drivers/net/ti/am65-cpsw-nuss.c

U_BOOT_DRIVER(am65_cpsw_nuss) = {
        .name   = "am65_cpsw_nuss",
        .id     = UCLASS_MISC,
        .of_match = am65_cpsw_nuss_ids,
        .probe  = am65_cpsw_probe_nuss,
        .priv_auto = sizeof(struct am65_cpsw_common),
};

U_BOOT_DRIVER(am65_cpsw_nuss_port) = {

        .name   = "am65_cpsw_nuss_port",
        .id     = UCLASS_ETH,
        .probe  = am65_cpsw_port_probe,
        .ops    = &am65_cpsw_ops,

.priv_auto = sizeof(struct am65_cpsw_priv),
.plat_auto = sizeof(struct eth_pdata),
.flags = DM_FLAG_ALLOC_PRIV_DMA | DM_FLAG_OS_PREPARE,
};

Isn't am65_cpsw_port_probe() and am65_cpsw_probe_nuss() getting called? If not, you need to identify why and fix it the proper way. Not by hacking it like you do now.

Quoted 3 lines
arch/arm/mach-k3/am62px/am62p5_init.c +0 -0
 	debug("am62px_init: %s done\n", __func__);
 }
 
Signature · 2 lines
cheers,
-roger
#29 lore raw

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

In reply to Chintan Vankar

From: Andreas Dannenberg <[email protected]>

Enable cache to support Ethernet boot for AM62p-SK.

---
 board/ti/am62px/evm.c | 8 ++++++++
 1 file changed, 8 insertions(+)
board/ti/am62px/evm.c +8 -0
index 7362fa4520a..2a85af980c7 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>
@@ -53,6 +54,13 @@ int board_init(void)
 	return 0;
 }
 
+#if IS_ENABLED(CONFIG_SPL_BUILD)
+void spl_board_init(void)
+{
+	enable_caches();
+}
+#endif
+
 int dram_init(void)
 {
 	return fdtdec_setup_mem_size_base();
Signature · 1 line
2.34.1
#30 lore raw

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

Quoted 3 lines · Chintan Vankar

From: Andreas Dannenberg <[email protected]>

Enable cache to support Ethernet boot for AM62p-SK.

Please give more details in commit log.

What happens to Ethernet boot if you don't enable cache? Is this a requirement by Ethernet hardware?

Quoted 33 lines
---
 board/ti/am62px/evm.c | 8 ++++++++
 1 file changed, 8 insertions(+)
board/ti/am62px/evm.c +8 -0
index 7362fa4520a..2a85af980c7 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>
@@ -53,6 +54,13 @@ int board_init(void)
 	return 0;
 }
 
+#if IS_ENABLED(CONFIG_SPL_BUILD)
+void spl_board_init(void)
+{
+	enable_caches();
+}
+#endif
+
 int dram_init(void)
 {
 	return fdtdec_setup_mem_size_base();
Signature · 2 lines
cheers,
-roger
#31 lore raw

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

Quoted 13 lines · Roger Quadros
Quoted 3 lines · Chintan Vankar

From: Andreas Dannenberg <[email protected]>

Enable cache to support Ethernet boot for AM62p-SK.

Please give more details in commit log.

What happens to Ethernet boot if you don't enable cache? Is this a requirement by Ethernet hardware?

Ethernet boot is working fine even without enabling cache, enabling cache will optimize the performance of CPU to access data from memory.

Since this is not a requirement from Ethernet hardware, I will modify the commit message accordingly.

Quoted 34 lines
Quoted 33 lines
---
  board/ti/am62px/evm.c | 8 ++++++++
  1 file changed, 8 insertions(+)
board/ti/am62px/evm.c +8 -0
index 7362fa4520a..2a85af980c7 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>
@@ -53,6 +54,13 @@ int board_init(void)
  	return 0;
  }
 
+#if IS_ENABLED(CONFIG_SPL_BUILD)
+void spl_board_init(void)
+{
+	enable_caches();
+}
+#endif
+
  int dram_init(void)
  {
  	return fdtdec_setup_mem_size_base();
#32 lore raw

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

---
 configs/am62px_evm_r5_ethboot_defconfig | 35 +++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 configs/am62px_evm_r5_ethboot_defconfig
configs/am62px_evm_r5_ethboot_defconfig new file +35 -0
new file mode 100644
index 00000000000..d97b2b73680
@@ -0,0 +1,35 @@
+#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_SPL_MMC=n
+CONFIG_SPL_BOARD_INIT=y
+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x300000
+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_CMD_DHCP=y
+CONFIG_SPL_SYSCON=y
+CONFIG_DMA_CHANNELS=y
+CONFIG_TI_K3_NAVSS_UDMA=y
+CONFIG_DM_I2C=y
+CONFIG_PHY_TI_DP83867=y
+CONFIG_TI_AM65_CPSW_NUSS=y
+CONFIG_NET=y
+CONFIG_SPL_SPI=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
+CONFIG_SPL_DRIVERS_MISC=y
Signature · 1 line
2.34.1
#33 lore raw

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

---
 configs/am62px_evm_a53_ethboot_defconfig | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 configs/am62px_evm_a53_ethboot_defconfig
configs/am62px_evm_a53_ethboot_defconfig new file +17 -0
new file mode 100644
index 00000000000..8f9b0c4b755
@@ -0,0 +1,17 @@
+#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=0x83000000
+CONFIG_SPL_DRIVERS_MISC=y
+#CONFIG_SPL_BOARD_INIT=y
+CONFIG_SPL_DMA=y
+CONFIG_SPL_ENV_SUPPORT=y
+CONFIG_SPL_ETH=y
+CONFIG_SPL_NET=y
+CONFIG_SPL_NET_VCI_STRING="AM62PX U-Boot A53 SPL"
+CONFIG_SPL_SYSCON=y
+CONFIG_REMOTEPROC_TI_K3_R5F=y
Signature · 1 line
2.34.1
#34 lore raw

Re: [PATCH 12/13] configs: am62p: Enable configs required for Ethboot

On January 7, 2025 thus sayeth Chintan Vankar:

Quoted 14 lines

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

---
 configs/am62px_evm_a53_ethboot_defconfig | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 configs/am62px_evm_a53_ethboot_defconfig
configs/am62px_evm_a53_ethboot_defconfig new file +0 -0
new file mode 100644
index 00000000000..8f9b0c4b755

configs/am62px_evm_a53_ethboot_defconfig line 10

Quoted 10 lines
configs/am62px_evm_a53_ethboot_defconfig new file +10 -0
@@ -0,0 +1,17 @@
+#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=0x83000000
+CONFIG_SPL_DRIVERS_MISC=y
+#CONFIG_SPL_BOARD_INIT=y

Are we trying to turn this off?

~Bryan

#35 lore raw

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

---

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