mirror of
https://github.com/bkerler/mtkclient.git
synced 2024-11-14 19:25:05 -05:00
Fixes
This commit is contained in:
parent
b8fec1b008
commit
eba887b9bb
2 changed files with 228 additions and 227 deletions
BIN
mtkclient/Loader/Preloader/preloader_cactus.bin
Normal file
BIN
mtkclient/Loader/Preloader/preloader_cactus.bin
Normal file
Binary file not shown.
|
@ -7,6 +7,7 @@ class damodes:
|
|||
DEFAULT = 0
|
||||
XFLASH = 1
|
||||
|
||||
|
||||
class chipconfig:
|
||||
def __init__(self, var1=None, watchdog=None, uart=None, brom_payload_addr=None,
|
||||
da_payload_addr=None, pl_payload_addr=None, cqdma_base=None, sej_base=None, dxcc_base=None,
|
||||
|
@ -40,7 +41,6 @@ class chipconfig:
|
|||
self.damode = damode
|
||||
self.loader = loader
|
||||
|
||||
|
||||
# Credits to cyrozap and Chaosmaster for some values
|
||||
"""
|
||||
0x0: chipconfig(var1=0x0,
|
||||
|
@ -69,6 +69,7 @@ class chipconfig:
|
|||
blacklist
|
||||
"""
|
||||
|
||||
|
||||
"""
|
||||
0x5700: chipconfig( # var1
|
||||
# watchdog
|
||||
|
@ -183,7 +184,7 @@ hwconfig = {
|
|||
# dacode
|
||||
name="MT6255"),
|
||||
0x6261: chipconfig(
|
||||
var1=0x28, # Smartwatch, confirmed
|
||||
var1=0x28, # Smartwatch, confirmed
|
||||
watchdog=0xA0030000,
|
||||
uart=0xA0080000,
|
||||
brom_payload_addr=0x100A00,
|
||||
|
@ -193,15 +194,15 @@ hwconfig = {
|
|||
# no dxcc
|
||||
# no cqdma_base
|
||||
# no ap_dma_mem
|
||||
blacklist=[(0xF7FF9A00,0)],
|
||||
send_ptr=(0x700044b0,0xfff058ec),
|
||||
blacklist=[(0xF7FF9A00, 0)],
|
||||
send_ptr=(0x700044b0, 0xfff058ec),
|
||||
ctrl_buffer=0xFFF020DB,
|
||||
cmd_handler=0xFFF07001,
|
||||
damode=damodes.DEFAULT,
|
||||
dacode=0x6261,
|
||||
name="MT6261",
|
||||
loader="mt6261_payload.bin"
|
||||
),
|
||||
),
|
||||
0x6280: chipconfig( # var1
|
||||
# watchdog
|
||||
# uart
|
||||
|
@ -268,12 +269,12 @@ hwconfig = {
|
|||
# no dxcc
|
||||
# cqdma_base
|
||||
ap_dma_mem=0x11000000 + 0x19C, # AP_P_DMA_I2C_1_MEM_ADDR
|
||||
blacklist=[(0x11141F0C,0)],
|
||||
blacklist=[(0x11141F0C, 0)],
|
||||
blacklist_count=0x00000008,
|
||||
send_ptr=(0x11141f4c,0xba68),
|
||||
send_ptr=(0x11141f4c, 0xba68),
|
||||
ctrl_buffer=0x11142BE0,
|
||||
cmd_handler=0x000002F7,
|
||||
brom_register_access=(0xbd48,0xbefc),
|
||||
brom_register_access=(0xbd48, 0xbefc),
|
||||
meid_addr=0x11142C34,
|
||||
has_socid=False,
|
||||
damode=damodes.DEFAULT, #
|
||||
|
@ -322,30 +323,30 @@ hwconfig = {
|
|||
dacode=0x6577,
|
||||
name="MT6577"),
|
||||
0x6580: chipconfig(var1=0xAC,
|
||||
watchdog=0x10007000,
|
||||
uart=0x11005000,
|
||||
brom_payload_addr=0x100A00,
|
||||
da_payload_addr=0x201000,
|
||||
pl_payload_addr=0x80001000,
|
||||
# no gcpu_base
|
||||
sej_base=0x1000A000,
|
||||
# dxcc_base
|
||||
cqdma_base=0x1020AC00,
|
||||
ap_dma_mem=0x11000000 + 0x1A0, # AP_P_DMA_I2C_1_RX_MEM_ADDR
|
||||
blacklist=[(0x102764, 0x0)],
|
||||
blacklist_count=0x00000008,
|
||||
send_ptr=(0x1027a4,0xb60c),
|
||||
ctrl_buffer=0x00103060,
|
||||
cmd_handler=0x0000C113,
|
||||
brom_register_access=(0xb8e0,0xba94),
|
||||
meid_addr=0x1030B4,
|
||||
has_socid=False,
|
||||
damode=damodes.DEFAULT,
|
||||
dacode=0x6580,
|
||||
name="MT6580",
|
||||
loader="mt6580_payload.bin"),
|
||||
watchdog=0x10007000,
|
||||
uart=0x11005000,
|
||||
brom_payload_addr=0x100A00,
|
||||
da_payload_addr=0x201000,
|
||||
pl_payload_addr=0x80001000,
|
||||
# no gcpu_base
|
||||
sej_base=0x1000A000,
|
||||
# dxcc_base
|
||||
cqdma_base=0x1020AC00,
|
||||
ap_dma_mem=0x11000000 + 0x1A0, # AP_P_DMA_I2C_1_RX_MEM_ADDR
|
||||
blacklist=[(0x102764, 0x0)],
|
||||
blacklist_count=0x00000008,
|
||||
send_ptr=(0x1027a4, 0xb60c),
|
||||
ctrl_buffer=0x00103060,
|
||||
cmd_handler=0x0000C113,
|
||||
brom_register_access=(0xb8e0, 0xba94),
|
||||
meid_addr=0x1030B4,
|
||||
has_socid=False,
|
||||
damode=damodes.DEFAULT,
|
||||
dacode=0x6580,
|
||||
name="MT6580",
|
||||
loader="mt6580_payload.bin"),
|
||||
0x6582: chipconfig(
|
||||
var1=0xA, #confirmed
|
||||
var1=0xA, # confirmed
|
||||
watchdog=0x10007000,
|
||||
uart=0x11002000,
|
||||
brom_payload_addr=0x100A00,
|
||||
|
@ -358,10 +359,10 @@ hwconfig = {
|
|||
ap_dma_mem=0x11000000 + 0x320, # AP_DMA_I2C_0_RX_MEM_ADDR
|
||||
blacklist=[(0x102788, 0x0)],
|
||||
blacklist_count=0x00000008,
|
||||
send_ptr=(0x1027c8,0xa5fc),
|
||||
send_ptr=(0x1027c8, 0xa5fc),
|
||||
ctrl_buffer=0x00103078,
|
||||
cmd_handler=0x0000B2E7,
|
||||
brom_register_access=(0xa8d0,0xaa84),
|
||||
brom_register_access=(0xa8d0, 0xaa84),
|
||||
meid_addr=0x1030CC,
|
||||
has_socid=False,
|
||||
damode=damodes.DEFAULT, #
|
||||
|
@ -384,7 +385,7 @@ hwconfig = {
|
|||
dacode=0x6589,
|
||||
name="MT6583/6589"),
|
||||
0x6592: chipconfig(
|
||||
var1=0xA, #confirmed
|
||||
var1=0xA, # confirmed
|
||||
watchdog=0x10007000,
|
||||
uart=0x11002000,
|
||||
brom_payload_addr=0x100A00,
|
||||
|
@ -395,12 +396,12 @@ hwconfig = {
|
|||
# no dxcc
|
||||
cqdma_base=0x10212000, # This chip might not support cqdma
|
||||
ap_dma_mem=0x11000000 + 0x320, # AP_DMA_I2C_0_RX_MEM_ADDR
|
||||
blacklist=[(0x00102764,0),(0x00105BF0,0)],
|
||||
blacklist=[(0x00102764, 0), (0x00105BF0, 0)],
|
||||
blacklist_count=0x00000008,
|
||||
send_ptr=(0x1027a4,0xa564),
|
||||
send_ptr=(0x1027a4, 0xa564),
|
||||
ctrl_buffer=0x00103054,
|
||||
cmd_handler=0x0000B09F,
|
||||
brom_register_access=(0xa838,0xa9ec),
|
||||
brom_register_access=(0xa838, 0xa9ec),
|
||||
meid_addr=0x1030A8,
|
||||
has_socid=False,
|
||||
dacode=0x6592,
|
||||
|
@ -408,27 +409,27 @@ hwconfig = {
|
|||
name="MT6592",
|
||||
loader="mt6592_payload.bin"),
|
||||
0x6595: chipconfig(var1=0xA,
|
||||
watchdog=0x10007000,
|
||||
uart=0x11002000,
|
||||
brom_payload_addr=0x100A00,
|
||||
da_payload_addr=0x110000,
|
||||
# gcpu_base
|
||||
sej_base=0x1000A000,
|
||||
# dxcc_base
|
||||
# cqdma_base
|
||||
ap_dma_mem=0x11000000 + 0x1A0,
|
||||
blacklist=[(0x00102768, 0x0)],
|
||||
blacklist_count=0x00000008,
|
||||
send_ptr=(0x1027a8,0xb218),
|
||||
ctrl_buffer=0x00103050,
|
||||
cmd_handler=0x0000BD53,
|
||||
brom_register_access=(0xb4ec,0xb6a0),
|
||||
meid_addr=0x1030A4,
|
||||
has_socid=False,
|
||||
dacode=0x6595,
|
||||
damode=damodes.DEFAULT, #
|
||||
name="MT6595",
|
||||
loader="mt6595_payload.bin"),
|
||||
watchdog=0x10007000,
|
||||
uart=0x11002000,
|
||||
brom_payload_addr=0x100A00,
|
||||
da_payload_addr=0x110000,
|
||||
# gcpu_base
|
||||
sej_base=0x1000A000,
|
||||
# dxcc_base
|
||||
# cqdma_base
|
||||
ap_dma_mem=0x11000000 + 0x1A0,
|
||||
blacklist=[(0x00102768, 0x0)],
|
||||
blacklist_count=0x00000008,
|
||||
send_ptr=(0x1027a8, 0xb218),
|
||||
ctrl_buffer=0x00103050,
|
||||
cmd_handler=0x0000BD53,
|
||||
brom_register_access=(0xb4ec, 0xb6a0),
|
||||
meid_addr=0x1030A4,
|
||||
has_socid=False,
|
||||
dacode=0x6595,
|
||||
damode=damodes.DEFAULT, #
|
||||
name="MT6595",
|
||||
loader="mt6595_payload.bin"),
|
||||
# 6725
|
||||
0x321: chipconfig(
|
||||
var1=0x28,
|
||||
|
@ -438,16 +439,16 @@ hwconfig = {
|
|||
da_payload_addr=0x201000,
|
||||
pl_payload_addr=0x40200000,
|
||||
gcpu_base=0x10216000,
|
||||
sej_base=0x10008000, # hacc
|
||||
sej_base=0x10008000, # hacc
|
||||
# no dxcc
|
||||
cqdma_base=0x10217C00,
|
||||
ap_dma_mem=0x11000000 + 0x1A0, # AP_DMA_I2C_O_RX_MEM_ADDR
|
||||
blacklist=[(0x00102760, 0x0), (0x00105704, 0x0)],
|
||||
blacklist_count=0x00000008,
|
||||
send_ptr=(0x1027a0,0x95f8),
|
||||
send_ptr=(0x1027a0, 0x95f8),
|
||||
ctrl_buffer=0x0010305C,
|
||||
cmd_handler=0x0000A17F,
|
||||
brom_register_access=(0x98cc,0x9a94),
|
||||
brom_register_access=(0x98cc, 0x9a94),
|
||||
meid_addr=0x1030B0,
|
||||
has_socid=False,
|
||||
damode=damodes.DEFAULT, #
|
||||
|
@ -468,10 +469,10 @@ hwconfig = {
|
|||
ap_dma_mem=0x11000000 + 0x1A0, # AP_DMA_I2C_O_RX_MEM_ADDR
|
||||
blacklist=[(0x00102760, 0x0), (0x00105704, 0x0)],
|
||||
blacklist_count=0x00000008,
|
||||
send_ptr=(0x1027a0,0x9608),
|
||||
send_ptr=(0x1027a0, 0x9608),
|
||||
ctrl_buffer=0x0010305C,
|
||||
cmd_handler=0x0000A17F,
|
||||
brom_register_access=(0x98dc,0x9aa4),
|
||||
brom_register_access=(0x98dc, 0x9aa4),
|
||||
meid_addr=0x1030B0,
|
||||
has_socid=False,
|
||||
damode=damodes.DEFAULT, #
|
||||
|
@ -493,10 +494,10 @@ hwconfig = {
|
|||
ap_dma_mem=0x11000000 + 0x1a0, # AP_DMA_I2C_1_RX_MEM_ADDR
|
||||
blacklist=[(0x10282C, 0x0)],
|
||||
blacklist_count=0x0000000A,
|
||||
send_ptr=(0x102870,0xdf1c),
|
||||
send_ptr=(0x102870, 0xdf1c),
|
||||
ctrl_buffer=0x00102A28,
|
||||
cmd_handler=0x0000EC49,
|
||||
brom_register_access=(0xe330,0xe3e8),
|
||||
brom_register_access=(0xe330, 0xe3e8),
|
||||
meid_addr=0x102AF8,
|
||||
has_socid=True,
|
||||
damode=damodes.XFLASH,
|
||||
|
@ -546,10 +547,10 @@ hwconfig = {
|
|||
ap_dma_mem=0x11000000 + 0x1A0, # AP_DMA_I2C_0_RX_MEM_ADDR
|
||||
blacklist=[(0x00102760, 0x0), (0x00105704, 0x0)],
|
||||
blacklist_count=0x00000008,
|
||||
send_ptr=(0x1027a0,0x9668),
|
||||
send_ptr=(0x1027a0, 0x9668),
|
||||
ctrl_buffer=0x0010305C,
|
||||
cmd_handler=0x0000A1EF,
|
||||
brom_register_access=(0x993c,0x9b04),
|
||||
brom_register_access=(0x993c, 0x9b04),
|
||||
meid_addr=0x1030B0,
|
||||
has_socid=False,
|
||||
damode=damodes.DEFAULT, #
|
||||
|
@ -569,15 +570,15 @@ hwconfig = {
|
|||
ap_dma_mem=0x11000000 + 0x1A0, # AP_DMA_I2C_1_RX_MEM_ADDR
|
||||
blacklist=[(0x10276C, 0x0)],
|
||||
blacklist_count=0x00000008,
|
||||
send_ptr=(0x1027b0,0x9a6c),
|
||||
send_ptr=(0x1027b0, 0x9a6c),
|
||||
ctrl_buffer=0x00103058,
|
||||
cmd_handler=0x0000A5FF,
|
||||
brom_register_access=(0x9d4c,0x9f14),
|
||||
brom_register_access=(0x9d4c, 0x9f14),
|
||||
meid_addr=0x1030AC,
|
||||
has_socid=False,
|
||||
damode=damodes.XFLASH,
|
||||
dacode=0x6755,
|
||||
name="MT6755/M/T/S",
|
||||
name="MT6755/MT6750/M/T/S",
|
||||
description="Helio P10/P15/P18",
|
||||
loader="mt6755_payload.bin"),
|
||||
0x551: chipconfig(
|
||||
|
@ -593,10 +594,10 @@ hwconfig = {
|
|||
ap_dma_mem=0x11000000 + 0x1A0, # AP_DMA_I2C_1_RX_MEM_ADDR
|
||||
blacklist=[(0x102774, 0x0)],
|
||||
blacklist_count=0x0000000A,
|
||||
send_ptr=(0x1027b8,0x9c2c),
|
||||
send_ptr=(0x1027b8, 0x9c2c),
|
||||
ctrl_buffer=0x00103060,
|
||||
cmd_handler=0x0000A8FB,
|
||||
brom_register_access=(0xa030,0xa0e8),
|
||||
brom_register_access=(0xa030, 0xa0e8),
|
||||
meid_addr=0x1030B4,
|
||||
has_socid=False,
|
||||
damode=damodes.XFLASH,
|
||||
|
@ -618,7 +619,7 @@ hwconfig = {
|
|||
damode=damodes.XFLASH,
|
||||
dacode=0x6758,
|
||||
name="MT6758"
|
||||
),
|
||||
),
|
||||
0x507: chipconfig( # var1
|
||||
watchdog=0x10210000,
|
||||
uart=0x11020000,
|
||||
|
@ -647,10 +648,10 @@ hwconfig = {
|
|||
ap_dma_mem=0x11000a80 + 0x1a0, # AP_DMA_I2C_CH0_RX_MEM_ADDR
|
||||
blacklist=[(0x102828, 0x0)],
|
||||
blacklist_count=0x0000000A,
|
||||
send_ptr=(0x10286c,0xbc8c),
|
||||
send_ptr=(0x10286c, 0xbc8c),
|
||||
ctrl_buffer=0x00102A28,
|
||||
cmd_handler=0x0000C9B9,
|
||||
brom_register_access=(0xc0a0,0xc158),
|
||||
brom_register_access=(0xc0a0, 0xc158),
|
||||
meid_addr=0x102AF8,
|
||||
has_socid=True,
|
||||
damode=damodes.XFLASH,
|
||||
|
@ -671,10 +672,10 @@ hwconfig = {
|
|||
ap_dma_mem=0x11000a80 + 0x1a0,
|
||||
blacklist=[(0x102834, 0x0)],
|
||||
blacklist_count=0x0000000A,
|
||||
send_ptr=(0x102878,0xd66c),
|
||||
send_ptr=(0x102878, 0xd66c),
|
||||
ctrl_buffer=0x00102A90,
|
||||
cmd_handler=0x0000E383,
|
||||
brom_register_access=(0xda80,0xdb38),
|
||||
brom_register_access=(0xda80, 0xdb38),
|
||||
meid_addr=0x102B78,
|
||||
has_socid=True,
|
||||
damode=damodes.XFLASH,
|
||||
|
@ -683,23 +684,23 @@ hwconfig = {
|
|||
description="Helio P23",
|
||||
loader="mt6763_payload.bin"),
|
||||
0x766: chipconfig(
|
||||
var1=0x25, #confirmed
|
||||
var1=0x25, # confirmed
|
||||
watchdog=0x10007000,
|
||||
uart=0x11002000,
|
||||
brom_payload_addr=0x100A00,
|
||||
da_payload_addr=0x201000,
|
||||
pl_payload_addr=0x40200000,
|
||||
gcpu_base=0x10050000, # not confirmed
|
||||
gcpu_base=0x10050000, # not confirmed
|
||||
sej_base=0x1000a000, # hacc
|
||||
dxcc_base=0x10210000,
|
||||
cqdma_base=0x10212000,
|
||||
ap_dma_mem=0x11000000 + 0x1a0, # AP_DMA_I2C2_CH0_RX_MEM_ADDR
|
||||
blacklist=[(0x102828, 0x0)],
|
||||
blacklist_count=0x0000000A,
|
||||
send_ptr=(0x10286c,0xbdc0),
|
||||
send_ptr=(0x10286c, 0xbdc0),
|
||||
ctrl_buffer=0x00102A28,
|
||||
cmd_handler=0x0000CAED,
|
||||
brom_register_access=(0xc1d4,0xc28c),
|
||||
brom_register_access=(0xc1d4, 0xc28c),
|
||||
meid_addr=0x102AF8,
|
||||
has_socid=True,
|
||||
damode=damodes.XFLASH,
|
||||
|
@ -721,10 +722,10 @@ hwconfig = {
|
|||
ap_dma_mem=0x11000000 + 0x1A0,
|
||||
blacklist=[(0x10282C, 0x0)],
|
||||
blacklist_count=0x0000000A,
|
||||
send_ptr=(0x10286c,0xc190),
|
||||
send_ptr=(0x10286c, 0xc190),
|
||||
ctrl_buffer=0x00102A28,
|
||||
cmd_handler=0x0000CEC5,
|
||||
brom_register_access=(0xc598,0xc650),
|
||||
brom_register_access=(0xc598, 0xc650),
|
||||
meid_addr=0x102AF8,
|
||||
has_socid=True,
|
||||
damode=damodes.XFLASH,
|
||||
|
@ -746,10 +747,10 @@ hwconfig = {
|
|||
ap_dma_mem=0x11000000 + 0x158, # AP_DMA_I2C_1_RX_MEM_ADDR
|
||||
blacklist=[(0x00102834, 0x0)],
|
||||
blacklist_count=0x0000000A,
|
||||
send_ptr=(0x102878,0xdebc),
|
||||
send_ptr=(0x102878, 0xdebc),
|
||||
ctrl_buffer=0x00102A80,
|
||||
cmd_handler=0x0000EBE9,
|
||||
brom_register_access=(0xe2d0,0xe388),
|
||||
brom_register_access=(0xe2d0, 0xe388),
|
||||
meid_addr=0x102B38,
|
||||
has_socid=True,
|
||||
damode=damodes.XFLASH,
|
||||
|
@ -757,7 +758,7 @@ hwconfig = {
|
|||
name="MT6771/MT8385/MT8183/MT8666",
|
||||
description="Helio P60/P70/G80",
|
||||
loader="mt6771_payload.bin"),
|
||||
#blacklist=[(0x00102830, 0x00200008), # Static permission table pointer
|
||||
# blacklist=[(0x00102830, 0x00200008), # Static permission table pointer
|
||||
# (0x00102834, 2), # Static permission table entry count
|
||||
# (0x00200000, 0x00000000), # Memory region minimum address
|
||||
# (0x00200004, 0xfffffffc), # Memory region maximum address
|
||||
|
@ -768,81 +769,81 @@ hwconfig = {
|
|||
# (0x00200018, 0x00200000), # Memory region array pointer
|
||||
# (0x0020001c, 0x00000001), # Memory region array length
|
||||
# (0x00106A60, 0)], # Dynamic permission table entry count?),
|
||||
0x725: chipconfig(var1=0xA, #confirmed
|
||||
watchdog=0x10007000,
|
||||
uart=0x11002000,
|
||||
brom_payload_addr=0x100A00,
|
||||
da_payload_addr=0x201000,
|
||||
pl_payload_addr=0x40200000,
|
||||
gcpu_base=0x10050000,
|
||||
sej_base=0x1000a000, # hacc
|
||||
dxcc_base=0x10210000,
|
||||
cqdma_base=0x10212000,
|
||||
ap_dma_mem=0x11000000 + 0x158,
|
||||
blacklist=[(0x102838, 0x0)],
|
||||
blacklist_count=0x0000000A,
|
||||
send_ptr=(0x102878,0xe04c),
|
||||
ctrl_buffer=0x00102A80,
|
||||
cmd_handler=0x0000ED6D,
|
||||
brom_register_access=(0xe454,0xe50c),
|
||||
meid_addr=0x102B38,
|
||||
has_socid=True,
|
||||
damode=damodes.XFLASH,
|
||||
dacode=0x6779,
|
||||
name="MT6779",
|
||||
description="Helio P90",
|
||||
loader="mt6779_payload.bin"),
|
||||
0x1066: chipconfig(#var1=0xA, #confirmed
|
||||
#watchdog=0x10007000,
|
||||
#uart=0x11002000,
|
||||
#brom_payload_addr=0x100A00,
|
||||
#da_payload_addr=0x201000,
|
||||
#pl_payload_addr=0x40200000,
|
||||
#gcpu_base=0x10050000,
|
||||
#sej_base=0x1000A000, # hacc
|
||||
#dxcc_base=0x10210000,
|
||||
#cqdma_base=0x10212000,
|
||||
#ap_dma_mem=0x11000000 + 0x158,
|
||||
#blacklist=[(0x102838, 0x0)],
|
||||
#blacklist_count=0x0000000A,
|
||||
#send_ptr=(0x102878,0xe2a4),
|
||||
#ctrl_buffer=0x00102A80,
|
||||
#cmd_handler=0x0000EFD9,
|
||||
#brom_register_access=(0xe6ac,0xe764),
|
||||
#meid_addr=0x102B38,
|
||||
0x725: chipconfig(var1=0xA, # confirmed
|
||||
watchdog=0x10007000,
|
||||
uart=0x11002000,
|
||||
brom_payload_addr=0x100A00,
|
||||
da_payload_addr=0x201000,
|
||||
pl_payload_addr=0x40200000,
|
||||
gcpu_base=0x10050000,
|
||||
sej_base=0x1000a000, # hacc
|
||||
dxcc_base=0x10210000,
|
||||
cqdma_base=0x10212000,
|
||||
ap_dma_mem=0x11000000 + 0x158,
|
||||
blacklist=[(0x102838, 0x0)],
|
||||
blacklist_count=0x0000000A,
|
||||
send_ptr=(0x102878, 0xe04c),
|
||||
ctrl_buffer=0x00102A80,
|
||||
cmd_handler=0x0000ED6D,
|
||||
brom_register_access=(0xe454, 0xe50c),
|
||||
meid_addr=0x102B38,
|
||||
has_socid=True,
|
||||
damode=damodes.XFLASH,
|
||||
dacode=0x6779,
|
||||
name="MT6779",
|
||||
description="Helio P90",
|
||||
loader="mt6779_payload.bin"),
|
||||
0x1066: chipconfig( # var1=0xA, #confirmed
|
||||
# watchdog=0x10007000,
|
||||
# uart=0x11002000,
|
||||
# brom_payload_addr=0x100A00,
|
||||
# da_payload_addr=0x201000,
|
||||
# pl_payload_addr=0x40200000,
|
||||
# gcpu_base=0x10050000,
|
||||
# sej_base=0x1000A000, # hacc
|
||||
# dxcc_base=0x10210000,
|
||||
# cqdma_base=0x10212000,
|
||||
# ap_dma_mem=0x11000000 + 0x158,
|
||||
# blacklist=[(0x102838, 0x0)],
|
||||
# blacklist_count=0x0000000A,
|
||||
# send_ptr=(0x102878,0xe2a4),
|
||||
# ctrl_buffer=0x00102A80,
|
||||
# cmd_handler=0x0000EFD9,
|
||||
# brom_register_access=(0xe6ac,0xe764),
|
||||
# meid_addr=0x102B38,
|
||||
has_socid=True,
|
||||
damode=damodes.XFLASH,
|
||||
dacode=0x6781,
|
||||
name="MT6781",
|
||||
description="Helio A22",
|
||||
#loader="mt6781_payload.bin"
|
||||
),
|
||||
0x813: chipconfig(var1=0xA, #confirmed
|
||||
watchdog=0x10007000,
|
||||
uart=0x11002000,
|
||||
brom_payload_addr=0x100A00,
|
||||
da_payload_addr=0x201000,
|
||||
pl_payload_addr=0x40200000,
|
||||
gcpu_base=0x10050000,
|
||||
sej_base=0x1000A000, # hacc
|
||||
dxcc_base=0x10210000,
|
||||
cqdma_base=0x10212000,
|
||||
ap_dma_mem=0x11000000 + 0x158,
|
||||
blacklist=[(0x102838, 0x0)],
|
||||
blacklist_count=0x0000000A,
|
||||
send_ptr=(0x102878,0xe2a4),
|
||||
ctrl_buffer=0x00102A80,
|
||||
cmd_handler=0x0000EFD9,
|
||||
brom_register_access=(0xe6ac,0xe764),
|
||||
meid_addr=0x102B38,
|
||||
has_socid=True,
|
||||
damode=damodes.XFLASH,
|
||||
dacode=0x6785,
|
||||
name="MT6785",
|
||||
description="Helio G90",
|
||||
loader="mt6785_payload.bin"),
|
||||
# loader="mt6781_payload.bin"
|
||||
),
|
||||
0x813: chipconfig(var1=0xA, # confirmed
|
||||
watchdog=0x10007000,
|
||||
uart=0x11002000,
|
||||
brom_payload_addr=0x100A00,
|
||||
da_payload_addr=0x201000,
|
||||
pl_payload_addr=0x40200000,
|
||||
gcpu_base=0x10050000,
|
||||
sej_base=0x1000A000, # hacc
|
||||
dxcc_base=0x10210000,
|
||||
cqdma_base=0x10212000,
|
||||
ap_dma_mem=0x11000000 + 0x158,
|
||||
blacklist=[(0x102838, 0x0)],
|
||||
blacklist_count=0x0000000A,
|
||||
send_ptr=(0x102878, 0xe2a4),
|
||||
ctrl_buffer=0x00102A80,
|
||||
cmd_handler=0x0000EFD9,
|
||||
brom_register_access=(0xe6ac, 0xe764),
|
||||
meid_addr=0x102B38,
|
||||
has_socid=True,
|
||||
damode=damodes.XFLASH,
|
||||
dacode=0x6785,
|
||||
name="MT6785",
|
||||
description="Helio G90",
|
||||
loader="mt6785_payload.bin"),
|
||||
0x6795: chipconfig(
|
||||
var1=0xA, #confirmed
|
||||
var1=0xA, # confirmed
|
||||
watchdog=0x10007000,
|
||||
uart=0x11002000,
|
||||
brom_payload_addr=0x100A00,
|
||||
|
@ -855,10 +856,10 @@ hwconfig = {
|
|||
ap_dma_mem=0x11000000 + 0x1A0,
|
||||
blacklist=[(0x102764, 0x0)],
|
||||
blacklist_count=0x00000008,
|
||||
send_ptr=(0x1027a4,0x978c),
|
||||
send_ptr=(0x1027a4, 0x978c),
|
||||
ctrl_buffer=0x0010304C,
|
||||
cmd_handler=0x0000A313,
|
||||
brom_register_access=(0x9a60,0x9c28),
|
||||
brom_register_access=(0x9a60, 0x9c28),
|
||||
meid_addr=0x1030A0,
|
||||
has_socid=False,
|
||||
damode=damodes.DEFAULT, #
|
||||
|
@ -879,10 +880,10 @@ hwconfig = {
|
|||
ap_dma_mem=0x11000000 + 0x1A0, # AP_DMA_I2C_1_RX_MEM_ADDR
|
||||
blacklist=[(0x0010276C, 0x0), (0x00105704, 0x0)],
|
||||
blacklist_count=0x00000008,
|
||||
send_ptr=(0x1027b0,0x9eac),
|
||||
send_ptr=(0x1027b0, 0x9eac),
|
||||
ctrl_buffer=0x00103058,
|
||||
cmd_handler=0x0000AA3F,
|
||||
brom_register_access=(0xa18c,0xa354),
|
||||
brom_register_access=(0xa18c, 0xa354),
|
||||
meid_addr=0x1030AC,
|
||||
has_socid=False,
|
||||
damode=damodes.XFLASH,
|
||||
|
@ -904,10 +905,10 @@ hwconfig = {
|
|||
sej_base=0x1000A000,
|
||||
blacklist=[(0x00102870, 0x0)],
|
||||
blacklist_count=0x0000000A,
|
||||
send_ptr=(0x1028b4,0xf5ac),
|
||||
send_ptr=(0x1028b4, 0xf5ac),
|
||||
ctrl_buffer=0x001032F0,
|
||||
cmd_handler=0x000102C3,
|
||||
brom_register_access=(0xf9c0,0xfa78),
|
||||
brom_register_access=(0xf9c0, 0xfa78),
|
||||
meid_addr=0x1033B8,
|
||||
has_socid=True,
|
||||
damode=damodes.XFLASH,
|
||||
|
@ -919,8 +920,8 @@ hwconfig = {
|
|||
var1=0x73,
|
||||
watchdog=0x10007000,
|
||||
uart=0x11002000,
|
||||
brom_payload_addr=0x100A00, #
|
||||
da_payload_addr=0x201000, #
|
||||
brom_payload_addr=0x100A00, #
|
||||
da_payload_addr=0x201000, #
|
||||
# gcpu_base=0x10050000, #
|
||||
# dxcc_base=0x10210000, #
|
||||
# sej_base=0x1000a000, # hacc
|
||||
|
@ -932,32 +933,32 @@ hwconfig = {
|
|||
send_ptr=(0x102884, 0xdfe0),
|
||||
ctrl_buffer=0x00102AA4,
|
||||
cmd_handler=0x0000EDAD,
|
||||
brom_register_access=(0x10e7f8,0xe4a0),
|
||||
brom_register_access=(0x10e7f8, 0xe4a0),
|
||||
dacode=0x6833,
|
||||
name="MT6833",
|
||||
description="Dimensity 700 5G",
|
||||
loader="mt6833_payload.bin"),
|
||||
0x996: chipconfig(var1=0xA,
|
||||
watchdog=0x10007000,
|
||||
uart=0x11002000,
|
||||
brom_payload_addr=0x100A00,
|
||||
da_payload_addr=0x201000,
|
||||
gcpu_base=0x10050000,
|
||||
dxcc_base=0x10210000,
|
||||
cqdma_base=0x10212000,
|
||||
sej_base=0x1000a000, # hacc
|
||||
ap_dma_mem=0x11000000 + 0x1A0,
|
||||
blacklist=[(0x10284C, 0x0)],
|
||||
blacklist_count=0x0000000A,
|
||||
send_ptr=(0x10288c,0xea64),
|
||||
ctrl_buffer=0x00102AA0,
|
||||
cmd_handler=0x0000F831,
|
||||
brom_register_access=(0x10efec,0xef24),
|
||||
damode=damodes.XFLASH,
|
||||
dacode=0x6853,
|
||||
name="MT6853",
|
||||
description="Dimensity 720 5G",
|
||||
loader="mt6853_payload.bin"),
|
||||
watchdog=0x10007000,
|
||||
uart=0x11002000,
|
||||
brom_payload_addr=0x100A00,
|
||||
da_payload_addr=0x201000,
|
||||
gcpu_base=0x10050000,
|
||||
dxcc_base=0x10210000,
|
||||
cqdma_base=0x10212000,
|
||||
sej_base=0x1000a000, # hacc
|
||||
ap_dma_mem=0x11000000 + 0x1A0,
|
||||
blacklist=[(0x10284C, 0x0)],
|
||||
blacklist_count=0x0000000A,
|
||||
send_ptr=(0x10288c, 0xea64),
|
||||
ctrl_buffer=0x00102AA0,
|
||||
cmd_handler=0x0000F831,
|
||||
brom_register_access=(0x10efec, 0xef24),
|
||||
damode=damodes.XFLASH,
|
||||
dacode=0x6853,
|
||||
name="MT6853",
|
||||
description="Dimensity 720 5G",
|
||||
loader="mt6853_payload.bin"),
|
||||
0x886: chipconfig(
|
||||
var1=0xA,
|
||||
watchdog=0x10007000,
|
||||
|
@ -971,10 +972,10 @@ hwconfig = {
|
|||
ap_dma_mem=0x11000000 + 0x1A0,
|
||||
blacklist=[(0x10284C, 0x0)],
|
||||
blacklist_count=0x0000000A,
|
||||
send_ptr=(0x10288c,0xea78),
|
||||
send_ptr=(0x10288c, 0xea78),
|
||||
ctrl_buffer=0x00102AA0,
|
||||
cmd_handler=0x0000F7AD,
|
||||
brom_register_access=(0x10efc0,0xef38),
|
||||
brom_register_access=(0x10efc0, 0xef38),
|
||||
meid_addr=0x102B78,
|
||||
has_socid=True,
|
||||
damode=damodes.XFLASH,
|
||||
|
@ -997,7 +998,7 @@ hwconfig = {
|
|||
description="Dimensity 900",
|
||||
name="MT6877"),
|
||||
0x816: chipconfig(
|
||||
var1=0xA, # confirmed
|
||||
var1=0xA, # confirmed
|
||||
watchdog=0x10007000,
|
||||
uart=0x11002000,
|
||||
brom_payload_addr=0x100A00,
|
||||
|
@ -1010,10 +1011,10 @@ hwconfig = {
|
|||
blacklist=[(0x102848, 0x0)],
|
||||
damode=damodes.XFLASH,
|
||||
blacklist_count=0x0000000A,
|
||||
send_ptr=(0x102888,0xE6FC),
|
||||
send_ptr=(0x102888, 0xE6FC),
|
||||
ctrl_buffer=0x00102A9C,
|
||||
cmd_handler=0x0000F431,
|
||||
brom_register_access=(0x10efbc,0xebbc),
|
||||
brom_register_access=(0x10efbc, 0xebbc),
|
||||
dacode=0x6885,
|
||||
name="MT6885/MT6889/MT6880/MT6890",
|
||||
description="Dimensity 1000L/1000",
|
||||
|
@ -1059,10 +1060,10 @@ hwconfig = {
|
|||
ap_dma_mem=0x11000000 + 0x1A0,
|
||||
blacklist=[(0x102870, 0x0)],
|
||||
blacklist_count=0x00000008,
|
||||
send_ptr=(0x1028b0,0xb2b8),
|
||||
send_ptr=(0x1028b0, 0xb2b8),
|
||||
ctrl_buffer=0x00103178,
|
||||
cmd_handler=0x0000BDF3,
|
||||
brom_register_access=(0xb58c,0xb740),
|
||||
brom_register_access=(0xb58c, 0xb740),
|
||||
meid_addr=0x1031CC,
|
||||
has_socid=False,
|
||||
damode=damodes.DEFAULT, #
|
||||
|
@ -1096,10 +1097,10 @@ hwconfig = {
|
|||
ap_dma_mem=0x11000000 + 0x1A0,
|
||||
blacklist=[(0x102868, 0x0), (0x001072DC, 0x0)],
|
||||
blacklist_count=0x00000008,
|
||||
send_ptr=(0x1028a8,0xc12c),
|
||||
send_ptr=(0x1028a8, 0xc12c),
|
||||
ctrl_buffer=0x0010316C,
|
||||
cmd_handler=0x0000CCB3,
|
||||
brom_register_access=(0xc400,0xc5c8),
|
||||
brom_register_access=(0xc400, 0xc5c8),
|
||||
meid_addr=0x1031C0,
|
||||
has_socid=False,
|
||||
damode=damodes.DEFAULT, #
|
||||
|
@ -1107,28 +1108,28 @@ hwconfig = {
|
|||
name="MT8163",
|
||||
loader="mt8163_payload.bin"), # douglas, karnak
|
||||
0x8167: chipconfig(var1=0xCC,
|
||||
watchdog=0x10007000,
|
||||
uart=0x11005000,
|
||||
brom_payload_addr=0x100A00,
|
||||
da_payload_addr=0x201000,
|
||||
pl_payload_addr=0x40001000,
|
||||
gcpu_base=0x1020D000,
|
||||
sej_base=0x1000A000,
|
||||
# no dxcc
|
||||
cqdma_base=0x10212C00,
|
||||
ap_dma_mem=0x11000000 + 0x1A0,
|
||||
blacklist=[(0x102968,0x0)],
|
||||
blacklist_count=0x0000000A,
|
||||
send_ptr=(0x1029ac,0xd2e4),
|
||||
ctrl_buffer=0x0010339C,
|
||||
cmd_handler=0x0000DFF7,
|
||||
brom_register_access=(0x10fef2,0xd7ac),
|
||||
meid_addr=0x103478,
|
||||
has_socid=True,
|
||||
damode=damodes.XFLASH,
|
||||
dacode=0x8167,
|
||||
name="MT8167/MT8516/MT8362",
|
||||
loader="mt8167_payload.bin"),
|
||||
watchdog=0x10007000,
|
||||
uart=0x11005000,
|
||||
brom_payload_addr=0x100A00,
|
||||
da_payload_addr=0x201000,
|
||||
pl_payload_addr=0x40001000,
|
||||
gcpu_base=0x1020D000,
|
||||
sej_base=0x1000A000,
|
||||
# no dxcc
|
||||
cqdma_base=0x10212C00,
|
||||
ap_dma_mem=0x11000000 + 0x1A0,
|
||||
blacklist=[(0x102968, 0x0)],
|
||||
blacklist_count=0x0000000A,
|
||||
send_ptr=(0x1029ac, 0xd2e4),
|
||||
ctrl_buffer=0x0010339C,
|
||||
cmd_handler=0x0000DFF7,
|
||||
brom_register_access=(0x10fef2, 0xd7ac),
|
||||
meid_addr=0x103478,
|
||||
has_socid=True,
|
||||
damode=damodes.XFLASH,
|
||||
dacode=0x8167,
|
||||
name="MT8167/MT8516/MT8362",
|
||||
loader="mt8167_payload.bin"),
|
||||
0x8168: chipconfig( # var1
|
||||
watchdog=0x10007000,
|
||||
uart=0x11002000,
|
||||
|
@ -1155,10 +1156,10 @@ hwconfig = {
|
|||
ap_dma_mem=0x11000000 + 0x1A0,
|
||||
blacklist=[(0x122774, 0x0)],
|
||||
blacklist_count=0x00000008,
|
||||
send_ptr=(0x1227b4,0xa0e4),
|
||||
send_ptr=(0x1227b4, 0xa0e4),
|
||||
ctrl_buffer=0x0012305C,
|
||||
cmd_handler=0x0000AC6B,
|
||||
brom_register_access=(0xa3b8,0xa580),
|
||||
brom_register_access=(0xa3b8, 0xa580),
|
||||
meid_addr=0x1230B0,
|
||||
has_socid=False,
|
||||
damode=damodes.DEFAULT, #
|
||||
|
@ -1218,7 +1219,7 @@ hwconfig = {
|
|||
damode=damodes.XFLASH,
|
||||
name="MT8518"),
|
||||
0x8590: chipconfig(
|
||||
var1=0xA, #confirmed
|
||||
var1=0xA, # confirmed
|
||||
watchdog=0x10007000,
|
||||
uart=0x11002000,
|
||||
brom_payload_addr=0x100A00,
|
||||
|
@ -1227,13 +1228,13 @@ hwconfig = {
|
|||
gcpu_base=0x1101B000,
|
||||
sej_base=0x1000A000,
|
||||
# cqdma_base
|
||||
#ap_dma_mem=0x11000000 + 0x1A0,
|
||||
blacklist=[(0x102870,0x0),(0x106c7c,0x0)],
|
||||
# ap_dma_mem=0x11000000 + 0x1A0,
|
||||
blacklist=[(0x102870, 0x0), (0x106c7c, 0x0)],
|
||||
blacklist_count=0x00000008,
|
||||
send_ptr=(0x1028b0,0xbbe4),
|
||||
send_ptr=(0x1028b0, 0xbbe4),
|
||||
ctrl_buffer=0x00103184,
|
||||
cmd_handler=0x0000C71F,
|
||||
brom_register_access=(0xbeb8,0xc06c),
|
||||
brom_register_access=(0xbeb8, 0xc06c),
|
||||
meid_addr=0x1031D8,
|
||||
has_socid=False,
|
||||
dacode=0x8590,
|
||||
|
@ -1241,7 +1242,7 @@ hwconfig = {
|
|||
name="MT8590/MT7683/MT8521/MT7623",
|
||||
loader="mt8590_payload.bin"),
|
||||
0x8695: chipconfig(
|
||||
var1=0xA, #confirmed
|
||||
var1=0xA, # confirmed
|
||||
watchdog=0x10007000,
|
||||
uart=0x11002000,
|
||||
brom_payload_addr=0x100A00,
|
||||
|
@ -1253,10 +1254,10 @@ hwconfig = {
|
|||
ap_dma_mem=0x11000280 + 0x1A0,
|
||||
blacklist=[(0x103048, 0x0)],
|
||||
blacklist_count=0x0000000A,
|
||||
send_ptr=(0x103088,0xbeec),
|
||||
send_ptr=(0x103088, 0xbeec),
|
||||
ctrl_buffer=0x001031EC,
|
||||
cmd_handler=0x0000CAA7,
|
||||
brom_register_access=(0xc298,0xc3f8),
|
||||
brom_register_access=(0xc298, 0xc3f8),
|
||||
meid_addr=0x1032B8,
|
||||
has_socid=False,
|
||||
damode=damodes.XFLASH,
|
||||
|
@ -1343,7 +1344,7 @@ class Mtk_Config(metaclass=LogBase):
|
|||
self.chipconfig.has_socid = False
|
||||
|
||||
def init_hwcode(self, hwcode):
|
||||
self.hwcode=hwcode
|
||||
self.hwcode = hwcode
|
||||
if hwcode in hwconfig:
|
||||
self.chipconfig = hwconfig[hwcode]
|
||||
else:
|
||||
|
@ -1421,4 +1422,4 @@ class Mtk_Config(metaclass=LogBase):
|
|||
self.bmtflag = bmtflag
|
||||
self.bmtblockcount = bmtblockcount
|
||||
self.bmtpartsize = bmtpartsize
|
||||
return bmtflag,bmtblockcount,bmtpartsize
|
||||
return bmtflag, bmtblockcount, bmtpartsize
|
||||
|
|
Loading…
Reference in a new issue