linux-ti33x-psp 3.2: add support for audio cape and disable LBO gpio for battery...
[glsdk/meta-ti-glsdk.git] / recipes-kernel / linux / linux-ti33x-psp-3.2 / beaglebone / 0074-beaglebone-add-support-for-DVI-audio-and-audio-only-.patch
1 From d87e8e9379764451de06b3f6d13d19424836f64c Mon Sep 17 00:00:00 2001
2 From: Koen Kooi <koen@dominion.thruhere.net>
3 Date: Tue, 3 Jul 2012 08:45:47 +0200
4 Subject: [PATCH] beaglebone: add support for DVI+audio and audio-only capes
6 Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7 ---
8  arch/arm/mach-omap2/board-am335xevm.c |   32 ++++++++++++++++++++++++++++++--
9  1 file changed, 30 insertions(+), 2 deletions(-)
11 diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
12 index 1680612..4b3f7d2 100644
13 --- a/arch/arm/mach-omap2/board-am335xevm.c
14 +++ b/arch/arm/mach-omap2/board-am335xevm.c
15 @@ -2906,8 +2906,10 @@ static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context
16                 
17                 beaglebone_leds_free = 0;
18                 dvileds_init(0,0);
19 -               beaglebone_spi1_free = 0;
20 -               mcasp0_init(0,0);
21 +
22 +               // Uncomment these for custom DVI capes with audio populated
23 +               //beaglebone_spi1_free = 0;
24 +               //mcasp0_init(0,0);
25         
26                 if (!strncmp("00A1", cape_config.version, 4) || !strncmp("000A", cape_config.version, 4)) {
27                         pr_info("BeagleBone cape: DVI init for revision A1 or older\n");
28 @@ -2923,6 +2925,32 @@ static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context
29                         dvi_init(0,0);
30                 }
31         }
32 +
33 +       if (!strncmp("BB-BONE-DVID-02", cape_config.partnumber, 15)) {
34 +               pr_info("BeagleBone cape: initializing DVI+audio cape\n");
35 +
36 +               beaglebone_leds_free = 0;
37 +               dvileds_init(0,0);
38 +
39 +               beaglebone_spi1_free = 0;
40 +               mcasp0_init(0,0);
41 +       
42 +               setup_pin_mux(dvia2_pin_mux);
43 +               gpio_request(BEAGLEBONEDVI_PDn_A2, "DVI_PDn");
44 +               gpio_direction_output(BEAGLEBONEDVI_PDn_A2, 1);
45 +               dvi_init(0,0);
46 +       }
47 +
48 +       if (!strncmp("BB-BONE-AUDI-01", cape_config.partnumber, 15)) {
49 +               pr_info("BeagleBone cape: initializing audio cape\n");
50 +
51 +               beaglebone_leds_free = 0;
52 +               dvileds_init(0,0);
53 +
54 +               beaglebone_spi1_free = 0;
55 +               mcasp0_init(0,0);
56 +       }
57 +
58         if (!strncmp("BB-BONE-LCD7-01", cape_config.partnumber, 15)) {
59                 pr_info("BeagleBone cape: initializing LCD cape\n");
60  
61 -- 
62 1.7.10