blob: ce6665d0f34ac965dbe32584a92e3fb1aa7343dc [file] [log] [blame]
Svyatoslav Ryhelb8aa0b92023-07-11 13:47:02 +03001/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * (C) Copyright 2010,2012
4 * NVIDIA Corporation <www.nvidia.com>
5 *
6 * (C) Copyright 2023
7 * Svyatoslav Ryhel <clamor95@gmail.com>
8 */
9
10#ifndef __CONFIG_H
11#define __CONFIG_H
12
13#include "tegra30-common.h"
14
15/* High-level configuration options */
16#define CFG_TEGRA_BOARD_STRING "Wexler QC750"
17
18#define QC750_FLASH_UBOOT \
19 "flash_uboot=echo Preparing RAM;" \
20 "mw ${kernel_addr_r} 0 ${boot_block_size_r};" \
21 "mw ${ramdisk_addr_r} 0 ${boot_block_size_r};" \
22 "echo Reading BCT;" \
23 "mmc dev 0 1;" \
24 "mmc read ${kernel_addr_r} 0 ${boot_block_size};" \
25 "echo Reading bootloader;" \
26 "if load mmc 1:1 ${ramdisk_addr_r} ${bootloader_file};" \
27 "then echo Calculating bootloader size;" \
28 "size mmc 1:1 ${bootloader_file};" \
29 "ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};" \
30 "echo Writing bootloader to eMMC;" \
31 "mmc dev 0 1;" \
32 "mmc write ${kernel_addr_r} 0 ${boot_block_size};" \
33 "mmc dev 0 2;" \
34 "mmc write ${ramdisk_addr_r} 0 ${boot_block_size};" \
35 "echo Bootloader written successfully;" \
36 "pause 'Press ANY key to reboot device...'; reset;" \
37 "else echo Reading bootloader failed;" \
38 "pause 'Press ANY key to return to bootmenu...'; bootmenu; fi\0"
39
40#define QC750_BOOTMENU \
41 QC750_FLASH_UBOOT \
42 "bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu\0" \
43 "bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu\0" \
44 "bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu\0" \
45 "bootmenu_3=update bootloader=run flash_uboot\0" \
46 "bootmenu_4=reboot RCM=enterrcm\0" \
47 "bootmenu_5=reboot=reset\0" \
48 "bootmenu_6=power off=poweroff\0" \
49 "bootmenu_delay=-1\0"
50
51#define BOARD_EXTRA_ENV_SETTINGS \
52 "boot_block_size_r=0x200000\0" \
53 "boot_block_size=0x1000\0" \
54 "bootloader_file=u-boot-dtb-tegra.bin\0" \
55 "button_cmd_0_name=Volume Down\0" \
56 "button_cmd_0=bootmenu\0" \
57 "partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \
58 QC750_BOOTMENU
59
60/* Board-specific serial config */
61#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTD_BASE
62
63#include "tegra-common-post.h"
64
65#endif /* __CONFIG_H */