k3-bootswitch: Add support for j7200-evm board
authorNikhil Devshatwar <nikhil.nd@ti.com>
Tue, 11 Aug 2020 13:33:10 +0000 (19:03 +0530)
committerNikhil Devshatwar <nikhil.nd@ti.com>
Wed, 26 Aug 2020 07:12:57 +0000 (12:42 +0530)
Add arguments for selecting J7VCL EVM
Add the boot select binaries and prebuilt binaries for this
with UMS enabled in u-boot
Also add the uboot patch for generating the boot_select binaries

Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
k3-bootswitch/bin/j7200-evm/tiboot3.bin [new file with mode: 0644]
k3-bootswitch/bin/j7200-evm/tispl.bin [new file with mode: 0644]
k3-bootswitch/bin/j7200-evm/u-boot.img [new file with mode: 0644]
k3-bootswitch/boot_select/j7200-evm/0001-HACK-Select-bootmode-and-reset.patch [new file with mode: 0644]
k3-bootswitch/boot_select/j7200-evm/spl.emmc [new file with mode: 0644]
k3-bootswitch/boot_select/j7200-evm/spl.mmc [new file with mode: 0755]
k3-bootswitch/boot_select/j7200-evm/spl.noboot [new file with mode: 0644]
k3-bootswitch/boot_select/j7200-evm/spl.ospi [new file with mode: 0644]
k3-bootswitch/boot_select/j7200-evm/spl.uart [new file with mode: 0644]
k3-bootswitch/dfu-boot.sh

diff --git a/k3-bootswitch/bin/j7200-evm/tiboot3.bin b/k3-bootswitch/bin/j7200-evm/tiboot3.bin
new file mode 100644 (file)
index 0000000..30706a7
Binary files /dev/null and b/k3-bootswitch/bin/j7200-evm/tiboot3.bin differ
diff --git a/k3-bootswitch/bin/j7200-evm/tispl.bin b/k3-bootswitch/bin/j7200-evm/tispl.bin
new file mode 100644 (file)
index 0000000..6f8840a
Binary files /dev/null and b/k3-bootswitch/bin/j7200-evm/tispl.bin differ
diff --git a/k3-bootswitch/bin/j7200-evm/u-boot.img b/k3-bootswitch/bin/j7200-evm/u-boot.img
new file mode 100644 (file)
index 0000000..2397a92
Binary files /dev/null and b/k3-bootswitch/bin/j7200-evm/u-boot.img differ
diff --git a/k3-bootswitch/boot_select/j7200-evm/0001-HACK-Select-bootmode-and-reset.patch b/k3-bootswitch/boot_select/j7200-evm/0001-HACK-Select-bootmode-and-reset.patch
new file mode 100644 (file)
index 0000000..b51ffd9
--- /dev/null
@@ -0,0 +1,54 @@
+From 68d5f3892b26b02d2df03b3f2acb939d70532eb8 Mon Sep 17 00:00:00 2001
+From: Nikhil Devshatwar <nikhil.nd@ti.com>
+Date: Tue, 7 Apr 2020 18:33:36 +0530
+Subject: [PATCH] HACK: Select bootmode and reset
+
+Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
+---
+ arch/arm/mach-k3/j721e_init.c | 30 ++++++++++++++++++++++++++++++
+ 1 file changed, 30 insertions(+)
+
+diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c
+index 1e90c02ee5..8d910ebd6c 100644
+--- a/arch/arm/mach-k3/j721e_init.c
++++ b/arch/arm/mach-k3/j721e_init.c
+@@ -261,6 +261,36 @@ void board_init_f(ulong dummy)
+       /* Make all control module registers accessible */
+       ctrl_mmr_unlock();
++#define MMC   0xdead0000
++#define EMMC  0xdead0001
++#define OSPI  0xdead0002
++#define UART  0xdead0003
++#define NOBOOT        0xdead0004
++#define BOOTMODE NOBOOT
++
++#if BOOTMODE == MMC
++      /* Set the boot mode to MMC/SD */
++      *((volatile uint8_t *)0x00100030) = 0x41;
++      *((volatile uint8_t *)0x43000030) = 0x00;
++#elif BOOTMODE == EMMC
++      *((volatile uint8_t *)0x00100030) = 0x01;
++      *((volatile uint8_t *)0x43000030) = 0x08;
++#elif BOOTMODE == OSPI
++      /* Set the boot mode to OSPI */
++      *((volatile uint8_t *)0x00100030) = 0x00;
++      *((volatile uint8_t *)0x43000030) = 0x08;
++#elif BOOTMODE == UART
++      /* Set the boot mode to UART */
++      *((volatile uint8_t *)0x00100030) = 0x00;
++      *((volatile uint8_t *)0x43000030) = 0x38;
++#elif BOOTMODE == NOBOOT
++      /* Set the boot mode to UART */
++      *((volatile uint8_t *)0x00100030) = 0x11;
++      *((volatile uint8_t *)0x43000030) = 0x38;
++#endif
++      /* Issue a system reset */
++      *((volatile uint32_t *)0x4301817C) = 0x60000;
++
+ #ifdef CONFIG_CPU_V7R
+       disable_linefill_optimization();
+       setup_k3_mpu_regions();
+-- 
+2.17.1
+
diff --git a/k3-bootswitch/boot_select/j7200-evm/spl.emmc b/k3-bootswitch/boot_select/j7200-evm/spl.emmc
new file mode 100644 (file)
index 0000000..9473dc4
Binary files /dev/null and b/k3-bootswitch/boot_select/j7200-evm/spl.emmc differ
diff --git a/k3-bootswitch/boot_select/j7200-evm/spl.mmc b/k3-bootswitch/boot_select/j7200-evm/spl.mmc
new file mode 100755 (executable)
index 0000000..552f417
Binary files /dev/null and b/k3-bootswitch/boot_select/j7200-evm/spl.mmc differ
diff --git a/k3-bootswitch/boot_select/j7200-evm/spl.noboot b/k3-bootswitch/boot_select/j7200-evm/spl.noboot
new file mode 100644 (file)
index 0000000..8e1a67d
Binary files /dev/null and b/k3-bootswitch/boot_select/j7200-evm/spl.noboot differ
diff --git a/k3-bootswitch/boot_select/j7200-evm/spl.ospi b/k3-bootswitch/boot_select/j7200-evm/spl.ospi
new file mode 100644 (file)
index 0000000..02ef1ef
Binary files /dev/null and b/k3-bootswitch/boot_select/j7200-evm/spl.ospi differ
diff --git a/k3-bootswitch/boot_select/j7200-evm/spl.uart b/k3-bootswitch/boot_select/j7200-evm/spl.uart
new file mode 100644 (file)
index 0000000..6da0886
Binary files /dev/null and b/k3-bootswitch/boot_select/j7200-evm/spl.uart differ
index 1dea18f7013575ec2ac70140b4515ae586572589..e7e3cba05367050c2b5db465420d72525efbb660 100755 (executable)
@@ -14,8 +14,8 @@ usage()
        echo
        echo "dfu-boot.sh => Utility script to select bootmode and mount MMC to PC"
        echo "Usage:"
-       echo "  sudo ./dfu-boot.sh PLATFORM --mount DEV | --bootmode MODE"
-       echo "    PLATFORM: Either of --j721e-evm or --am65xx-evm"
+       echo "  sudo ./dfu-boot.sh --PLATFORM --mount DEV | --bootmode MODE"
+       echo "    PLATFORM: j721e-evm, j7200-evm, am65xx-evm"
        echo "    DEV: specify the device to mount => 1 for MMC, 0 for eMMC"
        echo "    MODE: specify the bootmode to use"
 }
@@ -26,8 +26,11 @@ board=$1
        if [ "$board" = "j721e-evm" ]; then
                uart_dev=/dev/ttyUSB0
                switch=0
+       elif [ "$board" = "j7200-evm" ]; then
+               uart_dev=/dev/ttyUSB6
+               switch=2
        elif [ "$board" = "am65xx-evm" ]; then
-               uart_dev=/dev/ttyUSB4
+               uart_dev=/dev/ttyUSB12
                switch=3
        else
                echo "Invalid board"
@@ -131,10 +134,14 @@ fi
 while [[ $# -gt 0 ]]
 do
 case $1 in
-       --j7|--j721e|--j721e-evm)
+       --j7|--j7es|--j721e|--j721e-evm)
                init "j721e-evm"
                shift
                ;;
+       --vcl|--j7vcl|--j7200|--j7200-evm)
+               init "j7200-evm"
+               shift
+               ;;
        --am6|--am654|--am65x-evm|--am654-idk|--am65xx-evm)
                init "am65xx-evm"
                shift