diff options
author | Emanuele Ghidoli <emanuele.ghidoli@toradex.com> | 2023-12-01 14:36:20 +0100 |
---|---|---|
committer | Emanuele Ghidoli <emanuele.ghidoli@toradex.com> | 2023-12-01 14:36:20 +0100 |
commit | ff20984bc78933c081ab8f22a84dde8cdb38e8b9 (patch) | |
tree | c626e16fdb2e6d51a7dbc27bad5a556a8549ea4a /include | |
parent | 536d0d5eef241a80a352704d82f2284faac2b046 (diff) | |
parent | 71b8c840ca61a4e11b2cdf63b0e6580ecb427912 (diff) |
Merge tag '09.01.00.006' into toradex_ti-09.01.00.006
RC Release 09.01.00.006
Diffstat (limited to 'include')
-rw-r--r-- | include/configs/am62px_evm.h | 22 | ||||
-rw-r--r-- | include/configs/am62x_evm_android.h | 37 | ||||
-rw-r--r-- | include/configs/am64x_evm.h | 16 | ||||
-rw-r--r-- | include/configs/ti_omap5_common.h | 27 | ||||
-rw-r--r-- | include/environment/ti/k3_dfu_combined.env | 19 | ||||
-rw-r--r-- | include/environment/ti/mmc.env | 2 | ||||
-rw-r--r-- | include/environment/ti/mmc.h | 3 | ||||
-rw-r--r-- | include/environment/ti/mmc_android.env | 8 | ||||
-rw-r--r-- | include/environment/ti/ti_armv7_common.env | 10 | ||||
-rw-r--r-- | include/k3-clk.h | 1 | ||||
-rw-r--r-- | include/k3-dev.h | 1 |
11 files changed, 130 insertions, 16 deletions
diff --git a/include/configs/am62px_evm.h b/include/configs/am62px_evm.h new file mode 100644 index 0000000000..9a95253888 --- /dev/null +++ b/include/configs/am62px_evm.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Configuration header file for K3 AM62Px SoC family + * + * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/ + */ + +#ifndef __CONFIG_AM62PX_EVM_H +#define __CONFIG_AM62PX_EVM_H + +#include <config_distro_bootcmd.h> +#include <environment/ti/mmc.h> + +/* Now for the remaining common defines */ +#include <configs/ti_armv7_common.h> + +/* include Android related settings */ +#if CONFIG_CMD_ABOOTIMG +#include <configs/am62x_evm_android.h> +#endif + +#endif /* __CONFIG_AM62PX_EVM_H */ diff --git a/include/configs/am62x_evm_android.h b/include/configs/am62x_evm_android.h index afabdb4afe..7a1e90c3ae 100644 --- a/include/configs/am62x_evm_android.h +++ b/include/configs/am62x_evm_android.h @@ -74,9 +74,18 @@ "if test $board_name = am62x_skevm; then " \ "echo \" Reading DTB for am62x_skevm...\"; " \ "setenv dtb_index 0;" \ + "elif test $board_name = am62b_p1_skevm; then " \ + "echo \" Reading DTB for am62b_p1_skevm...\"; " \ + "setenv dtb_index 0;" \ "elif test $board_name = am62x_lp_skevm; then " \ "echo \" Reading DTB for am62x_lp_skevm...\"; " \ "setenv dtb_index 1;" \ + "elif test $board_name = am62x_beagleplay; then " \ + "echo \" Reading DTB for am62x_beagleplay...\"; " \ + "setenv dtb_index 2;" \ + "elif test $board_name = am62px; then " \ + "echo \" Reading DTB for am62px...\"; " \ + "setenv dtb_index 3;" \ "else " \ "echo Error: Android boot is not supported for $board_name; " \ "exit; " \ @@ -138,6 +147,8 @@ #define BOOTENV_DEV_RECOVERY(devtypeu, devtypel, instance) \ "bootcmd_recovery=" \ "setenv run_recovery 0;" \ + "setenv ramdisk_addr_r 0xe9000000;" \ + "setenv vloadaddr 0xe0000000;" \ "if bcb load " __stringify(CONFIG_FASTBOOT_FLASH_MMC_DEV) " " \ CONTROL_PARTITION "; then " \ "if bcb test command = boot-recovery; then; " \ @@ -163,10 +174,15 @@ "run avb_verify_cmd;" \ "part start mmc ${mmcdev} " RECOVERY_PARTITION "${slot_suffix} boot_start;" \ "part size mmc ${mmcdev} " RECOVERY_PARTITION "${slot_suffix} boot_size;" \ + "part start mmc ${mmcdev} vendor_boot${slot_suffix} vendor_boot_start;" \ + "part size mmc ${mmcdev} vendor_boot${slot_suffix} vendor_boot_size;" \ "if mmc read ${loadaddr} ${boot_start} ${boot_size}; then " \ - "run prepare_fdt_cmd;" \ - "echo Running Android Recovery...;" \ - BOOT_CMD \ + "if mmc read $vloadaddr ${vendor_boot_start} ${vendor_boot_size}; then " \ + "abootimg addr $loadaddr $vloadaddr;" \ + "run prepare_fdt_cmd;" \ + "echo Running Android Recovery...;" \ + BOOT_CMD \ + "fi;" \ "fi;" \ "echo Failed to boot Android...;" \ "reset;" \ @@ -182,13 +198,20 @@ "setenv bootargs ${bootargs} androidboot.serialno=${serial#};" \ "run ab_select_slot_cmd;" \ "run avb_verify_cmd;" \ + "setenv ramdisk_addr_r 0xe9000000;" \ + "setenv vloadaddr 0xe0000000;" \ "part start mmc ${mmcdev} " BOOT_PARTITION "${slot_suffix} boot_start;" \ "part size mmc ${mmcdev} " BOOT_PARTITION "${slot_suffix} boot_size;" \ + "part start mmc ${mmcdev} vendor_boot${slot_suffix} vendor_boot_start;" \ + "part size mmc ${mmcdev} vendor_boot${slot_suffix} vendor_boot_size;" \ "if mmc read ${loadaddr} ${boot_start} ${boot_size}; then " \ - "run prepare_fdt_cmd;" \ - "setenv bootargs \"${bootargs} " AB_BOOTARGS "\" ; " \ - "echo Running Android...;" \ - BOOT_CMD \ + "if mmc read $vloadaddr ${vendor_boot_start} ${vendor_boot_size}; then " \ + "abootimg addr $loadaddr $vloadaddr;" \ + "run prepare_fdt_cmd;" \ + "setenv bootargs \"${bootargs} " AB_BOOTARGS "\" ; " \ + "echo Running Android...;" \ + BOOT_CMD \ + "fi;" \ "fi;" \ "echo Failed to boot Android...\0" diff --git a/include/configs/am64x_evm.h b/include/configs/am64x_evm.h index 1e37ab47b9..dc42f4ba3d 100644 --- a/include/configs/am64x_evm.h +++ b/include/configs/am64x_evm.h @@ -21,4 +21,20 @@ /* Now for the remaining common defines */ #include <configs/ti_armv7_common.h> +/* NAND Driver config */ +#define CFG_SYS_NAND_BASE 0x51000000 + +#define CFG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \ + 10, 11, 12, 13, 14, 15, 16, 17, \ + 18, 19, 20, 21, 22, 23, 24, 25, \ + 26, 27, 28, 29, 30, 31, 32, 33, \ + 34, 35, 36, 37, 38, 39, 40, 41, \ + 42, 43, 44, 45, 46, 47, 48, 49, \ + 50, 51, 52, 53, 54, 55, 56, 57, } + +#define CFG_SYS_NAND_ECCSIZE 512 + +#define CFG_SYS_NAND_ECCBYTES 14 +/*-- end NAND config --*/ + #endif /* __CONFIG_AM642_EVM_H */ diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h index 74a39c4078..6c81353882 100644 --- a/include/configs/ti_omap5_common.h +++ b/include/configs/ti_omap5_common.h @@ -239,20 +239,47 @@ "if test $fdtfile = undefined; then " \ "echo WARNING: Could not determine device tree to use; fi; \0" +#define GET_OVERLAY_MMC_TI_ARGS \ + "get_overlay_mmc=" \ + "fdt address ${fdtaddr};" \ + "fdt resize 0x100000;" \ + "for overlay in $name_overlays;" \ + "do;" \ + "load mmc ${bootpart} ${dtboaddr} ${bootdir}/dtb/${overlay} &&" \ + "fdt apply ${dtboaddr};" \ + "done;\0" \ + #define BOOT_TARGET_DEVICES(func) \ + func(TI_MMC, ti_mmc, na) \ func(MMC, mmc, 0) \ func(MMC, mmc, 1) \ func(PXE, pxe, na) \ func(DHCP, dhcp, na) +#define BOOTENV_DEV_TI_MMC(devtypeu, devtypel, instance) \ + "bootcmd_ti_mmc= run get_name_kern; run mmcboot\0" + +#define BOOTENV_DEV_NAME_TI_MMC(devtyeu, devtypel, instance) \ + "ti_mmc " + #include <config_distro_bootcmd.h> #define CFG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ DEFAULT_MMC_TI_ARGS \ + "bootpart=0:2\0" \ + "bootdir=/boot\0" \ + "get_name_kern=" \ + "if test $boot_fit -eq 1; then " \ + "setenv bootfile fitImage; " \ + "else " \ + "setenv bootfile zImage; " \ + "fi\0" \ DEFAULT_FIT_TI_ARGS \ + "get_fit_config=setenv name_fit_config ${fdtfile}\0" \ DEFAULT_COMMON_BOOT_TI_ARGS \ DEFAULT_FDT_TI_ARGS \ + GET_OVERLAY_MMC_TI_ARGS \ DFUARGS \ NETARGS \ NANDARGS \ diff --git a/include/environment/ti/k3_dfu_combined.env b/include/environment/ti/k3_dfu_combined.env index eea3ad0d58..643fcdbdbf 100644 --- a/include/environment/ti/k3_dfu_combined.env +++ b/include/environment/ti/k3_dfu_combined.env @@ -13,7 +13,7 @@ dfu_alt_info_emmc= tiboot3.bin.raw raw 0x0 0x800 mmcpart 1; tispl.bin.raw raw 0x800 0x1000 mmcpart 1; u-boot.img.raw raw 0x1800 0x2000 mmcpart 1; - u-env.raw raw 0x3400 0x100 mmcpart 1 + u-env.raw raw 0x3800 0x100 mmcpart 1 dfu_alt_info_ospi= tiboot3.bin raw 0x0 0x100000; @@ -26,3 +26,20 @@ dfu_alt_info_ram= tispl.bin ram 0x80080000 0x200000; u-boot.img ram 0x81000000 0x400000 +dfu_alt_info_nand= + NAND.tiboot3 part 0 1; + NAND.tispl part 0 2; + NAND.tiboot3.backup part 0 3; + NAND.u-boot part 0 4; + NAND.u-boot-env part 0 5; + NAND.u-boot-env.backup part 0 6; + NAND.file-system part 0 7 + +dfu_alt_info_ospi_nand= + ospi_nand.tiboot3 part 1; + ospi_nand.tispl part 2; + ospi_nand.u-boot part 3; + ospi_nand.env part 4; + ospi_nand.env.backup part 5; + ospi_nand.rootfs part 6; + ospi_nand.phypattern part 7 diff --git a/include/environment/ti/mmc.env b/include/environment/ti/mmc.env index 6fb47fb266..1e62bf85da 100644 --- a/include/environment/ti/mmc.env +++ b/include/environment/ti/mmc.env @@ -66,7 +66,7 @@ get_overlay_mmc= fdt resize 0x100000; for overlay in $name_overlays; do; - load mmc ${bootpart} ${dtboaddr} ${bootdir}/dtb/${overlay} && + load mmc ${bootpart} ${dtboaddr} ${bootdir}/dtb/ti/${overlay} && fdt apply ${dtboaddr}; done; get_kern_mmc=load mmc ${bootpart} ${loadaddr} diff --git a/include/environment/ti/mmc.h b/include/environment/ti/mmc.h index 769ea9d5ef..09f8dccd3d 100644 --- a/include/environment/ti/mmc.h +++ b/include/environment/ti/mmc.h @@ -24,7 +24,7 @@ "env import -t ${loadaddr} ${filesize}\0" \ "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}\0" \ "loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ - "loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ + "loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/dtb/${fdtfile}\0" \ "envboot=mmc dev ${mmcdev}; " \ "if mmc rescan; then " \ "echo SD/MMC found on device ${mmcdev};" \ @@ -44,6 +44,7 @@ "mmcloados=" \ "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ "if run loadfdt; then " \ + "run get_overlay_mmc;" \ "bootz ${loadaddr} - ${fdtaddr}; " \ "else " \ "if test ${boot_fdt} = try; then " \ diff --git a/include/environment/ti/mmc_android.env b/include/environment/ti/mmc_android.env index fbf5d25312..7981d54396 100644 --- a/include/environment/ti/mmc_android.env +++ b/include/environment/ti/mmc_android.env @@ -3,10 +3,13 @@ partitions= name=bootloader,start=5M,size=8M,uuid=${uuid_gpt_bootloader}; partitions+=name=tiboot3,start=4M,size=1M,uuid=${uuid_gpt_tiboot3}; -partitions+=name=uboot-env,start=13M,size=512K,uuid=${uuid_gpt_env}; partitions+=name=misc,start=13824K,size=512K,uuid=${uuid_gpt_misc}; partitions+=name=boot_a,size=40M,uuid=${uuid_gpt_boot_a}; partitions+=name=boot_b,size=40M,uuid=${uuid_gpt_boot_b}; +partitions+=name=vendor_boot_a,size=32M,uuid=${uuid_gpt_vendor_boot_a}; +partitions+=name=vendor_boot_b,size=32M,uuid=${uuid_gpt_vendor_boot_b}; +partitions+=name=init_boot_a,size=8M,uuid=${uuid_gpt_init_boot_a}; +partitions+=name=init_boot_b,size=8M,uuid=${uuid_gpt_init_boot_b}; partitions+=name=dtbo_a,size=8M,uuid=${uuid_gpt_dtbo_a}; partitions+=name=dtbo_b,size=8M,uuid=${uuid_gpt_dtbo_b}; partitions+=name=vbmeta_a,size=64K,uuid=${uuid_gpt_vbmeta_a}; @@ -16,6 +19,9 @@ partitions+=name=metadata,size=16M,uuid=${uuid_gpt_metadata}; partitions+=name=persist,size=32M,uuid=${uuid_gpt_persist}; partitions+=name=userdata,size=-,uuid=${uuid_gpt_userdata} +fastboot.partition-type:metadata=ext4 mmcdev=0 force_avb=0 envboot=run distro_bootcmd + +fastboot_raw_partition_bootenv="0x800 0x400 mmcpart 1" diff --git a/include/environment/ti/ti_armv7_common.env b/include/environment/ti/ti_armv7_common.env index e87a41a659..f5d84216e3 100644 --- a/include/environment/ti/ti_armv7_common.env +++ b/include/environment/ti/ti_armv7_common.env @@ -15,10 +15,10 @@ boot_fit=0 addr_fit=0x90000000 name_fit=fitImage update_to_fit=setenv loadaddr ${addr_fit}; setenv bootfile ${name_fit} -get_overlaystring= - for overlay in $name_overlays; - do; - setenv overlaystring ${overlaystring}'#'${overlay}; +get_fit_overlaystring= + for overlay in $name_overlays; do; + setexpr name_fit_overlay gsub / _ conf-${overlay}; + setenv overlaystring ${overlaystring}'#'${name_fit_overlay}; done; get_fit_config=setexpr name_fit_config gsub / _ conf-${fdtfile} run_fit=run get_fit_config; bootm ${addr_fit}#${name_fit_config}${overlaystring} @@ -28,7 +28,7 @@ bootcmd_ti_mmc= run main_cpsw0_qsgmii_phyinit; run boot_rprocs; #endif if test ${boot_fit} -eq 1; - then run get_fit_${boot}; run get_overlaystring; run run_fit; + then run get_fit_${boot}; run get_fit_overlaystring; run run_fit; else; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; fi; diff --git a/include/k3-clk.h b/include/k3-clk.h index dac9af6487..71e8cfcc26 100644 --- a/include/k3-clk.h +++ b/include/k3-clk.h @@ -177,6 +177,7 @@ extern const struct ti_k3_clk_platdata j721s2_clk_platdata; extern const struct ti_k3_clk_platdata am62x_clk_platdata; extern const struct ti_k3_clk_platdata am62ax_clk_platdata; extern const struct ti_k3_clk_platdata j784s4_clk_platdata; +extern const struct ti_k3_clk_platdata am62px_clk_platdata; struct clk *clk_register_ti_pll(const char *name, const char *parent_name, void __iomem *reg); diff --git a/include/k3-dev.h b/include/k3-dev.h index 59970866f1..4908473ba3 100644 --- a/include/k3-dev.h +++ b/include/k3-dev.h @@ -81,6 +81,7 @@ extern const struct ti_k3_pd_platdata j721s2_pd_platdata; extern const struct ti_k3_pd_platdata am62x_pd_platdata; extern const struct ti_k3_pd_platdata am62ax_pd_platdata; extern const struct ti_k3_pd_platdata j784s4_pd_platdata; +extern const struct ti_k3_pd_platdata am62px_pd_platdata; u8 ti_pd_state(struct ti_pd *pd); u8 lpsc_get_state(struct ti_lpsc *lpsc); |