annotate Handset-UI-fw @ 65:153b517ccc7a

FC-handset-spec section 1.7.2: make contrast with MIDI ringtone chips
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 15 Jun 2021 19:57:05 +0000
parents 2e9719074e79
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 The present article is a companion to the TCS211 firmware architecture document
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 (TCS211-fw-arch). Those who are interested in the FreeCalypso phone handset
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 goal (which is currently a very distant goal) should read the TCS211-fw-arch
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 document first and then this article, whereas those who are more interested in
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 the rock solid FreeCalypso modem (as opposed to handset) solution which is
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 already available today and would like to understand our modem fw better only
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 need to read the TCS211-fw-arch document and can safely skip this handset UI
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 addendum.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 TI's offerings for handset UI
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 =============================
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 Unlike their rock solid, full commercial product offering for AT-command-
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 controlled modems, TI never produced a reference phone handset firmware
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 implementation that could be used as-is with minimal or no changes: instead
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 they provided a very rough proof-of-concept implementation which is nowhere
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 close to usable, and left it up to their customers (handset manufacturers) to
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 whip it into even a minimally decent shape. Furthermore, they had several
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 different approaches over the years to what the GSM industry calls by the
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 sexist term "MMI":
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 * They once had something called SMI, for "simple MMI" or "slim MMI". We have
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 what appears to be the complete source for this SMI component as part of the
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 MV100-0.1.rar and 94140216gsm.rar finds, but both of those finds are just
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 broken fragments, not a complete firmware for any target. It might be
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 possible to integrate this unknown-origin SMI source into Magnetite and get
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 it to work with the TCS2 version of ACI, but no such feat has been attempted
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 yet - it would be a mere curiosity, not something for practical use.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 * SMI later gave way to a successor called BMI for "basic MMI", which is much
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 bigger in terms of code size and complexity and consists of two layers: there
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 is a layer called MFW (mobile framework) that sits on top of ACI, and then
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 BMI proper sits on top of MFW. This incarnation of TI's demo/prototype phone
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 UI is the one which they officially supported in the TCS211 program, and our
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 copy of TCS211 from OM miraculously has these BMI+MFW sources included, even
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 though OM obviously didn't use this code and could not even compile it without
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 doing some surgery on the build system. Our other TCS3.2/LoCosto source also
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 has BMI and MFW matching that newer version of G23M ACI and PS components,
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 and we use this new TCS3 version of BMI+MFW in our TCS2/TCS3 hybrid config.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 * It appears that TI once had or were trying to develop some kind of Riviera-
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 based "MMI" code as an alternative to the Condat-based SMI and BMI. SMI and
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 BMI+MFW execute in the same "MMI" GPF task as ACI and communicate with it
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 through direct function calls; in contrast, the alternative Riviera MMI would
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 run somewhere in Riviera land and communicate with ACI through ATP and some
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 kind of ACI adapter. We never got any of this code, and it is not clear if
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 it was ever a reality beyond just the idea.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 In any case, it is clear from the code that TI's SSA group in France who
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 developed the drivers for various Calypso chipset peripherals including LCDs,
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 keypads and ringing buzzers on their development boards and the Condat UK group
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 who did SMI and BMI had very different visions and ideas. Some examples:
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 * The Calypso DSP has a built-in mechanism for playing quite pleasant-sounding
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 ringtone melodies through a loudspeaker driven by the chipset's ABB, and the
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 SSA group developed their RiViera Audio Service front-end to these L1+DSP
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 audio services, but Condat's code makes absolutely minimal use of this RV
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 Audio Service, just enough to be compatible with it, and does not use any of
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 the melody functions, neither E1 nor E2.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 * In the original TCS211 architecture before LoCosto changes, the driver for
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 the physical LCD was/is R2D in the Riviera/SSA land. R2D provides a very rich
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 set of text and graphics drawing primitives, but Condat's display layer does
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 not use any of them: instead they obtain the raw framebuffer address from R2D
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 and do all drawing operations themselves.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 * The TCS211 code we got had a jaw-dropping bug in the code path for ringing
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 the piezoelectric buzzer: due to a miscommunication between the French folks
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 in charge of the actual buzzer driver in chipsetsw and the German or UK folks
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 in charge of Condat's audio layer, the buzzer always rang at some 99 Hz (its
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 lowest possible frequency, horrible on ears) no matter what tone frequency
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 was intended. Given that our copy of TCS211 dates from 2007 and considering
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 how old the buzzer function must be, it hurts to think for how many years
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 that bug sat there without anyone wondering why ringing sounds so horrible.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 In terms of the code architecture, none of Condat's UI code ever calls any of
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 the actual drivers in the SSA realm directly: instead everything goes through
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 the Condat drivers layer in condat/com/src/driver, and that layer provides a
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 very poor adaptation as highlighted above.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 LCD support
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 ===========
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 TI's demo/prototype UI code never supported a wide variety of different display
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 sizes or keypad layouts - instead they only supported whatever existed on their
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 in-house development boards at each given point in their history. TI's C-Sample
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 and earlier development boards had 84x48 pixel B&W displays, whereas from
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 D-Sample onward they made the big jump to a 176x220 pixel color LCD. Both
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 versions of the UI we got (TCS211 targeting D-Sample and TCS3.2 targeting
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 I-Sample, TI's LoCosto board) were developed on 176x220 pixel color LCD
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 platforms, and that is the only display size which they intended to support.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 There also exists a remnant of support for their earlier 84x48 pixel C-Sample
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 LCD, which we resurrected in FreeCalypso to see it run on Mot C139 hardware,
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 but that support was broken: it would not even compile without our fixes. In
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 our current FC Magnetite firmware we can build this C-Sample UI version for the
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 C139 target and it works in the demo / proof-of-concept sense, but it is likely
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 to be even more broken than the official 176x220 pixel version.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 Anyone interested in adding support for a different LCD will need to start with
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 the R2D driver under src/cs/drivers/drv_app/r2d. The principal LCD type
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 selection is done in r2d_config.h (C-Sample and D-Sample are the only options
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 supported by the version we got with TCS211), and this selection affects all of
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 R2D and all of its clients. Our change to this r2d_config.h LCD type selection
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 logic consists of selecting C-Sample instead of D-Sample when the build target
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 is C139. A secondary selection is made in r2d_inits.c and r2d_refresh.c where
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 the code snippets for the actual hardware initialization and output are
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 included: the way we currently support the C139 hw target is a very thorough
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 emulation of the C-Sample including its vertical B&W framebuffer format, all of
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 the code in R2D and in Condat's display driver sees a real C-Sample LCD, and
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 only the hardware-poking code is substituted.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 The direct implication of our C-Sample emulation approach for the C139 LCD is
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 that the full 96x64 pixel size of Motorola's LCD becomes completely
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 inaccessible, and all software sees a 84x48 pixel subset. The same happens
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 with color: because TI's C-Sample LCD was B&W, the color capabilities of the
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 real C139 LCD become inaccessible. Anyone who wishes to fix this shortcoming
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 would need to implement a new bona fide LCD type in R2D, and then adapt
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 Condat's display driver accordingly.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 Condat's display driver (condat/com/src/driver/display.c) is very messy and
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 very difficult to understand. The only change we have made to it in FreeCalypso
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 was fixing the support for the C-Sample LCD which was bitrotten: the bitrot and
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 our fix for it is not specific to the C139, it would affect a real C-Sample
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 board just as well. Understanding this code well enough to extend it to other
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 LCD geometries and framebuffer formats would be a much greater challenge.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 Above Condat's display driver lies the actual UI implementation in BMI and MFW.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 This UI code supports only 3 possible configurations:
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 * Both COLOURDISPLAY and LSCREEN defined: the display is 176x220 color;
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 * LSCREEN is defined but not COLOURDISPLAY: the display is 176x220 B&W - TI
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 used this config when building "GSM Lite" fw for the D-Sample;
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 * Neither LSCREEN nor COLOURDISPLAY defined: the old 84x48 pixel B&W UI from
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 the days of C-Sample and earlier.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 Note the lack of support for small color displays like the one on the C139.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 Text fonts
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 ----------
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 The SSA group's R2D driver provides text display functions and contains its own
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 fonts, but Condat's stuff does not use those display functions or fonts -
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 instead BMI and MFW (and presumably SMI too) use a different font/text
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 implementation contained in the Condat drivers layer.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 Keypad support
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149 ==============
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 The hardware keypad driver is KPD in Riviera/SSA land, residing in
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 chipsetsw/drivers/drv_app/kpd in TCS211 or in src/cs/drivers/drv_app/kpd in
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 Magnetite and Selenite. Unlike the display driver R2D, KPD is always included
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 even in modem firmware builds - but if there is no keypad connected to the
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 Calypso, it does nothing. TI's firmware architecture and UI code support only
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 traditional numeric keypads - there is no provision for supporting a full QWERTY
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 keyboard. However, if the keypad layout on a given phone handset is close
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 enough to what TI had on their development boards, modifying KPD for the
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 specific wiring is very easy: we have already added proper support for Mot C1xx
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 and Pirelli DP-L10 keypads.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 Battery monitoring and charging
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163 ===============================
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165 TI had two incarnations of their battery charging and monitoring driver: first
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 PWR, then LCC. Both were implemented in Riviera/SSA land. LCC was not a good
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 fit for our targets of interest (Mot C1xx, Pirelli DP-L10 and our desired
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 FreeCalypso Libre Dumbphone hardware) while PWR had other problems, so we
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 retired both of them and wrote our own replacement called FCHG.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 There is a quirk, however: there is no connection in the TCS211 code as
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 delivered by TI between their demo/prototype UI (or rather between Condat's
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173 power driver stub) and either of their battery driver implementations. At the
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 time of TCS211-2007 the original PWR driver had already been retired and only
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 LCC was supported, but even that LCC driver had no connection to the UI: one
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 could remove it from the fw build configuration and the UI code would still
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 compile and link just fine, which would not be possible if there were any calls
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 to LCC's API functions. The practical effect of this quirk is that there is no
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 need to resurrect PWR or LCC in order to run TI's UI code in its pristine
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 original form - using our own FCHG or no battery management driver at all is
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181 just as fine.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182
31
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
183 FreeCalypso Luna handset UI development platform
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
184 ================================================
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
185
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
186 As of 2020 we have a new hardware platform for running UI-enabled firmware
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
187 configurations; this development platform is codenamed FC Luna. Our FC Luna
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
188 platform consists of a 176x220 pixel LCD (TFT color) and a 5x5 keypad connected
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
189 to a Calypso core; the key feature is that the LCD size (176x220 pix), color
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
190 depth (16 bits) and interface to Calypso (16-bit parallel with memory-mapped
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
191 registers) are exactly the same as on TI's D-Sample. This FC Luna platform is
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
192 supported in FC Magnetite, and it finally allows us to run TI's handset UI code
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
193 in its native form. We can run all of the same configurations which existed in
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
194 TI's original TCS211 fw on TI's original D-Sample platform:
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
195
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
196 * The default configuration is 176x220 pixel UI with full color - this is the
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
197 config which TI actually supported in TCS211 days.
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
198
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
199 * Setting UI_CONFIG=bigbw (switching UI code config) and optionally
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
200 DSAMPLE_FULL_COLOR=0 (switching R2D driver config) produces TI's 176x220 pixel
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
201 black&white configuration. This config is not particularly interesting: any
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
202 practical phone LCD of this large size is also going to be color, thus it is
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
203 better to use the full color config for this large size instead. For this
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
204 reason whatever bugs are specific to this 176x220 pix B&W config (and there
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
205 definitely are some) will be ignored, as there is no point in investigating
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
206 and fixing them.
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
207
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
208 * Setting UI_CONFIG=84x48 and DSAMPLE_FULL_COLOR=0 produces the same C-Sample
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
209 UI config which we've been running on Mot C139 phones, but without the
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
210 ugliness of emulating C-Sample LCD hw at the driver level - instead in this
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
211 config the small 84x48 pixel UI code runs on top of TI's D-Sample B&W R2D
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
212 driver, with the small UI displayed in the upper left corner of the large
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
213 physical Luna LCD.
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
214
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
215 Running the UI_CONFIG=84x48 DSAMPLE_FULL_COLOR=0 config on Luna has already
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
216 helped shed light on one UI issue that was more elusive when running on C139 hw:
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
217 the disappearing time display. When running this config on Luna, we can see
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
218 that the UI code displays a text line with date and time outside of the 84x48
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
219 pixel area, i.e., it is a bug in the !LSCREEN configuration - but when we run
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
220 with driver-level C-Sample emulation on C139, this misplaced text line is
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
221 invisible.
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
222
0
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
223 The proper way to get proper support for Mot C139
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
224 =================================================
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
225
31
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
226 For many years the handset firmware project direction in FreeCalypso had been
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
227 blocked by the lack of a D-Sample-like development platform with a 176x220 pixel
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
228 LCD. This blockage has finally been lifted in 2020 with the arrival of our Luna
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
229 UI development platform, and now the only lacking factor is developer time and
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
230 motivation. As of this writing (2020-09) I (Mother Mychaela) am not able to
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
231 devote any significant time to handset firmware work because I need to focus on
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
232 bringing FC Tango and Caramel2 hardware products to market, but once I get past
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
233 this current work, I may be able to refocus on handset fw.
0
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
234
31
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
235 When and if I start working again in the handset fw direction, my plan of action
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
236 is as follows:
0
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
237
31
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
238 1) Fix the most obvious bugs like the misplaced text line in the small UI config
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
239 while staying in the Magnetite source tree, but working only in the hybrid UI
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
240 code base - the old TCS2 version of BMI+MFW that sits on top of a blobs-only
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
241 old version of G23M PS will not be carried forward.
0
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
242
31
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
243 2) Create a new firmware source tree based on Magnetite that keeps only the
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
244 hybrid config with old clutter removed, allowing bolder changes going
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
245 forward.
0
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
246
31
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
247 3) Drop the driver-level C-Sample LCD emulation approach, and instead implement
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
248 a 96x64 pixel B&W logical framebuffer config in R2D. Display this logical
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
249 96x64 pix B&W framebuffer on both Luna and C139 physical LCDs. In both cases
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
250 the physical LCD color capability will remain unutilized, with all display
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
251 images being black&white, but so be it.
0
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
252
31
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
253 4) Immediately after the previous step the 84x48 pixel UI will appear in the
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
254 upper left corner of the 96x64 pixel B&W display, with the rightmost 12 and
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
255 bottommost 16 pixels remaining unused.
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
256
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
257 5) Drop the 176x220 pixel B&W UI config, leaving only large (176x220 pix) color
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
258 and "small B&W". Remove code stanzas specific to the
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
259 (LSCREEN && !COLOURDISPLAY) combination, and outside of that eliminated
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
260 combination, make all conditionals based on LSCREEN and not COLOURDISPLAY.
0
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
261
31
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
262 6) Extend the "small B&W" UI config from 84x48 to 96x64 pixels, i.e., from 6
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
263 rows of 14 characters to 8 rows of 16 characters with TI's existing font.
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
264
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
265 7) With the above gymnastics out of the way, work on whipping the actual phone
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
266 UI into shape, supporting two configurations: large color and small B&W,
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
267 with Luna hw platform supporting both configs, whereas the small B&W config
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
268 will also run on C139 hw.
0
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
269
31
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
270 It should be noted that this approach does NOT include any implementation of
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
271 color UI for the small LCD size on Mot C139 and similar low-end platforms. As
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
272 the plan stands currently, this omission is intentional and is part of effort
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
273 minimization: I need to put some limits on the amount of time and effort I
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
274 invest into project directions that are specific to low-end phones, i.e.,
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
275 project directions that are intrinsically less worthy than my desired
2e9719074e79 Handset-UI-fw: update for FC Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
276 FreeCalypso Libre Dumbphone as in FreeCalypso handset hardware.
0
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
277
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
278 Why Mot C139?
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
279 =============
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
280
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
281 Out of the known repertoire of pre-existing Calypso-based phones whose existence
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
282 has been discovered by OsmocomBB and for which we already have some foundations
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
283 of support in FreeCalypso, Mot C139 is the most suitable one for the purpose of
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
284 turning it into a Libre Dumbphone by way of aftermarket firmware. Here are the
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
285 problems with the other ones:
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
286
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
287 * Pirelli DP-L10 is my absolute favourite with an end user hat on, but the
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
288 unwanted extra chips for the unwanted-for-us WLAN and camera functionality
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
289 are a killer. There are no schematics for the phone and no documentation for
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
290 any of these chips, and we don't know how to power them down. In a fully
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
291 quiescent state with all Calypso sleep modes enabled and with both LCD and
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
292 keypad backlights off, the board still draws about 87 mA from the battery,
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
293 which will kill a fully charged battery in about 10 hours of complete idle.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
294 Furthermore, it is not possible to turn on the loudspeaker without going
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
295 through the W56940 ringtone chip, and the reset line for this chip comes from
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
296 a GPIO on the completely undocumented camera chip - thus without a way to
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
297 control this reset line we may not be able to program the W56940, and without
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
298 that programming we may not be able to turn on the loudspeaker, ruining all
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
299 usefulness of this phone.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
300
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
301 * Mot C11x/12x family is good in terms of not having any undocumented hardware,
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
302 but the tiny RAM capacity is a bummer. These lowest-end phones have only
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
303 256 KiB of IRAM (Calypso internal RAM) and 256 KiB of XRAM (board-level RAM),
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
304 whereas the next-step-up C139/140 has 512 KiB of XRAM. It is a significant
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
305 difference for us: while we fit into C139's 512 KiB with no sweat, it would
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
306 require some very unpleasant and unrewarding work to trim the fat and
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
307 reshuffle our memory usage to fit into the 256+256 arrangement on C11x.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
308 Furthermore, most C11x/12x phones have only 2 MiB of flash, which would again
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
309 require major contortions to fit into, whereas all C139/140 phones have 4 MiB.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
310
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
311 * Mot C155/156 seem nice, but there is a problem: these phones ring with a
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
312 loudspeaker driven by a ringtone generator chip instead of a piezo buzzer
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
313 driven by the Calypso, and their ringtone generator chip is Sunplus SPMA100B.
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
314 No documentation could be found for that chip, and if we can't program it, we
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
315 won't be able to make the phone ring or operate its loudspeaker in any other
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
316 way. Furthermore, the LCD controller in these phones is much less obvious
fcd1cf531017 TCS211-fw-arch masterpiece written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
317 than the one in the C139/140.