]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: tegra30: switch to button cmd
authorSvyatoslav Ryhel <clamor95@gmail.com>
Sun, 7 Jan 2024 09:17:47 +0000 (11:17 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 22 Apr 2024 16:23:23 +0000 (10:23 -0600)
Use recently added ability to assign commands to buttons via env.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
configs/endeavoru_defconfig
configs/grouper_common_defconfig
configs/transformer_t30_defconfig
configs/x3_t30_defconfig
include/configs/endeavoru.h
include/configs/grouper.h
include/configs/transformer-common.h
include/configs/x3-t30.h

index 00e46f9be6bed8ac3a570a1cb82500035c9b51d0..3230d360eda4033990b5e6e20ac9132c41439a6e 100644 (file)
@@ -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
index 05207c8a8945f989d0d0e15965c3470b0b3c2cb3..001f5b880403ab4c5ce8f81a15cf2e246a82cce9 100644 (file)
@@ -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
index 992625a569c283c5179eea7ca270ff2e7eaec1ad..11a552d9b0dd3543bb40e9312baccbb3c8fdb2f7 100644 (file)
@@ -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
index 44fa48baaef357fe1e8dcdb0685958d8b57a1d65..c489d59ef0eb27d8f00a9d4b13c8d4678fcd687d 100644 (file)
@@ -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
index 46c582e963e43986e3e0ef91fc2c0133256b5d8b..348078f9770c6a60a5752cf02d0a3bf2aa99ba1f 100644 (file)
@@ -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
 
index 93304ddc6e8991cbf624fa697c18987b1c5f3705..8064b88902e2b666956b5dbaa00a29f3eed76472 100644 (file)
        "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
 
index 3b7db0ab142fdd2d214f9d9b59deb9e84a951967..bb6817c8d2b61afcf90b92c58a9c054d19d6e229 100644 (file)
        "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
 
index 14532542ea6a486a7ed6d4a2d00644dd4d9c4a89..78a201286117767ec83101c902ad0263e2028f99 100644 (file)
@@ -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