summaryrefslogtreecommitdiff
path: root/firmware/export (follow)
Commit message (Collapse)AuthorAge
...
* Add UART suuport for s5l8700 and s5l8701Cástor Muñoz2016-05-13
| | | | | | | | | Add UART support for s5l8700/1 using the UC870X UART controller, actually the functionallity is disabled and must be enabled for each individual target. Tested on iPod Nano 2G (s5l8701), not tested on s5l8700. Change-Id: Ic0f216bb871502d355a70e4b658e536a2c0976a9
* iPod Classic: updates for uc8702 driverCástor Muñoz2016-05-13
| | | | | | | | | | - Small rework on the UC8702 UART controller to make it compatible with other s5l870x SOCs. Files moved and renamed, many conditional code added to deal with capabilities and 'features' of the different CPUs. - A couple of optimizacions that should not affect the functionality. Change-Id: I705169f7e8b18d5d1da642f81ffc31c4089780a6
* Update runtime estimation after recent power optimizations.Michael Giacomelli2016-04-22
| | | | | | | Values taken from Mihail's Clip Zip, should be similar on all AMSv2 devices. Change-Id: I9432ecffea94afae224391a86f1d3fa46cd87bc0
* AMS: enable SD card support in bootloaderMihail Zenkov2016-04-20
| | | | | | | With this changes rockbox can be loaded from SD card when internal storage can't be mount (due to hardware or software problem). Change-Id: I32b20d3f341566364def747a708a54ba6b4a7f8b
* AMSv2: enable voltage scalingMihail Zenkov2016-04-13
| | | | Change-Id: I8d64b8578d28884e326f8b43100b3b4691f95acf
* AMS: power off while charging enabledMihail Zenkov2016-04-07
| | | | Change-Id: Icddf1ea0a03f0426e0cf9b99f05ea065f532fed5
* as3525: reverting I2C2 to non-interrupts versionMihail Zenkov2016-04-05
| | | | | | | Interrupts version is cause of freeze on USB extraction. Also non-interrupts version much simpler and faster. Change-Id: I30a2993cdcaa85abfba77ca06bfacd5b6b4353e2
* Fix checking for CONFIG_CHARGINGMihail Zenkov2016-04-04
| | | | Change-Id: I53b9a129679fd7b322770025106ef92033226d2a
* Don't add new message to logf when we dump it to fileMihail Zenkov2016-04-04
| | | | | | | | Fix log file corruption if we have new messages at dumping log to file. Comment removed as it incorrect. We store all messages in direct order (last message at end of file). Change-Id: I4acfa8a0935cc41a889e08f6bc42974fefd1ade2
* Disable voltage scaling.Michael Giacomelli2016-03-27
| | | | | | Crashes immediately. Something was wrong with the last commit. Change-Id: Ie8a05095369a6312dc151e0a393e97d3a3fc7a09
* Enable voltage scaling on AMSv2.Michael Giacomelli2016-03-27
| | | | | | | | | Voltage is reduced when the CPU is unboosted, resulting in a large reduction in power consumption. In analogy with the AMSv1 voltage scaling code (currently disabled due to problems with SD cards), I have defined a config file option to enable/disable it. Change-Id: Ia89c31ec06dd012354b4d53435e7b5b36243b206
* GUI boost for any buttonMihail Zenkov2016-03-18
| | | | | | It improve responsiveness for all targets with frequency scaling. Change-Id: I72c94daf58cee10c1772decbd0443856c111cc47
* Fix NUM_ADC_CHANNELS for AS3525v2Mihail Zenkov2016-03-18
| | | | Change-Id: If523d9fe24711ffe571623aae54f141f00b0ee41
* HDD63X0: add a note about poweroff while charging to the config file.Szymon Dziok2016-03-13
| | | | Change-Id: I1e523dd3ddc5ddf198302cdb69cc90ad79df0563
* HDD16X0: disable poweroff while charging, add a note to the config file why.Szymon Dziok2016-03-13
| | | | Change-Id: I90511b019f45d06e3154c986e1abf87a91d79570
* iPod Classic: ATA SMART updatesCástor Muñoz2016-02-14
| | | | | | | | - Add description for attributes supported by Samsung HS081HA (80Gb) and HS161JQ (CEATA 160Gb). - Show error code when ata_read_smart() fails. Change-Id: I618cc4f37d139fc90f596e2cf3a751346b27deb6
* iPod Classic: fix USB_DEVBSS_ATTR alignmentCástor Muñoz2016-02-14
| | | | | | | | After previous commit 0b6647f2e9e5d21e80736eab7af33acecba28f38 this alignment should not be needed, but not sure at all, so it is aligned to cache line length for safety. Change-Id: I5b2b9a30c913d2a609acc1bdf30bdec6811a2551
* as3514: fix bug in volume management on AS3543 targets which are not AS3525v2Amaury Pouly2016-02-12
| | | | | | | | | Some old code made the assumption that CONFIG_CPU == AS3525v2 if and only if HAVE_AS3543, which is not true on targets like the Samsung YP-R0. This fixes several issues on such targets like a huge volume gap between -39dB and -40dB and a volume artificially capped at -72dB instead of -82dB. Change-Id: Ib1c883ac593c0c3ce5e2bf4eb408924ce5f5ad93
* Replace SAMSUNG_YH920_PAD with YH92XSebastian Leonhardt2016-01-25
| | | | | | | seems more logical to me, and is more consistent, since "SAMSUNG_YH92X_PAD" is already used in the tex files. Change-Id: Ie9a9d850ea86155a7dcf86c88a22a420a10a3837
* Enable frequency scaling on AMSv2 devices.Mihail Zenkov2016-01-21
| | | | | | | | | | Voltage scaling is not yet enabled, but will follow once we are sure these changes are stable. Preliminary testing suggests a large increase in battery life, which will be further improved by voltage scaling. Patch by Mihail Zenkov with help from myself and others on the forums. Change-Id: I171d20bbee19a48c13cd14efb0d023883cc8c687
* iPod Classic: add non-cached memory regionCástor Muñoz2015-12-17
| | | | | | | | Configures uncached memory region and adds some defines for misc HW, for compability with the bootloader and other future use, current functionality should not be affected. Change-Id: I390e79bea1aef5b10dfbc72ad327d7fe438ec6f5
* iPod Classic: prepare LCD driver for the bootloaderCástor Muñoz2015-12-17
| | | | | | Optimizes encoding of LCD command sequences. Change-Id: I9d1eb735e5a972c1a176177ed570a3fe991d7b9f
* iPod Classic: s5l8702 clocking rewrite+documentationCástor Muñoz2015-12-17
| | | | | | | | | | | | | | | | | This is a rewrite of the clocking section, the resulting system frequencies are the same as the current git version. This pàtch uses fixed FClk and just one register is written to switch all system frequencies, it needs less steps than the current git version to reach the desired frequency, so it is faster and safer. Includes functions to step-up/down over a table of predefined set of frequencies. The major difference is that Vcore is decreased from 1050 to 1000 mV. See clocking-s5l8702.h for more information. Change-Id: I58ac6634e1996adbe1c0c0918a7ce94ad1917d8e
* iPod Classic: enable AB repeatCástor Muñoz2015-10-17
| | | | Change-Id: I58f3b0a3e4d8a1649d5549c312e6a259bce697a4
* iPod Classic: reads HDD S.M.A.R.T. dataCástor Muñoz2015-10-07
| | | | | | | | Adds ata_read_smart() function to storage ATA driver, current SMART data can be displayed and optionally written to hard disk using System->Debug menu. Change-Id: Ie8817bb311d5d956df2f0fbfaf554e2d53e89a93
* iAP: lingo 1 (microphone)Cástor Muñoz2015-10-07
| | | | Change-Id: I65da2064951972368a2880d271280e5b5ae878fe
* iPod Classic: implement IPOD_ACCESSORY_PROTOCOLCástor Muñoz2015-10-07
| | | | Change-Id: I0f0950c42ae5bf5c5b4c2c2f097f8c68a92ba4dd
* iPod Classic: implement HAVE_SERIALCástor Muñoz2015-10-07
| | | | Change-Id: I24a861cd45095d858d1a7db39969f6eda17cc563
* ipod Classic: implement HAVE_RECORDINGCástor Muñoz2015-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch has been tested on iPod 80 and 160slim, actually it works but some updates must be done to the final version: - unlimitted input buffer - decrease CHUNK_SIZE - use non-cached addresses instead of discard d-cache ??? Capture hardware versions: Ver iPod models capture support --- ----------- --------------- 0 80/160fat dock line-in 1 120/160slim dock line-in + jack mic HW version 1 includes an amplifier for the jack plug mic. Capture HW detection only tested on iPod 80 and 160slim. CODEC power: AFAIK, OF powers CS42L55 at VA=2.4V for capture (1.8V for playback) and turns on the ADC charge pump. CODEC datasheet recommmends to disable the charge pump for VA>2.1V. CS42L55 DS, s4.13 (Required Initialization Settings): for VA>2.1V, some adjustments "must" be done using undocummented "control port compensation" registers. OF does not modifies these registers when VA=2.4V. This patch configures capture HW in the same way as OF does. TODO: - ADC full scale voltage depends on VA, perform tests to find clipping levels for VA=1.8V and VA=2.4V Change-Id: I7e20fd3ecaa83b1c58d5c746f5153fe5c3891d75
* iPod Classic: capture support for CS42L55 codecCástor Muñoz2015-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a couple of power saving options that can be selected using defines, they configure the CODEC in a different way than OF does: MONO_MIC: jack microphone is connected to left channel, disabling right channel saves ~1 mW, there is no reason to not to do it. BYPASS_PGA: this option only applies to the line-in, OF does not bypass the PGA and configures it to 0 dB gain. At the beginning, this patch was written based on CODEC datasheet, bypassing PGA because it saves power and incrementes dinamic range ~1dB, i have used this setup for a while without problems. Finally this option was disabled at the last minute, i decided to do it after reviewing the OF and realizing that CS42L55 datasheet recommends to bypass the PGA only if the HW includes a couple of capacitors (see Typical Connection Diagram, Note 4), at this moment i don't know if Classic includes these capacitors (probably not). Anyway, i am not able to tell the difference listening to voice recodings. TODO: - Use variable PGA gain for jack microphone (it is fixed to +12 dB. as OF does). - I am not a fan of having lots of unused #define options, these could be useful for a generic driver but actually this driver is Classic oriented, i am not sure if it could be considered disirable to eliminate them in the final version. Change-Id: I3dadf2341f44d5e13f3847e6c9de4a76cd6f0918
* iPod Classic: use new PL080 DMA driverCástor Muñoz2015-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch uses the new pl080 DMA driver for I2S playback and LCD update. I have tried to be as fiel as possible to the current behaviour, algorithms and configurations are the same, but using the new driver. Other modifications: Playback: - CHUNK_SIZE is decreased from 42988 to 8188 bytes, it does not affect normal playback (block size 1024), was tested using metronome (block size 46080). This change is needed because the new code commits d-cache range instead of commiting the whole d-cache, maximum time spent commiting the range should be limited, CHUNK_SIZE can be decreased even more if necessary. - pcm_play_dma_start() calls pcm_play_dma_stop() to stop the channel when it is running (metronome replays the tick sound without stopping the channel). - pcm_play_dma_get_peak_buffer(): same as actual SVN function but returns samples count instead of bytes count. TODO: AFAIK, actually this function is not used in RB. Not tested, but probably this function will fail because it returns pointers to the internal double buffer. LCD update: - suppresses lcd_wakeup semaphore and uses yield() Change-Id: I79b8aa47a941e0dd91847150618f3f7f676c26ef
* iPod Classic: introduce PL080 DMA controller driverCástor Muñoz2015-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Motivation: This driver began as a set of functions to help to test and experiment with different DMA configurations. It is cumbersome, time consuming, and leads to mistakes to handle LLIs and DMA registers dispersed along the code. Later, i decided to adapt an old DMA queue driver written in the past for a similar (scatter-gather) controller, all task/queue code is based on the old driver. Finally, some cleaning and dmac_ch_get_info() function was added to complete RB needs. Description: - Generic, can be used by other targets including the same controller. Not difficult to adapt for other similar controllers if necesary. - Easy to experiment and compare results using different setups and/or queue algorithms: Multi-controller and fully configurable from an unique place. All task and LLI management is done by the driver, user only has to (statically) allocate them. - Two queue modes: QUEUE_NORMAL: each task in the queue is launched using a new DMA transfer once previous task is finished. QUEUE_LINK: when a task is queued, it is linked with the last queued task, creating a single continuous DMA transfer. New tasks must be queued while the channel is running, otherwise the continuous DMA transfer will be broken. On Classic, QUEUE_LINK mode is needed for I2S continuous transfers, QUEUE_NORMAL is used for LCD and could be useful in the future for I2C or UART (non-blocking serial debug) if necessary. - Robust DMA transfer progress info (peak meter), needs final testing, see below. Technical details about DMA progress: There are comments in the code related to the method actually used (sequence method), it reads progress without halting the DMA transfer. Althought the datasheet does not recommend to do that, the sequence method seems to be robust, I ran tests calling dmac_ch_get_info() millions of times and the results were always as expected (tests done at 2:1 CPU/AHB clock ratio, no other ratios were tried but probably sequence method will work for any typical ratio). This controller allows to halt the transfer and drain the DMAC FIFO, DMA requests are ignored when the DMA channel is halted. This method is not suitable for playback because FIFO is never drained to I2S peripheral (who raises the DMA requests). This method probably works for capture, the FIFO is drained to memory before halting. Another way is to disable (stop) the playback channel. When the channel is disabled, all FIFO data is lost. It is unknown how much the FIFO was filled when it was cleared, SRCADDR counter includes the lost data, therefore the only useful information is LINK and COUNT, that is the same information disponible when using the sequence method. At this point we must procced in the same way as in sequence method, in addition the playback channel should be relaunched (configure + start) after calculating real SRCADDR. The stop+relaunch method should work, it is a bit complicated, and not valid for all peripheral FIFO configurations (depending on stream rate). Moreover, due to the way the COUNT register is implemented in HW, I suspect that this method will fail when source and destination bus widths doesn't match. And more important, it is not easy to garantize that no sample is lost here or there, using the sequence method we can always be sure that playback is ok. Change-Id: Ib12a1e2992e2b6da4fc68431128c793a21b4b540
* iPod Classic: s5l8702 GPIO interrupt controller.Cástor Muñoz2015-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements a simple API to use the external interrupt hardware present on s5l8702 (GPIO interrupt controller). This GPIOIC has been fully tested using emcore apps. Code is based on openiBoot project, there are a few modifications to optimize space considering we will only use two or three external interrupts. The API compiles and works, but has been never used, therefore probably will need some changes to the final version. External interrupts are necessary for jack remote+mic controller (see iAP Interface Specifiction: Headphone Remote and Mic System), this controller is located at I2C bus address 0x72, there is a IRQ line for remote button press/release events routed to GPIO E6. At this moment, the functionallity of this controller has been extensively tested using emcore, getting a lot of information about how it works. Microphone is already working on RB, jack accessory detection and button events are work in progress. PMU IRQ line is also routed to GPIO F3, it signals many events: holdswitch, usb plug, wall adapter, low battery... The use of PMU interrupts is the orthodox way of doing things, at this moment there is no work done in this direction, there are a lot of PMU events and i think it is a matter of discursion what to do and how. Change-Id: Icc2e48965e664ca56c9518d84a81c9d9fdd31736
* iBasso DX50/DX90: Major code cleanup and reorganization.Udo Schläpfer2015-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reorganization - Separated iBasso devices from PLATFORM_ANDROID. These are now standlone hosted targets. Most device specific code is in the firmware/target/hosted/ibasso directory. - No dependency on Android SDK, only the Android NDK is needed. 32 bit Android NDK and Android API Level 16. - Separate implementation for each device where feasible. Code cleanup - Rewrite of existing code, from simple reformat to complete reimplementation. - New backlight interface, seperating backlight from touchscreen. - Rewrite of device button handler, removing unneeded code and fixing memory leaks. - New Debug messages interface logging to Android adb logcat (DEBUGF, panicf, logf). - Rewrite of lcd device handler, removing unneeded code and fixing memory leaks. - Rewrite of audiohw device handler/pcm interface, removing unneeded code and fixing memory leaks, enabling 44.1/48kHz pthreaded playback. - Rewrite of power and powermng, proper shutdown, using batterylog results (see http://gerrit.rockbox.org/r/#/c/1047/). - Rewrite of configure (Android NDK) and device specific config. - Rewrite of the Android NDK specific Makefile. Misc - All plugins/games/demos activated. - Update tinyalsa to latest from https://github.com/tinyalsa/tinyalsa. Includes - http://gerrit.rockbox.org/r/#/c/993/ - http://gerrit.rockbox.org/r/#/c/1010/ - http://gerrit.rockbox.org/r/#/c/1035/ Does not include http://gerrit.rockbox.org/r/#/c/1007/ due to new backlight interface and new option for hold switch, touchscreen, physical button interaction. Rockbox needs the iBasso DX50/DX90 loader for startup, see http://gerrit.rockbox.org/r/#/c/1099/ The loader expects Rockbox to be installed in /mnt/sdcard/.rockbox/. If /mnt/sdcard/ is accessed as USB mass storage device, Rockbox will exit gracefully and the loader will restart Rockbox on USB disconnect. Tested on iBasso DX50. Compiled (not tested) for iBasso DX90. Compiled (not tested) for PLATFORM_ANDROID. Change-Id: I5f5e22e68f5b4cf29c28e2b40b2c265f2beb7ab7
* yp-r0: improve the charging codeLorenzo Miori2015-01-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some people reported strange charging times and strange battery life. Charging by OF: 25 hours; RB: 18 hours It has been found that there are at least two issues here: 1) the way of getting battery charging status wasn't really accurate. This attempts to fix that issue. This patch also simplifies some code (opening a device is no more needed, for example). To technically explain, battery charging implies first a constant current mode (where the voltage increases) and then a constant voltage mode (where, obviously, the voltage reads more or less the same). The old way the End Of Charge was detected was based solely on the voltage, while now it is based on chip's EOC interrupt, which should be more accurate. 2) OF explicitly sets a constant current 350 mA, while we usually had 55 mA (by as3543 default). This wasn't discovered before since there is a caching problem ("an accurate guess") in the Samsung power mgmt Linux module, thus its debugging dumper wasn't really working, reporting a 55 mA current. Strangely this option should have been set by the bootloader but apparently it does not. Some testing is still needed, but I confirm that with this patch I could run a benchmark for 25 hours (vs. 18 hours), by charging within Rockbox of course. Change-Id: I3bd921e86b9018d1cc3c720d15cc46896e8490b3
* Get rid of stupid _backlight_* function namesMarcin Bukat2015-01-12
| | | | | | _remote_backlight_* and _buttonlight_* are cleaned as well Change-Id: I73653752831bbe170c26ba95d3bc04c2e3a5cf30
* usb: finally get rid of USE_ROCKBOX_USB in Sansa bootloader, use bootloader usbAmaury Pouly2015-01-08
| | | | | | | | For some reason, the bootloader and config files didn't define HAVE_BOOTLOADER_USB_MODE, also remove the special cases in usb.c which they implied. Change-Id: I68c29be7d03627e64cac4ff7678e0c211e087a8c
* usb: make usb_release_exclusive_storage privateAmaury Pouly2015-01-08
| | | | | | Change-Id: I0383760b7d8e67cc99bbe4e4979bca92ef436c8d Reviewed-on: http://gerrit.rockbox.org/1098 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* Clarify usb_powered() and fix some code.Amaury Pouly2015-01-08
| | | | | | | | | | Either by mistake or because its meaning changed, usb_powered() doesn't mean what the name suggest, so clarify its meaning by renaming it to usb_powered_only. So use of usb_powered() are replaced by usb_inserted() when it makes more sense. Change-Id: I112887e2d8560e84587bee5f55c826dde8c806d8 Reviewed-on: http://gerrit.rockbox.org/1097 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* usb: document usb states, powering and detectionAmaury Pouly2015-01-08
| | | | | | Change-Id: Ia3b7d6c6294bfb9272355c3f28a994dd0e83cbce Reviewed-on: http://gerrit.rockbox.org/1096 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* usb: document usb_status_event and #ifdef it with USB_STATUS_BY_EVENTAmaury Pouly2015-01-08
| | | | | | Change-Id: I62cdb8ad71a598279fe99cc91d87eafda26cbbc7 Reviewed-on: http://gerrit.rockbox.org/1095 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* usb: move usb charging function prototype from usb_core.h to usb.hAmaury Pouly2015-01-08
| | | | | | Change-Id: Id29c60d3aa26f8badca6c38c1cbb2e5a39c554dc Reviewed-on: http://gerrit.rockbox.org/1094 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* Get rid of USE_ROCKBOX_USBAmaury Pouly2015-01-08
| | | | | | | | | | | Except for unfinished or experimental ports, it isthe case that USE_ROCKBOX_USB and HAVE_USBSTACK are both defined or both undefined. Furthermore, it is a leftover of some early developments on the USB stack and doesn't make sense anymore. Change-Id: Ic87a865b6bb4c7c9a8d45d1f0bb0f2fb536b8cad Reviewed-on: http://gerrit.rockbox.org/1091 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* Add IS_ALIGNED(x, a) macro helperAndrew Ryabinin2014-11-29
| | | | Change-Id: Ic5799e4bc03cabddece80cbc129b16f3a19ff9c5
* iPod Classic: update timer API using 32-bit timers.Cástor Muñoz2014-11-16
| | | | | | Change-Id: I49dab8ae955a339ad0a27402fa21caa411c4ecf6 Reviewed-on: http://gerrit.rockbox.org/1032 Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
* iPod Classic: fix s5l8702 cache line length.Cástor Muñoz2014-11-13
| | | | | | | | | | Use 32 bytes for cache line length (arm926ej-s), this prevents misalignments of ATA storage buffer which in some builds could cause weird faults. Change-Id: I88dc595d251315620ec49b0251ddc039ff47181e Reviewed-on: http://gerrit.rockbox.org/1031 Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
* HDD1630/HDD6330/SA9200: Integration of the clicker with the "Keyclick" menu.Szymon Dziok2014-11-10
| | | | Change-Id: Ieb26f2252c1f2613cc9bd83c8349f49113f46d87
* Enable battery charging detection for iBasso DX50/DX90.Udo Schläfer2014-10-18
| | | | | | | | | | | | | | This changes iBasso DX50/DX90 config from CHARGING_SIMPLE (Simple, hardware controlled charging (CPU cannot read charger state but may read when power is plugged-in) to CHARGING_MONITOR (Hardware controlled charging with monitoring (CPU is able to read HW charging state and when power is plugged-in)). Not really usefull at the moment, since USB connection (charging) is not (yet) gracefully handled for iBasso devices. Change-Id: I55da81b10637d4de88d713ea5eba08eb59bc629f Reviewed-on: http://gerrit.rockbox.org/1010 Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
* YH820/YH92X: Properly enable morse input.Szymon Dziok2014-10-08
| | | | Change-Id: I6a35d64d0859b7ef429919c260a69974d6fdfafb
* Samsung yh820/yh92x: add HID keymaps.Szymon Dziok2014-10-03
| | | | Change-Id: I575e0e858aef0090d6864837d40a7b51e996ab43