|
|
Wiki > Main > CowonD2Info (compare)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Difference: CowonD2Info (r71 vs. r70)Cowon D2 InfoIntroductionThe Cowon D2 is a flash-based DAP/PMP with a 320x240 touchscreen, SD card slot, FM radio and TV-Out. It comes in 2/4/8/16GB sizes, and there is also a version with DAB digital radio. There is also an updated model known as the D2+, which features an updated case design and new firmware featuring BBE+ audio processing. Hardware
Disassembly and pictures at AnythingButIpod. Port StatusThe D2 port status is: unstable (see TargetClassifications) Most Rockbox functions are usable on the D2/D2+, including music playback and most plugins, but there are a number of shortcomings that prevent it from being a fully supported target:
Rockbox runs on all D2 and D2+ variants (2 / 4 / 8 / 16GB, with or without DAB/DMB). NOTE: Newer D2+ hardware revisions use an updated power management chip, and some functionality is not yet implemented on these players (eg. touchscreen support). The touchscreen can be used in two modes, either a 3x3 grid mode which divides the screen into areas to emulate a set of physical buttons (the default setting), or "absolute point" mode where the touchscreen is used to point to items on the screen. Further work is required to make the UI more usable with a touchscreen in general. WARNING: The SD driver is still in development and may contain bugs. There have been reports of SD cards becoming unusable after being used with Rockbox on the D2. Only using risk old, low-capacity SD cards until we are satisfied the driver is safe to use. You have been warned! InstallationThe Rockbox bootloader needs to be patched into an original Cowon firmware, which is then flashed to the D2 using the normal firmware upgrade process. This provides a dual-boot mechanism between Rockbox and the Cowon firmware (to boot Rockbox, set the HOLD switch immediately after power on). You will need a copy of your current Cowon firmware, ie. the D2(N).bin file from the '1' folder in an official firmware update archive (these can be downloaded from Cowon Global). NOTE: The filename depends on the firmware version as shown in the table below:
Automatic InstallationUntil The current release of Rockbox Installation Utility version 1.2.4 and later doesn't support the D2. Preliminary support is released, please in SVN, use a temporary 'unstable' build for Windows and Mac (no support, guarantees or whatever), courtesy you can try binaries from SVN. See of bluebrother: this forum announcement for details. The utility should be able to detect and install Rockbox on your player. For more info visit the utility's Wiki page. Manual Installation
The D2N-patched.bin can then either be uploaded to the player using tcctool (remember to set the HOLD switch as this is a dual-boot image), or flashed to the player using the usual firmware upgrade method. To do this rename the file according to the table above, then copy it to the root of the player and turn on the player - this will start the upgrade process. It is also possible to 'preview' a main Rockbox binary on the device, by using tcctool to upload the rockbox.bin file (NOT rockbox.d2). Note that this is only suitable for minor development/testing purposes, since plugins/codecs are not updated when using this method. Known Problems
Work To Be DoneThings that should be done before the port can be considered truly usable:
Things that would be nice to have:
...and probably many more things I haven't even thought of yet. Forum ThreadThe New Ports forum thread for the D2 is at: http://forums.rockbox.org/index.php?topic=10164.0 Firmware UpgradeFirmware upgrades are in the standard Telechips "dual-crc" format (more info at TelechipsInfo). Firmware upgrade files (D2.bin or D2N.bin) are a raw, unencrypted dump of SDRAM (base address 0x20000000). This is loaded from flash during normal startup by an 8KB Boot ROM. The device also has a USB boot mode, and can be accessed via the tcctool utility (in Rockbox SVN). USB boot mode is enabled by powering the unit off, then holding any of the keypad buttons ('-', 'M', or '+') while inserting the USB cable. Note that the "dual-crc" format does not appear to be required when using USB boot mode. Firmware VersionsThere are several variants of the D2 retail firmware tailored for different markets and hardware versions. The variant is identified by the Major version number.
Firmware archives downloaded from Cowon are split into three subfolders, each containing one or more .bin files.
D2+ firmwares follow the same version numbering and file naming scheme, except that file names begin with D2_P. It appears that the only reason a D2+ firmware cannot be flashed to a standard D2 is that the new firmware exceeds the 4Mb size limitation present in the standard D2 firmware flash routine (tcctool can be used to get around this limitation). Technical InformationThe TCC7801 has significant similarities to earlier Telechips SoCs such as the 76x (for which a datasheet was posted to the rockbox-dev mailing list here). The following hardware registers appear to be the same as the 76x:
(*the SDRAM controller appears to have a duplicate range at 0xF1001000, presumably for a second SDRAM bank?) The IRQ/FIQ controller (base 0xF3001000) seems to be largely the same as the 76x (base 0x80000100) except there appears to be a priority mechanism whereby the IRQ number of the highest-priority IRQ occurring can be read from address 0xF3001080. 0xF3001044 bits 0,1 appear to be a master IRQ/FIQ enable flag. IRQ numbers do not appear to be the same as 76x, although Cowon helpfully left quite a lot of debug text in their firmware (eg. search for '_HISR') which should help identify some of these. GPIO portsGPIO ports can be accessed as follows: 0xF005A0x0 = current value of GPIOx 0xF005A0x4 = direction for each pin (set = output, clear = input) 0xF005A0x8 = bits to set 0xF005A0xC = bits to clear For example, the hold switch state is available by reading bit 3 of 0xF005A020. To enable the LCD backlight, write bit 6 to 0xF005A028. GPIOA (base = 0xF005A020)
GPIOB (base = 0xF005A040)
GPIOC (base = 0xF005A060)
GPIOD (base = 0xF005A080)
GPIOE (base = 0xF005A0A0)
ADCs
LCDThe LCD is powered on and off using the sequences given in the LTV250QV datasheet. The LCD is not visible at all unless the backlight is enabled, so it is necessary to first set the backlight intensity using PCF50606 register 0x35 and then enable it using GPIOA6. Hardware registers for the LCD controller are TBC (base = 0xF0000000), however a working initialisation sequence has been identified from the OF. NAND flashThe following D2's have been observed:
See TelechipsNAND for further information. AudioThe SVN build includes basic but working WM8985 and PCM drivers. The DAC is configured as I2S slave to the Telechips SoC, in contrast to the other Rockbox drivers which use the WM codec as master. Hardware equalizer bands EQ1 and EQ5 are used to provide bass and treble controls. At present a full 5-band equalizer is only available using software EQ (this is currently unusable due to keymap problems). The WM8985 is powered by the PCF50606 regulator D3REG. In the original firmware this is configured for 3.3v output by sending 0xF8 to D3REGC1 (0x26). Power managementDifferent D2 hardware revisions contain different PMU chips. It is possible to detect which is present at runtime by configuring GPIOA6 for input and testing its value. If the value is 0, a PCF50606 is present and the port should be configured for output (for use as a backlight power toggle). If the value is 1, a PCF50635 is present and GPIOA6 should be configured for input (use currently unknown). D2 and older D2+ revisionsThese models contain a Philips PCF50606. The original firmware sends a number of initialisation commands to the PCF50606 to control the voltages that go to the various chips in the D2. It would be helpful to work out which regulator outputs each chip is connected to. The following tabe lists the initial values set up by the Cowon firmware.
Newer D2+ revisionsThese models contain a Philips PCF50635, which appears to be at least partly register-compatible with the PCF50633 used by the OpenMoko FreeRunner project. Full documentation for the PCF50633 can be found here, and a driver was added to the linux kernel as of 2.6.29. TouchscreenOn older D2s, the touchscreen is managed by the PCF50606 and can be read using the PMU's 10-bit ADC (see datasheet). A TSCPRES interrupt is raised when a press has been registered. Newer D2+ models contain a PCF50635 PMU, which does not contain a touchscreen controller. Instead a dedicated touchscreen controller is used, which appears to be the Texas Instruments TSC2007 (unconfirmed). X/Y coordinates can be read from I2C registers 0x80/0x90 (slave address 0x90). This returns a single reading with 16-bit resolution (use the most significant 10 bits to get the same resolution as the PCF50606). GPIOC26 is an indication of whether the touch screen is pressed (active low). It is unknown whether an IRQ can be triggered from this GPIO, so a polling mechanism may have to be used. EmulatorTaken off the forum, here is an emulator for the Cowon D2: cowon_emulator.zip CategoryFrontpage: Cowon D2 Port Index [New Ports]
r72 - 12 Apr 2013 - 18:01:59 - WilfriedWinkler
Revision r71 - 01 Feb 2010 - 23:19 - DominikRiebelingRevision r70 - 15 Dec 2009 - 05:37 - TomerShalev Copyright © by the contributing authors.
|