summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233
AgeCommit message (Collapse)AuthorFilesLines
12 daysFix yellow from e532714d1fAidan MacDonald1-1/+0
Change-Id: I4f49e93fc1efa78874fb76de6a436ad1fc894cc5
12 dayspcm: Remove unused function pcm_play_dma_get_peak_buffer()Aidan MacDonald1-11/+0
Change-Id: Ifd20fb14a22489cdb99154c01f69809a1e70d0c5
2020-11-12pcm: Further cleanup of unused bits of the PCM ACPI:Solomon Peachy1-6/+0
* pcm_get_bytes_remaining() * pcm_calculate_peaks() * pcm_get_peak_buffer() Nothing in-tree uses these at all (except for the lua plugin wrapper) Change-Id: I971b7beed6760250c8b1ce58f401a601e1e2d585
2020-11-08Fuze+: Fix misplaced rectangle when lcd_flip setMoshe Piekarski1-7/+30
Change-Id: Ic5197d8dffd66cfefdb42242869b48b33aa4d042
2020-10-31pcm: Get rid of pcm_play_pause() and associated APIsSolomon Peachy1-6/+0
Nothing in the core has used it for some time. It's exported to the plugin API but the last plugins to use it were switched to the mixer API back in 2011. This allows us to get rid of pcm_play_dma_pause() from all audio drivers Change-Id: Ic3fa02592316f84963e41d792d1cabb436d1ff6b
2020-10-02imx233: Hardware codec supports up to 192KHz. Make it so!Solomon Peachy2-2/+8
Change-Id: If08a1d244f28092a5d5332d666fb9afdc78f35a9
2020-07-28imx233: rtc: generalize PERSISTENT0 fixMoshe Piekarski1-1/+4
Change-Id: Id8452055534df239dcf5e535943ee918a93ec10c
2020-07-27imx233: rtc: Initialize PERSISTENT0 registerMoshe Piekarski1-0/+1
Prevents the rtc from breaking on power removal Change-Id: I1e434285ccc27d864d2fd9454993d02cae32711d
2020-07-15imx233: rtc: Explicitly clear the soft reset bit when initializingSolomon Peachy1-0/+2
If we come up and the RTC is in a reset state, we need to release that before trying to initialze anything else. (See IMX23RM 23.8.1 and 39.3.10) Change-Id: I1820ab771ba81f7d428d07040b7d188d9f688127
2020-07-05imx233: Fix bootloader link regression caused by cd9906Solomon Peachy1-2/+2
Change-Id: I6341069aa3855a8a3ea9ed021c27aaa742cab698
2020-07-05arm: Fix PortalPlayer linker scripts with binutils 2.21+Solomon Peachy2-2/+2
For reasons that are still unclear, the 'ncbss' region was overlapping the "audiobuffer" when linked with 2.21, but okay with 2.20. Fixed it by making the audiobuffer explcitly use the current position instead of relying on it being implicit. With this change, portalplayer-based targets generate working binaries when built with binutils 2.21 or newer. This bug also theoretically affects imx233/imx31 targets as they also have NOCACHE_BASE games in their linker scripts, but I lack access to one to test with. Change-Id: Idb38ab20f03599b9ed3d4bc0eafe519f38677438
2018-05-25Fuze PLUS Fix lcd_update_rect()William Wilgus1-6/+21
Lcd_update rect was hanging during horizontal screen update x = 238 and width = 2 which was within the bounds of the screen, this seems to be a weird corner case but more testing needs done. Update_rect now properly bounded between 0 - screen w/h --Cleaned up code Pixels in x are now multiples of 4. Datasheet states: ------------------------------------------------------------------------------------------- WORD_LENGTH=0 implies the input frame buffer is RGB 16 bits per pixel. DATA_FORMAT_16_BIT field indicates if the pixels are in RGB 555 or RGB 565 format. Limitations: — BYTE_PACKING_FORMAT [3:0] should be 0x3 or 0xC if there is only one pixel per word. — If there are two pixels per word, BYTE_PACKING_FORMAT [3:0] should be 0xF and H_COUNT will be restricted to be a multiple of 2 pixels. and WORD_LENGTH=3 indicates that the input frame-buffer is RGB 24 bits per pixel (RGB 888). If BYTE_PACKING_FORMAT [3:0] is 0x7, it indicates that there is only one pixel per 32-bit word and there is no restriction on H_COUNT. Limitations: — If BYTE_PACKING_FORMAT [3:0] is 0xF, it indicates that the pixels are packed, i.e. there are 4 pixels in 3 words or 12 bytes. In that case, H_COUNT must be a multiple of 4 pixels. ------------------------------------------------------------------------------------------- We are using 16 bits per pixel and byte_packing = 0xF but device crashes with multiple of 2 pixels Behaviour can be verified with plugin - oscilloscope, Horizontal mode device hangs as indicator reaches right of screen Change-Id: I1445f5334f4e7fe59304c65c76b47d0daa0614b2
2018-04-03Zen XFi2: Enable PluginsSebastian Leonhardt1-2/+0
Keymaps aren't tested, there may be room for improvement. Change-Id: I6b8fe697899b241ea6e96f4fe446d88671ad7818
2017-11-12Imx233 Disable Autoslow only at maximum cpu frequencyWilliam Wilgus1-2/+2
At normal loads: - disabling auto slow boosts performance at the cost of runtime (~ -5%) - disabling at max cpu does not noticibly decrease runtime Change-Id: I5de80201c9a24ce556862151cbd6b21b01708b63
2017-11-04fuzep: fix rdsAmaury Pouly1-3/+10
Change-Id: I15900f638f8f45cb7035a0e7b1caecb62d1d70e8
2017-10-29Add boot data support to rockbox.William Wilgus1-0/+9
Bootdata is a special location in the Firmware marked by a magic header The bootloader is able to copy information to the firmware by locating this struct and passing data to the firmware when it is loaded but before it is actually executed Data is verified by a crc of the bootdata Change-Id: Ib3d78cc0c3a9d47d6fe73be4747a11b7ad6f0a9e
2017-10-28imx233: Implement mutex for cpu_boost_lock/unlockWilliam Wilgus2-0/+34
Playing AAC-HE files resulted in a race condition between audio/codec/buffering for set_cpu_frequency Change-Id: I35e1c1fd18db623e2990c305acdca03f57184d0d
2017-10-26Unify storage threads into oneMichael Sevakis2-113/+81
* Editing a bunch of drivers' thread routines in order to implement a new feature is tedious. * No matter the number of storage drivers, they share one thread. No extra threads needed for CONFIG_STORAGE_MULTI. * Each has an event callback called by the storage thread. * A default callback is provided to fake sleeping in order to trigger idle callbacks. It could also do other default processing. Changes to it will be part of driver code without editing each one. * Drivers may sleep and wake as they please as long as they give a low pulse on their storage bit to ask to go into sleep mode. Idle callback is called on its behalf and driver immediately put into sleep mode. * Drivers may indicate they are to continue receiving events in USB mode, otherwise they receve nothing until disconnect (they do receive SYS_USB_DISCONNECTED no matter what). * Rework a few things to keep the callback implementation sane and maintainable. ata.c was dreadful with all those bools; make it a state machine and easier to follow. Remove last_user_activity; it has no purpose that isn't served by keeping the disk active through last_disk_activity instead. * Even-out stack sizes partly because of a lack of a decent place to define them by driver or SoC or whatever; it doesn't seem too critical to do that anyway. Many are simply too large while at least one isn't really adequate. They may be individually overridden if necessary (figure out where). The thread uses the greatest size demanded. Newer file code is much more frugal with stack space. I barely see use crack 50% after idle callbacks (usually mid-40s). Card insert/eject doesn't demand much. * No forcing of idle callbacks. If it isn't necessary for one or more non-disk storage types, it really isn't any more necessary for disk storage. Besides, it makes the whole thing easier to implement. Change-Id: Id30c284d82a8af66e47f2cfe104c52cbd8aa7215
2017-09-17Don't call touchscreen functions when we don't have a touchscreenAmaury Pouly1-0/+12
Change-Id: Ia8c05f45c289729031d6333445d932bb5ac242ca
2017-09-17imx233: make debug usable with a touchscreenAmaury Pouly1-0/+7
Change-Id: I08a3302024646c0d915aa34855970678730eb44c
2017-09-17zenxfi2: fix touchscreen bugAmaury Pouly1-9/+6
Due to some undocumented behavior, the touchscreen was almost unusable in point mode. Now it's much better but still not very nice to use, probably it needs some filtering. Change-Id: Idc8a0214b09f268e6be907ee6ec3126cc0d88773
2017-08-27zen/zenxfi: always set EMI frequency to 130MHzAmaury Pouly1-4/+7
The ZEN/X-Fi (STMP3700) don't handle memory frequency scaling really well, for this reason we run it at a fixed frequency. That frequency was previously set to 64Mhz because when the CPU run at its lowest frequency, we set the VDD voltage to 0.975 V and on STMP3700, VDDD=VDDDMEM and this is too low to run EMI at 130Mhz. This is not a good solution because under heavy load, running the EMI at 64Mhz results in frame drops and a sluggish device. Thus we now run the EMI at 130Mhz all the time now. To do so, increase the minimum VDD voltage to 1.275 V. This may result is a decreased battery life on those targets but it will also avoid all sorts of glictches and all the device to truly run at full speed. Change-Id: Ia8391492c29fe67bc2701aa7d8cfd00a9df349e8
2017-08-27imx233: fix potential bug in udelayAmaury Pouly1-1/+3
Change-Id: I5c8f5d9917f7a3353862c856bd9bbbbe9b291b1d
2017-08-27zen/zenxfi: increase LCD clock frequencyAmaury Pouly1-1/+1
Change-Id: I157e0d537a1b9d73eda4e18a4a64b10410c6fac4
2017-08-27imx233: update comment about vbusvalidAmaury Pouly1-2/+3
Change-Id: Ice1ece716657fa7f78f69736e5e733e1b7f67b59
2017-08-27zen/zenxfi: fix backlight white flash on backlight onAmaury Pouly1-9/+7
Change-Id: If028a208bd10f46dbe25e4aade085ba7ba13d7be
2017-07-31fix yellowAmaury Pouly1-1/+0
Change-Id: I682e8298aa926c3c9c073b22abdcef7f5dfef9aa
2017-07-31imx233: fix horrible bug in linreg offset calculationAmaury Pouly1-2/+2
This was actually harmless because it was only used for the debug screen. Change-Id: I76e802c947fdefa8df498ecfeb53e4b6ce0e12bb
2017-07-31imx233: don't print stmp3780 debug info on stmp3700Amaury Pouly2-3/+5
Change-Id: Iffad6f39b62af496e6bb5975610807228c2986c7
2017-05-16imx233: fix touchscreen driverAmaury Pouly2-7/+31
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
2017-05-16Samsung YP-Z5: keypad adaption to the new button APILorenzo Miori1-21/+20
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
2017-03-12Do some housekeeping with fat.h and SECTOR_SIZEMichael Sevakis2-2/+1
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
2017-02-11Improve radio RDS driver and frameworkMichael Sevakis1-6/+2
* 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
2017-02-04zen/zenxfi: adjust maximum emi voltageAmaury Pouly1-2/+2
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
2017-02-04zenmozaic: adjust button voltageAmaury Pouly1-1/+1
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 Pouly4-15/+13
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-01-24imx233: remove redundant lines in linker scriptAmaury Pouly2-2/+0
Change-Id: Ief8ab0c33abdd3b36cd94b0578e2c5cad22bf2a6
2017-01-16zen/zenxfi: remove obsolete commentAmaury Pouly1-2/+1
Change-Id: I1e4a726c85a9d87216412162fd0815747eb32cf6
2017-01-16zen/zenxfi: add remark about pinAmaury Pouly1-6/+7
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 Pouly5-5/+311
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 Pouly1-0/+34
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 Pouly1-3/+3
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 Pouly1-0/+4
Change-Id: I204acff8ee697d70fd16f9828010646b10a8f11b
2017-01-14imx233: fix speaker enable/disable codeAmaury Pouly1-1/+1
Change-Id: I6540f2f8ba09bc79b80d71e5f3b0adebd9fce727
2016-12-12imx233: don't print disabled IRQs in debug screenAmaury Pouly1-3/+7
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 Pouly3-4/+21
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 Pouly2-10/+18
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 Pouly1-1/+1
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 Pouly3-19/+22
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 Pouly3-3/+336
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