Merge patch series "phycore-am62/4: Add more boot sources"
Daniel Schultz <d.schultz@phytec.de> says: This patch stack extends the phyCORE-AM62x/AM64x U-Boot by following boot sources: - Load U-Boot with USB DFU - Load a Linux and initramfs from OSPI/QSPI NOR flash - Load a Linux and rootfs from Network Moreover, it adds required changes to the environment to boot an A/B system with RAUC and includes some minor fixes.
This commit is contained in:
@@ -9,6 +9,7 @@ F: arch/arm/dts/k3-am625-r5-phycore-som-2gb.dts
|
||||
F: board/phytec/phycore_am62x/
|
||||
F: configs/phycore_am62x_a53_defconfig
|
||||
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: board/phytec/common/k3
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include <env/ti/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
|
||||
@@ -15,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
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#include <env/phytec/k3_mmc.env>
|
||||
#include <env/phytec/k3_net.env>
|
||||
#include <env/phytec/k3_spi.env>
|
||||
|
||||
fdtaddr=0x88000000
|
||||
loadaddr=0x82000000
|
||||
@@ -14,3 +16,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
|
||||
|
||||
@@ -12,7 +12,7 @@ CONFIG_TARGET_PHYCORE_AM62X_A53=y
|
||||
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
|
||||
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80b80000
|
||||
CONFIG_SF_DEFAULT_SPEED=25000000
|
||||
CONFIG_ENV_SIZE=0x2000
|
||||
CONFIG_ENV_SIZE=0x20000
|
||||
CONFIG_ENV_OFFSET=0x680000
|
||||
CONFIG_SPL_DM_SPI=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="ti/k3-am625-phyboard-lyra-rdk"
|
||||
@@ -40,7 +40,7 @@ CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000
|
||||
CONFIG_BOOTSTD_FULL=y
|
||||
CONFIG_SYS_BOOTM_LEN=0x800000
|
||||
CONFIG_OF_BOARD_SETUP=y
|
||||
CONFIG_BOOTCOMMAND="run mmcboot; bootflow scan -lb"
|
||||
CONFIG_BOOTCOMMAND="run ${boot}boot; bootflow scan -lb"
|
||||
CONFIG_DEFAULT_FDT_FILE="oftree"
|
||||
CONFIG_BOARD_LATE_INIT=y
|
||||
CONFIG_SPL_MAX_SIZE=0x58000
|
||||
@@ -93,7 +93,7 @@ CONFIG_SPL_CLK=y
|
||||
CONFIG_CLK_TI_SCI=y
|
||||
CONFIG_DFU_MMC=y
|
||||
CONFIG_DFU_RAM=y
|
||||
CONFIG_SYS_DFU_DATA_BUF_SIZE=0x5000
|
||||
CONFIG_SYS_DFU_DATA_BUF_SIZE=0x40000
|
||||
CONFIG_SYS_DFU_MAX_FILE_SIZE=0x800000
|
||||
CONFIG_DMA_CHANNELS=y
|
||||
CONFIG_TI_K3_NAVSS_UDMA=y
|
||||
@@ -152,7 +152,7 @@ CONFIG_SPL_USB_DWC3_AM62=y
|
||||
CONFIG_USB_DWC3_AM62=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_SPL_USB_GADGET=y
|
||||
CONFIG_USB_GADGET_MANUFACTURER="Phytec"
|
||||
CONFIG_USB_GADGET_MANUFACTURER="PHYTEC"
|
||||
CONFIG_USB_GADGET_VENDOR_NUM=0x0451
|
||||
CONFIG_USB_GADGET_PRODUCT_NUM=0x6165
|
||||
CONFIG_USB_GADGET_DOWNLOAD=y
|
||||
|
||||
9
configs/phycore_am62x_r5_usbdfu_defconfig
Normal file
9
configs/phycore_am62x_r5_usbdfu_defconfig
Normal file
@@ -0,0 +1,9 @@
|
||||
#include <configs/phycore_am62x_r5_defconfig>
|
||||
#include <configs/am62x_r5_usbdfu.config>
|
||||
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARCH_K3=y
|
||||
CONFIG_SOC_K3_AM625=y
|
||||
CONFIG_TARGET_PHYCORE_AM62X_R5=y
|
||||
|
||||
CONFIG_USB_GADGET_MANUFACTURER="PHYTEC"
|
||||
@@ -37,7 +37,8 @@ CONFIG_SPL_SPI=y
|
||||
CONFIG_SPL_LOAD_FIT=y
|
||||
CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000
|
||||
CONFIG_BOOTSTD_FULL=y
|
||||
CONFIG_BOOTCOMMAND="run mmcboot; bootflow scan -lb"
|
||||
CONFIG_OF_BOARD_SETUP=y
|
||||
CONFIG_BOOTCOMMAND="run ${boot}boot; bootflow scan -lb"
|
||||
CONFIG_DEFAULT_FDT_FILE="oftree"
|
||||
CONFIG_BOARD_LATE_INIT=y
|
||||
CONFIG_SPL_MAX_SIZE=0x180000
|
||||
|
||||
16
include/env/phytec/k3_mmc.env
vendored
16
include/env/phytec/k3_mmc.env
vendored
@@ -7,15 +7,17 @@
|
||||
/* Logic for TI K3 based SoCs to boot from a MMC device. */
|
||||
|
||||
#include <env/phytec/overlays.env>
|
||||
#include <env/phytec/rauc.env>
|
||||
|
||||
mmcargs=setenv bootargs console=${console} earlycon=${earlycon}
|
||||
root=/dev/mmcblk${mmcdev}p${mmcroot} rootwait rw
|
||||
loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} Image
|
||||
loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdtfile}
|
||||
mmcboot=run mmcargs;
|
||||
root=/dev/mmcblk${mmcdev}p${mmcroot} ${raucargs} rootwait rw
|
||||
mmcloadimage=load mmc ${mmcdev}:${mmcpart} ${kernel_addr_r} Image
|
||||
mmcloadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdtfile}
|
||||
mmcboot=if test ${doraucboot} = 1; then run raucinit; fi;
|
||||
run mmcargs;
|
||||
mmc dev ${mmcdev};
|
||||
mmc rescan;
|
||||
run loadimage;
|
||||
run loadfdt;
|
||||
run mmcloadimage;
|
||||
run mmcloadfdt;
|
||||
run mmc_apply_overlays;
|
||||
booti ${loadaddr} - ${fdt_addr_r}
|
||||
booti ${kernel_addr_r} - ${fdt_addr_r}
|
||||
|
||||
22
include/env/phytec/k3_net.env
vendored
Normal file
22
include/env/phytec/k3_net.env
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2024 PHYTEC Messtechnik GmbH
|
||||
* Author: Daniel Schultz <d.schultz@phytec.de>
|
||||
*/
|
||||
|
||||
/* Logic for TI K3 based SoCs to boot via network. */
|
||||
|
||||
#include <env/phytec/overlays.env>
|
||||
|
||||
netargs=setenv bootargs console=${console} root=/dev/nfs ip=dhcp rw
|
||||
nfsroot=${serverip}:${nfsroot},vers=4,tcp
|
||||
netloadimage=${net_fetch_cmd} ${kernel_addr_r} ${serverip}:/Image
|
||||
netloadfdt=${net_fetch_cmd} ${fdt_addr_r} ${serverip}:/${fdtfile}
|
||||
netboot=run netargs;
|
||||
setenv autoload no;
|
||||
dhcp;
|
||||
run netloadimage;
|
||||
run netloadfdt;
|
||||
run net_apply_overlays;
|
||||
run net_apply_extensions;
|
||||
booti ${kernel_addr_r} - ${fdt_addr_r}
|
||||
18
include/env/phytec/k3_spi.env
vendored
Normal file
18
include/env/phytec/k3_spi.env
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2024 PHYTEC Messtechnik GmbH
|
||||
* Author: Daniel Schultz <d.schultz@phytec.de>
|
||||
*/
|
||||
|
||||
/* Logic for TI K3 based SoCs to boot from an OSPI/QSPI NOR flash. */
|
||||
|
||||
spiargs=setenv bootargs console=${console} earlycon=${earlycon}
|
||||
spiloadimage=sf read ${kernel_addr_r} ${spi_image_addr} ${size_kern}
|
||||
spiloadfdt=sf read ${fdt_addr_r} ${spi_fdt_addr} ${size_fdt}
|
||||
spiloadramdisk=sf read ${ramdisk_addr_r} ${spi_ramdisk_addr} ${size_fs}
|
||||
spiboot=run spiargs;
|
||||
sf probe;
|
||||
run spiloadimage;
|
||||
run spiloadfdt;
|
||||
run spiloadramdisk;
|
||||
booti ${kernel_addr_r} ${ramdisk_addr_r}:0x${size_fs} ${fdt_addr_r}
|
||||
Reference in New Issue
Block a user