* [PATCH 00/13] Add support for Ethernet boot on AM62p-SK and AM68-SK
@ 2025-01-07 9:38 Chintan Vankar
2025-01-07 9:38 ` [PATCH 01/13] net: tftp: Increase TFTP pkt string length to include null character Chintan Vankar
` (12 more replies)
0 siblings, 13 replies; 36+ messages in thread
From: Chintan Vankar @ 2025-01-07 9:38 UTC (permalink / raw)
To: AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Roger Quadros, Hari Nagalla, Jonathan Humphreys,
Andreas Dannenberg, Simon Glass, Jayesh Choudhary, Aniket Limaye,
Aradhya Bhatia, Chintan Vankar, Neha Malcom Francis, Andrew Davis,
Ramon Fried, Joe Hershberger, Bryan Brattlof, Vignesh Raghavendra,
Manorit Chawdhry, Tom Rini
Cc: srk, s-vadapalli, danishanwar, u-boot
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
--
2.34.1
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 01/13] net: tftp: Increase TFTP pkt string length to include null character
2025-01-07 9:38 [PATCH 00/13] Add support for Ethernet boot on AM62p-SK and AM68-SK Chintan Vankar
@ 2025-01-07 9:38 ` Chintan Vankar
2025-01-07 14:22 ` Tom Rini
2025-01-07 9:38 ` [PATCH 02/13] arm: mach-k3: j721s2: Update SoC auto-gen data to enable Ethernet boot Chintan Vankar
` (11 subsequent siblings)
12 siblings, 1 reply; 36+ messages in thread
From: Chintan Vankar @ 2025-01-07 9:38 UTC (permalink / raw)
To: AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Roger Quadros, Hari Nagalla, Jonathan Humphreys,
Andreas Dannenberg, Simon Glass, Jayesh Choudhary, Aniket Limaye,
Aradhya Bhatia, Chintan Vankar, Neha Malcom Francis, Andrew Davis,
Ramon Fried, Joe Hershberger, Bryan Brattlof, Vignesh Raghavendra,
Manorit Chawdhry, Tom Rini
Cc: srk, s-vadapalli, danishanwar, u-boot
'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.
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
---
net/tftp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/tftp.c b/net/tftp.c
index 704b20b4ff8..db1d4aacb0e 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -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;
--
2.34.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 02/13] arm: mach-k3: j721s2: Update SoC auto-gen data to enable Ethernet boot
2025-01-07 9:38 [PATCH 00/13] Add support for Ethernet boot on AM62p-SK and AM68-SK Chintan Vankar
2025-01-07 9:38 ` [PATCH 01/13] net: tftp: Increase TFTP pkt string length to include null character Chintan Vankar
@ 2025-01-07 9:38 ` Chintan Vankar
2025-01-07 13:41 ` Bryan Brattlof
2025-01-07 9:38 ` [PATCH 03/13] arm: mach-k3: j721s2_spl: Alias Ethernet boot to CPGMAC Chintan Vankar
` (10 subsequent siblings)
12 siblings, 1 reply; 36+ messages in thread
From: Chintan Vankar @ 2025-01-07 9:38 UTC (permalink / raw)
To: AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Roger Quadros, Hari Nagalla, Jonathan Humphreys,
Andreas Dannenberg, Simon Glass, Jayesh Choudhary, Aniket Limaye,
Aradhya Bhatia, Chintan Vankar, Neha Malcom Francis, Andrew Davis,
Ramon Fried, Joe Hershberger, Bryan Brattlof, Vignesh Raghavendra,
Manorit Chawdhry, Tom Rini
Cc: srk, s-vadapalli, danishanwar, u-boot
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.
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
---
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(-)
diff --git a/arch/arm/mach-k3/r5/j721s2/clk-data.c b/arch/arm/mach-k3/r5/j721s2/clk-data.c
index 0c5c321c1eb..0130c9c4b86 100644
--- a/arch/arm/mach-k3/r5/j721s2/clk-data.c
+++ b/arch/arm/mach-k3/r5/j721s2/clk-data.c
@@ -5,7 +5,7 @@
* This file is auto generated. Please do not hand edit and report any issues
* to Dave Gerlach <d-gerlach@ti.com>.
*
- * 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),
};
diff --git a/arch/arm/mach-k3/r5/j721s2/dev-data.c b/arch/arm/mach-k3/r5/j721s2/dev-data.c
index df70c5e5d7c..b78550707c5 100644
--- a/arch/arm/mach-k3/r5/j721s2/dev-data.c
+++ b/arch/arm/mach-k3/r5/j721s2/dev-data.c
@@ -5,7 +5,7 @@
* This file is auto generated. Please do not hand edit and report any issues
* to Dave Gerlach <d-gerlach@ti.com>.
*
- * 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]),
--
2.34.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 03/13] arm: mach-k3: j721s2_spl: Alias Ethernet boot to CPGMAC
2025-01-07 9:38 [PATCH 00/13] Add support for Ethernet boot on AM62p-SK and AM68-SK Chintan Vankar
2025-01-07 9:38 ` [PATCH 01/13] net: tftp: Increase TFTP pkt string length to include null character Chintan Vankar
2025-01-07 9:38 ` [PATCH 02/13] arm: mach-k3: j721s2: Update SoC auto-gen data to enable Ethernet boot Chintan Vankar
@ 2025-01-07 9:38 ` Chintan Vankar
2025-01-07 9:38 ` [PATCH 04/13] arm: mach-k3: j721s2_init: Probe AM65 CPSW NUSS for R5/A72 SPL Chintan Vankar
` (9 subsequent siblings)
12 siblings, 0 replies; 36+ messages in thread
From: Chintan Vankar @ 2025-01-07 9:38 UTC (permalink / raw)
To: AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Roger Quadros, Hari Nagalla, Jonathan Humphreys,
Andreas Dannenberg, Simon Glass, Jayesh Choudhary, Aniket Limaye,
Aradhya Bhatia, Chintan Vankar, Neha Malcom Francis, Andrew Davis,
Ramon Fried, Joe Hershberger, Bryan Brattlof, Vignesh Raghavendra,
Manorit Chawdhry, Tom Rini
Cc: srk, s-vadapalli, danishanwar, u-boot
This is required to enable spl_net boot on AM68-SK.
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
---
arch/arm/mach-k3/include/mach/j721s2_spl.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-k3/include/mach/j721s2_spl.h b/arch/arm/mach-k3/include/mach/j721s2_spl.h
index d8fae2c8b45..47a61281d94 100644
--- a/arch/arm/mach-k3/include/mach/j721s2_spl.h
+++ b/arch/arm/mach-k3/include/mach/j721s2_spl.h
@@ -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
--
2.34.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 04/13] arm: mach-k3: j721s2_init: Probe AM65 CPSW NUSS for R5/A72 SPL
2025-01-07 9:38 [PATCH 00/13] Add support for Ethernet boot on AM62p-SK and AM68-SK Chintan Vankar
` (2 preceding siblings ...)
2025-01-07 9:38 ` [PATCH 03/13] arm: mach-k3: j721s2_spl: Alias Ethernet boot to CPGMAC Chintan Vankar
@ 2025-01-07 9:38 ` Chintan Vankar
2025-01-07 14:33 ` Roger Quadros
2025-01-07 9:38 ` [PATCH 05/13] configs: am68: Add configs for enabling Ethboot in R5SPL Chintan Vankar
` (8 subsequent siblings)
12 siblings, 1 reply; 36+ messages in thread
From: Chintan Vankar @ 2025-01-07 9:38 UTC (permalink / raw)
To: AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Roger Quadros, Hari Nagalla, Jonathan Humphreys,
Andreas Dannenberg, Simon Glass, Jayesh Choudhary, Aniket Limaye,
Aradhya Bhatia, Chintan Vankar, Neha Malcom Francis, Andrew Davis,
Ramon Fried, Joe Hershberger, Bryan Brattlof, Vignesh Raghavendra,
Manorit Chawdhry, Tom Rini
Cc: srk, s-vadapalli, danishanwar, u-boot
To support Ethernet boot on AM68-SK, probe AM65 CPSW NUSS driver in
board_init_f().
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
---
arch/arm/mach-k3/j721s2/j721s2_init.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm/mach-k3/j721s2/j721s2_init.c b/arch/arm/mach-k3/j721s2/j721s2_init.c
index 6ce3eb87efb..7208bee5785 100644
--- a/arch/arm/mach-k3/j721s2/j721s2_init.c
+++ b/arch/arm/mach-k3/j721s2/j721s2_init.c
@@ -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);
--
2.34.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 05/13] configs: am68: Add configs for enabling Ethboot in R5SPL
2025-01-07 9:38 [PATCH 00/13] Add support for Ethernet boot on AM62p-SK and AM68-SK Chintan Vankar
` (3 preceding siblings ...)
2025-01-07 9:38 ` [PATCH 04/13] arm: mach-k3: j721s2_init: Probe AM65 CPSW NUSS for R5/A72 SPL Chintan Vankar
@ 2025-01-07 9:38 ` Chintan Vankar
2025-01-07 14:38 ` Roger Quadros
2025-01-07 9:38 ` [PATCH 06/13] configs: am68: Enable configs required for Ethernet boot Chintan Vankar
` (7 subsequent siblings)
12 siblings, 1 reply; 36+ messages in thread
From: Chintan Vankar @ 2025-01-07 9:38 UTC (permalink / raw)
To: AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Roger Quadros, Hari Nagalla, Jonathan Humphreys,
Andreas Dannenberg, Simon Glass, Jayesh Choudhary, Aniket Limaye,
Aradhya Bhatia, Chintan Vankar, Neha Malcom Francis, Andrew Davis,
Ramon Fried, Joe Hershberger, Bryan Brattlof, Vignesh Raghavendra,
Manorit Chawdhry, Tom Rini
Cc: srk, s-vadapalli, danishanwar, u-boot
Add configs for enabling Ethernet boot in R5SPL.
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
---
configs/am68_sk_r5_ethboot_defconfig | 80 ++++++++++++++++++++++++++++
1 file changed, 80 insertions(+)
create mode 100644 configs/am68_sk_r5_ethboot_defconfig
diff --git a/configs/am68_sk_r5_ethboot_defconfig b/configs/am68_sk_r5_ethboot_defconfig
new file mode 100644
index 00000000000..9bfbb5a3bfe
--- /dev/null
+++ b/configs/am68_sk_r5_ethboot_defconfig
@@ -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
--
2.34.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 06/13] configs: am68: Enable configs required for Ethernet boot
2025-01-07 9:38 [PATCH 00/13] Add support for Ethernet boot on AM62p-SK and AM68-SK Chintan Vankar
` (4 preceding siblings ...)
2025-01-07 9:38 ` [PATCH 05/13] configs: am68: Add configs for enabling Ethboot in R5SPL Chintan Vankar
@ 2025-01-07 9:38 ` Chintan Vankar
2025-01-07 14:40 ` Roger Quadros
2025-01-07 9:38 ` [PATCH 07/13] arm: dts: k3-am68-sk-base-board-u-boot: Add bootph-all property to necessary nodes Chintan Vankar
` (6 subsequent siblings)
12 siblings, 1 reply; 36+ messages in thread
From: Chintan Vankar @ 2025-01-07 9:38 UTC (permalink / raw)
To: AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Roger Quadros, Hari Nagalla, Jonathan Humphreys,
Andreas Dannenberg, Simon Glass, Jayesh Choudhary, Aniket Limaye,
Aradhya Bhatia, Chintan Vankar, Neha Malcom Francis, Andrew Davis,
Ramon Fried, Joe Hershberger, Bryan Brattlof, Vignesh Raghavendra,
Manorit Chawdhry, Tom Rini
Cc: srk, s-vadapalli, danishanwar, u-boot
Enable config options needed to support Ethernet boot on AM68-SK.
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
---
configs/am68_sk_a72_ethboot_defconfig | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
create mode 100644 configs/am68_sk_a72_ethboot_defconfig
diff --git a/configs/am68_sk_a72_ethboot_defconfig b/configs/am68_sk_a72_ethboot_defconfig
new file mode 100644
index 00000000000..42469861961
--- /dev/null
+++ b/configs/am68_sk_a72_ethboot_defconfig
@@ -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
--
2.34.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 07/13] arm: dts: k3-am68-sk-base-board-u-boot: Add bootph-all property to necessary nodes
2025-01-07 9:38 [PATCH 00/13] Add support for Ethernet boot on AM62p-SK and AM68-SK Chintan Vankar
` (5 preceding siblings ...)
2025-01-07 9:38 ` [PATCH 06/13] configs: am68: Enable configs required for Ethernet boot Chintan Vankar
@ 2025-01-07 9:38 ` Chintan Vankar
2025-01-07 9:38 ` [PATCH 08/13] arm: mach-k3: am62p: Update SoC auto-gen data to enable CPSW boot Chintan Vankar
` (5 subsequent siblings)
12 siblings, 0 replies; 36+ messages in thread
From: Chintan Vankar @ 2025-01-07 9:38 UTC (permalink / raw)
To: AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Roger Quadros, Hari Nagalla, Jonathan Humphreys,
Andreas Dannenberg, Simon Glass, Jayesh Choudhary, Aniket Limaye,
Aradhya Bhatia, Chintan Vankar, Neha Malcom Francis, Andrew Davis,
Ramon Fried, Joe Hershberger, Bryan Brattlof, Vignesh Raghavendra,
Manorit Chawdhry, Tom Rini
Cc: srk, s-vadapalli, danishanwar, u-boot
Add "bootph-all" property to necessary nodes required for Ethernet boot
starting from R5 SPL stage.
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
---
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/20250106123122.3531845-2-c-vankar@ti.com/
.../arm/dts/k3-am68-sk-base-board-u-boot.dtsi | 28 +++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi b/arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi
index 4b8d73a92d6..ccf0c4c7a0c 100644
--- a/arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi
+++ b/arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi
@@ -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;
};
--
2.34.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 08/13] arm: mach-k3: am62p: Update SoC auto-gen data to enable CPSW boot
2025-01-07 9:38 [PATCH 00/13] Add support for Ethernet boot on AM62p-SK and AM68-SK Chintan Vankar
` (6 preceding siblings ...)
2025-01-07 9:38 ` [PATCH 07/13] arm: dts: k3-am68-sk-base-board-u-boot: Add bootph-all property to necessary nodes Chintan Vankar
@ 2025-01-07 9:38 ` Chintan Vankar
2025-01-07 13:58 ` Bryan Brattlof
2025-01-07 9:38 ` [PATCH 09/13] arm: mach-k3: am62p5_init: Probe AM65 CPSW NUSS for R5/A53 SPL Chintan Vankar
` (4 subsequent siblings)
12 siblings, 1 reply; 36+ messages in thread
From: Chintan Vankar @ 2025-01-07 9:38 UTC (permalink / raw)
To: AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Roger Quadros, Hari Nagalla, Jonathan Humphreys,
Andreas Dannenberg, Simon Glass, Jayesh Choudhary, Aniket Limaye,
Aradhya Bhatia, Chintan Vankar, Neha Malcom Francis, Andrew Davis,
Ramon Fried, Joe Hershberger, Bryan Brattlof, Vignesh Raghavendra,
Manorit Chawdhry, Tom Rini
Cc: srk, s-vadapalli, danishanwar, u-boot
From: Andreas Dannenberg <dannenberg@ti.com>
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")
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
---
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(-)
diff --git a/arch/arm/mach-k3/r5/am62px/clk-data.c b/arch/arm/mach-k3/r5/am62px/clk-data.c
index 4b9892fe051..24e912f2e25 100644
--- a/arch/arm/mach-k3/r5/am62px/clk-data.c
+++ b/arch/arm/mach-k3/r5/am62px/clk-data.c
@@ -5,7 +5,7 @@
* This file is auto generated. Please do not hand edit and report any issues
* to Bryan Brattlof <bb@ti.com>.
*
- * 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"),
diff --git a/arch/arm/mach-k3/r5/am62px/dev-data.c b/arch/arm/mach-k3/r5/am62px/dev-data.c
index 3cc211ea202..63e6beb4d57 100644
--- a/arch/arm/mach-k3/r5/am62px/dev-data.c
+++ b/arch/arm/mach-k3/r5/am62px/dev-data.c
@@ -5,7 +5,7 @@
* This file is auto generated. Please do not hand edit and report any issues
* to Bryan Brattlof <bb@ti.com>.
*
- * 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 = {
--
2.34.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 09/13] arm: mach-k3: am62p5_init: Probe AM65 CPSW NUSS for R5/A53 SPL
2025-01-07 9:38 [PATCH 00/13] Add support for Ethernet boot on AM62p-SK and AM68-SK Chintan Vankar
` (7 preceding siblings ...)
2025-01-07 9:38 ` [PATCH 08/13] arm: mach-k3: am62p: Update SoC auto-gen data to enable CPSW boot Chintan Vankar
@ 2025-01-07 9:38 ` Chintan Vankar
2025-01-07 13:38 ` Bryan Brattlof
2025-01-07 14:18 ` Roger Quadros
2025-01-07 9:38 ` [PATCH 10/13] board: ti: am62px: evm: Enable cache for AM62p Chintan Vankar
` (3 subsequent siblings)
12 siblings, 2 replies; 36+ messages in thread
From: Chintan Vankar @ 2025-01-07 9:38 UTC (permalink / raw)
To: AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Roger Quadros, Hari Nagalla, Jonathan Humphreys,
Andreas Dannenberg, Simon Glass, Jayesh Choudhary, Aniket Limaye,
Aradhya Bhatia, Chintan Vankar, Neha Malcom Francis, Andrew Davis,
Ramon Fried, Joe Hershberger, Bryan Brattlof, Vignesh Raghavendra,
Manorit Chawdhry, Tom Rini
Cc: srk, s-vadapalli, danishanwar, u-boot
In order to support Ethernet boot on AM62p, probe AM65 CPSW NUSS
driver in board_init_f().
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
---
arch/arm/mach-k3/am62px/am62p5_init.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm/mach-k3/am62px/am62p5_init.c b/arch/arm/mach-k3/am62px/am62p5_init.c
index 34ed01cd78c..f8e98b09402 100644
--- a/arch/arm/mach-k3/am62px/am62p5_init.c
+++ b/arch/arm/mach-k3/am62px/am62p5_init.c
@@ -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__);
}
--
2.34.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 10/13] board: ti: am62px: evm: Enable cache for AM62p
2025-01-07 9:38 [PATCH 00/13] Add support for Ethernet boot on AM62p-SK and AM68-SK Chintan Vankar
` (8 preceding siblings ...)
2025-01-07 9:38 ` [PATCH 09/13] arm: mach-k3: am62p5_init: Probe AM65 CPSW NUSS for R5/A53 SPL Chintan Vankar
@ 2025-01-07 9:38 ` Chintan Vankar
2025-01-07 14:23 ` Roger Quadros
2025-01-07 9:38 ` [PATCH 11/13] configs: am62p: Add configs for enabling ETHBOOT in R5SPL Chintan Vankar
` (2 subsequent siblings)
12 siblings, 1 reply; 36+ messages in thread
From: Chintan Vankar @ 2025-01-07 9:38 UTC (permalink / raw)
To: AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Roger Quadros, Hari Nagalla, Jonathan Humphreys,
Andreas Dannenberg, Simon Glass, Jayesh Choudhary, Aniket Limaye,
Aradhya Bhatia, Chintan Vankar, Neha Malcom Francis, Andrew Davis,
Ramon Fried, Joe Hershberger, Bryan Brattlof, Vignesh Raghavendra,
Manorit Chawdhry, Tom Rini
Cc: srk, s-vadapalli, danishanwar, u-boot
From: Andreas Dannenberg <dannenberg@ti.com>
Enable cache to support Ethernet boot for AM62p-SK.
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
---
board/ti/am62px/evm.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/board/ti/am62px/evm.c b/board/ti/am62px/evm.c
index 7362fa4520a..2a85af980c7 100644
--- a/board/ti/am62px/evm.c
+++ b/board/ti/am62px/evm.c
@@ -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();
--
2.34.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 11/13] configs: am62p: Add configs for enabling ETHBOOT in R5SPL
2025-01-07 9:38 [PATCH 00/13] Add support for Ethernet boot on AM62p-SK and AM68-SK Chintan Vankar
` (9 preceding siblings ...)
2025-01-07 9:38 ` [PATCH 10/13] board: ti: am62px: evm: Enable cache for AM62p Chintan Vankar
@ 2025-01-07 9:38 ` Chintan Vankar
2025-01-07 9:38 ` [PATCH 12/13] configs: am62p: Enable configs required for Ethboot Chintan Vankar
2025-01-07 9:38 ` [PATCH 13/13] arch: arm: dts: k3-am62p5-sk-u-boot: Add bootph-all property to necessary nodes Chintan Vankar
12 siblings, 0 replies; 36+ messages in thread
From: Chintan Vankar @ 2025-01-07 9:38 UTC (permalink / raw)
To: AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Roger Quadros, Hari Nagalla, Jonathan Humphreys,
Andreas Dannenberg, Simon Glass, Jayesh Choudhary, Aniket Limaye,
Aradhya Bhatia, Chintan Vankar, Neha Malcom Francis, Andrew Davis,
Ramon Fried, Joe Hershberger, Bryan Brattlof, Vignesh Raghavendra,
Manorit Chawdhry, Tom Rini
Cc: srk, s-vadapalli, danishanwar, u-boot
From: Andreas Dannenberg <dannenberg@ti.com>
Add configs for enabling ETHBOOT in R5SPL.
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
---
configs/am62px_evm_r5_ethboot_defconfig | 35 +++++++++++++++++++++++++
1 file changed, 35 insertions(+)
create mode 100644 configs/am62px_evm_r5_ethboot_defconfig
diff --git a/configs/am62px_evm_r5_ethboot_defconfig b/configs/am62px_evm_r5_ethboot_defconfig
new file mode 100644
index 00000000000..d97b2b73680
--- /dev/null
+++ b/configs/am62px_evm_r5_ethboot_defconfig
@@ -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
--
2.34.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 12/13] configs: am62p: Enable configs required for Ethboot
2025-01-07 9:38 [PATCH 00/13] Add support for Ethernet boot on AM62p-SK and AM68-SK Chintan Vankar
` (10 preceding siblings ...)
2025-01-07 9:38 ` [PATCH 11/13] configs: am62p: Add configs for enabling ETHBOOT in R5SPL Chintan Vankar
@ 2025-01-07 9:38 ` Chintan Vankar
2025-01-07 14:12 ` Bryan Brattlof
2025-01-07 9:38 ` [PATCH 13/13] arch: arm: dts: k3-am62p5-sk-u-boot: Add bootph-all property to necessary nodes Chintan Vankar
12 siblings, 1 reply; 36+ messages in thread
From: Chintan Vankar @ 2025-01-07 9:38 UTC (permalink / raw)
To: AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Roger Quadros, Hari Nagalla, Jonathan Humphreys,
Andreas Dannenberg, Simon Glass, Jayesh Choudhary, Aniket Limaye,
Aradhya Bhatia, Chintan Vankar, Neha Malcom Francis, Andrew Davis,
Ramon Fried, Joe Hershberger, Bryan Brattlof, Vignesh Raghavendra,
Manorit Chawdhry, Tom Rini
Cc: srk, s-vadapalli, danishanwar, u-boot
Enable config options needed to support Ethernet boot on AM62p SK.
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
---
configs/am62px_evm_a53_ethboot_defconfig | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 configs/am62px_evm_a53_ethboot_defconfig
diff --git a/configs/am62px_evm_a53_ethboot_defconfig b/configs/am62px_evm_a53_ethboot_defconfig
new file mode 100644
index 00000000000..8f9b0c4b755
--- /dev/null
+++ b/configs/am62px_evm_a53_ethboot_defconfig
@@ -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
--
2.34.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [PATCH 13/13] arch: arm: dts: k3-am62p5-sk-u-boot: Add bootph-all property to necessary nodes
2025-01-07 9:38 [PATCH 00/13] Add support for Ethernet boot on AM62p-SK and AM68-SK Chintan Vankar
` (11 preceding siblings ...)
2025-01-07 9:38 ` [PATCH 12/13] configs: am62p: Enable configs required for Ethboot Chintan Vankar
@ 2025-01-07 9:38 ` Chintan Vankar
12 siblings, 0 replies; 36+ messages in thread
From: Chintan Vankar @ 2025-01-07 9:38 UTC (permalink / raw)
To: AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Roger Quadros, Hari Nagalla, Jonathan Humphreys,
Andreas Dannenberg, Simon Glass, Jayesh Choudhary, Aniket Limaye,
Aradhya Bhatia, Chintan Vankar, Neha Malcom Francis, Andrew Davis,
Ramon Fried, Joe Hershberger, Bryan Brattlof, Vignesh Raghavendra,
Manorit Chawdhry, Tom Rini
Cc: srk, s-vadapalli, danishanwar, u-boot
Add "bootph-all" property to necessary nodes required for Ethernet boot
starting from R5 SPL stage.
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
---
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/20250106123122.3531845-3-c-vankar@ti.com/
arch/arm/dts/k3-am62p5-sk-u-boot.dtsi | 32 +++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/arch/arm/dts/k3-am62p5-sk-u-boot.dtsi b/arch/arm/dts/k3-am62p5-sk-u-boot.dtsi
index cf087c6e343..be62cac7694 100644
--- a/arch/arm/dts/k3-am62p5-sk-u-boot.dtsi
+++ b/arch/arm/dts/k3-am62p5-sk-u-boot.dtsi
@@ -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;
+};
--
2.34.1
^ permalink raw reply related [flat|nested] 36+ messages in thread
* Re: [PATCH 09/13] arm: mach-k3: am62p5_init: Probe AM65 CPSW NUSS for R5/A53 SPL
2025-01-07 9:38 ` [PATCH 09/13] arm: mach-k3: am62p5_init: Probe AM65 CPSW NUSS for R5/A53 SPL Chintan Vankar
@ 2025-01-07 13:38 ` Bryan Brattlof
2025-01-07 14:18 ` Roger Quadros
1 sibling, 0 replies; 36+ messages in thread
From: Bryan Brattlof @ 2025-01-07 13:38 UTC (permalink / raw)
To: Chintan Vankar
Cc: AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Roger Quadros, Hari Nagalla, Jonathan Humphreys,
Andreas Dannenberg, Simon Glass, Jayesh Choudhary, Aniket Limaye,
Aradhya Bhatia, Neha Malcom Francis, Andrew Davis, Ramon Fried,
Joe Hershberger, Vignesh Raghavendra, Manorit Chawdhry, Tom Rini,
srk, s-vadapalli, danishanwar, u-boot
Hi Chintan!
On January 7, 2025 thus sayeth Chintan Vankar:
> In order to support Ethernet boot on AM62p, probe AM65 CPSW NUSS
> driver in board_init_f().
>
> Signed-off-by: Chintan Vankar <c-vankar@ti.com>
> ---
> arch/arm/mach-k3/am62px/am62p5_init.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/arch/arm/mach-k3/am62px/am62p5_init.c b/arch/arm/mach-k3/am62px/am62p5_init.c
> index 34ed01cd78c..f8e98b09402 100644
> --- a/arch/arm/mach-k3/am62px/am62p5_init.c
> +++ b/arch/arm/mach-k3/am62px/am62p5_init.c
> @@ -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__);
> }
>
Unfortunately with all the release activities we now have a simple merge
conflict with -next merging into -master.
~Bryan
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 02/13] arm: mach-k3: j721s2: Update SoC auto-gen data to enable Ethernet boot
2025-01-07 9:38 ` [PATCH 02/13] arm: mach-k3: j721s2: Update SoC auto-gen data to enable Ethernet boot Chintan Vankar
@ 2025-01-07 13:41 ` Bryan Brattlof
0 siblings, 0 replies; 36+ messages in thread
From: Bryan Brattlof @ 2025-01-07 13:41 UTC (permalink / raw)
To: Chintan Vankar
Cc: AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Roger Quadros, Hari Nagalla, Jonathan Humphreys,
Andreas Dannenberg, Simon Glass, Jayesh Choudhary, Aniket Limaye,
Aradhya Bhatia, Neha Malcom Francis, Andrew Davis, Ramon Fried,
Joe Hershberger, Vignesh Raghavendra, Manorit Chawdhry, Tom Rini,
srk, s-vadapalli, danishanwar, u-boot
On January 7, 2025 thus sayeth 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.
>
> Signed-off-by: Chintan Vankar <c-vankar@ti.com>
> ---
> 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(-)
>
Reviewed-by: Bryan Brattlof <bb@ti.com>
~Bryan
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 08/13] arm: mach-k3: am62p: Update SoC auto-gen data to enable CPSW boot
2025-01-07 9:38 ` [PATCH 08/13] arm: mach-k3: am62p: Update SoC auto-gen data to enable CPSW boot Chintan Vankar
@ 2025-01-07 13:58 ` Bryan Brattlof
0 siblings, 0 replies; 36+ messages in thread
From: Bryan Brattlof @ 2025-01-07 13:58 UTC (permalink / raw)
To: Chintan Vankar
Cc: AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Roger Quadros, Hari Nagalla, Jonathan Humphreys,
Andreas Dannenberg, Simon Glass, Jayesh Choudhary, Aniket Limaye,
Aradhya Bhatia, Neha Malcom Francis, Andrew Davis, Ramon Fried,
Joe Hershberger, Vignesh Raghavendra, Manorit Chawdhry, Tom Rini,
srk, s-vadapalli, danishanwar, u-boot
On January 7, 2025 thus sayeth Chintan Vankar:
> From: Andreas Dannenberg <dannenberg@ti.com>
>
> 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
> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
> Signed-off-by: Chintan Vankar <c-vankar@ti.com>
~Bryan
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 12/13] configs: am62p: Enable configs required for Ethboot
2025-01-07 9:38 ` [PATCH 12/13] configs: am62p: Enable configs required for Ethboot Chintan Vankar
@ 2025-01-07 14:12 ` Bryan Brattlof
0 siblings, 0 replies; 36+ messages in thread
From: Bryan Brattlof @ 2025-01-07 14:12 UTC (permalink / raw)
To: Chintan Vankar
Cc: AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Roger Quadros, Hari Nagalla, Jonathan Humphreys,
Andreas Dannenberg, Simon Glass, Jayesh Choudhary, Aniket Limaye,
Aradhya Bhatia, Neha Malcom Francis, Andrew Davis, Ramon Fried,
Joe Hershberger, Vignesh Raghavendra, Manorit Chawdhry, Tom Rini,
srk, s-vadapalli, danishanwar, u-boot
On January 7, 2025 thus sayeth Chintan Vankar:
> Enable config options needed to support Ethernet boot on AM62p SK.
>
> Signed-off-by: Chintan Vankar <c-vankar@ti.com>
> ---
> configs/am62px_evm_a53_ethboot_defconfig | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
> create mode 100644 configs/am62px_evm_a53_ethboot_defconfig
>
> diff --git a/configs/am62px_evm_a53_ethboot_defconfig b/configs/am62px_evm_a53_ethboot_defconfig
> new file mode 100644
> index 00000000000..8f9b0c4b755
> --- /dev/null
> +++ b/configs/am62px_evm_a53_ethboot_defconfig
> @@ -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
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 09/13] arm: mach-k3: am62p5_init: Probe AM65 CPSW NUSS for R5/A53 SPL
2025-01-07 9:38 ` [PATCH 09/13] arm: mach-k3: am62p5_init: Probe AM65 CPSW NUSS for R5/A53 SPL Chintan Vankar
2025-01-07 13:38 ` Bryan Brattlof
@ 2025-01-07 14:18 ` Roger Quadros
1 sibling, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2025-01-07 14:18 UTC (permalink / raw)
To: Chintan Vankar, AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Hari Nagalla, Jonathan Humphreys, Andreas Dannenberg, Simon Glass,
Jayesh Choudhary, Aniket Limaye, Aradhya Bhatia,
Neha Malcom Francis, Andrew Davis, Ramon Fried, Joe Hershberger,
Bryan Brattlof, Vignesh Raghavendra, Manorit Chawdhry, Tom Rini
Cc: srk, s-vadapalli, danishanwar, u-boot
On 07/01/2025 11:38, Chintan Vankar wrote:
> In order to support Ethernet boot on AM62p, probe AM65 CPSW NUSS
> driver in board_init_f().
>
> Signed-off-by: Chintan Vankar <c-vankar@ti.com>
> ---
> arch/arm/mach-k3/am62px/am62p5_init.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/arch/arm/mach-k3/am62px/am62p5_init.c b/arch/arm/mach-k3/am62px/am62p5_init.c
> index 34ed01cd78c..f8e98b09402 100644
> --- a/arch/arm/mach-k3/am62px/am62p5_init.c
> +++ b/arch/arm/mach-k3/am62px/am62p5_init.c
> @@ -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");
> + }
> +
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.
> debug("am62px_init: %s done\n", __func__);
> }
>
--
cheers,
-roger
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 01/13] net: tftp: Increase TFTP pkt string length to include null character
2025-01-07 9:38 ` [PATCH 01/13] net: tftp: Increase TFTP pkt string length to include null character Chintan Vankar
@ 2025-01-07 14:22 ` Tom Rini
2025-01-09 7:11 ` Vankar, Chintan
0 siblings, 1 reply; 36+ messages in thread
From: Tom Rini @ 2025-01-07 14:22 UTC (permalink / raw)
To: Chintan Vankar
Cc: AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Roger Quadros, Hari Nagalla, Jonathan Humphreys,
Andreas Dannenberg, Simon Glass, Jayesh Choudhary, Aniket Limaye,
Aradhya Bhatia, Neha Malcom Francis, Andrew Davis, Ramon Fried,
Joe Hershberger, Bryan Brattlof, Vignesh Raghavendra,
Manorit Chawdhry, srk, s-vadapalli, danishanwar, u-boot
[-- Attachment #1: Type: text/plain, Size: 516 bytes --]
On Tue, Jan 07, 2025 at 03:08:28PM +0530, Chintan Vankar wrote:
> '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.
>
> Signed-off-by: Chintan Vankar <c-vankar@ti.com>
Erm, if tiny-printf's sprintf doesn't work like lib/vsprintf.c's sprintf
in this regard, we should be fixing tiny-printf.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 10/13] board: ti: am62px: evm: Enable cache for AM62p
2025-01-07 9:38 ` [PATCH 10/13] board: ti: am62px: evm: Enable cache for AM62p Chintan Vankar
@ 2025-01-07 14:23 ` Roger Quadros
2025-01-22 9:22 ` Chintan Vankar
0 siblings, 1 reply; 36+ messages in thread
From: Roger Quadros @ 2025-01-07 14:23 UTC (permalink / raw)
To: Chintan Vankar, AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Hari Nagalla, Jonathan Humphreys, Andreas Dannenberg, Simon Glass,
Jayesh Choudhary, Aniket Limaye, Aradhya Bhatia,
Neha Malcom Francis, Andrew Davis, Ramon Fried, Joe Hershberger,
Bryan Brattlof, Vignesh Raghavendra, Manorit Chawdhry, Tom Rini
Cc: srk, s-vadapalli, danishanwar, u-boot
On 07/01/2025 11:38, Chintan Vankar wrote:
> From: Andreas Dannenberg <dannenberg@ti.com>
>
> 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?
>
> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
> Signed-off-by: Chintan Vankar <c-vankar@ti.com>
> ---
> board/ti/am62px/evm.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/board/ti/am62px/evm.c b/board/ti/am62px/evm.c
> index 7362fa4520a..2a85af980c7 100644
> --- a/board/ti/am62px/evm.c
> +++ b/board/ti/am62px/evm.c
> @@ -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();
--
cheers,
-roger
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 04/13] arm: mach-k3: j721s2_init: Probe AM65 CPSW NUSS for R5/A72 SPL
2025-01-07 9:38 ` [PATCH 04/13] arm: mach-k3: j721s2_init: Probe AM65 CPSW NUSS for R5/A72 SPL Chintan Vankar
@ 2025-01-07 14:33 ` Roger Quadros
2025-01-22 8:53 ` Chintan Vankar
0 siblings, 1 reply; 36+ messages in thread
From: Roger Quadros @ 2025-01-07 14:33 UTC (permalink / raw)
To: Chintan Vankar, AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Hari Nagalla, Jonathan Humphreys, Andreas Dannenberg, Simon Glass,
Jayesh Choudhary, Aniket Limaye, Aradhya Bhatia,
Neha Malcom Francis, Andrew Davis, Ramon Fried, Joe Hershberger,
Bryan Brattlof, Vignesh Raghavendra, Manorit Chawdhry, Tom Rini
Cc: srk, s-vadapalli, danishanwar, u-boot
On 07/01/2025 11:38, Chintan Vankar wrote:
> To support Ethernet boot on AM68-SK, probe AM65 CPSW NUSS driver in
> board_init_f().
>
> Signed-off-by: Chintan Vankar <c-vankar@ti.com>
> ---
> arch/arm/mach-k3/j721s2/j721s2_init.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/arch/arm/mach-k3/j721s2/j721s2_init.c b/arch/arm/mach-k3/j721s2/j721s2_init.c
> index 6ce3eb87efb..7208bee5785 100644
> --- a/arch/arm/mach-k3/j721s2/j721s2_init.c
> +++ b/arch/arm/mach-k3/j721s2/j721s2_init.c
> @@ -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");
> + }
> +
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?
> 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);
--
cheers,
-roger
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 05/13] configs: am68: Add configs for enabling Ethboot in R5SPL
2025-01-07 9:38 ` [PATCH 05/13] configs: am68: Add configs for enabling Ethboot in R5SPL Chintan Vankar
@ 2025-01-07 14:38 ` Roger Quadros
2025-01-09 8:43 ` Vankar, Chintan
0 siblings, 1 reply; 36+ messages in thread
From: Roger Quadros @ 2025-01-07 14:38 UTC (permalink / raw)
To: Chintan Vankar, AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Hari Nagalla, Jonathan Humphreys, Andreas Dannenberg, Simon Glass,
Jayesh Choudhary, Aniket Limaye, Aradhya Bhatia,
Neha Malcom Francis, Andrew Davis, Ramon Fried, Joe Hershberger,
Bryan Brattlof, Vignesh Raghavendra, Manorit Chawdhry, Tom Rini
Cc: srk, s-vadapalli, danishanwar, u-boot
On 07/01/2025 11:38, Chintan Vankar wrote:
> Add configs for enabling Ethernet boot in R5SPL.
>
> Signed-off-by: Chintan Vankar <c-vankar@ti.com>
> ---
> configs/am68_sk_r5_ethboot_defconfig | 80 ++++++++++++++++++++++++++++
> 1 file changed, 80 insertions(+)
> create mode 100644 configs/am68_sk_r5_ethboot_defconfig
>
> diff --git a/configs/am68_sk_r5_ethboot_defconfig b/configs/am68_sk_r5_ethboot_defconfig
> new file mode 100644
> index 00000000000..9bfbb5a3bfe
> --- /dev/null
> +++ b/configs/am68_sk_r5_ethboot_defconfig
> @@ -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
> +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
Please explain in commit log why you are setting many of the
options to "n". Is it due to memory limitation?
> +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
Why no OF_UPSTREAM?
> +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
--
cheers,
-roger
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 06/13] configs: am68: Enable configs required for Ethernet boot
2025-01-07 9:38 ` [PATCH 06/13] configs: am68: Enable configs required for Ethernet boot Chintan Vankar
@ 2025-01-07 14:40 ` Roger Quadros
0 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2025-01-07 14:40 UTC (permalink / raw)
To: Chintan Vankar, AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Hari Nagalla, Jonathan Humphreys, Andreas Dannenberg, Simon Glass,
Jayesh Choudhary, Aniket Limaye, Aradhya Bhatia,
Neha Malcom Francis, Andrew Davis, Ramon Fried, Joe Hershberger,
Bryan Brattlof, Vignesh Raghavendra, Manorit Chawdhry, Tom Rini
Cc: srk, s-vadapalli, danishanwar, u-boot
On 07/01/2025 11:38, Chintan Vankar wrote:
> Enable config options needed to support Ethernet boot on AM68-SK.
>
> Signed-off-by: Chintan Vankar <c-vankar@ti.com>
> ---
> configs/am68_sk_a72_ethboot_defconfig | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
> create mode 100644 configs/am68_sk_a72_ethboot_defconfig
>
> diff --git a/configs/am68_sk_a72_ethboot_defconfig b/configs/am68_sk_a72_ethboot_defconfig
> new file mode 100644
> index 00000000000..42469861961
> --- /dev/null
> +++ b/configs/am68_sk_a72_ethboot_defconfig
> @@ -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
Please avoid duplicates already in configs/am68_sk_a72_defconfig or
configs/j721s2_evm_a72_defconfig
--
cheers,
-roger
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 01/13] net: tftp: Increase TFTP pkt string length to include null character
2025-01-07 14:22 ` Tom Rini
@ 2025-01-09 7:11 ` Vankar, Chintan
2025-01-09 15:27 ` Tom Rini
0 siblings, 1 reply; 36+ messages in thread
From: Vankar, Chintan @ 2025-01-09 7:11 UTC (permalink / raw)
To: Tom Rini
Cc: AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Roger Quadros, Hari Nagalla, Jonathan Humphreys,
Andreas Dannenberg, Simon Glass, Jayesh Choudhary, Aniket Limaye,
Aradhya Bhatia, Neha Malcom Francis, Andrew Davis, Ramon Fried,
Joe Hershberger, Bryan Brattlof, Vignesh Raghavendra,
Manorit Chawdhry, srk, s-vadapalli, danishanwar, u-boot
On 1/7/2025 7:52 PM, Tom Rini wrote:
> On Tue, Jan 07, 2025 at 03:08:28PM +0530, Chintan Vankar wrote:
>
>> '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.
>>
>> Signed-off-by: Chintan Vankar <c-vankar@ti.com>
>
> 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.
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 05/13] configs: am68: Add configs for enabling Ethboot in R5SPL
2025-01-07 14:38 ` Roger Quadros
@ 2025-01-09 8:43 ` Vankar, Chintan
2025-01-09 16:44 ` Roger Quadros
0 siblings, 1 reply; 36+ messages in thread
From: Vankar, Chintan @ 2025-01-09 8:43 UTC (permalink / raw)
To: Roger Quadros, AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Hari Nagalla, Jonathan Humphreys, Andreas Dannenberg, Simon Glass,
Jayesh Choudhary, Aniket Limaye, Neha Malcom Francis,
Andrew Davis, Ramon Fried, Joe Hershberger, Bryan Brattlof,
Vignesh Raghavendra, Manorit Chawdhry, Tom Rini
Cc: srk, s-vadapalli, danishanwar, u-boot
On 1/7/2025 8:08 PM, Roger Quadros wrote:
>
>
> On 07/01/2025 11:38, Chintan Vankar wrote:
>> Add configs for enabling Ethernet boot in R5SPL.
>>
>> Signed-off-by: Chintan Vankar <c-vankar@ti.com>
>> ---
>> configs/am68_sk_r5_ethboot_defconfig | 80 ++++++++++++++++++++++++++++
>> 1 file changed, 80 insertions(+)
>> create mode 100644 configs/am68_sk_r5_ethboot_defconfig
>>
>> diff --git a/configs/am68_sk_r5_ethboot_defconfig b/configs/am68_sk_r5_ethboot_defconfig
>> new file mode 100644
>> index 00000000000..9bfbb5a3bfe
>> --- /dev/null
>> +++ b/configs/am68_sk_r5_ethboot_defconfig
>> @@ -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.
>> +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
>
> 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.
>> +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
>
> 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.
>> +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
>
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 01/13] net: tftp: Increase TFTP pkt string length to include null character
2025-01-09 7:11 ` Vankar, Chintan
@ 2025-01-09 15:27 ` Tom Rini
2025-03-20 7:14 ` Wadim Egorov
0 siblings, 1 reply; 36+ messages in thread
From: Tom Rini @ 2025-01-09 15:27 UTC (permalink / raw)
To: Vankar, Chintan
Cc: AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Roger Quadros, Hari Nagalla, Jonathan Humphreys,
Andreas Dannenberg, Simon Glass, Jayesh Choudhary, Aniket Limaye,
Aradhya Bhatia, Neha Malcom Francis, Andrew Davis, Ramon Fried,
Joe Hershberger, Bryan Brattlof, Vignesh Raghavendra,
Manorit Chawdhry, srk, s-vadapalli, danishanwar, u-boot
[-- Attachment #1: Type: text/plain, Size: 982 bytes --]
On Thu, Jan 09, 2025 at 12:41:56PM +0530, Vankar, Chintan wrote:
>
>
> On 1/7/2025 7:52 PM, Tom Rini wrote:
> > On Tue, Jan 07, 2025 at 03:08:28PM +0530, Chintan Vankar wrote:
> >
> > > '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.
> > >
> > > Signed-off-by: Chintan Vankar <c-vankar@ti.com>
> >
> > 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.
Then please rework the commit message, thanks.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 05/13] configs: am68: Add configs for enabling Ethboot in R5SPL
2025-01-09 8:43 ` Vankar, Chintan
@ 2025-01-09 16:44 ` Roger Quadros
0 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2025-01-09 16:44 UTC (permalink / raw)
To: Vankar, Chintan, AKASHI Takahiro, Mikhail Kshevetskiy,
Marek Vasut, Christian Marangi, Ilias Apalodimas, Sughosh Ganu,
Nishanth Menon, Hari Nagalla, Jonathan Humphreys,
Andreas Dannenberg, Simon Glass, Jayesh Choudhary, Aniket Limaye,
Neha Malcom Francis, Andrew Davis, Ramon Fried, Joe Hershberger,
Bryan Brattlof, Vignesh Raghavendra, Manorit Chawdhry, Tom Rini
Cc: srk, s-vadapalli, danishanwar, u-boot
On 09/01/2025 10:43, Vankar, Chintan wrote:
>
>
> On 1/7/2025 8:08 PM, Roger Quadros wrote:
>>
>>
>> On 07/01/2025 11:38, Chintan Vankar wrote:
>>> Add configs for enabling Ethernet boot in R5SPL.
>>>
>>> Signed-off-by: Chintan Vankar <c-vankar@ti.com>
>>> ---
>>> configs/am68_sk_r5_ethboot_defconfig | 80 ++++++++++++++++++++++++++++
>>> 1 file changed, 80 insertions(+)
>>> create mode 100644 configs/am68_sk_r5_ethboot_defconfig
>>>
>>> diff --git a/configs/am68_sk_r5_ethboot_defconfig b/configs/am68_sk_r5_ethboot_defconfig
>>> new file mode 100644
>>> index 00000000000..9bfbb5a3bfe
>>> --- /dev/null
>>> +++ b/configs/am68_sk_r5_ethboot_defconfig
>>> @@ -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.
>
Understood. Thanks!
>>> +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
>>
>> 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.
>
>>> +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
>>
>> 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.
I suggest to do a sync and not disable CONFIG_OF_UPSTREAM.
>
>>> +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
>>
--
cheers,
-roger
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 04/13] arm: mach-k3: j721s2_init: Probe AM65 CPSW NUSS for R5/A72 SPL
2025-01-07 14:33 ` Roger Quadros
@ 2025-01-22 8:53 ` Chintan Vankar
2025-01-23 9:40 ` Roger Quadros
0 siblings, 1 reply; 36+ messages in thread
From: Chintan Vankar @ 2025-01-22 8:53 UTC (permalink / raw)
To: Roger Quadros, AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Hari Nagalla, Jonathan Humphreys, Andreas Dannenberg, Simon Glass,
Jayesh Choudhary, Aniket Limaye, Aradhya Bhatia,
Neha Malcom Francis, Andrew Davis, Ramon Fried, Joe Hershberger,
Bryan Brattlof, Vignesh Raghavendra, Manorit Chawdhry, Tom Rini
Cc: srk, s-vadapalli, danishanwar, u-boot
On 07/01/25 20:03, Roger Quadros wrote:
>
>
> On 07/01/2025 11:38, Chintan Vankar wrote:
>> To support Ethernet boot on AM68-SK, probe AM65 CPSW NUSS driver in
>> board_init_f().
>>
>> Signed-off-by: Chintan Vankar <c-vankar@ti.com>
>> ---
>> arch/arm/mach-k3/j721s2/j721s2_init.c | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> diff --git a/arch/arm/mach-k3/j721s2/j721s2_init.c b/arch/arm/mach-k3/j721s2/j721s2_init.c
>> index 6ce3eb87efb..7208bee5785 100644
>> --- a/arch/arm/mach-k3/j721s2/j721s2_init.c
>> +++ b/arch/arm/mach-k3/j721s2/j721s2_init.c
>> @@ -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");
>> + }
>> +
>
> 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/ee1d16fd-b99b-4b07-97bb-a896e179157a@ti.com/
> 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?
>
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/d68c8045-116a-49c0-9e74-d6a366e6f008@kernel.org/#t
>> 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);
>
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 10/13] board: ti: am62px: evm: Enable cache for AM62p
2025-01-07 14:23 ` Roger Quadros
@ 2025-01-22 9:22 ` Chintan Vankar
0 siblings, 0 replies; 36+ messages in thread
From: Chintan Vankar @ 2025-01-22 9:22 UTC (permalink / raw)
To: Roger Quadros, AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Hari Nagalla, Jonathan Humphreys, Andreas Dannenberg, Simon Glass,
Jayesh Choudhary, Aniket Limaye, Aradhya Bhatia,
Neha Malcom Francis, Andrew Davis, Ramon Fried, Joe Hershberger,
Bryan Brattlof, Vignesh Raghavendra, Manorit Chawdhry, Tom Rini
Cc: srk, s-vadapalli, danishanwar, u-boot
On 07/01/25 19:53, Roger Quadros wrote:
>
>
> On 07/01/2025 11:38, Chintan Vankar wrote:
>> From: Andreas Dannenberg <dannenberg@ti.com>
>>
>> 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.
>>
>> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
>> Signed-off-by: Chintan Vankar <c-vankar@ti.com>
>> ---
>> board/ti/am62px/evm.c | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/board/ti/am62px/evm.c b/board/ti/am62px/evm.c
>> index 7362fa4520a..2a85af980c7 100644
>> --- a/board/ti/am62px/evm.c
>> +++ b/board/ti/am62px/evm.c
>> @@ -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();
>
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 04/13] arm: mach-k3: j721s2_init: Probe AM65 CPSW NUSS for R5/A72 SPL
2025-01-22 8:53 ` Chintan Vankar
@ 2025-01-23 9:40 ` Roger Quadros
2025-01-24 3:52 ` Vignesh Raghavendra
2025-01-28 4:09 ` Chintan Vankar
0 siblings, 2 replies; 36+ messages in thread
From: Roger Quadros @ 2025-01-23 9:40 UTC (permalink / raw)
To: Chintan Vankar, AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Hari Nagalla, Jonathan Humphreys, Andreas Dannenberg, Simon Glass,
Jayesh Choudhary, Aniket Limaye, Aradhya Bhatia,
Neha Malcom Francis, Andrew Davis, Ramon Fried, Joe Hershberger,
Bryan Brattlof, Vignesh Raghavendra, Manorit Chawdhry, Tom Rini,
Siddharth Vadapalli, Vignesh Raghavendra
Cc: srk, danishanwar, u-boot
+Vignesh & Siddharth
On 22/01/2025 10:53, Chintan Vankar wrote:
>
>
> On 07/01/25 20:03, Roger Quadros wrote:
>>
>>
>> On 07/01/2025 11:38, Chintan Vankar wrote:
>>> To support Ethernet boot on AM68-SK, probe AM65 CPSW NUSS driver in
>>> board_init_f().
>>>
>>> Signed-off-by: Chintan Vankar <c-vankar@ti.com>
>>> ---
>>> arch/arm/mach-k3/j721s2/j721s2_init.c | 10 ++++++++++
>>> 1 file changed, 10 insertions(+)
>>>
>>> diff --git a/arch/arm/mach-k3/j721s2/j721s2_init.c b/arch/arm/mach-k3/j721s2/j721s2_init.c
>>> index 6ce3eb87efb..7208bee5785 100644
>>> --- a/arch/arm/mach-k3/j721s2/j721s2_init.c
>>> +++ b/arch/arm/mach-k3/j721s2/j721s2_init.c
>>> @@ -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");
>>> + }
>>> +
>>
>> 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,
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?
> I have discussed the same with Nishanth in following thread:
> https://lore.kernel.org/all/ee1d16fd-b99b-4b07-97bb-a896e179157a@ti.com/
>
>> 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?
>>
> 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.
> Ethernet functionality here we need to probe function in board_init_f().
> We have discussed the same at here:
> https://lore.kernel.org/r/d68c8045-116a-49c0-9e74-d6a366e6f008@kernel.org/#t
>
>
>>> 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);
>>
--
cheers,
-roger
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 04/13] arm: mach-k3: j721s2_init: Probe AM65 CPSW NUSS for R5/A72 SPL
2025-01-23 9:40 ` Roger Quadros
@ 2025-01-24 3:52 ` Vignesh Raghavendra
2025-01-28 4:09 ` Chintan Vankar
1 sibling, 0 replies; 36+ messages in thread
From: Vignesh Raghavendra @ 2025-01-24 3:52 UTC (permalink / raw)
To: Roger Quadros, Chintan Vankar, Marek Vasut, Nishanth Menon,
Simon Glass, Neha Malcom Francis, Ramon Fried, Joe Hershberger,
Bryan Brattlof, Tom Rini, Siddharth Vadapalli
Cc: srk, danishanwar, u-boot
On 23/01/25 15:10, Roger Quadros wrote:
>> 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?
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.
--
Regards
Vignesh
https://ti.com/opensource
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 04/13] arm: mach-k3: j721s2_init: Probe AM65 CPSW NUSS for R5/A72 SPL
2025-01-23 9:40 ` Roger Quadros
2025-01-24 3:52 ` Vignesh Raghavendra
@ 2025-01-28 4:09 ` Chintan Vankar
2025-01-28 9:56 ` Roger Quadros
1 sibling, 1 reply; 36+ messages in thread
From: Chintan Vankar @ 2025-01-28 4:09 UTC (permalink / raw)
To: Roger Quadros, AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Hari Nagalla, Jonathan Humphreys, Andreas Dannenberg, Simon Glass,
Jayesh Choudhary, Aniket Limaye, Aradhya Bhatia,
Neha Malcom Francis, Andrew Davis, Ramon Fried, Joe Hershberger,
Bryan Brattlof, Vignesh Raghavendra, Manorit Chawdhry, Tom Rini,
Siddharth Vadapalli
Cc: srk, danishanwar, u-boot
On 23/01/25 15:10, Roger Quadros wrote:
> +Vignesh & Siddharth
>
> On 22/01/2025 10:53, Chintan Vankar wrote:
>>
>>
>> On 07/01/25 20:03, Roger Quadros wrote:
>>>
>>>
>>> On 07/01/2025 11:38, Chintan Vankar wrote:
>>>> To support Ethernet boot on AM68-SK, probe AM65 CPSW NUSS driver in
>>>> board_init_f().
>>>>
>>>> Signed-off-by: Chintan Vankar <c-vankar@ti.com>
>>>> ---
>>>> arch/arm/mach-k3/j721s2/j721s2_init.c | 10 ++++++++++
>>>> 1 file changed, 10 insertions(+)
>>>>
>>>> diff --git a/arch/arm/mach-k3/j721s2/j721s2_init.c b/arch/arm/mach-k3/j721s2/j721s2_init.c
>>>> index 6ce3eb87efb..7208bee5785 100644
>>>> --- a/arch/arm/mach-k3/j721s2/j721s2_init.c
>>>> +++ b/arch/arm/mach-k3/j721s2/j721s2_init.c
>>>> @@ -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");
>>>> + }
>>>> +
>>>
>>> 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,
>
> 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?
>
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 ?
>> I have discussed the same with Nishanth in following thread:
>> https://lore.kernel.org/all/ee1d16fd-b99b-4b07-97bb-a896e179157a@ti.com/
>>
>>> 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?
>>>
>> 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.
>> Ethernet functionality here we need to probe function in board_init_f().
>> We have discussed the same at here:
>> https://lore.kernel.org/r/d68c8045-116a-49c0-9e74-d6a366e6f008@kernel.org/#t
>>
>>
>>>> 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);
>>>
>
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 04/13] arm: mach-k3: j721s2_init: Probe AM65 CPSW NUSS for R5/A72 SPL
2025-01-28 4:09 ` Chintan Vankar
@ 2025-01-28 9:56 ` Roger Quadros
0 siblings, 0 replies; 36+ messages in thread
From: Roger Quadros @ 2025-01-28 9:56 UTC (permalink / raw)
To: Chintan Vankar, AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Hari Nagalla, Jonathan Humphreys, Andreas Dannenberg, Simon Glass,
Jayesh Choudhary, Aniket Limaye, Aradhya Bhatia,
Neha Malcom Francis, Andrew Davis, Ramon Fried, Joe Hershberger,
Bryan Brattlof, Vignesh Raghavendra, Manorit Chawdhry, Tom Rini,
Siddharth Vadapalli
Cc: srk, danishanwar, u-boot
On 28/01/2025 06:09, Chintan Vankar wrote:
>
>
> On 23/01/25 15:10, Roger Quadros wrote:
>> +Vignesh & Siddharth
>>
>> On 22/01/2025 10:53, Chintan Vankar wrote:
>>>
>>>
>>> On 07/01/25 20:03, Roger Quadros wrote:
>>>>
>>>>
>>>> On 07/01/2025 11:38, Chintan Vankar wrote:
>>>>> To support Ethernet boot on AM68-SK, probe AM65 CPSW NUSS driver in
>>>>> board_init_f().
>>>>>
>>>>> Signed-off-by: Chintan Vankar <c-vankar@ti.com>
>>>>> ---
>>>>> arch/arm/mach-k3/j721s2/j721s2_init.c | 10 ++++++++++
>>>>> 1 file changed, 10 insertions(+)
>>>>>
>>>>> diff --git a/arch/arm/mach-k3/j721s2/j721s2_init.c b/arch/arm/mach-k3/j721s2/j721s2_init.c
>>>>> index 6ce3eb87efb..7208bee5785 100644
>>>>> --- a/arch/arm/mach-k3/j721s2/j721s2_init.c
>>>>> +++ b/arch/arm/mach-k3/j721s2/j721s2_init.c
>>>>> @@ -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");
>>>>> + }
>>>>> +
>>>>
>>>> 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,
>>
>> 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?
>>
>
> 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!
>
>>> I have discussed the same with Nishanth in following thread:
>>> https://lore.kernel.org/all/ee1d16fd-b99b-4b07-97bb-a896e179157a@ti.com/
>>>
>>>> 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?
>>>>
>>> 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.
>
>>> Ethernet functionality here we need to probe function in board_init_f().
>>> We have discussed the same at here:
>>> https://lore.kernel.org/r/d68c8045-116a-49c0-9e74-d6a366e6f008@kernel.org/#t
>>>
>>>
>>>>> 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);
>>>>
>>
--
cheers,
-roger
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 01/13] net: tftp: Increase TFTP pkt string length to include null character
2025-01-09 15:27 ` Tom Rini
@ 2025-03-20 7:14 ` Wadim Egorov
2025-03-20 7:26 ` Chintan Vankar
0 siblings, 1 reply; 36+ messages in thread
From: Wadim Egorov @ 2025-03-20 7:14 UTC (permalink / raw)
To: Tom Rini, Vankar, Chintan
Cc: AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Roger Quadros, Hari Nagalla, Jonathan Humphreys,
Andreas Dannenberg, Simon Glass, Jayesh Choudhary, Aniket Limaye,
Aradhya Bhatia, Neha Malcom Francis, Andrew Davis, Ramon Fried,
Joe Hershberger, Bryan Brattlof, Vignesh Raghavendra,
Manorit Chawdhry, srk, s-vadapalli, danishanwar, u-boot
Am 09.01.25 um 23:27 schrieb Tom Rini:
> On Thu, Jan 09, 2025 at 12:41:56PM +0530, Vankar, Chintan wrote:
>>
>>
>> On 1/7/2025 7:52 PM, Tom Rini wrote:
>>> On Tue, Jan 07, 2025 at 03:08:28PM +0530, Chintan Vankar wrote:
>>>
>>>> '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.
>>>>
>>>> Signed-off-by: Chintan Vankar <c-vankar@ti.com>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
>>>
>>> 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.
>
> 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)
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [PATCH 01/13] net: tftp: Increase TFTP pkt string length to include null character
2025-03-20 7:14 ` Wadim Egorov
@ 2025-03-20 7:26 ` Chintan Vankar
0 siblings, 0 replies; 36+ messages in thread
From: Chintan Vankar @ 2025-03-20 7:26 UTC (permalink / raw)
To: Wadim Egorov, Tom Rini
Cc: AKASHI Takahiro, Mikhail Kshevetskiy, Marek Vasut,
Christian Marangi, Ilias Apalodimas, Sughosh Ganu, Nishanth Menon,
Roger Quadros, Hari Nagalla, Jonathan Humphreys,
Andreas Dannenberg, Simon Glass, Jayesh Choudhary, Aniket Limaye,
Aradhya Bhatia, Neha Malcom Francis, Andrew Davis, Ramon Fried,
Joe Hershberger, Bryan Brattlof, Vignesh Raghavendra,
Manorit Chawdhry, srk, s-vadapalli, danishanwar, u-boot
Hello Wadim,
On 20/03/25 12:44, Wadim Egorov wrote:
> Am 09.01.25 um 23:27 schrieb Tom Rini:
>> On Thu, Jan 09, 2025 at 12:41:56PM +0530, Vankar, Chintan wrote:
>>>
>>>
>>> On 1/7/2025 7:52 PM, Tom Rini wrote:
>>>> On Tue, Jan 07, 2025 at 03:08:28PM +0530, Chintan Vankar wrote:
>>>>
>>>>> '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.
>>>>>
>>>>> Signed-off-by: Chintan Vankar <c-vankar@ti.com>
>
> Tested-by: Wadim Egorov <w.egorov@phytec.de>
>
Thank you for testing the patch.
>>>>
>>>> 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.
>>
>> 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/20250220124908.3396843-1-alexander.sverdlin@siemens.com/
Regards,
Chintan.
> Filename 'phyboard-lyra-am62xx-3/tispl.bin'.
> Load address: 0x82000000
> Loading: *
> TFTP error: 'Request not null-terminated' (4)
>
^ permalink raw reply [flat|nested] 36+ messages in thread
end of thread, other threads:[~2025-03-20 7:26 UTC | newest]
Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-07 9:38 [PATCH 00/13] Add support for Ethernet boot on AM62p-SK and AM68-SK Chintan Vankar
2025-01-07 9:38 ` [PATCH 01/13] net: tftp: Increase TFTP pkt string length to include null character Chintan Vankar
2025-01-07 14:22 ` Tom Rini
2025-01-09 7:11 ` Vankar, Chintan
2025-01-09 15:27 ` Tom Rini
2025-03-20 7:14 ` Wadim Egorov
2025-03-20 7:26 ` Chintan Vankar
2025-01-07 9:38 ` [PATCH 02/13] arm: mach-k3: j721s2: Update SoC auto-gen data to enable Ethernet boot Chintan Vankar
2025-01-07 13:41 ` Bryan Brattlof
2025-01-07 9:38 ` [PATCH 03/13] arm: mach-k3: j721s2_spl: Alias Ethernet boot to CPGMAC Chintan Vankar
2025-01-07 9:38 ` [PATCH 04/13] arm: mach-k3: j721s2_init: Probe AM65 CPSW NUSS for R5/A72 SPL Chintan Vankar
2025-01-07 14:33 ` Roger Quadros
2025-01-22 8:53 ` Chintan Vankar
2025-01-23 9:40 ` Roger Quadros
2025-01-24 3:52 ` Vignesh Raghavendra
2025-01-28 4:09 ` Chintan Vankar
2025-01-28 9:56 ` Roger Quadros
2025-01-07 9:38 ` [PATCH 05/13] configs: am68: Add configs for enabling Ethboot in R5SPL Chintan Vankar
2025-01-07 14:38 ` Roger Quadros
2025-01-09 8:43 ` Vankar, Chintan
2025-01-09 16:44 ` Roger Quadros
2025-01-07 9:38 ` [PATCH 06/13] configs: am68: Enable configs required for Ethernet boot Chintan Vankar
2025-01-07 14:40 ` Roger Quadros
2025-01-07 9:38 ` [PATCH 07/13] arm: dts: k3-am68-sk-base-board-u-boot: Add bootph-all property to necessary nodes Chintan Vankar
2025-01-07 9:38 ` [PATCH 08/13] arm: mach-k3: am62p: Update SoC auto-gen data to enable CPSW boot Chintan Vankar
2025-01-07 13:58 ` Bryan Brattlof
2025-01-07 9:38 ` [PATCH 09/13] arm: mach-k3: am62p5_init: Probe AM65 CPSW NUSS for R5/A53 SPL Chintan Vankar
2025-01-07 13:38 ` Bryan Brattlof
2025-01-07 14:18 ` Roger Quadros
2025-01-07 9:38 ` [PATCH 10/13] board: ti: am62px: evm: Enable cache for AM62p Chintan Vankar
2025-01-07 14:23 ` Roger Quadros
2025-01-22 9:22 ` Chintan Vankar
2025-01-07 9:38 ` [PATCH 11/13] configs: am62p: Add configs for enabling ETHBOOT in R5SPL Chintan Vankar
2025-01-07 9:38 ` [PATCH 12/13] configs: am62p: Enable configs required for Ethboot Chintan Vankar
2025-01-07 14:12 ` Bryan Brattlof
2025-01-07 9:38 ` [PATCH 13/13] arch: arm: dts: k3-am62p5-sk-u-boot: Add bootph-all property to necessary nodes Chintan Vankar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox