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 @@ | |||
1 | From 16c1bdb30f1bcd750b29dffd2ef3003be2d30610 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Fri, 20 May 2011 12:48:37 +0200 | ||
4 | Subject: [PATCH 1/7] OMAP3: beagle: add support for beagleboard xM revision C | ||
5 | |||
6 | The USB enable GPIO has been inverted and the USER button moved. | ||
7 | |||
8 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
9 | --- | ||
10 | arch/arm/mach-omap2/board-omap3beagle.c | 34 +++++++++++++++++++++++------- | ||
11 | 1 files changed, 26 insertions(+), 8 deletions(-) | ||
12 | |||
13 | diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c | ||
14 | index 2de4b02..77bafa8 100644 | ||
15 | --- a/arch/arm/mach-omap2/board-omap3beagle.c | ||
16 | +++ b/arch/arm/mach-omap2/board-omap3beagle.c | ||
17 | @@ -62,7 +62,9 @@ | ||
18 | * AXBX = GPIO173, GPIO172, GPIO171: 1 1 1 | ||
19 | * C1_3 = GPIO173, GPIO172, GPIO171: 1 1 0 | ||
20 | * C4 = GPIO173, GPIO172, GPIO171: 1 0 1 | ||
21 | - * XM = GPIO173, GPIO172, GPIO171: 0 0 0 | ||
22 | + * XMA = GPIO173, GPIO172, GPIO171: 0 0 0 | ||
23 | + * XMB = GPIO173, GPIO172, GPIO171: 0 0 1 | ||
24 | + * XMC = GPIO173, GPIO172, GPIO171: 0 1 0 | ||
25 | */ | ||
26 | enum { | ||
27 | OMAP3BEAGLE_BOARD_UNKN = 0, | ||
28 | @@ -70,6 +72,7 @@ enum { | ||
29 | OMAP3BEAGLE_BOARD_C1_3, | ||
30 | OMAP3BEAGLE_BOARD_C4, | ||
31 | OMAP3BEAGLE_BOARD_XM, | ||
32 | + OMAP3BEAGLE_BOARD_XMC, | ||
33 | }; | ||
34 | |||
35 | static u8 omap3_beagle_version; | ||
36 | @@ -124,9 +127,18 @@ static void __init omap3_beagle_init_rev(void) | ||
37 | printk(KERN_INFO "OMAP3 Beagle Rev: xM\n"); | ||
38 | omap3_beagle_version = OMAP3BEAGLE_BOARD_XM; | ||
39 | break; | ||
40 | + case 1: | ||
41 | + printk(KERN_INFO "OMAP3 Beagle Rev: xM B\n"); | ||
42 | + omap3_beagle_version = OMAP3BEAGLE_BOARD_XM; | ||
43 | + break; | ||
44 | + case 2: | ||
45 | + printk(KERN_INFO "OMAP3 Beagle Rev: xM C\n"); | ||
46 | + omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC; | ||
47 | + break; | ||
48 | default: | ||
49 | - printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev); | ||
50 | - omap3_beagle_version = OMAP3BEAGLE_BOARD_UNKN; | ||
51 | + printk(KERN_INFO | ||
52 | + "OMAP3 Beagle Rev: unknown %hd, assuming xM C or newer\n", beagle_rev); | ||
53 | + omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC; | ||
54 | } | ||
55 | |||
56 | return; | ||
57 | @@ -278,7 +290,7 @@ static int beagle_twl_gpio_setup(struct device *dev, | ||
58 | { | ||
59 | int r; | ||
60 | |||
61 | - if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { | ||
62 | + if (cpu_is_omap3630()) { | ||
63 | mmc[0].gpio_wp = -EINVAL; | ||
64 | } else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) || | ||
65 | (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C4)) { | ||
66 | @@ -298,7 +310,8 @@ static int beagle_twl_gpio_setup(struct device *dev, | ||
67 | /* REVISIT: need ehci-omap hooks for external VBUS | ||
68 | * power switch and overcurrent detect | ||
69 | */ | ||
70 | - if (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM) { | ||
71 | + if (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM | ||
72 | + && omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XMC) { | ||
73 | r = gpio_request(gpio + 1, "EHCI_nOC"); | ||
74 | if (!r) { | ||
75 | r = gpio_direction_input(gpio + 1); | ||
76 | @@ -320,7 +333,7 @@ static int beagle_twl_gpio_setup(struct device *dev, | ||
77 | gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); | ||
78 | |||
79 | /* DVI reset GPIO is different between beagle revisions */ | ||
80 | - if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) | ||
81 | + if (cpu_is_omap3630()) | ||
82 | beagle_dvi_device.reset_gpio = 129; | ||
83 | else | ||
84 | beagle_dvi_device.reset_gpio = 170; | ||
85 | @@ -334,7 +347,7 @@ static int beagle_twl_gpio_setup(struct device *dev, | ||
86 | * P7/P8 revisions(prototype): Camera EN | ||
87 | * A2+ revisions (production): LDO (supplies DVI, serial, led blocks) | ||
88 | */ | ||
89 | - if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { | ||
90 | + if (cpu_is_omap3630()) { | ||
91 | r = gpio_request(gpio + 1, "nDVI_PWR_EN"); | ||
92 | if (!r) { | ||
93 | r = gpio_direction_output(gpio + 1, 0); | ||
94 | @@ -625,7 +638,7 @@ static void __init beagle_opp_init(void) | ||
95 | } | ||
96 | |||
97 | /* Custom OPP enabled for XM */ | ||
98 | - if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { | ||
99 | + if (cpu_is_omap3630()) { | ||
100 | struct omap_hwmod *mh = omap_hwmod_lookup("mpu"); | ||
101 | struct omap_hwmod *dh = omap_hwmod_lookup("iva"); | ||
102 | struct device *dev; | ||
103 | @@ -665,6 +678,11 @@ static void __init omap3_beagle_init(void) | ||
104 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | ||
105 | omap3_beagle_init_rev(); | ||
106 | omap3_beagle_i2c_init(); | ||
107 | + | ||
108 | + if (cpu_is_omap3630()) { | ||
109 | + gpio_buttons[0].gpio = 4; | ||
110 | + } | ||
111 | + | ||
112 | platform_add_devices(omap3_beagle_devices, | ||
113 | ARRAY_SIZE(omap3_beagle_devices)); | ||
114 | omap_display_init(&beagle_dss_data); | ||
115 | -- | ||
116 | 1.6.6.1 | ||
117 | |||
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 @@ | |||
1 | From 27494059a5d005b8cad4e0e8640ff031b86220dc Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Fri, 20 May 2011 13:06:24 +0200 | ||
4 | Subject: [PATCH 2/7] OMAP3: beagle: add support for expansionboards | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | arch/arm/mach-omap2/board-omap3beagle.c | 272 ++++++++++++++++++++++++++++++- | ||
9 | 1 files changed, 269 insertions(+), 3 deletions(-) | ||
10 | |||
11 | diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c | ||
12 | index 77bafa8..db285e1 100644 | ||
13 | --- a/arch/arm/mach-omap2/board-omap3beagle.c | ||
14 | +++ b/arch/arm/mach-omap2/board-omap3beagle.c | ||
15 | @@ -21,6 +21,7 @@ | ||
16 | #include <linux/io.h> | ||
17 | #include <linux/leds.h> | ||
18 | #include <linux/gpio.h> | ||
19 | +#include <linux/irq.h> | ||
20 | #include <linux/input.h> | ||
21 | #include <linux/gpio_keys.h> | ||
22 | #include <linux/opp.h> | ||
23 | @@ -154,6 +155,167 @@ fail0: | ||
24 | return; | ||
25 | } | ||
26 | |||
27 | +char expansionboard_name[16]; | ||
28 | + | ||
29 | +#if defined(CONFIG_WL12XX) || defined(CONFIG_WL12XX_MODULE) | ||
30 | +#include <linux/regulator/fixed.h> | ||
31 | +#include <linux/wl12xx.h> | ||
32 | + | ||
33 | +#define OMAP_BEAGLE_WLAN_EN_GPIO (139) | ||
34 | +#define OMAP_BEAGLE_BT_EN_GPIO (138) | ||
35 | +#define OMAP_BEAGLE_WLAN_IRQ_GPIO (137) | ||
36 | +#define OMAP_BEAGLE_FM_EN_BT_WU (136) | ||
37 | + | ||
38 | +struct wl12xx_platform_data omap_beagle_wlan_data __initdata = { | ||
39 | + .irq = OMAP_GPIO_IRQ(OMAP_BEAGLE_WLAN_IRQ_GPIO), | ||
40 | + .board_ref_clock = 2, /* 38.4 MHz */ | ||
41 | +}; | ||
42 | + | ||
43 | +static int gpios[] = {OMAP_BEAGLE_BT_EN_GPIO, OMAP_BEAGLE_FM_EN_BT_WU, -1}; | ||
44 | +static struct platform_device wl12xx_device = { | ||
45 | + .name = "kim", | ||
46 | + .id = -1, | ||
47 | + .dev.platform_data = &gpios, | ||
48 | +}; | ||
49 | + | ||
50 | +static struct omap2_hsmmc_info mmcbbt[] = { | ||
51 | + { | ||
52 | + .mmc = 1, | ||
53 | + .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, | ||
54 | + .gpio_wp = 29, | ||
55 | + }, | ||
56 | + { | ||
57 | + .name = "wl1271", | ||
58 | + .mmc = 2, | ||
59 | + .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD, | ||
60 | + .gpio_wp = -EINVAL, | ||
61 | + .gpio_cd = -EINVAL, | ||
62 | + .ocr_mask = MMC_VDD_165_195, | ||
63 | + .nonremovable = true, | ||
64 | + }, | ||
65 | + {} /* Terminator */ | ||
66 | + }; | ||
67 | + | ||
68 | +static struct regulator_consumer_supply beagle_vmmc2_supply = | ||
69 | + REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); | ||
70 | + | ||
71 | +static struct regulator_init_data beagle_vmmc2 = { | ||
72 | + .constraints = { | ||
73 | + .min_uV = 1850000, | ||
74 | + .max_uV = 1850000, | ||
75 | + .apply_uV = true, | ||
76 | + .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
77 | + | REGULATOR_MODE_STANDBY, | ||
78 | + .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
79 | + | REGULATOR_CHANGE_STATUS, | ||
80 | + }, | ||
81 | + .num_consumer_supplies = 1, | ||
82 | + .consumer_supplies = &beagle_vmmc2_supply, | ||
83 | +}; | ||
84 | + | ||
85 | +static struct fixed_voltage_config beagle_vwlan = { | ||
86 | + .supply_name = "vwl1271", | ||
87 | + .microvolts = 1800000, /* 1.8V */ | ||
88 | + .gpio = OMAP_BEAGLE_WLAN_EN_GPIO, | ||
89 | + .startup_delay = 70000, /* 70ms */ | ||
90 | + .enable_high = 1, | ||
91 | + .enabled_at_boot = 0, | ||
92 | + .init_data = &beagle_vmmc2, | ||
93 | +}; | ||
94 | + | ||
95 | +static struct platform_device omap_vwlan_device = { | ||
96 | + .name = "reg-fixed-voltage", | ||
97 | + .id = 1, | ||
98 | + .dev = { | ||
99 | + .platform_data = &beagle_vwlan, | ||
100 | + }, | ||
101 | +}; | ||
102 | +#endif | ||
103 | + | ||
104 | +#if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) | ||
105 | + | ||
106 | +#include <plat/mcspi.h> | ||
107 | +#include <linux/spi/spi.h> | ||
108 | + | ||
109 | +#define OMAP3BEAGLE_GPIO_ENC28J60_IRQ 157 | ||
110 | + | ||
111 | +static struct omap2_mcspi_device_config enc28j60_spi_chip_info = { | ||
112 | + .turbo_mode = 0, | ||
113 | + .single_channel = 1, /* 0: slave, 1: master */ | ||
114 | +}; | ||
115 | + | ||
116 | +static struct spi_board_info omap3beagle_zippy_spi_board_info[] __initdata = { | ||
117 | + { | ||
118 | + .modalias = "enc28j60", | ||
119 | + .bus_num = 4, | ||
120 | + .chip_select = 0, | ||
121 | + .max_speed_hz = 20000000, | ||
122 | + .controller_data = &enc28j60_spi_chip_info, | ||
123 | + }, | ||
124 | +}; | ||
125 | + | ||
126 | +static void __init omap3beagle_enc28j60_init(void) | ||
127 | +{ | ||
128 | + if ((gpio_request(OMAP3BEAGLE_GPIO_ENC28J60_IRQ, "ENC28J60_IRQ") == 0) && | ||
129 | + (gpio_direction_input(OMAP3BEAGLE_GPIO_ENC28J60_IRQ) == 0)) { | ||
130 | + gpio_export(OMAP3BEAGLE_GPIO_ENC28J60_IRQ, 0); | ||
131 | + omap3beagle_zippy_spi_board_info[0].irq = OMAP_GPIO_IRQ(OMAP3BEAGLE_GPIO_ENC28J60_IRQ); | ||
132 | + irq_set_irq_type(omap3beagle_zippy_spi_board_info[0].irq, IRQ_TYPE_EDGE_FALLING); | ||
133 | + } else { | ||
134 | + printk(KERN_ERR "could not obtain gpio for ENC28J60_IRQ\n"); | ||
135 | + return; | ||
136 | + } | ||
137 | + | ||
138 | + spi_register_board_info(omap3beagle_zippy_spi_board_info, | ||
139 | + ARRAY_SIZE(omap3beagle_zippy_spi_board_info)); | ||
140 | +} | ||
141 | + | ||
142 | +#else | ||
143 | +static inline void __init omap3beagle_enc28j60_init(void) { return; } | ||
144 | +#endif | ||
145 | + | ||
146 | +#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) | ||
147 | + | ||
148 | +#include <plat/mcspi.h> | ||
149 | +#include <linux/spi/spi.h> | ||
150 | + | ||
151 | +#define OMAP3BEAGLE_GPIO_KS8851_IRQ 157 | ||
152 | + | ||
153 | +static struct omap2_mcspi_device_config ks8851_spi_chip_info = { | ||
154 | + .turbo_mode = 0, | ||
155 | + .single_channel = 1, /* 0: slave, 1: master */ | ||
156 | +}; | ||
157 | + | ||
158 | +static struct spi_board_info omap3beagle_zippy2_spi_board_info[] __initdata = { | ||
159 | + { | ||
160 | + .modalias = "ks8851", | ||
161 | + .bus_num = 4, | ||
162 | + .chip_select = 0, | ||
163 | + .max_speed_hz = 36000000, | ||
164 | + .controller_data = &ks8851_spi_chip_info, | ||
165 | + }, | ||
166 | +}; | ||
167 | + | ||
168 | +static void __init omap3beagle_ks8851_init(void) | ||
169 | +{ | ||
170 | + if ((gpio_request(OMAP3BEAGLE_GPIO_KS8851_IRQ, "KS8851_IRQ") == 0) && | ||
171 | + (gpio_direction_input(OMAP3BEAGLE_GPIO_KS8851_IRQ) == 0)) { | ||
172 | + gpio_export(OMAP3BEAGLE_GPIO_KS8851_IRQ, 0); | ||
173 | + omap3beagle_zippy2_spi_board_info[0].irq = OMAP_GPIO_IRQ(OMAP3BEAGLE_GPIO_KS8851_IRQ); | ||
174 | + irq_set_irq_type(omap3beagle_zippy2_spi_board_info[0].irq, IRQ_TYPE_EDGE_FALLING); | ||
175 | + } else { | ||
176 | + printk(KERN_ERR "could not obtain gpio for KS8851_IRQ\n"); | ||
177 | + return; | ||
178 | + } | ||
179 | + | ||
180 | + spi_register_board_info(omap3beagle_zippy2_spi_board_info, | ||
181 | + ARRAY_SIZE(omap3beagle_zippy2_spi_board_info)); | ||
182 | +} | ||
183 | + | ||
184 | +#else | ||
185 | +static inline void __init omap3beagle_ks8851_init(void) { return; } | ||
186 | +#endif | ||
187 | + | ||
188 | static struct mtd_partition omap3beagle_nand_partitions[] = { | ||
189 | /* All the partition sizes are listed in terms of NAND block size */ | ||
190 | { | ||
191 | @@ -272,6 +434,12 @@ static struct omap2_hsmmc_info mmc[] = { | ||
192 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, | ||
193 | .gpio_wp = 29, | ||
194 | }, | ||
195 | + { | ||
196 | + .mmc = 2, | ||
197 | + .caps = MMC_CAP_4_BIT_DATA, | ||
198 | + .transceiver = true, | ||
199 | + .ocr_mask = 0x00100000, /* 3.3V */ | ||
200 | + }, | ||
201 | {} /* Terminator */ | ||
202 | }; | ||
203 | |||
204 | @@ -301,11 +469,25 @@ static int beagle_twl_gpio_setup(struct device *dev, | ||
205 | } | ||
206 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ | ||
207 | mmc[0].gpio_cd = gpio + 0; | ||
208 | +#if defined(CONFIG_WL12XX) || defined(CONFIG_WL12XX_MODULE) | ||
209 | + if(!strcmp(expansionboard_name, "bbtoys-wifi")) { | ||
210 | + omap2_hsmmc_init(mmcbbt); | ||
211 | + /* link regulators to MMC adapters */ | ||
212 | + beagle_vmmc1_supply.dev = mmcbbt[0].dev; | ||
213 | + beagle_vsim_supply.dev = mmcbbt[0].dev; | ||
214 | + } else { | ||
215 | + omap2_hsmmc_init(mmc); | ||
216 | + /* link regulators to MMC adapters */ | ||
217 | + beagle_vmmc1_supply.dev = mmc[0].dev; | ||
218 | + beagle_vsim_supply.dev = mmc[0].dev; | ||
219 | + } | ||
220 | +#else | ||
221 | omap2_hsmmc_init(mmc); | ||
222 | |||
223 | /* link regulators to MMC adapters */ | ||
224 | beagle_vmmc1_supply.dev = mmc[0].dev; | ||
225 | beagle_vsim_supply.dev = mmc[0].dev; | ||
226 | +#endif | ||
227 | |||
228 | /* REVISIT: need ehci-omap hooks for external VBUS | ||
229 | * power switch and overcurrent detect | ||
230 | @@ -466,7 +648,7 @@ static struct twl4030_platform_data beagle_twldata = { | ||
231 | .vpll2 = &beagle_vpll2, | ||
232 | }; | ||
233 | |||
234 | -static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = { | ||
235 | +static struct i2c_board_info __initdata beagle_i2c1_boardinfo[] = { | ||
236 | { | ||
237 | I2C_BOARD_INFO("twl4030", 0x48), | ||
238 | .flags = I2C_CLIENT_WAKE, | ||
239 | @@ -481,10 +663,24 @@ static struct i2c_board_info __initdata beagle_i2c_eeprom[] = { | ||
240 | }, | ||
241 | }; | ||
242 | |||
243 | +#if defined(CONFIG_RTC_DRV_DS1307) || \ | ||
244 | + defined(CONFIG_RTC_DRV_DS1307_MODULE) | ||
245 | + | ||
246 | +static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = { | ||
247 | + { | ||
248 | + I2C_BOARD_INFO("ds1307", 0x68), | ||
249 | + }, | ||
250 | +}; | ||
251 | +#else | ||
252 | +static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = {}; | ||
253 | +#endif | ||
254 | + | ||
255 | static int __init omap3_beagle_i2c_init(void) | ||
256 | { | ||
257 | - omap_register_i2c_bus(1, 2600, beagle_i2c_boardinfo, | ||
258 | - ARRAY_SIZE(beagle_i2c_boardinfo)); | ||
259 | + omap_register_i2c_bus(1, 2600, beagle_i2c1_boardinfo, | ||
260 | + ARRAY_SIZE(beagle_i2c1_boardinfo)); | ||
261 | + omap_register_i2c_bus(2, 400, beagle_i2c2_boardinfo, | ||
262 | + ARRAY_SIZE(beagle_i2c2_boardinfo)); | ||
263 | /* Bus 3 is attached to the DVI port where devices like the pico DLP | ||
264 | * projector don't work reliably with 400kHz */ | ||
265 | omap_register_i2c_bus(3, 100, beagle_i2c_eeprom, ARRAY_SIZE(beagle_i2c_eeprom)); | ||
266 | @@ -627,6 +823,15 @@ static struct omap_musb_board_data musb_board_data = { | ||
267 | .power = 100, | ||
268 | }; | ||
269 | |||
270 | +static int __init expansionboard_setup(char *str) | ||
271 | +{ | ||
272 | + if (!str) | ||
273 | + return -EINVAL; | ||
274 | + strncpy(expansionboard_name, str, 16); | ||
275 | + printk(KERN_INFO "Beagle expansionboard: %s\n", expansionboard_name); | ||
276 | + return 0; | ||
277 | +} | ||
278 | + | ||
279 | static void __init beagle_opp_init(void) | ||
280 | { | ||
281 | int r = 0; | ||
282 | @@ -693,6 +898,65 @@ static void __init omap3_beagle_init(void) | ||
283 | /* REVISIT leave DVI powered down until it's needed ... */ | ||
284 | gpio_direction_output(170, true); | ||
285 | |||
286 | + if(!strcmp(expansionboard_name, "zippy")) | ||
287 | + { | ||
288 | + printk(KERN_INFO "Beagle expansionboard: initializing enc28j60\n"); | ||
289 | + omap3beagle_enc28j60_init(); | ||
290 | + printk(KERN_INFO "Beagle expansionboard: assigning GPIO 141 and 162 to MMC1\n"); | ||
291 | + mmc[1].gpio_wp = 141; | ||
292 | + mmc[1].gpio_cd = 162; | ||
293 | + } | ||
294 | + | ||
295 | + if(!strcmp(expansionboard_name, "zippy2")) | ||
296 | + { | ||
297 | + printk(KERN_INFO "Beagle expansionboard: initializing ks_8851\n"); | ||
298 | + omap3beagle_ks8851_init(); | ||
299 | + printk(KERN_INFO "Beagle expansionboard: assigning GPIO 141 and 162 to MMC1\n"); | ||
300 | + mmc[1].gpio_wp = 141; | ||
301 | + mmc[1].gpio_cd = 162; | ||
302 | + } | ||
303 | + | ||
304 | + if(!strcmp(expansionboard_name, "trainer")) | ||
305 | + { | ||
306 | + printk(KERN_INFO "Beagle expansionboard: exporting GPIOs 130-141,162 to userspace\n"); | ||
307 | + gpio_request(130, "sysfs"); | ||
308 | + gpio_export(130, 1); | ||
309 | + gpio_request(131, "sysfs"); | ||
310 | + gpio_export(131, 1); | ||
311 | + gpio_request(132, "sysfs"); | ||
312 | + gpio_export(132, 1); | ||
313 | + gpio_request(133, "sysfs"); | ||
314 | + gpio_export(133, 1); | ||
315 | + gpio_request(134, "sysfs"); | ||
316 | + gpio_export(134, 1); | ||
317 | + gpio_request(135, "sysfs"); | ||
318 | + gpio_export(135, 1); | ||
319 | + gpio_request(136, "sysfs"); | ||
320 | + gpio_export(136, 1); | ||
321 | + gpio_request(137, "sysfs"); | ||
322 | + gpio_export(137, 1); | ||
323 | + gpio_request(138, "sysfs"); | ||
324 | + gpio_export(138, 1); | ||
325 | + gpio_request(139, "sysfs"); | ||
326 | + gpio_export(139, 1); | ||
327 | + gpio_request(140, "sysfs"); | ||
328 | + gpio_export(140, 1); | ||
329 | + gpio_request(141, "sysfs"); | ||
330 | + gpio_export(141, 1); | ||
331 | + gpio_request(162, "sysfs"); | ||
332 | + gpio_export(162, 1); | ||
333 | + } | ||
334 | + | ||
335 | + if(!strcmp(expansionboard_name, "bbtoys-wifi")) | ||
336 | + { | ||
337 | + if (wl12xx_set_platform_data(&omap_beagle_wlan_data)) | ||
338 | + pr_err("error setting wl12xx data\n"); | ||
339 | + printk(KERN_INFO "Beagle expansionboard: registering wl12xx bt platform device\n"); | ||
340 | + platform_device_register(&wl12xx_device); | ||
341 | + printk(KERN_INFO "Beagle expansionboard: registering wl12xx wifi platform device\n"); | ||
342 | + platform_device_register(&omap_vwlan_device); | ||
343 | + } | ||
344 | + | ||
345 | usb_musb_init(&musb_board_data); | ||
346 | usbhs_init(&usbhs_bdata); | ||
347 | omap3beagle_flash_init(); | ||
348 | @@ -705,6 +969,8 @@ static void __init omap3_beagle_init(void) | ||
349 | beagle_opp_init(); | ||
350 | } | ||
351 | |||
352 | +early_param("buddy", expansionboard_setup); | ||
353 | + | ||
354 | MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") | ||
355 | /* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */ | ||
356 | .boot_params = 0x80000100, | ||
357 | -- | ||
358 | 1.6.6.1 | ||
359 | |||
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 @@ | |||
1 | From 91e701f3287923d11dd295b6a62186909e362503 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Sat, 21 May 2011 16:18:30 +0200 | ||
4 | Subject: [PATCH 3/7] OMAP3: beagle: add MADC support | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | arch/arm/mach-omap2/board-omap3beagle.c | 5 +++++ | ||
9 | 1 files changed, 5 insertions(+), 0 deletions(-) | ||
10 | |||
11 | diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c | ||
12 | index db285e1..da4ba50 100644 | ||
13 | --- a/arch/arm/mach-omap2/board-omap3beagle.c | ||
14 | +++ b/arch/arm/mach-omap2/board-omap3beagle.c | ||
15 | @@ -634,6 +634,10 @@ static struct twl4030_codec_data beagle_codec_data = { | ||
16 | .audio = &beagle_audio_data, | ||
17 | }; | ||
18 | |||
19 | +static struct twl4030_madc_platform_data beagle_madc_data = { | ||
20 | + .irq_line = 1, | ||
21 | +}; | ||
22 | + | ||
23 | static struct twl4030_platform_data beagle_twldata = { | ||
24 | .irq_base = TWL4030_IRQ_BASE, | ||
25 | .irq_end = TWL4030_IRQ_END, | ||
26 | @@ -642,6 +646,7 @@ static struct twl4030_platform_data beagle_twldata = { | ||
27 | .usb = &beagle_usb_data, | ||
28 | .gpio = &beagle_gpio_data, | ||
29 | .codec = &beagle_codec_data, | ||
30 | + .madc = &beagle_madc_data, | ||
31 | .vmmc1 = &beagle_vmmc1, | ||
32 | .vsim = &beagle_vsim, | ||
33 | .vdac = &beagle_vdac, | ||
34 | -- | ||
35 | 1.6.6.1 | ||
36 | |||
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 @@ | |||
1 | From 9d7f46abab88c74e674461a2f4e9ab35b524a6ef Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Wed, 25 May 2011 08:56:06 +0200 | ||
4 | Subject: [PATCH 4/7] OMAP3: beagle: add regulators for camera interface | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | arch/arm/mach-omap2/board-omap3beagle.c | 50 +++++++++++++++++++++++++++++++ | ||
9 | 1 files changed, 50 insertions(+), 0 deletions(-) | ||
10 | |||
11 | diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c | ||
12 | index da4ba50..211cbdf 100644 | ||
13 | --- a/arch/arm/mach-omap2/board-omap3beagle.c | ||
14 | +++ b/arch/arm/mach-omap2/board-omap3beagle.c | ||
15 | @@ -453,6 +453,44 @@ static struct regulator_consumer_supply beagle_vsim_supply = { | ||
16 | |||
17 | static struct gpio_led gpio_leds[]; | ||
18 | |||
19 | +static struct regulator_consumer_supply beagle_vaux3_supply = { | ||
20 | + .supply = "cam_1v8", | ||
21 | +}; | ||
22 | + | ||
23 | +static struct regulator_consumer_supply beagle_vaux4_supply = { | ||
24 | + .supply = "cam_2v8", | ||
25 | +}; | ||
26 | + | ||
27 | +/* VAUX3 for CAM_1V8 */ | ||
28 | +static struct regulator_init_data beagle_vaux3 = { | ||
29 | + .constraints = { | ||
30 | + .min_uV = 1800000, | ||
31 | + .max_uV = 1800000, | ||
32 | + .apply_uV = true, | ||
33 | + .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
34 | + | REGULATOR_MODE_STANDBY, | ||
35 | + .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
36 | + | REGULATOR_CHANGE_STATUS, | ||
37 | + }, | ||
38 | + .num_consumer_supplies = 1, | ||
39 | + .consumer_supplies = &beagle_vaux3_supply, | ||
40 | +}; | ||
41 | + | ||
42 | +/* VAUX4 for CAM_2V8 */ | ||
43 | +static struct regulator_init_data beagle_vaux4 = { | ||
44 | + .constraints = { | ||
45 | + .min_uV = 1800000, | ||
46 | + .max_uV = 1800000, | ||
47 | + .apply_uV = true, | ||
48 | + .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
49 | + | REGULATOR_MODE_STANDBY, | ||
50 | + .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
51 | + | REGULATOR_CHANGE_STATUS, | ||
52 | + }, | ||
53 | + .num_consumer_supplies = 1, | ||
54 | + .consumer_supplies = &beagle_vaux4_supply, | ||
55 | +}; | ||
56 | + | ||
57 | static int beagle_twl_gpio_setup(struct device *dev, | ||
58 | unsigned gpio, unsigned ngpio) | ||
59 | { | ||
60 | @@ -504,6 +542,16 @@ static int beagle_twl_gpio_setup(struct device *dev, | ||
61 | pr_err("%s: unable to configure EHCI_nOC\n", __func__); | ||
62 | } | ||
63 | |||
64 | + if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { | ||
65 | + /* | ||
66 | + * Power on camera interface - only on pre-production, not | ||
67 | + * needed on production boards | ||
68 | + */ | ||
69 | + gpio_request(gpio + 2, "CAM_EN"); | ||
70 | + gpio_direction_output(gpio + 2, 1); | ||
71 | + } | ||
72 | + | ||
73 | + | ||
74 | /* | ||
75 | * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active | ||
76 | * high / others active low) | ||
77 | @@ -651,6 +699,8 @@ static struct twl4030_platform_data beagle_twldata = { | ||
78 | .vsim = &beagle_vsim, | ||
79 | .vdac = &beagle_vdac, | ||
80 | .vpll2 = &beagle_vpll2, | ||
81 | + .vaux3 = &beagle_vaux3, | ||
82 | + .vaux4 = &beagle_vaux4, | ||
83 | }; | ||
84 | |||
85 | static struct i2c_board_info __initdata beagle_i2c1_boardinfo[] = { | ||
86 | -- | ||
87 | 1.6.6.1 | ||
88 | |||
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 @@ | |||
1 | From aa93263ed7827e33148396656b7e7ab4579509a5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Wed, 25 May 2011 08:57:40 +0200 | ||
4 | Subject: [PATCH 5/7] OMAP3: beagle: HACK! add in 1GHz OPP | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | arch/arm/mach-omap2/board-omap3beagle.c | 2 ++ | ||
9 | 1 files changed, 2 insertions(+), 0 deletions(-) | ||
10 | |||
11 | diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c | ||
12 | index 211cbdf..221bfda 100644 | ||
13 | --- a/arch/arm/mach-omap2/board-omap3beagle.c | ||
14 | +++ b/arch/arm/mach-omap2/board-omap3beagle.c | ||
15 | @@ -911,11 +911,13 @@ static void __init beagle_opp_init(void) | ||
16 | /* Enable MPU 1GHz and lower opps */ | ||
17 | dev = &mh->od->pdev.dev; | ||
18 | r = opp_enable(dev, 800000000); | ||
19 | + r |= opp_enable(dev, 1000000000); | ||
20 | /* TODO: MPU 1GHz needs SR and ABB */ | ||
21 | |||
22 | /* Enable IVA 800MHz and lower opps */ | ||
23 | dev = &dh->od->pdev.dev; | ||
24 | r |= opp_enable(dev, 660000000); | ||
25 | + r |= opp_enable(dev, 800000000); | ||
26 | /* TODO: DSP 800MHz needs SR and ABB */ | ||
27 | if (r) { | ||
28 | pr_err("%s: failed to enable higher opp %d\n", | ||
29 | -- | ||
30 | 1.6.6.1 | ||
31 | |||
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 @@ | |||
1 | From dd2c7ba245ec1b17e3d323a6c4a1cad9697dbbbe Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Wed, 15 Jun 2011 16:25:50 +0200 | ||
4 | Subject: [PATCH 6/7] OMAP3: BEAGLE: fix RTC | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | arch/arm/mach-omap2/board-omap3beagle.c | 3 +++ | ||
9 | 1 files changed, 3 insertions(+), 0 deletions(-) | ||
10 | |||
11 | diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c | ||
12 | index 221bfda..61564a4 100644 | ||
13 | --- a/arch/arm/mach-omap2/board-omap3beagle.c | ||
14 | +++ b/arch/arm/mach-omap2/board-omap3beagle.c | ||
15 | @@ -941,6 +941,9 @@ static void __init omap3_beagle_init(void) | ||
16 | omap3_beagle_init_rev(); | ||
17 | omap3_beagle_i2c_init(); | ||
18 | |||
19 | + /* Ensure msecure is mux'd to be able to set the RTC. */ | ||
20 | + omap_mux_init_signal("sys_drm_msecure", OMAP_PIN_OFF_OUTPUT_HIGH); | ||
21 | + | ||
22 | if (cpu_is_omap3630()) { | ||
23 | gpio_buttons[0].gpio = 4; | ||
24 | } | ||
25 | -- | ||
26 | 1.6.6.1 | ||
27 | |||
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 @@ | |||
1 | From bd0b2f97c48aa6aac0c6a494f1c6ba5af5de486b Mon Sep 17 00:00:00 2001 | ||
2 | From: Steve Sakoman <steve@sakoman.com> | ||
3 | Date: Mon, 18 Jul 2011 23:13:41 -0500 | ||
4 | Subject: [PATCH] omap_hsmmc: Set dto to max value of 14 to avoid SD Card timeouts | ||
5 | |||
6 | This fixes MMC errors due to timeouts on certain SD Cards following suggestions | ||
7 | to set dto to 14 by Jason Kridner and Steven Kipisz | ||
8 | |||
9 | Details of the issue: | ||
10 | http://talk.maemo.org/showthread.php?p=1000707#post1000707 | ||
11 | |||
12 | This fix was originally proposed by Sukumar Ghoral of TI. | ||
13 | --- | ||
14 | drivers/mmc/host/omap_hsmmc.c | 3 +++ | ||
15 | 1 files changed, 3 insertions(+), 0 deletions(-) | ||
16 | |||
17 | diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c | ||
18 | index 9646a75..7443647 100644 | ||
19 | --- a/drivers/mmc/host/omap_hsmmc.c | ||
20 | +++ b/drivers/mmc/host/omap_hsmmc.c | ||
21 | @@ -1049,6 +1049,9 @@ static void set_data_timeout(struct omap_hsmmc_host *host, | ||
22 | dto = 14; | ||
23 | } | ||
24 | |||
25 | + /* Set dto to max value of 14 to avoid SD Card timeouts */ | ||
26 | + dto = 14; | ||
27 | + | ||
28 | reg &= ~DTO_MASK; | ||
29 | reg |= dto << DTO_SHIFT; | ||
30 | OMAP_HSMMC_WRITE(host->base, SYSCTL, reg); | ||
31 | -- | ||
32 | 1.7.0.4 | ||
33 | |||
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 @@ | |||
1 | From 101b0aedf8152711847e2f9f347d267a3ac7f287 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sanjeev Premi <premi@ti.com> | ||
3 | Date: Fri, 24 Jun 2011 16:23:45 +0000 | ||
4 | Subject: [PATCH 7/7] omap3: beagle: Use GPTIMERi 1 for clockevents | ||
5 | |||
6 | The current selection of the GPTIMER on was result of | ||
7 | a hardware issue in early versions of the Beagleboards | ||
8 | (Ax and B1 thru B4). [1] [2] | ||
9 | |||
10 | Its been long since the hardware issue has been fixed. | ||
11 | This patch uses GPTIMER 1 for all newer board revisions | ||
12 | incl. Beagleboard XM. | ||
13 | |||
14 | [1] http://thread.gmane.org/gmane.comp.hardware.beagleboard.general/91 | ||
15 | [2] Errata #7 at http://elinux.org/BeagleBoard#Errata | ||
16 | |||
17 | Signed-off-by: Sanjeev Premi <premi@ti.com> | ||
18 | Cc: Paul Walmsley <paul@pwsan.com> | ||
19 | Reviewed-by: Paul Walmsley <paul@pwsan.com> | ||
20 | --- | ||
21 | arch/arm/mach-omap2/board-omap3beagle.c | 5 ++++- | ||
22 | 1 files changed, 4 insertions(+), 1 deletions(-) | ||
23 | |||
24 | diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c | ||
25 | index 61564a4..20d5912 100644 | ||
26 | --- a/arch/arm/mach-omap2/board-omap3beagle.c | ||
27 | +++ b/arch/arm/mach-omap2/board-omap3beagle.c | ||
28 | @@ -806,7 +806,10 @@ static void __init omap3_beagle_init_irq(void) | ||
29 | { | ||
30 | omap_init_irq(); | ||
31 | #ifdef CONFIG_OMAP_32K_TIMER | ||
32 | - omap2_gp_clockevent_set_gptimer(12); | ||
33 | + if (omap3_beagle_version == OMAP3BEAGLE_BOARD_AXBX) | ||
34 | + omap2_gp_clockevent_set_gptimer(12); | ||
35 | + else | ||
36 | + omap2_gp_clockevent_set_gptimer(1); | ||
37 | #endif | ||
38 | } | ||
39 | |||
40 | -- | ||
41 | 1.6.6.1 | ||
42 | |||