Commit graph

9870 commits

Author SHA1 Message Date
Amaury Pouly
3d1666042e imx233/system: don't do frequency management on < stmp3780, it's not working
Change-Id: Ie9ff5122f1cb4fe3809bb4c6b88ef0cfc353e0e1
2013-10-22 00:16:22 +02:00
Amaury Pouly
151fa30257 imx233/sdmmc: add write protect pin config
The setting is currently unused but it provides some documentation and basic
support for a more comprehensive implementation of read-only support.

Change-Id: I353c33ef765ef6e6c09d59e943da6654a311ad84
2013-10-22 00:14:24 +02:00
Amaury Pouly
17851f742e imx233/audio: workaround unused variable
The exact combination on which recording is needed is too complicated, so
just always cancel the unused warning, the compiler will optimise it away.

Change-Id: I0946586e4b01769c98babc4616f893c38f44c05f
2013-10-22 00:07:50 +02:00
Amaury Pouly
7d62a78af4 imx233: extend partition window support to be more generic
The new code can select among several types of window (user, system, ...).
Furthermore, the type of partitions to use is selectable in config file.
Currently, two types are support: Freescale style MBR and Creative MBLK

Change-Id: I969d60a3d08f2c9448fb4b9c440051b7801b94cd
2013-10-22 00:07:07 +02:00
Amaury Pouly
5c7167c79c imx233/i2c: relax timeout
Change-Id: Ie9cf8c8bb0a89d9cbcc795e04559864b9fbaf639
2013-10-22 00:02:05 +02:00
Amaury Pouly
15dc944694 imx233: add package defines
Currently we only support the BGA169 but if by chance Rockbox was to run on
a lqfp package for example, some pins may becomes unavailable or different.

Change-Id: I5c0d8d57ae31604572af37e0c2edd0bd7bda73a3
2013-10-21 23:56:24 +02:00
Amaury Pouly
0463bf4cb2 tea5760uk: properly power up the tuner during detect
The old was doing register read/writes without calling tuner_power(), this
is broken for target with real tuner power management.

Change-Id: I5e60234697a8b91de6189daf6a10e871d5119b65
2013-10-21 23:54:04 +02:00
Amaury Pouly
9bdf24a4fe tea5760uk: add support for TEA5761UK
They share most of registers (except test and some extra bits), since our
driver is very basic, it is safe to relax the manufacurer & chip id check.

Change-Id: If54e8b9e0d852cd9128d5e28ff59bd2c7a55d98d
2013-10-21 23:52:40 +02:00
Amaury Pouly
71c5a52add imx233: fix power irq storm
When bootloader is too intelligent, like on Creative devices, it might leave
some unexpected IRQs sources on, this is problematic when those sources share
the same IRQ line.

Change-Id: Ie9333918eb1048b1f2de4ea738cddf556aa75ee2
2013-10-21 01:23:14 +02:00
Amaury Pouly
898b760e59 imx233: fix audioout on stmp3700
Strangely enough, only stmp3780 and stmp3600 have speaker control

Change-Id: Icec1ed4b7e80e8b3787a3d08b32695551b58aeb9
2013-10-21 01:23:14 +02:00
Amaury Pouly
28669ca0fd fuze+: fix typo
Change-Id: I0b86d5cadeb5b792dbdd71ea1e25230a6643afdf
2013-10-21 01:23:14 +02:00
Amaury Pouly
46416c619d imx233: fix usb_detect() to be consistent with vbus detection
The STMP3700 has unreliable vbusvalid irq so we need to use
vdd5gtvddio. Therefore, using the vbusvalid bit produces
inconsistent results between events and detect. Fix that
by making power handle all the usb detect stuff.

Change-Id: Ic521b2f6677602e184fe46352c5359f4b4ba8d56
2013-10-21 01:23:14 +02:00
Amaury Pouly
187017bad1 imx233: simplify sd/mmc code
Change-Id: I7e36b4c1c91540a2ae383109e440818bc610dde6
2013-10-21 01:23:13 +02:00
Amaury Pouly
5b3eaf6f5b imx233/i2c: use 1sec timeout by default instead of blocking
These functions are mostly used by the radio drivers and any blocking
call could potentially block the entire UI, which is pretty bad.
Since any request is expected to finish within a few us, having a 10ms
timeout doesn't seem unreasonable.

Change-Id: I03b19729511547e5bbdeb3476d020e5d87d0d7e1
2013-10-21 01:23:13 +02:00
Amaury Pouly
6006eb59b1 imx233/i2c: always reset the i2c block on timeout
On targets like stmp3700, resetting the dma channel on "soft" timeout
drives the whole block crazy unless it goes through complete reset.

Change-Id: I830b252279989bf9f9cd9c138240a6ea9b003527
2013-10-21 01:23:13 +02:00
Frank Gevaerts
4ead0344c6 Disable LCD_FLIP and MORSE_INPUT on recorder to make it build.
Disabling these two settings makes the image small enough to build again.
This build has been broken for long enough without any better solution
actually being worked on, so I think this is much better than nothing.

Change-Id: I77c34c1e714fb6e132ed0ce39f0917779efe1125
2013-10-18 22:56:49 +02:00
Lorenzo Miori
9a8ed6ba35 Simulator for Samsung YP-R0
Enable simulator for the target ypr0 to
be built and used.

Change-Id: I1b080f07ab90f5c4856881d08ad70e1053bbb0c0
Reviewed-on: http://gerrit.rockbox.org/618
Reviewed-by: Frank Gevaerts <frank@gevaerts.be>
2013-09-29 14:15:48 +02:00
Lorenzo Miori
c300c1b58d screendump.c: use HOME_DIR instead of the hard-coded "" (root)
This adds the support for hosted or other
particular platforms, where the "root" ("home")
path is NOT "/" (or "").
The change affects screendump in particular.

Change-Id: I4c218d102fe12cc782aedb99d456e9f72679ea07
Reviewed-on: http://gerrit.rockbox.org/613
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
2013-09-27 09:21:05 +02:00
Amaury Pouly
4c6c8cd1aa fuze+/zenxfi2: make sure pixclk is running before initialising lcdif
Change-Id: I50b2376d5f6dcf4dde994b533e0b946589a737e8
2013-09-26 22:54:29 +02:00
Amaury Pouly
120701646f imx233: always start SSPCLK before ungating the spp blocks
This should fix some boot hang issues which appeared at random.

Change-Id: I5430690a61c042b45ed26b58f485a1cc5d82987f
2013-09-26 20:12:42 +02:00
Amaury Pouly
0897794f44 sonynwz: fix time handling
Be consistent with the OF and use RTC PERSISTENT2 as offset

Change-Id: Ic8b970cbc4096d1f4efa0380a3af51c93484fe58
2013-09-26 17:01:44 +02:00
Amaury Pouly
94f2bc7473 sonynwze360: fix color swap
I found the BGR bits in the lcd registers by trival and error.

Change-Id: Ib263611e827e8671a0128242b947d76911bd9f47
2013-09-26 16:41:57 +02:00
Amaury Pouly
f37f3393c9 sonynwze370: fix simulator
Change-Id: I23cd8ce8549119868011e2a05341f3cb6335fad6
2013-09-26 13:22:45 +02:00
Amaury Pouly
ddf56a102b sonynwze360: fix simulator
Change-Id: Ib63d5aceeafb1078013599616cb6dcec3a2b8598
2013-09-25 18:22:26 +02:00
Amaury Pouly
e41d2ba02b imx233: only clear got_a_nak on imx233, it doesn't exists on other stmps
Change-Id: I88e369dd7fa289f054837b442983bb7c97a58c53
2013-09-25 16:36:41 +02:00
Amaury Pouly
9392d036c4 Initial commit for the sony NWZ-E360 and NWZ-E370
Change-Id: I52d21e136a98eaf481615d641795cf7ecf325465
2013-09-25 14:31:39 +02:00
Amaury Pouly
b181c4963e fix whitespace
Change-Id: I569dba9c172ec3927cf8a26ee4e58e189addc728
2013-09-25 14:31:39 +02:00
Amaury Pouly
5909438193 imx233: improve button lradc driver
The driver can now handle HOLD in several ways, including using a GPIO.
Also add a debug routine to read the raw value of the adc.

Change-Id: Ide2cb1ac58e759b4bc464e606b432f2c150ee36f
2013-09-25 14:31:39 +02:00
Amaury Pouly
2f5f2ba91d imx233: always boost in bootloader
Many imx233 targets boot in a very low performance mode, typically cpu and
dram at 24MHz. This results in very slow boots and very unstable USB
bootloader mode. Since cpu frequency scaling is disabled in bootloader in
rockbox, always make the frequency scaling code available and boost at boot
time.

Change-Id: Ie96623c00f7c4cd9a377b84dcb14b772558cfa4d
2013-09-25 14:31:39 +02:00
Jean-Louis Biasini
89afa32584 fuze+: fix volume bottom limit
Even with volume at minimal fuze+ was still playing sound pretty loud.
this fix it.

Change-Id: I5b18e9c39ced240eebb0457c433b0ca150668860
Reviewed-on: http://gerrit.rockbox.org/621
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2013-09-18 23:09:44 +02:00
Amaury Pouly
b4c1bb0214 imx233: fix block reset code
Change-Id: I5fbc76315a651c91b278e1c7dc6cb49b7e00d9ad
2013-09-18 13:17:19 +02:00
Amaury Pouly
90007da3e9 imx233: implement mmc card info
This one is a bit strange: our codebase just don't use it if there is both
SD and MMC, so this missing function got unnoticed so far.

Change-Id: Ifea4bb5140477b7637d033737594259cc44fb10e
2013-09-07 00:53:21 +02:00
Amaury Pouly
070e27933c imx233: fix red when target cannot record
Change-Id: Ia5f6b290da2f645021ef8becdfbac7436407ec0b
2013-09-07 00:52:36 +02:00
Amaury Pouly
a1e557bbdd imx233: fix horrible sd/mmc bug
The wrong variable was used to enumerate mmc drives. Also fix incorrect
function prototype.

Change-Id: Idd8dca7685bbc2bc4744b7b29e948f0ca2f56cc9
2013-09-06 18:22:34 +02:00
Amaury Pouly
4be366f4b0 cosmetics
Change-Id: Ia2b334ad9dd3f465ad5024e6fc226cb3e60a6e45
2013-09-06 18:22:02 +02:00
Amaury Pouly
74ed592b39 imx233: fix lcdif (don't send anything on empty buffer)
Change-Id: Ic39b2117b24d84452bb6f7b9c410b1cf55066b6d
2013-09-06 18:21:35 +02:00
Amaury Pouly
164876eaf1 imx233: fix i2c issues
The i2c core has some bugs: it locks up when the slave doesn't NAK and
prevent the dma channel from being resetted. Specifically handle this
situation by setting CLR_GOT_A_NAK (workaround) and then reset dma and i2c
block.

Change-Id: I0e09d38d4301a0ad42dfad785cc934b43f2c4485
2013-09-06 18:19:09 +02:00
Amaury Pouly
f13cad4c8e imx233: cleanup lradc button driver
Change-Id: I85fbe6807a1f91ae5be97b6847c07b24a4f18c24
2013-09-05 23:16:19 +02:00
Amaury Pouly
1ac762aebb fix red
Change-Id: I9eb83aaffa93636d5e601132efdfbb85340a665d
2013-09-05 20:50:51 +02:00
Amaury Pouly
1165a08823 fix red
Change-Id: Ibca5879553a87e77014f850308d9b54cc339d474
2013-09-05 20:35:51 +02:00
Jean-Louis Biasini
df6eb82f51 touch devices: Disable touch on softlock.
Target that have a touchpad/touchscreen should disable it while
being locked (In order to avoid LCD to drain battery power due to
"key locked" constant reporting messages. If they a have a keylock
button this was already handled at driver level. If not (e.g. fuze+),
they will have to implement a switch at driver level that action.c
can operate on softlock.
This patch does the following for any target having a touchpad
or a touchscreen and no HAS_BUTTON_HOLD (ie any softlock target)
1) it implements the code to call button_enable_touch(bool en) in
action.c.
2) button_enable_touch is implemented in button.c and call
either touchpad_enable or touchscreen_enable
3) those two function are implemented respectively in touchscreen.c
and a new touchpad.c file. They provide a generic way to silents touch's
device and call a function at driver level where target specific code
can be implemented if possible/needed (for power saving for instance).
Those function name are touchpad_enable_device and touchscreen_enable_device
4) we implement an empty function at driver level of targets that need it
to have them still being able to compiled.

Change-Id: I9ead78a25bd33466a8533f5b9f259b395cb5ce49
Reviewed-on: http://gerrit.rockbox.org/569
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2013-09-05 20:02:07 +02:00
Amaury Pouly
b63b330775 imx233: revert sd card high speed (unstable)
Change-Id: I3d6a20de4ea1ca0d0150e6b4fc6af849eda0f4ab
2013-08-22 23:46:29 +02:00
Amaury Pouly
92725394eb imx233: always set VDDIO to 3.3V
On some device like Creative Zen X-Fi2 it is set to 3.1V on boot.

Change-Id: I1f9e407eb321c31b3109b7fed07862400073b54f
2013-08-22 23:44:15 +02:00
Amaury Pouly
96125e84f1 imx233: disable half fets on boot
This might cause freeze if the power supply is not able to cope
with the demand

Change-Id: I231142327fcad2096c18d3c8872ac8b6ee24f69c
2013-08-22 23:43:25 +02:00
Amaury Pouly
fb35f06bf5 imx233: rework emi frequency scaling
Drop most of the cases: only keep 64 MHz and 133 MHz. Pick values
from the manual which seem to match real life values.

Change-Id: I912752fbe372f9f44207db6853d0ff92fd619bed
2013-08-22 23:42:26 +02:00
Amaury Pouly
902306378e imx233: add support for 50MHz clock with SD cards
Now that the drive strength problem has been fixed, we can safely
drive sd cards at 48MHz in HS mode to get the best possible
transfer speed at 3.3V.

Change-Id: I0291589c399fb4880deba97895ff578451a32f99
2013-08-21 20:18:36 +02:00
Amaury Pouly
96d355abba imx233: fix drive strength for sd/mmc
At high speed, we need a drive strength of 8mA on the clock line
to get stable transfers.

Change-Id: Ida668db10cd3e10ad5740e35fd973f2fa394edb2
2013-08-21 20:18:36 +02:00
Amaury Pouly
462adf2a0f imx233: always keep cards in TRAN mode
Instead of going back and forth between TRAN and STBY modes,
stay in TRAN mode all the time, this avoid two commands on each
read/write and a potential delay to wait for the card.

Change-Id: Iafd456ab9a581d870331b622eeb48dcc254eda7f
2013-08-21 20:18:36 +02:00
Amaury Pouly
e90a5efe54 imx233: add support for CMD23 in sd/mmc
This allows tells the card the number of blocks that will be
transfered. This is usually faster than continuous read/write.
It is mandatory for MMC and on SD cards, support is probed.

Change-Id: Ide3f97c26c2b714390884c69e05b00c2caa552f8
2013-08-21 20:18:36 +02:00
Amaury Pouly
9a58721974 imx233: rework yield management for wait state, didn't make sense
Change-Id: I5ecb1afb5461018c2c9675d5f4ee1c6e4ded636d
2013-08-21 20:18:36 +02:00