summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/pcf50605.c13
-rw-r--r--firmware/drivers/power.c2
2 files changed, 14 insertions, 1 deletions
diff --git a/firmware/drivers/pcf50605.c b/firmware/drivers/pcf50605.c
index a8c61b1789..0f71229964 100644
--- a/firmware/drivers/pcf50605.c
+++ b/firmware/drivers/pcf50605.c
@@ -65,6 +65,12 @@
65#define PSSC 0x18 65#define PSSC 0x18
66#define PWROKM 0x19 66#define PWROKM 0x19
67#define PWROKS 0x1a 67#define PWROKS 0x1a
68#define D1REGC1 0x24
69 #define VOUT_3000mV 0xf5
70 #define VOUT_3300mV 0xf8
71#define D2REGC1 0x25
72#define D3REGC1 0x26
73
68 74
69int pcf50605_read(int address) 75int pcf50605_read(int address)
70{ 76{
@@ -101,3 +107,10 @@ void pcf50605_standby_mode(void)
101 pcf50605_write(OOCC1, GOSTDBY | CHGWAK | EXTONWAK); 107 pcf50605_write(OOCC1, GOSTDBY | CHGWAK | EXTONWAK);
102} 108}
103 109
110void pcf50605_init(void)
111{
112 /* The following values were taken from the ipodlinux kernel source */
113 pcf50605_write(D1REGC1, VOUT_3000mV); /* Unknown */
114 pcf50605_write(D2REGC1, VOUT_3300mV); /* Dock Connector pin 17 */
115 pcf50605_write(D3REGC1, VOUT_3000mV); /* Unknown */
116}
diff --git a/firmware/drivers/power.c b/firmware/drivers/power.c
index 9cc751e41e..c4b9fb5b7d 100644
--- a/firmware/drivers/power.c
+++ b/firmware/drivers/power.c
@@ -85,7 +85,7 @@ void power_init(void)
85#endif 85#endif
86#endif 86#endif
87#elif CONFIG_CPU == PP5020 || CONFIG_CPU == PP5002 87#elif CONFIG_CPU == PP5020 || CONFIG_CPU == PP5002
88 /* TODO: Implement power_init() */ 88 pcf50605_init();
89#else 89#else
90#ifdef HAVE_POWEROFF_ON_PB5 90#ifdef HAVE_POWEROFF_ON_PB5
91 PBCR2 &= ~0x0c00; /* GPIO for PB5 */ 91 PBCR2 &= ~0x0c00; /* GPIO for PB5 */