Commit | Line | Data |
---|---|---|
b075f58b DA |
1 | /* |
2 | * Board support file for OMAP4430 based PandaBoard. | |
3 | * | |
4 | * Copyright (C) 2010 Texas Instruments | |
5 | * | |
6 | * Author: David Anders <x0132446@ti.com> | |
7 | * | |
8 | * Based on mach-omap2/board-4430sdp.c | |
9 | * | |
10 | * Author: Santosh Shilimkar <santosh.shilimkar@ti.com> | |
11 | * | |
12 | * Based on mach-omap2/board-3430sdp.c | |
13 | * | |
14 | * This program is free software; you can redistribute it and/or modify | |
15 | * it under the terms of the GNU General Public License version 2 as | |
16 | * published by the Free Software Foundation. | |
17 | */ | |
18 | ||
19 | #include <linux/kernel.h> | |
20 | #include <linux/init.h> | |
21 | #include <linux/platform_device.h> | |
1740d483 | 22 | #include <linux/clk.h> |
b075f58b | 23 | #include <linux/io.h> |
3da434ac | 24 | #include <linux/leds.h> |
b075f58b DA |
25 | #include <linux/gpio.h> |
26 | #include <linux/usb/otg.h> | |
27 | #include <linux/i2c/twl.h> | |
8eaeb939 | 28 | #include <linux/mfd/twl6040.h> |
b075f58b | 29 | #include <linux/regulator/machine.h> |
edc84061 | 30 | #include <linux/regulator/fixed.h> |
9624f615 | 31 | #include <linux/ti_wilink_st.h> |
e8c4a7ac | 32 | #include <linux/usb/musb.h> |
51482be9 | 33 | #include <linux/usb/phy.h> |
84337b63 | 34 | #include <linux/usb/nop-usb-xceiv.h> |
b17e0979 | 35 | #include <linux/wl12xx.h> |
520f7bd7 | 36 | #include <linux/irqchip/arm-gic.h> |
3c90c98a | 37 | #include <linux/platform_data/omap-abe-twl6040.h> |
b075f58b | 38 | |
b075f58b DA |
39 | #include <asm/mach-types.h> |
40 | #include <asm/mach/arch.h> | |
41 | #include <asm/mach/map.h> | |
b075f58b | 42 | |
6d02643d | 43 | #include "common.h" |
dbc04161 | 44 | #include "soc.h" |
68f39e74 | 45 | #include "mmc.h" |
b075f58b | 46 | #include "hsmmc.h" |
4814ced5 | 47 | #include "control.h" |
fc63de82 | 48 | #include "mux.h" |
fbd8071c | 49 | #include "common-board-devices.h" |
0191bf36 | 50 | #include "dss-common.h" |
b075f58b | 51 | |
4415beb6 DA |
52 | #define GPIO_HUB_POWER 1 |
53 | #define GPIO_HUB_NRESET 62 | |
edc84061 | 54 | #define GPIO_WIFI_PMENA 43 |
b17e0979 | 55 | #define GPIO_WIFI_IRQ 53 |
4415beb6 | 56 | |
ec179ea5 | 57 | /* wl127x BT, FM, GPS connectivity chip */ |
9624f615 MG |
58 | static struct ti_st_plat_data wilink_platform_data = { |
59 | .nshutdown_gpio = 46, | |
60 | .dev_name = "/dev/ttyO1", | |
61 | .flow_cntrl = 1, | |
62 | .baud_rate = 3000000, | |
63 | .chip_enable = NULL, | |
64 | .suspend = NULL, | |
65 | .resume = NULL, | |
66 | }; | |
67 | ||
ec179ea5 GE |
68 | static struct platform_device wl1271_device = { |
69 | .name = "kim", | |
70 | .id = -1, | |
71 | .dev = { | |
9624f615 | 72 | .platform_data = &wilink_platform_data, |
ec179ea5 GE |
73 | }, |
74 | }; | |
4415beb6 | 75 | |
3da434ac RSA |
76 | static struct gpio_led gpio_leds[] = { |
77 | { | |
78 | .name = "pandaboard::status1", | |
79 | .default_trigger = "heartbeat", | |
80 | .gpio = 7, | |
81 | }, | |
82 | { | |
83 | .name = "pandaboard::status2", | |
84 | .default_trigger = "mmc0", | |
85 | .gpio = 8, | |
86 | }, | |
87 | }; | |
b075f58b | 88 | |
3da434ac RSA |
89 | static struct gpio_led_platform_data gpio_led_info = { |
90 | .leds = gpio_leds, | |
91 | .num_leds = ARRAY_SIZE(gpio_leds), | |
92 | }; | |
93 | ||
94 | static struct platform_device leds_gpio = { | |
95 | .name = "leds-gpio", | |
96 | .id = -1, | |
97 | .dev = { | |
98 | .platform_data = &gpio_led_info, | |
99 | }, | |
100 | }; | |
101 | ||
3c90c98a PU |
102 | static struct omap_abe_twl6040_data panda_abe_audio_data = { |
103 | /* Audio out */ | |
104 | .has_hs = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT, | |
260db902 | 105 | /* HandsFree through expansion connector */ |
3c90c98a PU |
106 | .has_hf = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT, |
107 | /* PandaBoard: FM TX, PandaBoardES: can be connected to audio out */ | |
108 | .has_aux = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT, | |
109 | /* PandaBoard: FM RX, PandaBoardES: audio in */ | |
110 | .has_afm = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT, | |
111 | /* No jack detection. */ | |
112 | .jack_detection = 0, | |
113 | /* MCLK input is 38.4MHz */ | |
114 | .mclk_freq = 38400000, | |
115 | ||
116 | }; | |
117 | ||
118 | static struct platform_device panda_abe_audio = { | |
119 | .name = "omap-abe-twl6040", | |
120 | .id = -1, | |
121 | .dev = { | |
122 | .platform_data = &panda_abe_audio_data, | |
123 | }, | |
124 | }; | |
125 | ||
ce7962f9 RN |
126 | static struct platform_device panda_hdmi_audio_codec = { |
127 | .name = "hdmi-audio-codec", | |
128 | .id = -1, | |
129 | }; | |
130 | ||
65f19159 MG |
131 | static struct platform_device btwilink_device = { |
132 | .name = "btwilink", | |
133 | .id = -1, | |
134 | }; | |
135 | ||
84337b63 RQ |
136 | /* PHY device on HS USB Port 1 i.e. nop_usb_xceiv.1 */ |
137 | static struct nop_usb_xceiv_platform_data hsusb1_phy_data = { | |
138 | /* FREF_CLK3 provides the 19.2 MHz reference clock to the PHY */ | |
139 | .clk_rate = 19200000, | |
140 | }; | |
141 | ||
142 | static struct usbhs_phy_data phy_data[] __initdata = { | |
143 | { | |
144 | .port = 1, | |
145 | .reset_gpio = GPIO_HUB_NRESET, | |
146 | .vcc_gpio = GPIO_HUB_POWER, | |
147 | .vcc_polarity = 1, | |
148 | .platform_data = &hsusb1_phy_data, | |
149 | }, | |
150 | }; | |
151 | ||
3da434ac RSA |
152 | static struct platform_device *panda_devices[] __initdata = { |
153 | &leds_gpio, | |
ec179ea5 | 154 | &wl1271_device, |
3c90c98a | 155 | &panda_abe_audio, |
ce7962f9 | 156 | &panda_hdmi_audio_codec, |
65f19159 | 157 | &btwilink_device, |
3da434ac | 158 | }; |
b075f58b | 159 | |
42973159 | 160 | static struct usbhs_omap_platform_data usbhs_bdata __initdata = { |
181b250c | 161 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, |
bc593f5d IG |
162 | }; |
163 | ||
4415beb6 DA |
164 | static void __init omap4_ehci_init(void) |
165 | { | |
166 | int ret; | |
167 | ||
1740d483 | 168 | /* FREF_CLK3 provides the 19.2 MHz reference clock to the PHY */ |
84337b63 RQ |
169 | ret = clk_add_alias("main_clk", "nop_usb_xceiv.1", "auxclk3_ck", NULL); |
170 | if (ret) | |
171 | pr_err("Failed to add main_clk alias to auxclk3_ck\n"); | |
4415beb6 | 172 | |
84337b63 | 173 | usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data)); |
9e64bb1e | 174 | usbhs_init(&usbhs_bdata); |
4415beb6 DA |
175 | } |
176 | ||
b075f58b DA |
177 | static struct omap_musb_board_data musb_board_data = { |
178 | .interface_type = MUSB_INTERFACE_UTMI, | |
09e72002 | 179 | .mode = MUSB_OTG, |
b075f58b DA |
180 | .power = 100, |
181 | }; | |
182 | ||
183 | static struct omap2_hsmmc_info mmc[] = { | |
184 | { | |
185 | .mmc = 1, | |
3a63833e | 186 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, |
b075f58b | 187 | .gpio_wp = -EINVAL, |
5b59cc2f | 188 | .gpio_cd = -EINVAL, |
b075f58b | 189 | }, |
b17e0979 PM |
190 | { |
191 | .name = "wl1271", | |
192 | .mmc = 5, | |
193 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD, | |
194 | .gpio_wp = -EINVAL, | |
195 | .gpio_cd = -EINVAL, | |
196 | .ocr_mask = MMC_VDD_165_195, | |
197 | .nonremovable = true, | |
198 | }, | |
b075f58b DA |
199 | {} /* Terminator */ |
200 | }; | |
201 | ||
786b01a8 OD |
202 | static struct regulator_consumer_supply omap4_panda_vmmc5_supply[] = { |
203 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.4"), | |
edc84061 PM |
204 | }; |
205 | ||
206 | static struct regulator_init_data panda_vmmc5 = { | |
207 | .constraints = { | |
208 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | |
209 | }, | |
786b01a8 OD |
210 | .num_consumer_supplies = ARRAY_SIZE(omap4_panda_vmmc5_supply), |
211 | .consumer_supplies = omap4_panda_vmmc5_supply, | |
edc84061 PM |
212 | }; |
213 | ||
214 | static struct fixed_voltage_config panda_vwlan = { | |
215 | .supply_name = "vwl1271", | |
216 | .microvolts = 1800000, /* 1.8V */ | |
217 | .gpio = GPIO_WIFI_PMENA, | |
218 | .startup_delay = 70000, /* 70msec */ | |
219 | .enable_high = 1, | |
220 | .enabled_at_boot = 0, | |
221 | .init_data = &panda_vmmc5, | |
222 | }; | |
223 | ||
224 | static struct platform_device omap_vwlan_device = { | |
225 | .name = "reg-fixed-voltage", | |
226 | .id = 1, | |
227 | .dev = { | |
228 | .platform_data = &panda_vwlan, | |
229 | }, | |
230 | }; | |
231 | ||
8c3d4534 | 232 | static struct wl12xx_platform_data omap_panda_wlan_data __initdata = { |
224cd711 | 233 | .board_ref_clock = WL12XX_REFCLOCK_38, /* 38.4 MHz */ |
b17e0979 PM |
234 | }; |
235 | ||
8eaeb939 | 236 | static struct twl6040_codec_data twl6040_codec = { |
3c90c98a PU |
237 | /* single-step ramp for headset and handsfree */ |
238 | .hs_left_step = 0x0f, | |
239 | .hs_right_step = 0x0f, | |
240 | .hf_left_step = 0x1d, | |
241 | .hf_right_step = 0x1d, | |
242 | }; | |
243 | ||
8eaeb939 | 244 | static struct twl6040_platform_data twl6040_data = { |
3c90c98a PU |
245 | .codec = &twl6040_codec, |
246 | .audpwron_gpio = 127, | |
3c90c98a PU |
247 | }; |
248 | ||
9495d1e2 PU |
249 | static struct i2c_board_info __initdata panda_i2c_1_boardinfo[] = { |
250 | { | |
251 | I2C_BOARD_INFO("twl6040", 0x4b), | |
252 | .irq = 119 + OMAP44XX_IRQ_GIC_START, | |
253 | .platform_data = &twl6040_data, | |
254 | }, | |
255 | }; | |
256 | ||
b22f954b | 257 | /* Panda board uses the common PMIC configuration */ |
8eaeb939 | 258 | static struct twl4030_platform_data omap4_panda_twldata; |
b075f58b | 259 | |
b295d6e5 MR |
260 | /* |
261 | * Display monitor features are burnt in their EEPROM as EDID data. The EEPROM | |
262 | * is connected as I2C slave device, and can be accessed at address 0x50 | |
263 | */ | |
264 | static struct i2c_board_info __initdata panda_i2c_eeprom[] = { | |
265 | { | |
266 | I2C_BOARD_INFO("eeprom", 0x50), | |
267 | }, | |
268 | }; | |
269 | ||
b075f58b DA |
270 | static int __init omap4_panda_i2c_init(void) |
271 | { | |
b22f954b PU |
272 | omap4_pmic_get_config(&omap4_panda_twldata, TWL_COMMON_PDATA_USB, |
273 | TWL_COMMON_REGULATOR_VDAC | | |
274 | TWL_COMMON_REGULATOR_VAUX2 | | |
275 | TWL_COMMON_REGULATOR_VAUX3 | | |
276 | TWL_COMMON_REGULATOR_VMMC | | |
277 | TWL_COMMON_REGULATOR_VPP | | |
278 | TWL_COMMON_REGULATOR_VANA | | |
279 | TWL_COMMON_REGULATOR_VCXIO | | |
280 | TWL_COMMON_REGULATOR_VUSB | | |
8500746f PU |
281 | TWL_COMMON_REGULATOR_CLK32KG | |
282 | TWL_COMMON_REGULATOR_V1V8 | | |
283 | TWL_COMMON_REGULATOR_V2V1); | |
9495d1e2 PU |
284 | omap4_pmic_init("twl6030", &omap4_panda_twldata, panda_i2c_1_boardinfo, |
285 | ARRAY_SIZE(panda_i2c_1_boardinfo)); | |
b075f58b | 286 | omap_register_i2c_bus(2, 400, NULL, 0); |
b295d6e5 MR |
287 | /* |
288 | * Bus 3 is attached to the DVI port where devices like the pico DLP | |
289 | * projector don't work reliably with 400kHz | |
290 | */ | |
291 | omap_register_i2c_bus(3, 100, panda_i2c_eeprom, | |
292 | ARRAY_SIZE(panda_i2c_eeprom)); | |
b075f58b DA |
293 | omap_register_i2c_bus(4, 400, NULL, 0); |
294 | return 0; | |
295 | } | |
fc63de82 | 296 | |
297 | #ifdef CONFIG_OMAP_MUX | |
298 | static struct omap_board_mux board_mux[] __initdata = { | |
66e171a3 PM |
299 | /* WLAN IRQ - GPIO 53 */ |
300 | OMAP4_MUX(GPMC_NCS3, OMAP_MUX_MODE3 | OMAP_PIN_INPUT), | |
301 | /* WLAN POWER ENABLE - GPIO 43 */ | |
302 | OMAP4_MUX(GPMC_A19, OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT), | |
303 | /* WLAN SDIO: MMC5 CMD */ | |
304 | OMAP4_MUX(SDMMC5_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | |
305 | /* WLAN SDIO: MMC5 CLK */ | |
306 | OMAP4_MUX(SDMMC5_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | |
307 | /* WLAN SDIO: MMC5 DAT[0-3] */ | |
308 | OMAP4_MUX(SDMMC5_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | |
309 | OMAP4_MUX(SDMMC5_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | |
310 | OMAP4_MUX(SDMMC5_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | |
311 | OMAP4_MUX(SDMMC5_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | |
b295d6e5 MR |
312 | /* gpio 0 - TFP410 PD */ |
313 | OMAP4_MUX(KPD_COL1, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3), | |
314 | /* dispc2_data23 */ | |
315 | OMAP4_MUX(USBB2_ULPITLL_STP, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
316 | /* dispc2_data22 */ | |
317 | OMAP4_MUX(USBB2_ULPITLL_DIR, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
318 | /* dispc2_data21 */ | |
319 | OMAP4_MUX(USBB2_ULPITLL_NXT, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
320 | /* dispc2_data20 */ | |
321 | OMAP4_MUX(USBB2_ULPITLL_DAT0, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
322 | /* dispc2_data19 */ | |
323 | OMAP4_MUX(USBB2_ULPITLL_DAT1, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
324 | /* dispc2_data18 */ | |
325 | OMAP4_MUX(USBB2_ULPITLL_DAT2, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
326 | /* dispc2_data15 */ | |
327 | OMAP4_MUX(USBB2_ULPITLL_DAT3, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
328 | /* dispc2_data14 */ | |
329 | OMAP4_MUX(USBB2_ULPITLL_DAT4, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
330 | /* dispc2_data13 */ | |
331 | OMAP4_MUX(USBB2_ULPITLL_DAT5, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
332 | /* dispc2_data12 */ | |
333 | OMAP4_MUX(USBB2_ULPITLL_DAT6, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
334 | /* dispc2_data11 */ | |
335 | OMAP4_MUX(USBB2_ULPITLL_DAT7, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
336 | /* dispc2_data10 */ | |
337 | OMAP4_MUX(DPM_EMU3, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
338 | /* dispc2_data9 */ | |
339 | OMAP4_MUX(DPM_EMU4, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
340 | /* dispc2_data16 */ | |
341 | OMAP4_MUX(DPM_EMU5, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
342 | /* dispc2_data17 */ | |
343 | OMAP4_MUX(DPM_EMU6, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
344 | /* dispc2_hsync */ | |
345 | OMAP4_MUX(DPM_EMU7, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
346 | /* dispc2_pclk */ | |
347 | OMAP4_MUX(DPM_EMU8, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
348 | /* dispc2_vsync */ | |
349 | OMAP4_MUX(DPM_EMU9, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
350 | /* dispc2_de */ | |
351 | OMAP4_MUX(DPM_EMU10, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
352 | /* dispc2_data8 */ | |
353 | OMAP4_MUX(DPM_EMU11, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
354 | /* dispc2_data7 */ | |
355 | OMAP4_MUX(DPM_EMU12, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
356 | /* dispc2_data6 */ | |
357 | OMAP4_MUX(DPM_EMU13, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
358 | /* dispc2_data5 */ | |
359 | OMAP4_MUX(DPM_EMU14, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
360 | /* dispc2_data4 */ | |
361 | OMAP4_MUX(DPM_EMU15, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
362 | /* dispc2_data3 */ | |
363 | OMAP4_MUX(DPM_EMU16, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
364 | /* dispc2_data2 */ | |
365 | OMAP4_MUX(DPM_EMU17, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
366 | /* dispc2_data1 */ | |
367 | OMAP4_MUX(DPM_EMU18, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
368 | /* dispc2_data0 */ | |
369 | OMAP4_MUX(DPM_EMU19, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | |
6d2b6c9e PU |
370 | /* NIRQ2 for twl6040 */ |
371 | OMAP4_MUX(SYS_NIRQ2, OMAP_MUX_MODE0 | | |
372 | OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE), | |
e13214df PU |
373 | /* GPIO_127 for twl6040 */ |
374 | OMAP4_MUX(HDQ_SIO, OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT), | |
375 | /* McPDM */ | |
376 | OMAP4_MUX(ABE_PDM_UL_DATA, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN), | |
377 | OMAP4_MUX(ABE_PDM_DL_DATA, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN), | |
378 | OMAP4_MUX(ABE_PDM_FRAME, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | |
379 | OMAP4_MUX(ABE_PDM_LB_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN), | |
380 | OMAP4_MUX(ABE_CLKS, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN), | |
381 | /* McBSP1 */ | |
382 | OMAP4_MUX(ABE_MCBSP1_CLKX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | |
383 | OMAP4_MUX(ABE_MCBSP1_DR, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN), | |
384 | OMAP4_MUX(ABE_MCBSP1_DX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT | | |
385 | OMAP_PULL_ENA), | |
386 | OMAP4_MUX(ABE_MCBSP1_FSX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | |
387 | ||
7662a9c6 LC |
388 | /* UART2 - BT/FM/GPS shared transport */ |
389 | OMAP4_MUX(UART2_CTS, OMAP_PIN_INPUT | OMAP_MUX_MODE0), | |
390 | OMAP4_MUX(UART2_RTS, OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), | |
391 | OMAP4_MUX(UART2_RX, OMAP_PIN_INPUT | OMAP_MUX_MODE0), | |
392 | OMAP4_MUX(UART2_TX, OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), | |
393 | ||
fc63de82 | 394 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
395 | }; | |
573efc2b | 396 | |
fc63de82 | 397 | #else |
398 | #define board_mux NULL | |
399 | #endif | |
400 | ||
17c84ef1 | 401 | |
3c90c98a PU |
402 | static void omap4_panda_init_rev(void) |
403 | { | |
0324e02a | 404 | if (cpu_is_omap443x()) { |
3c90c98a PU |
405 | /* PandaBoard 4430 */ |
406 | /* ASoC audio configuration */ | |
407 | panda_abe_audio_data.card_name = "PandaBoard"; | |
408 | panda_abe_audio_data.has_hsmic = 1; | |
409 | } else { | |
410 | /* PandaBoard ES */ | |
411 | /* ASoC audio configuration */ | |
412 | panda_abe_audio_data.card_name = "PandaBoardES"; | |
413 | } | |
414 | } | |
415 | ||
b075f58b DA |
416 | static void __init omap4_panda_init(void) |
417 | { | |
fc63de82 | 418 | int package = OMAP_PACKAGE_CBS; |
70d669de | 419 | int ret; |
fc63de82 | 420 | |
421 | if (omap_rev() == OMAP4430_REV_ES1_0) | |
422 | package = OMAP_PACKAGE_CBL; | |
21a42c92 | 423 | omap4_mux_init(board_mux, NULL, package); |
fc63de82 | 424 | |
46a0a540 | 425 | omap_panda_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ); |
70d669de RK |
426 | ret = wl12xx_set_platform_data(&omap_panda_wlan_data); |
427 | if (ret) | |
428 | pr_err("error setting wl12xx data: %d\n", ret); | |
b17e0979 | 429 | |
3c90c98a | 430 | omap4_panda_init_rev(); |
b075f58b | 431 | omap4_panda_i2c_init(); |
3da434ac | 432 | platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); |
edc84061 | 433 | platform_device_register(&omap_vwlan_device); |
7496ba30 | 434 | omap_serial_init(); |
a4ca9dbe | 435 | omap_sdrc_init(NULL, NULL); |
b075f58b | 436 | omap4_twl6030_hsmmc_init(mmc); |
4415beb6 | 437 | omap4_ehci_init(); |
08a48be3 | 438 | usb_bind_phy("musb-hdrc.2.auto", 0, "omap-usb2.3.auto"); |
1ea7f352 | 439 | usb_musb_init(&musb_board_data); |
17c84ef1 | 440 | omap4_panda_display_init(); |
b075f58b DA |
441 | } |
442 | ||
b075f58b DA |
443 | MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board") |
444 | /* Maintainer: David Anders - Texas Instruments Inc */ | |
5e52b435 | 445 | .atag_offset = 0x100, |
06915321 | 446 | .smp = smp_ops(omap4_smp_ops), |
d920e520 | 447 | .reserve = omap_reserve, |
e990a406 | 448 | .map_io = omap4_map_io, |
8f5b5a41 | 449 | .init_early = omap4430_init_early, |
3dc3bad6 | 450 | .init_irq = gic_init_irq, |
b075f58b | 451 | .init_machine = omap4_panda_init, |
bbd707ac | 452 | .init_late = omap4430_init_late, |
6bb27d73 | 453 | .init_time = omap4_local_timer_init, |
187e3e06 | 454 | .restart = omap44xx_restart, |
b075f58b | 455 | MACHINE_END |