[glsdk/meta-ti-glsdk.git] / recipes-kernel / linux / linux-ti33x-psp-3.2 / beaglebone / 0044-beaglebone-add-support-for-7-LCD-cape-revision-A2.patch
1 From 994f87a816d1bd28483e34df8dfa68950eb70c72 Mon Sep 17 00:00:00 2001
2 From: Koen Kooi <koen@dominion.thruhere.net>
3 Date: Fri, 18 May 2012 12:17:12 +0200
4 Subject: [PATCH 44/56] beaglebone: add support for 7" LCD cape revision A2
6 Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7 ---
8 arch/arm/mach-omap2/board-am335xevm.c | 24 +++++++++++++++++++++---
9 1 files changed, 21 insertions(+), 3 deletions(-)
11 diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
12 index a0fa53a..5bb71b1 100644
13 --- a/arch/arm/mach-omap2/board-am335xevm.c
14 +++ b/arch/arm/mach-omap2/board-am335xevm.c
15 @@ -629,6 +629,14 @@ static struct pinmux_config bbtoys7_pin_mux[] = {
16 {NULL, 0},
17 };
19 +/* Module pin mux for Beagleboardtoys 7" LCD cape */
20 +static struct pinmux_config bbtoys7a2_pin_mux[] = {
21 + {"gpmc_csn2.gpio1_31", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // AVDD_EN
22 + {"gpmc_a2.ehrpwm1A", OMAP_MUX_MODE6 | AM33XX_PIN_OUTPUT}, // Backlight
23 + {NULL, 0},
24 +};
25 +
26 +
27 static struct pinmux_config w1_gpio_pin_mux[] = {
28 {"gpmc_ad3.gpio1_3", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT_PULLUP},
29 {NULL, 0},
30 @@ -1595,13 +1603,11 @@ static void lcdc_init(int evm_id, int profile)
31 }
33 #define BEAGLEBONE_LCD_AVDD_EN GPIO_TO_PIN(0, 7)
34 +#define BEAGLEBONE_LCD7A2_AVDD_EN GPIO_TO_PIN(1, 31)
36 static void bbtoys7lcd_init(int evm_id, int profile)
37 {
38 setup_pin_mux(lcdc16_pin_mux);
39 - setup_pin_mux(bbtoys7_pin_mux);
40 - gpio_request(BEAGLEBONE_LCD_AVDD_EN, "BONE_LCD_AVDD_EN");
41 - gpio_direction_output(BEAGLEBONE_LCD_AVDD_EN, 1);
43 // we are being stupid and setting pixclock from here instead of da8xx-fb.c
44 if (conf_disp_pll(300000000)) {
45 @@ -2292,6 +2298,18 @@ static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context
46 }
47 if (!strncmp("BB-BONE-LCD7-01", cape_config.partnumber, 15)) {
48 pr_info("BeagleBone cape: initializing LCD cape\n");
49 +
50 + if (!strncmp("00A2", cape_config.version, 4)) {
51 + setup_pin_mux(bbtoys7a2_pin_mux);
52 + gpio_request(BEAGLEBONE_LCD7A2_AVDD_EN, "BONE_LCD_AVDD_EN");
53 + gpio_direction_output(BEAGLEBONE_LCD7A2_AVDD_EN, 1);
54 + } else {
55 + setup_pin_mux(bbtoys7_pin_mux);
56 + gpio_request(BEAGLEBONE_LCD_AVDD_EN, "BONE_LCD_AVDD_EN");
57 + gpio_direction_output(BEAGLEBONE_LCD_AVDD_EN, 1);
58 + bbtoys7lcd_init(0,0);
59 + }
60 +
61 bbtoys7lcd_init(0,0);
62 pr_info("BeagleBone cape: initializing LCD cape touchscreen\n");
63 tsc_init(0,0);
64 --
65 1.7.7.6