aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-22 16:32:53 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-22 16:32:53 -0400
commitf6a26ae7699416d86bea8cb68ce413571e9cab3c (patch)
treee91b7a7c7513151fe583721f7435cc9f5cdc4f42 /arch/arm/mach-omap2
parentcdd3a354a05b0c33fe33ab11a0fb0838396cad19 (diff)
parent48a5765e5104f1afd22c75c5030af3a6cf24b4c3 (diff)
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-omap2')
-rw-r--r--arch/arm/mach-omap2/Kconfig1
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c10
-rw-r--r--arch/arm/mach-omap2/board-am3517crane.c2
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c5
-rw-r--r--arch/arm/mach-omap2/board-flash.c4
-rw-r--r--arch/arm/mach-omap2/board-flash.h11
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c74
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c7
-rw-r--r--arch/arm/mach-omap2/board-omap3logic.c26
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c24
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c88
-rw-r--r--arch/arm/mach-omap2/devices.c31
-rw-r--r--arch/arm/mach-omap2/twl-common.c43
-rw-r--r--arch/arm/mach-omap2/twl-common.h2
14 files changed, 276 insertions, 52 deletions
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 8141b76283a6..964ee67a3b77 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -17,6 +17,7 @@ config ARCH_OMAP2PLUS_TYPICAL
17 select MENELAUS if ARCH_OMAP2 17 select MENELAUS if ARCH_OMAP2
18 select TWL4030_CORE if ARCH_OMAP3 || ARCH_OMAP4 18 select TWL4030_CORE if ARCH_OMAP3 || ARCH_OMAP4
19 select TWL4030_POWER if ARCH_OMAP3 || ARCH_OMAP4 19 select TWL4030_POWER if ARCH_OMAP3 || ARCH_OMAP4
20 select HIGHMEM
20 help 21 help
21 Compile a kernel suitable for booting most boards 22 Compile a kernel suitable for booting most boards
22 23
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 4a9bc00a7d98..94af6cde2e36 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -384,6 +384,11 @@ static struct platform_device sdp4430_dmic_codec = {
384 .id = -1, 384 .id = -1,
385}; 385};
386 386
387static struct platform_device sdp4430_hdmi_audio_codec = {
388 .name = "hdmi-audio-codec",
389 .id = -1,
390};
391
387static struct omap_abe_twl6040_data sdp4430_abe_audio_data = { 392static struct omap_abe_twl6040_data sdp4430_abe_audio_data = {
388 .card_name = "SDP4430", 393 .card_name = "SDP4430",
389 .has_hs = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT, 394 .has_hs = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
@@ -418,6 +423,7 @@ static struct platform_device *sdp4430_devices[] __initdata = {
418 &sdp4430_vbat, 423 &sdp4430_vbat,
419 &sdp4430_dmic_codec, 424 &sdp4430_dmic_codec,
420 &sdp4430_abe_audio, 425 &sdp4430_abe_audio,
426 &sdp4430_hdmi_audio_codec,
421}; 427};
422 428
423static struct omap_musb_board_data musb_board_data = { 429static struct omap_musb_board_data musb_board_data = {
@@ -571,7 +577,9 @@ static int __init omap4_i2c_init(void)
571 TWL_COMMON_REGULATOR_VANA | 577 TWL_COMMON_REGULATOR_VANA |
572 TWL_COMMON_REGULATOR_VCXIO | 578 TWL_COMMON_REGULATOR_VCXIO |
573 TWL_COMMON_REGULATOR_VUSB | 579 TWL_COMMON_REGULATOR_VUSB |
574 TWL_COMMON_REGULATOR_CLK32KG); 580 TWL_COMMON_REGULATOR_CLK32KG |
581 TWL_COMMON_REGULATOR_V1V8 |
582 TWL_COMMON_REGULATOR_V2V1);
575 omap4_pmic_init("twl6030", &sdp4430_twldata, 583 omap4_pmic_init("twl6030", &sdp4430_twldata,
576 &twl6040_data, OMAP44XX_IRQ_SYS_2N); 584 &twl6040_data, OMAP44XX_IRQ_SYS_2N);
577 omap_register_i2c_bus(2, 400, NULL, 0); 585 omap_register_i2c_bus(2, 400, NULL, 0);
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c
index c3851e8de28b..3b8a53c1f2a8 100644
--- a/arch/arm/mach-omap2/board-am3517crane.c
+++ b/arch/arm/mach-omap2/board-am3517crane.c
@@ -30,6 +30,7 @@
30#include "common.h" 30#include "common.h"
31#include <plat/usb.h> 31#include <plat/usb.h>
32 32
33#include "am35xx-emac.h"
33#include "mux.h" 34#include "mux.h"
34#include "control.h" 35#include "control.h"
35 36
@@ -90,6 +91,7 @@ static void __init am3517_crane_init(void)
90 } 91 }
91 92
92 usbhs_init(&usbhs_bdata); 93 usbhs_init(&usbhs_bdata);
94 am35xx_emac_init(AM35XX_DEFAULT_MDIO_FREQUENCY, 1);
93} 95}
94 96
95MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD") 97MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD")
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 45746cb56c68..c03df142ea67 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -476,6 +476,10 @@ static struct twl4030_gpio_platform_data cm_t35_gpio_data = {
476 .setup = cm_t35_twl_gpio_setup, 476 .setup = cm_t35_twl_gpio_setup,
477}; 477};
478 478
479static struct twl4030_power_data cm_t35_power_data = {
480 .use_poweroff = true,
481};
482
479static struct twl4030_platform_data cm_t35_twldata = { 483static struct twl4030_platform_data cm_t35_twldata = {
480 /* platform_data for children goes here */ 484 /* platform_data for children goes here */
481 .keypad = &cm_t35_kp_data, 485 .keypad = &cm_t35_kp_data,
@@ -483,6 +487,7 @@ static struct twl4030_platform_data cm_t35_twldata = {
483 .vmmc1 = &cm_t35_vmmc1, 487 .vmmc1 = &cm_t35_vmmc1,
484 .vsim = &cm_t35_vsim, 488 .vsim = &cm_t35_vsim,
485 .vio = &cm_t35_vio, 489 .vio = &cm_t35_vio,
490 .power = &cm_t35_power_data,
486}; 491};
487 492
488static void __init cm_t35_init_i2c(void) 493static void __init cm_t35_init_i2c(void)
diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c
index 0349fd2b68d8..70a81f900bb5 100644
--- a/arch/arm/mach-omap2/board-flash.c
+++ b/arch/arm/mach-omap2/board-flash.c
@@ -87,7 +87,7 @@ static struct omap_onenand_platform_data board_onenand_data = {
87 .dma_channel = -1, /* disable DMA in OMAP OneNAND driver */ 87 .dma_channel = -1, /* disable DMA in OMAP OneNAND driver */
88}; 88};
89 89
90static void 90void
91__init board_onenand_init(struct mtd_partition *onenand_parts, 91__init board_onenand_init(struct mtd_partition *onenand_parts,
92 u8 nr_parts, u8 cs) 92 u8 nr_parts, u8 cs)
93{ 93{
@@ -98,7 +98,7 @@ __init board_onenand_init(struct mtd_partition *onenand_parts,
98 gpmc_onenand_init(&board_onenand_data); 98 gpmc_onenand_init(&board_onenand_data);
99} 99}
100#else 100#else
101static void 101void
102__init board_onenand_init(struct mtd_partition *nor_parts, u8 nr_parts, u8 cs) 102__init board_onenand_init(struct mtd_partition *nor_parts, u8 nr_parts, u8 cs)
103{ 103{
104} 104}
diff --git a/arch/arm/mach-omap2/board-flash.h b/arch/arm/mach-omap2/board-flash.h
index d25503a98417..c44b70d52021 100644
--- a/arch/arm/mach-omap2/board-flash.h
+++ b/arch/arm/mach-omap2/board-flash.h
@@ -47,3 +47,14 @@ static inline void board_nand_init(struct mtd_partition *nand_parts,
47{ 47{
48} 48}
49#endif 49#endif
50
51#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
52 defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
53extern void board_onenand_init(struct mtd_partition *nand_parts,
54 u8 nr_parts, u8 cs);
55#else
56static inline void board_onenand_init(struct mtd_partition *nand_parts,
57 u8 nr_parts, u8 cs)
58{
59}
60#endif
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 4c1acecce93f..7a274098f67b 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -24,6 +24,8 @@
24#include <linux/i2c/twl.h> 24#include <linux/i2c/twl.h>
25#include <linux/mmc/host.h> 25#include <linux/mmc/host.h>
26 26
27#include <linux/mtd/nand.h>
28
27#include <asm/mach-types.h> 29#include <asm/mach-types.h>
28#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
29 31
@@ -39,6 +41,8 @@
39#include "hsmmc.h" 41#include "hsmmc.h"
40#include "sdram-numonyx-m65kxxxxam.h" 42#include "sdram-numonyx-m65kxxxxam.h"
41#include "common-board-devices.h" 43#include "common-board-devices.h"
44#include "board-flash.h"
45#include "control.h"
42 46
43#define IGEP2_SMSC911X_CS 5 47#define IGEP2_SMSC911X_CS 5
44#define IGEP2_SMSC911X_GPIO 176 48#define IGEP2_SMSC911X_GPIO 176
@@ -60,6 +64,10 @@
60#define IGEP3_GPIO_LED1_RED 16 64#define IGEP3_GPIO_LED1_RED 16
61#define IGEP3_GPIO_USBH_NRESET 183 65#define IGEP3_GPIO_USBH_NRESET 183
62 66
67#define IGEP_SYSBOOT_MASK 0x1f
68#define IGEP_SYSBOOT_NAND 0x0f
69#define IGEP_SYSBOOT_ONENAND 0x10
70
63/* 71/*
64 * IGEP2 Hardware Revision Table 72 * IGEP2 Hardware Revision Table
65 * 73 *
@@ -110,8 +118,10 @@ static void __init igep2_get_revision(void)
110 gpio_free(IGEP2_GPIO_LED1_RED); 118 gpio_free(IGEP2_GPIO_LED1_RED);
111} 119}
112 120
113#if defined(CONFIG_MTD_ONENAND_OMAP2) || \ 121#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
114 defined(CONFIG_MTD_ONENAND_OMAP2_MODULE) 122 defined(CONFIG_MTD_ONENAND_OMAP2_MODULE) || \
123 defined(CONFIG_MTD_NAND_OMAP2) || \
124 defined(CONFIG_MTD_NAND_OMAP2_MODULE)
115 125
116#define ONENAND_MAP 0x20000000 126#define ONENAND_MAP 0x20000000
117 127
@@ -123,7 +133,7 @@ static void __init igep2_get_revision(void)
123 * So MTD regards it as 4KiB page size and 256KiB block size 64*(2*2048) 133 * So MTD regards it as 4KiB page size and 256KiB block size 64*(2*2048)
124 */ 134 */
125 135
126static struct mtd_partition igep_onenand_partitions[] = { 136static struct mtd_partition igep_flash_partitions[] = {
127 { 137 {
128 .name = "X-Loader", 138 .name = "X-Loader",
129 .offset = 0, 139 .offset = 0,
@@ -151,50 +161,28 @@ static struct mtd_partition igep_onenand_partitions[] = {
151 }, 161 },
152}; 162};
153 163
154static struct omap_onenand_platform_data igep_onenand_data = { 164static inline u32 igep_get_sysboot_value(void)
155 .parts = igep_onenand_partitions, 165{
156 .nr_parts = ARRAY_SIZE(igep_onenand_partitions), 166 return omap_ctrl_readl(OMAP343X_CONTROL_STATUS) & IGEP_SYSBOOT_MASK;
157 .dma_channel = -1, /* disable DMA in OMAP OneNAND driver */ 167}
158};
159
160static struct platform_device igep_onenand_device = {
161 .name = "omap2-onenand",
162 .id = -1,
163 .dev = {
164 .platform_data = &igep_onenand_data,
165 },
166};
167 168
168static void __init igep_flash_init(void) 169static void __init igep_flash_init(void)
169{ 170{
170 u8 cs = 0; 171 u32 mux;
171 u8 onenandcs = GPMC_CS_NUM + 1; 172 mux = igep_get_sysboot_value();
172 173
173 for (cs = 0; cs < GPMC_CS_NUM; cs++) { 174 if (mux == IGEP_SYSBOOT_NAND) {
174 u32 ret; 175 pr_info("IGEP: initializing NAND memory device\n");
175 ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1); 176 board_nand_init(igep_flash_partitions,
176 177 ARRAY_SIZE(igep_flash_partitions),
177 /* Check if NAND/oneNAND is configured */ 178 0, NAND_BUSWIDTH_16);
178 if ((ret & 0xC00) == 0x800) 179 } else if (mux == IGEP_SYSBOOT_ONENAND) {
179 /* NAND found */ 180 pr_info("IGEP: initializing OneNAND memory device\n");
180 pr_err("IGEP: Unsupported NAND found\n"); 181 board_onenand_init(igep_flash_partitions,
181 else { 182 ARRAY_SIZE(igep_flash_partitions), 0);
182 ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7); 183 } else {
183 if ((ret & 0x3F) == (ONENAND_MAP >> 24)) 184 pr_err("IGEP: Flash: unsupported sysboot sequence found\n");
184 /* ONENAND found */
185 onenandcs = cs;
186 }
187 }
188
189 if (onenandcs > GPMC_CS_NUM) {
190 pr_err("IGEP: Unable to find configuration in GPMC\n");
191 return;
192 } 185 }
193
194 igep_onenand_data.cs = onenandcs;
195
196 if (platform_device_register(&igep_onenand_device) < 0)
197 pr_err("IGEP: Unable to register OneNAND device\n");
198} 186}
199 187
200#else 188#else
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 8ede8d20d7b2..2a7b9a9da1db 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -83,11 +83,13 @@ static struct {
83 int usb_pwr_level; 83 int usb_pwr_level;
84 int reset_gpio; 84 int reset_gpio;
85 int usr_button_gpio; 85 int usr_button_gpio;
86 int mmc_caps;
86} beagle_config = { 87} beagle_config = {
87 .mmc1_gpio_wp = -EINVAL, 88 .mmc1_gpio_wp = -EINVAL,
88 .usb_pwr_level = GPIOF_OUT_INIT_LOW, 89 .usb_pwr_level = GPIOF_OUT_INIT_LOW,
89 .reset_gpio = 129, 90 .reset_gpio = 129,
90 .usr_button_gpio = 4, 91 .usr_button_gpio = 4,
92 .mmc_caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
91}; 93};
92 94
93static struct gpio omap3_beagle_rev_gpios[] __initdata = { 95static struct gpio omap3_beagle_rev_gpios[] __initdata = {
@@ -145,10 +147,12 @@ static void __init omap3_beagle_init_rev(void)
145 printk(KERN_INFO "OMAP3 Beagle Rev: xM Ax/Bx\n"); 147 printk(KERN_INFO "OMAP3 Beagle Rev: xM Ax/Bx\n");
146 omap3_beagle_version = OMAP3BEAGLE_BOARD_XM; 148 omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
147 beagle_config.usb_pwr_level = GPIOF_OUT_INIT_HIGH; 149 beagle_config.usb_pwr_level = GPIOF_OUT_INIT_HIGH;
150 beagle_config.mmc_caps &= ~MMC_CAP_8_BIT_DATA;
148 break; 151 break;
149 case 2: 152 case 2:
150 printk(KERN_INFO "OMAP3 Beagle Rev: xM C\n"); 153 printk(KERN_INFO "OMAP3 Beagle Rev: xM C\n");
151 omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC; 154 omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC;
155 beagle_config.mmc_caps &= ~MMC_CAP_8_BIT_DATA;
152 break; 156 break;
153 default: 157 default:
154 printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev); 158 printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev);
@@ -225,7 +229,7 @@ static struct omap_dss_board_info beagle_dss_data = {
225static struct omap2_hsmmc_info mmc[] = { 229static struct omap2_hsmmc_info mmc[] = {
226 { 230 {
227 .mmc = 1, 231 .mmc = 1,
228 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, 232 .caps = MMC_CAP_4_BIT_DATA,
229 .gpio_wp = -EINVAL, 233 .gpio_wp = -EINVAL,
230 .deferred = true, 234 .deferred = true,
231 }, 235 },
@@ -497,6 +501,7 @@ static void __init omap3_beagle_init(void)
497 501
498 if (beagle_config.mmc1_gpio_wp != -EINVAL) 502 if (beagle_config.mmc1_gpio_wp != -EINVAL)
499 omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT); 503 omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT);
504 mmc[0].caps = beagle_config.mmc_caps;
500 omap_hsmmc_init(mmc); 505 omap_hsmmc_init(mmc);
501 506
502 omap3_beagle_i2c_init(); 507 omap3_beagle_i2c_init();
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index 9b3c141ff51b..c008bf8e1c36 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -4,8 +4,9 @@
4 * Copyright (C) 2010 Li-Pro.Net 4 * Copyright (C) 2010 Li-Pro.Net
5 * Stephan Linz <linz@li-pro.net> 5 * Stephan Linz <linz@li-pro.net>
6 * 6 *
7 * Copyright (C) 2010 Logic Product Development, Inc. 7 * Copyright (C) 2010-2012 Logic Product Development, Inc.
8 * Peter Barada <peter.barada@logicpd.com> 8 * Peter Barada <peter.barada@logicpd.com>
9 * Ashwin BIhari <ashwin.bihari@logicpd.com>
9 * 10 *
10 * Modified from Beagle, EVM, and RX51 11 * Modified from Beagle, EVM, and RX51
11 * 12 *
@@ -45,6 +46,7 @@
45#include <plat/gpmc-smsc911x.h> 46#include <plat/gpmc-smsc911x.h>
46#include <plat/gpmc.h> 47#include <plat/gpmc.h>
47#include <plat/sdrc.h> 48#include <plat/sdrc.h>
49#include <plat/usb.h>
48 50
49#define OMAP3LOGIC_SMSC911X_CS 1 51#define OMAP3LOGIC_SMSC911X_CS 1
50 52
@@ -85,6 +87,11 @@ static struct twl4030_gpio_platform_data omap3logic_gpio_data = {
85 | BIT(13) | BIT(15) | BIT(16) | BIT(17), 87 | BIT(13) | BIT(15) | BIT(16) | BIT(17),
86}; 88};
87 89
90static struct twl4030_usb_data omap3logic_usb_data = {
91 .usb_mode = T2_USB_MODE_ULPI,
92};
93
94
88static struct twl4030_platform_data omap3logic_twldata = { 95static struct twl4030_platform_data omap3logic_twldata = {
89 .irq_base = TWL4030_IRQ_BASE, 96 .irq_base = TWL4030_IRQ_BASE,
90 .irq_end = TWL4030_IRQ_END, 97 .irq_end = TWL4030_IRQ_END,
@@ -92,6 +99,7 @@ static struct twl4030_platform_data omap3logic_twldata = {
92 /* platform_data for children goes here */ 99 /* platform_data for children goes here */
93 .gpio = &omap3logic_gpio_data, 100 .gpio = &omap3logic_gpio_data,
94 .vmmc1 = &omap3logic_vmmc1, 101 .vmmc1 = &omap3logic_vmmc1,
102 .usb = &omap3logic_usb_data,
95}; 103};
96 104
97static int __init omap3logic_i2c_init(void) 105static int __init omap3logic_i2c_init(void)
@@ -185,6 +193,20 @@ static inline void __init board_smsc911x_init(void)
185 193
186#ifdef CONFIG_OMAP_MUX 194#ifdef CONFIG_OMAP_MUX
187static struct omap_board_mux board_mux[] __initdata = { 195static struct omap_board_mux board_mux[] __initdata = {
196 /* mUSB */
197 OMAP3_MUX(HSUSB0_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
198 OMAP3_MUX(HSUSB0_STP, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
199 OMAP3_MUX(HSUSB0_DIR, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
200 OMAP3_MUX(HSUSB0_NXT, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
201 OMAP3_MUX(HSUSB0_DATA0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
202 OMAP3_MUX(HSUSB0_DATA1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
203 OMAP3_MUX(HSUSB0_DATA2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
204 OMAP3_MUX(HSUSB0_DATA3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
205 OMAP3_MUX(HSUSB0_DATA4, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
206 OMAP3_MUX(HSUSB0_DATA5, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
207 OMAP3_MUX(HSUSB0_DATA6, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
208 OMAP3_MUX(HSUSB0_DATA7, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
209
188 { .reg_offset = OMAP_MUX_TERMINATOR }, 210 { .reg_offset = OMAP_MUX_TERMINATOR },
189}; 211};
190#endif 212#endif
@@ -205,6 +227,8 @@ static void __init omap3logic_init(void)
205 board_mmc_init(); 227 board_mmc_init();
206 board_smsc911x_init(); 228 board_smsc911x_init();
207 229
230 usb_musb_init(NULL);
231
208 /* Ensure SDRC pins are mux'd for self-refresh */ 232 /* Ensure SDRC pins are mux'd for self-refresh */
209 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); 233 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
210 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); 234 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index bb75eb091a88..68b8fc9ff010 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -28,6 +28,7 @@
28#include <linux/mfd/twl6040.h> 28#include <linux/mfd/twl6040.h>
29#include <linux/regulator/machine.h> 29#include <linux/regulator/machine.h>
30#include <linux/regulator/fixed.h> 30#include <linux/regulator/fixed.h>
31#include <linux/ti_wilink_st.h>
31#include <linux/wl12xx.h> 32#include <linux/wl12xx.h>
32#include <linux/platform_data/omap-abe-twl6040.h> 33#include <linux/platform_data/omap-abe-twl6040.h>
33 34
@@ -58,12 +59,21 @@
58#define HDMI_GPIO_HPD 63 /* Hotplug detect */ 59#define HDMI_GPIO_HPD 63 /* Hotplug detect */
59 60
60/* wl127x BT, FM, GPS connectivity chip */ 61/* wl127x BT, FM, GPS connectivity chip */
61static int wl1271_gpios[] = {46, -1, -1}; 62static struct ti_st_plat_data wilink_platform_data = {
63 .nshutdown_gpio = 46,
64 .dev_name = "/dev/ttyO1",
65 .flow_cntrl = 1,
66 .baud_rate = 3000000,
67 .chip_enable = NULL,
68 .suspend = NULL,
69 .resume = NULL,
70};
71
62static struct platform_device wl1271_device = { 72static struct platform_device wl1271_device = {
63 .name = "kim", 73 .name = "kim",
64 .id = -1, 74 .id = -1,
65 .dev = { 75 .dev = {
66 .platform_data = &wl1271_gpios, 76 .platform_data = &wilink_platform_data,
67 }, 77 },
68}; 78};
69 79
@@ -117,6 +127,11 @@ static struct platform_device panda_abe_audio = {
117 }, 127 },
118}; 128};
119 129
130static struct platform_device panda_hdmi_audio_codec = {
131 .name = "hdmi-audio-codec",
132 .id = -1,
133};
134
120static struct platform_device btwilink_device = { 135static struct platform_device btwilink_device = {
121 .name = "btwilink", 136 .name = "btwilink",
122 .id = -1, 137 .id = -1,
@@ -126,6 +141,7 @@ static struct platform_device *panda_devices[] __initdata = {
126 &leds_gpio, 141 &leds_gpio,
127 &wl1271_device, 142 &wl1271_device,
128 &panda_abe_audio, 143 &panda_abe_audio,
144 &panda_hdmi_audio_codec,
129 &btwilink_device, 145 &btwilink_device,
130}; 146};
131 147
@@ -274,7 +290,9 @@ static int __init omap4_panda_i2c_init(void)
274 TWL_COMMON_REGULATOR_VANA | 290 TWL_COMMON_REGULATOR_VANA |
275 TWL_COMMON_REGULATOR_VCXIO | 291 TWL_COMMON_REGULATOR_VCXIO |
276 TWL_COMMON_REGULATOR_VUSB | 292 TWL_COMMON_REGULATOR_VUSB |
277 TWL_COMMON_REGULATOR_CLK32KG); 293 TWL_COMMON_REGULATOR_CLK32KG |
294 TWL_COMMON_REGULATOR_V1V8 |
295 TWL_COMMON_REGULATOR_V2V1);
278 omap4_pmic_init("twl6030", &omap4_panda_twldata, 296 omap4_pmic_init("twl6030", &omap4_panda_twldata,
279 &twl6040_data, OMAP44XX_IRQ_SYS_2N); 297 &twl6040_data, OMAP44XX_IRQ_SYS_2N);
280 omap_register_i2c_bus(2, 400, NULL, 0); 298 omap_register_i2c_bus(2, 400, NULL, 0);
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index ae957c92081b..ff53deccecab 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -44,6 +44,7 @@
44#include <linux/leds-lp5523.h> 44#include <linux/leds-lp5523.h>
45 45
46#include <../drivers/staging/iio/light/tsl2563.h> 46#include <../drivers/staging/iio/light/tsl2563.h>
47#include <linux/lis3lv02d.h>
47 48
48#include "mux.h" 49#include "mux.h"
49#include "hsmmc.h" 50#include "hsmmc.h"
@@ -63,6 +64,9 @@
63#define RX51_TSC2005_RESET_GPIO 104 64#define RX51_TSC2005_RESET_GPIO 104
64#define RX51_TSC2005_IRQ_GPIO 100 65#define RX51_TSC2005_IRQ_GPIO 100
65 66
67#define LIS302_IRQ1_GPIO 181
68#define LIS302_IRQ2_GPIO 180 /* Not yet in use */
69
66/* list all spi devices here */ 70/* list all spi devices here */
67enum { 71enum {
68 RX51_SPI_WL1251, 72 RX51_SPI_WL1251,
@@ -73,6 +77,77 @@ enum {
73static struct wl12xx_platform_data wl1251_pdata; 77static struct wl12xx_platform_data wl1251_pdata;
74static struct tsc2005_platform_data tsc2005_pdata; 78static struct tsc2005_platform_data tsc2005_pdata;
75 79
80#if defined(CONFIG_SENSORS_LIS3_I2C) || defined(CONFIG_SENSORS_LIS3_I2C_MODULE)
81static int lis302_setup(void)
82{
83 int err;
84 int irq1 = LIS302_IRQ1_GPIO;
85 int irq2 = LIS302_IRQ2_GPIO;
86
87 /* gpio for interrupt pin 1 */
88 err = gpio_request(irq1, "lis3lv02dl_irq1");
89 if (err) {
90 printk(KERN_ERR "lis3lv02dl: gpio request failed\n");
91 goto out;
92 }
93
94 /* gpio for interrupt pin 2 */
95 err = gpio_request(irq2, "lis3lv02dl_irq2");
96 if (err) {
97 gpio_free(irq1);
98 printk(KERN_ERR "lis3lv02dl: gpio request failed\n");
99 goto out;
100 }
101
102 gpio_direction_input(irq1);
103 gpio_direction_input(irq2);
104
105out:
106 return err;
107}
108
109static int lis302_release(void)
110{
111 gpio_free(LIS302_IRQ1_GPIO);
112 gpio_free(LIS302_IRQ2_GPIO);
113
114 return 0;
115}
116
117static struct lis3lv02d_platform_data rx51_lis3lv02d_data = {
118 .click_flags = LIS3_CLICK_SINGLE_X | LIS3_CLICK_SINGLE_Y |
119 LIS3_CLICK_SINGLE_Z,
120 /* Limits are 0.5g * value */
121 .click_thresh_x = 8,
122 .click_thresh_y = 8,
123 .click_thresh_z = 10,
124 /* Click must be longer than time limit */
125 .click_time_limit = 9,
126 /* Kind of debounce filter */
127 .click_latency = 50,
128
129 /* Limits for all axis. millig-value / 18 to get HW values */
130 .wakeup_flags = LIS3_WAKEUP_X_HI | LIS3_WAKEUP_Y_HI,
131 .wakeup_thresh = 800 / 18,
132 .wakeup_flags2 = LIS3_WAKEUP_Z_HI ,
133 .wakeup_thresh2 = 900 / 18,
134
135 .hipass_ctrl = LIS3_HIPASS1_DISABLE | LIS3_HIPASS2_DISABLE,
136
137 /* Interrupt line 2 for click detection, line 1 for thresholds */
138 .irq_cfg = LIS3_IRQ2_CLICK | LIS3_IRQ1_FF_WU_12,
139
140 .axis_x = LIS3_DEV_X,
141 .axis_y = LIS3_INV_DEV_Y,
142 .axis_z = LIS3_INV_DEV_Z,
143 .setup_resources = lis302_setup,
144 .release_resources = lis302_release,
145 .st_min_limits = {-32, 3, 3},
146 .st_max_limits = {-3, 32, 32},
147 .irq2 = OMAP_GPIO_IRQ(LIS302_IRQ2_GPIO),
148};
149#endif
150
76#if defined(CONFIG_SENSORS_TSL2563) || defined(CONFIG_SENSORS_TSL2563_MODULE) 151#if defined(CONFIG_SENSORS_TSL2563) || defined(CONFIG_SENSORS_TSL2563_MODULE)
77static struct tsl2563_platform_data rx51_tsl2563_platform_data = { 152static struct tsl2563_platform_data rx51_tsl2563_platform_data = {
78 .cover_comp_gain = 16, 153 .cover_comp_gain = 16,
@@ -950,6 +1025,16 @@ static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_2[] = {
950 } 1025 }
951}; 1026};
952 1027
1028static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_3[] = {
1029#if defined(CONFIG_SENSORS_LIS3_I2C) || defined(CONFIG_SENSORS_LIS3_I2C_MODULE)
1030 {
1031 I2C_BOARD_INFO("lis3lv02d", 0x1d),
1032 .platform_data = &rx51_lis3lv02d_data,
1033 .irq = OMAP_GPIO_IRQ(LIS302_IRQ1_GPIO),
1034 },
1035#endif
1036};
1037
953static int __init rx51_i2c_init(void) 1038static int __init rx51_i2c_init(void)
954{ 1039{
955 if ((system_rev >= SYSTEM_REV_S_USES_VAUX3 && system_rev < 0x100) || 1040 if ((system_rev >= SYSTEM_REV_S_USES_VAUX3 && system_rev < 0x100) ||
@@ -971,7 +1056,8 @@ static int __init rx51_i2c_init(void)
971 omap_pmic_init(1, 2200, "twl5030", INT_34XX_SYS_NIRQ, &rx51_twldata); 1056 omap_pmic_init(1, 2200, "twl5030", INT_34XX_SYS_NIRQ, &rx51_twldata);
972 omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2, 1057 omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2,
973 ARRAY_SIZE(rx51_peripherals_i2c_board_info_2)); 1058 ARRAY_SIZE(rx51_peripherals_i2c_board_info_2));
974 omap_register_i2c_bus(3, 400, NULL, 0); 1059 omap_register_i2c_bus(3, 400, rx51_peripherals_i2c_board_info_3,
1060 ARRAY_SIZE(rx51_peripherals_i2c_board_info_3));
975 return 0; 1061 return 0;
976} 1062}
977 1063
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 84fa55b4c8b9..ae62ece04ef9 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -354,6 +354,36 @@ static void __init omap_init_dmic(void)
354static inline void omap_init_dmic(void) {} 354static inline void omap_init_dmic(void) {}
355#endif 355#endif
356 356
357#if defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI) || \
358 defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI_MODULE)
359
360static struct platform_device omap_hdmi_audio = {
361 .name = "omap-hdmi-audio",
362 .id = -1,
363};
364
365static void __init omap_init_hdmi_audio(void)
366{
367 struct omap_hwmod *oh;
368 struct platform_device *pdev;
369
370 oh = omap_hwmod_lookup("dss_hdmi");
371 if (!oh) {
372 printk(KERN_ERR "Could not look up dss_hdmi hw_mod\n");
373 return;
374 }
375
376 pdev = omap_device_build("omap-hdmi-audio-dai",
377 -1, oh, NULL, 0, NULL, 0, 0);
378 WARN(IS_ERR(pdev),
379 "Can't build omap_device for omap-hdmi-audio-dai.\n");
380
381 platform_device_register(&omap_hdmi_audio);
382}
383#else
384static inline void omap_init_hdmi_audio(void) {}
385#endif
386
357#if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE) 387#if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE)
358 388
359#include <plat/mcspi.h> 389#include <plat/mcspi.h>
@@ -701,6 +731,7 @@ static int __init omap2_init_devices(void)
701 */ 731 */
702 omap_init_audio(); 732 omap_init_audio();
703 omap_init_camera(); 733 omap_init_camera();
734 omap_init_hdmi_audio();
704 omap_init_mbox(); 735 omap_init_mbox();
705 /* If dtb is there, the devices will be created dynamically */ 736 /* If dtb is there, the devices will be created dynamically */
706 if (!of_have_populated_dt()) { 737 if (!of_have_populated_dt()) {
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index ee6596b45214..119d5a910f3a 100644
--- a/arch/arm/mach-omap2/twl-common.c
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -266,6 +266,7 @@ static struct regulator_init_data omap4_vdac_idata = {
266 .valid_ops_mask = REGULATOR_CHANGE_MODE 266 .valid_ops_mask = REGULATOR_CHANGE_MODE
267 | REGULATOR_CHANGE_STATUS, 267 | REGULATOR_CHANGE_STATUS,
268 }, 268 },
269 .supply_regulator = "V2V1",
269}; 270};
270 271
271static struct regulator_init_data omap4_vaux2_idata = { 272static struct regulator_init_data omap4_vaux2_idata = {
@@ -356,6 +357,7 @@ static struct regulator_init_data omap4_vcxio_idata = {
356 }, 357 },
357 .num_consumer_supplies = ARRAY_SIZE(omap4_vcxio_supply), 358 .num_consumer_supplies = ARRAY_SIZE(omap4_vcxio_supply),
358 .consumer_supplies = omap4_vcxio_supply, 359 .consumer_supplies = omap4_vcxio_supply,
360 .supply_regulator = "V2V1",
359}; 361};
360 362
361static struct regulator_init_data omap4_vusb_idata = { 363static struct regulator_init_data omap4_vusb_idata = {
@@ -439,6 +441,41 @@ static struct twl_regulator_driver_data omap4_vdd3_drvdata = {
439 .set_voltage = twl_set_voltage, 441 .set_voltage = twl_set_voltage,
440}; 442};
441 443
444static struct regulator_consumer_supply omap4_v1v8_supply[] = {
445 REGULATOR_SUPPLY("vio", "1-004b"),
446};
447
448static struct regulator_init_data omap4_v1v8_idata = {
449 .constraints = {
450 .min_uV = 1800000,
451 .max_uV = 1800000,
452 .valid_modes_mask = REGULATOR_MODE_NORMAL
453 | REGULATOR_MODE_STANDBY,
454 .valid_ops_mask = REGULATOR_CHANGE_MODE
455 | REGULATOR_CHANGE_STATUS,
456 .always_on = true,
457 },
458 .num_consumer_supplies = ARRAY_SIZE(omap4_v1v8_supply),
459 .consumer_supplies = omap4_v1v8_supply,
460};
461
462static struct regulator_consumer_supply omap4_v2v1_supply[] = {
463 REGULATOR_SUPPLY("v2v1", "1-004b"),
464};
465
466static struct regulator_init_data omap4_v2v1_idata = {
467 .constraints = {
468 .min_uV = 2100000,
469 .max_uV = 2100000,
470 .valid_modes_mask = REGULATOR_MODE_NORMAL
471 | REGULATOR_MODE_STANDBY,
472 .valid_ops_mask = REGULATOR_CHANGE_MODE
473 | REGULATOR_CHANGE_STATUS,
474 },
475 .num_consumer_supplies = ARRAY_SIZE(omap4_v2v1_supply),
476 .consumer_supplies = omap4_v2v1_supply,
477};
478
442void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data, 479void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data,
443 u32 pdata_flags, u32 regulators_flags) 480 u32 pdata_flags, u32 regulators_flags)
444{ 481{
@@ -497,5 +534,11 @@ void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data,
497 if (regulators_flags & TWL_COMMON_REGULATOR_CLK32KG && 534 if (regulators_flags & TWL_COMMON_REGULATOR_CLK32KG &&
498 !pmic_data->clk32kg) 535 !pmic_data->clk32kg)
499 pmic_data->clk32kg = &omap4_clk32kg_idata; 536 pmic_data->clk32kg = &omap4_clk32kg_idata;
537
538 if (regulators_flags & TWL_COMMON_REGULATOR_V1V8 && !pmic_data->v1v8)
539 pmic_data->v1v8 = &omap4_v1v8_idata;
540
541 if (regulators_flags & TWL_COMMON_REGULATOR_V2V1 && !pmic_data->v2v1)
542 pmic_data->v2v1 = &omap4_v2v1_idata;
500} 543}
501#endif /* CONFIG_ARCH_OMAP4 */ 544#endif /* CONFIG_ARCH_OMAP4 */
diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
index 09627483a57f..8fe71cfd002c 100644
--- a/arch/arm/mach-omap2/twl-common.h
+++ b/arch/arm/mach-omap2/twl-common.h
@@ -22,6 +22,8 @@
22#define TWL_COMMON_REGULATOR_VCXIO (1 << 8) 22#define TWL_COMMON_REGULATOR_VCXIO (1 << 8)
23#define TWL_COMMON_REGULATOR_VUSB (1 << 9) 23#define TWL_COMMON_REGULATOR_VUSB (1 << 9)
24#define TWL_COMMON_REGULATOR_CLK32KG (1 << 10) 24#define TWL_COMMON_REGULATOR_CLK32KG (1 << 10)
25#define TWL_COMMON_REGULATOR_V1V8 (1 << 11)
26#define TWL_COMMON_REGULATOR_V2V1 (1 << 12)
25 27
26/* TWL4030 LDO regulators */ 28/* TWL4030 LDO regulators */
27#define TWL_COMMON_REGULATOR_VPLL1 (1 << 4) 29#define TWL_COMMON_REGULATOR_VPLL1 (1 << 4)