diff options
Diffstat (limited to 'firmware/drivers/pcf50605.c')
-rw-r--r-- | firmware/drivers/pcf50605.c | 43 |
1 files changed, 37 insertions, 6 deletions
diff --git a/firmware/drivers/pcf50605.c b/firmware/drivers/pcf50605.c index d34e8512c1..afa0a5ca11 100644 --- a/firmware/drivers/pcf50605.c +++ b/firmware/drivers/pcf50605.c | |||
@@ -63,11 +63,20 @@ | |||
63 | #define PSSC 0x18 | 63 | #define PSSC 0x18 |
64 | #define PWROKM 0x19 | 64 | #define PWROKM 0x19 |
65 | #define PWROKS 0x1a | 65 | #define PWROKS 0x1a |
66 | #define DCDC1 0x1b | ||
67 | #define DCDC2 0x1c | ||
68 | #define DCDC3 0x1d | ||
69 | #define DCDC4 0x1e | ||
70 | #define DCDEC1 0x1f | ||
71 | #define DCDEC2 0x20 | ||
72 | #define DCUDC1 0x21 | ||
73 | #define DCUDC2 0x22 | ||
74 | #define IOREGC 0x23 | ||
66 | #define D1REGC1 0x24 | 75 | #define D1REGC1 0x24 |
67 | #define VOUT_3000mV 0xf5 | ||
68 | #define VOUT_3300mV 0xf8 | ||
69 | #define D2REGC1 0x25 | 76 | #define D2REGC1 0x25 |
70 | #define D3REGC1 0x26 | 77 | #define D3REGC1 0x26 |
78 | #define LPREG1C 0x27 | ||
79 | |||
71 | 80 | ||
72 | unsigned char pcf50605_wakeup_flags = 0; | 81 | unsigned char pcf50605_wakeup_flags = 0; |
73 | 82 | ||
@@ -113,8 +122,30 @@ void pcf50605_standby_mode(void) | |||
113 | 122 | ||
114 | void pcf50605_init(void) | 123 | void pcf50605_init(void) |
115 | { | 124 | { |
116 | /* The following values were taken from the ipodlinux kernel source */ | 125 | #if defined (IPOD_VIDEO) |
117 | pcf50605_write(D1REGC1, VOUT_3000mV); /* Unknown */ | 126 | /* I/O and GPO voltage supply (default: 0xf8 = 3.3V ON) */ |
118 | pcf50605_write(D2REGC1, VOUT_3300mV); /* Dock Connector pin 17 */ | 127 | /* ECO not allowed regarding data sheet */ |
119 | pcf50605_write(D3REGC1, VOUT_3000mV); /* Unknown */ | 128 | pcf50605_write(IOREGC, 0xf8); /* 3.3V ON */ |
129 | |||
130 | /* core voltage supply (default DCDC1/DCDC2: 0xec = 1.2V ON) */ | ||
131 | /* ECO not stable, assumed due to less precision of voltage in ECO mode */ | ||
132 | pcf50605_write(DCDC1, 0xec); /* 1.2V ON */ | ||
133 | pcf50605_write(DCDC2, 0x0c); /* OFF */ | ||
134 | |||
135 | /* unknown (default: 0xe3 = 1.8V ON) */ | ||
136 | pcf50605_write(DCUDC1, 0xe3); /* 1.8V ON */ | ||
137 | |||
138 | /* WM8758 voltage supply (default: 0xf5 = 3.0V ON) */ | ||
139 | /* ECO not allowed as max. current of 5mA is not sufficient */ | ||
140 | pcf50605_write(D1REGC1, 0xf0); /* 2.5V ON */ | ||
141 | |||
142 | /* LCD voltage supply (default: 0xf5 = 3.0V ON) */ | ||
143 | pcf50605_write(D3REGC1, 0xf1); /* 2.6V ON */ | ||
144 | #else | ||
145 | /* keep initialization from svn for other iPods */ | ||
146 | pcf50605_write(D1REGC1, 0xf5); /* 3.0V ON */ | ||
147 | pcf50605_write(D3REGC1, 0xf5); /* 3.0V ON */ | ||
148 | #endif | ||
149 | /* Dock Connector pin 17 (default: OFF) */ | ||
150 | pcf50605_write(D2REGC1, 0xf8); /* 3.3V ON */ | ||
120 | } | 151 | } |