author | yuehu mi <yuehu.mi@amlogic.com> | 2019-11-06 07:26:27 (GMT) |
---|---|---|
committer | Xindong Xu <xindong.xu@amlogic.com> | 2019-11-28 01:42:32 (GMT) |
commit | 1ee5c88276c5d765a765c3eb5de72a33939c5aed (patch) | |
tree | e2a92cce90d7601ef5e432e3f67c471b044aad13 | |
parent | ac58c7f7d629cc2cda014e5afe1105ba61cc1f5e (diff) | |
download | uboot-1ee5c88276c5d765a765c3eb5de72a33939c5aed.zip uboot-1ee5c88276c5d765a765c3eb5de72a33939c5aed.tar.gz uboot-1ee5c88276c5d765a765c3eb5de72a33939c5aed.tar.bz2 |
uboot: Add poweron mode(on, standby, last) [1/1]
PD#SWPL-16184
Problem:
Add poweron mode(on, standby, last).
Solution:
Add poweron mode(on, standby, last).
Verify:
Verified by t962x3_ab301 and t962e_ab311
Change-Id: I2f31cf90a05ab67d32e5f8985b6df2f82f2f14c1
Signed-off-by: yuehu mi <yuehu.mi@amlogic.com>
-rw-r--r-- | board/amlogic/configs/tm2_t962e2_ab311_v1.h | 58 | ||||
-rw-r--r-- | board/amlogic/configs/tm2_t962x3_ab301_v1.h | 59 |
2 files changed, 96 insertions, 21 deletions
diff --git a/board/amlogic/configs/tm2_t962e2_ab311_v1.h b/board/amlogic/configs/tm2_t962e2_ab311_v1.h index d05ed0a..8f79691 100644 --- a/board/amlogic/configs/tm2_t962e2_ab311_v1.h +++ b/board/amlogic/configs/tm2_t962e2_ab311_v1.h @@ -90,7 +90,7 @@ "loadaddr=1080000\0"\ "model_name=FHD\0" \ "panel_type=lvds_1\0" \ - "lcd_ctrl=0x00000000\0" \ + "lcd_ctrl=0x00000000\0" \ "outputmode=1080p60hz\0" \ "hdmimode=1080p60hz\0" \ "cvbsmode=576cvbs\0" \ @@ -123,7 +123,8 @@ "video_reverse=0\0"\ "active_slot=normal\0"\ "boot_part=boot\0"\ - "powermode=standby\0"\ + "suspend=off\0"\ + "powermode=on\0"\ "Irq_check_en=0\0"\ "fs_type=""rootfstype=ramfs""\0"\ "initargs="\ @@ -149,16 +150,31 @@ "run update;"\ "else if test ${reboot_mode} = cold_boot; then "\ /*"run try_auto_burn;uboot wake up "*/\ - /*"echo powermode=${powermode}; "\ - "if test ${powermode} = standby; then "\ - "setMtkBT;systemoff; "\ - "else if test ${powermode} = on; then "\ - "run try_auto_burn; "\ - "fi; fi; "\*/\ + "echo powermode=${powermode}; "\ + "if test ${powermode} = on; then "\ + /*"run try_auto_burn; "*/\ + "else if test ${powermode} = standby; then "\ + "systemoff; "\ + "else if test ${powermode} = last; then "\ + "echo suspend=${suspend}; "\ + "if test ${suspend} = off; then "\ + /*"run try_auto_burn; "*/\ + "else if test ${suspend} = on; then "\ + "systemoff; "\ + "else if test ${suspend} = shutdown; then "\ + "systemoff; "\ + "fi; fi; fi; "\ + "fi; fi; fi; "\ "else if test ${reboot_mode} = fastboot; then "\ "fastboot;"\ "fi;fi;fi;fi;"\ "\0" \ + "reset_suspend="\ + "if test ${suspend} = on || test ${suspend} = shutdown; then "\ + "setenv ""suspend off"";"\ + "saveenv;"\ + "fi;"\ + "\0" \ "storeboot="\ "boot_cooling;"\ "get_system_as_root_mode;"\ @@ -249,6 +265,26 @@ "init_display="\ "hdmitx hpd;osd open;osd clear;imgread pic logo bootup $loadaddr;bmp display $bootup_offset;bmp scale;vout output ${outputmode}"\ "\0"\ + "check_display="\ + "if test ${reboot_mode} = cold_boot; then "\ + "if test ${powermode} = standby; then "\ + "echo not init_display; "\ + "else if test ${powermode} = last; then "\ + "echo suspend=${suspend}; "\ + "if test ${suspend} = off; then "\ + "run init_display; "\ + "else if test ${suspend} = on; then "\ + "echo not init_display; "\ + "else if test ${suspend} = shutdown; then "\ + "echo not init_display; "\ + "fi; fi; fi; "\ + "else "\ + "run init_display; "\ + "fi; fi; "\ + "else "\ + "run init_display; "\ + "fi; "\ + "\0"\ "cmdline_keys="\ "if keyman init 0x1234; then "\ "if keyman read usid ${loadaddr} str; then "\ @@ -290,10 +326,12 @@ "run bcb_cmd; "\ "run factory_reset_poweroff_protect;"\ "run upgrade_check;"\ - "run init_display;"\ + /* "run init_display;"\ */\ + "run check_display;"\ "run storeargs;"\ "bcb uboot-command;"\ - "run switch_bootmode;" + "run switch_bootmode;"\ + "run reset_suspend;" #define CONFIG_BOOTCOMMAND "run storeboot" diff --git a/board/amlogic/configs/tm2_t962x3_ab301_v1.h b/board/amlogic/configs/tm2_t962x3_ab301_v1.h index ccb4aaf..1d9cd74 100644 --- a/board/amlogic/configs/tm2_t962x3_ab301_v1.h +++ b/board/amlogic/configs/tm2_t962x3_ab301_v1.h @@ -52,7 +52,6 @@ #define CONFIG_CMD_STARTDSP 1 #define CONFIG_CMD_DSPJTAGRESET 1 - /* Bootloader Control Block function That is used for recovery and the bootloader to talk to each other */ @@ -92,7 +91,7 @@ "model_name=FHD\0" \ "panel_type=lvds_1\0" \ "lcd_ctrl=0x00000000\0" \ - "outputmode=1080p60hz\0" \ + "outputmode=1080p60hz\0" \ "hdmimode=1080p60hz\0" \ "cvbsmode=576cvbs\0" \ "display_width=1920\0" \ @@ -124,7 +123,8 @@ "video_reverse=0\0"\ "active_slot=normal\0"\ "boot_part=boot\0"\ - "powermode=standby\0"\ + "suspend=off\0"\ + "powermode=on\0"\ "Irq_check_en=0\0"\ "fs_type=""rootfstype=ramfs""\0"\ "initargs="\ @@ -149,16 +149,31 @@ "run update;"\ "else if test ${reboot_mode} = cold_boot; then "\ /*"run try_auto_burn;uboot wake up "*/\ - /*"echo powermode=${powermode}; "\ - "if test ${powermode} = standby; then "\ - "setMtkBT;systemoff; "\ - "else if test ${powermode} = on; then "\ - "run try_auto_burn; "\ - "fi; fi; "\*/\ + "echo powermode=${powermode}; "\ + "if test ${powermode} = on; then "\ + /*"run try_auto_burn; "*/\ + "else if test ${powermode} = standby; then "\ + "systemoff; "\ + "else if test ${powermode} = last; then "\ + "echo suspend=${suspend}; "\ + "if test ${suspend} = off; then "\ + /*"run try_auto_burn; "*/\ + "else if test ${suspend} = on; then "\ + "systemoff; "\ + "else if test ${suspend} = shutdown; then "\ + "systemoff; "\ + "fi; fi; fi; "\ + "fi; fi; fi; "\ "else if test ${reboot_mode} = fastboot; then "\ "fastboot;"\ "fi;fi;fi;fi;"\ "\0" \ + "reset_suspend="\ + "if test ${suspend} = on || test ${suspend} = shutdown; then "\ + "setenv ""suspend off"";"\ + "saveenv;"\ + "fi;"\ + "\0" \ "storeboot="\ "boot_cooling;"\ "get_system_as_root_mode;"\ @@ -249,6 +264,26 @@ "init_display="\ "lcd enable;osd open;osd clear;imgread pic logo bootup $loadaddr;bmp display $bootup_offset;bmp scale;vout output ${outputmode}"\ "\0"\ + "check_display="\ + "if test ${reboot_mode} = cold_boot; then "\ + "if test ${powermode} = standby; then "\ + "echo not init_display; "\ + "else if test ${powermode} = last; then "\ + "echo suspend=${suspend}; "\ + "if test ${suspend} = off; then "\ + "run init_display; "\ + "else if test ${suspend} = on; then "\ + "echo not init_display; "\ + "else if test ${suspend} = shutdown; then "\ + "echo not init_display; "\ + "fi; fi; fi; "\ + "else "\ + "run init_display; "\ + "fi; fi; "\ + "else "\ + "run init_display; "\ + "fi; "\ + "\0"\ "cmdline_keys="\ "if keyman init 0x1234; then "\ "if keyman read usid ${loadaddr} str; then "\ @@ -290,10 +325,12 @@ "run bcb_cmd; "\ "run factory_reset_poweroff_protect;"\ "run upgrade_check;"\ - "run init_display;"\ + /* "run init_display;"\ */\ + "run check_display;"\ "run storeargs;"\ "bcb uboot-command;"\ - "run switch_bootmode;" + "run switch_bootmode;"\ + "run reset_suspend;" #define CONFIG_BOOTCOMMAND "run storeboot" |