summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/lcd-ipod.c27
-rw-r--r--firmware/export/config-ipodmini.h2
-rwxr-xr-xfirmware/export/config-ipodmini2g.h99
-rw-r--r--firmware/export/config.h2
4 files changed, 120 insertions, 10 deletions
diff --git a/firmware/drivers/lcd-ipod.c b/firmware/drivers/lcd-ipod.c
index 2d190d3d70..8936dad912 100644
--- a/firmware/drivers/lcd-ipod.c
+++ b/firmware/drivers/lcd-ipod.c
@@ -76,20 +76,28 @@ static void lcd_wait_write(void)
76static void lcd_send_data(int data_lo, int data_hi) 76static void lcd_send_data(int data_lo, int data_hi)
77{ 77{
78 lcd_wait_write(); 78 lcd_wait_write();
79 outl(data_lo, IPOD_LCD_BASE + LCD_DATA); 79#ifdef IPOD_MINI2G
80 lcd_wait_write(); 80 outl((inl(IPOD_LCD_BASE) & ~0x1f00000) | 0x1700000, IPOD_LCD_BASE);
81 outl(data_hi, IPOD_LCD_BASE + LCD_DATA); 81 outl(data_hi | (data_lo << 8) | 0x760000, IPOD_LCD_BASE+8);
82#else
83 outl(data_lo, IPOD_LCD_BASE + LCD_DATA);
84 lcd_wait_write();
85 outl(data_hi, IPOD_LCD_BASE + LCD_DATA);
86#endif
82} 87}
83 88
84/* send LCD command */ 89/* send LCD command */
85static void lcd_prepare_cmd(int cmd) 90static void lcd_prepare_cmd(int cmd)
86{ 91{
87 lcd_wait_write(); 92 lcd_wait_write();
88 93#ifdef IPOD_MINI2G
89 outl(0x0, IPOD_LCD_BASE + LCD_CMD); 94 outl((inl(IPOD_LCD_BASE) & ~0x1f00000) | 0x1700000, IPOD_LCD_BASE);
90 lcd_wait_write(); 95 outl(cmd | 0x740000, IPOD_LCD_BASE+8);
91 outl(cmd, IPOD_LCD_BASE + LCD_CMD); 96#else
92 97 outl(0x0, IPOD_LCD_BASE + LCD_CMD);
98 lcd_wait_write();
99 outl(cmd, IPOD_LCD_BASE + LCD_CMD);
100#endif
93} 101}
94 102
95/* send LCD command and data */ 103/* send LCD command and data */
@@ -105,7 +113,8 @@ static void lcd_cmd_and_data(int cmd, int data_lo, int data_hi)
105 * LCD init 113 * LCD init
106 **/ 114 **/
107void lcd_init_device(void){ 115void lcd_init_device(void){
108#ifdef APPLE_IPODMINI 116#if defined(IPOD_MINI) || defined(IPOD_MINI2G)
117 /* driver output control - 160x112 (ipod mini) */
109 lcd_cmd_and_data(0x1, 0x0, 0xd); 118 lcd_cmd_and_data(0x1, 0x0, 0xd);
110#else 119#else
111 /* driver output control - 160x128 */ 120 /* driver output control - 160x128 */
diff --git a/firmware/export/config-ipodmini.h b/firmware/export/config-ipodmini.h
index 5ac97545d4..ea3f4e5c41 100644
--- a/firmware/export/config-ipodmini.h
+++ b/firmware/export/config-ipodmini.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * This config file is for the Apple iPod Mini (1st & 2nd Gen) 2 * This config file is for the Apple iPod Mini (1st Gen)
3 */ 3 */
4#define APPLE_IPODMINI 1 4#define APPLE_IPODMINI 1
5 5
diff --git a/firmware/export/config-ipodmini2g.h b/firmware/export/config-ipodmini2g.h
new file mode 100755
index 0000000000..60d812f8d7
--- /dev/null
+++ b/firmware/export/config-ipodmini2g.h
@@ -0,0 +1,99 @@
1/*
2 * This config file is for the Apple iPod Mini 2nd Gen
3 */
4#define APPLE_IPODMINI 1
5
6#define IPOD_ARCH 1
7
8/* For Rolo and boot loader */
9#define MODEL_NUMBER 11
10
11/* define this if you have recording possibility */
12/*#define HAVE_RECORDING 1*/
13
14/* define this if you have a bitmap LCD display */
15#define HAVE_LCD_BITMAP 1
16
17/* LCD dimensions */
18#define LCD_WIDTH 138
19#define LCD_HEIGHT 110
20#define LCD_DEPTH 2 /* 4 colours - 2bpp */
21
22#define LCD_PIXELFORMAT HORIZONTAL_PACKING
23
24#define CONFIG_KEYPAD IPOD_4G_PAD
25
26/* Define this if you do software codec */
27#define CONFIG_CODEC SWCODEC
28
29/* define this if you have a real-time clock */
30#ifndef BOOTLOADER
31#define CONFIG_RTC RTC_PCF50605
32#endif
33
34/* Define this if you have a software controlled poweroff */
35#define HAVE_SW_POWEROFF
36
37/* The number of bytes reserved for loadable codecs */
38#define CODEC_SIZE 0x80000
39
40/* The number of bytes reserved for loadable plugins */
41#define PLUGIN_BUFFER_SIZE 0x80000
42
43/* Define this if you have the WM8975 audio codec */
44#define HAVE_WM8975
45
46/* Define this for LCD backlight available */
47#define CONFIG_BACKLIGHT BL_IPODMINI /* port controlled */
48
49#ifndef SIMULATOR
50
51/* Define this if you have a PortalPlayer PP5020 */
52#define CONFIG_CPU PP5020
53
54/* Define this if you want to use the PP5020 i2c interface */
55#define CONFIG_I2C I2C_PP5020
56
57/* Type of mobile power */
58//#define CONFIG_BATTERY BATT_LIPOL1300
59
60#define BATTERY_SCALE_FACTOR 16665 /* FIX: this value is picked at random */
61
62/* Define this if the platform can charge batteries */
63//#define HAVE_CHARGING 1
64
65/* define this if the hardware can be powered off while charging */
66//#define HAVE_POWEROFF_WHILE_CHARGING
67
68/* The start address index for ROM builds */
69#define ROM_START 0x00000000
70
71/* Define this to the CPU frequency */
72#define CPU_FREQ 11289600
73
74#define CONFIG_LCD LCD_IPOD2BPP
75
76/* Offset ( in the firmware file's header ) to the file length */
77#define FIRMWARE_OFFSET_FILE_LENGTH 0
78
79/* Offset ( in the firmware file's header ) to the file CRC */
80#define FIRMWARE_OFFSET_FILE_CRC 0
81
82/* Offset ( in the firmware file's header ) to the real data */
83#define FIRMWARE_OFFSET_FILE_DATA 8
84
85#define USB_IPODSTYLE
86
87/* define this if the unit can be powered or charged via USB */
88#define HAVE_USB_POWER
89
90/* Virtual LED (icon) */
91#define CONFIG_LED LED_VIRTUAL
92
93/* Define this if you have adjustable CPU frequency */
94//#define HAVE_ADJUSTABLE_CPU_FREQ
95
96#define BOOTFILE_EXT "ipod"
97#define BOOTFILE "rockbox." BOOTFILE_EXT
98
99#endif
diff --git a/firmware/export/config.h b/firmware/export/config.h
index 4ef4bd63fc..de89dfe99e 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -170,6 +170,8 @@
170#include "config-gigabeat.h" 170#include "config-gigabeat.h"
171#elif defined(IPOD_MINI) 171#elif defined(IPOD_MINI)
172#include "config-ipodmini.h" 172#include "config-ipodmini.h"
173#elif defined(IPOD_MINI2G)
174#include "config-ipodmini2g.h"
173#else 175#else
174/* no known platform */ 176/* no known platform */
175#endif 177#endif