usb: add support for hardware handled SET ADDR/CONFIG
[maemo-rb.git] / firmware / export / config / gigabeats.h
blob9ee5142b34ef60f738cc89813b760b38d2495057
1 /*
2 * This config file is for toshiba Gigabeat S
3 */
5 #define TOSHIBA_GIGABEAT_S 1
7 #define MODEL_NAME "Toshiba Gigabeat S"
9 /* System source clock frequencies (Hz) */
10 #define CONFIG_CKIL_FREQ 32768 /* RTC Crystal, Tuner */
11 #define CONFIG_CKIH_FREQ 27000000 /* PLL Reference */
13 /* For Rolo and boot loader */
14 #define MODEL_NUMBER 21
16 /* define this if you use an ATA controller */
17 #define CONFIG_STORAGE STORAGE_ATA
19 /*define this if the ATA controller and method of USB access support LBA48 */
20 #define HAVE_LBA48
22 /* define this if you have a bitmap LCD display */
23 #define HAVE_LCD_BITMAP
25 /* define this if you have a colour LCD */
26 #define HAVE_LCD_COLOR
28 /* define this if you want album art for this target */
29 #define HAVE_ALBUMART
31 /* define this to enable bitmap scaling */
32 #define HAVE_BMP_SCALING
34 /* define this to enable JPEG decoding */
35 #define HAVE_JPEG
37 /* define this if you have access to the quickscreen */
38 #define HAVE_QUICKSCREEN
40 /* define this if you would like tagcache to build on this target */
41 #define HAVE_TAGCACHE
43 /* define this if the target has volume keys which can be used in the lists */
44 #define HAVE_VOLUME_IN_LIST
46 /* LCD dimensions */
47 #define LCD_WIDTH 240
48 #define LCD_HEIGHT 320
49 #define LCD_DEPTH 16 /* 65k colours */
50 #define LCD_PIXELFORMAT RGB565 /* rgb565 */
52 #define CONFIG_KEYPAD GIGABEAT_S_PAD
54 /* Define this to enable morse code input */
55 #define HAVE_MORSE_INPUT
57 /* Define this if you do software codec */
58 #define CONFIG_CODEC SWCODEC
60 /* define this if you have a real-time clock */
61 #define CONFIG_RTC RTC_MC13783
63 /* Define if the device can wake from an RTC alarm */
64 #define HAVE_RTC_ALARM
66 /* Define this for LCD backlight available */
67 #define HAVE_BACKLIGHT
69 /* define this if you have a disk storage, i.e. something
70 that needs spinups and can cause skips when shaked */
71 #define HAVE_DISK_STORAGE
73 /* Define this if you have a software controlled poweroff */
74 #define HAVE_SW_POWEROFF
76 /* The number of bytes reserved for loadable codecs */
77 #define CODEC_SIZE 0x100000
79 /* The number of bytes reserved for loadable plugins */
80 #define PLUGIN_BUFFER_SIZE 0x80000
82 #define AB_REPEAT_ENABLE
84 /* Define this if you have a SI4700 fm radio tuner */
85 #define CONFIG_TUNER SI4700
87 #define HAVE_RDS_CAP
88 #define RDS_ISR_PROCESSING
90 /* Define this if you have the WM8978 audio codec */
91 #define HAVE_WM8978
93 /* Define bitmask of input sources - recordable bitmask can be defined
94 explicitly if different */
95 #define INPUT_SRC_CAPS SRC_CAP_FMRADIO
97 /* define the bitmask of hardware sample rates */
98 #define HW_SAMPR_CAPS (SAMPR_CAP_48 | SAMPR_CAP_44 | SAMPR_CAP_32 | \
99 SAMPR_CAP_24 | SAMPR_CAP_22 | SAMPR_CAP_16 | \
100 SAMPR_CAP_12 | SAMPR_CAP_11 | SAMPR_CAP_8)
102 /* define the bitmask of recording sample rates */
103 #define REC_SAMPR_CAPS HW_SAMPR_CAPS /* Same as playback */
105 /* define default recording levels */
106 #define DEFAULT_REC_LEFT_GAIN 0
107 #define DEFAULT_REC_RIGHT_GAIN 0
109 /* Define this if you have recording capability */
110 #define HAVE_RECORDING
112 /* Define this if your LCD can be put to sleep. */
113 #define HAVE_LCD_SLEEP
114 /* We don't use a setting but a fixed delay after the backlight has
115 * turned off */
116 #define LCD_SLEEP_TIMEOUT (2*HZ)
118 /* Define this if your LCD can be enabled/disabled */
119 #define HAVE_LCD_ENABLE
121 #ifndef BOOTLOADER
123 /* define this if you can flip your LCD */
124 #define HAVE_LCD_FLIP
126 /* define this if you can invert the colours on your LCD */
127 #define HAVE_LCD_INVERT
129 /* Define this if your LCD can set contrast */
130 #define HAVE_LCD_CONTRAST
132 /* Main LCD contrast range and defaults */
133 #define MIN_CONTRAST_SETTING 0
134 #define MAX_CONTRAST_SETTING 63
135 #define DEFAULT_CONTRAST_SETTING 47 /* Match boot contrast */
137 /* Define this for LCD backlight brightness available */
138 #define HAVE_BACKLIGHT_BRIGHTNESS
140 /* Main LCD backlight brightness range and defaults */
141 #define MIN_BRIGHTNESS_SETTING 1
142 #define MAX_BRIGHTNESS_SETTING 24
143 #define DEFAULT_BRIGHTNESS_SETTING 12
145 /* Implementation-defined fading type with bool settings */
146 #define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_TARGET
148 #define HAVE_HEADPHONE_DETECTION
149 #endif /* BOOTLOADER */
151 #define CONFIG_CPU IMX31L
153 /* Define this if you want to use imx31l's i2c interface */
154 #define CONFIG_I2C I2C_IMX31L
156 /* Define the bitmask of modules used */
157 #define SPI_MODULE_MASK (USE_CSPI2_MODULE | USE_CSPI3_MODULE)
158 #define I2C_MODULE_MASK (USE_I2C1_MODULE | USE_I2C2_MODULE)
159 #define GPIO_EVENT_MASK (USE_GPIO1_EVENTS)
161 /* Define this if target has an additional number of threads specific to it */
162 #define TARGET_EXTRA_THREADS 1
164 /* Type of mobile power - check this out */
165 #define BATTERY_CAPACITY_DEFAULT 700 /* default battery capacity */
166 #define BATTERY_CAPACITY_MIN 700 /* min. capacity selectable */
167 #define BATTERY_CAPACITY_MAX 1200 /* max. capacity selectable */
168 #define BATTERY_CAPACITY_INC 25 /* capacity increment */
169 #define BATTERY_TYPES_COUNT 1 /* only one type */
171 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
173 /* TODO: have a proper status displayed in the bootloader and have it
174 * work! */
175 /* Charging implemented in a target-specific algorithm */
176 #define CONFIG_CHARGING CHARGING_TARGET
178 #define HAVE_USB_CHARGING_ENABLE
180 /* define this if the hardware can be powered off while charging */
181 /* We don't charge while powered down so maybe implement a
182 finish-charging-and-then-poweroff mode */
183 #define HAVE_POWEROFF_WHILE_CHARGING
185 /* The size of the flash ROM */
186 #define FLASH_SIZE 0x200000
188 /* Define this to the CPU frequency */
189 #define CPU_FREQ 264000000 /* Set by retailOS loader */
191 #define FREQ cpu_frequency
193 /* Button that exposures boot partition rather than data during session */
194 #define USB_BL_INSTALL_MODE_BTN BUTTON_VOL_DOWN
196 /* define this if the unit can be powered or charged via USB */
197 #define HAVE_USB_POWER
198 #define USBPOWER_BUTTON BUTTON_MENU
200 #ifndef BOOTLOADER
201 #define USBPOWER_BTN_IGNORE USB_BL_INSTALL_MODE_BTN
202 #else
203 /* Disable charging-only mode detection in bootloader */
204 #define USBPOWER_BTN_IGNORE (BUTTON_MAIN | BUTTON_REMOTE)
205 #endif
207 /* define this if the unit has a battery switch or battery can be removed
208 * when running */
209 #define HAVE_BATTERY_SWITCH
211 /* USB On-the-go */
212 #define CONFIG_USBOTG USBOTG_ARC
214 /* enable these for the usb stack */
215 #define USE_ROCKBOX_USB
216 #define HAVE_USBSTACK
217 /* usb stack and driver settings */
218 #define USB_PORTSCX_PHY_TYPE PORTSCX_PTS_ULPI
219 #define USB_VENDOR_ID 0x0930
220 #define USB_PRODUCT_ID 0x0010
221 #define HAVE_USB_HID_MOUSE
222 #ifdef BOOTLOADER
223 /* enable bootloader USB mode - ONLY define when also BOOTLOADER */
224 #define HAVE_BOOTLOADER_USB_MODE
225 #endif
227 /* Define this if you have ATA power-off control */
228 #define HAVE_ATA_POWER_OFF
230 /* Define this to add support for ATA DMA */
231 #define HAVE_ATA_DMA
233 #define CONFIG_LCD LCD_GIGABEATS
235 /* Offset ( in the firmware file's header ) to the file CRC */
236 #define FIRMWARE_OFFSET_FILE_CRC 0
238 /* Offset ( in the firmware file's header ) to the real data */
239 #define FIRMWARE_OFFSET_FILE_DATA 8
241 //#define HAVE_SERIAL
242 #define HAVE_VOLUME_IN_LIST
244 /*Remove Comments from UART_INT to enable the UART interrupts,*/
245 /*otherwise iterrupts will be disabled. For now we will test */
246 /*UART state by polling the registers, and if necessary update this */
247 /*method by using the interrupts instead*/
248 //#define UART_INT
250 /* Define this if you have adjustable CPU frequency */
251 /* #define HAVE_ADJUSTABLE_CPU_FREQ */
253 #define HAVE_PCM_DMA_ADDRESS
254 #define HAVE_PCM_REC_DMA_ADDRESS
256 #define BOOTFILE_EXT "gigabeat"
257 #define BOOTFILE "rockbox." BOOTFILE_EXT
258 #define BOOTDIR "/.rockbox"
260 /* Define this if a programmable hotkey is mapped */
261 #define HAVE_HOTKEY