diff --git a/firmware/SOURCES b/firmware/SOURCES index aeb98a3562..ab9e722b0e 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES @@ -271,7 +271,7 @@ common/strlen.c target/arm/memset-arm.S target/arm/memset16-arm.S target/arm/memswap128-arm.S -#if CONFIG_I2C == I2C_PP5020 || CONFIG_I2C == I2C_PP5002 +#if CONFIG_I2C == I2C_PP5024 || CONFIG_I2C == I2C_PP5020 || CONFIG_I2C == I2C_PP5002 target/arm/i2c-pp.c #elif CONFIG_I2C == I2C_PNX0101 target/arm/pnx0101/i2c-pnx0101.c diff --git a/firmware/export/config-e200.h b/firmware/export/config-e200.h index c61b1376d5..d477289f01 100644 --- a/firmware/export/config-e200.h +++ b/firmware/export/config-e200.h @@ -84,8 +84,8 @@ /* Define this if you have a PortalPlayer PP5024 */ #define CONFIG_CPU PP5024 -/* Define this if you want to use the PP5020 i2c interface */ -#define CONFIG_I2C I2C_PP5020 +/* Define this if you want to use the PP5024 i2c interface */ +#define CONFIG_I2C I2C_PP5024 /* Type of mobile power */ #define CONFIG_BATTERY BATT_LIION750 diff --git a/firmware/export/config.h b/firmware/export/config.h index 9d537acdda..ceb63cd098 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h @@ -121,6 +121,7 @@ #define I2C_PP5020 5 /* PP5020 style */ #define I2C_PNX0101 6 /* PNX0101 style */ #define I2C_S3C2440 7 +#define I2C_PP5024 8 /* PP5024 style */ /* CONFIG_LED */ #define LED_REAL 1 /* SW controlled LED (Archos recorders, player) */ diff --git a/firmware/target/arm/i2c-pp.c b/firmware/target/arm/i2c-pp.c index fb3c89dd4a..07fa822ab3 100644 --- a/firmware/target/arm/i2c-pp.c +++ b/firmware/target/arm/i2c-pp.c @@ -197,6 +197,11 @@ void i2c_init(void) #if CONFIG_I2C == I2C_PP5020 outl(0x0, 0x600060a4); outl(0x80 | (0 << 8), 0x600060a4); +#elif CONFIG_I2C == I2C_PP5024 + /* Sansa OF sets this to 0x20 first, communicates with the AS3514 + then sets it to 0x23 - this still works fine though */ + outl(0x0, 0x600060a4); + outl(0x23, 0x600060a4); #endif spinlock_init(&i2c_mutex);