Commit graph

32332 commits

Author SHA1 Message Date
Amaury Pouly
cefaa46573 zenxfistyle: add simulator bitmap and button map
Change-Id: I68a107887e6b1563b6c5ab425e98be7e012e7976
2014-02-16 22:10:22 +01:00
Amaury Pouly
db392245e2 imx233: rework interrupt nesting, disabled for now
Rework the irq code, to put more code in the C part. When interrupt
nesting is enable, Rockbox gets pretty unstable so disable it for now.

Change-Id: Iee18b539c80ea408273f6082975faaa87d3ee1b6
2014-02-16 20:53:08 +01:00
Amaury Pouly
556fa2c4cd zenxfistyle: implement speaker support
Change-Id: If59aaacdea9f57932464a1615f2b80e410ec50dc
2014-02-16 20:53:08 +01:00
Amaury Pouly
f0f1758067 zenxfi2: implement headphones detection
Change-Id: Ifbc8b10cebb3b7b126f1d6a212f6731f91e234e4
2014-02-16 20:53:08 +01:00
Amaury Pouly
6b3c29da69 zenxfi2: add speaker support
Change-Id: I37b85e23e6af92939700d640dbea74c646f49b7b
2014-02-16 20:53:08 +01:00
Amaury Pouly
812c3e7c48 imx233: add support for speaker on stmp3780
Change-Id: I990ca2bd43e12047e257f85ff06f046dfa3f94b3
2014-02-16 20:53:08 +01:00
Amaury Pouly
17abb10c64 zenxfi: enable lcd shutdown in bootloader
Change-Id: Ie7387b6dbd58565611b58af7bbba092dd58bdbd5
2014-02-16 20:53:08 +01:00
Amaury Pouly
3d852bc1bf imx233: avoid overlapping text in debug
Change-Id: I9cb456ab60c0d05f202791ed8114a80d2819c399
2014-02-16 20:53:08 +01:00
Marcin Bukat
101d10ff6c atj213x: rework crt0.S in test code
Rework init code so relocation is safe for binaries linked
into cached unmapped KSEG0 region.

Change-Id: I705ee3f0334f8998237f249a2c3059d6dbe78a43
2014-02-14 08:37:01 +01:00
Marcin Bukat
44afbd3ac2 regtools: Add rk27xx register description file
Change-Id: I27101876d031cbcbb00e741ea742a6f64a7baad7
2014-02-13 21:55:43 +01:00
Jonathan Gordon
4b1221d556 fix red, strtok_r being annoying on sim builds
Change-Id: Ifb884a53d801db9534dd0c5ab5921800e971963e
2014-02-13 22:24:29 +11:00
Jonathan Gordon
6dbfd44b6e main_menu_config: New plugin to configur the main menu order
Plugins/Applications/main_menu_config allows you to edit the
main menu order without having to manually edit config.cfg.

Press the standard OK button to access the internal menu
which allows you to move items up/down in the order and toggle
their visibility. Exit via this menu to have the order saved.

(Suggestions welcome to improve this UI)

Change-Id: I59715ef1ca265aeb6f9666ef27026bc1093f2579
2014-02-13 22:11:23 +11:00
Amaury Pouly
1210de217e regtools/qeditor: fix crash when hwstub device fails to open
Change-Id: Ica2fd201f2ae8ee63b1ae81f27433c841d2f22cd
2014-02-13 11:51:48 +01:00
Amaury Pouly
c35e4a4b7d Fix red
Change-Id: Ib64eb3539e33d4336c298612b4508c4611b80c9e
2014-02-12 13:14:02 +01:00
Jeremy Goodwin
0f72c73b5b FS#12949 - Diff to fill in incomplete Russian translation items.
Change-Id: I8f53d8811a3c6ee6507f1a81e3b007073909ca38
2014-02-11 20:52:28 +01:00
Amaury Pouly
5172d66399 imx233: cleanup in sdmmc
Change-Id: I82eac65b1bf9f2e963c4ebfb7c22da678ae63642
2014-02-11 19:09:51 +01:00
Marcin Bukat
2b02cbe1cc imx233: fix app.lds to properly support INIT_ATTR
Change-Id: I1a917511e7e1540856815c77c4d996d1b8a03606
Reviewed-on: http://gerrit.rockbox.org/725
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-02-10 23:48:21 +01:00
Amaury Pouly
04fc97b362 regtools/qeditor: implement UI code to write registers
The UI now has a "read-only" check box to prevent accidently changes: once
unchecked, the UI can do write to register (only full register writes are
supported for now). If the register supports it, the UI provides SCT writes
as well. The display register panel was moved to its own class to cleanup
things a bit.

Change-Id: I0fc6aab3b351f9080076102ee6fad0037ab5353b
2014-02-10 23:14:27 +01:00
Amaury Pouly
6e132b48d5 regtools/qeditor: enhance backend write with write mode (SCT)
Change-Id: I723bce7a60fb08c1d1d5f894a225c36bc1ba4394
2014-02-10 23:14:27 +01:00
Amaury Pouly
68163e8f49 imx233: don"t be smart when waiting for voltage stabilisation
Unfortunately the hardware is not very helpful when changing voltage: in DCDC
mode we have the DC_OK_IRQ but in linear regulator mode, the only available
bit doesn't work when lowering the voltages. At the moment, simply sleep for a
little while before a better solution is found.

Change-Id: I89335873e9e42e5c6e9131f40db7839b008c021c
2014-02-10 23:14:27 +01:00
Amaury Pouly
e1003b1536 zen/bootloader: power down the LCD at the end of the bootloader if needed
On the ZEN, the LCD is fed continuously by the DMA and this refresh needs to
be stop when the bootloader gives control to the firmware, otherwise the DMA
will source data from invalid region and it might even lock-up if the new
code touches the memory setup. Work around this by properly stopping the LCD
driver: the bootloader assumes that if the target defines HAVE_LCD_ENABLE
in bootloader build (which is unusual) then it needs to stop the LCD. Since
stopping the LCD could produce funny screens, power down backlight
which is expected to power down the LCD too, giving a nice black screen
instead of some random pixels.

Change-Id: I7ce5ba9bfd08e596907c4ff8f80feb189f0576ce
2014-02-10 23:14:27 +01:00
Amaury Pouly
935c0ad14a imx233: stop the watchdog before loading main firmware
Change-Id: I0a13444d6788a09b0fc04ed1a5115cb2e5fe6f57
2014-02-10 23:14:26 +01:00
Amaury Pouly
34fb6906dd imx233: preventive fix of timrot
The old could trigger an immediate IRQ if for example the count was 0
when setting up the timer: since the count was updared *after* clearing the
IRQ, it could fire in between.

Change-Id: I0357b201655bc0e56425ffb249ca807525f30217
2014-02-10 23:14:26 +01:00
Amaury Pouly
619f7fba93 zen: enable dma channel after lcdif init
Change-Id: I8886698ed618f9724df2f46d71f36b7443bc821b
2014-02-10 23:14:26 +01:00
Amaury Pouly
0d5b061ecc zen: workaround errata on imx233 lcdif
Change-Id: I9d723aa13628e4ab38ee7f648c1923b9e7101d22
2014-02-10 23:14:26 +01:00
Amaury Pouly
b8bad8412f regtools/qeditor: clean-up
Free the backend when closing a tab to release some memory. Implement about
dialogs.

Change-Id: Ic8c500a23d38e6c3dd4de6a4ba862012925968be
2014-02-10 23:14:26 +01:00
Amaury Pouly
a66a5af4db regtools/qeditor: prepare support for register writing
Change-Id: Ifef36a3ddb1604db63ec974da2d6a77a5540ff42
2014-02-10 23:14:26 +01:00
Amaury Pouly
3d07706c05 regtools/qeditor: rewrite soc handling
The code was a mess with respect to soc handling: some code just plain copied
the SoC descriptor which are big objects, some was using indexes. The new soc
factor out everything in a few classes which hide these ugly details so that
descriptors are never copied.

Change-Id: I17af8b47f997a528b58221621389d42d24fded93
2014-02-10 23:14:26 +01:00
Amaury Pouly
8358707d82 hwstub/regtools/qeditor: put soc descriptors in a list instead of a vector
A SoC descriptor is not a small object: it can be as large as ~100KiB so
it's better to avoid copying things over.

Change-Id: I1ef862e1260299cdaa0c4d2822ac45968713498a
2014-02-10 23:14:26 +01:00
Amaury Pouly
1f4f7369ee imx233: add support for sd/mmc probing
zenxfi2: add support for internal storage on the SD version

The code can now skip devices marked as PROBE if they fail to init, thus
making it possible to handle various kinds of internal storages. The current
code probably doesn't interplay nicely since it acquires pins and never
release them so it will probably break NAND code when it's ready but NAND code
is not ready yet anyway.

Change-Id: I4cb962de4215661e521743a3f511445dbbf28673
2014-02-10 23:14:26 +01:00
Amaury Pouly
f982ea6398 utils/regtools: slight rework of tab management in qeditor
Change-Id: Iaf41defb79bb76010f3ff5269c28e4bad991ebc3
2014-02-10 23:14:26 +01:00
Amaury Pouly
c043ecf9e1 imx233: rework early time power init
The current code does hazardous tweaks to the power subsystem: indeed if one
boots with USB plugged and some stub powers on the DCDC switch, it will fail.
Indeed, a hardware bug prevents from going back to linear regulators (see
errata) so we cannot expect to reach a known state (linreg on, dcdc off)
on each configuration and in particular, powering down the 4p2 rail in
such a configuration will result in a power brownout.
This commit works around this issue by not touching the initial power
configuration until USB is (un)plugged, which are the best spots to get
known states.

Change-Id: I8741a3995df8ae61ca1c887a3ecb7903d0ac5136
2014-02-10 23:14:25 +01:00
Amaury Pouly
61dbeb60b7 mkimxboot: don't forget to select LRADC source before reading
Change-Id: I3435857f48580d7b3bf9363a2eed96738fbda69a
2014-02-10 23:14:25 +01:00
Amaury Pouly
cf99d48ab7 Fix typo
Change-Id: Ib9d569886abf66a23f6569b6b44acf155a65009d
2014-02-10 23:14:25 +01:00
Amaury Pouly
db5d74503e imx233: add button debug screen
Change-Id: Iab85f1215a06507c06bffb746f2eac596e8c7992
2014-02-10 23:14:25 +01:00
Amaury Pouly
65d5c426a7 imx233: fix typos
Change-Id: If5bc0f09dc0b3b1e833e41bbbdd216002e37d147
2014-02-10 23:14:25 +01:00
Amaury Pouly
965c268e5f imx233: handle jack detect inversion on some devices
Change-Id: I6e8644d8dc410f275c7c7580fa9bcbd2fa26a041
2014-02-10 23:14:25 +01:00
Amaury Pouly
0324bf59a8 imx233: make button-lradc drive able to handle VDDIO derived values
In most devices, the button ladder is not actually derived from VDDIO but
from a constant voltage source, making it very easy to read it. However on
some devices like ther ZEN X-Fi Style, the ladder is wired to VDDIO we
can be changed so it's crucial that the button driver correctly scales the
values wrt VDDIO.

Change-Id: Ifc11abe2838fa7d16d0d60ecd96964a8dc5ea6d7
2014-02-10 23:14:25 +01:00
Amaury Pouly
0e0c610df0 utils/regtools: make qeditor able to poke directly at a hwstub device
This commit add the very handy feature of being able to read registers
directly from a device using hwstub. This is mostly trivial using the hwstub
library and the biggest change here is actually:
- being able to read registers by name and/or addresses
- being able to enumerate devives
The UI code currently doesn't handle hotplug but the backend does so it should
be trivial to add in the future. It also opens up the possibility the write
registers from hwstub or save the register values to a file.
Since it relies on both hwstub and libusb, a switch has been introduced in
qmake to disable it (use -config nohwstub).

Change-Id: I5d7d7a2a7c97ecd7407227357c8553c2773ea6cc
2014-02-10 23:14:25 +01:00
Amaury Pouly
81dfed27cf utils/hwstub: make stmp stub able to load in a MMU'ed environement
In might be useful to load hwstub in an environment with the MMU active,
in which case care must be taken on the order in which things are done.
Mostly, one should not disable the MMU before moving stuff around. The code
assumes the linking address (0 currently) is identity mapped.

Change-Id: I8d54ce9e8cadcde2e08990353ca7a46803731ca7
2014-02-10 23:14:25 +01:00
Amaury Pouly
c17d30f204 utils/hwstub: completely rework the protocol, drop unused features
The protocol has evolved a lot during the 2.x.y lifetime, bringing more
features which later got unused. This commit removes all the unused stuff
and simplifies everything:
- drop the feature mask: everything is mandatory or stalled on error
- remove the info request and put all static information in standard USB
  descriptors which are part of the configuration descriptor (and can be
  retrieved using the standard GetDescriptor request).
- remove the USB interface, we had only one anyway
- remove all endpoint descriptors
- remove the exit/atexit stuff, it never worked as intended anyway
- update the hwstub library and make it able to handle any device
- update the tools (mostly renaming and removing of code)

Change-Id: I1872bba7f4177fc3891180e8f944aab88f5bde31
2014-02-10 23:14:24 +01:00
Amaury Pouly
6d64111b3c imx233: add hardware and software watchdog
The hardware watchdog automatically shutdown the device after 10s of
inactivity, being defined as 10s without the tick IRQ fired (aka braindead
device).
The software IRQ mechanism is more interesting: it uses a very high priority
timer setup as one-shot to trigger after 5s of inactivity (but IRQ still
enabled). When detected, it patches the running code to insert a SWI
instruction so that on interrupt return it will trigger a SWI and produce
a meaningfull backtrace to debug the deadlock. This should allow to debug
freezes in IRQ context.

Change-Id: Ic55dad01201676bfb6dd79e78e535c6707cb88e6
2014-02-10 23:14:24 +01:00
Amaury Pouly
1a06292e41 imx233: increase audio DAC IRQ priority
This should hopefully fix some audio glitches

Change-Id: Ic9701d281e7559c9d93fcb8dad9373caaad9bfb6
2014-02-10 23:14:24 +01:00
Amaury Pouly
91a8cd1ae9 imx233: add code to debug menu to check nested IRQ actually work
Change-Id: I6b51e89222efa868c03944fc37bcc9f382853be1
2014-02-10 23:14:24 +01:00
Amaury Pouly
f7efa925fd imx233: add support for nested IRQ
Rewrite IRQ handling to allow nested IRQs: on each IRQ entry, we save the
parameters on the (IRQ) stack and then switch to SVC mode (with its own
stack) and renable interrupts. Make sure interrupt is properly acknowledged
by using the read side-effect (RSE) mode and handle priority levels as well.

Change-Id: I3fd68289b430c56bdd256868939238ff268e42b4
2014-02-10 23:14:24 +01:00
Amaury Pouly
cefaabfe9d imx233: cleanup icoll and add software irq sources
Change-Id: I4cf2b0b74cf391021afaec08329ec7cf5dbd578d
2014-02-10 23:14:24 +01:00
Amaury Pouly
55877f442a imx233: always disable watchdog on boot
Change-Id: I2e81b038b783968aa18ef3398d6e2aa66a2fee7c
2014-02-10 23:14:24 +01:00
Amaury Pouly
0ba4c3b078 imx233: enhance icoll with priority and soft IRQ
Change-Id: If9568ab6e11bf933b2cc607e5a86866a975886bc
2014-02-10 23:14:24 +01:00
Amaury Pouly
ab5dfd55aa imx233: add timrot to debug menu
Change-Id: Id60fcd64d509445d4ab62c4a2a8f2a074727c31d
2014-02-10 23:14:24 +01:00
Amaury Pouly
4495913c28 imx233: clean timrot a bit
Change-Id: Ic803a6b5c93978cd3246e553579ac8a1ba35e191
2014-02-10 23:14:23 +01:00