Commit graph

55 commits

Author SHA1 Message Date
Bertrik Sikken
f57e5a2ae3 AMSv1/AMSv2: show CCU_IO in debug menu
Change-Id: I8ee9d464a6a3aebc21b60ac88e1b3833dca48885
2012-01-29 15:05:05 +01:00
Rafaël Carré
8552824284 ascodec-target.h: remove
move prototypes to ascodec.h
move code to ascodec*.c

YPR0: use adc-as3514.c instead of duplicating it

TODO: merge as3514.h and ascodec.h ?

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31626 a1c6a512-1295-4272-9138-f99709370657
2012-01-08 01:43:16 +00:00
Rafaël Carré
606155cd20 as3525: move debug-target.h content to .c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31572 a1c6a512-1295-4272-9138-f99709370657
2012-01-04 06:34:56 +00:00
Bertrik Sikken
50211e2054 Sansa clip zip: show AMSv2 variant in debug menu
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30890 a1c6a512-1295-4272-9138-f99709370657
2011-11-02 22:40:35 +00:00
Marcin Bukat
dceceef052 Move dbg_hw_info() into target tree. FS#11735 by me
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29964 a1c6a512-1295-4272-9138-f99709370657
2011-06-05 10:26:06 +00:00
Fred Bauer
e541c98a7e revert r28834 because it causes problems with uSD
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28925 a1c6a512-1295-4272-9138-f99709370657
2010-12-29 16:07:15 +00:00
Fred Bauer
279dff1c21 FS#11765: Improve AMSv1 Battery Life by Lowering CPU and Peripheral clocks. Unboosted CPU and peripheral clock is now 31MHz. Boosted CPU and pclk are 186MHz and 62MHz, respectively.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28834 a1c6a512-1295-4272-9138-f99709370657
2010-12-14 22:08:43 +00:00
Marcin Bukat
8a16f1ba00 fix yellow and red from r28522
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28523 a1c6a512-1295-4272-9138-f99709370657
2010-11-06 14:49:53 +00:00
Rafaël Carré
9b491752b1 debug-as3525.c : fix include, remove comment
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28016 a1c6a512-1295-4272-9138-f99709370657
2010-09-06 19:23:00 +00:00
Bertrik Sikken
4d6c816721 Sansa Clip+: detect AMSv2 variant (just like was already done for fuze v2), this makes SD transfers work for newer clip+ players ("COMBO4E" type). Variable fuzev2_variant has been renamed to amsv2_variant.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27520 a1c6a512-1295-4272-9138-f99709370657
2010-07-22 13:47:09 +00:00
Rafaël Carré
e44b65c806 Support new Fuzev2 revisions (fuzev2_variant == 1)
- Revert BUTTON_HOME
- Modifications to SD driver (µSD not working yet)

TODO: µSD and FM radio

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27492 a1c6a512-1295-4272-9138-f99709370657
2010-07-19 15:29:28 +00:00
Tobias Diedrich
eefe273ce6 DBOP noise on C200v2 goes away if we precharge long enough.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27148 a1c6a512-1295-4272-9138-f99709370657
2010-06-27 02:50:24 +00:00
Bertrik Sikken
ae64b59afa as3525v2: document PLL bits and show current PLL frequency in the debug menu
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26930 a1c6a512-1295-4272-9138-f99709370657
2010-06-18 18:32:38 +00:00
Rafaël Carré
8fe22bd4b8 as3525v2: show adc channels in the debug menu
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26150 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 20:01:49 +00:00
Rafaël Carré
4f61e455a2 Fuzev1: calibrated charging curve
Show all the adc channels in the IO ports debug menu (not for as3525v2
since the channels are different)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26149 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 19:44:40 +00:00
Thomas Martitz
50a6ca39ad Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes).
This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 21:04:40 +00:00
Tobias Diedrich
0a3d50b88f workaround DBOP noise issue on C200v2 cause it's really annoying if your buttons don't work in the debug menu...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25655 a1c6a512-1295-4272-9138-f99709370657
2010-04-16 06:01:24 +00:00
Tobias Diedrich
ea907b31ae Detect C200v2 variant by reading A7, use A5 or A7 to control backlight and buttonlight depending on the result.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25499 a1c6a512-1295-4272-9138-f99709370657
2010-04-06 18:32:47 +00:00
Rafaël Carré
59dbdabb71 as3525v2: show the correct freqs in debug menu, CGU_PERI uses fclk as source
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25485 a1c6a512-1295-4272-9138-f99709370657
2010-04-05 15:22:36 +00:00
Rafaël Carré
fa59c7b686 as3525v2: assume plla is the source for pclk (verified with timer frequency)
The frequencies are correctly displayed in the debug menu

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25418 a1c6a512-1295-4272-9138-f99709370657
2010-04-01 06:05:24 +00:00
Rafaël Carré
a28a9210d0 Fix boosting on as3525v2
the arm926-ejs doesn't have synchronous/asynchronous/fastbus modes, so
just change CGU_PROC directly

Note: we could use a lower unboosted frequency now

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25417 a1c6a512-1295-4272-9138-f99709370657
2010-04-01 04:37:17 +00:00
Rafaël Carré
dedf08a6e1 as3525: CGU_USB has only 3 bits for the divider
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25381 a1c6a512-1295-4272-9138-f99709370657
2010-03-29 17:12:16 +00:00
Jack Halpin
19fc7297ba SansaAMSv2: Give register CGU_BASE + 0x3C the name CGU_SDSLOT.
Move CLKDIV macros into clock-target.h.
Only enable the necessary interfaces for the 3 clock registers used for SD.
Add MEMSTICK and SDSLOT registers to bottom of register display in View HW info debug page.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25309 a1c6a512-1295-4272-9138-f99709370657
2010-03-23 17:00:59 +00:00
Rafaël Carré
f5988d4fbd fix previous revision by using correct definition of i2c prescaler
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25304 a1c6a512-1295-4272-9138-f99709370657
2010-03-23 09:22:03 +00:00
Rafaël Carré
e4972b08f7 as3525: do not read i2c2_cpsr* registers because the clock might be disabled
The registers value does not change so we don't need to read them
This avoids dividing by 0

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25303 a1c6a512-1295-4272-9138-f99709370657
2010-03-23 09:20:12 +00:00
Jack Halpin
405f6e6dbc SansaAMS: debug-as3525.c Allow View HW info page to display correct info for both V1 & V2 versions of as3525.
calc_freq(CLK_PLLA) for as3525v2 simply returns 240MHz instead of calculating until we understand how it is calculated.
Now displays 922T or 926ejs depending on version.
Remove SD and uSD info from as3525v2 as it is not useful due to different SD controller.
Increased the lines used for each page of display on clip screen size.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25120 a1c6a512-1295-4272-9138-f99709370657
2010-03-11 19:01:49 +00:00
Rafaël Carré
57667c51cf Sansa AMS: refactor DBOP button reading (e200v2/Fuze/c200v2)
This gets rid of LCD glitches on Sansa Fuze, and now LCD transfers can
get interrupted by button reading

Flyspray: FS #10603
Author: Bertrik Sikken

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24192 a1c6a512-1295-4272-9138-f99709370657
2010-01-06 23:41:36 +00:00
Bertrik Sikken
5698674ece Code police: add missing header file, make some local functions static
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24083 a1c6a512-1295-4272-9138-f99709370657
2009-12-20 16:28:15 +00:00
Jack Halpin
c03871ab80 Sansa AMS: Assume IDE_CLK is used as MCLK for internal SD. We assumed PCLK previously.
This patch changes all references/assumptions of PCLK to IDE_CLK for the internal pl180 controller.
Lower the AS3525_IDE_FREQ to 50 MHz in order to be able to divide by 2 for 25 MHz on the internal SD card.
Adjust the code in debug-as3525.c to account for the change and the frequencies reported should be correct.
Add some #if defined(HAVE_MULTIDRIVE) conditionals to cut out the code dealing with uSD for the clip.
Isolate the write delay needed for low frequency writes to only run for standard speed uSD cards. That is the only case for an MCICLK at 15.5 MHz.

Internal cards run at 25 MHz, HS uSD at 31 MHz, and standard speed uSD cards at 15.5 MHz.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23929 a1c6a512-1295-4272-9138-f99709370657
2009-12-11 04:53:22 +00:00
Jack Halpin
c67ce499f3 Sansa AMS: Check if SD controllers are already enabled before attempting to enable in order to read the registers.
If the controllers were already enabled there was a chance we could try to read the MCI_CLOCK registers while the cards were buffering and then disable the controllers prematurely.

I guess funman knows and sees all!!  Thanks funman.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23811 a1c6a512-1295-4272-9138-f99709370657
2009-12-01 21:23:11 +00:00
Jack Halpin
5bd4ec0c87 Sansa AMS: Force sd_enable(true) when using the Debug View HW info page so we can read the registers immediately.
Because we turn off the clocks to the SD controllers between disk accesses we were unable to read the MCI_CLOCK registers until there was a disk access.  Now we can read them immediately.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23810 a1c6a512-1295-4272-9138-f99709370657
2009-12-01 20:12:25 +00:00
Jack Halpin
6d20102a9c AMS Sansa: Change some #defines in debug-as3525 from "(SANSA_E200V2) || defined(SANSA_FUZE) || defined(SANSA_C200V2)" to HAVE_MULTIDRIVE
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23361 a1c6a512-1295-4272-9138-f99709370657
2009-10-26 17:22:05 +00:00
Jack Halpin
03986d4ec7 Revert r23350 "AMS Sansa: Assume IDECLK is MCLK for the internal SD Disk."
More information makes this assumption seem incorrect.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23356 a1c6a512-1295-4272-9138-f99709370657
2009-10-26 07:06:37 +00:00
Jack Halpin
ec43287aa0 AMS Sansa: Assume IDECLK is MCLK for the internal SD Disk. Reduce IDECLK to 62 MHz for now to be consistent with MCLK for uSD which is PCLK.
Adjust SD timeouts accordingly.

Adjust code in debug-as3525.c to display correct frequencies on system/debug/View disk info page.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23350 a1c6a512-1295-4272-9138-f99709370657
2009-10-25 18:31:44 +00:00
Nils Wallménius
f34a841b0c Revise r23225 a bit, removing the debug_printf function and implementing more generic lcd_(remote)_putsf function(s) instead and use those in more places
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23233 a1c6a512-1295-4272-9138-f99709370657
2009-10-17 18:02:48 +00:00
Jack Halpin
589e1f0072 AMS Sansa: Adjust View HW info page to display SD and uSD MCICLK freqs instead
of 400 khz Ident freq.  Also misc formatting changes.

Displaying the 400 khz ident frequency for the SD and uSD cards was not really
useful information.  This change displays the MCICLK frequency that we are
running the cards at.  The page now displays 0MHz until a card access and then
will displays the set frequency and the actual frequency.  The uSD display is
now only displayed for those players with a uSD

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22684 a1c6a512-1295-4272-9138-f99709370657
2009-09-12 20:50:11 +00:00
Jack Halpin
f9e7a5ad39 AMSSansa: Use single adc_read instead of multiple ascodec_reads to read voltage for display in View HW info.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21804 a1c6a512-1295-4272-9138-f99709370657
2009-07-12 14:12:45 +00:00
Jack Halpin
e905ca61d4 FS#10344 - AMSSansa Dynamically adjust core voltage to extend playtime.
Lower CVDD core voltage to 1.10 volts when the frequency is less than 200 MHz.

 

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21577 a1c6a512-1295-4272-9138-f99709370657
2009-06-30 17:56:21 +00:00
Rafaël Carré
d86cf998e8 Sansa AMS debug: small fixes
- Indentation fix
- Put braces around _DEBUG_PRINTF macro
- read_cp15() is only 1 instruction so inline it, and it doesn't access memory

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21477 a1c6a512-1295-4272-9138-f99709370657
2009-06-23 13:54:05 +00:00
Rafaël Carré
0181bc42c9 Sansa c200v2 : support more hardware
Don't read the buttons from GPIOC but from DBOP_DIN (all directional buttons + select)
Still missing hold, rec, volume up and volume down
Read microsd
Tuner is a si4700 but seems to suffer from the same problem than e200v2
Sound works

TODO: missing buttons, lcd yuv, test lcd performance (the c200v1 lcd performance has decreased since r21321 : needs to be investigated)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21330 a1c6a512-1295-4272-9138-f99709370657
2009-06-18 15:05:59 +00:00
Jack Halpin
b714ace163 AMSSansa: clock-target.h and debug-as3525 now use AS3525_FCLK_PREDIV correctly. Default frequency scheme remains 248/62/62.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21125 a1c6a512-1295-4272-9138-f99709370657
2009-05-29 06:43:37 +00:00
Jack Halpin
5941869a69 AMSSansa: Display AMBA Bus mode and mmu, icache, & dcache status on View HW info page
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21121 a1c6a512-1295-4272-9138-f99709370657
2009-05-28 20:27:31 +00:00
Rafaël Carré
ef9aacb2e0 FS#10245 by Jack Halpin : Adjust Clocking scheme on Sansa AMS
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21088 a1c6a512-1295-4272-9138-f99709370657
2009-05-26 18:44:02 +00:00
Rafaël Carré
442726339a Sansa AMS: show correct clock speeds for NAND & SD card
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21017 a1c6a512-1295-4272-9138-f99709370657
2009-05-21 17:35:56 +00:00
Rafaël Carré
e71c67f340 Fix my mistake in r20987/FS#10219 : live update of Sansa AMS clock freqs (fix by Jack Halpin)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20995 a1c6a512-1295-4272-9138-f99709370657
2009-05-20 11:22:31 +00:00
Rafaël Carré
00392020d8 FS#10219 (AMSSansa Debug Clocks) by Jack Halpin
With a few modifications by me:
Return 0MHz for PLL disabled (PLLB)
Mention if i2si and i2so are on or off
Simplify scrolling (for small & large displays)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20987 a1c6a512-1295-4272-9138-f99709370657
2009-05-19 14:43:37 +00:00
Thomas Martitz
e29358c154 Fix FS#10128 - The View IO Ports debug menu showed weird dbop values (sometimes FFFF prepended), due to sign-extension. Switch to unsigned short to fix it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20757 a1c6a512-1295-4272-9138-f99709370657
2009-04-20 20:11:01 +00:00
Thomas Martitz
5876418343 SansaAMS: Add a comment to clarifing a bit that the dcache is inactive without mmu; Show the cp15 control register in the "View I/O Pots menu".
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20324 a1c6a512-1295-4272-9138-f99709370657
2009-03-14 17:17:27 +00:00
Thomas Martitz
28eb803f79 Fix stupid typo...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20048 a1c6a512-1295-4272-9138-f99709370657
2009-02-19 17:43:19 +00:00
Thomas Martitz
740e5a2ffe Show DBOP in the e200v2's view IO ports menu.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20042 a1c6a512-1295-4272-9138-f99709370657
2009-02-18 17:46:11 +00:00