summaryrefslogtreecommitdiff
path: root/include/samsung/tizen_amlogic.h
blob: 879c7f1126ae0a242b75f04bea4616713a6f5842 (plain)
1
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/*
 * Copyright (C) 2019 Samsung Electronics
 *
 * Configuration settings for the Tizen Amlogic board.
 *
 * SPDX-License-Identifier:	GPL-2.0+
 */

#ifndef __CONFIG_TIZEN_AMLOGIC_H
#define __CONFIG_TIZEN_AMLOGIC_H


/* ATAGs support for bootm/bootz */
#define CONFIG_SETUP_MEMORY_TAGS
#define CONFIG_CMDLINE_TAG
#define CONFIG_INITRD_TAG

#define CONFIG_SYS_MEM_TOP_HIDE		0x08000000

/* DFU */
/* For SD */
#define DFU_ALT_SYSTEM_SD		\
	"Image fat 0 1;"			\
	"meson64_odroidn2_drm.dtb fat 0 1;"		\
	"meson64_odroidn2.dtb fat 0 1;"		\
	"meson64_odroidc4.dtb fat 0 1;"		\
	"kvim3_linux.dtb fat 0 1;"		\
	"boot.scr.uimg fat 0 1;"		\
	"params.bin fat 0 1;"			\
	"/vim3/Image fat 0 1;"			\
	"/odroid-n2/Image fat 0 1;"			\
	"/odroid-c4/Image fat 0 1;"			\
	"/vim3/params.bin fat 0 1;"			\
	"/odroid-n2/params.bin fat 0 1;"		\
	"/odroid-c4/params.bin fat 0 1;"		\
	"/vim3/boot.scr.uimg fat 0 1;"		\
	"/odroid-n2/boot.scr.uimg fat 0 1;"		\
	"/odroid-c4/boot.scr.uimg fat 0 1;"		\
	"boot.img part 0 1;"			\
	"rootfs part 0 2;"			\
	"system-data part 0 3;"			\
	"user part 0 5;"			\
	"module part 0 6;"			\
	"ramdisk.img part 0 7\0"

/* For eMMC */
#define DFU_ALT_SYSTEM			\
	"Image fat 1 1;"			\
	"meson64_odroidn2_drm.dtb fat 1 1;"		\
	"meson64_odroidn2.dtb fat 1 1;"		\
	"meson64_odroidc4.dtb fat 1 1;"		\
	"kvim3_linux.dtb fat 1 1;"		\
	"boot.scr.uimg fat 1 1;"		\
	"boot.img part 1 1;"			\
	"params.bin fat 1 1;"			\
	"/vim3/Image fat 1 1;"			\
	"/odroid-n2/Image fat 1 1;"			\
	"/odroid-c4/Image fat 1 1;"			\
	"/vim3/params.bin fat 1 1;"			\
	"/odroid-n2/params.bin fat 1 1;"		\
	"/odroid-c4/params.bin fat 1 1;"		\
	"/vim3/boot.scr.uimg fat 1 1;"		\
	"/odroid-n2/boot.scr.uimg fat 1 1;"		\
	"/odroid-c4/boot.scr.uimg fat 1 1;"		\
	"rootfs part 1 2;"			\
	"system-data part 1 3;"			\
	"user part 1 5;"			\
	"module part 1 6;"			\
	"ramdisk.img part 1 7\0"


#define DFU_ALT_BOOT_EMMC_ODROID_N2	"u-boot.bin raw 0x1 0x850;"	\
				"u-boot-n2.bin raw 0x1 0x850;"		\
				"u-boot-c4.bin skip 0 0;"	\
				"u-boot-kvim3.bin skip 0 0"
#define DFU_ALT_BOOT_EMMC_KVIM3	"u-boot.bin raw 0x1 0x850;"	\
				"u-boot-kvim3.bin raw 0x1 0x850;"	\
				"u-boot-c4.bin skip 0 0;"	\
				"u-boot-n2.bin skip 0 0"
#define DFU_ALT_BOOT_EMMC_ODROID_C4	"u-boot.bin raw 0x1 0x850;"	\
				"u-boot-c4.bin raw 0x1 0x850;"	\
				"u-boot-kvim3.bin skip 0 0;"	\
				"u-boot-n2.bin skip 0 0"
#define DFU_ALT_BOOT_SD	""

/* SD/MMC configuration */
#define CONFIG_MMC_DEFAULT_DEV	1

#ifdef CONFIG_TIZEN_KHADAS_VIM3
#define TIZEN_BOOT_PREFIX "/vim3/ /\0"
#elif CONFIG_TIZEN_ODROID_N2
#define TIZEN_BOOT_PREFIX "/odroid-n2/ /\0"
#elif CONFIG_TIZEN_ODROID_C4
#define TIZEN_BOOT_PREFIX "/odroid-c4/ /\0"
#else
#define TIZEN_BOOT_PREFIX "/ /boot/\0"
#endif

#define TIZEN_ENV_SETTING \
	"mmcbootpart=1\0"			\
	"mmcrootpart=2\0"			\
	"mmcinformpart=9\0"			\
	"rebootparamfile=reboot-param.bin\0"	\
	"rebootparam_addr=0x02100000\0"		\
	"upgrade_val=72677075\0"		\
	"recovery_val=72766372\0"		\
	"nodef_val=6665646e\0"			\
	"download_val=6c6e7764\0"		\
	"ramdiskpart=7\0"			\
	"ramdisksize=800000\0"			\
	"bootmode=ramdisk\0"			\
	"bootdev=mmc\0"				\
	"tfm=setenv bootmode download; run bootcmd\0"	\
	"dfu_alt_system="DFU_ALT_SYSTEM			\
	"dfu_alt_system_sd="DFU_ALT_SYSTEM_SD			\
	"fdt_high=0x20000000\n"			\
	"initrd_high=0x3d800000\n"			\
	"opts=loglevel=4\0"			\
	"dfu_usb_con=0\0"			\
	"dfu_interface=mmc\0"			\
	"boot_prefixes="TIZEN_BOOT_PREFIX	\
	"dfu_device=" __stringify(CONFIG_MMC_DEFAULT_DEV) "\0"

#undef CONFIG_SYS_PROMPT
#define CONFIG_SYS_PROMPT	"Odroid N2> "

#define CONFIG_TIZEN

#endif /* __CONFIG_TIZEN_AMLOGIC_H */