// =============================================================================
// 
//  Copyright (c) 2015 - 2017 Qualcomm Technologies International, Ltd.
//  All Rights Reserved.
//  Qualcomm Technologies International, Ltd. Confidential and Proprietary.
//  report this in case of problems:
//   $Revision: #8 $
//   Built Mon Feb 20 11:33:32 2017 GMT
//   Checked-in $DateTime: 2017/02/20 11:36:26 $
//   $File: //depot/bc/gemini-a12/dev/patches/10520/pb-207.psr $
// 
// Patch is for build 10520 gem_5hci_rom_bt4.1_gemA12_1407301204_dspm_encr128
// 
// Issues patched: B-158094, B-169261, B-171616, B-174351, B-176411,
//                 B-179448, B-180762, B-184008, B-206751, B-208678,
//                 B-216310, B-220605, B-223811
// 
// Documentation from pb-207.pb
// ----------------------------
// 
// General purpose patch and PSKEY bundle for CSR8811
// and CSR8311 A12 BT4.2 (build ID 10520).
// 
// Documentation from pb-173-common.pb
// -----------------------------------
// 
// General patch bundle for Gemini-A12 (build ID 10520)
// Patches and keys in here should be common to all
// package variants.
// 
// Documentation from report_bt4p2.pb
// ----------------------------------
// 
// Issues patched: B-174351
// 
// Report BT version 4.2
// 
// Documentation from patch_ulp_adv_avg_to_calc.xap
// ------------------------------------------------
// 
// Issues patched: B-171616
// 
// BlueCore can be configured through BCCMDVARID_BLE_CONFIG_ADV_RSSI_AVG_PARAM
// to report the advertising rssi average through LE ADVERTISING REPORT to the
// host for a given PEER LE device.
// For more information, See CS-317256-AN.
// 
// If the BlueCore is unable to receive a LE ADVERTISING REPORT from the PEER
// before a configured average rssi supervision timeout, then the BlueCore
// should send a LE ADVERTISING REPORT with rssi value equal to -127 conveying
// that the PEER is out of the range; however, it fails to do this.
// 
// Documentation from patch_ble_scan_deaf.xap
// ------------------------------------------
// 
// Issues patched: B-158094
// 
// When BlueCore is asked to do BLE scanning, it scans for a window
// approximately 2.5% shorter than asked for. Generally, this does
// not cause noticeable effects; sometimes BLE adverts can be missed
// making connection initialisation between two BLE devices take
// somewhat longer than expected. In pathological cases, especially
// if the scan window is long, connections may fail to be made entirely.
// 
// Documentation from patch_usb_suspend_deep_sleep.xap
// ---------------------------------------------------
// 
// Issues patched: B-176411
// 
// When BlueCore device is bus powered and is in USB suspend mode, 
// the current consumption is approximately 8 mA which is higher 
// than the expected current of 250 uA
// 
// Documentation from patch_tx_if_reduction.xap
// --------------------------------------------
// 
// Issues patched: B-169261
// 
// When a BlueCore7 device is configured to use a +/-500 kHz transmit IF, this
// can be overridden and a +/-375 kHz IF used instead. This reduces the
// bandwidthof the transmit spectrum providing a greater margin in a Chinese
// regulatory test.
// Only transmit IFs of +/-500 kHz may be reduced; if BlueCore7 is configured to
// use a TX IF of +/-1 MHz IF that will remain unchanged.
// 
// Documentation from coex_shutdown.xap
// ------------------------------------
// 
// Issues patched: B-208678
// 
// With Coexistence Unity-3 scheme, If the WLAN_DENY signal is asserted during
// the initial phase of an adaptive frequency hopping(AFH) scan, the Bluecore
// device fails to deassert its BT_ACTIVE signal
// 
// Documentation from patch_access_address.xap
// -------------------------------------------
// 
// Issues patched: B-206751
// 
// BlueCore devices may generate access addresses that only 
// have one bit transition in the 6 most significant bits.
// The problem is seen on access addresses that have the most 
// significant bit set to one and only have one bit transition 
// in the 6 most significant bits.
// 
// Furthermore, the access address, whilst not identical to the
// advertising channel packets’ Access Address, may differ by 
// only one bit.
// 
// Documentation from patch_sched_get_or_peek_message.c
// ----------------------------------------------------
// 
// Issues patched: B-220605
// 
// During the crossover of a locally initiated 
// LMP_unsniff_req and peer initiated LMP_sniff_subrate_req,
// Bluecore responds with LMP_Sniff_Subrate_Rsp even if it
// has initiated LMP_unsniff. This probably confuses peer and
// peer stops responding, leading to a timeout.
// 
// Documentation from patch_sched_get_or_peek_message_part2.c
// ----------------------------------------------------------
// 
// Issues patched: B-220605
// 
// During the crossover of a locally initiated 
// LMP_unsniff_req and peer initiated LMP_sniff_subrate_req,
// Bluecore responds with LMP_Sniff_Subrate_Rsp even if it
// has initiated LMP_unsniff. This probably confuses peer and
// peer stops responding, leading to a timeout.
// 
// Documentation from patch_ble_advt_restart.xap
// ---------------------------------------------
// 
// Issues patched: B-223811
// 
// When advertisements are disabled before the expiry of the interval
// and enabled immediately the advertisements are not sent before the
// expiry of the advertising interval
// 
// Documentation from patch_whitelist_connection_status.xap
// --------------------------------------------------------
// 
// Issues patched: B-180762
// 
// If a BlueCore device attempts but fails to form a Low Energy (LE) connection
// to a remote slave using the whitelist, it will make no further attempts to
// initiate a connection to that slave until either the BlueCore is reset or the
// slave is removed and re-added to the whitelist.
// 
// Documentation from patch_semp2.xap
// ----------------------------------
// 
// Issues patched: B-184008
// 
// If HCI_SET_EVENT_MASK_PAGE_2 command is sent with wrong parameters
// to Bluecore device, it returns error code
// 'INVALID_HCI_COMMAND_PARAMETERS'. It should return error code
// 'UNKNOWN_HCI_COMMAND'.
// 
// Documentation from patch_disc_ll_pdu.xap
// ----------------------------------------
// 
// Issues patched: B-179448
// 
// If a BlueCore device in the Connection State (regardless if in master or
// slave role) receives an unexpected Data Channel PDU from the peer Link Layer
// during the encryption start or encryption pause procedure, it does not exit 
// the Connection State and does not notify the Host with error code 
// "Connection Terminated Due to MIC Failure (0x3d)".
// 
// Documentation from patch_fsm_shared_patchpoint.c
// ------------------------------------------------
// 
// Issues patched: B-216310
// 
// In a particular scenario where the peer device retries a Role Switch
// (after a failed Role Switch) without EPR sequence, the Hydra/BlueCore 
// Devices do not handle the user data Start/Stop operation properly. 
// As a result the user data does not resume after the procedure is finished.
// 
// Version information for input files
// -----------------------------------
// 
// Created by patchmaker.pl Revision: #68  Date: 2016/01/18 
// 
// Input file: pb-207.pb
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/pb-207.pb
// File revision: 4
// 
// Input file: pb-173-common.pb
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/pb-173-common.pb
// File revision: 7
// 
// Input file: report_bt4p2.pb
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/report_bt4p2.pb
// File revision: 1
// 
// Input file: patch_ulp_adv_avg_to_calc.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_ulp_adv_avg_to_calc.xap
// File revision: 4
// 
// Input file: ../patch_utils.inc
// Depot file: //depot/bc/gemini-a12/dev/patches/patch_utils.inc
// File revision: 1
// 
// Input file: patch_ble_scan_deaf.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_ble_scan_deaf.xap
// File revision: 3
// 
// Input file: patch_usb_suspend_deep_sleep.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_usb_suspend_deep_sleep.xap
// File revision: 3
// 
// Input file: patch_tx_if_reduction.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_tx_if_reduction.xap
// File revision: 1
// 
// Input file: coex_shutdown.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/coex_shutdown.xap
// File revision: 3
// 
// Input file: patch_access_address.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_access_address.xap
// File revision: 2
// 
// Input file: patch_sched_get_or_peek_message.c
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_sched_get_or_peek_message.c
// File revision: 3
// 
// Input file: patch_sched_get_or_peek_message_part2.c
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_sched_get_or_peek_message_part2.c
// File revision: 2
// 
// Input file: patch_ble_advt_restart.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_ble_advt_restart.xap
// File revision: 2
// 
// Input file: patch_whitelist_connection_status.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_whitelist_connection_status.xap
// File revision: 4
// 
// Input file: patch_semp2.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_semp2.xap
// File revision: 3
// 
// Input file: patch_disc_ll_pdu.xap
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_disc_ll_pdu.xap
// File revision: 4
// 
// Input file: patch_fsm_shared_patchpoint.c
// Depot file: //depot/bc/gemini-a12/dev/patches/10520/patch_fsm_shared_patchpoint.c
// File revision: 3

// explicit, PSKEY_HCI_LMP_LOCAL_VERSION (0x010d, 269), 1 words
&010d = 0808

// explicit, PSKEY_LMP_REMOTE_VERSION (0x010e, 270), 1 words
&010e = 0008

// patch_hardware_0, PSKEY_PATCH50 (0x212c, 8492), 56 words
&212c = 0000 f001 0617 0513 0118 ff2b ff0e 1a00 2818 009e 081b f100 8888 24f0 f925 f821 0a17 0184 0cf0 0117 0013 0009 02a4 fb25 fa21 f915 f811 fb55 fa61 09e0 ff84 10f0 0117 0013 0009 02a4 f935 f841 f925 f821 0f1b 0712 10a4 0494 0712 e151 0722 f915 f811 0018 ff2b ff0e f000 0518 00e2 5a79

// patch_hardware_1, PSKEY_PATCH51 (0x212d, 8493), 21 words
&212d = 0002 968a 0863 f925 f821 0757 0663 e099 02ec 05e0 f915 0727 f815 0627 0218 ff2b ff0e 9700 8d18 00e2 7e34

// patch_hardware_2, PSKEY_PATCH52 (0x212e, 8494), 16 words
&212e = 0002 0b5a 0100 7834 0040 0327 0223 f815 e311 0218 ff2b ff0e 0b00 5e18 00e2 59c1

// patch_hardware_3, PSKEY_PATCH53 (0x212f, 8495), 17 words
&212f = 0000 7315 0084 04f0 0800 0014 03e0 f800 1215 0b27 0018 ff2b ff0e 7300 1818 00e2 0549

// patch_hardware_4, PSKEY_PATCH54 (0x2130, 8496), 21 words
&2130 = 0001 53f8 0817 0e27 0c00 6384 07f0 0118 ff2b ff0e 5400 0918 00e2 0917 0118 ff2b ff0e 5400 fb18 00e2 91f6

// patch_hardware_5, PSKEY_PATCH55 (0x2131, 8497), 49 words
&2131 = 0002 c0d5 0423 05f4 031b 0012 0280 1df0 021b 0916 1000 00c4 1ef0 0916 03c4 1bf4 031b 0012 0280 17f4 0380 15f4 0480 13f4 0580 11f4 0680 0ff4 0b80 0df4 0d80 0bf4 019c fb00 6719 0d9e 0218 ff2b ff0e c200 8c18 00e2 0218 ff2b ff0e c100 de18 00e2 c5cf

// patch_hardware_6, PSKEY_PATCH56 (0x2132, 8498), 42 words
&2132 = 0003 243f f40b 0827 0923 e019 0916 01b4 0926 0318 ff2b ff0e 2400 4218 00e2 fa0b 3d14 0327 0114 0227 0014 0127 0027 081b 0816 0218 ff2b ff0e f700 fd18 009e e111 081b 0816 0218 ff2b ff0e 3300 ff18 009e fa0f 40f2

// patch_hardware_7, PSKEY_PATCH57 (0x2133, 8499), 23 words
&2133 = 0003 254e 02c0 0916 1000 00c4 02f4 02b0 0916 fec4 e1b1 0922 0816 0318 ff2b ff0e 2500 5218 8000 00c0 08f2 00e2 e402

// patch_hardware_8, PSKEY_PATCH58 (0x2134, 8500), 16 words
&2134 = 0003 21ca fa0b 0227 0323 e019 0916 01b4 0926 0318 ff2b ff0e 2200 cd18 00e2 22dc

// patch_hardware_9, PSKEY_PATCH59 (0x2135, 8501), 18 words
&2135 = 0000 55e2 09f4 0218 ff2b ff0e 2c00 a718 009e 0314 fc0f 0018 ff2b ff0e 5600 0118 00e2 a008

// patch_hardware_10, PSKEY_PATCH60 (0x2136, 8502), 30 words
&2136 = 0004 0d80 1aa4 0418 ff2b ff0e 1d00 ba18 009e 0184 0d2c 0013 8f00 89d0 0117 bf00 d6d4 0318 ff2b ff0e 2700 4218 009e 0418 ff2b ff0e 0e00 8418 00e2 6855

// patch_hardware_11, PSKEY_PATCH61 (0x2137, 8503), 22 words
&2137 = 0002 4da5 0118 ff2b ff0e 6200 c518 009e 031b 2b22 fcc4 2c26 0114 e700 f025 0218 ff2b ff0e 4e00 a818 00e2 8dfc

// patch_hardware_12, PSKEY_PATCH62 (0x2138, 8504), 19 words
&2138 = 0002 0f22 0310 081b 0100 8022 0100 b012 04f4 0114 e019 0426 0218 ff2b ff0e 0f00 2618 00e2 bc41

// patch_hardware_13, PSKEY_PATCH63 (0x2139, 8505), 12 words
&2139 = 0002 0d95 0513 0100 b022 0218 ff2b ff0e 0f00 db18 00e2 7a40

// patch_fsm_shared_patchpoint, PSKEY_PATCH121 (0x2209, 8713), 36 words
&2209 = fc0b 0b13 0717 1d00 c184 1df0 081b 0016 6384 05f0 1380 17f0 0114 13e0 6084 13f0 0100 da80 0df0 0d1b 5d9a 0af4 b900 f014 0127 0214 0027 e315 0010 000e 019f 0014 0d1b 5d26 fc0f a1a6

// patch_sched_get_or_peek_message, PSKEY_PATCH123 (0x220b, 8715), 49 words
&220b = fa0b 0717 0484 2cf0 0617 0690 e119 0c00 d438 041a 001a 022b 23f4 0116 0184 20f0 0216 0327 1df4 e119 0016 0784 19f0 e500 ab15 8000 0054 0100 c018 ff2b fe27 0317 ff0e fe9f e199 0cf4 7d00 f214 0127 0014 0027 0317 000e 019f 0014 021b 0226 fa0f 8392

// patch_spare1, PSKEY_PATCH155 (0x222b, 8747), 60 words
&222b = e70b 1627 a100 8514 0227 0214 0127 6b00 d814 0427 0214 0327 0417 fe27 0317 ff27 1613 0230 0814 0027 e415 0534 ff0e fe9f 0513 0009 01a4 e015 7fc4 7f84 1bf0 0617 1584 18f0 161b 0116 010e 029f e119 049a 11f4 0116 4184 0ef0 e500 ac11 8000 0050 0100 c014 ff27 fe23 0816 ff0e fe9f 0114 02e0 0014 e70f 4d65

// patch_spare2, PSKEY_PATCH156 (0x222c, 8748), 40 words
&222c = f40b 0927 2900 d414 0427 0314 0327 3500 ea14 0627 0314 0527 2900 9614 0827 0414 0727 0917 0110 070e 089f 0917 030e 049f 0617 fe27 0517 ff27 7f14 0027 1514 0127 2a14 0227 0114 0913 ff0e fe9f f40f 3478
&01fe = 6590
//Interface, BCSP
//&01f9 = 0001
//Interface, H4
&01f9 = 0003
//Bit rate for 8811, 115200
&01ea = 0001 c200
