diff options
author | Dominik Wenger <domonoky@googlemail.com> | 2009-10-19 18:14:27 +0000 |
---|---|---|
committer | Dominik Wenger <domonoky@googlemail.com> | 2009-10-19 18:14:27 +0000 |
commit | 41c497025f40615373817498606fabd0fcd41dd6 (patch) | |
tree | 1a35952304d53a222cae58812114c37c86eee30d /firmware/export | |
parent | 660dbd697d54199db5dfc33d2d3859825f0f77ac (diff) | |
download | rockbox-41c497025f40615373817498606fabd0fcd41dd6.tar.gz rockbox-41c497025f40615373817498606fabd0fcd41dd6.zip |
Initial mini2440 port.
Flyspray: FS#10627
Author: Bob Cousins
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23265 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/config-mini2440.h | 150 | ||||
-rw-r--r-- | firmware/export/config.h | 10 | ||||
-rw-r--r-- | firmware/export/s3c2440.h | 57 |
3 files changed, 213 insertions, 4 deletions
diff --git a/firmware/export/config-mini2440.h b/firmware/export/config-mini2440.h new file mode 100644 index 0000000000..0db027c7a0 --- /dev/null +++ b/firmware/export/config-mini2440.h | |||
@@ -0,0 +1,150 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * | ||
9 | * Copyright (C) 2009 by Bob Cousins, Lyre Project | ||
10 | * Copyright (C) 2009 by Jorge Pinto, Lyre Project | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | /* | ||
23 | * This config file is for the Mini2440 | ||
24 | */ | ||
25 | #define TARGET_TREE /* this target is using the target tree system */ | ||
26 | |||
27 | /* For Rolo and boot loader */ | ||
28 | #define MODEL_NUMBER 131 | ||
29 | #define MODEL_NAME "Mini2440" | ||
30 | |||
31 | /***************************************************************************/ | ||
32 | /* Hardware Config */ | ||
33 | |||
34 | /* TODO: ??? */ | ||
35 | #define CONFIG_SDRAM_START 0x30000000 | ||
36 | |||
37 | /* Flash storage */ | ||
38 | #define HAVE_FLASH_STORAGE | ||
39 | /* define the storage type */ | ||
40 | #define CONFIG_STORAGE STORAGE_SD | ||
41 | |||
42 | #define HAVE_MULTIDRIVE | ||
43 | #define NUM_DRIVES 2 | ||
44 | #define HAVE_HOTSWAP | ||
45 | |||
46 | /* Disk storage */ | ||
47 | /* define this if you have a disk storage, i.e. something | ||
48 | that needs spinups and can cause skips when shaked */ | ||
49 | /* #define HAVE_DISK_STORAGE */ | ||
50 | |||
51 | /* Display */ | ||
52 | /* define this if you have a bitmap LCD display */ | ||
53 | #define HAVE_LCD_BITMAP | ||
54 | /* define this if you have a colour LCD */ | ||
55 | #define HAVE_LCD_COLOR | ||
56 | /* The LCD is assumed to be 3.5" TFT touch screen, others are possible */ | ||
57 | #define CONFIG_LCD LCD_MINI2440 | ||
58 | /* LCD dimensions */ | ||
59 | #define LCD_WIDTH 240 | ||
60 | #define LCD_HEIGHT 320 | ||
61 | /* The LCD is configured for RGB565 */ | ||
62 | #define LCD_DEPTH 16 /* 65536 colours */ | ||
63 | #define LCD_PIXELFORMAT RGB565 /* rgb565 */ | ||
64 | /* Define this for LCD backlight available */ | ||
65 | /* The Mini2440 supports backight brightness depending on LCD type */ | ||
66 | /* But the 3.5" LCD touch screen does not support brightness*/ | ||
67 | #define HAVE_BACKLIGHT | ||
68 | #define HAVE_BACKLIGHT_BRIGHTNESS | ||
69 | |||
70 | /* Keypad */ | ||
71 | #define CONFIG_KEYPAD MINI2440_PAD | ||
72 | |||
73 | /* I2C */ | ||
74 | /* Do not use I2C */ | ||
75 | #define CONFIG_I2C I2C_NONE | ||
76 | |||
77 | /* Define DAC/Codec */ | ||
78 | /*#define HAVE_UDA1341*/ | ||
79 | #define HAVE_TLV320 | ||
80 | /* ... tone controls, use the software ones */ | ||
81 | #define HAVE_SW_TONE_CONTROLS | ||
82 | |||
83 | /* Battery */ | ||
84 | #define BATTERY_CAPACITY_DEFAULT 1100 /* default battery capacity */ | ||
85 | #define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */ | ||
86 | #define BATTERY_CAPACITY_MAX 2500 /* max. capacity selectable */ | ||
87 | #define BATTERY_CAPACITY_INC 100 /* capacity increment */ | ||
88 | #define BATTERY_TYPES_COUNT 1 /* only one type */ | ||
89 | |||
90 | /* USB */ | ||
91 | /* TODO:#define HAVE_USBSTACK */ | ||
92 | |||
93 | /***************************************************************************/ | ||
94 | /* Application Config */ | ||
95 | |||
96 | #define HAVE_ALBUMART | ||
97 | /* define this to enable bitmap scaling */ | ||
98 | #define HAVE_BMP_SCALING | ||
99 | /* define this to enable JPEG decoding */ | ||
100 | #define HAVE_JPEG | ||
101 | /* RMC TODO: what is this for?? */ | ||
102 | /* define this if you have access to the pitchscreen */ | ||
103 | #define HAVE_PITCHSCREEN | ||
104 | |||
105 | /* Define this if you do software codec */ | ||
106 | #define CONFIG_CODEC SWCODEC | ||
107 | |||
108 | /* The number of bytes reserved for loadable codecs */ | ||
109 | #define CODEC_SIZE 0x100000 | ||
110 | |||
111 | /* The number of bytes reserved for loadable plugins */ | ||
112 | #define PLUGIN_BUFFER_SIZE 0x100000 | ||
113 | |||
114 | |||
115 | /***************************************************************************/ | ||
116 | #ifndef SIMULATOR | ||
117 | |||
118 | #define CONFIG_CPU S3C2440 | ||
119 | |||
120 | /* Define this to the CPU frequency */ | ||
121 | #define CPU_FREQ 405000000 | ||
122 | #define MCK_FREQ (CPU_FREQ/4) | ||
123 | #define SLOW_CLOCK 32768 | ||
124 | |||
125 | /* Main LCD backlight brightness range and defaults */ | ||
126 | #define MIN_BRIGHTNESS_SETTING 1 /* 0.5 mA */ | ||
127 | #define MAX_BRIGHTNESS_SETTING 12 /* 32 mA */ | ||
128 | #define DEFAULT_BRIGHTNESS_SETTING 10 /* 16 mA */ | ||
129 | /* Define this if your LCD can set contrast */ | ||
130 | #define HAVE_LCD_CONTRAST | ||
131 | #define MIN_CONTRAST_SETTING 0 | ||
132 | #define MAX_CONTRAST_SETTING 63 | ||
133 | #define DEFAULT_CONTRAST_SETTING 47 /* Match boot contrast */ | ||
134 | |||
135 | /* Hardware controlled charging with monitoring */ | ||
136 | #define CONFIG_CHARGING CHARGING_MONITOR | ||
137 | /*#define POWER_INPUT_BATTERY 0*/ | ||
138 | |||
139 | /* Offset ( in the firmware file's header ) to the file CRC */ | ||
140 | #define FIRMWARE_OFFSET_FILE_CRC 0 | ||
141 | |||
142 | /* Offset ( in the firmware file's header ) to the real data */ | ||
143 | #define FIRMWARE_OFFSET_FILE_DATA 8 | ||
144 | |||
145 | #define BOOTFILE_EXT "mini2440" | ||
146 | #define BOOTFILE "rockbox." BOOTFILE_EXT | ||
147 | #define BOOTDIR "/.rockbox" | ||
148 | |||
149 | #endif | ||
150 | /***************************************************************************/ | ||
diff --git a/firmware/export/config.h b/firmware/export/config.h index 70e2c792d0..8a1adeaac8 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -112,6 +112,7 @@ | |||
112 | #define SAMSUNG_YH_PAD 38 | 112 | #define SAMSUNG_YH_PAD 38 |
113 | #define ONDAVX777_PAD 39 | 113 | #define ONDAVX777_PAD 39 |
114 | #define SAMSUNG_YPS3_PAD 40 | 114 | #define SAMSUNG_YPS3_PAD 40 |
115 | #define MINI2440_PAD 41 | ||
115 | 116 | ||
116 | /* CONFIG_REMOTE_KEYPAD */ | 117 | /* CONFIG_REMOTE_KEYPAD */ |
117 | #define H100_REMOTE 1 | 118 | #define H100_REMOTE 1 |
@@ -192,10 +193,11 @@ | |||
192 | #define LCD_ONDAVX767 30 /* as used by the Onda VX767 */ | 193 | #define LCD_ONDAVX767 30 /* as used by the Onda VX767 */ |
193 | #define LCD_SSD1303 31 /* as used by the Sansa Clip */ | 194 | #define LCD_SSD1303 31 /* as used by the Sansa Clip */ |
194 | #define LCD_FUZE 32 /* as used by the Sansa Fuze */ | 195 | #define LCD_FUZE 32 /* as used by the Sansa Fuze */ |
195 | #define LCD_LYRE_PROTO1 33 /* as used by the Lyre */ | 196 | #define LCD_LYRE_PROTO1 33 /* as used by the Lyre prototype 1 */ |
196 | #define LCD_YH925 34 /* as used by Samsung YH-925 (similar to the H10 20GB) */ | 197 | #define LCD_YH925 34 /* as used by Samsung YH-925 (similar to the H10 20GB) */ |
197 | #define LCD_VIEW 35 /* as used by the Sansa View */ | 198 | #define LCD_VIEW 35 /* as used by the Sansa View */ |
198 | #define LCD_NANO2G 36 /* as used by the iPod Nano 2nd Generation */ | 199 | #define LCD_NANO2G 36 /* as used by the iPod Nano 2nd Generation */ |
200 | #define LCD_MINI2440 37 /* as used by the Mini2440 */ | ||
199 | 201 | ||
200 | /* LCD_PIXELFORMAT */ | 202 | /* LCD_PIXELFORMAT */ |
201 | #define HORIZONTAL_PACKING 1 | 203 | #define HORIZONTAL_PACKING 1 |
@@ -216,7 +218,7 @@ | |||
216 | 218 | ||
217 | /* CONFIG_I2C */ | 219 | /* CONFIG_I2C */ |
218 | #define I2C_NONE 0 /* For targets that do not use I2C - as the | 220 | #define I2C_NONE 0 /* For targets that do not use I2C - as the |
219 | Lyre prototype 1*/ | 221 | Lyre prototype 1 */ |
220 | #define I2C_PLAYREC 1 /* Archos Player/Recorder style */ | 222 | #define I2C_PLAYREC 1 /* Archos Player/Recorder style */ |
221 | #define I2C_ONDIO 2 /* Ondio style */ | 223 | #define I2C_ONDIO 2 /* Ondio style */ |
222 | #define I2C_COLDFIRE 3 /* Coldfire style */ | 224 | #define I2C_COLDFIRE 3 /* Coldfire style */ |
@@ -386,6 +388,8 @@ Lyre prototype 1*/ | |||
386 | #include "config-view.h" | 388 | #include "config-view.h" |
387 | #elif defined(LYRE_PROTO1) | 389 | #elif defined(LYRE_PROTO1) |
388 | #include "config-lyre_proto1.h" | 390 | #include "config-lyre_proto1.h" |
391 | #elif defined(MINI2440) | ||
392 | #include "config-mini2440.h" | ||
389 | #elif defined(SAMSUNG_YH820) | 393 | #elif defined(SAMSUNG_YH820) |
390 | #include "config-yh820.h" | 394 | #include "config-yh820.h" |
391 | #elif defined(SAMSUNG_YH920) | 395 | #elif defined(SAMSUNG_YH920) |
diff --git a/firmware/export/s3c2440.h b/firmware/export/s3c2440.h index 0589f3b6b0..5f595214a1 100644 --- a/firmware/export/s3c2440.h +++ b/firmware/export/s3c2440.h | |||
@@ -178,6 +178,41 @@ | |||
178 | #define DCDST3 (*(volatile unsigned long *)0x4B0000DC) /* DMA 3 current destination */ | 178 | #define DCDST3 (*(volatile unsigned long *)0x4B0000DC) /* DMA 3 current destination */ |
179 | #define DMASKTRIG3 (*(volatile unsigned long *)0x4B0000E0) /* DMA 3 mask trigger */ | 179 | #define DMASKTRIG3 (*(volatile unsigned long *)0x4B0000E0) /* DMA 3 mask trigger */ |
180 | 180 | ||
181 | #define DISRCC_LOC_AHB (0 << 1) | ||
182 | #define DISRCC_LOC_APB (1 << 1) | ||
183 | #define DISRCC_INC_AUTO (0 << 0) | ||
184 | #define DISRCC_INC_FIXED (1 << 0) | ||
185 | |||
186 | #define DIDSTC_CHK_INT_TC_ZERO (0 << 2) | ||
187 | #define DIDSTC_CHK_INT_AFTER_RELOAD (1 << 2) | ||
188 | #define DIDSTC_LOC_AHB (0 << 1) | ||
189 | #define DIDSTC_LOC_APB (1 << 1) | ||
190 | #define DIDSTC_INC_AUTO (0 << 0) | ||
191 | #define DIDSTC_INC_FIXED (1 << 0) | ||
192 | |||
193 | #define DCON_DMD_HS (1 << 31) | ||
194 | #define DCON_SYNC_APB (0 << 30) | ||
195 | #define DCON_SYNC_AHB (1 << 30) | ||
196 | #define DCON_INT (1 << 29) | ||
197 | #define DCON_TSZ (1 << 28) | ||
198 | #define DCON_SERVMODE_WHOLE (1 << 27) | ||
199 | #define DCON_HWSRCSEL (1 << 24) | ||
200 | #define DCON_HW_SEL (1 << 23) | ||
201 | #define DCON_NO_RELOAD (1 << 22) | ||
202 | #define DCON_DSZ_MASK (3 << 20) | ||
203 | #define DCON_DSZ_BYTE (0 << 20) | ||
204 | #define DCON_DSZ_HALF_WORD (1 << 20) | ||
205 | #define DCON_DSZ_WORD (2 << 20) | ||
206 | #define DCON_TC (1 << 0) | ||
207 | |||
208 | #define DSTAT_STAT_BUSY (1 << 20) | ||
209 | #define DSTAT_CURR_TC (1 << 0) | ||
210 | |||
211 | #define DMASKTRIG_STOP (1 << 2) | ||
212 | #define DMASKTRIG_ON (1 << 1) | ||
213 | #define DMASKTRIG_SW_TRIG (1 << 0) | ||
214 | |||
215 | |||
181 | /* Clock & Power Management */ | 216 | /* Clock & Power Management */ |
182 | 217 | ||
183 | #define LOCKTIME (*(volatile unsigned long *)0x4C000000) /* PLL lock time counter */ | 218 | #define LOCKTIME (*(volatile unsigned long *)0x4C000000) /* PLL lock time counter */ |
@@ -499,7 +534,14 @@ | |||
499 | #define SDIDSTA (*(volatile unsigned long *)0x5A000034) /* SDI data status */ | 534 | #define SDIDSTA (*(volatile unsigned long *)0x5A000034) /* SDI data status */ |
500 | #define SDIFSTA (*(volatile unsigned long *)0x5A000038) /* SDI FIFO status */ | 535 | #define SDIFSTA (*(volatile unsigned long *)0x5A000038) /* SDI FIFO status */ |
501 | #define SDIIMSK (*(volatile unsigned long *)0x5A00003C) /* SDI interrupt mask */ | 536 | #define SDIIMSK (*(volatile unsigned long *)0x5A00003C) /* SDI interrupt mask */ |
502 | #define SDIDAT (*(volatile unsigned char *)0x5A000040) /* SDI data */ | 537 | |
538 | /* SDI data - LE = Little Endian, BE = Big Endian */ | ||
539 | #define SDIDAT_LLE (*(volatile unsigned long *)0x5A000040) /* 32 bit */ | ||
540 | #define SDIDAT_HLE (*(volatile unsigned short *)0x5A000044) /* 16 */ | ||
541 | #define SDIDAT_BLE (*(volatile unsigned char *)0x5A000048) /* 8 */ | ||
542 | #define SDIDAT_LBE (*(volatile unsigned long *)0x5A00004C) /* 32 */ | ||
543 | #define SDIDAT_HBE (*(volatile unsigned short *)0x5A000041) /* 16 */ | ||
544 | #define SDIDAT_BBE (*(volatile unsigned char *)0x5A000043) /* 8 */ | ||
503 | 545 | ||
504 | /* AC97 Audio-CODEC Interface */ | 546 | /* AC97 Audio-CODEC Interface */ |
505 | 547 | ||
@@ -530,5 +572,18 @@ | |||
530 | #define TIMER_FREQ (49156800/2) | 572 | #define TIMER_FREQ (49156800/2) |
531 | #define TIMER234_PRESCALE 21 | 573 | #define TIMER234_PRESCALE 21 |
532 | 574 | ||
575 | /* I/O Port macros */ | ||
576 | |||
577 | #define GPIO_INPUT 0 | ||
578 | #define GPIO_OUTPUT 1 | ||
579 | #define GPIO_FUNCTION 2 | ||
580 | #define GPIO_ALT_FUNCTION 3 | ||
581 | |||
582 | #define GPIO_PULLUP_DISABLE 1 | ||
583 | #define GPIO_PULLUP_ENABLE 0 | ||
584 | |||
585 | #define S3C2440_GPIO_CONFIG(port,pin,function) port = ( (port & ~(3<<(pin*2)) ) | (function<<(pin*2)) ) | ||
586 | #define S3C2440_GPIO_PULLUP(port,pin,state) port = ( (port & ~(1<<pin ) ) | (state<<pin ) ) | ||
587 | |||
533 | 588 | ||
534 | #endif /* __S3C2440_H__ */ | 589 | #endif /* __S3C2440_H__ */ |