Index: output/eeprom.dat
===================================================================
--- /1121s/1121se/branch/mouse/mouse_public_1M/output/eeprom.dat	(revision 3891)
+++ /1121s/1121se/branch/mouse/mouse_public_1M/output/eeprom.dat	(working copy)
@@ -2,40 +2,48 @@
 02
 aa
 55
-02
+3e
 03
 c2
 84
 00
-09
+0b
+c0
+3e
+80
+0f
+c0
+3f
+00
+12
 c0
 44
 80
-10
+1f
 c0
 4b
 80
-87
+96
 c0
 47
 80
-1d
+2c
 c0
 48
 00
-43
+52
 c0
 49
 80
-18
+27
 c0
 4c
 80
-6e
+7d
 c0
 75
 00
-0d
+1c
 20
 20
 23
@@ -43,11 +51,11 @@
 c0
 5f
 80
-55
+64
 c0
 64
 80
-60
+6f
 c1
 7f
 80
@@ -58,6 +66,58 @@
 3e
 20
 40
+73
+88
+20
+40
+4e
+42
+20
+20
+4e
+3f
+20
+40
+53
+ab
+20
+40
+7d
+e6
+20
+40
+4f
+c9
+6f
+e0
+c8
+94
+20
+40
+52
+54
+68
+48
+c6
+65
+20
+40
+4f
+02
+d8
+40
+00
+15
+20
+40
+4f
+0a
+20
+20
+4e
+4a
+20
+40
 6b
 28
 20
@@ -103,7 +163,7 @@
 20
 40
 00
-1a
+29
 20
 20
 54
@@ -127,19 +187,19 @@
 c0
 1d
 00
-33
+42
 c0
 20
 00
-2a
+39
 c0
 0a
 80
-2f
+3e
 c0
 19
 00
-23
+32
 20
 20
 53
@@ -151,7 +211,7 @@
 c0
 00
 80
-27
+36
 70
 48
 83
@@ -235,7 +295,7 @@
 c0
 00
 80
-3b
+4a
 20
 20
 59
@@ -247,11 +307,11 @@
 c2
 9f
 00
-3f
+4e
 c2
 98
 00
-3f
+4e
 20
 20
 59
@@ -287,7 +347,7 @@
 c0
 7f
 80
-4a
+59
 6f
 e0
 c8
@@ -315,19 +375,19 @@
 c2
 80
 80
-52
+61
 c2
 80
 00
-52
+61
 c2
 82
 80
-52
+61
 c2
 83
 00
-52
+61
 20
 20
 54
@@ -375,7 +435,7 @@
 c0
 02
 80
-5e
+6d
 20
 20
 35
@@ -395,7 +455,7 @@
 c0
 04
 00
-63
+72
 20
 20
 36
@@ -411,7 +471,7 @@
 20
 40
 00
-69
+78
 6f
 e4
 47
@@ -459,7 +519,7 @@
 20
 40
 80
-73
+82
 20
 20
 56
@@ -475,11 +535,11 @@
 c0
 00
 80
-78
+87
 c0
 01
 00
-7f
+8e
 20
 60
 00
@@ -555,7 +615,7 @@
 c2
 89
 00
-8b
+9a
 20
 60
 00
@@ -563,11 +623,11 @@
 20
 40
 00
-8e
+9d
 20
 40
 00
-95
+a4
 20
 20
 55
@@ -611,11 +671,11 @@
 c0
 00
 80
-9a
+a9
 c0
 01
 00
-ae
+bd
 20
 60
 00
@@ -639,7 +699,7 @@
 20
 3a
 00
-a6
+b5
 67
 e3
 4a
@@ -667,7 +727,7 @@
 20
 20
 00
-9c
+ab
 6f
 e3
 4a
@@ -719,7 +779,7 @@
 20
 3a
 00
-ba
+c9
 67
 e3
 4a
@@ -747,7 +807,7 @@
 20
 20
 00
-b0
+bf
 6f
 e3
 4a
@@ -771,9 +831,9 @@
 20
 20
 00
-ab
-ca
-c9
+ba
+d5
+52
 aa
 55
 40
@@ -795,7 +855,7 @@
 00
 00
 00
-00
+60
 00
 82
 89
@@ -2097,70 +2157,10 @@
 aa
 aa
 55
-43
+a3
 6e
-f6
-73
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+46
+5d
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-2f
-25
+ba
+2a
Index: output/otp.dat
===================================================================
--- /1121s/1121se/branch/mouse/mouse_public_1M/output/otp.dat	(revision 3891)
+++ /1121s/1121se/branch/mouse/mouse_public_1M/output/otp.dat	(working copy)
@@ -11,40 +11,48 @@
 00
 aa
 55
-02
+3e
 03
 c2
 84
 00
-09
+0b
+c0
+3e
+80
+0f
+c0
+3f
+00
+12
 c0
 44
 80
-10
+1f
 c0
 4b
 80
-87
+96
 c0
 47
 80
-1d
+2c
 c0
 48
 00
-43
+52
 c0
 49
 80
-18
+27
 c0
 4c
 80
-6e
+7d
 c0
 75
 00
-0d
+1c
 20
 20
 23
@@ -52,11 +60,11 @@
 c0
 5f
 80
-55
+64
 c0
 64
 80
-60
+6f
 c1
 7f
 80
@@ -67,6 +75,58 @@
 3e
 20
 40
+73
+88
+20
+40
+4e
+42
+20
+20
+4e
+3f
+20
+40
+53
+ab
+20
+40
+7d
+e6
+20
+40
+4f
+c9
+6f
+e0
+c8
+94
+20
+40
+52
+54
+68
+48
+c6
+65
+20
+40
+4f
+02
+d8
+40
+00
+15
+20
+40
+4f
+0a
+20
+20
+4e
+4a
+20
+40
 6b
 28
 20
@@ -112,7 +172,7 @@
 20
 40
 00
-1a
+29
 20
 20
 54
@@ -136,19 +196,19 @@
 c0
 1d
 00
-33
+42
 c0
 20
 00
-2a
+39
 c0
 0a
 80
-2f
+3e
 c0
 19
 00
-23
+32
 20
 20
 53
@@ -160,7 +220,7 @@
 c0
 00
 80
-27
+36
 70
 48
 83
@@ -244,7 +304,7 @@
 c0
 00
 80
-3b
+4a
 20
 20
 59
@@ -256,11 +316,11 @@
 c2
 9f
 00
-3f
+4e
 c2
 98
 00
-3f
+4e
 20
 20
 59
@@ -296,7 +356,7 @@
 c0
 7f
 80
-4a
+59
 6f
 e0
 c8
@@ -324,19 +384,19 @@
 c2
 80
 80
-52
+61
 c2
 80
 00
-52
+61
 c2
 82
 80
-52
+61
 c2
 83
 00
-52
+61
 20
 20
 54
@@ -384,7 +444,7 @@
 c0
 02
 80
-5e
+6d
 20
 20
 35
@@ -404,7 +464,7 @@
 c0
 04
 00
-63
+72
 20
 20
 36
@@ -420,7 +480,7 @@
 20
 40
 00
-69
+78
 6f
 e4
 47
@@ -468,7 +528,7 @@
 20
 40
 80
-73
+82
 20
 20
 56
@@ -484,11 +544,11 @@
 c0
 00
 80
-78
+87
 c0
 01
 00
-7f
+8e
 20
 60
 00
@@ -564,7 +624,7 @@
 c2
 89
 00
-8b
+9a
 20
 60
 00
@@ -572,11 +632,11 @@
 20
 40
 00
-8e
+9d
 20
 40
 00
-95
+a4
 20
 20
 55
@@ -620,11 +680,11 @@
 c0
 00
 80
-9a
+a9
 c0
 01
 00
-ae
+bd
 20
 60
 00
@@ -648,7 +708,7 @@
 20
 3a
 00
-a6
+b5
 67
 e3
 4a
@@ -676,7 +736,7 @@
 20
 20
 00
-9c
+ab
 6f
 e3
 4a
@@ -728,7 +788,7 @@
 20
 3a
 00
-ba
+c9
 67
 e3
 4a
@@ -756,7 +816,7 @@
 20
 20
 00
-b0
+bf
 6f
 e3
 4a
@@ -780,9 +840,9 @@
 20
 20
 00
-ab
-ca
-c9
+ba
+d5
+52
 aa
 55
 40
@@ -804,7 +864,7 @@
 00
 00
 00
-00
+60
 00
 82
 89
@@ -2106,8 +2166,8 @@
 aa
 aa
 55
-43
+a3
 6e
-f6
-73
+46
+5d
 24
Index: output/program.lis
===================================================================
--- /1121s/1121se/branch/mouse/mouse_public_1M/output/program.lis	(revision 3891)
+++ /1121s/1121se/branch/mouse/mouse_public_1M/output/program.lis	(working copy)
@@ -1,269 +1,288 @@
               include "bt_format "
               org 0x0000
-0000 c2840009 bbit1 8 ,pf_patch_ext 
-0001 c0448010 beq patch11_1 ,p_mouse_3io6key_check 
-0002 c04b8087 beq patch12_7 ,p_mouse_store_device_info 
-0003 c047801d beq patch11_7 ,p_mouse_priority_bb_event 
-0004 c0480043 beq patch12_0 ,p_mouse_le 
-0005 c0498018 beq patch12_3 ,p_mouse_bb_event_timer 
-0006 c04c806e beq patch13_1 ,p_mouse_app_initflag_load_check 
-0007 c075000d beq patch1d_2 ,p_otp_read_data 
-0008 2020233e branch assert 
+0000 c284000b bbit1 8 ,pf_patch_ext 
+0001 c03e800f beq patch0f_5 ,p_mouse_before_hibernate 
+0002 c03f0012 beq patch0f_6 ,p_mouse_setgpio_hibernate 
+0003 c044801f beq patch11_1 ,p_mouse_3io6key_check 
+0004 c04b8096 beq patch12_7 ,p_mouse_store_device_info 
+0005 c047802c beq patch11_7 ,p_mouse_priority_bb_event 
+0006 c0480052 beq patch12_0 ,p_mouse_le 
+0007 c0498027 beq patch12_3 ,p_mouse_bb_event_timer 
+0008 c04c807d beq patch13_1 ,p_mouse_app_initflag_load_check 
+0009 c075001c beq patch1d_2 ,p_otp_read_data 
+000a 2020233e branch assert 
 
 pf_patch_ext:
-0009 c05f8055 beq patch37_7 ,p_g24_reconn_device_fail 
-000a c0648060 beq patch39_1 ,p_g24_retransmit 
-000b c17f8000 rtneq patch3f_7 
-000c 2020233e branch assert 
+000b c05f8064 beq patch37_7 ,p_g24_reconn_device_fail 
+000c c064806f beq patch39_1 ,p_g24_retransmit 
+000d c17f8000 rtneq patch3f_7 
+000e 2020233e branch assert 
+
+p_mouse_before_hibernate:
+000f 20407388 call disable_authrom 
+0010 20404e42 call mouse_setgpio_hibernate 
+0011 20204e3f branch mouse_before_hibernate_next 
+
+p_mouse_setgpio_hibernate:
+0012 204053ab call mouse_set_sdio_high 
+0013 20407de6 call clear_wake 
+0014 20404fc9 call mouse_before_hibernate_wheel_gpio_set 
+0015 6fe0c894 fetch 1 ,mem_mouse_sensor_sdio_gpio 
+0016 20405254 call mouse_gpio_config_output_high 
+0017 6848c665 fetcht 1 ,mem_device_switch_gpio 
+0018 20404f02 call mouse_gpio_set_pupd_by_input 
+0019 d8400015 arg 21 ,temp 
+001a 20404f0a call device_gpio_config_input_pu 
+001b 20204e4a branch mouse_setgpio_hibernate_next 
 
 p_otp_read_data:
-000d 20406b28 call enable_otp_read 
-000e 20406b63 call otp_read_data1 
-000f 20206b26 branch otp_disable_chgpump 
+001c 20406b28 call enable_otp_read 
+001d 20406b63 call otp_read_data1 
+001e 20206b26 branch otp_disable_chgpump 
 
 p_mouse_3io6key_check:
-0010 1a627e00 copy regc ,pdata 
-0011 67e0ca10 store 1 ,mem_mouse_key_status 
-0012 1fe3fe00 lshift pdata ,pdata 
-0013 1fe22400 copy pdata ,regb 
-0014 18422600 copy temp ,regc 
-0015 20406ef1 call gpio_out_active 
-0016 1a620400 copy regc ,temp 
-0017 20205248 branch mouse_3io6key_check_next 
+001f 1a627e00 copy regc ,pdata 
+0020 67e0ca10 store 1 ,mem_mouse_key_status 
+0021 1fe3fe00 lshift pdata ,pdata 
+0022 1fe22400 copy pdata ,regb 
+0023 18422600 copy temp ,regc 
+0024 20406ef1 call gpio_out_active 
+0025 1a620400 copy regc ,temp 
+0026 20205248 branch mouse_3io6key_check_next 
 
 p_mouse_bb_event_timer:
-0018 2040001a call p_mouse_le_send_conn_param_update_timer 
-0019 20205495 branch mouse_bb_event_timer + 1 
+0027 20400029 call p_mouse_le_send_conn_param_update_timer 
+0028 20205495 branch mouse_bb_event_timer + 1 
 
 p_mouse_le_send_conn_param_update_timer:
-001a da604ac7 arg mem_mouse_le_send_conn_param_update_timer ,regc 
-001b da405408 arg mouse_updata_le_param ,regb 
-001c 20203755 branch timer_single_step 
+0029 da604ac7 arg mem_mouse_le_send_conn_param_update_timer ,regc 
+002a da405408 arg mouse_updata_le_param ,regb 
+002b 20203755 branch timer_single_step 
 
 p_mouse_priority_bb_event:
-001d 1a627e00 copy regc ,pdata 
-001e c01d0033 beq bt_evt_24g_attempt_fail ,p_mouse_24g_attempt_fail 
-001f c020002a beq bt_evt_le_parse_conn_papa_update_rsp ,p_mouse_le_conn_param_update_rsp_recieved 
-0020 c00a802f beq bt_evt_le_disconnected ,p_mouse_le_bb_disconnected 
-0021 c0190023 beq bt_evt_le_start_enc ,p_mouse_le_ll_start_encryt 
-0022 202053dc branch mouse_priority_bb_event + 2 
+002c 1a627e00 copy regc ,pdata 
+002d c01d0042 beq bt_evt_24g_attempt_fail ,p_mouse_24g_attempt_fail 
+002e c0200039 beq bt_evt_le_parse_conn_papa_update_rsp ,p_mouse_le_conn_param_update_rsp_recieved 
+002f c00a803e beq bt_evt_le_disconnected ,p_mouse_le_bb_disconnected 
+0030 c0190032 beq bt_evt_le_start_enc ,p_mouse_le_ll_start_encryt 
+0031 202053dc branch mouse_priority_bb_event + 2 
 
 p_mouse_le_ll_start_encryt:
-0023 6fe0c754 fetch 1 ,mem_device_le_reconnect_flag 
-0024 c0008027 beq 1 ,p_mouse_le_ll_reconn_start_encryt 
-0025 70488314 jam 20 ,mem_le_start_encrypt_timer 
-0026 2020540f branch mouse_le_ll_enable_start_enc_flag 
+0032 6fe0c754 fetch 1 ,mem_device_le_reconnect_flag 
+0033 c0008036 beq 1 ,p_mouse_le_ll_reconn_start_encryt 
+0034 70488314 jam 20 ,mem_le_start_encrypt_timer 
+0035 2020540f branch mouse_le_ll_enable_start_enc_flag 
 
 p_mouse_le_ll_reconn_start_encryt:
-0027 20405408 call mouse_updata_le_param 
-0028 70488305 jam 5 ,mem_le_start_encrypt_timer 
-0029 2020540f branch mouse_le_ll_enable_start_enc_flag 
+0036 20405408 call mouse_updata_le_param 
+0037 70488305 jam 5 ,mem_le_start_encrypt_timer 
+0038 2020540f branch mouse_le_ll_enable_start_enc_flag 
 
 p_mouse_le_conn_param_update_rsp_recieved:
-002a 6fe0cac6 fetch 1 ,mem_mouse_le_send_conn_param_update 
-002b 247a0000 nrtn blank 
-002c 704ac601 jam 1 ,mem_mouse_le_send_conn_param_update 
-002d 704ac71e jam 30 ,mem_mouse_le_send_conn_param_update_timer 
-002e 20600000 rtn 
+0039 6fe0cac6 fetch 1 ,mem_mouse_le_send_conn_param_update 
+003a 247a0000 nrtn blank 
+003b 704ac601 jam 1 ,mem_mouse_le_send_conn_param_update 
+003c 704ac71e jam 30 ,mem_mouse_le_send_conn_param_update_timer 
+003d 20600000 rtn 
 
 p_mouse_le_bb_disconnected:
-002f 58000000 setarg 0 
-0030 67e0cac6 store 1 ,mem_mouse_le_send_conn_param_update 
-0031 67e0cac7 store 1 ,mem_mouse_le_send_conn_param_update_timer 
-0032 202053f9 branch mouse_le_bb_disconnected 
+003e 58000000 setarg 0 
+003f 67e0cac6 store 1 ,mem_mouse_le_send_conn_param_update 
+0040 67e0cac7 store 1 ,mem_mouse_le_send_conn_param_update_timer 
+0041 202053f9 branch mouse_le_bb_disconnected 
 
 p_mouse_24g_attempt_fail:
-0033 2040592b call mouse_soft_agc_disable 
-0034 20405933 call device_fetch_normal_tx_power 
-0035 6fe0c617 fetch 1 ,mem_24g_attempt_fail_flag 
-0036 243a590a nbranch mouse_24g_hibernate_set ,blank 
-0037 6fe0c5f9 fetch 1 ,mem_24g_reconn_type 
-0038 c002d98c beq pair_and_receiver ,mouse_24g_auto_pair_attempt_fail 
-0039 c000803b beq fast_conn_and_receiver ,p_mouse_24g_fast_conn_attempt_fail 
-003a 20205975 branch mouse_24g_attempt_fail + 4 
+0042 2040592b call mouse_soft_agc_disable 
+0043 20405933 call device_fetch_normal_tx_power 
+0044 6fe0c617 fetch 1 ,mem_24g_attempt_fail_flag 
+0045 243a590a nbranch mouse_24g_hibernate_set ,blank 
+0046 6fe0c5f9 fetch 1 ,mem_24g_reconn_type 
+0047 c002d98c beq pair_and_receiver ,mouse_24g_auto_pair_attempt_fail 
+0048 c000804a beq fast_conn_and_receiver ,p_mouse_24g_fast_conn_attempt_fail 
+0049 20205975 branch mouse_24g_attempt_fail + 4 
 
 p_mouse_24g_fast_conn_attempt_fail:
-003b 6fe4470e fetch mouse_flag_len ,mem_mouse_flag 
-003c c29f003f bbit1 mouse_enable_24g_first_auto_pairing ,p_mouse_24g_start_auto_pair 
-003d c298003f bbit1 mouse_enable_auto_24g_paring ,p_mouse_24g_start_auto_pair 
-003e 20205983 branch mouse_24g_fast_conn_attempt_fail + 3 
+004a 6fe4470e fetch mouse_flag_len ,mem_mouse_flag 
+004b c29f004e bbit1 mouse_enable_24g_first_auto_pairing ,p_mouse_24g_start_auto_pair 
+004c c298004e bbit1 mouse_enable_auto_24g_paring ,p_mouse_24g_start_auto_pair 
+004d 20205983 branch mouse_24g_fast_conn_attempt_fail + 3 
 
 p_mouse_24g_start_auto_pair:
-003f 6fe145ed fetch 2 ,mem_24g_pair_timeout_init 
-0040 67e145f5 store 2 ,mem_24g_reconn_timeout 
-0041 7045f905 jam pair_and_receiver ,mem_24g_reconn_type 
-0042 2020350a branch g24_reconn_start 
+004e 6fe145ed fetch 2 ,mem_24g_pair_timeout_init 
+004f 67e145f5 store 2 ,mem_24g_reconn_timeout 
+0050 7045f905 jam pair_and_receiver ,mem_24g_reconn_type 
+0051 2020350a branch g24_reconn_start 
 
 p_mouse_le:
-0043 20402a06 call le_fifo_check_nearly_full 
-0044 247a0000 nrtn blank 
-0045 6fe0c74f fetch 1 ,mem_device_fast_conn_flag 
-0046 c07f804a beq 0xff ,p_mouse_le_next 
-0047 6fe0c882 fetch 1 ,mem_le_connect_status_flag 
-0048 1fe17e03 and pdata ,0x03 ,pdata 
-0049 c1818000 rtnne 0x03 
+0052 20402a06 call le_fifo_check_nearly_full 
+0053 247a0000 nrtn blank 
+0054 6fe0c74f fetch 1 ,mem_device_fast_conn_flag 
+0055 c07f8059 beq 0xff ,p_mouse_le_next 
+0056 6fe0c882 fetch 1 ,mem_le_connect_status_flag 
+0057 1fe17e03 and pdata ,0x03 ,pdata 
+0058 c1818000 rtnne 0x03 
 
 p_mouse_le_next:
-004a 6fe0c9f9 fetch 1 ,mem_mouse_clear_sensor_data_flag 
-004b 205a538b call mouse_clear_sensor_data_by_reset ,blank 
-004c 6fe4470e fetch mouse_flag_len ,mem_mouse_flag 
-004d c2808052 bbit1 mouse_24g_pairing_flag ,p_mouse_le_send_empty_packet 
-004e c2800052 bbit1 mouse_select_device_flag ,p_mouse_le_send_empty_packet 
-004f c2828052 bbit1 mouse_bt_discovery_button_down_flag ,p_mouse_le_send_empty_packet 
-0050 c2830052 bbit1 mouse_bt_discovery_button_long_down_flag ,p_mouse_le_send_empty_packet 
-0051 20205447 branch mouse_le_package 
+0059 6fe0c9f9 fetch 1 ,mem_mouse_clear_sensor_data_flag 
+005a 205a538b call mouse_clear_sensor_data_by_reset ,blank 
+005b 6fe4470e fetch mouse_flag_len ,mem_mouse_flag 
+005c c2808061 bbit1 mouse_24g_pairing_flag ,p_mouse_le_send_empty_packet 
+005d c2800061 bbit1 mouse_select_device_flag ,p_mouse_le_send_empty_packet 
+005e c2828061 bbit1 mouse_bt_discovery_button_down_flag ,p_mouse_le_send_empty_packet 
+005f c2830061 bbit1 mouse_bt_discovery_button_long_down_flag ,p_mouse_le_send_empty_packet 
+0060 20205447 branch mouse_le_package 
 
 p_mouse_le_send_empty_packet:
-0052 58000000 setarg 0 
-0053 67e3c65c store 7 ,mem_mouse_key 
-0054 2020683e branch hid_device_le_send_mouse_data 
+0061 58000000 setarg 0 
+0062 67e3c65c store 7 ,mem_mouse_key 
+0063 2020683e branch hid_device_le_send_mouse_data 
 
 p_g24_reconn_device_fail:
-0055 6fe0c5fa fetch 1 ,mem_24g_fast_conn_enable 
-0056 203a3201 branch g24_ch ,blank 
-0057 6fe145f7 fetch 2 ,mem_24g_reconn_count 
-0058 1fe0fe01 increase 1 ,pdata 
-0059 67e145f7 store 2 ,mem_24g_reconn_count 
-005a 2feffe09 isolate1 9 ,pdata 
-005b 6fe0c5f9 fetch 1 ,mem_24g_reconn_type 
-005c c002805e beq pair_and_receiver ,p_g24_reconn_pair_and_receiver 
-005d 20203565 branch g24_reconn_device_fail + 7 
+0064 6fe0c5fa fetch 1 ,mem_24g_fast_conn_enable 
+0065 203a3201 branch g24_ch ,blank 
+0066 6fe145f7 fetch 2 ,mem_24g_reconn_count 
+0067 1fe0fe01 increase 1 ,pdata 
+0068 67e145f7 store 2 ,mem_24g_reconn_count 
+0069 2feffe09 isolate1 9 ,pdata 
+006a 6fe0c5f9 fetch 1 ,mem_24g_reconn_type 
+006b c002806d beq pair_and_receiver ,p_g24_reconn_pair_and_receiver 
+006c 20203565 branch g24_reconn_device_fail + 7 
 
 p_g24_reconn_pair_and_receiver:
-005e 2020b51f branch g24_reconn_receiver_addr ,true 
-005f 2020327a branch g24_pair_init_param 
+006d 2020b51f branch g24_reconn_receiver_addr ,true 
+006e 2020327a branch g24_pair_init_param 
 
 p_g24_retransmit:
-0060 6fe0c3cf fetch 1 ,mem_device_option 
-0061 c0040063 beq dvc_op_mouse ,p_mouse_g24_retransmit 
-0062 2020363b branch g24_retransmit0 
+006f 6fe0c3cf fetch 1 ,mem_device_option 
+0070 c0040072 beq dvc_op_mouse ,p_mouse_g24_retransmit 
+0071 2020363b branch g24_retransmit0 
 
 p_mouse_g24_retransmit:
-0063 6fe0c752 fetch 1 ,mem_device_need_soft_reset 
-0064 247a0000 nrtn blank 
-0065 20400069 call p_mouse_g24_retransmit_100ms_timer 
-0066 6fe4470e fetch mouse_flag_len ,mem_mouse_flag 
-0067 c3808000 rtnbit1 mouse_24g_pairing_flag 
-0068 2020363b branch g24_retransmit0 
+0072 6fe0c752 fetch 1 ,mem_device_need_soft_reset 
+0073 247a0000 nrtn blank 
+0074 20400078 call p_mouse_g24_retransmit_100ms_timer 
+0075 6fe4470e fetch mouse_flag_len ,mem_mouse_flag 
+0076 c3808000 rtnbit1 mouse_24g_pairing_flag 
+0077 2020363b branch g24_retransmit0 
 
 p_mouse_g24_retransmit_100ms_timer:
-0069 d8e0000c arg 12 ,queue 
-006a 20407cf1 call timer_check 
-006b 247a0000 nrtn blank 
-006c 204054d7 call mouse_commbination_key_process 
-006d 202059e6 branch mouse_g24_retransmit_100ms_timer_next 
+0078 d8e0000c arg 12 ,queue 
+0079 20407cf1 call timer_check 
+007a 247a0000 nrtn blank 
+007b 204054d7 call mouse_commbination_key_process 
+007c 202059e6 branch mouse_g24_retransmit_100ms_timer_next 
 
 p_mouse_app_initflag_load_check:
-006e 6fe4470e fetch mouse_flag_len ,mem_mouse_flag 
-006f 2feffe12 isolate1 mouse_enable_otp ,pdata 
-0070 2040d699 call mouse_otp_load_app_initflag ,true 
-0071 20408073 call p_mouse_le_locall_addr_init_check ,true 
-0072 2020568d branch mouse_app_initflag_load_check + 4 
+007d 6fe4470e fetch mouse_flag_len ,mem_mouse_flag 
+007e 2feffe12 isolate1 mouse_enable_otp ,pdata 
+007f 2040d699 call mouse_otp_load_app_initflag ,true 
+0080 20408082 call p_mouse_le_locall_addr_init_check ,true 
+0081 2020568d branch mouse_app_initflag_load_check + 4 
 
 p_mouse_le_locall_addr_init_check:
-0073 6fe0c678 fetch 1 ,mem_device_flag 
-0074 c1000000 rtneq mode_24g_device 
-0075 c0008078 beq mode_bt_device1 ,p_mouse_le_device1_locall_addr_init_check 
-0076 c001007f beq mode_bt_device2 ,p_mouse_le_device2_locall_addr_init_check 
-0077 20600000 rtn 
+0082 6fe0c678 fetch 1 ,mem_device_flag 
+0083 c1000000 rtneq mode_24g_device 
+0084 c0008087 beq mode_bt_device1 ,p_mouse_le_device1_locall_addr_init_check 
+0085 c001008e beq mode_bt_device2 ,p_mouse_le_device2_locall_addr_init_check 
+0086 20600000 rtn 
 
 p_mouse_le_device1_locall_addr_init_check:
-0078 6fe34680 fetch 6 ,mem_device1_locall_addr 
-0079 684b46f8 fetcht 6 ,mem_device_compare_addr 
-007a 98467c00 isub temp ,null 
-007b 24628000 nrtn zero 
-007c 6fe342dd fetch 6 ,mem_le_lap 
-007d 67e34680 store 6 ,mem_device1_locall_addr 
-007e 20600000 rtn 
+0087 6fe34680 fetch 6 ,mem_device1_locall_addr 
+0088 684b46f8 fetcht 6 ,mem_device_compare_addr 
+0089 98467c00 isub temp ,null 
+008a 24628000 nrtn zero 
+008b 6fe342dd fetch 6 ,mem_le_lap 
+008c 67e34680 store 6 ,mem_device1_locall_addr 
+008d 20600000 rtn 
 
 p_mouse_le_device2_locall_addr_init_check:
-007f 6fe3468d fetch 6 ,mem_device2_locall_addr 
-0080 684b46f8 fetcht 6 ,mem_device_compare_addr 
-0081 98467c00 isub temp ,null 
-0082 24628000 nrtn zero 
-0083 6fe342dd fetch 6 ,mem_le_lap 
-0084 1fe0ff00 add pdata ,0x0100 ,pdata 
-0085 67e3468d store 6 ,mem_device2_locall_addr 
-0086 20600000 rtn 
+008e 6fe3468d fetch 6 ,mem_device2_locall_addr 
+008f 684b46f8 fetcht 6 ,mem_device_compare_addr 
+0090 98467c00 isub temp ,null 
+0091 24628000 nrtn zero 
+0092 6fe342dd fetch 6 ,mem_le_lap 
+0093 1fe0ff00 add pdata ,0x0100 ,pdata 
+0094 67e3468d store 6 ,mem_device2_locall_addr 
+0095 20600000 rtn 
 
 p_mouse_store_device_info:
-0087 6fe4470e fetch mouse_flag_len ,mem_mouse_flag 
-0088 c288d580 bbit1 mouse_enable_eeprom ,mouse_store_eeprom_device_info 
-0089 c289008b bbit1 mouse_enable_otp ,p_mouse_store_otp_device_info 
-008a 20600000 rtn 
+0096 6fe4470e fetch mouse_flag_len ,mem_mouse_flag 
+0097 c288d580 bbit1 mouse_enable_eeprom ,mouse_store_eeprom_device_info 
+0098 c289009a bbit1 mouse_enable_otp ,p_mouse_store_otp_device_info 
+0099 20600000 rtn 
 
 p_mouse_store_otp_device_info:
-008b 2040008e call p_mouse_write_otp_app_initflag 
-008c 20400095 call p_mouse_write_otp_locall_addr 
-008d 2020558b branch mouse_store_otp_device_info + 1 
+009a 2040009d call p_mouse_write_otp_app_initflag 
+009b 204000a4 call p_mouse_write_otp_locall_addr 
+009c 2020558b branch mouse_store_otp_device_info + 1 
 
 p_mouse_write_otp_app_initflag:
-008e 20405699 call mouse_otp_load_app_initflag 
-008f 6fe146a0 fetch 2 ,mem_store_flag 
-0090 d840aa55 arg eeprom_init_flag ,temp 
-0091 98467c00 isub temp ,null 
-0092 20628000 rtn zero 
-0093 604946a0 storet 2 ,mem_store_flag 
-0094 2020569d branch mouse_otp_store_app_initflag 
+009d 20405699 call mouse_otp_load_app_initflag 
+009e 6fe146a0 fetch 2 ,mem_store_flag 
+009f d840aa55 arg eeprom_init_flag ,temp 
+00a0 98467c00 isub temp ,null 
+00a1 20628000 rtn zero 
+00a2 604946a0 storet 2 ,mem_store_flag 
+00a3 2020569d branch mouse_otp_store_app_initflag 
 
 p_mouse_write_otp_locall_addr:
-0095 6fe0c678 fetch 1 ,mem_device_flag 
-0096 c1000000 rtneq mode_24g_device 
-0097 c000809a beq mode_bt_device1 ,p_mouse_write_otp_le_locall_addr1 
-0098 c00100ae beq mode_bt_device2 ,p_mouse_write_otp_le_locall_addr2 
-0099 20600000 rtn 
+00a4 6fe0c678 fetch 1 ,mem_device_flag 
+00a5 c1000000 rtneq mode_24g_device 
+00a6 c00080a9 beq mode_bt_device1 ,p_mouse_write_otp_le_locall_addr1 
+00a7 c00100bd beq mode_bt_device2 ,p_mouse_write_otp_le_locall_addr2 
+00a8 20600000 rtn 
 
 p_mouse_write_otp_le_locall_addr1:
-009a 6a414a8b fetchr regb ,2 ,mem_otp_offset_le_locall_addr1 
-009b 1a422600 copy regb ,regc 
+00a9 6a414a8b fetchr regb ,2 ,mem_otp_offset_le_locall_addr1 
+00aa 1a422600 copy regb ,regc 
 
 p_mouse_write_otp_le_locall_addr1_loop:
-009c 204056e5 call mouse_read_otp_le_locall_addr1_common 
-009d 6fe34a46 fetch 6 ,mem_mouse_le_locall_addr1_temp 
-009e 203a00a6 branch p_mouse_le_local_addr1_store ,blank 
-009f 67e34a40 store 6 ,mem_mouse_le_locall_addr1_last 
-00a0 1a60a606 increase 6 ,regc 
-00a1 6fe14a8d fetch 2 ,mem_otp_offset_le_locall_addr1_end 
-00a2 9a667c00 isub regc ,null 
-00a3 24610000 nrtn positive 
-00a4 1a622400 copy regc ,regb 
-00a5 2020009c branch p_mouse_write_otp_le_locall_addr1_loop 
+00ab 204056e5 call mouse_read_otp_le_locall_addr1_common 
+00ac 6fe34a46 fetch 6 ,mem_mouse_le_locall_addr1_temp 
+00ad 203a00b5 branch p_mouse_le_local_addr1_store ,blank 
+00ae 67e34a40 store 6 ,mem_mouse_le_locall_addr1_last 
+00af 1a60a606 increase 6 ,regc 
+00b0 6fe14a8d fetch 2 ,mem_otp_offset_le_locall_addr1_end 
+00b1 9a667c00 isub regc ,null 
+00b2 24610000 nrtn positive 
+00b3 1a622400 copy regc ,regb 
+00b4 202000ab branch p_mouse_write_otp_le_locall_addr1_loop 
 
 p_mouse_le_local_addr1_store:
-00a6 6fe34a40 fetch 6 ,mem_mouse_le_locall_addr1_last 
-00a7 684b4680 fetcht 6 ,mem_device1_locall_addr 
-00a8 98467c00 isub temp ,null 
-00a9 20628000 rtn zero 
-00aa da204680 arg mem_device1_locall_addr ,rega 
+00b5 6fe34a40 fetch 6 ,mem_mouse_le_locall_addr1_last 
+00b6 684b4680 fetcht 6 ,mem_device1_locall_addr 
+00b7 98467c00 isub temp ,null 
+00b8 20628000 rtn zero 
+00b9 da204680 arg mem_device1_locall_addr ,rega 
 
 p_mouse_le_addr_write:
-00ab df200006 arg 6 ,loopcnt 
-00ac 1a622400 copy regc ,regb 
-00ad 20206b33 branch otp_write 
+00ba df200006 arg 6 ,loopcnt 
+00bb 1a622400 copy regc ,regb 
+00bc 20206b33 branch otp_write 
 
 p_mouse_write_otp_le_locall_addr2:
-00ae 6a414a77 fetchr regb ,2 ,mem_otp_offset_le_locall_addr2 
-00af 1a422600 copy regb ,regc 
+00bd 6a414a77 fetchr regb ,2 ,mem_otp_offset_le_locall_addr2 
+00be 1a422600 copy regb ,regc 
 
 p_mouse_write_otp_le_locall_addr2_loop:
-00b0 2040570e call mouse_read_otp_le_locall_addr2_common 
-00b1 6fe34a5e fetch 6 ,mem_mouse_le_locall_addr2_temp 
-00b2 203a00ba branch p_mouse_le_local_addr2_store ,blank 
-00b3 67e34a58 store 6 ,mem_mouse_le_locall_addr2_last 
-00b4 1a60a606 increase 6 ,regc 
-00b5 6fe14a79 fetch 2 ,mem_otp_offset_le_locall_addr2_end 
-00b6 9a667c00 isub regc ,null 
-00b7 24610000 nrtn positive 
-00b8 1a622400 copy regc ,regb 
-00b9 202000b0 branch p_mouse_write_otp_le_locall_addr2_loop 
+00bf 2040570e call mouse_read_otp_le_locall_addr2_common 
+00c0 6fe34a5e fetch 6 ,mem_mouse_le_locall_addr2_temp 
+00c1 203a00c9 branch p_mouse_le_local_addr2_store ,blank 
+00c2 67e34a58 store 6 ,mem_mouse_le_locall_addr2_last 
+00c3 1a60a606 increase 6 ,regc 
+00c4 6fe14a79 fetch 2 ,mem_otp_offset_le_locall_addr2_end 
+00c5 9a667c00 isub regc ,null 
+00c6 24610000 nrtn positive 
+00c7 1a622400 copy regc ,regb 
+00c8 202000bf branch p_mouse_write_otp_le_locall_addr2_loop 
 
 p_mouse_le_local_addr2_store:
-00ba 6fe34a58 fetch 6 ,mem_mouse_le_locall_addr2_last 
-00bb 684b468d fetcht 6 ,mem_device2_locall_addr 
-00bc 98467c00 isub temp ,null 
-00bd 20628000 rtn zero 
-00be da20468d arg mem_device2_locall_addr ,rega 
-00bf 202000ab branch p_mouse_le_addr_write 
+00c9 6fe34a58 fetch 6 ,mem_mouse_le_locall_addr2_last 
+00ca 684b468d fetcht 6 ,mem_device2_locall_addr 
+00cb 98467c00 isub temp ,null 
+00cc 20628000 rtn zero 
+00cd da20468d arg mem_device2_locall_addr ,rega 
+00ce 202000ba branch p_mouse_le_addr_write 
               org 0x2000
 
 start:
@@ -15964,6 +15983,8 @@
 mouse_before_hibernate:
 4e3d 44bec00f bpatch patch0f_5 ,mem_patch0f 
 4e3e 20407388 call disable_authrom 
+
+mouse_before_hibernate_next:
 4e3f 2040567d call mouse_flash_power_down 
 4e40 6848c667 fetcht 1 ,mem_sensor_motion_gpio 
 4e41 20206ecd branch gpio_clr_wake 
@@ -15977,6 +15998,8 @@
 4e47 20405254 call mouse_gpio_config_output_high 
 4e48 6848c665 fetcht 1 ,mem_device_switch_gpio 
 4e49 20404f02 call mouse_gpio_set_pupd_by_input 
+
+mouse_setgpio_hibernate_next:
 4e4a 20404e75 call mouse_lpm_before_common 
 4e4b 6848c666 fetcht 1 ,mem_device_reuse_2ice_gpio 
 4e4c 20404f0a call device_gpio_config_input_pu 
Index: program/app_mouse.prog
===================================================================
--- /1121s/1121se/branch/mouse/mouse_public_1M/program/app_mouse.prog	(revision 3891)
+++ /1121s/1121se/branch/mouse/mouse_public_1M/program/app_mouse.prog	(working copy)
@@ -600,6 +600,7 @@
 	bpatch patch0f_5,mem_patch0f
 	call disable_authrom 
 //	call mouse_before_hibernate_wheel_gpio_set
+mouse_before_hibernate_next:
 	call mouse_flash_power_down
 	fetcht 1,mem_sensor_motion_gpio
 	branch gpio_clr_wake
@@ -613,6 +614,7 @@
 	call mouse_gpio_config_output_high
 	fetcht 1,mem_device_switch_gpio
 	call mouse_gpio_set_pupd_by_input
+mouse_setgpio_hibernate_next:
 	call mouse_lpm_before_common
 //	call mouse_gpio_pd_idle
 	fetcht 1,mem_device_reuse_2ice_gpio
Index: program/patch.prog
===================================================================
--- /1121s/1121se/branch/mouse/mouse_public_1M/program/patch.prog	(revision 3891)
+++ /1121s/1121se/branch/mouse/mouse_public_1M/program/patch.prog	(working copy)
@@ -1,9 +1,12 @@
-//define TEST_MODE
+// define TEST_MODE
 //define AUTO_TEST
 define G24_RETRANSMIT_COMMBINATION_PAIR
 
 
 	bbit1 8,pf_patch_ext
+
+	beq patch0f_5,p_mouse_before_hibernate
+	beq patch0f_6,p_mouse_setgpio_hibernate
 ifdef TEST_MODE
 	beq patch0f_1,p_mouse_start_work
 endif
@@ -29,6 +32,24 @@
 	rtneq patch3f_7
 	branch assert
 
+p_mouse_before_hibernate:
+	call disable_authrom 
+	call mouse_setgpio_hibernate
+	branch mouse_before_hibernate_next
+
+p_mouse_setgpio_hibernate:
+	call mouse_set_sdio_high
+	call clear_wake
+	call mouse_before_hibernate_wheel_gpio_set
+	fetch 1,mem_mouse_sensor_sdio_gpio
+	call mouse_gpio_config_output_high
+	fetcht 1,mem_device_switch_gpio
+	call mouse_gpio_set_pupd_by_input
+
+	arg 21,temp	//ice band gpio			
+	call device_gpio_config_input_pu
+	branch mouse_setgpio_hibernate_next
+
 //==========================CHIP FIXED PATCH====================//
 p_otp_read_data:
 	call enable_otp_read
