Skip to contentSkip to conversation

ARM: ti: AM64x: Clean up Ethernet boot support on AM64x SK

PATCH In review Vignesh Raghavendra 2 participants 9 messages Jan 21, 2022 – Jan 29, 2022

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

cover ARM: ti: AM64x: Clean up Ethernet boot support on AM64x SK

This series is follow up to [1]

First patch cleans up err msg in CPSW-NUSS driver
Second patch disable cpsw_port1 at SPL stage
Third patch increases SPL BSS size in anticipation of enabling network stack
Last patch enables all configs needed to support ethboot

[1] https://lore.kernel.org/u-boot/[email protected]/T/#t

Vignesh Raghavendra (4):
net: ti: am65-cpsw-nuss: Fix err msg for port bind failures
ARM: dts: k3-am642-sk: Disable cpsw_port1 in SPL
configs: am64xx_evm: Increase BSS max size to 16K
configs: am64x_evm_r5/a53_defconfig: Enable configs required for
Ethboot

 arch/arm/dts/k3-am642-r5-sk.dts      | 11 -----------
 arch/arm/dts/k3-am642-sk-u-boot.dtsi |  8 --------
 configs/am64x_evm_a53_defconfig      |  4 ++++
 configs/am64x_evm_r5_defconfig       | 12 ++++++++++++
 drivers/net/ti/am65-cpsw-nuss.c      |  2 +-
 include/configs/am64x_evm.h          |  2 +-
 6 files changed, 18 insertions(+), 21 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/4 net: ti: am65-cpsw-nuss: Fix err msg for port bind failures

Replace error case print with meaning full message.

---
 drivers/net/ti/am65-cpsw-nuss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ti/am65-cpsw-nuss.c +1 -1
index 6ae69b51c7..454986ff15 100644
@@ -752,7 +752,7 @@ static int am65_cpsw_probe_nuss(struct udevice *dev)
 
 		ret = device_bind_driver_to_node(dev, "am65_cpsw_nuss_port", ofnode_get_name(node), node, &port_dev);
 		if (ret)
-			printf("SCREEEM\n");
+			dev_err(dev, "Failed to bind to %s node\n", ofnode_get_name(node));
 	}
 
 	for (i = 0; i < AM65_CPSW_CPSWNU_MAX_PORTS; i++) {
Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH 1/4] net: ti: am65-cpsw-nuss: Fix err msg for port bind failures

Quoted 3 lines · Vignesh Raghavendra

Replace error case print with meaning full message.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#3 lore raw

PATCH 2/4 ARM: dts: k3-am642-sk: Disable cpsw_port1 in SPL

In reply to Vignesh Raghavendra

ROM supports cpsw_port2 for Ethernet boot and SPL stages continue to download images on the same port, therefore there is no need to enable cpsw_port1. Disable the same.

---
 arch/arm/dts/k3-am642-r5-sk.dts      | 11 -----------
 arch/arm/dts/k3-am642-sk-u-boot.dtsi |  8 --------
 2 files changed, 19 deletions(-)
arch/arm/dts/k3-am642-r5-sk.dts +0 -11
index 3a17448ca0..7d1cb85615 100644
@@ -231,23 +231,12 @@
 		     &rgmii2_pins_default>;
 };
 
-&cpsw_port1 {
-	phy-mode = "rgmii-rxid";
-	phy-handle = <&cpsw3g_phy0>;
-};
-
 &cpsw_port2 {
 	phy-mode = "rgmii-rxid";
 	phy-handle = <&cpsw3g_phy1>;
 };
 
 &cpsw3g_mdio {
-	cpsw3g_phy0: ethernet-phy@0 {
-		reg = <0>;
-		ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
-		ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
-	};
-
 	cpsw3g_phy1: ethernet-phy@1 {
 		reg = <1>;
 		ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
arch/arm/dts/k3-am642-sk-u-boot.dtsi +0 -8
index 2f5cfaa04f..e5c26b8326 100644
@@ -117,10 +117,6 @@
 	u-boot,dm-spl;
 };
 
-&cpsw_port1 {
-	u-boot,dm-spl;
-};
-
 &main_bcdma {
 	u-boot,dm-spl;
 };
@@ -141,10 +137,6 @@
 	u-boot,dm-spl;
 };
 
-&cpsw3g_phy0 {
-	u-boot,dm-spl;
-};
-
 &cpsw3g_phy1 {
 	u-boot,dm-spl;
 };
Signature · 1 line
2.34.1
#4 lore raw

Re: [PATCH 2/4] ARM: dts: k3-am642-sk: Disable cpsw_port1 in SPL

Quoted 5 lines · Vignesh Raghavendra

ROM supports cpsw_port2 for Ethernet boot and SPL stages continue to download images on the same port, therefore there is no need to enable cpsw_port1. Disable the same.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#5 lore raw

PATCH 3/4 configs: am64xx_evm: Increase BSS max size to 16K

In reply to Vignesh Raghavendra

With Ethboot support in SPL, network stack requires more BSS area, so increase BSS max size to 16K

---
 include/configs/am64x_evm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/am64x_evm.h +1 -1
index 99624081c3..135cb3c2ee 100644
@@ -33,7 +33,7 @@
  * our memory footprint. The less we use for BSS the more we have available
  * for everything else.
  */
-#define CONFIG_SPL_BSS_MAX_SIZE		0x1000
+#define CONFIG_SPL_BSS_MAX_SIZE		0x4000
 /*
  * Link BSS to be within SPL in a dedicated region located near the top of
  * the MCU SRAM, this way making it available also before relocation. Note
Signature · 1 line
2.34.1
#6 lore raw

Re: [PATCH 3/4] configs: am64xx_evm: Increase BSS max size to 16K

Quoted 4 lines · Vignesh Raghavendra

With Ethboot support in SPL, network stack requires more BSS area, so increase BSS max size to 16K

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#7 lore raw

PATCH 4/4 configs: am64x_evm_r5/a53_defconfig: Enable configs required for Ethboot

In reply to Vignesh Raghavendra

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

---
 configs/am64x_evm_a53_defconfig |  4 ++++
 configs/am64x_evm_r5_defconfig  | 12 ++++++++++++
 2 files changed, 16 insertions(+)
configs/am64x_evm_a53_defconfig +4 -0
index 3ce2129e49..77010a3ef1 100644
@@ -30,6 +30,7 @@ CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000
 CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run get_kern_${boot}; run get_fdt_${boot}; run run_kern"
 CONFIG_BOARD_LATE_INIT=y
+CONFIG_SPL_BOARD_INIT=y
 CONFIG_SPL_SYS_MALLOC_SIMPLE=y
 CONFIG_SPL_STACK_R=y
 CONFIG_SPL_SEPARATE_BSS=y
@@ -38,8 +39,11 @@ CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400
 CONFIG_SPL_DMA=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
+CONFIG_SPL_ETH=y
 CONFIG_SPL_DM_MAILBOX=y
 CONFIG_SPL_DM_SPI_FLASH=y
+CONFIG_SPL_NET=y
+CONFIG_SPL_NET_VCI_STRING="AM64X U-Boot A53 SPL"
 CONFIG_SPL_POWER_DOMAIN=y
 CONFIG_SPL_RAM_SUPPORT=y
 CONFIG_SPL_RAM_DEVICE=y
configs/am64x_evm_r5_defconfig +12 -0
index 2b609ad9ac..e51a2511d0 100644
@@ -38,10 +38,14 @@ CONFIG_SPL_SEPARATE_BSS=y
 CONFIG_SPL_EARLY_BSS=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400
+CONFIG_SPL_DMA=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_I2C=y
+CONFIG_SPL_ETH=y
 CONFIG_SPL_DM_MAILBOX=y
 CONFIG_SPL_DM_SPI_FLASH=y
+CONFIG_SPL_NET=y
+CONFIG_SPL_NET_VCI_STRING="AM64X U-Boot R5 SPL"
 CONFIG_SPL_DM_RESET=y
 CONFIG_SPL_POWER_DOMAIN=y
 CONFIG_SPL_RAM_SUPPORT=y
@@ -63,6 +67,7 @@ CONFIG_CMD_REMOTEPROC=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_USB_MASS_STORAGE=y
 # CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_DHCP=y
 CONFIG_CMD_TIME=y
 CONFIG_CMD_FAT=y
 CONFIG_OF_CONTROL=y
@@ -90,12 +95,15 @@ CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
 CONFIG_DFU_SF=y
 CONFIG_SYS_DFU_DATA_BUF_SIZE=0x5000
+CONFIG_DMA_CHANNELS=y
+CONFIG_TI_K3_NAVSS_UDMA=y
 CONFIG_TI_SCI_PROTOCOL=y
 CONFIG_DA8XX_GPIO=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_OMAP24XX=y
 CONFIG_DM_MAILBOX=y
 CONFIG_K3_SEC_PROXY=y
+CONFIG_SPL_MISC=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_ADMA=y
 CONFIG_SPL_MMC_SDHCI_ADMA=y
@@ -108,6 +116,9 @@ CONFIG_SPL_PHY=y
 CONFIG_PHY_CADENCE_SIERRA=y
 CONFIG_PHY_CADENCE_TORRENT=y
 CONFIG_PHY_J721E_WIZ=y
+CONFIG_PHY_TI_DP83867=y
+CONFIG_DM_ETH=y
+CONFIG_TI_AM65_CPSW_NUSS=y
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_GENERIC is not set
 CONFIG_SPL_PINCTRL=y
@@ -125,6 +136,7 @@ CONFIG_DM_RESET=y
 CONFIG_RESET_TI_SCI=y
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_DM_SERIAL=y
+CONFIG_SOC_TI=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_CADENCE_QSPI=y
Signature · 1 line
2.34.1
#8 lore raw

Re: [PATCH 4/4] configs: am64x_evm_r5/a53_defconfig: Enable configs required for Ethboot

Quoted 3 lines · Vignesh Raghavendra

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

Applied to u-boot/master, thanks!

Signature · 1 line
Tom