summaryrefslogtreecommitdiff
path: root/firmware/target/arm
AgeCommit message (Collapse)Author
2017-02-04zenmozaic: adjust button voltageAmaury Pouly
The values were recorded for VDDIO at 3.46V and not 3.5 Change-Id: I12880c3d7336389bbac07fe01b8d63d9cd28d177
2017-02-04imx233: remove weak attribute on some functionsAmaury Pouly
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
2017-02-04nano2g: fix dangerous mutex in hold switchCástor Muñoz
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
2017-01-29i.MX31: Restore screen clearing in DVFS/DPTC debug screenMichael Sevakis
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
2017-01-29Improve imx31 interrupt code for PMIC and GPIOMichael Sevakis
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
2017-01-27sd-as3525v2: simplify logic and cleanupMihail Zenkov
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
2017-01-26Move intrinsic RTC implmentation differences to driver filesMichael Sevakis
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
2017-01-25AMS: Return ascodec to interrupt-based I2C2 driverMichael Sevakis
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
2017-01-24imx233: remove redundant lines in linker scriptAmaury Pouly
Change-Id: Ief8ab0c33abdd3b36cd94b0578e2c5cad22bf2a6
2017-01-21Add CPU mode asserts to kernel on blocking functions.Michael Sevakis
This scourge finds it's way back in far too often. Right now, only defined for ARM. Have fun! Change-Id: Ib21be09ebf71dec10dc652a7a664779251f49644
2017-01-16zen/zenxfi: remove obsolete commentAmaury Pouly
Change-Id: I1e4a726c85a9d87216412162fd0815747eb32cf6
2017-01-16zen/zenxfi: add remark about pinAmaury Pouly
Clearly this pin does not control power so don't call it lcd_power. Change-Id: I9a6794e2606de99cb44dd3e7288b5cce5beb8d0d
2017-01-16imx233: add small framework for LEDAmaury Pouly
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
2017-01-15imx233: workaround hardware dma bugAmaury Pouly
This bug mostly affects the ZEN and ZEN X-Fi and hangs the lcdif dma randomly on boot. Change-Id: I4255db90d87737b7a70d1d53e3ef84e4e14c8c13
2017-01-14imx233: fix audio debug screen on stmp3700Amaury Pouly
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
2017-01-14imx233: add note about power down bits in audiooutAmaury Pouly
Change-Id: I204acff8ee697d70fd16f9828010646b10a8f11b
2017-01-14imx233: fix speaker enable/disable codeAmaury Pouly
Change-Id: I6540f2f8ba09bc79b80d71e5f3b0adebd9fce727
2017-01-13iPod Classic: fix small bug on PCM recordCástor Muñoz
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
2016-12-12imx233: don't print disabled IRQs in debug screenAmaury Pouly
There are lot IRQ and most are unused most of the time, this is annoying on devices with small screens. Change-Id: I7f3453f2768b8e35a5a367fbcf1e4cf3cf73bcd7
2016-12-12imx233: add more icoll statisticsAmaury Pouly
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
2016-12-12imx233: fix IRQ handler w.r.t unwinderAmaury Pouly
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
2016-12-12imx233: slightly rework 3D audio settingAmaury Pouly
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
2016-12-12imx233: refactor power off and rebootAmaury Pouly
There is no reason to use different code paths Change-Id: I4894c7963c802b56b5d3576909e1008a7c401935
2016-12-12imx233: add capability to boot OF or updater instead of RockboxAmaury Pouly
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
2016-10-02HDD16X0/HDD63X0: Enable power status of charging from USB.Szymon Dziok
Change-Id: I7b1e5e87921ae0770f7783680c3dbcdbf6f257f3
2016-09-25HDD6330: Implement ATA power on/off.Szymon Dziok
This should fix some errors, panics in some individual cases. Change-Id: I27ce41f0563378e03371724f8b044404c6e69b76
2016-09-22fix red on stmp<3780Amaury Pouly
Change-Id: I74f0450e8f42032265b980b95f17b0b05d9dffa5
2016-09-22imx233: add power-up source to the debug menuAmaury Pouly
Change-Id: Ib67385354b1d6529d41198bfdcb1ecd092e9b98b
2016-09-21imx233: make microphone bias, bias pin and resistor configurableAmaury Pouly
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
2016-09-21imx233: fix recording gainAmaury Pouly
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
2016-08-22imx233: add alarm value to debug menuAmaury Pouly
Hopefully this can help debugging alarm problems. Change-Id: Id8c5603a6372744dfc62890443a37de2dd92a7c0
2016-08-19iPod Classic: NOR support for bootloaderCástor Muñoz
- NOR driver (based on emCORE) - read/write IM3 images - read 'flsh' files Change-Id: Ie0654e0d298affc0f47ed64b823767118bd1aa3f
2016-08-19iPod Classic: hardware AES and SHA1 for bootloaderCástor Muñoz
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
2016-08-19iPod Classic: SPI driver for bootloaderCástor Muñoz
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
2016-08-15as3525v2: use the new USB DesignWare driverCástor Muñoz
Targets: sansaclipplus, samsaclipv2, sansaclipzip, sansafuzev2. Change-Id: I7773528a4e26707dd33fe9cb8948750d49570701
2016-08-12iPod Classic: rework on I2C driverCástor Muñoz
- 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
2016-08-12iPod Classic: ADC updatesCástor Muñoz
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
2016-08-11Increase CVDD1 only for Clip+ version 0Mihail Zenkov
Change-Id: I839ba2191a5c52ef6f58fd4a273db628b690a05c
2016-08-10Increase CVDD1 for Clip+ to prevent ATA errorMihail Zenkov
Change-Id: I0424d02196a6c5fb6d0185b007df5ece24b10b82
2016-08-02iPod Nano 2G: use the new USB DesignWare driverCástor Muñoz
Change-Id: I8d1561bf4e239b55617a8d5075457a668e0c312c
2016-08-02iPod Classic: use the new USB DesignWare driverCástor Muñoz
Change-Id: I36aabb5cb9cfe2d8c4f8fbcea944efec58ef9671
2016-08-02Introduce new USB driver for Synopsys DesignWare USB OTG core.Cástor Muñoz
Based on g#844 and g#949, it is intended as a replacement for the current s3c6400x USB driver. The DesignWare USB OTG core is integrated into many SoC's, however HW core version and capabilities (mainly DMA mode, Tx FIFO mode, FIFO size and number of available IN/OUT endpoins) may differ: CPU targets HW ver DMA NPTX FIFO FIFO sz #IN/OUT -------- ------------- ------ --- --------- ------- ------- as3525v2 sansaclipplus 2.60a Yes Dedicated 0x535 4/4 sansaclipv2 sansaclipzip sansafuzev2 s5l8701 ipodnano2g 2.20a Yes Shared 0x500 4/5 s5l8702 ipod6g 2.60a Yes Dedicated 0x820 7/7 ipodnano3g s5l8720 ipodnano4g ? ? ? ? ? Functionality supported by this driver: - Device mode, compatible with USB 1.1/2.0 hosts. - Shared FIFO (USB_DW_SHARED_FIFO) or dedicated FIFOs. - No DMA (USB_DW_ARCH_SLAVE) or internal DMA mode. - Concurrent transfers: control, bulk (usb_storage, usb_serial) and interrupt (usb_hid). Actually this driver is not used by any CPU, it will be enabled for each individual CPU/target in next patches. Change-Id: I74a1e836d18927a31f6977d71115fb442477dd5f
2016-06-12zenxfi3: recalibrate battery curveAmaury Pouly
Apparently I simply forgot to calibrate it when the port was done and the current values are just plain wrong, especially for the charging curve. Change-Id: Ied3cafa52f31f182f953714e28edc4c5e891255f
2016-06-10iPod Nano2G: clear external interrupts at startupCástor Muñoz
Fixes some ROLO issues after commit 9a4cd2e. Note that other ROLO issues still persist. Change-Id: I8e0c60519902013694c5a473dcb9fc62a6ff079c
2016-06-08imx233: fix power off codeAmaury Pouly
There are two very suspicious things in the power off code: - it does not properly unlock the power register, so it should fail (!) - it does not disable sw/hw watchdog so if register fails, the device will most probably crash horribly because of the watchdog I don't even understand how it worked before. Change-Id: I9f3f94bd012e52c3b50cd5b658d68b5eb907f79b
2016-06-01fix yellowAmaury Pouly
Change-Id: Ie18d7f83ba3e7293d4cd110429e1578930d35d99
2016-06-01imx233: fix stupid typo in debug screenAmaury Pouly
Change-Id: Ife43543d6eee6522f4016f37479a20a0db39240d
2016-06-01zenxfi3: rewrite mpr121 driverAmaury Pouly
The new driver uses an asynchronous architecture for touch status reading. Change-Id: Ic75a8b91bc47ee16c3af873afde178cd70186376
2016-06-01fuze+: rewrite touchpad driverAmaury Pouly
The old driver was bad in many respect, it had some race conditions, it was using a thread to serialize transfers because of the legacy i2c interface. It also had huge latency (typically 50ms but delays up to 300ms can happen), thus some presses were missed. The new driver takes advantage of the new i2c driver to do everything asynchronously. It also does not need a thread anymore because queueing ensures proper serialization. It provides much better and reliable latency (typically ~2ms). Also fix the debug screen which was horribly broken. The new screen also displays the deadzones. Change-Id: I69b7f99b75053e6b1d3d56beb4453c004fd2076e
2016-06-01imx233: rewrite i2c driverAmaury Pouly
The new driver provides several new features: - asynchronous transfer - transactions (several transfers executed at once) - queueing The style still provides the legacy interface. Change-Id: I6d8ecc89d1f7057847c9b2dc69b76cd45c9c8407