aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-omap4panda.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/board-omap4panda.c')
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c46
1 files changed, 40 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 1ecd0a6cefb7..e001a048dc0c 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -19,6 +19,7 @@
19#include <linux/kernel.h> 19#include <linux/kernel.h>
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/clk.h>
22#include <linux/io.h> 23#include <linux/io.h>
23#include <linux/leds.h> 24#include <linux/leds.h>
24#include <linux/gpio.h> 25#include <linux/gpio.h>
@@ -40,6 +41,7 @@
40 41
41#include "hsmmc.h" 42#include "hsmmc.h"
42#include "control.h" 43#include "control.h"
44#include "mux.h"
43 45
44#define GPIO_HUB_POWER 1 46#define GPIO_HUB_POWER 1
45#define GPIO_HUB_NRESET 62 47#define GPIO_HUB_NRESET 62
@@ -76,9 +78,9 @@ static struct platform_device *panda_devices[] __initdata = {
76 78
77static void __init omap4_panda_init_irq(void) 79static void __init omap4_panda_init_irq(void)
78{ 80{
79 omap2_init_common_hw(NULL, NULL); 81 omap2_init_common_infrastructure();
82 omap2_init_common_devices(NULL, NULL);
80 gic_init_irq(); 83 gic_init_irq();
81 omap_gpio_init();
82} 84}
83 85
84static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { 86static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
@@ -94,7 +96,16 @@ static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
94static void __init omap4_ehci_init(void) 96static void __init omap4_ehci_init(void)
95{ 97{
96 int ret; 98 int ret;
99 struct clk *phy_ref_clk;
97 100
101 /* FREF_CLK3 provides the 19.2 MHz reference clock to the PHY */
102 phy_ref_clk = clk_get(NULL, "auxclk3_ck");
103 if (IS_ERR(phy_ref_clk)) {
104 pr_err("Cannot request auxclk3\n");
105 goto error1;
106 }
107 clk_set_rate(phy_ref_clk, 19200000);
108 clk_enable(phy_ref_clk);
98 109
99 /* disable the power to the usb hub prior to init */ 110 /* disable the power to the usb hub prior to init */
100 ret = gpio_request(GPIO_HUB_POWER, "hub_power"); 111 ret = gpio_request(GPIO_HUB_POWER, "hub_power");
@@ -133,15 +144,23 @@ error1:
133 144
134static struct omap_musb_board_data musb_board_data = { 145static struct omap_musb_board_data musb_board_data = {
135 .interface_type = MUSB_INTERFACE_UTMI, 146 .interface_type = MUSB_INTERFACE_UTMI,
136 .mode = MUSB_PERIPHERAL, 147 .mode = MUSB_OTG,
137 .power = 100, 148 .power = 100,
138}; 149};
139 150
151static struct twl4030_usb_data omap4_usbphy_data = {
152 .phy_init = omap4430_phy_init,
153 .phy_exit = omap4430_phy_exit,
154 .phy_power = omap4430_phy_power,
155 .phy_set_clock = omap4430_phy_set_clk,
156};
157
140static struct omap2_hsmmc_info mmc[] = { 158static struct omap2_hsmmc_info mmc[] = {
141 { 159 {
142 .mmc = 1, 160 .mmc = 1,
143 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, 161 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
144 .gpio_wp = -EINVAL, 162 .gpio_wp = -EINVAL,
163 .gpio_cd = -EINVAL,
145 }, 164 },
146 {} /* Terminator */ 165 {} /* Terminator */
147}; 166};
@@ -345,6 +364,7 @@ static struct twl4030_platform_data omap4_panda_twldata = {
345 .vaux1 = &omap4_panda_vaux1, 364 .vaux1 = &omap4_panda_vaux1,
346 .vaux2 = &omap4_panda_vaux2, 365 .vaux2 = &omap4_panda_vaux2,
347 .vaux3 = &omap4_panda_vaux3, 366 .vaux3 = &omap4_panda_vaux3,
367 .usb = &omap4_usbphy_data,
348}; 368};
349 369
350static struct i2c_board_info __initdata omap4_panda_i2c_boardinfo[] = { 370static struct i2c_board_info __initdata omap4_panda_i2c_boardinfo[] = {
@@ -368,8 +388,23 @@ static int __init omap4_panda_i2c_init(void)
368 omap_register_i2c_bus(4, 400, NULL, 0); 388 omap_register_i2c_bus(4, 400, NULL, 0);
369 return 0; 389 return 0;
370} 390}
391
392#ifdef CONFIG_OMAP_MUX
393static struct omap_board_mux board_mux[] __initdata = {
394 { .reg_offset = OMAP_MUX_TERMINATOR },
395};
396#else
397#define board_mux NULL
398#endif
399
371static void __init omap4_panda_init(void) 400static void __init omap4_panda_init(void)
372{ 401{
402 int package = OMAP_PACKAGE_CBS;
403
404 if (omap_rev() == OMAP4430_REV_ES1_0)
405 package = OMAP_PACKAGE_CBL;
406 omap4_mux_init(board_mux, package);
407
373 omap4_panda_i2c_init(); 408 omap4_panda_i2c_init();
374 platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); 409 platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
375 omap_serial_init(); 410 omap_serial_init();
@@ -377,9 +412,7 @@ static void __init omap4_panda_init(void)
377 /* OMAP4 Panda uses internal transceiver so register nop transceiver */ 412 /* OMAP4 Panda uses internal transceiver so register nop transceiver */
378 usb_nop_xceiv_register(); 413 usb_nop_xceiv_register();
379 omap4_ehci_init(); 414 omap4_ehci_init();
380 /* FIXME: allow multi-omap to boot until musb is updated for omap4 */ 415 usb_musb_init(&musb_board_data);
381 if (!cpu_is_omap44xx())
382 usb_musb_init(&musb_board_data);
383} 416}
384 417
385static void __init omap4_panda_map_io(void) 418static void __init omap4_panda_map_io(void)
@@ -391,6 +424,7 @@ static void __init omap4_panda_map_io(void)
391MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board") 424MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
392 /* Maintainer: David Anders - Texas Instruments Inc */ 425 /* Maintainer: David Anders - Texas Instruments Inc */
393 .boot_params = 0x80000100, 426 .boot_params = 0x80000100,
427 .reserve = omap_reserve,
394 .map_io = omap4_panda_map_io, 428 .map_io = omap4_panda_map_io,
395 .init_irq = omap4_panda_init_irq, 429 .init_irq = omap4_panda_init_irq,
396 .init_machine = omap4_panda_init, 430 .init_machine = omap4_panda_init,