samsung: tizen_bpif3: Add tien_bpif3 header file 97/315497/2
authorJaehoon Chung <jh80.chung@samsung.com>
Wed, 31 Jul 2024 05:23:41 +0000 (14:23 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Fri, 2 Aug 2024 03:29:49 +0000 (12:29 +0900)
Add tizen_bpif3 header file to use a tizen specific environment.

Change-Id: Ic2fd7f5e095523089f74317ec0fa23bf921d74c8
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
include/samsung/tizen_bpif3.h [new file with mode: 0644]

diff --git a/include/samsung/tizen_bpif3.h b/include/samsung/tizen_bpif3.h
new file mode 100644 (file)
index 0000000..150c964
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2024 Samsung Electronics
+ *
+ * Configuration settings for the Tizen on BPI-F3 board.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __CONFIG_TIZEN_BPI_F3_H
+#define __CONFIG_TIZEN_BPI_F3_H
+
+#define TIZEN_TARGET_ENV_SETTING \
+       "devnum=0\0"                    \
+       "devtype=mmc\0"                 \
+       ""
+#define SET_INFORM_PART        \
+       "part number ${devtype} ${devnum} ${informname} informpart; "
+
+#define CLEAR_REBOOT_PARAM \
+       SET_INFORM_PART \
+       "mw.l ${rebootparam_addr} ${normal_val} ; "                                             \
+       "ext4write ${devtype} ${devnum}:${informpart} ${rebootparam_addr} /${rebootparamfile} 8; "
+
+
+/* SD/MMC configuration */
+#define CONFIG_MMC_DEFAULT_DEV 0
+
+#define KERNEL_NAME    "Image"
+
+#define TIZEN_ENV_SETTING \
+       TIZEN_TARGET_ENV_SETTING                \
+       "kernel=" KERNEL_NAME "\0"              \
+       "informname=inform\0"                   \
+       "bootname=bootfs\0"                     \
+       "rebootparamfile=reboot-param.bin\0"    \
+       "upgradetypefile=upgrade-type.info\0"   \
+       "slotfile=partition-ab.info\0"  \
+       "slot_addr=0x22000000\0"                \
+       "rebootparam_addr=0x22100000\0"         \
+       "upgradetype_addr=0x22300000\0"         \
+       "upgradetype_online_val=696c6e6f\0"     \
+       "upgrade_val=72677075\0"                \
+       "recovery_val=72766372\0"               \
+       "nodef_val=6665646e\0"                  \
+       "normal_val=6d726f6e\0"                 \
+       "download_val=6c6e7764\0"               \
+       "ramdisk_addr_r=0x20000000\0"           \
+       "kernel_addr_r=0x10000000\0"            \
+       "scriptaddr=0x1e000000\0"               \
+       "fdt_high=0x1f000000\0"         \
+       "tfm=setenv bootmode download; run bootcmd\0"   \
+       "tizen_bootarg= \0"     \
+       "opts=loglevel=7\0"                     \
+       "reboot_param_clear=" CLEAR_REBOOT_PARAM "\0"                           \
+       "script=boot.scr.uimg\0" \
+       "prefix=/\0" \
+       "set_to_part_a=" \
+               SET_INFORM_PART \
+               "if test -e ${devtype} ${devnum}:${informpart} ${slotfile}; then; " \
+                       "load ${devtype} ${devnum}:${informpart} ${slot_addr} /${slotfile} 2; " \
+               "fi; " \
+               "mw.b ${slot_addr} 0x61; " \
+               "ext4write ${devtype} ${devnum}:${informpart} ${slot_addr} /${slotfile} 2;\0" \
+       "set_to_part_b=" \
+               SET_INFORM_PART \
+               "if test -e ${devtype} ${devnum}:${informpart} ${slotfile}; then; " \
+                       "load ${devtype} ${devnum}:${informpart} ${slot_addr} /${slotfile} 2; " \
+               "fi; " \
+               "mw.b ${slot_addr} 0x62; " \
+               "ext4write ${devtype} ${devnum}:${informpart} ${slot_addr} /${slotfile} 2;\0" \
+       "bootenv=uEnv.txt\0"                    \
+       "loadbootenv=" \
+               "part number ${devtype} ${devnum} ${bootname} bootpart; " \
+               "if test -e ${devtype} ${devnum}:${bootpart} ${loadaddr} ${prefix}${bootenv}; then " \
+                       "load ${devtype} ${devnum}:${bootpart} ${loadaddr} ${prefix}${bootenv}; " \
+               "fi;\0" \
+        "importbootenv=echo Importing environment from ${devtype} ...; " \
+                "env import -t $loadaddr $filesize;\0" \
+       ""
+
+#endif /* __CONFIG_TIZEN_BPI_F3_H */