summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
authorAmaury Pouly <pamaury@rockbox.org>2011-05-01 13:02:46 +0000
committerAmaury Pouly <pamaury@rockbox.org>2011-05-01 13:02:46 +0000
commit08fb3f65745a237e2c1eae55d856ff27702246e5 (patch)
treea56ce11ac20e4df0e36de9195306c10b71752538 /firmware/export
parentc0838cbfd8e45621fe3450aee1bf9458ff420d16 (diff)
downloadrockbox-08fb3f65745a237e2c1eae55d856ff27702246e5.zip
rockbox-08fb3f65745a237e2c1eae55d856ff27702246e5.tar.gz
rockbox-08fb3f65745a237e2c1eae55d856ff27702246e5.tar.bz2
rockbox-08fb3f65745a237e2c1eae55d856ff27702246e5.tar.xz
Sansa Fuze+: initial commit (bootloader only, LCD basically working)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29808 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/config.h15
-rw-r--r--firmware/export/config/sansafuzeplus.h183
-rw-r--r--firmware/export/cpu.h3
-rw-r--r--firmware/export/imx233.h52
4 files changed, 250 insertions, 3 deletions
diff --git a/firmware/export/config.h b/firmware/export/config.h
index c8531b8..003f683 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -74,6 +74,7 @@
#define AS3525 3525
#define AT91SAM9260 9260
#define AS3525v2 35252
+#define IMX233 233
/* platforms
* bit fields to allow PLATFORM_HOSTED to be OR'ed e.g. with a
@@ -136,6 +137,7 @@
#define ANDROID_PAD 45
#define SDL_PAD 46
#define MPIO_HD300_PAD 47
+#define SANSA_FUZEPLUS_PAD 48
/* CONFIG_REMOTE_KEYPAD */
#define H100_REMOTE 1
@@ -219,6 +221,7 @@
#define LCD_HDD6330 38 /* as used by the Philips HDD6330 */
#define LCD_VIBE500 39 /* as used by the Packard Bell Vibe 500 */
#define LCD_IPOD6G 40 /* as used by the iPod Nano 2nd Generation */
+#define LCD_FUZEPLUS 41
/* LCD_PIXELFORMAT */
#define HORIZONTAL_PACKING 1
@@ -256,6 +259,7 @@ Lyre prototype 1 */
#define I2C_JZ47XX 14 /* Ingenic Jz47XX style */
#define I2C_AS3525 15
#define I2C_S5L8702 16 /* Same as S5L8700, but with two channels */
+#define I2C_IMX233 17
/* CONFIG_LED */
#define LED_REAL 1 /* SW controlled LED (Archos recorders, player) */
@@ -287,14 +291,15 @@ Lyre prototype 1 */
#define RTC_JZ47XX 16 /* Ingenic Jz47XX */
#define RTC_NANO2G 17 /* This seems to be a PCF5063x */
#define RTC_D2 18 /* Either PCF50606 or PCF50635 */
-#define RTC_S35380A 19
+#define RTC_S35380A 19
+#define RTC_IMX233 20
/* USB On-the-go */
#define USBOTG_M66591 6591 /* M:Robe 500 */
#define USBOTG_ISP1362 1362 /* iriver H300 */
#define USBOTG_ISP1583 1583 /* Creative Zen Vision:M */
#define USBOTG_M5636 5636 /* iAudio X5 */
-#define USBOTG_ARC 5020 /* PortalPlayer 502x */
+#define USBOTG_ARC 5020 /* PortalPlayer 502x and IMX233 */
#define USBOTG_JZ4740 4740 /* Ingenic Jz4740/Jz4732 */
#define USBOTG_AS3525 3525 /* AMS AS3525 */
#define USBOTG_AS3525v2 3535 /* AMS AS3525v2 FIXME : same as S3C6400X */
@@ -419,6 +424,8 @@ Lyre prototype 1 */
#include "config/sansafuze.h"
#elif defined(SANSA_FUZEV2)
#include "config/sansafuzev2.h"
+#elif defined(SANSA_FUZEPLUS)
+#include "config/sansafuzeplus.h"
#elif defined(SANSA_C200V2)
#include "config/sansac200v2.h"
#elif defined(SANSA_VIEW)
@@ -526,7 +533,8 @@ Lyre prototype 1 */
#elif defined(CPU_TCC77X) || defined(CPU_TCC780X) || (CONFIG_CPU == DM320) \
|| (CONFIG_CPU == AT91SAM9260) || (CONFIG_CPU == AS3525v2) \
- || (CONFIG_CPU == S5L8702) || (CONFIG_PLATFORM & PLATFORM_ANDROID)
+ || (CONFIG_CPU == S5L8702) || (CONFIG_PLATFORM & PLATFORM_ANDROID) \
+ || (CONFIG_CPU == IMX233)
#define CPU_ARM
#define ARM_ARCH 5 /* ARMv5 */
@@ -824,6 +832,7 @@ Lyre prototype 1 */
(CONFIG_CPU == AS3525v2 && !defined(PLUGIN) && !defined(CODEC) && !defined(BOOTLOADER)) || /* AS3525v2: core only */ \
(CONFIG_CPU == PNX0101) || \
(CONFIG_CPU == TCC7801) || \
+ (CONFIG_CPU == IMX233) || \
defined(CPU_S5L870X)) || /* Samsung S5L8700: core, plugins, codecs */ \
(CONFIG_CPU == JZ4732 && !defined(PLUGIN) && !defined(CODEC)) /* Jz4740: core only */
#define ICODE_ATTR __attribute__ ((section(".icode")))
diff --git a/firmware/export/config/sansafuzeplus.h b/firmware/export/config/sansafuzeplus.h
new file mode 100644
index 0000000..d39dc79
--- /dev/null
+++ b/firmware/export/config/sansafuzeplus.h
@@ -0,0 +1,183 @@
+/*
+ * This config file is for the Sandisk Sansa Fuze+
+ */
+#define TARGET_TREE /* this target is using the target tree system */
+
+/* For Rolo and boot loader */
+#define MODEL_NUMBER 72
+#define MODEL_NAME "Sandisk Sansa Fuze+"
+
+#define HW_SAMPR_CAPS SAMPR_CAP_ALL
+
+/* define this if you have recording possibility */
+#define HAVE_RECORDING
+
+#define REC_SAMPR_CAPS SAMPR_CAP_ALL
+
+/* Default recording levels */
+#define DEFAULT_REC_MIC_GAIN 23
+#define DEFAULT_REC_LEFT_GAIN 23
+#define DEFAULT_REC_RIGHT_GAIN 23
+
+/* Define bitmask of input sources - recordable bitmask can be defined
+ explicitly if different */
+#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FMRADIO)
+
+/* define this if you have a bitmap LCD display */
+#define HAVE_LCD_BITMAP
+/* define this if you have a colour LCD */
+#define HAVE_LCD_COLOR
+
+#ifndef BOOTLOADER/* define this if you want album art for this target */
+#define HAVE_ALBUMART
+
+/* define this to enable bitmap scaling */
+#define HAVE_BMP_SCALING
+
+/* define this to enable JPEG decoding */
+#define HAVE_JPEG
+
+/* define this if you have a light associated with the buttons */
+#define HAVE_BUTTON_LIGHT
+
+/* define this if you have access to the quickscreen */
+#define HAVE_QUICKSCREEN
+
+/* define this if you have access to the pitchscreen */
+#define HAVE_PITCHSCREEN
+
+/* define this if you would like tagcache to build on this target */
+#define HAVE_TAGCACHE
+
+/* define this if you have LCD enable function */
+#define HAVE_LCD_ENABLE
+
+/* Define this if your LCD can be put to sleep. HAVE_LCD_ENABLE
+ should be defined as well.
+#define HAVE_LCD_SLEEP
+#define HAVE_LCD_SLEEP_SETTING
+*/
+
+/* define this if you can flip your LCD
+#define HAVE_LCD_FLIP
+*/
+
+/* define this if you can invert the colours on your LCD
+#define HAVE_LCD_INVERT
+*/
+
+/* define this if you have a real-time clock */
+#define CONFIG_RTC RTC_IMX233
+
+/* There is no hardware tone control */
+#define HAVE_SW_TONE_CONTROLS
+
+#endif /* !BOOTLOADER */
+
+#define CONFIG_KEYPAD SANSA_FUZEPLUS_PAD
+
+/* Define this to enable morse code input */
+#define HAVE_MORSE_INPUT
+
+/* Define this if you do software codec */
+#define CONFIG_CODEC SWCODEC
+
+
+/* LCD dimensions */
+#define LCD_WIDTH 240
+#define LCD_HEIGHT 320
+#define LCD_DEPTH 16 /* 65536 colours */
+#define LCD_PIXELFORMAT RGB565 /* rgb565 */
+
+/* Define this if you have a software controlled poweroff */
+#define HAVE_SW_POWEROFF
+
+/* The number of bytes reserved for loadable codecs */
+#define CODEC_SIZE 0
+
+/* The number of bytes reserved for loadable plugins */
+#define PLUGIN_BUFFER_SIZE 0
+
+#define AB_REPEAT_ENABLE
+
+/* Define this for LCD backlight available */
+#define HAVE_BACKLIGHT
+#define HAVE_BACKLIGHT_BRIGHTNESS
+
+/* Main LCD backlight brightness range and defaults */
+#define MIN_BRIGHTNESS_SETTING 1
+#define MAX_BRIGHTNESS_SETTING 100 /* unsure */
+#define DEFAULT_BRIGHTNESS_SETTING 60 /* fixme */
+
+/* Which backlight fading type? */
+#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_SETTING
+
+/* define this if you have a flash memory storage */
+#define HAVE_FLASH_STORAGE
+
+/* define this if the flash memory uses the SecureDigital Memory Card protocol */
+#define CONFIG_STORAGE STORAGE_SD
+
+/* todo */
+#define BATTERY_CAPACITY_DEFAULT 550 /* default battery capacity */
+#define BATTERY_CAPACITY_MIN 550 /* min. capacity selectable */
+#define BATTERY_CAPACITY_MAX 550 /* max. capacity selectable */
+#define BATTERY_CAPACITY_INC 0 /* capacity increment */
+#define BATTERY_TYPES_COUNT 1 /* only one type */
+
+/* Charging implemented in a target-specific algorithm */
+#define CONFIG_CHARGING CHARGING_TARGET
+
+/* define this if the unit can be powered or charged via USB */
+#define HAVE_USB_POWER
+
+/* Define this if you have an IMX233*/
+#define CONFIG_CPU IMX233
+
+/* Define this if you want to use the IMX233 i2c interface */
+#define CONFIG_I2C I2C_IMX233
+
+/* define current usage levels (based on battery bench) */
+#define CURRENT_NORMAL 35
+#define CURRENT_BACKLIGHT 30
+#define CURRENT_RECORD CURRENT_NORMAL
+
+/* maximum charging current */
+#define CURRENT_MAX_CHG 200
+
+/* Define this to the CPU frequency */
+#define CPU_FREQ 454000000
+
+/* Type of LCD */
+#define CONFIG_LCD LCD_FUZEPLUS
+
+/* Offset ( in the firmware file's header ) to the file CRC and data. These are
+ only used when loading the old format rockbox.e200 file */
+#define FIRMWARE_OFFSET_FILE_CRC 0x0
+#define FIRMWARE_OFFSET_FILE_DATA 0x8
+
+#ifndef BOOTLOADER
+#define HAVE_MULTIDRIVE
+#define NUM_DRIVES 2
+#define HAVE_HOTSWAP
+#endif
+
+/* USB On-the-go */
+#define CONFIG_USBOTG USBOTG_ARC
+
+/* enable these for the experimental usb stack */
+#define HAVE_USBSTACK
+//#define USB_HANDLED_BY_OF
+#define USE_ROCKBOX_USB
+#define USB_VENDOR_ID 0x0781
+#define USB_PRODUCT_ID 0x74e1
+#define HAVE_USB_HID_MOUSE
+
+/* Define this if you have adjustable CPU frequency */
+#define HAVE_ADJUSTABLE_CPU_FREQ
+
+#define BOOTFILE_EXT "sansa"
+#define BOOTFILE "rockbox." BOOTFILE_EXT
+#define BOOTDIR "/.rockbox"
+
+#define INCLUDE_TIMEOUT_API
diff --git a/firmware/export/cpu.h b/firmware/export/cpu.h
index 59d2103..777e36f 100644
--- a/firmware/export/cpu.h
+++ b/firmware/export/cpu.h
@@ -74,3 +74,6 @@
#if CONFIG_CPU == AS3525v2
#include "as3525v2.h"
#endif
+#if CONFIG_CPU == IMX233
+#include "imx233.h"
+#endif
diff --git a/firmware/export/imx233.h b/firmware/export/imx233.h
new file mode 100644
index 0000000..182442c
--- /dev/null
+++ b/firmware/export/imx233.h
@@ -0,0 +1,52 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ * $Id$
+ *
+ * Copyright (C) 2011 by Amaury Pouly
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+#ifndef __IMX233_H__
+#define __IMX233_H__
+
+#define IRAM_ORIG 0
+#define IRAM_SIZE 0x8000
+#define DRAM_ORIG 0x40000000
+#define DRAM_SIZE 0x20000000
+
+#define TTB_BASE_ADDR (DRAM_ORIG + (MEMORYSIZE*0x100000) - TTB_SIZE)
+#define TTB_SIZE (0x4000)
+#define TTB_BASE ((unsigned long *)TTB_BASE_ADDR)
+#define FRAME_SIZE (240*320*2)
+
+/* USBOTG */
+#define USB_QHARRAY_ATTR __attribute__((section(".qharray"),nocommon,aligned(2048)))
+#define USB_NUM_ENDPOINTS 5
+#define USB_DEVBSS_ATTR NOCACHEBSS_ATTR
+#define USB_BASE 0x80080000
+/*
+#define QHARRAY_SIZE ((64*USB_NUM_ENDPOINTS*2 + 2047) & (0xffffffff - 2047))
+#define QHARRAY_PHYS_ADDR ((FRAME_PHYS_ADDR - QHARRAY_SIZE) & (0xffffffff - 2047))
+*/
+
+#define __REG_SET(reg) (*((volatile uint32_t *)(&reg + 1)))
+#define __REG_CLR(reg) (*((volatile uint32_t *)(&reg + 2)))
+#define __REG_TOG(reg) (*((volatile uint32_t *)(&reg + 3)))
+
+#define __BLOCK_SFTRST (1 << 31)
+#define __BLOCK_CLKGATE (1 << 30)
+
+
+#endif /* __IMX233_H__ */