Skip to content

Commit 4895613

Browse files
committed
turns out we need buddy2
Signed-off-by: Robert Nelson <[email protected]>
1 parent 5d4ef0b commit 4895613

6 files changed

+100
-63
lines changed

patches/omap_beagle_expansion/0005-Beagle-expansion-add-CircuitCo-ulcd-Support.patch

Lines changed: 46 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ Signed-off-by: Koen Kooi <[email protected]>
1919

2020
Signed-off-by: Robert Nelson <[email protected]>
2121
---
22-
arch/arm/mach-omap2/board-omap3beagle.c | 125 ++++++++++++++++++++++
22+
arch/arm/mach-omap2/board-omap3beagle.c | 138 ++++++++++++++++++++++
2323
drivers/video/omap2/displays/panel-generic-dpi.c | 27 +++++
24-
2 files changed, 152 insertions(+)
24+
2 files changed, 165 insertions(+)
2525

2626
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
27-
index c6b33e7..9098869 100644
27+
index c6b33e7..ad9dfe7 100644
2828
--- a/arch/arm/mach-omap2/board-omap3beagle.c
2929
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
3030
@@ -42,6 +42,7 @@
@@ -52,15 +52,23 @@ index c6b33e7..9098869 100644
5252
};
5353

5454
static struct gpio omap3_beagle_rev_gpios[] __initdata = {
55-
@@ -171,6 +176,7 @@ enum {
55+
@@ -161,6 +166,7 @@ static void __init omap3_beagle_init_rev(void)
56+
}
57+
58+
char expansionboard_name[16];
59+
+char expansionboard2_name[16];
60+
61+
enum {
62+
EXPANSION_MMC_NONE = 0,
63+
@@ -171,6 +177,7 @@ enum {
5664
enum {
5765
EXPANSION_I2C_NONE = 0,
5866
EXPANSION_I2C_ZIPPY,
5967
+ EXPANSION_I2C_7ULCD,
6068
};
6169

6270
static struct {
63-
@@ -335,9 +341,53 @@ static struct omap_dss_device beagle_tv_device = {
71+
@@ -335,9 +342,53 @@ static struct omap_dss_device beagle_tv_device = {
6472
.phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
6573
};
6674

@@ -114,7 +122,7 @@ index c6b33e7..9098869 100644
114122
};
115123

116124
static struct omap_dss_board_info beagle_dss_data = {
117-
@@ -505,6 +555,54 @@ static struct i2c_board_info __initdata zippy_i2c2_rtc[] = {
125+
@@ -505,6 +556,54 @@ static struct i2c_board_info __initdata zippy_i2c2_rtc[] = {
118126
#endif
119127
};
120128

@@ -169,7 +177,7 @@ index c6b33e7..9098869 100644
169177
static int __init omap3_beagle_i2c_init(void)
170178
{
171179
omap3_pmic_get_config(&beagle_twldata,
172-
@@ -517,6 +615,10 @@ static int __init omap3_beagle_i2c_init(void)
180+
@@ -517,6 +616,10 @@ static int __init omap3_beagle_i2c_init(void)
173181
omap3_pmic_init("twl4030", &beagle_twldata);
174182

175183
switch (expansion_config.i2c_settings) {
@@ -180,11 +188,30 @@ index c6b33e7..9098869 100644
180188
case EXPANSION_I2C_ZIPPY:
181189
omap_register_i2c_bus(2, 400, zippy_i2c2_rtc, ARRAY_SIZE(zippy_i2c2_rtc));
182190
break;
183-
@@ -690,6 +792,21 @@ static void __init omap3_beagle_init(void)
191+
@@ -625,6 +728,18 @@ static int __init expansionboard_setup(char *str)
192+
return 0;
193+
}
194+
195+
+static int __init expansionboard2_setup(char *str)
196+
+{
197+
+ if (!machine_is_omap3_beagle())
198+
+ return 0;
199+
+
200+
+ if (!str)
201+
+ return -EINVAL;
202+
+ strncpy(expansionboard2_name, str, 16);
203+
+ pr_info("Beagle expansionboard2: %s\n", expansionboard2_name);
204+
+ return 0;
205+
+}
206+
+
207+
static int __init beagle_opp_init(void)
208+
{
209+
int r = 0;
210+
@@ -690,6 +805,20 @@ static void __init omap3_beagle_init(void)
184211
omap_mux_init_gpio(OMAP3BEAGLE_GPIO_ZIPPY_MMC_CD, OMAP_PIN_INPUT);
185212
}
186213

187-
+ if (!strcmp(expansionboard_name, "bbtoys-ulcd"))
214+
+ if (!strcmp(expansionboard2_name, "bbtoys-ulcd"))
188215
+ {
189216
+ int r;
190217
+ expansion_config.i2c_settings = EXPANSION_I2C_7ULCD;
@@ -196,17 +223,16 @@ index c6b33e7..9098869 100644
196223
+ r = gpio_request_one(beagle_config.lcd_pwren, GPIOF_OUT_INIT_LOW, "LCD power");
197224
+ if (r < 0)
198225
+ pr_err("Beagle expansionboard: Unable to get LCD power enable GPIO\n");
199-
+
200226
+ }
201227
+
202228
if (gpio_is_valid(beagle_config.mmc1_gpio_wp))
203229
omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT);
204230

205-
@@ -759,6 +876,14 @@ static void __init omap3_beagle_init(void)
231+
@@ -759,6 +888,14 @@ static void __init omap3_beagle_init(void)
206232
gpio_export(162, 1);
207233
}
208234

209-
+ if (!strcmp(expansionboard_name, "bbtoys-ulcd"))
235+
+ if (!strcmp(expansionboard_name2, "bbtoys-ulcd"))
210236
+ {
211237
+ #if defined(CONFIG_TOUCHSCREEN_TSC2007) || defined(CONFIG_TOUCHSCREEN_TSC2007_MODULE)
212238
+ pr_info("Beagle expansionboard: initializing touchscreen: tsc2007\n");
@@ -217,6 +243,14 @@ index c6b33e7..9098869 100644
217243
usb_musb_init(NULL);
218244
usbhs_init(&usbhs_bdata);
219245
omap_nand_flash_init(NAND_BUSWIDTH_16, omap3beagle_nand_partitions,
246+
@@ -774,6 +911,7 @@ static void __init omap3_beagle_init(void)
247+
}
248+
249+
early_param("buddy", expansionboard_setup);
250+
+early_param("buddy2", expansionboard2_setup);
251+
252+
MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
253+
/* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */
220254
diff --git a/drivers/video/omap2/displays/panel-generic-dpi.c b/drivers/video/omap2/displays/panel-generic-dpi.c
221255
index 88295c5..b7f296b 100644
222256
--- a/drivers/video/omap2/displays/panel-generic-dpi.c

patches/omap_beagle_expansion/0006-Beagle-expansion-add-wifi.patch

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ Subject: [PATCH 06/10] Beagle: expansion: add wifi
55

66
Signed-off-by: Robert Nelson <[email protected]>
77
---
8-
arch/arm/mach-omap2/board-omap3beagle.c | 116 +++++++++++++++++++++++++++++++
9-
1 file changed, 116 insertions(+)
8+
arch/arm/mach-omap2/board-omap3beagle.c | 117 +++++++++++++++++++++++++++++++
9+
1 file changed, 117 insertions(+)
1010

1111
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
12-
index 9098869..57e9060 100644
12+
index ad9dfe7..fe4b201 100644
1313
--- a/arch/arm/mach-omap2/board-omap3beagle.c
1414
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
15-
@@ -187,6 +187,71 @@ static struct {
15+
@@ -188,6 +188,71 @@ static struct {
1616
.i2c_settings = EXPANSION_I2C_NONE,
1717
};
1818

@@ -84,7 +84,7 @@ index 9098869..57e9060 100644
8484
//rcn-ee: this is just a fake regulator, the zippy hardware provides 3.3/1.8 with jumper..
8585
static struct fixed_voltage_config beagle_vzippy = {
8686
.supply_name = "vzippy",
87-
@@ -425,6 +490,26 @@ static struct omap2_hsmmc_info mmc_zippy[] = {
87+
@@ -426,6 +491,26 @@ static struct omap2_hsmmc_info mmc_zippy[] = {
8888
},
8989
{} /* Terminator */
9090
};
@@ -111,7 +111,7 @@ index 9098869..57e9060 100644
111111
static struct regulator_consumer_supply beagle_vmmc1_supply[] = {
112112
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
113113
};
114-
@@ -441,6 +526,13 @@ static int beagle_twl_gpio_setup(struct device *dev,
114+
@@ -442,6 +527,13 @@ static int beagle_twl_gpio_setup(struct device *dev,
115115
int r;
116116

117117
switch (expansion_config.mmc_settings) {
@@ -125,20 +125,21 @@ index 9098869..57e9060 100644
125125
case EXPANSION_MMC_ZIPPY:
126126
mmc_zippy[0].gpio_wp = beagle_config.mmc1_gpio_wp;
127127
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
128-
@@ -804,13 +896,23 @@ static void __init omap3_beagle_init(void)
129-
r = gpio_request_one(beagle_config.lcd_pwren, GPIOF_OUT_INIT_LOW, "LCD power");
130-
if (r < 0)
131-
pr_err("Beagle expansionboard: Unable to get LCD power enable GPIO\n");
132-
+ }
128+
@@ -805,6 +897,13 @@ static void __init omap3_beagle_init(void)
129+
omap_mux_init_gpio(OMAP3BEAGLE_GPIO_ZIPPY_MMC_CD, OMAP_PIN_INPUT);
130+
}
133131

134132
+#if defined(CONFIG_WL12XX) || defined(CONFIG_WL12XX_MODULE)
135133
+ if (!strcmp(expansionboard_name, "bbtoys-wifi"))
136134
+ {
137135
+ expansion_config.mmc_settings = EXPANSION_MMC_WIFI;
138-
}
136+
+ }
139137
+#endif
140-
141-
if (gpio_is_valid(beagle_config.mmc1_gpio_wp))
138+
+
139+
if (!strcmp(expansionboard2_name, "bbtoys-ulcd"))
140+
{
141+
int r;
142+
@@ -823,6 +922,10 @@ static void __init omap3_beagle_init(void)
142143
omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT);
143144

144145
switch (expansion_config.mmc_settings) {
@@ -149,13 +150,13 @@ index 9098869..57e9060 100644
149150
case EXPANSION_MMC_ZIPPY:
150151
mmc_zippy[0].caps = beagle_config.mmc_caps;
151152
omap_hsmmc_init(mmc_zippy);
152-
@@ -884,6 +986,20 @@ static void __init omap3_beagle_init(void)
153-
#endif
153+
@@ -888,6 +991,20 @@ static void __init omap3_beagle_init(void)
154+
gpio_export(162, 1);
154155
}
155156

156-
+#if defined(CONFIG_WL12XX) || defined(CONFIG_WL12XX_MODULE)
157157
+ if (!strcmp(expansionboard_name, "bbtoys-wifi"))
158158
+ {
159+
+ #if defined(CONFIG_WL12XX) || defined(CONFIG_WL12XX_MODULE)
159160
+ omap_beagle_wlan_data.irq = gpio_to_irq(OMAP_BEAGLE_WLAN_IRQ_GPIO);
160161
+ if (wl12xx_set_platform_data(&omap_beagle_wlan_data))
161162
+ pr_err("error setting wl12xx data\n");
@@ -164,12 +165,12 @@ index 9098869..57e9060 100644
164165
+ platform_device_register(&btwilink_device);
165166
+ pr_info("Beagle expansionboard: registering wl12xx wifi platform device\n");
166167
+ platform_device_register(&omap_vwlan_device);
168+
+ #endif
167169
+ }
168-
+#endif
169170
+
170-
usb_musb_init(NULL);
171-
usbhs_init(&usbhs_bdata);
172-
omap_nand_flash_init(NAND_BUSWIDTH_16, omap3beagle_nand_partitions,
171+
if (!strcmp(expansionboard_name2, "bbtoys-ulcd"))
172+
{
173+
#if defined(CONFIG_TOUCHSCREEN_TSC2007) || defined(CONFIG_TOUCHSCREEN_TSC2007_MODULE)
173174
--
174175
1.7.10.4
175176

patches/omap_beagle_expansion/0007-Beagle-expansion-add-beaglefpga.patch

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Signed-off-by: Robert Nelson <[email protected]>
1212
1 file changed, 74 insertions(+)
1313

1414
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
15-
index 57e9060..d867a0b 100644
15+
index fe4b201..de5ea34 100644
1616
--- a/arch/arm/mach-omap2/board-omap3beagle.c
1717
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
1818
@@ -39,6 +39,7 @@
@@ -23,7 +23,7 @@ index 57e9060..d867a0b 100644
2323

2424
#include "common.h"
2525
#include <video/omapdss.h>
26-
@@ -867,6 +868,68 @@ static int __init beagle_opp_init(void)
26+
@@ -880,6 +881,68 @@ static int __init beagle_opp_init(void)
2727
}
2828
device_initcall(beagle_opp_init);
2929

@@ -92,9 +92,9 @@ index 57e9060..d867a0b 100644
9292
static void __init omap3_beagle_init(void)
9393
{
9494
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
95-
@@ -1000,6 +1063,17 @@ static void __init omap3_beagle_init(void)
95+
@@ -1005,6 +1068,17 @@ static void __init omap3_beagle_init(void)
96+
#endif
9697
}
97-
#endif
9898

9999
+ if (!strcmp(expansionboard_name, "beaglefpga"))
100100
+ {
@@ -107,9 +107,9 @@ index 57e9060..d867a0b 100644
107107
+ spi_register_board_info(beagle_mcspi_board_info, ARRAY_SIZE(beagle_mcspi_board_info));
108108
+ }
109109
+
110-
usb_musb_init(NULL);
111-
usbhs_init(&usbhs_bdata);
112-
omap_nand_flash_init(NAND_BUSWIDTH_16, omap3beagle_nand_partitions,
110+
if (!strcmp(expansionboard_name2, "bbtoys-ulcd"))
111+
{
112+
#if defined(CONFIG_TOUCHSCREEN_TSC2007) || defined(CONFIG_TOUCHSCREEN_TSC2007_MODULE)
113113
--
114114
1.7.10.4
115115

patches/omap_beagle_expansion/0008-Beagle-expansion-add-spidev.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ Signed-off-by: Robert Nelson <[email protected]>
1010
1 file changed, 8 insertions(+)
1111

1212
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
13-
index d867a0b..3a79574 100644
13+
index de5ea34..f802522 100644
1414
--- a/arch/arm/mach-omap2/board-omap3beagle.c
1515
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
16-
@@ -1074,6 +1074,14 @@ static void __init omap3_beagle_init(void)
16+
@@ -1079,6 +1079,14 @@ static void __init omap3_beagle_init(void)
1717
spi_register_board_info(beagle_mcspi_board_info, ARRAY_SIZE(beagle_mcspi_board_info));
1818
}
1919

@@ -25,9 +25,9 @@ index d867a0b..3a79574 100644
2525
+ spi_register_board_info(beagle_mcspi_board_info, ARRAY_SIZE(beagle_mcspi_board_info));
2626
+ }
2727
+
28-
usb_musb_init(NULL);
29-
usbhs_init(&usbhs_bdata);
30-
omap_nand_flash_init(NAND_BUSWIDTH_16, omap3beagle_nand_partitions,
28+
if (!strcmp(expansionboard_name2, "bbtoys-ulcd"))
29+
{
30+
#if defined(CONFIG_TOUCHSCREEN_TSC2007) || defined(CONFIG_TOUCHSCREEN_TSC2007_MODULE)
3131
--
3232
1.7.10.4
3333

patches/omap_beagle_expansion/0009-Beagle-expansion-add-Aptina-li5m03-camera.patch

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ Signed-off-by: Robert Nelson <[email protected]>
1818
1 file changed, 152 insertions(+)
1919

2020
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
21-
index 3a79574..1eccc59 100644
21+
index f802522..9c9e2e5 100644
2222
--- a/arch/arm/mach-omap2/board-omap3beagle.c
2323
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
24-
@@ -167,6 +167,7 @@ static void __init omap3_beagle_init_rev(void)
25-
}
24+
@@ -168,6 +168,7 @@ static void __init omap3_beagle_init_rev(void)
2625

2726
char expansionboard_name[16];
27+
char expansionboard2_name[16];
2828
+char camera_name[16];
2929

3030
enum {
3131
EXPANSION_MMC_NONE = 0,
32-
@@ -519,6 +520,14 @@ static struct regulator_consumer_supply beagle_vsim_supply[] = {
32+
@@ -520,6 +521,14 @@ static struct regulator_consumer_supply beagle_vsim_supply[] = {
3333
REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
3434
};
3535

@@ -44,7 +44,7 @@ index 3a79574..1eccc59 100644
4444
static struct gpio_led gpio_leds[];
4545

4646
static int beagle_twl_gpio_setup(struct device *dev,
47-
@@ -627,11 +636,43 @@ static struct regulator_init_data beagle_vsim = {
47+
@@ -628,11 +637,43 @@ static struct regulator_init_data beagle_vsim = {
4848
.consumer_supplies = beagle_vsim_supply,
4949
};
5050

@@ -88,7 +88,7 @@ index 3a79574..1eccc59 100644
8888
};
8989

9090
static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
91-
@@ -696,6 +737,71 @@ static struct i2c_board_info __initdata beagle_i2c2_bbtoys_ulcd[] = {};
91+
@@ -697,6 +738,71 @@ static struct i2c_board_info __initdata beagle_i2c2_bbtoys_ulcd[] = {};
9292
static void __init omap3beagle_tsc2007_init(void) { return; }
9393
#endif
9494

@@ -160,7 +160,7 @@ index 3a79574..1eccc59 100644
160160
static int __init omap3_beagle_i2c_init(void)
161161
{
162162
omap3_pmic_get_config(&beagle_twldata,
163-
@@ -820,6 +926,18 @@ static int __init expansionboard_setup(char *str)
163+
@@ -833,6 +939,18 @@ static int __init expansionboard2_setup(char *str)
164164
return 0;
165165
}
166166

@@ -179,7 +179,7 @@ index 3a79574..1eccc59 100644
179179
static int __init beagle_opp_init(void)
180180
{
181181
int r = 0;
182-
@@ -1096,7 +1214,41 @@ static void __init omap3_beagle_init(void)
182+
@@ -1109,8 +1227,42 @@ static void __init omap3_beagle_init(void)
183183
omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
184184
}
185185

@@ -215,6 +215,7 @@ index 3a79574..1eccc59 100644
215215
+}
216216
+
217217
early_param("buddy", expansionboard_setup);
218+
early_param("buddy2", expansionboard2_setup);
218219
+early_param("camera", camera_setup);
219220
+
220221
+late_initcall(omap3_beagle_late_initcall);

0 commit comments

Comments
 (0)