From 16ada4cb81c70c1a151c69aa08da13e55aba0081 Mon Sep 17 00:00:00 2001 From: Rob Purchase Date: Sat, 10 Oct 2009 17:35:02 +0000 Subject: Initial support for runtime detection of the PMU used in newer D2+ models (PCF50635). The backlight and battery monitoring should work, but the RTC and touchscreen are not yet implemented. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23078 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/pcf50606.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'firmware/drivers/pcf50606.c') diff --git a/firmware/drivers/pcf50606.c b/firmware/drivers/pcf50606.c index 8592c005fe..4ef747fe80 100644 --- a/firmware/drivers/pcf50606.c +++ b/firmware/drivers/pcf50606.c @@ -53,7 +53,17 @@ int pcf50606_read_multiple(int address, unsigned char* buf, int count) void pcf50606_init(void) { - // TODO +#ifdef COWON_D2 + /* Set outputs as per OF - further investigation required. */ + pcf50606_write(PCF5060X_DCDEC1, 0xe4); + pcf50606_write(PCF5060X_IOREGC, 0xf5); + pcf50606_write(PCF5060X_D1REGC1, 0xf5); + pcf50606_write(PCF5060X_D2REGC1, 0xe9); + pcf50606_write(PCF5060X_D3REGC1, 0xf8); /* WM8985 3.3v */ + pcf50606_write(PCF5060X_DCUDC1, 0xe7); + pcf50606_write(PCF5060X_LPREGC1, 0x0); + pcf50606_write(PCF5060X_LPREGC2, 0x2); +#endif } void pcf50606_reset_timeout(void) -- cgit v1.2.3