diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-22 22:32:53 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-22 22:32:53 +0200 |
commit | f6a26ae7699416d86bea8cb68ce413571e9cab3c (patch) | |
tree | e91b7a7c7513151fe583721f7435cc9f5cdc4f42 /arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c | |
parent | Merge tag 'pm' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc (diff) | |
parent | Merge branch 'board-specific' of git://github.com/hzhuang1/linux into next/bo... (diff) | |
download | linux-f6a26ae7699416d86bea8cb68ce413571e9cab3c.tar.xz linux-f6a26ae7699416d86bea8cb68ce413571e9cab3c.zip |
Merge tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull arm-soc board specific changes from Olof Johansson:
"While we generally attempt to get rid of board specific files and
replace them with device tree based descriptions, a lot of platforms
have not come that far:
In shmobile, we add two new board files because their recently started
effort to add DT support has not proceeded enough to use it for all of
the important hardware.
In Kirkwood, we are adding support for new boards with a combination
of DT and board file contents in multiple cases.
pxa/mmp and imx are extending support for existing board files but not
adding new ones."
Fix up trivial conflicts in arch/arm/mach-{mmp/ttc_dkb.c,shmobile/{Kconfig,Makefile}}
* tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (94 commits)
ARM: shmobile: fix smp build
ARM: kirkwood: Add support for RaidSonic IB-NAS6210/6220 using devicetree
kirkwood: Add iconnect support
orion/kirkwood: create a generic function for gpio led blinking
kirkwood/orion: fix orion_gpio_set_blink
ARM: kirkwood: Define DNS-320/DNS-325 NAND in fdt
kirkwood: Allow nand to be configured via. devicetree
mtd: Add orion_nand devicetree bindings
ARM: kirkwood: Basic support for DNS-320 and DNS-325
ARM: mach-shmobile: Use DT_MACHINE for armadillo 800 eva
ARM: mach-shmobile: Use DT_MACHINE for KZM9G
ARM: pxa: hx4700: Add Synaptics NavPoint touchpad
ARM: pxa: Use REGULATOR_SUPPLY macro
ARM: mach-shmobile: kzm9g: enable SMP boot
ARM: mach-shmobile: kzm9g: defconfig update
ARM: mach-shmobile: kzm9g: add PCF8757 gpio-key
ARM: mach-shmobile: kzm9g: add SDHI support
ARM: mach-shmobile: kzm9g: add MMCIF support
ARM: mach-shmobile: kzm9g: correct screen direction
ARM: mach-shmobile: sh73a0.h: add GPIO_NR
...
Diffstat (limited to 'arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c')
-rw-r--r-- | arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c | 51 |
1 files changed, 46 insertions, 5 deletions
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c index 2cf603e11c4f..dfd2da87c2df 100644 --- a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c +++ b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c @@ -23,6 +23,7 @@ #include <linux/leds.h> #include <linux/platform_device.h> #include <linux/input.h> +#include <linux/spi/spi.h> #include <video/platform_lcd.h> #include <mach/hardware.h> @@ -87,12 +88,22 @@ static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = { /* CAN */ MX25_PAD_GPIO_D__CAN2_RX, MX25_PAD_GPIO_C__CAN2_TX, + /* SPI1 */ + MX25_PAD_CSPI1_MOSI__CSPI1_MOSI, + MX25_PAD_CSPI1_MISO__CSPI1_MISO, + MX25_PAD_CSPI1_SS0__GPIO_1_16, + MX25_PAD_CSPI1_SS1__GPIO_1_17, + MX25_PAD_CSPI1_SCLK__CSPI1_SCLK, + MX25_PAD_CSPI1_RDY__GPIO_2_22, }; -#define GPIO_LED1 83 -#define GPIO_SWITCH1 82 -#define GPIO_SD1CD 52 -#define GPIO_LCDPWR 26 +#define GPIO_LED1 IMX_GPIO_NR(3, 19) +#define GPIO_SWITCH1 IMX_GPIO_NR(3, 18) +#define GPIO_SD1CD IMX_GPIO_NR(2, 20) +#define GPIO_LCDPWR IMX_GPIO_NR(1, 26) +#define GPIO_SPI1_SS0 IMX_GPIO_NR(1, 16) +#define GPIO_SPI1_SS1 IMX_GPIO_NR(1, 17) +#define GPIO_SPI1_IRQ IMX_GPIO_NR(2, 22) static struct imx_fb_videomode eukrea_mximxsd_modes[] = { { @@ -228,6 +239,30 @@ static struct esdhc_platform_data sd1_pdata = { .wp_type = ESDHC_WP_NONE, }; +static struct spi_board_info eukrea_mbimxsd25_spi_board_info[] __initdata = { + { + .modalias = "spidev", + .max_speed_hz = 20000000, + .bus_num = 0, + .chip_select = 0, + .mode = SPI_MODE_0, + }, + { + .modalias = "spidev", + .max_speed_hz = 20000000, + .bus_num = 0, + .chip_select = 1, + .mode = SPI_MODE_0, + }, +}; + +static int eukrea_mbimxsd25_spi_cs[] = {GPIO_SPI1_SS0, GPIO_SPI1_SS1}; + +static const struct spi_imx_master eukrea_mbimxsd25_spi0_data __initconst = { + .chipselect = eukrea_mbimxsd25_spi_cs, + .num_chipselect = ARRAY_SIZE(eukrea_mbimxsd25_spi_cs), +}; + /* * system init for baseboard usage. Will be called by cpuimx25 init. * @@ -257,11 +292,17 @@ void __init eukrea_mbimxsd25_baseboard_init(void) gpio_request(GPIO_LCDPWR, "LCDPWR"); gpio_direction_output(GPIO_LCDPWR, 1); - gpio_free(GPIO_SWITCH1); i2c_register_board_info(0, eukrea_mbimxsd_i2c_devices, ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); + gpio_request(GPIO_SPI1_IRQ, "SPI1_IRQ"); + gpio_direction_input(GPIO_SPI1_IRQ); + gpio_free(GPIO_SPI1_IRQ); + imx25_add_spi_imx0(&eukrea_mbimxsd25_spi0_data); + spi_register_board_info(eukrea_mbimxsd25_spi_board_info, + ARRAY_SIZE(eukrea_mbimxsd25_spi_board_info)); + platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); gpio_led_register_device(-1, &eukrea_mbimxsd_led_info); imx_add_gpio_keys(&eukrea_mbimxsd_button_data); |