aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mxs
diff options
context:
space:
mode:
authorDong Aisheng <b29396@freescale.com>2011-07-19 23:41:43 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2011-08-23 02:56:13 -0400
commit074c54f4226ff97e6ac0a6564d5999fa87adfa90 (patch)
tree2eb8572b5a3a44380456395d2703cd5c6dc1602e /arch/arm/mach-mxs
parentc8ebcac823bb0246c42168c277069356432efd34 (diff)
ARM: mxs: add sgtl5000 i2c device
Signed-off-by: Dong Aisheng <b29396@freescale.com> Cc: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mxs')
-rw-r--r--arch/arm/mach-mxs/Kconfig1
-rw-r--r--arch/arm/mach-mxs/mach-mx28evk.c17
2 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig
index 405c28d24e15..2de2ea122d86 100644
--- a/arch/arm/mach-mxs/Kconfig
+++ b/arch/arm/mach-mxs/Kconfig
@@ -49,6 +49,7 @@ config MACH_MX28EVK
49 select MXS_HAVE_PLATFORM_MXS_MMC 49 select MXS_HAVE_PLATFORM_MXS_MMC
50 select MXS_HAVE_PLATFORM_MXSFB 50 select MXS_HAVE_PLATFORM_MXSFB
51 select MXS_HAVE_PLATFORM_MXS_SAIF 51 select MXS_HAVE_PLATFORM_MXS_SAIF
52 select MXS_HAVE_PLATFORM_MXS_I2C
52 select MXS_OCOTP 53 select MXS_OCOTP
53 help 54 help
54 Include support for MX28EVK platform. This includes specific 55 Include support for MX28EVK platform. This includes specific
diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c
index 1e5fda94d96c..fe5ea4149e8b 100644
--- a/arch/arm/mach-mxs/mach-mx28evk.c
+++ b/arch/arm/mach-mxs/mach-mx28evk.c
@@ -18,6 +18,7 @@
18#include <linux/leds.h> 18#include <linux/leds.h>
19#include <linux/irq.h> 19#include <linux/irq.h>
20#include <linux/clk.h> 20#include <linux/clk.h>
21#include <linux/i2c.h>
21 22
22#include <asm/mach-types.h> 23#include <asm/mach-types.h>
23#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
@@ -184,6 +185,12 @@ static const iomux_cfg_t mx28evk_pads[] __initconst = {
184 /* led */ 185 /* led */
185 MX28_PAD_AUART1_TX__GPIO_3_5 | MXS_PAD_CTRL, 186 MX28_PAD_AUART1_TX__GPIO_3_5 | MXS_PAD_CTRL,
186 187
188 /* I2C */
189 MX28_PAD_I2C0_SCL__I2C0_SCL |
190 (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
191 MX28_PAD_I2C0_SDA__I2C0_SDA |
192 (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
193
187 /* saif0 & saif1 */ 194 /* saif0 & saif1 */
188 MX28_PAD_SAIF0_MCLK__SAIF0_MCLK | 195 MX28_PAD_SAIF0_MCLK__SAIF0_MCLK |
189 (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), 196 (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
@@ -364,6 +371,12 @@ static struct mxs_mmc_platform_data mx28evk_mmc_pdata[] __initdata = {
364 }, 371 },
365}; 372};
366 373
374static struct i2c_board_info mxs_i2c0_board_info[] __initdata = {
375 {
376 I2C_BOARD_INFO("sgtl5000", 0x0a),
377 },
378};
379
367static void __init mx28evk_init(void) 380static void __init mx28evk_init(void)
368{ 381{
369 int ret; 382 int ret;
@@ -407,6 +420,10 @@ static void __init mx28evk_init(void)
407 mx28_add_saif(0); 420 mx28_add_saif(0);
408 mx28_add_saif(1); 421 mx28_add_saif(1);
409 422
423 mx28_add_mxs_i2c(0);
424 i2c_register_board_info(0, mxs_i2c0_board_info,
425 ARRAY_SIZE(mxs_i2c0_board_info));
426
410 /* power on mmc slot by writing 0 to the gpio */ 427 /* power on mmc slot by writing 0 to the gpio */
411 ret = gpio_request_one(MX28EVK_MMC0_SLOT_POWER, GPIOF_OUT_INIT_LOW, 428 ret = gpio_request_one(MX28EVK_MMC0_SLOT_POWER, GPIOF_OUT_INIT_LOW,
412 "mmc0-slot-power"); 429 "mmc0-slot-power");