diff options
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap-2.6.39/beagle')
8 files changed, 733 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0001-OMAP3-beagle-add-support-for-beagleboard-xM-revision.patch b/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0001-OMAP3-beagle-add-support-for-beagleboard-xM-revision.patch new file mode 100644 index 00000000..7522d6c1 --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0001-OMAP3-beagle-add-support-for-beagleboard-xM-revision.patch @@ -0,0 +1,117 @@ +From 16c1bdb30f1bcd750b29dffd2ef3003be2d30610 Mon Sep 17 00:00:00 2001 +From: Koen Kooi <koen@dominion.thruhere.net> +Date: Fri, 20 May 2011 12:48:37 +0200 +Subject: [PATCH 1/7] OMAP3: beagle: add support for beagleboard xM revision C + +The USB enable GPIO has been inverted and the USER button moved. + +Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> +--- + arch/arm/mach-omap2/board-omap3beagle.c | 34 +++++++++++++++++++++++------- + 1 files changed, 26 insertions(+), 8 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 2de4b02..77bafa8 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -62,7 +62,9 @@ + * AXBX = GPIO173, GPIO172, GPIO171: 1 1 1 + * C1_3 = GPIO173, GPIO172, GPIO171: 1 1 0 + * C4 = GPIO173, GPIO172, GPIO171: 1 0 1 +- * XM = GPIO173, GPIO172, GPIO171: 0 0 0 ++ * XMA = GPIO173, GPIO172, GPIO171: 0 0 0 ++ * XMB = GPIO173, GPIO172, GPIO171: 0 0 1 ++ * XMC = GPIO173, GPIO172, GPIO171: 0 1 0 + */ + enum { + OMAP3BEAGLE_BOARD_UNKN = 0, +@@ -70,6 +72,7 @@ enum { + OMAP3BEAGLE_BOARD_C1_3, + OMAP3BEAGLE_BOARD_C4, + OMAP3BEAGLE_BOARD_XM, ++ OMAP3BEAGLE_BOARD_XMC, + }; + + static u8 omap3_beagle_version; +@@ -124,9 +127,18 @@ static void __init omap3_beagle_init_rev(void) + printk(KERN_INFO "OMAP3 Beagle Rev: xM\n"); + omap3_beagle_version = OMAP3BEAGLE_BOARD_XM; + break; ++ case 1: ++ printk(KERN_INFO "OMAP3 Beagle Rev: xM B\n"); ++ omap3_beagle_version = OMAP3BEAGLE_BOARD_XM; ++ break; ++ case 2: ++ printk(KERN_INFO "OMAP3 Beagle Rev: xM C\n"); ++ omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC; ++ break; + default: +- printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev); +- omap3_beagle_version = OMAP3BEAGLE_BOARD_UNKN; ++ printk(KERN_INFO ++ "OMAP3 Beagle Rev: unknown %hd, assuming xM C or newer\n", beagle_rev); ++ omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC; + } + + return; +@@ -278,7 +290,7 @@ static int beagle_twl_gpio_setup(struct device *dev, + { + int r; + +- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { ++ if (cpu_is_omap3630()) { + mmc[0].gpio_wp = -EINVAL; + } else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) || + (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C4)) { +@@ -298,7 +310,8 @@ static int beagle_twl_gpio_setup(struct device *dev, + /* REVISIT: need ehci-omap hooks for external VBUS + * power switch and overcurrent detect + */ +- if (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM) { ++ if (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM ++ && omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XMC) { + r = gpio_request(gpio + 1, "EHCI_nOC"); + if (!r) { + r = gpio_direction_input(gpio + 1); +@@ -320,7 +333,7 @@ static int beagle_twl_gpio_setup(struct device *dev, + gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); + + /* DVI reset GPIO is different between beagle revisions */ +- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) ++ if (cpu_is_omap3630()) + beagle_dvi_device.reset_gpio = 129; + else + beagle_dvi_device.reset_gpio = 170; +@@ -334,7 +347,7 @@ static int beagle_twl_gpio_setup(struct device *dev, + * P7/P8 revisions(prototype): Camera EN + * A2+ revisions (production): LDO (supplies DVI, serial, led blocks) + */ +- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { ++ if (cpu_is_omap3630()) { + r = gpio_request(gpio + 1, "nDVI_PWR_EN"); + if (!r) { + r = gpio_direction_output(gpio + 1, 0); +@@ -625,7 +638,7 @@ static void __init beagle_opp_init(void) + } + + /* Custom OPP enabled for XM */ +- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { ++ if (cpu_is_omap3630()) { + struct omap_hwmod *mh = omap_hwmod_lookup("mpu"); + struct omap_hwmod *dh = omap_hwmod_lookup("iva"); + struct device *dev; +@@ -665,6 +678,11 @@ static void __init omap3_beagle_init(void) + omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); + omap3_beagle_init_rev(); + omap3_beagle_i2c_init(); ++ ++ if (cpu_is_omap3630()) { ++ gpio_buttons[0].gpio = 4; ++ } ++ + platform_add_devices(omap3_beagle_devices, + ARRAY_SIZE(omap3_beagle_devices)); + omap_display_init(&beagle_dss_data); +-- +1.6.6.1 + diff --git a/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0002-OMAP3-beagle-add-support-for-expansionboards.patch b/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0002-OMAP3-beagle-add-support-for-expansionboards.patch new file mode 100644 index 00000000..2e95c763 --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0002-OMAP3-beagle-add-support-for-expansionboards.patch @@ -0,0 +1,359 @@ +From 27494059a5d005b8cad4e0e8640ff031b86220dc Mon Sep 17 00:00:00 2001 +From: Koen Kooi <koen@dominion.thruhere.net> +Date: Fri, 20 May 2011 13:06:24 +0200 +Subject: [PATCH 2/7] OMAP3: beagle: add support for expansionboards + +Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> +--- + arch/arm/mach-omap2/board-omap3beagle.c | 272 ++++++++++++++++++++++++++++++- + 1 files changed, 269 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 77bafa8..db285e1 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -21,6 +21,7 @@ + #include <linux/io.h> + #include <linux/leds.h> + #include <linux/gpio.h> ++#include <linux/irq.h> + #include <linux/input.h> + #include <linux/gpio_keys.h> + #include <linux/opp.h> +@@ -154,6 +155,167 @@ fail0: + return; + } + ++char expansionboard_name[16]; ++ ++#if defined(CONFIG_WL12XX) || defined(CONFIG_WL12XX_MODULE) ++#include <linux/regulator/fixed.h> ++#include <linux/wl12xx.h> ++ ++#define OMAP_BEAGLE_WLAN_EN_GPIO (139) ++#define OMAP_BEAGLE_BT_EN_GPIO (138) ++#define OMAP_BEAGLE_WLAN_IRQ_GPIO (137) ++#define OMAP_BEAGLE_FM_EN_BT_WU (136) ++ ++struct wl12xx_platform_data omap_beagle_wlan_data __initdata = { ++ .irq = OMAP_GPIO_IRQ(OMAP_BEAGLE_WLAN_IRQ_GPIO), ++ .board_ref_clock = 2, /* 38.4 MHz */ ++}; ++ ++static int gpios[] = {OMAP_BEAGLE_BT_EN_GPIO, OMAP_BEAGLE_FM_EN_BT_WU, -1}; ++static struct platform_device wl12xx_device = { ++ .name = "kim", ++ .id = -1, ++ .dev.platform_data = &gpios, ++}; ++ ++static struct omap2_hsmmc_info mmcbbt[] = { ++ { ++ .mmc = 1, ++ .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, ++ .gpio_wp = 29, ++ }, ++ { ++ .name = "wl1271", ++ .mmc = 2, ++ .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD, ++ .gpio_wp = -EINVAL, ++ .gpio_cd = -EINVAL, ++ .ocr_mask = MMC_VDD_165_195, ++ .nonremovable = true, ++ }, ++ {} /* Terminator */ ++ }; ++ ++static struct regulator_consumer_supply beagle_vmmc2_supply = ++ REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); ++ ++static struct regulator_init_data beagle_vmmc2 = { ++ .constraints = { ++ .min_uV = 1850000, ++ .max_uV = 1850000, ++ .apply_uV = true, ++ .valid_modes_mask = REGULATOR_MODE_NORMAL ++ | REGULATOR_MODE_STANDBY, ++ .valid_ops_mask = REGULATOR_CHANGE_MODE ++ | REGULATOR_CHANGE_STATUS, ++ }, ++ .num_consumer_supplies = 1, ++ .consumer_supplies = &beagle_vmmc2_supply, ++}; ++ ++static struct fixed_voltage_config beagle_vwlan = { ++ .supply_name = "vwl1271", ++ .microvolts = 1800000, /* 1.8V */ ++ .gpio = OMAP_BEAGLE_WLAN_EN_GPIO, ++ .startup_delay = 70000, /* 70ms */ ++ .enable_high = 1, ++ .enabled_at_boot = 0, ++ .init_data = &beagle_vmmc2, ++}; ++ ++static struct platform_device omap_vwlan_device = { ++ .name = "reg-fixed-voltage", ++ .id = 1, ++ .dev = { ++ .platform_data = &beagle_vwlan, ++ }, ++}; ++#endif ++ ++#if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) ++ ++#include <plat/mcspi.h> ++#include <linux/spi/spi.h> ++ ++#define OMAP3BEAGLE_GPIO_ENC28J60_IRQ 157 ++ ++static struct omap2_mcspi_device_config enc28j60_spi_chip_info = { ++ .turbo_mode = 0, ++ .single_channel = 1, /* 0: slave, 1: master */ ++}; ++ ++static struct spi_board_info omap3beagle_zippy_spi_board_info[] __initdata = { ++ { ++ .modalias = "enc28j60", ++ .bus_num = 4, ++ .chip_select = 0, ++ .max_speed_hz = 20000000, ++ .controller_data = &enc28j60_spi_chip_info, ++ }, ++}; ++ ++static void __init omap3beagle_enc28j60_init(void) ++{ ++ if ((gpio_request(OMAP3BEAGLE_GPIO_ENC28J60_IRQ, "ENC28J60_IRQ") == 0) && ++ (gpio_direction_input(OMAP3BEAGLE_GPIO_ENC28J60_IRQ) == 0)) { ++ gpio_export(OMAP3BEAGLE_GPIO_ENC28J60_IRQ, 0); ++ omap3beagle_zippy_spi_board_info[0].irq = OMAP_GPIO_IRQ(OMAP3BEAGLE_GPIO_ENC28J60_IRQ); ++ irq_set_irq_type(omap3beagle_zippy_spi_board_info[0].irq, IRQ_TYPE_EDGE_FALLING); ++ } else { ++ printk(KERN_ERR "could not obtain gpio for ENC28J60_IRQ\n"); ++ return; ++ } ++ ++ spi_register_board_info(omap3beagle_zippy_spi_board_info, ++ ARRAY_SIZE(omap3beagle_zippy_spi_board_info)); ++} ++ ++#else ++static inline void __init omap3beagle_enc28j60_init(void) { return; } ++#endif ++ ++#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) ++ ++#include <plat/mcspi.h> ++#include <linux/spi/spi.h> ++ ++#define OMAP3BEAGLE_GPIO_KS8851_IRQ 157 ++ ++static struct omap2_mcspi_device_config ks8851_spi_chip_info = { ++ .turbo_mode = 0, ++ .single_channel = 1, /* 0: slave, 1: master */ ++}; ++ ++static struct spi_board_info omap3beagle_zippy2_spi_board_info[] __initdata = { ++ { ++ .modalias = "ks8851", ++ .bus_num = 4, ++ .chip_select = 0, ++ .max_speed_hz = 36000000, ++ .controller_data = &ks8851_spi_chip_info, ++ }, ++}; ++ ++static void __init omap3beagle_ks8851_init(void) ++{ ++ if ((gpio_request(OMAP3BEAGLE_GPIO_KS8851_IRQ, "KS8851_IRQ") == 0) && ++ (gpio_direction_input(OMAP3BEAGLE_GPIO_KS8851_IRQ) == 0)) { ++ gpio_export(OMAP3BEAGLE_GPIO_KS8851_IRQ, 0); ++ omap3beagle_zippy2_spi_board_info[0].irq = OMAP_GPIO_IRQ(OMAP3BEAGLE_GPIO_KS8851_IRQ); ++ irq_set_irq_type(omap3beagle_zippy2_spi_board_info[0].irq, IRQ_TYPE_EDGE_FALLING); ++ } else { ++ printk(KERN_ERR "could not obtain gpio for KS8851_IRQ\n"); ++ return; ++ } ++ ++ spi_register_board_info(omap3beagle_zippy2_spi_board_info, ++ ARRAY_SIZE(omap3beagle_zippy2_spi_board_info)); ++} ++ ++#else ++static inline void __init omap3beagle_ks8851_init(void) { return; } ++#endif ++ + static struct mtd_partition omap3beagle_nand_partitions[] = { + /* All the partition sizes are listed in terms of NAND block size */ + { +@@ -272,6 +434,12 @@ static struct omap2_hsmmc_info mmc[] = { + .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, + .gpio_wp = 29, + }, ++ { ++ .mmc = 2, ++ .caps = MMC_CAP_4_BIT_DATA, ++ .transceiver = true, ++ .ocr_mask = 0x00100000, /* 3.3V */ ++ }, + {} /* Terminator */ + }; + +@@ -301,11 +469,25 @@ static int beagle_twl_gpio_setup(struct device *dev, + } + /* gpio + 0 is "mmc0_cd" (input/IRQ) */ + mmc[0].gpio_cd = gpio + 0; ++#if defined(CONFIG_WL12XX) || defined(CONFIG_WL12XX_MODULE) ++ if(!strcmp(expansionboard_name, "bbtoys-wifi")) { ++ omap2_hsmmc_init(mmcbbt); ++ /* link regulators to MMC adapters */ ++ beagle_vmmc1_supply.dev = mmcbbt[0].dev; ++ beagle_vsim_supply.dev = mmcbbt[0].dev; ++ } else { ++ omap2_hsmmc_init(mmc); ++ /* link regulators to MMC adapters */ ++ beagle_vmmc1_supply.dev = mmc[0].dev; ++ beagle_vsim_supply.dev = mmc[0].dev; ++ } ++#else + omap2_hsmmc_init(mmc); + + /* link regulators to MMC adapters */ + beagle_vmmc1_supply.dev = mmc[0].dev; + beagle_vsim_supply.dev = mmc[0].dev; ++#endif + + /* REVISIT: need ehci-omap hooks for external VBUS + * power switch and overcurrent detect +@@ -466,7 +648,7 @@ static struct twl4030_platform_data beagle_twldata = { + .vpll2 = &beagle_vpll2, + }; + +-static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = { ++static struct i2c_board_info __initdata beagle_i2c1_boardinfo[] = { + { + I2C_BOARD_INFO("twl4030", 0x48), + .flags = I2C_CLIENT_WAKE, +@@ -481,10 +663,24 @@ static struct i2c_board_info __initdata beagle_i2c_eeprom[] = { + }, + }; + ++#if defined(CONFIG_RTC_DRV_DS1307) || \ ++ defined(CONFIG_RTC_DRV_DS1307_MODULE) ++ ++static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = { ++ { ++ I2C_BOARD_INFO("ds1307", 0x68), ++ }, ++}; ++#else ++static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = {}; ++#endif ++ + static int __init omap3_beagle_i2c_init(void) + { +- omap_register_i2c_bus(1, 2600, beagle_i2c_boardinfo, +- ARRAY_SIZE(beagle_i2c_boardinfo)); ++ omap_register_i2c_bus(1, 2600, beagle_i2c1_boardinfo, ++ ARRAY_SIZE(beagle_i2c1_boardinfo)); ++ omap_register_i2c_bus(2, 400, beagle_i2c2_boardinfo, ++ ARRAY_SIZE(beagle_i2c2_boardinfo)); + /* Bus 3 is attached to the DVI port where devices like the pico DLP + * projector don't work reliably with 400kHz */ + omap_register_i2c_bus(3, 100, beagle_i2c_eeprom, ARRAY_SIZE(beagle_i2c_eeprom)); +@@ -627,6 +823,15 @@ static struct omap_musb_board_data musb_board_data = { + .power = 100, + }; + ++static int __init expansionboard_setup(char *str) ++{ ++ if (!str) ++ return -EINVAL; ++ strncpy(expansionboard_name, str, 16); ++ printk(KERN_INFO "Beagle expansionboard: %s\n", expansionboard_name); ++ return 0; ++} ++ + static void __init beagle_opp_init(void) + { + int r = 0; +@@ -693,6 +898,65 @@ static void __init omap3_beagle_init(void) + /* REVISIT leave DVI powered down until it's needed ... */ + gpio_direction_output(170, true); + ++ if(!strcmp(expansionboard_name, "zippy")) ++ { ++ printk(KERN_INFO "Beagle expansionboard: initializing enc28j60\n"); ++ omap3beagle_enc28j60_init(); ++ printk(KERN_INFO "Beagle expansionboard: assigning GPIO 141 and 162 to MMC1\n"); ++ mmc[1].gpio_wp = 141; ++ mmc[1].gpio_cd = 162; ++ } ++ ++ if(!strcmp(expansionboard_name, "zippy2")) ++ { ++ printk(KERN_INFO "Beagle expansionboard: initializing ks_8851\n"); ++ omap3beagle_ks8851_init(); ++ printk(KERN_INFO "Beagle expansionboard: assigning GPIO 141 and 162 to MMC1\n"); ++ mmc[1].gpio_wp = 141; ++ mmc[1].gpio_cd = 162; ++ } ++ ++ if(!strcmp(expansionboard_name, "trainer")) ++ { ++ printk(KERN_INFO "Beagle expansionboard: exporting GPIOs 130-141,162 to userspace\n"); ++ gpio_request(130, "sysfs"); ++ gpio_export(130, 1); ++ gpio_request(131, "sysfs"); ++ gpio_export(131, 1); ++ gpio_request(132, "sysfs"); ++ gpio_export(132, 1); ++ gpio_request(133, "sysfs"); ++ gpio_export(133, 1); ++ gpio_request(134, "sysfs"); ++ gpio_export(134, 1); ++ gpio_request(135, "sysfs"); ++ gpio_export(135, 1); ++ gpio_request(136, "sysfs"); ++ gpio_export(136, 1); ++ gpio_request(137, "sysfs"); ++ gpio_export(137, 1); ++ gpio_request(138, "sysfs"); ++ gpio_export(138, 1); ++ gpio_request(139, "sysfs"); ++ gpio_export(139, 1); ++ gpio_request(140, "sysfs"); ++ gpio_export(140, 1); ++ gpio_request(141, "sysfs"); ++ gpio_export(141, 1); ++ gpio_request(162, "sysfs"); ++ gpio_export(162, 1); ++ } ++ ++ if(!strcmp(expansionboard_name, "bbtoys-wifi")) ++ { ++ if (wl12xx_set_platform_data(&omap_beagle_wlan_data)) ++ pr_err("error setting wl12xx data\n"); ++ printk(KERN_INFO "Beagle expansionboard: registering wl12xx bt platform device\n"); ++ platform_device_register(&wl12xx_device); ++ printk(KERN_INFO "Beagle expansionboard: registering wl12xx wifi platform device\n"); ++ platform_device_register(&omap_vwlan_device); ++ } ++ + usb_musb_init(&musb_board_data); + usbhs_init(&usbhs_bdata); + omap3beagle_flash_init(); +@@ -705,6 +969,8 @@ static void __init omap3_beagle_init(void) + beagle_opp_init(); + } + ++early_param("buddy", expansionboard_setup); ++ + MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") + /* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */ + .boot_params = 0x80000100, +-- +1.6.6.1 + diff --git a/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0003-OMAP3-beagle-add-MADC-support.patch b/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0003-OMAP3-beagle-add-MADC-support.patch new file mode 100644 index 00000000..79097dbf --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0003-OMAP3-beagle-add-MADC-support.patch @@ -0,0 +1,36 @@ +From 91e701f3287923d11dd295b6a62186909e362503 Mon Sep 17 00:00:00 2001 +From: Koen Kooi <koen@dominion.thruhere.net> +Date: Sat, 21 May 2011 16:18:30 +0200 +Subject: [PATCH 3/7] OMAP3: beagle: add MADC support + +Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> +--- + arch/arm/mach-omap2/board-omap3beagle.c | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index db285e1..da4ba50 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -634,6 +634,10 @@ static struct twl4030_codec_data beagle_codec_data = { + .audio = &beagle_audio_data, + }; + ++static struct twl4030_madc_platform_data beagle_madc_data = { ++ .irq_line = 1, ++}; ++ + static struct twl4030_platform_data beagle_twldata = { + .irq_base = TWL4030_IRQ_BASE, + .irq_end = TWL4030_IRQ_END, +@@ -642,6 +646,7 @@ static struct twl4030_platform_data beagle_twldata = { + .usb = &beagle_usb_data, + .gpio = &beagle_gpio_data, + .codec = &beagle_codec_data, ++ .madc = &beagle_madc_data, + .vmmc1 = &beagle_vmmc1, + .vsim = &beagle_vsim, + .vdac = &beagle_vdac, +-- +1.6.6.1 + diff --git a/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0004-OMAP3-beagle-add-regulators-for-camera-interface.patch b/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0004-OMAP3-beagle-add-regulators-for-camera-interface.patch new file mode 100644 index 00000000..29e99569 --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0004-OMAP3-beagle-add-regulators-for-camera-interface.patch @@ -0,0 +1,88 @@ +From 9d7f46abab88c74e674461a2f4e9ab35b524a6ef Mon Sep 17 00:00:00 2001 +From: Koen Kooi <koen@dominion.thruhere.net> +Date: Wed, 25 May 2011 08:56:06 +0200 +Subject: [PATCH 4/7] OMAP3: beagle: add regulators for camera interface + +Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> +--- + arch/arm/mach-omap2/board-omap3beagle.c | 50 +++++++++++++++++++++++++++++++ + 1 files changed, 50 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index da4ba50..211cbdf 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -453,6 +453,44 @@ static struct regulator_consumer_supply beagle_vsim_supply = { + + static struct gpio_led gpio_leds[]; + ++static struct regulator_consumer_supply beagle_vaux3_supply = { ++ .supply = "cam_1v8", ++}; ++ ++static struct regulator_consumer_supply beagle_vaux4_supply = { ++ .supply = "cam_2v8", ++}; ++ ++/* VAUX3 for CAM_1V8 */ ++static struct regulator_init_data beagle_vaux3 = { ++ .constraints = { ++ .min_uV = 1800000, ++ .max_uV = 1800000, ++ .apply_uV = true, ++ .valid_modes_mask = REGULATOR_MODE_NORMAL ++ | REGULATOR_MODE_STANDBY, ++ .valid_ops_mask = REGULATOR_CHANGE_MODE ++ | REGULATOR_CHANGE_STATUS, ++ }, ++ .num_consumer_supplies = 1, ++ .consumer_supplies = &beagle_vaux3_supply, ++}; ++ ++/* VAUX4 for CAM_2V8 */ ++static struct regulator_init_data beagle_vaux4 = { ++ .constraints = { ++ .min_uV = 1800000, ++ .max_uV = 1800000, ++ .apply_uV = true, ++ .valid_modes_mask = REGULATOR_MODE_NORMAL ++ | REGULATOR_MODE_STANDBY, ++ .valid_ops_mask = REGULATOR_CHANGE_MODE ++ | REGULATOR_CHANGE_STATUS, ++ }, ++ .num_consumer_supplies = 1, ++ .consumer_supplies = &beagle_vaux4_supply, ++}; ++ + static int beagle_twl_gpio_setup(struct device *dev, + unsigned gpio, unsigned ngpio) + { +@@ -504,6 +542,16 @@ static int beagle_twl_gpio_setup(struct device *dev, + pr_err("%s: unable to configure EHCI_nOC\n", __func__); + } + ++ if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { ++ /* ++ * Power on camera interface - only on pre-production, not ++ * needed on production boards ++ */ ++ gpio_request(gpio + 2, "CAM_EN"); ++ gpio_direction_output(gpio + 2, 1); ++ } ++ ++ + /* + * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active + * high / others active low) +@@ -651,6 +699,8 @@ static struct twl4030_platform_data beagle_twldata = { + .vsim = &beagle_vsim, + .vdac = &beagle_vdac, + .vpll2 = &beagle_vpll2, ++ .vaux3 = &beagle_vaux3, ++ .vaux4 = &beagle_vaux4, + }; + + static struct i2c_board_info __initdata beagle_i2c1_boardinfo[] = { +-- +1.6.6.1 + diff --git a/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0005-OMAP3-beagle-HACK-add-in-1GHz-OPP.patch b/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0005-OMAP3-beagle-HACK-add-in-1GHz-OPP.patch new file mode 100644 index 00000000..8b65b76e --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0005-OMAP3-beagle-HACK-add-in-1GHz-OPP.patch @@ -0,0 +1,31 @@ +From aa93263ed7827e33148396656b7e7ab4579509a5 Mon Sep 17 00:00:00 2001 +From: Koen Kooi <koen@dominion.thruhere.net> +Date: Wed, 25 May 2011 08:57:40 +0200 +Subject: [PATCH 5/7] OMAP3: beagle: HACK! add in 1GHz OPP + +Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> +--- + arch/arm/mach-omap2/board-omap3beagle.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 211cbdf..221bfda 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -911,11 +911,13 @@ static void __init beagle_opp_init(void) + /* Enable MPU 1GHz and lower opps */ + dev = &mh->od->pdev.dev; + r = opp_enable(dev, 800000000); ++ r |= opp_enable(dev, 1000000000); + /* TODO: MPU 1GHz needs SR and ABB */ + + /* Enable IVA 800MHz and lower opps */ + dev = &dh->od->pdev.dev; + r |= opp_enable(dev, 660000000); ++ r |= opp_enable(dev, 800000000); + /* TODO: DSP 800MHz needs SR and ABB */ + if (r) { + pr_err("%s: failed to enable higher opp %d\n", +-- +1.6.6.1 + diff --git a/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0006-OMAP3-BEAGLE-fix-RTC.patch b/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0006-OMAP3-BEAGLE-fix-RTC.patch new file mode 100644 index 00000000..76443d94 --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0006-OMAP3-BEAGLE-fix-RTC.patch @@ -0,0 +1,27 @@ +From dd2c7ba245ec1b17e3d323a6c4a1cad9697dbbbe Mon Sep 17 00:00:00 2001 +From: Koen Kooi <koen@dominion.thruhere.net> +Date: Wed, 15 Jun 2011 16:25:50 +0200 +Subject: [PATCH 6/7] OMAP3: BEAGLE: fix RTC + +Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> +--- + arch/arm/mach-omap2/board-omap3beagle.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 221bfda..61564a4 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -941,6 +941,9 @@ static void __init omap3_beagle_init(void) + omap3_beagle_init_rev(); + omap3_beagle_i2c_init(); + ++ /* Ensure msecure is mux'd to be able to set the RTC. */ ++ omap_mux_init_signal("sys_drm_msecure", OMAP_PIN_OFF_OUTPUT_HIGH); ++ + if (cpu_is_omap3630()) { + gpio_buttons[0].gpio = 4; + } +-- +1.6.6.1 + diff --git a/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0007-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch b/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0007-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch new file mode 100644 index 00000000..8cd314c6 --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0007-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch @@ -0,0 +1,33 @@ +From bd0b2f97c48aa6aac0c6a494f1c6ba5af5de486b Mon Sep 17 00:00:00 2001 +From: Steve Sakoman <steve@sakoman.com> +Date: Mon, 18 Jul 2011 23:13:41 -0500 +Subject: [PATCH] omap_hsmmc: Set dto to max value of 14 to avoid SD Card timeouts + +This fixes MMC errors due to timeouts on certain SD Cards following suggestions +to set dto to 14 by Jason Kridner and Steven Kipisz + +Details of the issue: +http://talk.maemo.org/showthread.php?p=1000707#post1000707 + +This fix was originally proposed by Sukumar Ghoral of TI. +--- + drivers/mmc/host/omap_hsmmc.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c +index 9646a75..7443647 100644 +--- a/drivers/mmc/host/omap_hsmmc.c ++++ b/drivers/mmc/host/omap_hsmmc.c +@@ -1049,6 +1049,9 @@ static void set_data_timeout(struct omap_hsmmc_host *host, + dto = 14; + } + ++ /* Set dto to max value of 14 to avoid SD Card timeouts */ ++ dto = 14; ++ + reg &= ~DTO_MASK; + reg |= dto << DTO_SHIFT; + OMAP_HSMMC_WRITE(host->base, SYSCTL, reg); +-- +1.7.0.4 + diff --git a/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0007-omap3-beagle-Use-GPTIMERi-1-for-clockevents.patch b/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0007-omap3-beagle-Use-GPTIMERi-1-for-clockevents.patch new file mode 100644 index 00000000..d5a4cf67 --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap-2.6.39/beagle/0007-omap3-beagle-Use-GPTIMERi-1-for-clockevents.patch @@ -0,0 +1,42 @@ +From 101b0aedf8152711847e2f9f347d267a3ac7f287 Mon Sep 17 00:00:00 2001 +From: Sanjeev Premi <premi@ti.com> +Date: Fri, 24 Jun 2011 16:23:45 +0000 +Subject: [PATCH 7/7] omap3: beagle: Use GPTIMERi 1 for clockevents + +The current selection of the GPTIMER on was result of +a hardware issue in early versions of the Beagleboards +(Ax and B1 thru B4). [1] [2] + +Its been long since the hardware issue has been fixed. +This patch uses GPTIMER 1 for all newer board revisions +incl. Beagleboard XM. + + [1] http://thread.gmane.org/gmane.comp.hardware.beagleboard.general/91 + [2] Errata #7 at http://elinux.org/BeagleBoard#Errata + +Signed-off-by: Sanjeev Premi <premi@ti.com> +Cc: Paul Walmsley <paul@pwsan.com> +Reviewed-by: Paul Walmsley <paul@pwsan.com> +--- + arch/arm/mach-omap2/board-omap3beagle.c | 5 ++++- + 1 files changed, 4 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 61564a4..20d5912 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -806,7 +806,10 @@ static void __init omap3_beagle_init_irq(void) + { + omap_init_irq(); + #ifdef CONFIG_OMAP_32K_TIMER +- omap2_gp_clockevent_set_gptimer(12); ++ if (omap3_beagle_version == OMAP3BEAGLE_BOARD_AXBX) ++ omap2_gp_clockevent_set_gptimer(12); ++ else ++ omap2_gp_clockevent_set_gptimer(1); + #endif + } + +-- +1.6.6.1 + |