From b7642c0bdf7560c5645eecd59d95760dacd451a4 Mon Sep 17 00:00:00 2001 From: Markus Helgesson Date: Wed, 22 Sep 2010 11:12:24 +0200 Subject: U8500: Add support for SPI Added SPI support for U8500 ST-Ericsson ID: 269867 ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-10121 Change-Id: Ied17dd39aa1ebc0ee95818c59c7f211ce655b8bf Signed-off-by: Markus Helgesson Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/7569 Reviewed-by: Michael BRANDT --- include/asm-arm/arch-stw8500/gpio.h | 12 ++++++++---- include/asm-arm/arch-stw8500/hardware.h | 4 ++++ include/configs/u8500.h | 8 ++++++++ 3 files changed, 20 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/asm-arm/arch-stw8500/gpio.h b/include/asm-arm/arch-stw8500/gpio.h index be53c4c1f..24f3c6ee6 100755 --- a/include/asm-arm/arch-stw8500/gpio.h +++ b/include/asm-arm/arch-stw8500/gpio.h @@ -375,6 +375,8 @@ typedef enum { GPIO_ALT_UART_2, GPIO_ALT_I2C_0, GPIO_ALT_I2C_1, + GPIO_ALT_I2C_2, + GPIO_ALT_I2C_3, GPIO_ALT_MSP_0, GPIO_ALT_MSP_1, GPIO_ALT_MSP_2, @@ -421,9 +423,11 @@ typedef enum { GPIO_ALT_CAM, GPIO_ALT_CCP1, GPIO_ALT_EMMC, -#ifdef CONFIG_NOMADIK_8500_V1 GPIO_ALT_POP_EMMC, -#endif + GPIO_ALT_SPI_0, + GPIO_ALT_SPI_1, + GPIO_ALT_SPI_2, + GPIO_ALT_SPI_3, GPIO_ALT_FUNMAX /* Add new alt func before this */ } gpio_alt_function; @@ -503,8 +507,8 @@ typedef struct { * refer ./Documentation/arm/STM-Nomadik/gpio_user_guide.txt *----------------------------------------------------------------------*/ -extern int gpio_setpinconfig(gpio_pin pin_id, gpio_config * pin_config); -extern int gpio_resetpinconfig(gpio_pin pin_id, char *dev_name); +extern gpio_error gpio_setpinconfig(gpio_pin pin_id, gpio_config * pin_config); +extern gpio_error gpio_resetpinconfig(gpio_pin pin_id, char *dev_name); extern int gpio_writepin(gpio_pin pin_id, gpio_data value, char *dev_name); extern int gpio_readpin(gpio_pin pin_id, gpio_data * value); extern int gpio_altfuncenable(gpio_alt_function altfunc, diff --git a/include/asm-arm/arch-stw8500/hardware.h b/include/asm-arm/arch-stw8500/hardware.h index 777a50c3b..df55a841d 100644 --- a/include/asm-arm/arch-stw8500/hardware.h +++ b/include/asm-arm/arch-stw8500/hardware.h @@ -72,11 +72,15 @@ #define U8500_CLKRST3_BASE (U8500_PER3_BASE + 0xf000) /* Per2 */ +#define U8500_SPI2_BASE (U8500_PER2_BASE + 0x1000) +#define U8500_SPI1_BASE (U8500_PER2_BASE + 0x2000) +#define U8500_SPI0_BASE (U8500_PER2_BASE + 0xa000) #define U8500_CLKRST2_BASE (U8500_PER2_BASE + 0xf000) /* Per1 */ #define U8500_UART0_BASE (U8500_PER1_BASE + 0x0000) #define U8500_UART1_BASE (U8500_PER1_BASE + 0x1000) +#define U8500_SPI3_BASE (U8500_PER2_BASE + 0x9000) #define U8500_CLKRST1_BASE (U8500_PER1_BASE + 0xf000) #define U8500_BOOTROM_BASE 0x90000000 diff --git a/include/configs/u8500.h b/include/configs/u8500.h index 32de5becf..26ffbdda6 100644 --- a/include/configs/u8500.h +++ b/include/configs/u8500.h @@ -111,6 +111,7 @@ #define CONFIG_CMD_I2C #define CONFIG_CMD_TOC #define CONFIG_CMD_SETEXPR /* used to convert $filesize to $blocksize */ +#define CONFIG_CMD_SPI #ifdef CONFIG_USB_TTY #define CONFIG_BOOTDELAY -1 /* disable autoboot */ @@ -219,6 +220,13 @@ #define CONFIG_SYS_I2C_GPIOE_ADDR 0x42 /* GPIO expander chip addr */ #define CONFIG_TC35892_GPIO + +/* + * SPI + */ +#define CONFIG_U8500_SPI + + /*----------------------------------------------------------------------- * Stack sizes * -- cgit v1.2.3