aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSvyatoslav Ryhel2024-01-07 11:17:47 +0200
committerTom Rini2024-04-22 10:23:23 -0600
commit00d847def6847f7dea22d3d8a3d51e8ff9b5431b (patch)
tree4b3cf598e32ff7274e2b77bd9c708d8a5f0526af
parent1c559d6fc55e06bbbd5112e96540d1135169be9c (diff)
board: tegra30: switch to button cmd
Use recently added ability to assign commands to buttons via env. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
-rw-r--r--configs/endeavoru_defconfig3
-rw-r--r--configs/grouper_common_defconfig3
-rw-r--r--configs/transformer_t30_defconfig3
-rw-r--r--configs/x3_t30_defconfig3
-rw-r--r--include/configs/endeavoru.h3
-rw-r--r--include/configs/grouper.h5
-rw-r--r--include/configs/transformer-common.h12
-rw-r--r--include/configs/x3-t30.h3
8 files changed, 23 insertions, 12 deletions
diff --git a/configs/endeavoru_defconfig b/configs/endeavoru_defconfig
index 00e46f9be6b..3230d360eda 100644
--- a/configs/endeavoru_defconfig
+++ b/configs/endeavoru_defconfig
@@ -14,12 +14,13 @@ CONFIG_TEGRA30=y
CONFIG_TARGET_ENDEAVORU=y
CONFIG_CMD_EBTUPDATE=y
CONFIG_SYS_LOAD_ADDR=0x82000000
+CONFIG_BUTTON_CMD=y
CONFIG_BOOTDELAY=0
CONFIG_AUTOBOOT_KEYED=y
CONFIG_AUTOBOOT_KEYED_CTRLC=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_SYSTEM_SETUP=y
-CONFIG_BOOTCOMMAND="if run check_button; then bootmenu; fi; bootflow scan; poweroff;"
+CONFIG_BOOTCOMMAND="bootflow scan; poweroff"
CONFIG_SYS_PBSIZE=2084
CONFIG_SPL_FOOTPRINT_LIMIT=y
CONFIG_SPL_MAX_FOOTPRINT=0x8000
diff --git a/configs/grouper_common_defconfig b/configs/grouper_common_defconfig
index 05207c8a894..001f5b88040 100644
--- a/configs/grouper_common_defconfig
+++ b/configs/grouper_common_defconfig
@@ -14,12 +14,13 @@ CONFIG_TEGRA30=y
CONFIG_TARGET_GROUPER=y
CONFIG_CMD_EBTUPDATE=y
CONFIG_SYS_LOAD_ADDR=0x82000000
+CONFIG_BUTTON_CMD=y
CONFIG_BOOTDELAY=0
CONFIG_AUTOBOOT_KEYED=y
CONFIG_AUTOBOOT_KEYED_CTRLC=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_SYSTEM_SETUP=y
-CONFIG_BOOTCOMMAND="if run check_button; then bootmenu; fi; bootflow scan; poweroff;"
+CONFIG_BOOTCOMMAND="bootflow scan; poweroff"
CONFIG_SYS_PBSIZE=2084
CONFIG_SPL_FOOTPRINT_LIMIT=y
CONFIG_SPL_MAX_FOOTPRINT=0x8000
diff --git a/configs/transformer_t30_defconfig b/configs/transformer_t30_defconfig
index 992625a569c..11a552d9b0d 100644
--- a/configs/transformer_t30_defconfig
+++ b/configs/transformer_t30_defconfig
@@ -14,12 +14,13 @@ CONFIG_TEGRA30=y
CONFIG_TARGET_TRANSFORMER_T30=y
CONFIG_CMD_EBTUPDATE=y
CONFIG_SYS_LOAD_ADDR=0x82000000
+CONFIG_BUTTON_CMD=y
CONFIG_BOOTDELAY=0
CONFIG_AUTOBOOT_KEYED=y
CONFIG_AUTOBOOT_KEYED_CTRLC=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_SYSTEM_SETUP=y
-CONFIG_BOOTCOMMAND="setenv skip_boot 0; setenv gpio_button 150; if run check_button; then poweroff; fi; setenv gpio_button 131; if run check_button; then bootmenu; fi; if test ${skip_boot} -eq 1; then; else setenv boot_targets usb mmc1 mmc0; bootflow scan; poweroff; fi"
+CONFIG_BOOTCOMMAND="setenv boot_targets usb mmc1 mmc0; bootflow scan; poweroff"
CONFIG_SYS_PBSIZE=2084
CONFIG_SPL_FOOTPRINT_LIMIT=y
CONFIG_SPL_MAX_FOOTPRINT=0x8000
diff --git a/configs/x3_t30_defconfig b/configs/x3_t30_defconfig
index 44fa48baaef..c489d59ef0e 100644
--- a/configs/x3_t30_defconfig
+++ b/configs/x3_t30_defconfig
@@ -15,12 +15,13 @@ CONFIG_TARGET_X3_T30=y
CONFIG_TEGRA_ENABLE_UARTD=y
CONFIG_CMD_EBTUPDATE=y
CONFIG_SYS_LOAD_ADDR=0x82000000
+CONFIG_BUTTON_CMD=y
CONFIG_BOOTDELAY=0
CONFIG_AUTOBOOT_KEYED=y
CONFIG_AUTOBOOT_KEYED_CTRLC=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_SYSTEM_SETUP=y
-CONFIG_BOOTCOMMAND="if run check_button; then bootmenu; fi; bootflow scan; poweroff;"
+CONFIG_BOOTCOMMAND="bootflow scan; poweroff"
CONFIG_SYS_PBSIZE=2084
CONFIG_SPL_FOOTPRINT_LIMIT=y
CONFIG_SPL_MAX_FOOTPRINT=0x8000
diff --git a/include/configs/endeavoru.h b/include/configs/endeavoru.h
index 46c582e963e..348078f9770 100644
--- a/include/configs/endeavoru.h
+++ b/include/configs/endeavoru.h
@@ -53,7 +53,8 @@
"boot_block_size_r=0x200000\0" \
"boot_block_size=0x1000\0" \
"bootloader_file=u-boot-dtb-tegra.bin\0" \
- "check_button=gpio input 179; test $? -eq 0\0" \
+ "button_cmd_0_name=Volume Down\0" \
+ "button_cmd_0=bootmenu\0" \
"partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \
ENDEAVORU_BOOTMENU
diff --git a/include/configs/grouper.h b/include/configs/grouper.h
index 93304ddc6e8..8064b88902e 100644
--- a/include/configs/grouper.h
+++ b/include/configs/grouper.h
@@ -49,7 +49,10 @@
"boot_block_size_r=0x200000\0" \
"boot_block_size=0x1000\0" \
"bootloader_file=u-boot-dtb-tegra.bin\0" \
- "check_button=gpio input 131; test $? -eq 0;\0" \
+ "button_cmd_0_name=Volume Down\0" \
+ "button_cmd_0=bootmenu\0" \
+ "button_cmd_1_name=Lid\0" \
+ "button_cmd_1=poweroff\0" \
"partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \
GROUPER_BOOTMENU
diff --git a/include/configs/transformer-common.h b/include/configs/transformer-common.h
index 3b7db0ab142..bb6817c8d2b 100644
--- a/include/configs/transformer-common.h
+++ b/include/configs/transformer-common.h
@@ -71,18 +71,20 @@
"bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu\0" \
"bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu\0" \
"bootmenu_3=update bootloader=run flash_uboot\0" \
- "bootmenu_4=enter console=usb start; setenv skip_boot 1; exit\0" \
- "bootmenu_5=reboot RCM=enterrcm\0" \
- "bootmenu_6=reboot=reset\0" \
- "bootmenu_7=power off=poweroff\0" \
+ "bootmenu_4=reboot RCM=enterrcm\0" \
+ "bootmenu_5=reboot=reset\0" \
+ "bootmenu_6=power off=poweroff\0" \
"bootmenu_delay=-1\0"
#define BOARD_EXTRA_ENV_SETTINGS \
"spi_size=0x400000\0" \
"boot_block_size_r=0x200000\0" \
"boot_block_size=0x1000\0" \
- "check_button=gpio input ${gpio_button}; test $? -eq 0;\0" \
"bootloader_file=u-boot-dtb-tegra.bin\0" \
+ "button_cmd_0_name=Volume Down\0" \
+ "button_cmd_0=bootmenu\0" \
+ "button_cmd_1_name=Lid sensor\0" \
+ "button_cmd_1=poweroff\0" \
"partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \
TRANSFORMER_BOOTMENU
diff --git a/include/configs/x3-t30.h b/include/configs/x3-t30.h
index 14532542ea6..78a20128611 100644
--- a/include/configs/x3-t30.h
+++ b/include/configs/x3-t30.h
@@ -54,7 +54,8 @@
"boot_block_size_r=0x200000\0" \
"boot_block_size=0x1000\0" \
"bootloader_file=u-boot-dtb-tegra.bin\0" \
- "check_button=gpio input 116; test $? -eq 0\0" \
+ "button_cmd_0_name=Volume Down\0" \
+ "button_cmd_0=bootmenu\0" \
"partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \
X3_BOOTMENU