Skip to contentSkip to conversation

board: phytec: common: k3: Add missing boot source to env

PATCH In review Daniel Schultz 3 participants 9 messages Jan 16, 2025 – Jan 23, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 board: phytec: common: k3: Add missing boot source to env

We set the boot source as environment variable 'boot'. Also include 'uart' and 'usbdfu' as possible boot sources.

---
 board/phytec/common/k3/board.c | 6 ++++++
 1 file changed, 6 insertions(+)
board/phytec/common/k3/board.c +6 -0
index 9ff861cd3f4..ebdd5fb2abe 100644
@@ -148,6 +148,12 @@ int board_late_init(void)
 	case BOOT_DEVICE_ETHERNET:
 		env_set("boot", "net");
 		break;
+	case BOOT_DEVICE_UART:
+		env_set("boot", "uart");
+		break;
+	case BOOT_DEVICE_DFU:
+		env_set("boot", "usbdfu");
+		break;
 	};
 
 	if (IS_ENABLED(CONFIG_PHYTEC_SOM_DETECTION_BLOCKS)) {
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/4 configs: phycore_am64x_a53_defconfig: Fix GPIO controllers

The phyBOARD-Electra does not include a PCA953x I2C GPIO multiplexer. Remove this configuration as it is a remnant from another defconfig, and enable CONFIG_DA8XX_GPIO for the DA8XX DaVinci GPIO controller instead.

---
 configs/phycore_am64x_a53_defconfig | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
configs/phycore_am64x_a53_defconfig +1 -3
index bc450004722..4b9dcceda45 100644
@@ -112,11 +112,9 @@ CONFIG_SYS_DFU_MAX_FILE_SIZE=0x800000
 CONFIG_DMA_CHANNELS=y
 CONFIG_TI_K3_NAVSS_UDMA=y
 CONFIG_TI_SCI_PROTOCOL=y
-CONFIG_DM_PCA953X=y
-CONFIG_SPL_DM_PCA953X=y
+CONFIG_DA8XX_GPIO=y
 CONFIG_DM_I2C=y
 CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
-CONFIG_DM_I2C_GPIO=y
 CONFIG_SYS_I2C_OMAP24XX=y
 CONFIG_DM_MAILBOX=y
 CONFIG_K3_SEC_PROXY=y
Signature · 1 line
2.25.1
#3 lore raw

PATCH 3/4 configs: phycore_am64x_a53_defconfig: Enable GPIO command

In reply to Daniel Schultz

Enable the GPIO command to allow access to the GPIO pins.

---
 configs/phycore_am64x_a53_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/phycore_am64x_a53_defconfig +1 -0
index 4b9dcceda45..4a91b72e700 100644
@@ -72,6 +72,7 @@ CONFIG_CMD_BOOTEFI_SELFTEST=y
 CONFIG_CMD_ASKENV=y
 CONFIG_CMD_NVEDIT_EFI=y
 CONFIG_CMD_DFU=y
+CONFIG_CMD_GPIO=y
 CONFIG_CMD_GPT=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
Signature · 1 line
2.25.1
#5 lore raw

PATCH 4/4 configs: phycore_am64x_a53_defconfig: Fix environment

In reply to Daniel Schultz

Enable ENV_OVERWRITE to allow environment variables to be overwritten within the board code. This is required to add MAC addresses during SOM detection.

Additionally, set ENV_IS_NOWHERE for boot sources other than MMC.

---
 configs/phycore_am64x_a53_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/phycore_am64x_a53_defconfig +2 -0
index 4a91b72e700..3027a94b0d1 100644
@@ -89,6 +89,8 @@ CONFIG_OF_OVERLAY_LIST="ti/k3-am6xx-phycore-disable-spi-nor ti/k3-am6xx-phycore-
 CONFIG_MULTI_DTB_FIT=y
 CONFIG_SPL_MULTI_DTB_FIT=y
 CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
+CONFIG_ENV_OVERWRITE=y
+CONFIG_ENV_IS_NOWHERE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_MMC_ENV_DEV=1
Signature · 1 line
2.25.1
Reviewed-by on v1 1/4
#7 lore raw
In reply to Daniel Schultz

Am 16.01.25 um 18:29 schrieb Daniel Schultz:

Quoted 4 lines

We set the boot source as environment variable 'boot'. Also include 'uart' and 'usbdfu' as possible boot sources.

Quoted 21 lines
---
  board/phytec/common/k3/board.c | 6 ++++++
  1 file changed, 6 insertions(+)
board/phytec/common/k3/board.c +6 -0
index 9ff861cd3f4..ebdd5fb2abe 100644
@@ -148,6 +148,12 @@ int board_late_init(void)
  	case BOOT_DEVICE_ETHERNET:
  		env_set("boot", "net");
  		break;
+	case BOOT_DEVICE_UART:
+		env_set("boot", "uart");
+		break;
+	case BOOT_DEVICE_DFU:
+		env_set("boot", "usbdfu");
+		break;
  	};
 
  	if (IS_ENABLED(CONFIG_PHYTEC_SOM_DETECTION_BLOCKS)) {
Reviewed-by on v1 2/4
#2 lore raw

Re: [PATCH 2/4] configs: phycore_am64x_a53_defconfig: Fix GPIO controllers

In reply to Daniel Schultz

Am 16.01.25 um 18:29 schrieb Daniel Schultz:

Quoted 6 lines

The phyBOARD-Electra does not include a PCA953x I2C GPIO multiplexer. Remove this configuration as it is a remnant from another defconfig, and enable CONFIG_DA8XX_GPIO for the DA8XX DaVinci GPIO controller instead.

Quoted 21 lines
---
  configs/phycore_am64x_a53_defconfig | 4 +---
  1 file changed, 1 insertion(+), 3 deletions(-)
configs/phycore_am64x_a53_defconfig +1 -3
index bc450004722..4b9dcceda45 100644
@@ -112,11 +112,9 @@ CONFIG_SYS_DFU_MAX_FILE_SIZE=0x800000
  CONFIG_DMA_CHANNELS=y
  CONFIG_TI_K3_NAVSS_UDMA=y
  CONFIG_TI_SCI_PROTOCOL=y
-CONFIG_DM_PCA953X=y
-CONFIG_SPL_DM_PCA953X=y
+CONFIG_DA8XX_GPIO=y
  CONFIG_DM_I2C=y
  CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
-CONFIG_DM_I2C_GPIO=y
  CONFIG_SYS_I2C_OMAP24XX=y
  CONFIG_DM_MAILBOX=y
  CONFIG_K3_SEC_PROXY=y
Reviewed-by on v1 3/4
#4 lore raw

Re: [PATCH 3/4] configs: phycore_am64x_a53_defconfig: Enable GPIO command

In reply to Daniel Schultz

Am 16.01.25 um 18:29 schrieb Daniel Schultz:

Quoted 3 lines

Enable the GPIO command to allow access to the GPIO pins.

Quoted 16 lines
---
  configs/phycore_am64x_a53_defconfig | 1 +
  1 file changed, 1 insertion(+)
configs/phycore_am64x_a53_defconfig +1 -0
index 4b9dcceda45..4a91b72e700 100644
@@ -72,6 +72,7 @@ CONFIG_CMD_BOOTEFI_SELFTEST=y
  CONFIG_CMD_ASKENV=y
  CONFIG_CMD_NVEDIT_EFI=y
  CONFIG_CMD_DFU=y
+CONFIG_CMD_GPIO=y
  CONFIG_CMD_GPT=y
  CONFIG_CMD_I2C=y
  CONFIG_CMD_MMC=y
Reviewed-by on v1 4/4
#6 lore raw

Re: [PATCH 4/4] configs: phycore_am64x_a53_defconfig: Fix environment

In reply to Daniel Schultz

Am 16.01.25 um 18:29 schrieb Daniel Schultz:

Quoted 7 lines

Enable ENV_OVERWRITE to allow environment variables to be overwritten within the board code. This is required to add MAC addresses during SOM detection.

Additionally, set ENV_IS_NOWHERE for boot sources other than MMC.

Quoted 17 lines
---
  configs/phycore_am64x_a53_defconfig | 2 ++
  1 file changed, 2 insertions(+)
configs/phycore_am64x_a53_defconfig +2 -0
index 4a91b72e700..3027a94b0d1 100644
@@ -89,6 +89,8 @@ CONFIG_OF_OVERLAY_LIST="ti/k3-am6xx-phycore-disable-spi-nor ti/k3-am6xx-phycore-
  CONFIG_MULTI_DTB_FIT=y
  CONFIG_SPL_MULTI_DTB_FIT=y
  CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
+CONFIG_ENV_OVERWRITE=y
+CONFIG_ENV_IS_NOWHERE=y
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
  CONFIG_SYS_MMC_ENV_DEV=1
#8 lore raw
In reply to Daniel Schultz
Quoted 4 lines · Daniel Schultz

We set the boot source as environment variable 'boot'. Also include 'uart' and 'usbdfu' as possible boot sources.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom