blob: 23ce7e1af7462eae8ea06d82b732c37a44107e91 [file] [log] [blame]
Neha Malcom Francisb912d4f2023-03-15 10:57:45 +05301#include <environment/ti/ti_armv7_common.env>
2#include <environment/ti/mmc.env>
3#include <environment/ti/ufs.env>
4#include <environment/ti/k3_dfu.env>
5
6#if CONFIG_CMD_REMOTEPROC
7#include <environment/ti/k3_rproc.env>
8#endif
9
Andrew Davis5e1f4362023-07-14 11:22:30 +053010default_device_tree=ti/k3-j721e-common-proc-board.dtb
Neha Malcom Francisb912d4f2023-03-15 10:57:45 +053011findfdt=
12 setenv name_fdt ${default_device_tree};
13 if test $board_name = j721e; then
Andrew Davis5e1f4362023-07-14 11:22:30 +053014 setenv name_fdt ti/k3-j721e-common-proc-board.dtb; fi;
Neha Malcom Francis3efb17a2023-04-14 16:33:52 +053015 if test $board_name = j7200; then
Andrew Davis5e1f4362023-07-14 11:22:30 +053016 setenv name_fdt ti/k3-j7200-common-proc-board.dtb; fi;
Neha Malcom Francisb912d4f2023-03-15 10:57:45 +053017 if test $board_name = j721e-eaik || test $board_name = j721e-sk; then
Andrew Davis5e1f4362023-07-14 11:22:30 +053018 setenv name_fdt ti/k3-j721e-sk.dtb; fi;
Neha Malcom Francisb912d4f2023-03-15 10:57:45 +053019 setenv fdtfile ${name_fdt}
20name_kern=Image
21console=ttyS2,115200n8
22args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000
23 ${mtdparts}
24run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}
25
Neha Malcom Francisb912d4f2023-03-15 10:57:45 +053026#if CONFIG_TARGET_J721E_R5_EVM
27addr_mcur5f0_0load=0x89000000
28name_mcur5f0_0fw=/lib/firmware/j7-mcu-r5f0_0-fw
29#elif CONFIG_TARGET_J7200_R5_EVM
30addr_mcur5f0_0load=0x89000000
31name_mcur5f0_0fw=/lib/firmware/j7200-mcu-r5f0_0-fw
32#endif
Neha Malcom Francisb912d4f2023-03-15 10:57:45 +053033
34boot=mmc
35mmcdev=1
36bootpart=1:2
37bootdir=/boot
38rd_spec=-
39init_mmc=run args_all args_mmc
Neha Malcom Francisb912d4f2023-03-15 10:57:45 +053040get_overlay_mmc=
41 fdt address ${fdtaddr};
42 fdt resize 0x100000;
43 for overlay in $name_overlays;
44 do;
45 load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay} &&
46 fdt apply ${dtboaddr};
47 done;
48partitions=uuid_disk=${uuid_gpt_disk};
49 name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}
50get_kern_mmc=load mmc ${bootpart} ${loadaddr}
51 ${bootdir}/${name_kern}
52get_fit_mmc=load mmc ${bootpart} ${addr_fit}
53 ${bootdir}/${name_fit}
54
55#if CONFIG_TARGET_J7200_A72_EVM
56do_main_cpsw0_qsgmii_phyinit=1
57init_main_cpsw0_qsgmii_phy=gpio set gpio@22_17;
58 gpio clear gpio@22_16
59main_cpsw0_qsgmii_phyinit=
60 if test ${do_main_cpsw0_qsgmii_phyinit} -eq 1 && test ${dorprocboot} -eq 1 && test ${boot} = mmc; then
61 run init_main_cpsw0_qsgmii_phy;
62 fi;
63#elif CONFIG_TARGET_J721E_A72_EVM
64init_main_cpsw0_qsgmii_phy=gpio set gpio@22_17;
65 gpio clear gpio@22_16
66main_cpsw0_qsgmii_phyinit=
67 if test $board_name = J721EX-PM1-SOM || test $board_name = J721EX-PM2-SOM || test $board_name = j721e; then
68 do_main_cpsw0_qsgmii_phyinit=1; else
69 do_main_cpsw0_qsgmii_phyinit=0; fi;
70 if test ${do_main_cpsw0_qsgmii_phyinit} -eq 1 && test ${dorprocboot} -eq 1 && test ${boot} = mmc; then
71 run init_main_cpsw0_qsgmii_phy; \
72 fi;
73#endif
74
75#if CONFIG_TARGET_J721E_A72_EVM
76rproc_fw_binaries=2 /lib/firmware/j7-main-r5f0_0-fw 3 /lib/firmware/j7-main-r5f0_1-fw 4 /lib/firmware/j7-main-r5f1_0-fw 5 /lib/firmware/j7-main-r5f1_1-fw 6 /lib/firmware/j7-c66_0-fw 7 /lib/firmware/j7-c66_1-fw 8 /lib/firmware/j7-c71_0-fw
77#endif
78
79#if CONFIG_TARGET_J7200_A72_EVM
80rproc_fw_binaries=2 /lib/firmware/j7200-main-r5f0_0-fw 3 /lib/firmware/j7200-main-r5f0_1-fw
81#endif