Tasklist
FS#10189 - Samsung YH- 820, 920, 925 Port
| Task Type |
Patches |
| Category |
Operating System/Drivers |
| Status |
Closed |
| Assigned To |
No-one |
| Player Type |
Another |
| Severity |
Low |
| Priority |
Normal |
| Reported Version |
Version 3.2 |
| Due in Version |
Undecided |
| Due Date |
Undecided |
| Percent Complete |
|
| Private |
No
|
|
Details
This is a patch by lowlight with some fixes by kugel and me.
There are still some issues:
- no sound
- statusbar is not on the top
- on YH-920: - bootloader doen't work ( checksum seems to be wrong )
- LCD glitches on the top
samsung-yh82x_yh92x.patch
(182.1 KiB)
bootloader/main-pp.c | 3
bootloader/SOURCES | 3
tools/configure | 114 ++-
tools/scramble.c | 9
apps/SOURCES | 2
apps/debug_menu.c | 3
apps/keymaps/keymap-yh8xx_yh9xx.c | 356 +++++++++++
firmware/export/akcodec.h | 23
firmware/export/config-yh920.h | 193 ++++++
firmware/export/config-yh925.h | 190 +++++
firmware/export/audiohw.h | 2
firmware/export/config.h | 10
firmware/export/config-yh820.h | 187 +++++
firmware/export/usb.h | 3
firmware/export/ak4537.h | 207 ++++++
firmware/sound.c | 4
firmware/SOURCES | 52 +
firmware/target/arm/usb-fw-pp502x.c | 15
firmware/target/arm/i2s-pp.c | 4
firmware/target/arm/samsung/button-yh82x_yh92x.c | 72 ++
firmware/target/arm/samsung/yh925/powermgmt-yh925.c | 59 +
firmware/target/arm/samsung/yh925/lcd-yh925.c | 635 ++++++++++++++++++++
firmware/target/arm/samsung/yh925/lcd-as-yh925.S | 538 ++++++++++++++++
firmware/target/arm/samsung/yh925/backlight-yh925.c | 47 +
firmware/target/arm/samsung/power-yh82x_yh92x.c | 77 ++
firmware/target/arm/samsung/app.lds | 198 ++++++
firmware/target/arm/samsung/adc-target.h | 36 +
firmware/target/arm/samsung/backlight-target.h | 28
firmware/target/arm/samsung/boot.lds | 64 ++
firmware/target/arm/samsung/button-target.h | 55 +
firmware/target/arm/samsung/yh820/backlight-yh820.c | 47 +
firmware/target/arm/samsung/yh820/powermgmt-yh820.c | 59 +
firmware/target/arm/samsung/yh820/lcd-yh820.c | 375 +++++++++++
firmware/target/arm/samsung/yh820/lcd-as-yh820.S | 551 +++++++++++++++++
firmware/target/arm/samsung/yh920/backlight-yh920.c | 47 +
firmware/target/arm/samsung/yh920/powermgmt-yh920.c | 59 +
firmware/target/arm/samsung/yh920/lcd-yh920.c | 294 +++++++++
firmware/target/arm/samsung/akcodec-yh82x_yh92x.c | 75 ++
firmware/drivers/audio/ak4537.c | 170 +++++
39 files changed, 4840 insertions(+), 26 deletions(-)
|
Closed by
Rafaël Carré (funman)
Tuesday, 26 May 2009, 20:48 GMT+2
Reason for closing: Accepted
Additional comments about closing: committed by low_light
Loading...
- update revision
I made a quick, unsuccessful attempt to get the audio driver working. While I think the audio driver is ok, it doesn't seem to be communicating with the codec chip correctly.
pyro_maniac: Since you are the only one with a 920, perhaps can try to track down the bootloader and lcd problems. The statusbar on the bottom is probably because the lcd is rotated and we are not accounting for the change in origin.
this fix may work on the yh-920 display problems, too. But i didn't understand it enough yet.
I replaced SET_REG macro in ata-target.h by "#define SET_REG(reg,val) do { reg = (val); int __x = 200000;while(__x--);} while(0)" and the storage is initialized, partitions mounted, rockbox.mi4 found, but loading fails (too slow?).
I let the YH920 run 8 hours+ but it still showed "loading rockbox" on the screen.
Perhaps there is a status bit to check when setting some registers?
lcd_write_reg(LCD_CNTL_COLUMN, x0);
addr = &lcd_framebuffer[y][x0];
fixes the problem
I still don't understand how the normal build works but the bootloader build doesn't work.
@funman
Here's how the OF inits the IDE controller. Usually this usually already done by the rom bootloader, so I'm not sure why it would need to be redone.
outl(0xC0000000, 0x600060C4); /* unknown reg, probably a clock src */
DEV_EN |= DEV_IDE0;
DEV_INIT2 &= ~0x800;
GPIOF_ENABLE |= 0x4;
GPIOF_OUTPUT_VAL &= ~0x4;
GPIOF_OUTPUT_EN |= 0x4;
DEV_RS |= DEV_IDE0;
nop;
DEV_RS &= ~DEV_IDE0;
It is weird that rockbox.mi4 can access disk, I tried to call set_cpu_frequency() without effect.
I'll try to look at "#ifndef BOOTLOADER" code to see if some extra initialization is required.
Is there a reason why all this init (since "disable all irqs") is not made in the PP bootloaders ?
Here's what the rom bootloader does to init the IDE:
set cpu freq to 76 MHz
DEV_EN |= DEV_IDE0;
outl(0xC0000000, 0x600060C4);
DEV_RS |= DEV_IDE0;
udelay(25);
DEV_RS &= ~DEV_IDE0;
IDE0_CFG |= 0x80000000;
udelay(25);
IDE0_CFG &= ~0x80000000;
IDE0_CFG |= 0x30000000
udelay(2000);
IDE0_PRI_TIMING0 = 0x2294; /* based on 76 MHz */
The YH925 has a very similar setup (although I didn't verify the ide timing) and the Rockbox bootloader works perfectly. The 925 hard drive is a Toshiba MK2006GAL.
I was a little late on my comment. In addition to the above, the rom bootloader also enables an interrupt before the IDE init.
CPU_INT_EN |= 0x800000;
Perhaps that is the offending interrupt.
Do you want to post your patch with sound (even in a bad state), so I can try to get FM radio working ? (the TEA5767 already has a driver so only I2C is missing).
About USB : kugel reported that USB isn't working on his YH925, and on my YH920 : the usb screen shows in rockbox and dmesg says "hub 1-0:1.0: unable to enumerate USB device on port 6" ; while USB works fine when using a stock H10 build "though rockbox things it's connected all the time (wrong GPIO pin)".
Did you test on YH820 only ?
My YH920 has the same hard disk than your YH925 , while http://www.rockbox.org/twiki/bin/view/Main/SamsungYH920 mentions a MK2004GAL (perhaps 2004 or 2006 are manufacturing year).
I believe CPU_INT_DIS = (1<<IDE_IRQ) /*== 0x800000*/in ata_device_init() would be more correct
Rockbox USB works fine on both my 820 and 925.
I'm finishing up some real work this week and hope to fix a few remaining things and commit by this weekend.
Rockbox USB works fine on both my 820 and 925.
I'm finishing up some real work this week and hope to fix a few remaining things and commit by this weekend.
Mark,
I would greatly appreciate if you can add USB HID key-maps for these platforms (see
FS#10218), provided HAVE_USBSTACK is defined.Thanks!
Here's the dmesg output: http://pastie.org/485266
But the system seems to freeze on pressing pause in playback. Sound didn't work either.
USB, audio works fine. RTC and contrast setting too after enabling it in config-yh925.h.