summaryrefslogtreecommitdiff
path: root/firmware/target (follow)
Commit message (Collapse)AuthorAge
* Slightly increase CVDD2 on AMSv2.Michael Giacomelli2017-06-14
| | | | | | At least one person found an SD card that wouldn't work at 2.7v. Change-Id: I84001f07acc9ce36c71165706cce28c2899ac6bf
* imx233: fix touchscreen driverAmaury Pouly2017-05-16
| | | | | | | | One cannot call lradc_acquire in IRQ context. The solution is to reserve the channel once at init. There is an additional complication on STMP3600 where channel mapping is fixed. Change-Id: Idccbac634a4d9002703e2b1d57748beb9b245cbb
* Samsung YP-Z5: keypad adaption to the new button APILorenzo Miori2017-05-16
| | | | | | | | | After compiling the ypz5 target, I have discovered that the keypad system was refusing to compile, due to a much newer button API. This patch adapts the target to the current imx233 implementation. Additonally, some ADC button values have been re-adjusted. Change-Id: Ib9bfd6aeec5e9e8dfef5887c4147201dd9028a44
* RDS on Samsung YPR0: Make compatible with RDS changesMichael Sevakis2017-04-19
| | | | | | | | | | | | | | si4700_rds_process() should only be called on the rising edge of RDSR since it now rejects segments out of sequence. Receiving the same segment multiple times due to rapid polling is of course out of sequence so do no more processing until RDSR bit cycles to avoid repeatedly sending the same data instance. I don't have the tools installed to test compile so there could be typos. However, I tested on gigabeat-s with YPR0 setup copied over and it fixed the issue with PS and RT. Change-Id: Iab511bef64030de8c07d4d22dcf338c8720e2ae2
* ipod6g: some fixes for recordingCástor Muñoz2017-04-16
| | | | | | | | | - Fix broken recording from jack microphone. - Fix recording hardware detection on models that do not support the jack microphone. - Enable monitor mode when recording. Change-Id: Ib79a2746f2d75f74cf6667d33bc9ed6512bbc8a9
* Do some housekeeping with fat.h and SECTOR_SIZEMichael Sevakis2017-03-12
| | | | | | | | | | | | | | Many includes of fat.h are pointless. Some includes are just for SECTOR_SIZE. Add a file 'firmware/include/fs_defines.h' for that and to define tuneable values that were scattered amongst various headers. Remove some local definitions of SECTOR_SIZE since they have to be in agreement with the rest of the fs code anyway. (We'll see what's in fact pointless in a moment ;) Change-Id: I9ba183bf58bd87f5c45eba7bd675c7e2c1c18ed5
* ipod6g: rename some target filesCástor Muñoz2017-03-03
| | | | | | | | | As preparation to add new targets to the s5l8702 directory, rename files as: s5l8702/ipod6g/*-ipod6g.c -> s5l8702/ipod6g/*-6g.c Change-Id: I0cd03d6bcf39b2aa198235f9014cb6948bbafcd5
* Improve radio RDS driver and frameworkMichael Sevakis2017-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove unused bits like the radio event and simplify basic radio interface. It can be more self-contained with rds.h only required by radio and tuner code. * Add post-processing to text a-la Silicon Labs AN243. The chip's error correction can only do so much; additional checks are highly recommended. Simply testing for two identical messages in a row is extremely effective and I've never seen corrupted text since doing that, even with mediocre reception. Groups segments must arrive in order, not randomly; logic change only accepts them in order, starting at 0. Time readout was made a bit better but really we'd need to use verbose mode and ensure that no errors were seen during receiving of time and more checks would be need to have a stable PI. The text is the important bit anyway. * Time out of stale text. * Text is no longer updated until a complete group has been received, as is specified in the standard. Perhaps go back to scrolling text lines in the radio screen? * Add proper character conversion to UTF-8. Only the default G0 table for the moment. The other two could be added in. * Add variants "RDS_CFG_PROCESS" and "RDS_CFG_PUSH" to allow the option for processed RDS data to be pushed to the driver and still do proper post-processing (only text conversion for now for the latter). Change-Id: I4d83f8b2e89a209a5096d15ec266477318c66925
* ipod6g: bootloader v1Cástor Muñoz2017-02-09
| | | | | | | | - dual boot - USB mode - battery trap Change-Id: I8586cfeb21ee63f45ab965430725225fdfc4212d
* Slightly increase CVDD1 for Clip ZipMihail Zenkov2017-02-07
| | | | Change-Id: Ic784c72a643546c8e31affa820f701eb7982b7c7
* Fix dangerous castsAmaury Pouly2017-02-04
| | | | | | | | | On Windows 64-bit, the size of long is 32-bit, thus any pointer to long cast is not valid. In any case, one should use intptr_t and ptrdiff_t when casting to integers. This commit attempts to fix all instances reported by GCC. When relevant, I replaced code by the macros PTR_ADD, ALIGN_UP from system.h Change-Id: I2273b0e8465d3c4689824717ed5afa5ed238a2dc
* zen/zenxfi: adjust maximum emi voltageAmaury Pouly2017-02-04
| | | | | | | | | | | | Running at 130MHz is unsafe since on those targets, we disable memory frequency scaling because it is unstable. That leads to situation where cpu is running at 64MHz and VDD is at 1.050V. But on STMP3700, the EMI uses the VDD rail instead of a dedicated VDDMEM rail as on STMP3780. Thus we are essentially running the EMI at 130MHz at 1.050V when the minimum recommened voltage is 1.2V. This commit runs the EMI at 64MHz all the time on the ZEN and ZEN X-Fi which will lead to reduce performance but hopefully increases stability. Change-Id: Ida6c2ec130b1778973e383d7c44a06a6ca8f9268
* zenmozaic: adjust button voltageAmaury Pouly2017-02-04
| | | | | | The values were recorded for VDDIO at 3.46V and not 3.5 Change-Id: I12880c3d7336389bbac07fe01b8d63d9cd28d177
* imx233: remove weak attribute on some functionsAmaury Pouly2017-02-04
| | | | | | | This feature was never used and it is not even working because weak linking doesn't work in-between files in a library. Change-Id: I389ea5f17be1d9db0e2150828d704be5a091e09d
* nano2g: fix dangerous mutex in hold switchCástor Muñoz2017-02-04
| | | | | | | | | This is a quick patch to solve FS#13104, we can not disable the clickwheel LDO from within interrupt code, so for the moment we leave it enabled all the time, it is unknown how power comsumption is affected when the hold switch is locked. Change-Id: I8f675702e2b5becbcd9197c8b044e6b8daeea79f
* i.MX31: Restore screen clearing in DVFS/DPTC debug screenMichael Sevakis2017-01-29
| | | | | | | | Somewhere along the line the screen stopped being cleared prior to writing new text on each frame, which left visible bits of previously-displayed text when it changed. Change-Id: I344e03c234daa77f4e64ed89281c40db887e4498
* Improve imx31 interrupt code for PMIC and GPIOMichael Sevakis2017-01-29
| | | | | | | | | | Fix stuff that was bugging me about the way I did it at first. While messing around I found RDS code wasn't masking its GPIO ISR as it should, which might lead to two different interrupts messing with the static data. Change-Id: I54626809ea3039a842af0cc9e3e42853326c4193
* sd-as3525v2: simplify logic and cleanupMihail Zenkov2017-01-27
| | | | | | | | Remove "low power mode clocking" as we stop clocking by hands after each transfer. Remove CGU_IDE and CGU_MEMSTICK as we don't use them. Simplify logic in sd_transfer_sectors. Change-Id: I120396d7ec5c99c62f3a746306aa8edd8686e08a
* Move intrinsic RTC implmentation differences to driver filesMichael Sevakis2017-01-26
| | | | | | | | | | | Some drivers set tm_wday just fine and do not need it coerced to be correct. Others set tm_yday, so don't overwrite what the driver sets; just zero it inside if it can't fill the field. Move calls to set_day_of_week() to the sorts of drivers that presumably required the hammer (FS#11814) in get_time() where the weekday isn't locked to the date. Change-Id: Idd0ded6bfc9d9f48fcc1a6074068164c42fcf24a
* AMS: Return ascodec to interrupt-based I2C2 driverMichael Sevakis2017-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Slightly revised and regularized internal interface. Callback is used for read and write to provide completion signal instead of having two mechanisms. 2. Lower overhead for asynchronous or alterate completion callbacks. We now only init what is required by the transfer. A couple unneeded structure members were also nixed. 3. Fixes a bug that would neglect a semaphore wait if pumping the I2C interrupts in a loop when not in thread state or interrupts are masked. 4. Corrects broken initialization order by defining KDEV_INIT, which makes kernel_init() call kernel_device_init() to initialize additional devices _after_ the kernel, threading and synchronization objects are safe to use. 5. Locking set_cpu_frequency has to be done at the highest level in system.c to ensure the boost counter and the frequency are both set in agreement. Reconcile the locking inteface between PP and AMS (the only two currently using locking there) to keep it clean. Now works fine with voltages in GIT HEAD on my Fuze v2, type 0. Previously, everything crashed and died instantly. action.c calling set_cpu_frequency from a tick was part of it. The rest may have been related to 3. and 4. Honestly, I'm not certain! Testing by Mihail Zenkov indicates it solves our problems. This will get the developer builds running again after the kernel assert code push. Change-Id: Ie245994fb3e318dd5ef48e383ce61fdd977224d4
* imx233: remove redundant lines in linker scriptAmaury Pouly2017-01-24
| | | | Change-Id: Ief8ab0c33abdd3b36cd94b0578e2c5cad22bf2a6
* Add CPU mode asserts to kernel on blocking functions.Michael Sevakis2017-01-21
| | | | | | | | | This scourge finds it's way back in far too often. Right now, only defined for ARM. Have fun! Change-Id: Ib21be09ebf71dec10dc652a7a664779251f49644
* zen/zenxfi: remove obsolete commentAmaury Pouly2017-01-16
| | | | Change-Id: I1e4a726c85a9d87216412162fd0815747eb32cf6
* zen/zenxfi: add remark about pinAmaury Pouly2017-01-16
| | | | | | Clearly this pin does not control power so don't call it lcd_power. Change-Id: I9a6794e2606de99cb44dd3e7288b5cce5beb8d0d
* imx233: add small framework for LEDAmaury Pouly2017-01-16
| | | | | | | | It handles GPIO and PWM based LEDs, possibly with several channels (red-green LED for example). The debug allows one to play with the setting. Currently the code supports the ZEN, ZEN X-Fi, and ZEN Mozaic. Change-Id: I8c3b66e6ba21778acdb123daabb724280a7d1a4f
* imx233: workaround hardware dma bugAmaury Pouly2017-01-15
| | | | | | | This bug mostly affects the ZEN and ZEN X-Fi and hangs the lcdif dma randomly on boot. Change-Id: I4255db90d87737b7a70d1d53e3ef84e4e14c8c13
* imx233: fix audio debug screen on stmp3700Amaury Pouly2017-01-14
| | | | | | | On STMP3700 there is no dedicated speaker amplifier but speaker is always on lineout so it makes sense to report volume and power down of lineout. Change-Id: If666bccf36d3a5ecc6d892823522d023f3206184
* imx233: add note about power down bits in audiooutAmaury Pouly2017-01-14
| | | | Change-Id: I204acff8ee697d70fd16f9828010646b10a8f11b
* imx233: fix speaker enable/disable codeAmaury Pouly2017-01-14
| | | | Change-Id: I6540f2f8ba09bc79b80d71e5f3b0adebd9fce727
* iPod Classic: fix small bug on PCM recordCástor Muñoz2017-01-13
| | | | | | | | | On PCM record initialization, an unknown clockgate is enabled instead of the I2S clockgate. This bug does not produce incorrect functionallity because the right clockgate is already enabled on PCM playback initialization. Change-Id: I97a3a4a6f12131e492c1431359a0a976b68014be
* imx233: don't print disabled IRQs in debug screenAmaury Pouly2016-12-12
| | | | | | | There are lot IRQ and most are unused most of the time, this is annoying on devices with small screens. Change-Id: I7f3453f2768b8e35a5a367fbcf1e4cf3cf73bcd7
* imx233: add more icoll statisticsAmaury Pouly2016-12-12
| | | | | | | | | Those new statistics give the maximum time an IRQ took and also the total time spent in IRQ, for each IRQ. Hopefully those do not take took much time or space to collect. If this is the case, it can be enabled in debug builds only the future. Change-Id: I05af172897c5cb7ffcc9322452f974d8f968e29d
* imx233: fix IRQ handler w.r.t unwinderAmaury Pouly2016-12-12
| | | | | | | | | | | | | | | The IRQ handler saves registers on the IRQ stack, saves the old PC to imx233 HW_DIGCTL_SCRATCH0 register and switcht to SVC for the actual handling. The old code had a problem in that if the unwinder is called during the IRQ (for example by the watchdog), then __get_sp() will use SPSR_svc to discover the previous mode, switch to it and recover SP. But SPSR_svc is invalid, it should be SPSR_irq but we switch from IRQ to SVC mode. The new code copies SPSR_irq to SPSR_svc in IRQ to fix this problem. It also saves/restore SCRATCH0 in case I one day renable nested interrupts or use SCRATCH0 for other purposes. I also changed the old watchdog code to call UIE directly instead of trying to make the code crash with a SWI. Change-Id: Id87462d410764b019bd2aa9adc71cb917ade32e3
* imx233: slightly rework 3D audio settingAmaury Pouly2016-12-12
| | | | | | | | | The old code made the setting appear as 0dB, 1.5dB, 3dB and 4.5dB when in fact it is 0dB, 3dB, 4.5dB and 6dB. This commit clarifies the code and also fix this at the same time. This imx233 3D enhancement is complete crap anyway but now you can satisfy yourself with 6 dB of pure crap, clearly an enhancement. Change-Id: Ia3e088987c1ff0cdde228905ff70f46476a499a2
* imx233: refactor power off and rebootAmaury Pouly2016-12-12
| | | | | | There is no reason to use different code paths Change-Id: I4894c7963c802b56b5d3576909e1008a7c401935
* imx233: add capability to boot OF or updater instead of RockboxAmaury Pouly2016-12-12
| | | | | | | | | | | | | | | | This commit adds the necessary code in the dualboot stub (bootloader) to let rockbox control the boot process. In particular, rockbox can now choose if the next boot will be normal (boot rockbox or OF on magic key), to OF or to updater. The intents (to be added in follow-up commits) are: 1) Let the user more easily reboot to the OF. On some targets it is not trivial, especially in USB mode. 2) Automatically reboot to updater when the user drop firmware.sb at the root of the drive (currently, the user needs to do that in OF USB mode) 3) Document this OF magic Change-Id: I86df651dec048c318c6a22de74abb8c6b41aa9ad
* HDD16X0/HDD63X0: Enable power status of charging from USB.Szymon Dziok2016-10-02
| | | | Change-Id: I7b1e5e87921ae0770f7783680c3dbcdbf6f257f3
* HDD6330: Implement ATA power on/off.Szymon Dziok2016-09-25
| | | | | | This should fix some errors, panics in some individual cases. Change-Id: I27ce41f0563378e03371724f8b044404c6e69b76
* fix red on stmp<3780Amaury Pouly2016-09-22
| | | | Change-Id: I74f0450e8f42032265b980b95f17b0b05d9dffa5
* imx233: add power-up source to the debug menuAmaury Pouly2016-09-22
| | | | Change-Id: Ib67385354b1d6529d41198bfdcb1ecd092e9b98b
* imx233: make microphone bias, bias pin and resistor configurableAmaury Pouly2016-09-21
| | | | | | | | This clearly fixes recording on targets where the bias pin was wrong. It may also improve recording on targets where the bias voltage was wrong. I was unable to find those parameters on the ZEN Mozaic, which fallback to default values. Change-Id: Ifb5f823c9cbd01f0d9a80fa5d49d93972c8b7cfe
* imx233: fix recording gainAmaury Pouly2016-09-21
| | | | | | | | For some reason, there was a mismatch between the setting (decibel) and the audiohw code (centicel). This resulted in a gain divided by 10. This may explain why some people experienced low volume with the mic on the fuze+. Change-Id: I138ac18dd93c36f43a7dfce735efc826405c598c
* imx233: add alarm value to debug menuAmaury Pouly2016-08-22
| | | | | | Hopefully this can help debugging alarm problems. Change-Id: Id8c5603a6372744dfc62890443a37de2dd92a7c0
* iPod Classic: NOR support for bootloaderCástor Muñoz2016-08-19
| | | | | | | | - NOR driver (based on emCORE) - read/write IM3 images - read 'flsh' files Change-Id: Ie0654e0d298affc0f47ed64b823767118bd1aa3f
* iPod Classic: hardware AES and SHA1 for bootloaderCástor Muñoz2016-08-19
| | | | | | | | | | Based on emCORE. Low level functions that do not depend on Rockbox kernel, intended to be used by the bootloader, dualboot-installer, RB drivers or other .dfu tools. Change-Id: I3c616ded42260c6626bda23b7e580791981df61d
* iPod Classic: SPI driver for bootloaderCástor Muñoz2016-08-19
| | | | | | | | | | Based on emCORE. Low level functions that do not depend on Rockbox kernel, intended to be used by the bootloader, dualboot-installer, RB drivers or other .dfu tools. Change-Id: Iad369627b55bf1778eab437424072f1a653e4db6
* as3525v2: use the new USB DesignWare driverCástor Muñoz2016-08-15
| | | | | | Targets: sansaclipplus, samsaclipv2, sansaclipzip, sansafuzev2. Change-Id: I7773528a4e26707dd33fe9cb8948750d49570701
* iPod Classic: rework on I2C driverCástor Muñoz2016-08-12
| | | | | | | | | | - Some rewrite with the intent to get ride of these random errors appearing on some builds/devices (not much noticeable on RB but can ruin bootloader builds). - Error handling (ACK). - IIC clock increased to be the same as in OF. Change-Id: Idf8cfa3c230a0a61ec9c879bf6f0ea8b061a4607
* iPod Classic: ADC updatesCástor Muñoz2016-08-12
| | | | | | | | Add code to read USB D+/D- and accessory ADCs, it is shown in HW debug menu, might be useful in future for RB and/or the bootloader to identify external USB chargers. Change-Id: Ia48ca5e06bb7ddc52bb55abedde6734653ce8dba
* Increase CVDD1 only for Clip+ version 0Mihail Zenkov2016-08-11
| | | | Change-Id: I839ba2191a5c52ef6f58fd4a273db628b690a05c