From 28f6ae49ec1b1d3464add2941eb015bab56f8016 Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Sun, 28 Oct 2007 11:08:10 +0000 Subject: Initial work on a port to the Logik DAX 1GB MP3/DAB player. The bootloader build compiles and runs (but only displays some debugging info), and the LCD and ADC drivers are working. Two different bootloader builds are possible: 1) The default build is just a test application for uploading to the device via tcctool; 2) Adding -DTCCBOOT to EXTRA_DEFINES in the build directory Makefile will compile the bootloader so that it can be appended to the end of the original firmware and installed on the device, dual-booting. This commit also includes some work by Hein-Pieter van Braam on a port to the iAudio 7, but that doesn't build yet. A large part of these ports will be generic to all TCC77x devices - see the TelechipsInfo wiki page for some other devices with this CPU. NOTE: Compiling these builds requires an arm-elf-gcc with armv5 support - the current version of rockboxdev.sh compiles such a gcc. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15339 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/config-logikdax.h | 107 ++++++++++++++++++++++++++++++++++++++ firmware/export/config.h | 21 +++++++- firmware/export/cpu.h | 3 ++ firmware/export/tcc77x.h | 81 +++++++++++++++++++++++++++++ 4 files changed, 211 insertions(+), 1 deletion(-) create mode 100644 firmware/export/config-logikdax.h create mode 100644 firmware/export/tcc77x.h (limited to 'firmware/export') diff --git a/firmware/export/config-logikdax.h b/firmware/export/config-logikdax.h new file mode 100644 index 0000000000..384dac4e11 --- /dev/null +++ b/firmware/export/config-logikdax.h @@ -0,0 +1,107 @@ +/* + * This config file is for the Logik DAX MP3/DAB + */ +#define TARGET_TREE /* this target is using the target tree system */ + +/* For Rolo and boot loader */ +#define MODEL_NUMBER 23 + +/* define this if you have recording possibility */ +//#define HAVE_RECORDING + +/* Define bitmask of input sources - recordable bitmask can be defined + explicitly if different */ +//#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_LINEIN | SRC_CAP_SPDIF) + +/* define this if you have a bitmap LCD display */ +#define HAVE_LCD_BITMAP + +/* 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 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 a flash memory storage */ +#define HAVE_FLASH_STORAGE + +/* LCD dimensions */ +#define LCD_WIDTH 128 +#define LCD_HEIGHT 64 +#define LCD_DEPTH 1 + +#define LCD_PIXELFORMAT VERTICAL_PACKING + +/* define this to indicate your device's keypad */ +#define CONFIG_KEYPAD LOGIK_DAX_PAD + +/* define this if you have a real-time clock */ +#define CONFIG_RTC RTC_TCC77X + +/* define this if you have RTC RAM available for settings */ +//#define HAVE_RTC_RAM + +/* The number of bytes reserved for loadable plugins */ +#define PLUGIN_BUFFER_SIZE 0x8000 + +#define AB_REPEAT_ENABLE 1 + +/* Define this if you do software codec */ +#define CONFIG_CODEC SWCODEC + +/* Define this for LCD backlight available */ +#define HAVE_BACKLIGHT + +#define CONFIG_I2C I2C_TCC77X + +#define BATTERY_CAPACITY_DEFAULT 1500 /* default battery capacity */ +#define BATTERY_CAPACITY_MIN 1500 /* min. capacity selectable */ +#define BATTERY_CAPACITY_MAX 3200 /* max. capacity selectable */ +#define BATTERY_CAPACITY_INC 50 /* capacity increment */ +#define BATTERY_TYPES_COUNT 1 /* only one type */ + +/* define this if the unit should not shut down on low battery. */ +#define NO_LOW_BATTERY_SHUTDOWN + +#ifndef SIMULATOR + +/* Define this if you have a TCC773L */ +#define CONFIG_CPU TCC773L + +/* Define this if you have ATA power-off control */ +#define HAVE_ATA_POWER_OFF + +/* Define this to the CPU frequency */ +#define CPU_FREQ 120000000 + +/* Offset ( in the firmware file's header ) to the file length */ +#define FIRMWARE_OFFSET_FILE_LENGTH 0 + +/* Offset ( in the firmware file's header ) to the file CRC */ +#define FIRMWARE_OFFSET_FILE_CRC 4 + +/* Offset ( in the firmware file's header ) to the real data */ +#define FIRMWARE_OFFSET_FILE_DATA 6 + +/* The start address index for ROM builds */ +/* #define ROM_START 0x11010 for behind original Archos */ +#define ROM_START 0x7010 /* for behind BootBox */ + +/* Software controlled LED */ +#define CONFIG_LED LED_VIRTUAL + +#define CONFIG_LCD LCD_SSD1815 + +#define BOOTFILE_EXT "logik" +#define BOOTFILE "rockbox." BOOTFILE_EXT +#define BOOTDIR "/" + +#endif /* SIMULATOR */ diff --git a/firmware/export/config.h b/firmware/export/config.h index 05938d14ec..538c75d08a 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h @@ -51,6 +51,8 @@ #define DSC25 25 #define DM320 320 #define IMX31L 31 +#define TCC771L 771 +#define TCC773L 773 /* CONFIG_KEYPAD */ #define PLAYER_PAD 1 @@ -71,6 +73,8 @@ #define ARCHOS_AV300_PAD 16 #define MROBE500_PAD 17 #define GIGABEAT_S_PAD 18 +#define LOGIK_DAX_PAD 19 +#define IAUDIO67_PAD 20 /* CONFIG_REMOTE_KEYPAD */ #define H100_REMOTE 1 @@ -103,6 +107,8 @@ #define LCD_DSC25 16 /* as used by Archos AV300 */ #define LCD_C200 17 /* as used by Sandisk Sansa c200 */ #define LCD_MROBE500 18 /* as used by Olympus M:Robe 500i */ +#define LCD_LOGIKDAX 19 /* as used by Logik DAX - SSD1815 */ +#define LCD_IAUDIO67 20 /* as used by iAudio 6/7 - unknown */ /* LCD_PIXELFORMAT */ #define HORIZONTAL_PACKING 1 @@ -122,6 +128,7 @@ #define I2C_S3C2440 7 #define I2C_PP5024 8 /* PP5024 style */ #define I2C_IMX31L 9 +#define I2C_TCC77X 10 /* CONFIG_LED */ #define LED_REAL 1 /* SW controlled LED (Archos recorders, player) */ @@ -141,6 +148,7 @@ #define RTC_DS1339_DS3231 7 /* h1x0 RTC mod */ #define RTC_IMX31L 8 #define RTC_RX5X348AB 9 +#define RTC_TCC77X 10 /* USB On-the-go */ #define USBOTG_ISP1362 1362 /* iriver H300 */ @@ -210,6 +218,10 @@ #include "config-tpj1022.h" #elif defined(MROBE_500) #include "config-mrobe500.h" +#elif defined(LOGIK_DAX) +#include "config-logikdax.h" +#elif defined(IAUDIO_7) +#include "config-iaudio7.h" #else /* no known platform */ #endif @@ -309,6 +321,11 @@ #define CPU_PP502x #endif +/* define for all cpus from TCC77X family */ +#if (CONFIG_CPU == TCC771L) || (CONFIG_CPU == TCC773L) +#define CPU_TCC77X +#endif + /* define for all cpus from ARM7TDMI family (for specific optimisations) */ #if defined(CPU_PP) || (CONFIG_CPU == PNX0101) || (CONFIG_CPU == DSC25) #define CPU_ARM7TDMI @@ -316,7 +333,8 @@ /* define for all cpus from ARM family */ #if defined(CPU_PP) || (CONFIG_CPU == PNX0101) || (CONFIG_CPU == S3C2440) \ - || (CONFIG_CPU == DSC25) || (CONFIG_CPU == IMX31L) || (CONFIG_CPU == DM320) + || (CONFIG_CPU == DSC25) || (CONFIG_CPU == IMX31L) || (CONFIG_CPU == DM320) \ + || defined(CPU_TCC77X) #define CPU_ARM #endif @@ -342,6 +360,7 @@ (((CONFIG_CPU == SH7034) && !defined(PLUGIN)) || /* SH1 archos: core only */ \ defined(CPU_COLDFIRE) || /* Coldfire: core, plugins, codecs */ \ defined(CPU_PP) || /* PortalPlayer: core, plugins, codecs */ \ + defined(CPU_TCC77X) || /* Telechips: core, plugins, codecs */ \ (CONFIG_CPU == PNX0101)) #define ICODE_ATTR __attribute__ ((section(".icode"))) #define ICONST_ATTR __attribute__ ((section(".irodata"))) diff --git a/firmware/export/cpu.h b/firmware/export/cpu.h index 893e7ffaa8..84229378ec 100644 --- a/firmware/export/cpu.h +++ b/firmware/export/cpu.h @@ -48,3 +48,6 @@ #if CONFIG_CPU == IMX31L #include "imx31l.h" #endif +#ifdef CPU_TCC77X +#include "tcc77x.h" +#endif diff --git a/firmware/export/tcc77x.h b/firmware/export/tcc77x.h new file mode 100644 index 0000000000..1ab1888649 --- /dev/null +++ b/firmware/export/tcc77x.h @@ -0,0 +1,81 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2007 Dave Chapman + * + * All files in this archive are subject to the GNU General Public License. + * See the file COPYING in the source tree root for full license agreement. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#ifndef __TCC77X_H__ +#define __TCC77X_H__ + +/* General-purpose IO */ + +#define GPIOA (*(volatile unsigned long *)0x80000300) +#define GPIOB (*(volatile unsigned long *)0x80000310) +#define GPIOC (*(volatile unsigned long *)0x80000320) +#define GPIOD (*(volatile unsigned long *)0x80000330) +#define GPIOE (*(volatile unsigned long *)0x80000340) + +#define GPIOA_DIR (*(volatile unsigned long *)0x80000304) +#define GPIOB_DIR (*(volatile unsigned long *)0x80000314) +#define GPIOC_DIR (*(volatile unsigned long *)0x80000324) +#define GPIOD_DIR (*(volatile unsigned long *)0x80000334) +#define GPIOE_DIR (*(volatile unsigned long *)0x80000344) + +#define GPIOA_FUNC (*(volatile unsigned long *)0x80000308) +#define GPIOB_FUNC (*(volatile unsigned long *)0x80000318) +#define GPIOC_FUNC (*(volatile unsigned long *)0x80000328) +#define GPIOD_FUNC (*(volatile unsigned long *)0x80000338) +#define GPIOE_FUNC (*(volatile unsigned long *)0x80000348) + +#define BMI (*(volatile unsigned long *)0x80000364) + +/* Clock Generator */ + +#define CLKCTRL (*(volatile unsigned long *)0x80000400) +#define PLL0CFG (*(volatile unsigned long *)0x80000404) +#define CLKDIV0 (*(volatile unsigned long *)0x8000040c) +#define MODECTR (*(volatile unsigned long *)0x80000410) +#define BCLKCTR (*(volatile unsigned long *)0x80000414) +#define SWRESET (*(volatile unsigned long *)0x80000418) +#define PCLKCFG0 (*(volatile unsigned long *)0x8000041c) +#define PCLKCFG1 (*(volatile unsigned long *)0x80000420) +#define PCLKCFG2 (*(volatile unsigned long *)0x80000424) +#define PCLKCFG3 (*(volatile unsigned long *)0x80000428) +#define PCLKCFG4 (*(volatile unsigned long *)0x8000042c) +#define PCLKCFG5 (*(volatile unsigned long *)0x80000430) +#define PCLKCFG6 (*(volatile unsigned long *)0x80000434) + +/* ADC */ + +#define ADCCON (*(volatile unsigned long *)0x80000a00) +#define ADCDATA (*(volatile unsigned long *)0x80000a04) +#define ADCCONA (*(volatile unsigned long *)0x80000a80) +#define ADCSTATUS (*(volatile unsigned long *)0x80000a84) +#define ADCCFG (*(volatile unsigned long *)0x80000a88) + + +/* Memory Controller */ +#define SDCFG (*(volatile unsigned long *)0xf0000000) +#define SDFSM (*(volatile unsigned long *)0xf0000004) +#define MCFG (*(volatile unsigned long *)0xf0000008) +#define TST (*(volatile unsigned long *)0xf000000c) +#define CSCFG0 (*(volatile unsigned long *)0xf0000010) +#define CSCFG1 (*(volatile unsigned long *)0xf0000014) +#define CSCFG2 (*(volatile unsigned long *)0xf0000018) +#define CSCFG3 (*(volatile unsigned long *)0xf000001c) +#define CLKCFG (*(volatile unsigned long *)0xf0000020) +#define SDCMD (*(volatile unsigned long *)0xf0000024) + +#endif -- cgit v1.2.3