1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
From e32e80d4258b45a8b59306c3cf2ab35e6ec19ac2 Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@dominion.thruhere.net>
Date: Tue, 31 Jan 2012 10:04:03 +0100
Subject: [PATCH 04/22] more beaglebone merges
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
arch/arm/mach-omap2/board-am335xevm.c | 63 +++++++++++++++++++++++++++++++--
1 file changed, 60 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
index e0c20c5..177ab9e 100644
--- a/arch/arm/mach-omap2/board-am335xevm.c
+++ b/arch/arm/mach-omap2/board-am335xevm.c
@@ -248,6 +248,11 @@ static struct resource tsc_resources[] = {
static struct tsc_data am335x_touchscreen_data = {
.wires = 4,
.x_plate_resistance = 200,
+ .mode = TI_TSCADC_TSCMODE,
+};
+
+static struct tsc_data bone_touchscreen_data = {
+ .mode = TI_TSCADC_GENMODE,
};
static struct platform_device tsc_device = {
@@ -260,6 +265,16 @@ static struct platform_device tsc_device = {
.resource = tsc_resources,
};
+static struct platform_device bone_tsc_device = {
+ .name = "tsc",
+ .id = -1,
+ .dev = {
+ .platform_data = &bone_touchscreen_data,
+ },
+ .num_resources = ARRAY_SIZE(tsc_resources),
+ .resource = tsc_resources,
+};
+
static u8 am335x_iis_serializer_direction1[] = {
INACTIVE_MODE, INACTIVE_MODE, TX_MODE, RX_MODE,
INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
@@ -404,7 +419,7 @@ static bool beaglebone_cape_detected;
static int capecount = 0;
static bool beaglebone_tsadcpins_free = 1;
-
+#define GP_EVM_REV_IS_1_0 0x1
#define GP_EVM_REV_IS_1_0A 0x1
#define GP_EVM_REV_IS_1_1A 0x2
#define GP_EVM_REV_IS_UNKNOWN 0xFF
@@ -1000,6 +1015,47 @@ static struct pinmux_config profibus_pin_mux[] = {
{NULL, 0},
};
+/* LEDS - gpio1_21 -> gpio1_24 */
+
+#define BEAGLEBONE_USR1_LED GPIO_TO_PIN(1, 21)
+#define BEAGLEBONE_USR2_LED GPIO_TO_PIN(1, 22)
+#define BEAGLEBONE_USR3_LED GPIO_TO_PIN(1, 23)
+#define BEAGLEBONE_USR4_LED GPIO_TO_PIN(1, 24)
+
+static struct gpio_led bone_gpio_leds[] = {
+ {
+ .name = "beaglebone::usr0",
+ .default_trigger = "heartbeat",
+ .gpio = BEAGLEBONE_USR1_LED,
+ },
+ {
+ .name = "beaglebone::usr1",
+ .default_trigger = "mmc0",
+ .gpio = BEAGLEBONE_USR2_LED,
+ },
+ {
+ .name = "beaglebone::usr2",
+ .gpio = BEAGLEBONE_USR3_LED,
+ },
+ {
+ .name = "beaglebone::usr3",
+ .gpio = BEAGLEBONE_USR4_LED,
+ },
+};
+
+static struct gpio_led_platform_data bone_gpio_led_info = {
+ .leds = bone_gpio_leds,
+ .num_leds = ARRAY_SIZE(bone_gpio_leds),
+};
+
+static struct platform_device bone_leds_gpio = {
+ .name = "leds-gpio",
+ .id = -1,
+ .dev = {
+ .platform_data = &bone_gpio_led_info,
+ },
+};
+
#define BEAGLEBONEDVI_USR0_LED GPIO_TO_PIN(1, 18)
#define BEAGLEBONEDVI_USR1_LED GPIO_TO_PIN(1, 19)
@@ -1703,11 +1759,11 @@ static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context
snprintf(tmp, sizeof(cape_config.partnumber) + 1, "%s", cape_config.partnumber);
pr_info("BeagleBone cape partnumber: %s\n", tmp);
- if (!strncmp("BB-BONE-DVID-01", cape_config.partnumber, 5)) {
+ if (!strncmp("BB-BONE-DVID-01", cape_config.partnumber, 15)) {
pr_info("BeagleBone cape: initializing DVI cape\n");
dvi_init(0,0);
}
- if (!strncmp("LCD01", cape_config.partnumber, 5)) {
+ if (!strncmp("BB-BONE-LCD7-01", cape_config.partnumber, 15)) {
pr_info("BeagleBone cape: initializing LCD cape\n");
bbtoys7lcd_init(0,0);
pr_info("BeagleBone cape: initializing LCD cape touchscreen\n");
@@ -2154,6 +2210,7 @@ static void setup_general_purpose_evm(void)
pr_info("The board is general purpose EVM in profile %d\n", prof_sel);
if (!strncmp("1.1A", config.version, 4)) {
+ pr_info("EVM version is %s\n", config.version);
gp_evm_revision = GP_EVM_REV_IS_1_1A;
} else if (!strncmp("1.0", config.version, 3)) {
gp_evm_revision = GP_EVM_REV_IS_1_0;
--
1.7.9.4
|