summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.1/0032-am335x-add-support-for-7-LCD-cape-fix-DVI-entries.patch359
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.1/0033-beaglebone-update-DVI-cape-partnumber.patch26
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.1/0034-beaglebone-really-enable-i2c2-pullups-fixes-timeouts.patch29
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.1/0035-beaglebone-add-structs-for-DVI-cape-LEDs.patch119
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.1/0036-beaglebone-update-LCD-cape-partnumber.patch26
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp_3.1.bb9
6 files changed, 566 insertions, 2 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.1/0032-am335x-add-support-for-7-LCD-cape-fix-DVI-entries.patch b/recipes-kernel/linux/linux-ti33x-psp-3.1/0032-am335x-add-support-for-7-LCD-cape-fix-DVI-entries.patch
new file mode 100644
index 00000000..eda9493b
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.1/0032-am335x-add-support-for-7-LCD-cape-fix-DVI-entries.patch
@@ -0,0 +1,359 @@
1From cdd84fe3886d332e9e706940af2516559da92349 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Thu, 5 Jan 2012 12:03:20 +0100
4Subject: [PATCH 32/35] am335x: add support for 7" LCD cape, fix DVI entries
5
6Using the EEPROMs!
7
8Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
9---
10 arch/arm/mach-omap2/board-am335xevm.c | 216 ++++++++++++++++++++++++++++++---
11 arch/arm/mach-omap2/mux33xx.c | 2 +-
12 2 files changed, 199 insertions(+), 19 deletions(-)
13
14diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
15index 116089f..6c19334 100644
16--- a/arch/arm/mach-omap2/board-am335xevm.c
17+++ b/arch/arm/mach-omap2/board-am335xevm.c
18@@ -146,6 +146,36 @@ struct da8xx_lcdc_platform_data TFC_S9700RTWV35TR_01B_pdata = {
19 .type = "TFC_S9700RTWV35TR_01B",
20 };
21
22+static const struct display_panel bbtoys7_panel = {
23+ WVGA,
24+ 16,
25+ 16,
26+ COLOR_ACTIVE,
27+};
28+
29+static struct lcd_ctrl_config bbtoys7_cfg = {
30+ &bbtoys7_panel,
31+ .ac_bias = 255,
32+ .ac_bias_intrpt = 0,
33+ .dma_burst_sz = 16,
34+ .bpp = 16,
35+ .fdd = 0x80,
36+ .tft_alt_mode = 0,
37+ .stn_565_mode = 0,
38+ .mono_8bit_mode = 0,
39+ .invert_line_clock = 1,
40+ .invert_frm_clock = 1,
41+ .sync_edge = 0,
42+ .sync_ctrl = 1,
43+ .raster_order = 0,
44+};
45+
46+struct da8xx_lcdc_platform_data bbtoys7_pdata = {
47+ .manu_name = "ThreeFive",
48+ .controller_data = &bbtoys7_cfg,
49+ .type = "TFC_S9700RTWV35TR_01B",
50+};
51+
52 static const struct display_panel dvi_panel = {
53 WVGA,
54 16,
55@@ -345,9 +375,34 @@ struct am335x_evm_eeprom_config {
56 static struct am335x_evm_eeprom_config config;
57 static bool daughter_brd_detected;
58
59+struct beaglebone_cape_eeprom_config {
60+ u32 header;
61+ char format_revision[2];
62+ char name[32];
63+ char version[4];
64+ char manufacturer[16];
65+ char partnumber[16];
66+ u16 numpins;
67+ char serial[12];
68+ u8 muxdata[170];
69+ u16 current_3v3;
70+ u16 current_vdd5v;
71+ u16 current_sys5v;
72+ u16 dc;
73+};
74+
75+static struct beaglebone_cape_eeprom_config cape_config;
76+static bool beaglebone_cape_detected;
77+
78+/* keep track of ADC pin usage */
79+static int capecount = 0;
80+static bool beaglebone_tsadcpins_free = 1;
81+
82+
83 #define GP_EVM_REV_IS_1_0A 0x1
84 #define GP_EVM_REV_IS_1_1A 0x2
85 #define GP_EVM_REV_IS_UNKNOWN 0xFF
86+#define GP_EVM_ACTUALLY_BEAGLEBONE 0xBB
87 static unsigned int gp_evm_revision = GP_EVM_REV_IS_UNKNOWN;
88
89 #define EEPROM_MAC_ADDRESS_OFFSET 60 /* 4+8+4+12+32 */
90@@ -422,7 +477,7 @@ static struct pinmux_config lcdc_pin_mux[] = {
91 {NULL, 0},
92 };
93
94-/* Module pin mux for DVI board */
95+/* Module pin mux for Beagleboardtoys DVI cape */
96 static struct pinmux_config dvi_pin_mux[] = {
97 {"lcd_data0.lcd_data0", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
98 | AM33XX_PULL_DISA},
99@@ -459,13 +514,56 @@ static struct pinmux_config dvi_pin_mux[] = {
100 {"lcd_vsync.lcd_vsync", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
101 {"lcd_hsync.lcd_hsync", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
102 {"lcd_pclk.lcd_pclk", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
103- {"lcd_ac_bias_en.lcd_ac_bias_en", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, //DVIEN
104+ {"lcd_ac_bias_en.lcd_ac_bias_en", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
105 {"gpmc_a2.rgmii2_td3", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // USR0 LED
106 {"gpmc_a3.rgmii2_td2", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // USR1 LED
107 {"gpmc_ad7.gpmc_ad7", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // DVI PDn
108 {NULL, 0},
109 };
110
111+/* Module pin mux for Beagleboardtoys 7" LCD cape */
112+static struct pinmux_config bbtoys7_pin_mux[] = {
113+ {"lcd_data0.lcd_data0", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
114+ | AM33XX_PULL_DISA},
115+ {"lcd_data1.lcd_data1", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
116+ | AM33XX_PULL_DISA},
117+ {"lcd_data2.lcd_data2", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
118+ | AM33XX_PULL_DISA},
119+ {"lcd_data3.lcd_data3", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
120+ | AM33XX_PULL_DISA},
121+ {"lcd_data4.lcd_data4", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
122+ | AM33XX_PULL_DISA},
123+ {"lcd_data5.lcd_data5", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
124+ | AM33XX_PULL_DISA},
125+ {"lcd_data6.lcd_data6", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
126+ | AM33XX_PULL_DISA},
127+ {"lcd_data7.lcd_data7", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
128+ | AM33XX_PULL_DISA},
129+ {"lcd_data8.lcd_data8", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
130+ | AM33XX_PULL_DISA},
131+ {"lcd_data9.lcd_data9", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
132+ | AM33XX_PULL_DISA},
133+ {"lcd_data10.lcd_data10", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
134+ | AM33XX_PULL_DISA},
135+ {"lcd_data11.lcd_data11", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
136+ | AM33XX_PULL_DISA},
137+ {"lcd_data12.lcd_data12", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
138+ | AM33XX_PULL_DISA},
139+ {"lcd_data13.lcd_data13", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
140+ | AM33XX_PULL_DISA},
141+ {"lcd_data14.lcd_data14", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
142+ | AM33XX_PULL_DISA},
143+ {"lcd_data15.lcd_data15", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
144+ | AM33XX_PULL_DISA},
145+ {"lcd_vsync.lcd_vsync", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
146+ {"lcd_hsync.lcd_hsync", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
147+ {"lcd_pclk.lcd_pclk", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
148+ {"lcd_ac_bias_en.lcd_ac_bias_en", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
149+ {"gpmc_a2.gpio1_18", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // Backlight
150+ {"ecap0_in_pwm0_out.gpio0_7", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // AVDD_EN
151+ {NULL, 0},
152+};
153+
154 static struct pinmux_config tsc_pin_mux[] = {
155 {"ain0.ain0", OMAP_MUX_MODE0 | AM33XX_INPUT_EN},
156 {"ain1.ain1", OMAP_MUX_MODE0 | AM33XX_INPUT_EN},
157@@ -771,16 +869,6 @@ static struct gpio_led gpio_leds[] = {
158 .name = "beaglebone::usr3",
159 .gpio = BEAGLEBONE_USR4_LED,
160 },
161- {
162- .name = "dvi::usr0",
163- .default_trigger = "heartbeat",
164- .gpio = BEAGLEBONEDVI_USR0_LED,
165- },
166- {
167- .name = "dvi::usr1",
168- .default_trigger = "mmc0",
169- .gpio = BEAGLEBONEDVI_USR1_LED,
170- },
171 };
172
173 static struct gpio_led_platform_data gpio_led_info = {
174@@ -905,6 +993,31 @@ static void lcdc_init(int evm_id, int profile)
175 return;
176 }
177
178+#define BEAGLEBONE_LCD_AVDD_EN GPIO_TO_PIN(0, 7)
179+#define BEAGLEBONE_LCD_BL GPIO_TO_PIN(1, 18)
180+
181+static void bbtoys7lcd_init(int evm_id, int profile)
182+{
183+ setup_pin_mux(bbtoys7_pin_mux);
184+
185+ // we are being stupid and setting pixclock from here instead of da8xx-fb.c
186+ if (conf_disp_pll(300000000)) {
187+ pr_info("Failed to set pixclock to 300000000, not attempting to"
188+ "register LCD cape\n");
189+ return;
190+ }
191+
192+ if (am33xx_register_lcdc(&bbtoys7_pdata))
193+ pr_info("Failed to register Beagleboardtoys 7\" LCD cape device\n");
194+
195+ gpio_request(BEAGLEBONE_LCD_BL, "BONE_LCD_BL");
196+ gpio_direction_output(BEAGLEBONE_LCD_BL, 1);
197+ gpio_request(BEAGLEBONE_LCD_AVDD_EN, "BONE_LCD_AVDD_EN");
198+ gpio_direction_output(BEAGLEBONE_LCD_AVDD_EN, 1);
199+
200+ return;
201+}
202+
203 #define BEAGLEBONEDVI_PDn GPIO_TO_PIN(1, 7)
204
205 static void dvi_init(int evm_id, int profile)
206@@ -921,7 +1034,7 @@ static void dvi_init(int evm_id, int profile)
207 }
208
209 if (am33xx_register_lcdc(&dvi_pdata))
210- pr_info("Failed to register BeagleBoardToys DVI adapter\n");
211+ pr_info("Failed to register BeagleBoardToys DVI cape\n");
212 return;
213 }
214
215@@ -932,10 +1045,15 @@ static void tsc_init(int evm_id, int profile)
216 if (gp_evm_revision == GP_EVM_REV_IS_1_1A) {
217 am335x_touchscreen_data.analog_input = 1;
218 pr_info("TSC connected to beta GP EVM\n");
219- } else {
220+ }
221+ if (gp_evm_revision == GP_EVM_REV_IS_1_1A) {
222 am335x_touchscreen_data.analog_input = 0;
223 pr_info("TSC connected to alpha GP EVM\n");
224 }
225+ if( gp_evm_revision == GP_EVM_ACTUALLY_BEAGLEBONE) {
226+ am335x_touchscreen_data.analog_input = 1;
227+ pr_info("TSC connected to BeagleBone\n");;
228+ }
229 setup_pin_mux(tsc_pin_mux);
230 err = platform_device_register(&tsc_device);
231 if (err)
232@@ -1148,11 +1266,76 @@ static struct i2c_board_info beaglebone_i2c_boardinfo2[] = {
233 },
234 };
235
236+static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context)
237+{
238+ capecount++;
239+ int ret;
240+ char tmp[32];
241+ char name[32];
242+ char manufacturer[32];
243+
244+ /* get cape specific data */
245+ ret = mem_acc->read(mem_acc, (char *)&cape_config, 0, sizeof(cape_config));
246+ if (ret != sizeof(cape_config)) {
247+ pr_warning("BeagleBone cape EEPROM: could not read eeprom at address 0x%x\n", capecount + 0x53);
248+ if ((capecount > 3) && (beaglebone_tsadcpins_free == 1)) {
249+ pr_info("BeagleBone cape: exporting ADC pins to sysfs\n");
250+ bone_tsc_init(0,0);
251+ beaglebone_tsadcpins_free = 0;
252+ }
253+ return;
254+ }
255+
256+ if (cape_config.header != AM335X_EEPROM_HEADER) {
257+ pr_warning("BeagleBone Cape EEPROM: wrong header 0x%x, expected 0x%x\n",
258+ cape_config.header, AM335X_EEPROM_HEADER);
259+ goto out;
260+ }
261+
262+ pr_info("BeagleBone cape EEPROM: found eeprom at address 0x%x\n", capecount + 0x53);
263+ snprintf(name, sizeof(cape_config.name) + 1, "%s", cape_config.name);
264+ snprintf(manufacturer, sizeof(cape_config.manufacturer) + 1, "%s", cape_config.manufacturer);
265+ pr_info("BeagleBone cape: %s %s\n", manufacturer, name);
266+ snprintf(tmp, sizeof(cape_config.partnumber) + 1, "%s", cape_config.partnumber);
267+ pr_info("BeagleBone cape partnumber: %s\n", tmp);
268+
269+ if (!strncmp("DVI01", cape_config.partnumber, 5)) {
270+ pr_info("BeagleBone cape: initializing DVI cape\n");
271+ dvi_init(0,0);
272+ }
273+ if (!strncmp("LCD01", cape_config.partnumber, 5)) {
274+ pr_info("BeagleBone cape: initializing LCD cape\n");
275+ bbtoys7lcd_init(0,0);
276+ pr_info("BeagleBone cape: initializing LCD cape touchscreen\n");
277+ tsc_init(0,0);
278+ beaglebone_tsadcpins_free = 0;
279+ }
280+
281+
282+ if ((capecount > 3) && (beaglebone_tsadcpins_free == 1)) {
283+ pr_info("BeagleBone cape: exporting ADC pins to sysfs\n");
284+ bone_tsc_init(0,0);
285+ beaglebone_tsadcpins_free = 0;
286+ }
287+
288+ return;
289+out:
290+ /*
291+ * If the EEPROM hasn't been programed or an incorrect header
292+ * or board name are read, assume this is an old beaglebone board
293+ * (< Rev A3)
294+ */
295+ pr_err("Could not detect BeagleBone cape properly\n");
296+ beaglebone_cape_detected = false;
297+
298+}
299+
300 static struct at24_platform_data cape_eeprom_info = {
301 .byte_len = (256*1024) / 8,
302 .page_size = 64,
303 .flags = AT24_FLAG_ADDR16,
304 .context = (void *)NULL,
305+ .setup = beaglebone_cape_setup,
306 };
307
308 static struct i2c_board_info __initdata cape_i2c_boardinfo[] = {
309@@ -1587,26 +1770,22 @@ static struct evm_dev_cfg ip_phn_evm_dev_cfg[] = {
310 /* Beaglebone < Rev A3 */
311 static struct evm_dev_cfg beaglebone_old_dev_cfg[] = {
312 {rmii1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
313- {dvi_init, DEV_ON_BASEBOARD, PROFILE_ALL},
314 {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
315 {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
316 {i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE},
317 {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
318 {boneleds_init, DEV_ON_BASEBOARD, PROFILE_ALL},
319- {bone_tsc_init, DEV_ON_BASEBOARD, PROFILE_ALL},
320 {NULL, 0, 0},
321 };
322
323 /* Beaglebone Rev A3 and after */
324 static struct evm_dev_cfg beaglebone_dev_cfg[] = {
325 {mii1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
326- {dvi_init, DEV_ON_BASEBOARD, PROFILE_ALL},
327 {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
328 {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
329 {i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE},
330 {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
331 {boneleds_init, DEV_ON_BASEBOARD, PROFILE_ALL},
332- {bone_tsc_init, DEV_ON_BASEBOARD, PROFILE_ALL},
333 {NULL, 0, 0},
334 };
335
336@@ -1689,6 +1868,7 @@ static void setup_beaglebone_old(void)
337 static void setup_beaglebone(void)
338 {
339 pr_info("The board is a AM335x Beaglebone.\n");
340+ gp_evm_revision = GP_EVM_ACTUALLY_BEAGLEBONE;
341
342 /* Beagle Bone has Micro-SD slot which doesn't have Write Protect pin */
343 am335x_mmc[0].gpio_wp = -EINVAL;
344diff --git a/arch/arm/mach-omap2/mux33xx.c b/arch/arm/mach-omap2/mux33xx.c
345index 35986ca..da08e2e 100644
346--- a/arch/arm/mach-omap2/mux33xx.c
347+++ b/arch/arm/mach-omap2/mux33xx.c
348@@ -85,7 +85,7 @@ static struct omap_mux __initdata am33xx_muxmodes[] = {
349 NULL, NULL, NULL, NULL),
350 _AM33XX_MUXENTRY(GPMC_A2, 0,
351 "gpmc_a2", "mii2_txd3", "rgmii2_td3", "mmc2_dat1",
352- NULL, NULL, NULL, NULL),
353+ NULL, NULL, NULL, "gpio1_18"),
354 _AM33XX_MUXENTRY(GPMC_A3, 0,
355 "gpmc_a3", "mii2_txd2", "rgmii2_td2", "mmc2_dat2",
356 NULL, NULL, NULL, NULL),
357--
3581.7.2.5
359
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.1/0033-beaglebone-update-DVI-cape-partnumber.patch b/recipes-kernel/linux/linux-ti33x-psp-3.1/0033-beaglebone-update-DVI-cape-partnumber.patch
new file mode 100644
index 00000000..d69e1e5e
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.1/0033-beaglebone-update-DVI-cape-partnumber.patch
@@ -0,0 +1,26 @@
1From 0ddfbfd5d5b6fdf84b9ea174e39b872cacaa8be5 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Wed, 25 Jan 2012 09:56:14 +0100
4Subject: [PATCH 33/35] beaglebone: update DVI cape partnumber
5
6Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7---
8 arch/arm/mach-omap2/board-am335xevm.c | 2 +-
9 1 files changed, 1 insertions(+), 1 deletions(-)
10
11diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
12index 6c19334..7c91ff8 100644
13--- a/arch/arm/mach-omap2/board-am335xevm.c
14+++ b/arch/arm/mach-omap2/board-am335xevm.c
15@@ -1299,7 +1299,7 @@ static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context
16 snprintf(tmp, sizeof(cape_config.partnumber) + 1, "%s", cape_config.partnumber);
17 pr_info("BeagleBone cape partnumber: %s\n", tmp);
18
19- if (!strncmp("DVI01", cape_config.partnumber, 5)) {
20+ if (!strncmp("BB-BONE-DVID-01", cape_config.partnumber, 5)) {
21 pr_info("BeagleBone cape: initializing DVI cape\n");
22 dvi_init(0,0);
23 }
24--
251.7.2.5
26
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.1/0034-beaglebone-really-enable-i2c2-pullups-fixes-timeouts.patch b/recipes-kernel/linux/linux-ti33x-psp-3.1/0034-beaglebone-really-enable-i2c2-pullups-fixes-timeouts.patch
new file mode 100644
index 00000000..018473da
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.1/0034-beaglebone-really-enable-i2c2-pullups-fixes-timeouts.patch
@@ -0,0 +1,29 @@
1From d8bf8cea10710285b5bc1759162bd18c81d8ea3a Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Wed, 25 Jan 2012 12:52:13 +0100
4Subject: [PATCH 34/35] beaglebone: really enable i2c2 pullups, fixes timeouts on boot ~4 seconds less wasted
5
6Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7---
8 arch/arm/mach-omap2/board-am335xevm.c | 4 ++--
9 1 files changed, 2 insertions(+), 2 deletions(-)
10
11diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
12index 7c91ff8..9556736 100644
13--- a/arch/arm/mach-omap2/board-am335xevm.c
14+++ b/arch/arm/mach-omap2/board-am335xevm.c
15@@ -707,9 +707,9 @@ static struct pinmux_config i2c1_pin_mux[] = {
16
17 static struct pinmux_config i2c2_pin_mux[] = {
18 {"uart1_ctsn.i2c2_sda", OMAP_MUX_MODE3 | AM33XX_SLEWCTRL_SLOW |
19- AM33XX_PULL_ENBL | AM33XX_INPUT_EN},
20+ AM33XX_PIN_INPUT_PULLUP},
21 {"uart1_rtsn.i2c2_scl", OMAP_MUX_MODE3 | AM33XX_SLEWCTRL_SLOW |
22- AM33XX_PULL_ENBL | AM33XX_INPUT_EN},
23+ AM33XX_PIN_INPUT_PULLUP},
24 {NULL, 0},
25 };
26
27--
281.7.2.5
29
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.1/0035-beaglebone-add-structs-for-DVI-cape-LEDs.patch b/recipes-kernel/linux/linux-ti33x-psp-3.1/0035-beaglebone-add-structs-for-DVI-cape-LEDs.patch
new file mode 100644
index 00000000..5d13ea95
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.1/0035-beaglebone-add-structs-for-DVI-cape-LEDs.patch
@@ -0,0 +1,119 @@
1From f4d66b3ee9bbe36e17f9aaee2aedfa547e7bbb8c Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Wed, 25 Jan 2012 10:04:15 +0100
4Subject: [PATCH 35/35] beaglebone: add structs for DVI cape LEDs
5
6Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7---
8 arch/arm/mach-omap2/board-am335xevm.c | 67 +++++++++++++++++++++++++++++---
9 1 files changed, 60 insertions(+), 7 deletions(-)
10
11diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
12index 9556736..1b398c7 100644
13--- a/arch/arm/mach-omap2/board-am335xevm.c
14+++ b/arch/arm/mach-omap2/board-am335xevm.c
15@@ -847,10 +847,45 @@ static struct pinmux_config usb1_pin_mux[] = {
16 #define BEAGLEBONE_USR3_LED GPIO_TO_PIN(1, 23)
17 #define BEAGLEBONE_USR4_LED GPIO_TO_PIN(1, 24)
18
19+static struct gpio_led bone_gpio_leds[] = {
20+ {
21+ .name = "beaglebone::usr0",
22+ .default_trigger = "heartbeat",
23+ .gpio = BEAGLEBONE_USR1_LED,
24+ },
25+ {
26+ .name = "beaglebone::usr1",
27+ .default_trigger = "mmc0",
28+ .gpio = BEAGLEBONE_USR2_LED,
29+ },
30+ {
31+ .name = "beaglebone::usr2",
32+ .gpio = BEAGLEBONE_USR3_LED,
33+ },
34+ {
35+ .name = "beaglebone::usr3",
36+ .gpio = BEAGLEBONE_USR4_LED,
37+ },
38+};
39+
40+static struct gpio_led_platform_data bone_gpio_led_info = {
41+ .leds = bone_gpio_leds,
42+ .num_leds = ARRAY_SIZE(bone_gpio_leds),
43+};
44+
45+static struct platform_device bone_leds_gpio = {
46+ .name = "leds-gpio",
47+ .id = -1,
48+ .dev = {
49+ .platform_data = &bone_gpio_led_info,
50+ },
51+};
52+
53+
54 #define BEAGLEBONEDVI_USR0_LED GPIO_TO_PIN(1, 18)
55 #define BEAGLEBONEDVI_USR1_LED GPIO_TO_PIN(1, 19)
56
57-static struct gpio_led gpio_leds[] = {
58+static struct gpio_led dvi_gpio_leds[] = {
59 {
60 .name = "beaglebone::usr0",
61 .default_trigger = "heartbeat",
62@@ -869,18 +904,28 @@ static struct gpio_led gpio_leds[] = {
63 .name = "beaglebone::usr3",
64 .gpio = BEAGLEBONE_USR4_LED,
65 },
66+ {
67+ .name = "dvi::usr0",
68+ .default_trigger = "heartbeat",
69+ .gpio = BEAGLEBONEDVI_USR0_LED,
70+ },
71+ {
72+ .name = "dvi::usr1",
73+ .default_trigger = "mmc0",
74+ .gpio = BEAGLEBONEDVI_USR1_LED,
75+ },
76 };
77
78-static struct gpio_led_platform_data gpio_led_info = {
79- .leds = gpio_leds,
80- .num_leds = ARRAY_SIZE(gpio_leds),
81+static struct gpio_led_platform_data dvi_gpio_led_info = {
82+ .leds = dvi_gpio_leds,
83+ .num_leds = ARRAY_SIZE(dvi_gpio_leds),
84 };
85
86-static struct platform_device leds_gpio = {
87+static struct platform_device dvi_leds_gpio = {
88 .name = "leds-gpio",
89 .id = -1,
90 .dev = {
91- .platform_data = &gpio_led_info,
92+ .platform_data = &dvi_gpio_led_info,
93 },
94 };
95
96@@ -1074,11 +1119,19 @@ static void boneleds_init(int evm_id, int profile )
97 {
98 int err;
99 setup_pin_mux(bone_pin_mux);
100- err = platform_device_register(&leds_gpio);
101+ err = platform_device_register(&bone_leds_gpio);
102 if (err)
103 pr_err("failed to register BeagleBone LEDS\n");
104 }
105
106+static void dvileds_init(int evm_id, int profile )
107+{
108+ int err;
109+ err = platform_device_register(&dvi_leds_gpio);
110+ if (err)
111+ pr_err("failed to register BeagleBone DVI cape LEDS\n");
112+}
113+
114 static void rgmii1_init(int evm_id, int profile)
115 {
116 setup_pin_mux(rgmii1_pin_mux);
117--
1181.7.2.5
119
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.1/0036-beaglebone-update-LCD-cape-partnumber.patch b/recipes-kernel/linux/linux-ti33x-psp-3.1/0036-beaglebone-update-LCD-cape-partnumber.patch
new file mode 100644
index 00000000..19fdd904
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.1/0036-beaglebone-update-LCD-cape-partnumber.patch
@@ -0,0 +1,26 @@
1From 4089ed795fc26961e0e0ece07af2c628b96321de Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Wed, 25 Jan 2012 17:18:43 +0100
4Subject: [PATCH 36/36] beaglebone: update LCD cape partnumber
5
6Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7---
8 arch/arm/mach-omap2/board-am335xevm.c | 2 +-
9 1 files changed, 1 insertions(+), 1 deletions(-)
10
11diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
12index 1b398c7..6a0ace9 100644
13--- a/arch/arm/mach-omap2/board-am335xevm.c
14+++ b/arch/arm/mach-omap2/board-am335xevm.c
15@@ -1356,7 +1356,7 @@ static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context
16 pr_info("BeagleBone cape: initializing DVI cape\n");
17 dvi_init(0,0);
18 }
19- if (!strncmp("LCD01", cape_config.partnumber, 5)) {
20+ if (!strncmp("BB-BONE-LCD7-01", cape_config.partnumber, 5)) {
21 pr_info("BeagleBone cape: initializing LCD cape\n");
22 bbtoys7lcd_init(0,0);
23 pr_info("BeagleBone cape: initializing LCD cape touchscreen\n");
24--
251.7.7.5
26
diff --git a/recipes-kernel/linux/linux-ti33x-psp_3.1.bb b/recipes-kernel/linux/linux-ti33x-psp_3.1.bb
index ef706cb9..150a2823 100644
--- a/recipes-kernel/linux/linux-ti33x-psp_3.1.bb
+++ b/recipes-kernel/linux/linux-ti33x-psp_3.1.bb
@@ -11,7 +11,7 @@ MULTI_CONFIG_BASE_SUFFIX = ""
11 11
12BRANCH = "v3.1-meta-ti-r1r+gitr1d84d8853fa30cf3db2571a5aec572accca4e29d" 12BRANCH = "v3.1-meta-ti-r1r+gitr1d84d8853fa30cf3db2571a5aec572accca4e29d"
13SRCREV = "1d84d8853fa30cf3db2571a5aec572accca4e29d" 13SRCREV = "1d84d8853fa30cf3db2571a5aec572accca4e29d"
14MACHINE_KERNEL_PR_append = "i+gitr${SRCREV}" 14MACHINE_KERNEL_PR_append = "j+gitr${SRCREV}"
15 15
16COMPATIBLE_MACHINE = "(ti33x)" 16COMPATIBLE_MACHINE = "(ti33x)"
17 17
@@ -55,7 +55,12 @@ PATCHES_OVER_PSP = " \
55 file://adc/0009-meta-ti-Remove-debug-messages-for-meta-ti.patch \ 55 file://adc/0009-meta-ti-Remove-debug-messages-for-meta-ti.patch \
56 file://adc/0010-tscadc-switch-to-polling-instead-of-interrupts.patch \ 56 file://adc/0010-tscadc-switch-to-polling-instead-of-interrupts.patch \
57 file://st7735fb/0001-st7735fb-WIP-framebuffer-driver-supporting-Adafruit-.patch \ 57 file://st7735fb/0001-st7735fb-WIP-framebuffer-driver-supporting-Adafruit-.patch \
58 file://0031-am335x-evm-add-pdata-for-all-cape-EEPROM-permutation.patch \ 58 file://0031-am335x-evm-add-pdata-for-all-cape-EEPROM-permutation.patch \
59 file://0032-am335x-add-support-for-7-LCD-cape-fix-DVI-entries.patch \
60 file://0033-beaglebone-update-DVI-cape-partnumber.patch \
61 file://0034-beaglebone-really-enable-i2c2-pullups-fixes-timeouts.patch \
62 file://0035-beaglebone-add-structs-for-DVI-cape-LEDs.patch\
63 file://0036-beaglebone-update-LCD-cape-partnumber.patch \
59 " 64 "
60 65
61SRC_URI += "${@base_contains('DISTRO_FEATURES', 'tipspkernel', "", "${PATCHES_OVER_PSP}", d)}" 66SRC_URI += "${@base_contains('DISTRO_FEATURES', 'tipspkernel', "", "${PATCHES_OVER_PSP}", d)}"