aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/libboard/qmod
AgeCommit message (Collapse)AuthorFilesLines
2018-08-26firmware: Enable -Wformat and resolve all related compiler warningsHarald Welte1-2/+2
There have been tons of format-string related bugs in our code which we never discovered due to disabling -Wformat. Let's fix that. Change-Id: I5ec466361bcc526fac1f4897673264ee5af3458b
2018-08-07qmod: error on EEPROM erase failKévin Redon1-3/+5
repeating the EEPROM erase (byte write) in case of byte write failure could lead in an infinite loop. log the error an return error code instead. Change-Id: Id6f3654d877ca772ba04237da91a6e86e3f441ec
2018-08-07qmod: Add 'e' command for erasing the EEPROMHarald Welte1-0/+24
Change-Id: Id7cb0db568dd3e9d796829bf0019d63048612998
2018-07-24I2C: return error after failed writeKévin Redon1-7/+7
The previous mechanism of retrying a failed write could become a infinite blocking loop (until watchdog tiemout). Also the array size is used to know how much data to write and verify instead of a constant. Change-Id: I8d2d090c5f4d1195f4c7eb29b3958a7bb05f56ec
2018-07-24I2C: add wait time after write to let EEPROM writeKévin Redon1-0/+2
The Atmel AT24C02 defines a maximum tWR waiting time after a byte write of 5 ms before a next write. Enforcing this wait time also fixed the failed verification in qmod, where it was reading 0xffff instead of the written value. Change-Id: I42c90b8d0329e425f275067e87d584212a43a90b
2018-07-11firmware: set license to GPLv2+Kévin Redon10-7/+166
Change-Id: Id4c00159f984976b6d8641900fb64e36a3a30407
2018-07-07DFU: re-enable UART after testing forced bootloaderKévin Redon1-8/+20
The qmod does not have a separate force button as simtrace has. Instead it check is TX and RX of UART are shorted using PIO. If the pins are not set back to the UART peripheral, the TRACE/debug console output will not work anymore. Change-Id: Id434b49909d6395a2f93a00f39d2d770a5725466
2018-07-04USB: add central file to define USB IDs, classes, and endpointsKévin Redon1-0/+1
Change-Id: Iba81f32a92c68a973e8e7adbc4c2a1064ba5290f
2018-06-29Use system include <foo.h> notation for libosmocore headersHarald Welte2-2/+2
the curent local copies of libosmocore headers + source is a temporary hack anyway. We should instead rely on a system-wide install of libosmocore cross-compiled for arm-none-eabi. But leave that as a second (later) step beyond this patch. Change-Id: Ia63fd842d45a2b404233b4326050e7eda0604cf0
2017-11-28DFU: Move "Override DFU" (force DFU) code to board-specific sectionHarald Welte1-0/+36
Each board can define its own conditions on which the controller should boot into DFU mode rather than normal application mode. Let's move the "UART loopback jumper" to QMOD specific part. For SIMtrace we have an actual button and can use that in a future patch.
2017-11-03[firmware] sim_switch + wwan_perst: Don't re-initializeHarald Welte1-0/+1
The logic to detect if the respective module is already initialized or not was broken. When performing initialization, we of course need to set initialized=1.
2017-11-03[firmware] wwan_perst: Print index when releasing WWAN_PERSTHarald Welte1-1/+4
2017-11-03[firmware] wwam_led: use 0/1 instead of 1/2Harald Welte1-6/+6
most (all) other code modules have already moved over to consistently using a 0-based index.
2017-11-03[firmware] card_pres: use modem number at start of lineHarald Welte1-1/+1
... like most other code modules, too
2017-11-03[firmware] card_pres: Use 0/1 index number instead of 1/2Harald Welte1-5/+5
We have moved most (all?) other code to work with slots 0/1 rather than 1/2.
2017-05-20set local slot LED according to remote/local state.Harald Welte1-0/+3
The LED is illuminated as long as the slot is in local (physical SIM card) mode.
2017-05-11dfu: make sure to not bloat the loader with main board init stuff.Harald Welte1-0/+7
2017-05-11perst/sim_switch: Log events using TRACE_INFOHarald Welte1-2/+8
2017-05-11consistently use 0-based counting of modems/slotsHarald Welte2-6/+6
2017-05-09Generalize SIM switching code and allow local/remote switching via USBHarald Welte2-32/+8
2017-05-09wwan_perst: Warn if somebody failed to initialize usHarald Welte1-0/+7
2017-05-09wwan_perst: Support varying timeout and permanent active/inactiveHarald Welte3-29/+51
2017-05-07qmod: debug_cmd: Avoid 'Unknown command' for valid commandsHarald Welte1-50/+53
2017-05-07qmod: Initialize ST12 specific I/O pins only on ST12Harald Welte1-4/+8
2017-05-07migrate from req_ctx to msgbHarald Welte1-1/+3
We now generalize the USB communiction and abandon the 'req_ctx' structure inherited from openpcd. Instead we use the libosmocore 'msgb' structure to handle incoming and outgoing USB tranfers. We also use linuxlist-based msgb-queues for each endpoint.
2017-05-05QMOD: Add code to determine SIM Card presenceHarald Welte4-5/+71
2017-05-05qmod: wwan_led.c: Fix handling of LED for second ModemHarald Welte1-1/+1
2017-05-05qmod: Disable various console commands on ST34Harald Welte1-40/+55
A number of commands related to the USB hub and the EEPROM are only available on ST12, but not on ST34. Let's remove them if not applicable.
2017-03-07qmod: Fix polarity of SPDT switchHarald Welte1-4/+4
the default boot state should be to use the local SIM, until the user changes it (currently only possible via entering '!' or '@' on the serial console). The code so far had this completely inverted.
2017-03-06qmod: Use different Interface Strings for Modem1+2 / Modem 3+4Harald Welte1-0/+8
This makes it obvious in 'lsusb' and to other software on the USB host which interface is for which of the modems.
2017-03-06qmod: Add code to switch between physical and virtual SIMHarald Welte1-0/+35
2017-03-05qmod: (re)activate USB port remapping.Harald Welte1-1/+1
The port mapping is now as follows: * port 1: ST12 * port 2: modem 1 * port 3: modem 2 * port 4: ST34 * port 5: modem 3 * port 6: modem 4 * port 7: daisy-chaining port
2017-03-05qmod: Replace hand-crafted delay loop with call to mdelay()Harald Welte1-5/+1
2017-03-05qmod eeprom/i2c: Re-start watchdog while slow bit-bangingHarald Welte3-5/+13
2017-03-03only simtrace is bus-powered, SAM3 on qmod + owhw are self-poweredHarald Welte1-0/+2
2017-03-03Call USBD_Disconnect before software-triggered CPU resetHarald Welte1-0/+1
This makes sure that we'll re-enumerate on the USB, as a CPU reset apparently doesn't automatically release the pull-up and notify the hub that we were gone?
2017-03-03change from \r\n (CRLF) to \n\r (LFCR)Harald Welte1-40/+40
For some strange reason my output is garbled in both the 'screen' and 'cu' teerminal programs and 'raw' terminal (stty) mode. I fail to understand why, but let's simply adjust the code as needed for now.
2017-02-27Structure build system to build for multiple boards/apps/environmentsHarald Welte1-0/+201
2017-02-27Change directory structure to align with Atmel softpackHarald Welte7-0/+438
This way we can easily check with 'diff' for differences in our code and Atmel softpack. Also, this layout is more suitable for building various different firmware images (e.g. factory-test, dfu-loader, main application) for a variety of different boards (simtrace, owhw, qmod).