aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2012-07-03 14:44:57 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2012-08-03 09:59:29 -0400
commit688b5cbb81c1d5fc4aaaed47cde3f86fbb1472fe (patch)
tree4f5e5f71967d2551cbe2e32961b86268449ccb02
parent0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (diff)
ARM: mx27pdk: Add audio support
mx27pdk has a mc13783 audio codec. Add support for it. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/mach-imx/Kconfig1
-rw-r--r--arch/arm/mach-imx/mach-mx27_3ds.c21
2 files changed, 21 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index afd542ad6f97..61faf76b185c 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -303,6 +303,7 @@ config MACH_MX27_3DS
303 select IMX_HAVE_PLATFORM_IMX_FB 303 select IMX_HAVE_PLATFORM_IMX_FB
304 select IMX_HAVE_PLATFORM_IMX_I2C 304 select IMX_HAVE_PLATFORM_IMX_I2C
305 select IMX_HAVE_PLATFORM_IMX_KEYPAD 305 select IMX_HAVE_PLATFORM_IMX_KEYPAD
306 select IMX_HAVE_PLATFORM_IMX_SSI
306 select IMX_HAVE_PLATFORM_IMX_UART 307 select IMX_HAVE_PLATFORM_IMX_UART
307 select IMX_HAVE_PLATFORM_MX2_CAMERA 308 select IMX_HAVE_PLATFORM_MX2_CAMERA
308 select IMX_HAVE_PLATFORM_MXC_EHCI 309 select IMX_HAVE_PLATFORM_MXC_EHCI
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c
index 58c24c1a7ab7..05996f39005c 100644
--- a/arch/arm/mach-imx/mach-mx27_3ds.c
+++ b/arch/arm/mach-imx/mach-mx27_3ds.c
@@ -158,6 +158,11 @@ static const int mx27pdk_pins[] __initconst = {
158 PB21_PF_CSI_HSYNC, 158 PB21_PF_CSI_HSYNC,
159 CSI_PWRDWN | GPIO_GPIO | GPIO_OUT, 159 CSI_PWRDWN | GPIO_GPIO | GPIO_OUT,
160 CSI_RESET | GPIO_GPIO | GPIO_OUT, 160 CSI_RESET | GPIO_GPIO | GPIO_OUT,
161 /* SSI4 */
162 PC16_PF_SSI4_FS,
163 PC17_PF_SSI4_RXD,
164 PC18_PF_SSI4_TXD,
165 PC19_PF_SSI4_CLK,
161}; 166};
162 167
163static struct gpio mx27_3ds_camera_gpios[] = { 168static struct gpio mx27_3ds_camera_gpios[] = {
@@ -329,13 +334,24 @@ static struct mc13xxx_regulator_init_data mx27_3ds_regulators[] = {
329}; 334};
330 335
331/* MC13783 */ 336/* MC13783 */
337static struct mc13xxx_codec_platform_data mx27_3ds_codec = {
338 .dac_ssi_port = MC13783_SSI1_PORT,
339 .adc_ssi_port = MC13783_SSI1_PORT,
340};
341
332static struct mc13xxx_platform_data mc13783_pdata = { 342static struct mc13xxx_platform_data mc13783_pdata = {
333 .regulators = { 343 .regulators = {
334 .regulators = mx27_3ds_regulators, 344 .regulators = mx27_3ds_regulators,
335 .num_regulators = ARRAY_SIZE(mx27_3ds_regulators), 345 .num_regulators = ARRAY_SIZE(mx27_3ds_regulators),
336 346
337 }, 347 },
338 .flags = MC13XXX_USE_TOUCHSCREEN | MC13XXX_USE_RTC, 348 .flags = MC13XXX_USE_TOUCHSCREEN | MC13XXX_USE_RTC |
349 MC13XXX_USE_CODEC,
350 .codec = &mx27_3ds_codec,
351};
352
353static struct imx_ssi_platform_data mx27_3ds_ssi_pdata = {
354 .flags = IMX_SSI_DMA | IMX_SSI_NET,
339}; 355};
340 356
341/* SPI */ 357/* SPI */
@@ -512,6 +528,9 @@ static void __init mx27pdk_init(void)
512 } 528 }
513 529
514 imx27_add_mx2_camera(&mx27_3ds_cam_pdata); 530 imx27_add_mx2_camera(&mx27_3ds_cam_pdata);
531 imx27_add_imx_ssi(0, &mx27_3ds_ssi_pdata);
532
533 imx_add_platform_device("imx_mc13783", 0, NULL, 0, NULL, 0);
515} 534}
516 535
517static void __init mx27pdk_timer_init(void) 536static void __init mx27pdk_timer_init(void)