Commit Graph

61 Commits

Author SHA1 Message Date
Martin Hauke 1f7a2ab5d3 Fix common misspellings and typos
Change-Id: I962b42871693f33b1054d43d195817e9cd84bb64
2019-10-17 08:07:39 +00:00
Steve Markgraf a94fc842d3 fw/keypad: Poll Iota powerbutton if required
This commit adds polling of the TWL3025 PWON
signal. If the powerbutton is pressed on targets
that use it (Pirelli DP-L10, Huawei GTM900-B),
a normal keypad scanning cycle is started in order
to preserve the timing, required for the 500ms
power off press duration for example.

Change-Id: I904baf40d621bd680b602b88d12ff462b3c17596
2019-08-11 13:33:29 +02:00
Pau Espin c36dc29632 calypso: Print warning about unsupported encryption algorithms
Unfortunately current code architecture doesn't support a return path
with an error so tell the caller of L1CTL on the other side that
something's wrong.

Change-Id: Ib9b622dd5c9770c5e97fa58deee124a409544d3b
2018-07-06 19:11:00 +02:00
Harald Welte 95b10c62ca fix various other compiler warnings 2017-01-15 19:18:38 +01:00
Steve Markgraf 0da82b96b7 fw: keypad driver overhaul, support for different keymaps
Now the Pirelli DP-L10 keymap is supported.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2013-01-05 18:40:39 +01:00
Steve Markgraf 21bc3b8db0 fw: introduce per-board uart mapping
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2013-01-05 18:38:42 +01:00
Sylvain Munaut 3ee1beb8bf fw/build: Add ENV_ APP_ BOARD_ prefix to variables to cleanup namespace
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-01-02 20:44:11 +01:00
Christian Vogel 41eed0ee31 Removing all traces of the old display drivers. 2012-02-03 23:59:34 +01:00
Andreas Eversberg a6c98a79b2 Hold function for power button to turn off the phone
In order to allow applications to use the power button, the keypad handler
will wait half a second if the key is pressed and hold, until the power
is turned off. This way the application does not need to handle it.

The power off function will then wait until the button is released, so the
phone will not start again while the button is still pressed.
2012-01-28 13:15:48 +01:00
Alan Carvalho de Assis 83d9dcc017 i2c: fix maximum address an I2C chip can assign
I2C bus support up to 128 devices (mask 0x7F), but current calypso driver
is masked it to 64 (0x3F). I discover it because Motorola W220 has an I/O
expander PCA9537 at address 0x49 which could be reached.

Signed-off-by: Alan Carvalho de Assis <acassis@gmail.com>
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-11-27 14:35:36 +01:00
Steve Markgraf 24a7d31d71 fw/i2c: Fix two printd-related typos
Thanks to Stefan Mandl for pointing those out.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-11-15 17:41:40 +01:00
Sylvain Munaut de4f00d931 target/fw/sim: SIM Layer 1 driver
Originally written by dexter and then Andreas did a lot of cleanup
work to bring it into shape for inclusion in master

Written-by: Philipp Maier <zero-kelvin@gmx.de>
Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13 20:25:19 +01:00
Sylvain Munaut 4789b4a662 fw/calypso: Fix backlight bl_mode_pwl method (typo)
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-09 20:03:57 +01:00
Sylvain Munaut 178992a232 fw/calypso/dsp: Fix wrong hardcoded boot code constant
No functional impact tough.

Thanks to Job <baseband@hackwerk.org> on the ML for pointing this out

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-08-03 11:39:49 +02:00
Harald Welte c9297d28e0 calypso/uart.c: Fix array bounds checking
Found by Smatch:
calypso/uart.c +433 uart_baudrate(7) error: buffer overflow 'divider' 7 <= 7
2011-07-16 17:48:20 +02:00
Harald Welte 5339425de9 calypso/irq: Fix array bounds checking
Found by Smatch:
calypso/irq.c +200 irq_register_handler(5) error: buffer overflow 'irq_handlers' 32 <= 32
2011-07-16 17:46:54 +02:00
Wolfram Sang 07589649b1 uart.h: move header out of calypso-directory
Everything defined is a pretty generic interface and can be used by
mediatek, too.

Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
2011-05-05 09:52:47 +02:00
Wolfram Sang 6b36f7856f lib: move delay.c from calypso to lib
Nothing calypso-related in there and needed for Mediatek, too.

Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
2011-05-05 09:52:46 +02:00
Pablo Neira Ayuso ade79a0083 src: use new libosmogsm and include/osmocom/[gsm|core] path to headers
This patch changes include paths to get osmocom-bb working with
the current libosmocore tree.

Among all these renames, you can notice several tweaks that I
added on purpose, and that require some explanation, they are:

* hexdump() in osmocon.c and osmoload.c has been renamed to avoid
clashing with hexdump() defined in libosmocore.

* gsmmap now depends on libosmogsm. Actually I had to cleanup
Makefile.am because I was experiencing weird linking problems,
probably due to a bug in the autotools. With the change included
in this patch, I got it compiled and linked here correctly.

This patch has been tested with the phone Motorola C123 and the
following images files:

* firmware/board/compal_e88/hello_world.compalram.bin
* firmware/board/compal_e88/layer1.compalram.bin

Using the osmocon, bcch_scan and mobile tools.

Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-04-26 02:55:30 +02:00
Sylvain Munaut d9639bb010 fw/calypso: Add a new driver for the buzzer control
Written-by: Jose Luis Pereira <onaips@gmail.com>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-04-24 19:38:22 +02:00
Steve Markgraf 331641d568 target/fw/dsp: add delay as workaround for dsp_dump
Without the delay we would fill the sercomm buffer faster than its
content can be sent, and the phone would end up in a panic and hang.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-03-19 02:56:25 +01:00
Sylvain Munaut 9627afc8bb fw/calypso/dsp: Add comment about meaning of bit 11 of ndb->d_tch_mode
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-01-12 15:39:25 +01:00
Thomas Waldmann be9ea273b3 fixed typos in comments
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-01-11 19:53:56 +01:00
Christian Vogel 65b078fa20 Testing for the idle i2c bus was done backwards, we have
to wait for the bit to become 0, not 1.
2011-01-02 16:43:25 +01:00
Alex Badea d45476dad9 target uart: remove REG_OFFS() macro side-effect
Don't assign to the variable given as argument.  This prevents
clobbering the local 'reg' variables in uart_reg_{read,write}(),
which would in turn prevent the latch bits from being restored
correctly.

Signed-off-by: Alex Badea <vamposdecampos@gmail.com>
2010-11-17 23:39:46 +01:00
Alex Badea 4ad8b730a0 target uart: fix preservation of LCR
Store old_lcr only when switching to LCR == 0xBF.  We don't want
to clobber old_lcr when switching back, otherwise we can't restore
the previous LCR value.

Signed-off-by: Alex Badea <vamposdecampos@gmail.com>
2010-11-17 23:39:46 +01:00
Sylvain Munaut 59bc439886 target/fw/dsp: Implement section loading with bootloader
This works for both the default ROM bootloader and for our
custom one.

This will allow to implement easy patch loading.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-07 21:36:32 +01:00
Sylvain Munaut 379608d218 target/fw/dsp: Create a common function to start running code
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-07 21:36:17 +01:00
Sylvain Munaut ba1cef1d23 target/fw/calypso: Fix dsp_load_tch_param to set fn_report for TCH/H
The previous code was only valid for TCH/F ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-10-25 20:58:31 +02:00
Sylvain Munaut e972e1c6b7 target/fw/dsp: Add utility function to memcpy to/from the API
Copying to/from the DSP API shared memory must be done using
16 bits word only. Using those method, we avoid the hassle of
repeating the code when we copy buffer back and forth.

API address must be 16 bits aligned but for our purpose, it's
good enough.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-10-25 20:58:31 +02:00
Dieter Spaar 78704ca3fe target/dsp: Add dsp audio initialization
Written-by: Dieter Spaar <spaar@mirider.augusta.de>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-28 08:04:19 +02:00
Dieter Spaar f4bbb30f66 target/dsp: Adjust dsp parameters for TCH FR Codec
Written-by: Dieter Spaar <spaar@mirider.augusta.de>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-28 08:04:19 +02:00
Sylvain Munaut 664fa9ae0b fw/dsp: Add function to load dsp ciphering parameters
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-17 20:52:41 +02:00
Sylvain Munaut 890e55e9f7 fw: Update dsl_load_tch_params to set the fn_sid, fn_report and fn_a5
Mix between Dieter's version in tch branch and how the TSM30 does it.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-17 20:52:41 +02:00
Ingo Albrecht 5305fad710 firmware: fixed irq-less keypad support 2010-07-20 14:41:21 +02:00
Ingo Albrecht 8aa4d22f55 firmware: fixed and commented backlight driver 2010-07-20 14:41:20 +02:00
Andreas.Eversberg 8d2ed53b45 [calypso] Rework of keypad interrupt handler.
The keys are correctly detected and debounced. There is no delay_ms in the
interrupt handler anymore.

When a key is pressed, the columns of the keypad are polled and debounced
via timer interrupt. If no key is pressed, the timer interrupt is ignored
again.
2010-07-18 12:56:48 +00:00
Ingo Albrecht 1c8c9b8cfd firmware: sim controller driver by dexter 2010-07-15 21:41:29 +02:00
Steve Markgraf e38416a8d0 cleanup duplicated delay functions
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-07-15 13:50:56 +02:00
Christian Vogel 9b7dbede26 UART initialisation, serial port errors
Additional initialisations for the UART to make the data corruption
from the PC to the Phone go away.

I've seen a lot of systematic character swaps on the serial port,
especially in the vincinity of 0-bytes. As the XON/XOFF registers
are the only thing in the UART that look like they would consider
the actual data sent, I've added this initialisation to uart.c
This makes the problem go away completely on my C123.

To check for it I've added CRCs to the HDLC protocol and checked
for bad frames, and also compared them in a (patched) osmocon
that just sends random garbate in a special DLCI. The bad
frames I observed always looked like this (number in
parenthesis define number of omitted bytes, for brevity):

<------ good bytes ---------->  <-recvd|sent->  <----- identical again
------>

d0 e0 00 00..(107)..f7 ce 17 c4 < 0c 00|00 0c > db 70 ba cb..(67)..d8 6d 3a 1f
31 e1 00 00..(47)..38 ca 2f e5 < 0c 00|00 0c > f8 a3 77 5f..(127)..5b 72 ff 4a

<-- good -> <--- bad -----> <---- good again ------------->
dc e1 00 00 < 0c 00|00 0c > 87 cb 24 83..(178)..2f 69 b3 51

ae e2 00 00..(167)..bd 18 6f a1 < 0c 00|00 0c > 2f 53 d2 b2..(7)..da c7 1b 63
dc e3 00 00..(131)..8e 2c b0 a8 < 0c 00|00 0c > 40 62 56 5f..(43)..f0 3a 47 f7

Formerly I was observing about 10 packets for every 2000 sent (with 192
bytes of payload each). Now, with the added initialisation, I see
(as the time of writing this email) 12000 packets with 192 bytes each
sent, with 0 bytes missing, corrupted, flipped).
2010-04-12 12:29:00 +02:00
Steve Markgraf 93b04a5d32 fix disabling of the calypso bootrom on targets with nIBOOT tied to low:
* bit 8 always needs to be 1 when overriding the setting of the nIBOOT pin, so now we set both bits (9 and 8) to 1, and clear bit 9 if we want to enable the romloader
* to be sure, this was tested on a target with nIBOOT high (C155) and a Alcatel VLE5 pulled to low, and works fine

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-04-10 09:16:12 +02:00
Harald Welte fbacd40930 calypsu UART: add additional debug output in UART RX error case 2010-03-21 23:46:35 +08:00
Ingo Albrecht d960c73a94 firmware: fixed bootrom disabling 2010-03-15 00:15:22 +08:00
Ingo Albrecht 83109b58f5 firmware: watchdog-based system reset 2010-03-15 00:15:04 +08:00
Harald Welte 066222d441 Introduce LCD display_driver infrastructure
* introduce display_driver layer
* port st7558 and ssd1783 drivers to display_driver
* allow for run-time selection of display driver from board/init.c
* replace st7558_puts() calls with display_puts() calls
2010-03-12 12:18:17 +08:00
Steve Markgraf a13a4fda92 uwire: add a chip-select for CS0, needed by the J100i display
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-03-12 10:54:56 +08:00
Harald Welte 97c8b6f33b start to use libosmocore within the firmware
* remove linuxlist.h copy and use osmocore
 * don't put 'struct gsm_time' into l1ctl packets
 * include rx_level and snr for each burst in l1ctl
 * properly build libosmocore.a for target
 * move gsmtime functions into libosmocore
 * move ctype.h to standard location
2010-03-07 20:56:12 +01:00
Harald Welte a4bb938b39 fix even more compiler warnings 2010-03-07 13:44:52 +01:00
Harald Welte a24d658e26 fix compiler warnings 2010-03-07 13:37:52 +01:00
Harald Welte fab52c296c Added Solomon SSD1783 display driver for Motorola C155
Signed-off-by: Steve Markgraf <steve@steve-m.de>
Conflicts:

	src/target/firmware/Makefile
2010-03-07 12:16:25 +01:00