FreeCalypso > hg > freecalypso-tools
comparison loadtools/scripts/compal.init @ 492:ac48ed111d6a
loadtools/scripts/compal.init: updated comments for new understanding
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 24 May 2019 06:15:02 +0000 |
parents | e7502631a0f9 |
children | b0f9d38bfd9e |
comparison
equal
deleted
inserted
replaced
491:34795475dd4f | 492:ac48ed111d6a |
---|---|
1 # Set WS=3 for both nCS0 and nCS1. This configuration is used by OsmocomBB | 1 # Set WS=3 for both nCS0 and nCS1. This configuration is used by all official |
2 # for all 3 Compal models (E86/88/99), and is also seen in the IDA disassembly | 2 # C11x, C139/140 and SE J100 firmwares that have been examined, i.e., by the |
3 # listing of c115-1.0.46.E firmware contributed by Christophe Devine. | 3 # official firmwares for all Compal models to which this init script applies. |
4 | 4 |
5 w16 fffffb00 00A3 | 5 w16 fffffb00 00A3 |
6 w16 fffffb02 00A3 | 6 w16 fffffb02 00A3 |
7 | 7 |
8 # We need to set the FFFF:FB10 register to map the flash (not the boot ROM) | 8 # On most targets we use the alternate nCS0 mapping at 0x03000000 to access |
9 # to address 0. We need this mapping in order to be able to dump and program | 9 # the full flash bank even though the boot ROM is mapped at 0, overlapping |
10 # the entire flash, as for some reason the alternate nCS0 mapping at 0x03000000 | 10 # the first 8 KiB of flash. However, the Calypso chip (all versions we work |
11 # does not work on Compal phones. (That alternate mapping works fine on | 11 # with) has a little design bug in this part of the silicon: the alternate |
12 # Openmoko and Pirelli phones, though. Perhaps the different Calypso chip | 12 # nCS0 mapping at 0x03000000 works only when the debug visibility bit in the |
13 # version is the culprit, or perhaps this alternate mapping works only if the | 13 # API-RHEA control register (bit 6 in the FFFF:FB0E register) is set, and |
14 # physical nIBOOT pin is low.) | 14 # does not work otherwise. This bit is initially set as the Calypso comes |
15 # out of reset, and on most platforms we gain loadtool access via the boot ROM, | |
16 # hence the problem does not occur - but on these Compal targets we gain | |
17 # loadtool access either through Compal's bootloader or via tfc139, and in | |
18 # both cases Compal's fw (either the full fw or the bootloader part) has | |
19 # already set the register in question to the runtime operational value of | |
20 # 0x2A (unchanged from TI's TCS211 reference fw), with the debug visibility | |
21 # bit cleared, hence the 0x03000000 flash mapping no longer works. | |
22 # | |
23 # We could write into the FFFF:FB0E register here, restore the Calypso power-up | |
24 # state and use the 0x03000000 mapping like on other platforms, but the problem | |
25 # of the mapping not working as expected was first encountered in 2014 when we | |
26 # started working on Compal targets, whereas the root cause described above was | |
27 # only discovered in 2019. For now we are keeping the original workaround from | |
28 # 2014: we set the FFFF:FB10 register to map the flash (not the boot ROM) | |
29 # to address 0, and use that "main" mapping instead of the alternate one. | |
15 | 30 |
16 w16 fffffb10 0300 | 31 w16 fffffb10 0300 |