summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/dts/k3-am625-phyboard-lyra-rdk-u-boot.dtsi4
-rw-r--r--arch/arm/dts/k3-am62a-phycore-som-binman.dtsi109
-rw-r--r--arch/arm/dts/k3-am62a7-phyboard-lyra-rdk-u-boot.dtsi4
-rw-r--r--board/phytec/common/Kconfig11
-rw-r--r--board/phytec/common/am6_som_detection.c5
-rw-r--r--board/phytec/common/am6_som_detection.h1
-rw-r--r--board/phytec/common/k3/board.c2
-rw-r--r--board/phytec/phycore_am62ax/MAINTAINERS1
-rw-r--r--board/phytec/phycore_am62ax/phycore_am62ax.env11
-rw-r--r--board/phytec/phycore_am62x/MAINTAINERS1
-rw-r--r--board/phytec/phycore_am62x/phycore_am62x.env2
-rw-r--r--configs/phycore_am62ax_a53_defconfig13
-rw-r--r--configs/phycore_am62ax_r5_usbdfu_defconfig4
-rw-r--r--doc/board/phytec/k3-common.rst67
-rw-r--r--doc/board/phytec/phycore-am62ax.rst2
-rw-r--r--doc/board/phytec/phycore-am62x.rst2
-rw-r--r--doc/board/phytec/phycore-am64x.rst2
-rw-r--r--include/configs/phycore_am62ax.h4
-rw-r--r--include/env/phytec/k3_dfu.env3
19 files changed, 243 insertions, 5 deletions
diff --git a/arch/arm/dts/k3-am625-phyboard-lyra-rdk-u-boot.dtsi b/arch/arm/dts/k3-am625-phyboard-lyra-rdk-u-boot.dtsi
index 2bc5acbec23..52c9cafe992 100644
--- a/arch/arm/dts/k3-am625-phyboard-lyra-rdk-u-boot.dtsi
+++ b/arch/arm/dts/k3-am625-phyboard-lyra-rdk-u-boot.dtsi
@@ -177,6 +177,10 @@
bootph-all;
};
+&usb0_phy_ctrl {
+ bootph-all;
+};
+
&vcc_3v3_mmc {
bootph-all;
};
diff --git a/arch/arm/dts/k3-am62a-phycore-som-binman.dtsi b/arch/arm/dts/k3-am62a-phycore-som-binman.dtsi
index 640361e0fd1..325702ed6e0 100644
--- a/arch/arm/dts/k3-am62a-phycore-som-binman.dtsi
+++ b/arch/arm/dts/k3-am62a-phycore-som-binman.dtsi
@@ -142,7 +142,21 @@
};
};
};
-#endif
+
+#include "k3-binman-capsule-r5.dtsi"
+
+&capsule_tiboot3 {
+ efi-capsule {
+ /*
+ * The GUID is generated dynamically by taking a namespace UUID and hashing
+ * it with the board compatible and fw_image name:
+ * mkeficapsule guidgen k3-am62a7-r5-phycore-som-2gb.dtb PHYCORE_AM62AX_TIBOOT3
+ */
+ image-guid = "07CA7DD0-85FF-597E-A485-B2423D3AE6C1";
+ };
+};
+
+#endif /* CONFIG_TARGET_PHYCORE_AM62AX_R5 */
#ifdef CONFIG_TARGET_PHYCORE_AM62AX_A53
@@ -306,6 +320,66 @@
description = "U-Boot for AM62Ax board";
};
+ som-no-rtc {
+ description = "k3-am6xx-phycore-disable-rtc";
+ type = "flat_dt";
+ compression = "none";
+ load = <0x8F000000>;
+ arch = "arm";
+ ti-secure {
+ content = <&am6xx_phycore_disable_rtc_dtbo>;
+ keyfile = "custMpk.pem";
+ };
+ am6xx_phycore_disable_rtc_dtbo: blob-ext {
+ filename = "dts/upstream/src/arm64/ti/k3-am6xx-phycore-disable-rtc.dtbo";
+ };
+ };
+
+ som-no-spi {
+ description = "k3-am6xx-phycore-disable-spi-nor";
+ type = "flat_dt";
+ compression = "none";
+ load = <0x8F001000>;
+ arch = "arm";
+ ti-secure {
+ content = <&am6xx_phycore_disable_spi_not_dtbo>;
+ keyfile = "custMpk.pem";
+ };
+ am6xx_phycore_disable_spi_not_dtbo: blob-ext {
+ filename = "dts/upstream/src/arm64/ti/k3-am6xx-phycore-disable-spi-nor.dtbo";
+ };
+ };
+
+ som-no-eth {
+ description = "k3-am6xx-phycore-disable-eth-phy";
+ type = "flat_dt";
+ compression = "none";
+ load = <0x8F002000>;
+ arch = "arm";
+ ti-secure {
+ content = <&am6xx_phycore_disable_eth_phy_dtbo>;
+ keyfile = "custMpk.pem";
+ };
+ am6xx_phycore_disable_eth_phy_dtbo: blob-ext {
+ filename = "dts/upstream/src/arm64/ti/k3-am6xx-phycore-disable-eth-phy.dtbo";
+ };
+ };
+
+ som-qspi {
+ description = "k3-am6xx-phycore-qspi-nor";
+ type = "flat_dt";
+ compression = "none";
+ load = <0x8F003000>;
+ arch = "arm";
+ ti-secure {
+ content = <&am6xx_phycore_disable_qspi_nor_dtbo>;
+ keyfile = "custMpk.pem";
+ };
+ am6xx_phycore_disable_qspi_nor_dtbo: blob-ext {
+ filename = "dts/upstream/src/arm64/ti/k3-am6xx-phycore-qspi-nor.dtbo";
+ };
+ };
+
fdt-0 {
description = "k3-am62a7-phyboard-lyra-rdk";
type = "flat_dt";
@@ -330,7 +404,11 @@
conf-0 {
description = "k3-am62a7-phyboard-lyra-rdk";
firmware = "uboot";
- loadables = "uboot";
+ loadables = "uboot",
+ "som-no-rtc",
+ "som-no-spi",
+ "som-no-eth",
+ "som-qspi";
fdt = "fdt-0";
};
};
@@ -451,4 +529,29 @@
};
};
};
-#endif
+
+#include "k3-binman-capsule.dtsi"
+
+&capsule_tispl {
+ efi-capsule {
+ /*
+ * The GUID is generated dynamically by taking a namespace UUID and hashing
+ * it with the board compatible and fw_image name:
+ * mkeficapsule guidgen k3-am62a7-phyboard-lyra-rdk.dtb PHYCORE_AM62AX_SPL
+ */
+ image-guid = "14F968A2-7C3A-50AD-9356-192F07AD2A9C";
+ };
+};
+
+&capsule_uboot {
+ efi-capsule {
+ /*
+ * The GUID is generated dynamically by taking a namespace UUID and hashing
+ * it with the board compatible and fw_image name:
+ * mkeficapsule guidgen k3-am62a7-phyboard-lyra-rdk.dtb PHYCORE_AM62AX_UBOOT
+ */
+ image-guid = "1F1148C5-2785-5E7C-9C58-C5B1EC0DC80C";
+ };
+};
+
+#endif /* CONFIG_TARGET_PHYCORE_AM62AX_A53 */
diff --git a/arch/arm/dts/k3-am62a7-phyboard-lyra-rdk-u-boot.dtsi b/arch/arm/dts/k3-am62a7-phyboard-lyra-rdk-u-boot.dtsi
index 41692c8f670..5a52f3d19c0 100644
--- a/arch/arm/dts/k3-am62a7-phyboard-lyra-rdk-u-boot.dtsi
+++ b/arch/arm/dts/k3-am62a7-phyboard-lyra-rdk-u-boot.dtsi
@@ -239,6 +239,10 @@
bootph-all;
};
+&usb0_phy_ctrl {
+ bootph-all;
+};
+
&vcc_3v3_mmc {
bootph-all;
};
diff --git a/board/phytec/common/Kconfig b/board/phytec/common/Kconfig
index bc5511707ac..65451a3b20d 100644
--- a/board/phytec/common/Kconfig
+++ b/board/phytec/common/Kconfig
@@ -38,6 +38,17 @@ config PHYTEC_AM62_SOM_DETECTION
Support of I2C EEPROM based SoM detection. Supported
for PHYTEC AM62x boards.
+config PHYTEC_AM62A_SOM_DETECTION
+ bool "Support SoM detection for AM62Ax PHYTEC platforms"
+ depends on (TARGET_PHYCORE_AM62AX_A53 || TARGET_PHYCORE_AM62AX_R5) && \
+ PHYTEC_SOM_DETECTION
+ select SUPPORT_EXTENSION_SCAN
+ depends on SPL_I2C && DM_I2C
+ default y
+ help
+ Support of I2C EEPROM based SoM detection. Supported
+ for PHYTEC AM62Ax boards.
+
config PHYTEC_AM64_SOM_DETECTION
bool "Support SoM detection for AM64x PHYTEC platforms"
depends on (TARGET_PHYCORE_AM64X_A53 || TARGET_PHYCORE_AM64X_R5) && \
diff --git a/board/phytec/common/am6_som_detection.c b/board/phytec/common/am6_som_detection.c
index 7930ab42d1c..f5de5de4821 100644
--- a/board/phytec/common/am6_som_detection.c
+++ b/board/phytec/common/am6_som_detection.c
@@ -11,10 +11,12 @@
extern struct phytec_eeprom_data eeprom_data;
#if IS_ENABLED(CONFIG_PHYTEC_AM62_SOM_DETECTION) || \
+ IS_ENABLED(CONFIG_PHYTEC_AM62A_SOM_DETECTION) || \
IS_ENABLED(CONFIG_PHYTEC_AM64_SOM_DETECTION)
/* Check if the SoM is actually one of the following products:
* - phyCORE-AM62x
+ * - phyCORE-AM62Ax
* - phyCORE-AM64x
*
* Returns 0 in case it's a known SoM. Otherwise, returns -1.
@@ -41,6 +43,9 @@ int phytec_am6_detect(struct phytec_eeprom_data *data)
if (som == PHYTEC_AM62X_SOM && soc_is_am62x())
return 0;
+ if (som == PHYTEC_AM62AX_SOM && soc_is_am62ax())
+ return 0;
+
if (som == PHYTEC_AM64X_SOM && soc_is_am64x())
return 0;
diff --git a/board/phytec/common/am6_som_detection.h b/board/phytec/common/am6_som_detection.h
index c5c6e179da6..0b3c9c8e1ee 100644
--- a/board/phytec/common/am6_som_detection.h
+++ b/board/phytec/common/am6_som_detection.h
@@ -11,6 +11,7 @@
#define EEPROM_ADDR 0x50
#define PHYTEC_AM62X_SOM 71
+#define PHYTEC_AM62AX_SOM 75
#define PHYTEC_AM64X_SOM 72
#define PHYTEC_EEPROM_VALUE_X 0x21
#define PHYTEC_EEPROM_NOR_FLASH_64MB_QSPI 0xC
diff --git a/board/phytec/common/k3/board.c b/board/phytec/common/k3/board.c
index 9d833456810..7d2146d5727 100644
--- a/board/phytec/common/k3/board.c
+++ b/board/phytec/common/k3/board.c
@@ -48,7 +48,7 @@ struct efi_capsule_update_info update_info = {
* Note: Currently, eMMC hardware partitions are not differentiated; Updates
* are always applied to the first boot partition.
*/
-void configure_capsule_updates(void)
+static void configure_capsule_updates(void)
{
static char dfu_string[128] = { 0 };
const char *dfu_raw = "tiboot3.bin raw 0x0 0x400 mmcpart 1;"
diff --git a/board/phytec/phycore_am62ax/MAINTAINERS b/board/phytec/phycore_am62ax/MAINTAINERS
index 3e4e2feff4e..7c8a29b20d9 100644
--- a/board/phytec/phycore_am62ax/MAINTAINERS
+++ b/board/phytec/phycore_am62ax/MAINTAINERS
@@ -10,5 +10,6 @@ F: arch/arm/dts/k3-am62a7-r5-phycore-som-2gb.dts
F: board/phytec/phycore_am62ax/
F: configs/phycore_am62ax_a53_defconfig
F: configs/phycore_am62ax_r5_defconfig
+F: configs/phycore_am62ax_r5_usbdfu_defconfig
F: include/configs/phycore_am62ax.h
F: doc/board/phytec/phycore-am62ax.rst
diff --git a/board/phytec/phycore_am62ax/phycore_am62ax.env b/board/phytec/phycore_am62ax/phycore_am62ax.env
index 77c5ea8d99a..a0eacd1dfc3 100644
--- a/board/phytec/phycore_am62ax/phycore_am62ax.env
+++ b/board/phytec/phycore_am62ax/phycore_am62ax.env
@@ -1,3 +1,8 @@
+#include <env/phytec/k3_dfu.env>
+#include <env/phytec/k3_mmc.env>
+#include <env/phytec/k3_net.env>
+#include <env/phytec/k3_spi.env>
+
fdtaddr=0x88000000
loadaddr=0x82000000
scriptaddr=0x80000000
@@ -12,3 +17,9 @@ mmcroot=2
mmcpart=1
console=ttyS2,115200n8
earlycon=ns16550a,mmio32,0x02800000
+
+get_cmd=tftp
+
+spi_fdt_addr=0x700000
+spi_image_addr=0x800000
+spi_ramdisk_addr=0x1e00000
diff --git a/board/phytec/phycore_am62x/MAINTAINERS b/board/phytec/phycore_am62x/MAINTAINERS
index 670c7473481..8f2b8069ad4 100644
--- a/board/phytec/phycore_am62x/MAINTAINERS
+++ b/board/phytec/phycore_am62x/MAINTAINERS
@@ -12,4 +12,5 @@ F: configs/phycore_am62x_r5_defconfig
F: configs/phycore_am62x_r5_usbdfu_defconfig
F: include/configs/phycore_am62x.h
F: doc/board/phytec/phycore-am62x.rst
+F: doc/board/phytec/k3-common.rst
F: board/phytec/common/k3
diff --git a/board/phytec/phycore_am62x/phycore_am62x.env b/board/phytec/phycore_am62x/phycore_am62x.env
index 024f38ebba3..5c48e856685 100644
--- a/board/phytec/phycore_am62x/phycore_am62x.env
+++ b/board/phytec/phycore_am62x/phycore_am62x.env
@@ -1,4 +1,4 @@
-#include <env/ti/k3_dfu.env>
+#include <env/phytec/k3_dfu.env>
#include <env/phytec/k3_mmc.env>
#include <env/phytec/k3_net.env>
#include <env/phytec/k3_spi.env>
diff --git a/configs/phycore_am62ax_a53_defconfig b/configs/phycore_am62ax_a53_defconfig
index 8c4fcc3b144..d86e19d914f 100644
--- a/configs/phycore_am62ax_a53_defconfig
+++ b/configs/phycore_am62ax_a53_defconfig
@@ -35,6 +35,9 @@ CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_SPL_SPI_FLASH_SUPPORT=y
CONFIG_SPL_SPI=y
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_EFI_SET_TIME=y
+CONFIG_EFI_CAPSULE_ON_DISK=y
+CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
CONFIG_SPL_LOAD_FIT=y
CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000
CONFIG_BOOTSTD_FULL=y
@@ -62,18 +65,25 @@ CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y
CONFIG_SPL_SPI_LOAD=y
CONFIG_SYS_SPI_U_BOOT_OFFS=0x280000
CONFIG_SPL_YMODEM_SUPPORT=y
+# CONFIG_CMD_BOOTEFI_HELLO is not set
+CONFIG_CMD_BOOTEFI_SELFTEST=y
+CONFIG_CMD_NVEDIT_EFI=y
CONFIG_CMD_DFU=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
CONFIG_CMD_MTD=y
+# CONFIG_CMD_POWEROFF is not set
+CONFIG_CMD_REMOTEPROC=y
CONFIG_CMD_USB=y
CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_CMD_CACHE=y
+CONFIG_CMD_EFIDEBUG=y
CONFIG_CMD_RTC=y
CONFIG_CMD_SMC=y
CONFIG_OF_CONTROL=y
CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_OVERLAY_LIST="ti/k3-am6xx-phycore-disable-spi-nor ti/k3-am6xx-phycore-disable-rtc ti/k3-am6xx-phycore-disable-eth-phy ti/k3-am6xx-phycore-qspi-nor"
CONFIG_MULTI_DTB_FIT=y
CONFIG_SPL_MULTI_DTB_FIT=y
CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
@@ -95,6 +105,7 @@ CONFIG_CLK=y
CONFIG_SPL_CLK=y
CONFIG_CLK_TI_SCI=y
CONFIG_DFU_MMC=y
+CONFIG_DFU_MTD=y
CONFIG_DFU_RAM=y
CONFIG_DFU_SF=y
CONFIG_SYS_DFU_DATA_BUF_SIZE=0x40000
@@ -118,6 +129,7 @@ CONFIG_MMC_SDHCI_ADMA=y
CONFIG_SPL_MMC_SDHCI_ADMA=y
CONFIG_MMC_SDHCI_AM654=y
CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH_SFDP_SUPPORT=y
# CONFIG_SPI_FLASH_SMART_HWCAPS is not set
@@ -175,3 +187,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0451
CONFIG_USB_GADGET_PRODUCT_NUM=0x6165
CONFIG_SPL_DFU=y
CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
+# CONFIG_HEXDUMP is not set
diff --git a/configs/phycore_am62ax_r5_usbdfu_defconfig b/configs/phycore_am62ax_r5_usbdfu_defconfig
new file mode 100644
index 00000000000..34674ce4371
--- /dev/null
+++ b/configs/phycore_am62ax_r5_usbdfu_defconfig
@@ -0,0 +1,4 @@
+#include <configs/phycore_am62ax_r5_defconfig>
+#include <configs/am62x_r5_usbdfu.config>
+
+CONFIG_USB_GADGET_MANUFACTURER="PHYTEC"
diff --git a/doc/board/phytec/k3-common.rst b/doc/board/phytec/k3-common.rst
new file mode 100644
index 00000000000..ffb50b51ad6
--- /dev/null
+++ b/doc/board/phytec/k3-common.rst
@@ -0,0 +1,67 @@
+.. SPDX-License-Identifier: GPL-2.0+
+.. sectionauthor:: Wadim Egorov <w.egorov@phytec.de>
+
+Environment
+-----------
+
+
+Variables Set at Runtime
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+At runtime the `boot` environment variable is set to reflect the source from which the board was booted. This ensures that the correct boot path is followed for further system initialization.
+
+
+Environment Storage Selection
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The environment is loaded from a storage location based on the boot device:
+
+* If booted from eMMC or uSD card, the environment is retrieved from FAT or a fixed offset if configured.
+
+* If booted from SPI, the environment is retrieved from SPI flash if enabled.
+
+For all other boot devices, the environment is not stored persistently (ENVL_NOWHERE).
+
+
+Saving the Environment
+~~~~~~~~~~~~~~~~~~~~~~
+
+The `saveenv` command will store the environment on the same device the board was booted from, ensuring consistency between boot sources and stored configurations.
+
+
+Capsule Updates
+---------------
+
+Capsules for each of these binaries are automatically generated as part of the build process and are named `<binary>-capsule.bin`. For example, the capsule for `u-boot.img` is named `uboot-capsule.bin`.
+
+
+
+Performing an Update
+~~~~~~~~~~~~~~~~~~~~
+
+Each board has a dynamically generated GUID. To retrieve it, run:
+
+.. code-block::
+
+ efidebug capsule esrt
+
+To update the firmware, follow these steps on the board. Ensure the capsule binaries are available on a uSD card.
+
+.. code-block:: bash
+
+ load mmc 1:1 $loadaddr tiboot3-capsule.bin
+ efidebug capsule update $loadaddr
+
+ load mmc 1:1 $loadaddr tispl-capsule.bin
+ efidebug capsule update $loadaddr
+
+ load mmc 1:1 $loadaddr uboot-capsule.bin
+ efidebug capsule update $loadaddr
+
+These commands load the capsule binaries into memory and trigger the EFI capsule update process.
+
+
+Important Notes
+~~~~~~~~~~~~~~~
+
+The updates are applied to the boot device from which the board is currently running. For eMMC, updates are always applied to the first boot partition. Capsule updates can be performed on eMMC, OSPI NOR, or a uSD card, depending on the boot device. For any additional configuration or troubleshooting, refer to :ref:`uefi_capsule_update_ref`.
diff --git a/doc/board/phytec/phycore-am62ax.rst b/doc/board/phytec/phycore-am62ax.rst
index 0c5b4814fc2..e1f741011e7 100644
--- a/doc/board/phytec/phycore-am62ax.rst
+++ b/doc/board/phytec/phycore-am62ax.rst
@@ -176,6 +176,8 @@ Boot switches should be changed with power off.
- 11011100
- 00000000
+.. include:: k3-common.rst
+
Further Information
-------------------
diff --git a/doc/board/phytec/phycore-am62x.rst b/doc/board/phytec/phycore-am62x.rst
index 56c1fd8354b..36315b49931 100644
--- a/doc/board/phytec/phycore-am62x.rst
+++ b/doc/board/phytec/phycore-am62x.rst
@@ -176,6 +176,8 @@ Boot switches should be changed with power off.
- 11001010
- 00100000
+.. include:: k3-common.rst
+
Further Information
-------------------
diff --git a/doc/board/phytec/phycore-am64x.rst b/doc/board/phytec/phycore-am64x.rst
index 01c42b90660..71f1fd7b404 100644
--- a/doc/board/phytec/phycore-am64x.rst
+++ b/doc/board/phytec/phycore-am64x.rst
@@ -175,6 +175,8 @@ Boot switches should be changed with power off.
- 11011100
- 00000000
+.. include:: k3-common.rst
+
Further Information
-------------------
diff --git a/include/configs/phycore_am62ax.h b/include/configs/phycore_am62ax.h
index 661ba8f73ca..4f612d2c2ce 100644
--- a/include/configs/phycore_am62ax.h
+++ b/include/configs/phycore_am62ax.h
@@ -12,4 +12,8 @@
/* DDR Configuration */
#define CFG_SYS_SDRAM_BASE 0x80000000
+#define PHYCORE_AM6XX_FW_NAME_TIBOOT3 u"PHYCORE_AM62AX_TIBOOT3"
+#define PHYCORE_AM6XX_FW_NAME_SPL u"PHYCORE_AM62AX_SPL"
+#define PHYCORE_AM6XX_FW_NAME_UBOOT u"PHYCORE_AM62AX_UBOOT"
+
#endif /* __PHYCORE_AM62AX_H */
diff --git a/include/env/phytec/k3_dfu.env b/include/env/phytec/k3_dfu.env
new file mode 100644
index 00000000000..0cba87da99d
--- /dev/null
+++ b/include/env/phytec/k3_dfu.env
@@ -0,0 +1,3 @@
+dfu_alt_info_ram=
+ tispl.bin ram 0x80080000 0x200000;
+ u-boot.img ram 0x81000000 0x400000