|
@@ -379,3 +379,109 @@ static struct gpio_led gpio_leds[] = {
|
|
|
{
|
|
|
.name = "beagleboard::pmu_stat",
|
|
|
.gpio = -EINVAL, /* gets replaced */
|
|
|
+ .active_low = true,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct gpio_led_platform_data gpio_led_info = {
|
|
|
+ .leds = gpio_leds,
|
|
|
+ .num_leds = ARRAY_SIZE(gpio_leds),
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device leds_gpio = {
|
|
|
+ .name = "leds-gpio",
|
|
|
+ .id = -1,
|
|
|
+ .dev = {
|
|
|
+ .platform_data = &gpio_led_info,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct gpio_keys_button gpio_buttons[] = {
|
|
|
+ {
|
|
|
+ .code = BTN_EXTRA,
|
|
|
+ /* Dynamically assigned depending on board */
|
|
|
+ .gpio = -EINVAL,
|
|
|
+ .desc = "user",
|
|
|
+ .wakeup = 1,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct gpio_keys_platform_data gpio_key_info = {
|
|
|
+ .buttons = gpio_buttons,
|
|
|
+ .nbuttons = ARRAY_SIZE(gpio_buttons),
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device keys_gpio = {
|
|
|
+ .name = "gpio-keys",
|
|
|
+ .id = -1,
|
|
|
+ .dev = {
|
|
|
+ .platform_data = &gpio_key_info,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device madc_hwmon = {
|
|
|
+ .name = "twl4030_madc_hwmon",
|
|
|
+ .id = -1,
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device *omap3_beagle_devices[] __initdata = {
|
|
|
+ &leds_gpio,
|
|
|
+ &keys_gpio,
|
|
|
+ &madc_hwmon,
|
|
|
+};
|
|
|
+
|
|
|
+static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
|
|
|
+
|
|
|
+ .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
|
|
|
+ .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
|
|
|
+ .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
|
|
|
+
|
|
|
+ .phy_reset = true,
|
|
|
+ .reset_gpio_port[0] = -EINVAL,
|
|
|
+ .reset_gpio_port[1] = 147,
|
|
|
+ .reset_gpio_port[2] = -EINVAL
|
|
|
+};
|
|
|
+
|
|
|
+#ifdef CONFIG_OMAP_MUX
|
|
|
+static struct omap_board_mux board_mux[] __initdata = {
|
|
|
+ { .reg_offset = OMAP_MUX_TERMINATOR },
|
|
|
+};
|
|
|
+#endif
|
|
|
+
|
|
|
+static int __init beagle_opp_init(void)
|
|
|
+{
|
|
|
+ int r = 0;
|
|
|
+
|
|
|
+ if (!machine_is_omap3_beagle())
|
|
|
+ return 0;
|
|
|
+
|
|
|
+ /* Initialize the omap3 opp table if not already created. */
|
|
|
+ r = omap3_opp_init();
|
|
|
+ if (IS_ERR_VALUE(r) && (r != -EEXIST)) {
|
|
|
+ pr_err("%s: opp default init failed\n", __func__);
|
|
|
+ return r;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* Custom OPP enabled for all xM versions */
|
|
|
+ if (cpu_is_omap3630()) {
|
|
|
+ struct device *mpu_dev, *iva_dev;
|
|
|
+
|
|
|
+ mpu_dev = get_cpu_device(0);
|
|
|
+ iva_dev = omap_device_get_by_hwmod_name("iva");
|
|
|
+
|
|
|
+ if (IS_ERR(mpu_dev) || IS_ERR(iva_dev)) {
|
|
|
+ pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n",
|
|
|
+ __func__, mpu_dev, iva_dev);
|
|
|
+ return -ENODEV;
|
|
|
+ }
|
|
|
+ /* Enable MPU 1GHz and lower opps */
|
|
|
+ r = opp_enable(mpu_dev, 800000000);
|
|
|
+ /* TODO: MPU 1GHz needs SR and ABB */
|
|
|
+
|
|
|
+ /* Enable IVA 800MHz and lower opps */
|
|
|
+ r |= opp_enable(iva_dev, 660000000);
|
|
|
+ /* TODO: DSP 800MHz needs SR and ABB */
|
|
|
+ if (r) {
|
|
|
+ pr_err("%s: failed to enable higher opp %d\n",
|
|
|
+ __func__, r);
|
|
|
+ /*
|