xref: /rk3399_rockchip-uboot/arch/arm/include/asm/arch-rockchip/boot_mode.h (revision 7a00f0a44b0ec80f61ab1cd47fc45a04869bbfa3)
1 #ifndef __REBOOT_MODE_H
2 #define __REBOOT_MODE_H
3 
4 /* high 24 bits is tag, low 8 bits is type */
5 #define REBOOT_FLAG		0x5242C300
6 /* cold boot */
7 #define BOOT_COLD		0
8 /* normal boot */
9 #define BOOT_NORMAL		(REBOOT_FLAG + 0)
10 /* enter loader rockusb mode */
11 #define BOOT_LOADER		(REBOOT_FLAG + 1)
12 /* enter recovery */
13 #define BOOT_RECOVERY		(REBOOT_FLAG + 3)
14 /* reboot by panic */
15 #define BOOT_PANIC		(REBOOT_FLAG + 7)
16 /* reboot by watchdog */
17 #define BOOT_WATCHDOG		(REBOOT_FLAG + 8)
18 /* enter fastboot mode */
19 #define BOOT_FASTBOOT		(REBOOT_FLAG + 9)
20 /* enter charging mode */
21 #define BOOT_CHARGING		(REBOOT_FLAG + 11)
22 /* enter usb mass storage mode */
23 #define BOOT_UMS		(REBOOT_FLAG + 12)
24 /* enter dfu download mode */
25 #define BOOT_DFU                (REBOOT_FLAG + 13)
26 /* enter bootrom download mode */
27 #define BOOT_BROM_DOWNLOAD	0xEF08A53C
28 
29 #ifndef __ASSEMBLY__
30 int setup_boot_mode(void);
31 #endif
32 
33 enum {
34 	BCB_MSG_RECOVERY_NONE,
35 	BCB_MSG_RECOVERY_RK_FWUPDATE,
36 	BCB_MSG_RECOVERY_PCBA,
37 };
38 
39 #endif
40