summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2012-03-19 15:04:32 +0100
committerDenys Dmytriyenko <denys@ti.com>2012-03-30 19:05:28 -0400
commita04b218eb638d7fe1835028ac4d283d0885f6173 (patch)
tree247e18e1f1f7f98538c7e9a7628af02b86fe0699
parent7df8fc578b63662ec03ad3e69ecc6f04f7d77fb8 (diff)
downloadmeta-ti-a04b218eb638d7fe1835028ac4d283d0885f6173.tar.gz
linux-ti33x-psp 3.2: improve cape support
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0023-beaglebone-add-more-beagleboardtoys-cape-partnumbers.patch53
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0024-beaglebone-add-gpio-keys-for-lcd7-add-notes-for-miss.patch129
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0025-beaglebone-add-enter-key-for-lcd7-cape.patch40
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0026-beaglebone-add-gpio-keys-for-lcd.patch113
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp_3.2.bb6
5 files changed, 340 insertions, 1 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0023-beaglebone-add-more-beagleboardtoys-cape-partnumbers.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0023-beaglebone-add-more-beagleboardtoys-cape-partnumbers.patch
new file mode 100644
index 00000000..4c1fcfdf
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0023-beaglebone-add-more-beagleboardtoys-cape-partnumbers.patch
@@ -0,0 +1,53 @@
1From a0bf4fec50d8a0690e6f4ded292d24fb00d9e01a Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Mon, 19 Mar 2012 12:01:35 +0100
4Subject: [PATCH 23/27] beaglebone: add more beagleboardtoys cape partnumbers
5
6Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7---
8 arch/arm/mach-omap2/board-am335xevm.c | 25 ++++++++++++++++++++++++-
9 1 files changed, 24 insertions(+), 1 deletions(-)
10
11diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
12index 36efca1..58a0e77 100644
13--- a/arch/arm/mach-omap2/board-am335xevm.c
14+++ b/arch/arm/mach-omap2/board-am335xevm.c
15@@ -1883,11 +1883,34 @@ static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context
16 beaglebone_tsadcpins_free = 0;
17 }
18
19+ if (!strncmp("BB-BONE-LCD3-01", cape_config.partnumber, 15)) {
20+ pr_info("BeagleBone cape: initializing LCD cape\n");
21+ bbtoys7lcd_init(0,0);
22+ pr_info("BeagleBone cape: initializing LCD cape touchscreen\n");
23+ tsc_init(0,0);
24+ beaglebone_tsadcpins_free = 0;
25+ }
26+
27+ if (!strncmp("BB-BONE-VGA0-01", cape_config.partnumber, 15)) {
28+ pr_info("BeagleBone cape: initializing VGA cape\n");
29+ dvi_init(0,0);
30+ }
31+
32+ if (!strncmp("BB-BONE-BATT-01", cape_config.partnumber, 15)) {
33+ pr_info("BeagleBone cape: initializing battery cape\n");
34+ //foo_init(0,0);
35+ }
36+
37+ if (!strncmp("BB-BONE-SERL", cape_config.partnumber, 12)) {
38+ pr_info("BeagleBone cape: initializing serial cape\n");
39+ //foo_init(0,0);
40+ }
41+
42 if (!strncmp("TT3201-001", cape_config.partnumber, 10)) {
43 pr_info("BeagleBone cape: initializing CAN cape\n");
44 tt3201_init(0,0);
45 }
46-
47+
48 if ((capecount > 3) && (beaglebone_tsadcpins_free == 1)) {
49 pr_info("BeagleBone cape: exporting ADC pins to sysfs\n");
50 bone_tsc_init(0,0);
51--
521.7.2.5
53
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0024-beaglebone-add-gpio-keys-for-lcd7-add-notes-for-miss.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0024-beaglebone-add-gpio-keys-for-lcd7-add-notes-for-miss.patch
new file mode 100644
index 00000000..f5da1ed7
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0024-beaglebone-add-gpio-keys-for-lcd7-add-notes-for-miss.patch
@@ -0,0 +1,129 @@
1From 58f1b0546b2831d9ed15e8bf43f709085a60b2e9 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Mon, 19 Mar 2012 13:32:43 +0100
4Subject: [PATCH 24/27] beaglebone: add gpio-keys for lcd7, add notes for missing functionality for other capes
5
6Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7---
8 arch/arm/mach-omap2/board-am335xevm.c | 79 +++++++++++++++++++++++++++++++++
9 1 files changed, 79 insertions(+), 0 deletions(-)
10
11diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
12index 58a0e77..7a2b851 100644
13--- a/arch/arm/mach-omap2/board-am335xevm.c
14+++ b/arch/arm/mach-omap2/board-am335xevm.c
15@@ -980,6 +980,73 @@ static void volume_keys_init(int evm_id, int profile)
16 pr_err("failed to register matrix keypad (2x3) device\n");
17 }
18
19+/* pinmux for lcd7 keys */
20+static struct pinmux_config lcd7_keys_pin_mux[] = {
21+ {"gpmc_a0.gpio1_16", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},
22+ {"gpmc_a1.gpio1_17", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},
23+ {"gpmc_a3.gpio1_19", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},
24+ {"mcasp0_axr0.gpio3_16", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},
25+ {NULL, 0},
26+};
27+
28+/* Configure GPIOs for lcd7 keys */
29+static struct gpio_keys_button beaglebone_lcd7_gpio_keys[] = {
30+ {
31+ .code = KEY_LEFT,
32+ .gpio = GPIO_TO_PIN(1, 16),
33+ .active_low = false,
34+ .desc = "left",
35+ .type = EV_KEY,
36+ .wakeup = 1,
37+ },
38+ {
39+ .code = KEY_RIGHT,
40+ .gpio = GPIO_TO_PIN(1, 17),
41+ .active_low = false,
42+ .desc = "right",
43+ .type = EV_KEY,
44+ .wakeup = 1,
45+ },
46+ {
47+ .code = KEY_UP,
48+ .gpio = GPIO_TO_PIN(1, 19),
49+ .active_low = false,
50+ .desc = "up",
51+ .type = EV_KEY,
52+ .wakeup = 1,
53+ },
54+ {
55+ .code = KEY_DOWN,
56+ .gpio = GPIO_TO_PIN(3, 16),
57+ .active_low = false,
58+ .desc = "down",
59+ .type = EV_KEY,
60+ .wakeup = 1,
61+ },
62+};
63+
64+static struct gpio_keys_platform_data beaglebone_lcd7_gpio_key_info = {
65+ .buttons = beaglebone_lcd7_gpio_keys,
66+ .nbuttons = ARRAY_SIZE(beaglebone_lcd7_gpio_keys),
67+};
68+
69+static struct platform_device beaglebone_lcd7_keys = {
70+ .name = "gpio-keys",
71+ .id = -1,
72+ .dev = {
73+ .platform_data = &beaglebone_lcd7_gpio_key_info,
74+ },
75+};
76+
77+static void beaglebone_lcd7_keys_init(int evm_id, int profile)
78+{
79+ int err;
80+ setup_pin_mux(lcd7_keys_pin_mux);
81+ err = platform_device_register(&beaglebone_lcd7_keys);
82+ if (err)
83+ pr_err("failed to register gpio keys for LCD7 cape\n");
84+}
85+
86 /*
87 * @evm_id - evm id which needs to be configured
88 * @dev_cfg - single evm structure which includes
89@@ -1881,6 +1948,8 @@ static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context
90 pr_info("BeagleBone cape: Registering PWM backlight for LCD cape\n");
91 enable_ehrpwm1(0,0);
92 beaglebone_tsadcpins_free = 0;
93+ pr_info("BeagleBone cape: Registering gpio-keys for LCD cape\n");
94+ beaglebone_lcd7_keys_init(0,0);
95 }
96
97 if (!strncmp("BB-BONE-LCD3-01", cape_config.partnumber, 15)) {
98@@ -1889,6 +1958,10 @@ static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context
99 pr_info("BeagleBone cape: initializing LCD cape touchscreen\n");
100 tsc_init(0,0);
101 beaglebone_tsadcpins_free = 0;
102+ // gpio1_16 -> button
103+ // gpio1_17 -> button
104+ // gpio3_19 -> button
105+ // gpio1_28 -> button
106 }
107
108 if (!strncmp("BB-BONE-VGA0-01", cape_config.partnumber, 15)) {
109@@ -1898,11 +1971,17 @@ static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context
110
111 if (!strncmp("BB-BONE-BATT-01", cape_config.partnumber, 15)) {
112 pr_info("BeagleBone cape: initializing battery cape\n");
113+ // gpio1_6, P9_15 lowbat output
114+ // AIN4, P9_33 vbat
115 //foo_init(0,0);
116 }
117
118 if (!strncmp("BB-BONE-SERL", cape_config.partnumber, 12)) {
119 pr_info("BeagleBone cape: initializing serial cape\n");
120+ // 01 -> CAN
121+ // 02 -> Profibus
122+ // 03 -> RS232
123+ // 04 -> RS485
124 //foo_init(0,0);
125 }
126
127--
1281.7.2.5
129
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0025-beaglebone-add-enter-key-for-lcd7-cape.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0025-beaglebone-add-enter-key-for-lcd7-cape.patch
new file mode 100644
index 00000000..7e93d619
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0025-beaglebone-add-enter-key-for-lcd7-cape.patch
@@ -0,0 +1,40 @@
1From 18a371473e99ca637dafe68d9d77ebae4585b873 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Mon, 19 Mar 2012 14:26:37 +0100
4Subject: [PATCH 25/27] beaglebone: add enter key for lcd7 cape
5
6Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7---
8 arch/arm/mach-omap2/board-am335xevm.c | 9 +++++++++
9 1 files changed, 9 insertions(+), 0 deletions(-)
10
11diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
12index 7a2b851..ed2ff18 100644
13--- a/arch/arm/mach-omap2/board-am335xevm.c
14+++ b/arch/arm/mach-omap2/board-am335xevm.c
15@@ -986,6 +986,7 @@ static struct pinmux_config lcd7_keys_pin_mux[] = {
16 {"gpmc_a1.gpio1_17", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},
17 {"gpmc_a3.gpio1_19", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},
18 {"mcasp0_axr0.gpio3_16", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},
19+ {"mcasp0_fsr.gpio3_19", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},
20 {NULL, 0},
21 };
22
23@@ -1023,6 +1024,14 @@ static struct gpio_keys_button beaglebone_lcd7_gpio_keys[] = {
24 .type = EV_KEY,
25 .wakeup = 1,
26 },
27+ {
28+ .code = KEY_ENTER,
29+ .gpio = GPIO_TO_PIN(3, 19),
30+ .active_low = false,
31+ .desc = "enter",
32+ .type = EV_KEY,
33+ .wakeup = 1,
34+ },
35 };
36
37 static struct gpio_keys_platform_data beaglebone_lcd7_gpio_key_info = {
38--
391.7.2.5
40
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0026-beaglebone-add-gpio-keys-for-lcd.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0026-beaglebone-add-gpio-keys-for-lcd.patch
new file mode 100644
index 00000000..2a36c198
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0026-beaglebone-add-gpio-keys-for-lcd.patch
@@ -0,0 +1,113 @@
1From ac98d63f016be414cbb91d283b0ef48f3c7c5b92 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Mon, 19 Mar 2012 15:15:06 +0100
4Subject: [PATCH 26/26] beaglebone: add gpio-keys for lcd
5
6Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7---
8 arch/arm/mach-omap2/board-am335xevm.c | 82 +++++++++++++++++++++++++++++++--
9 1 files changed, 78 insertions(+), 4 deletions(-)
10
11diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
12index ed2ff18..badee96 100644
13--- a/arch/arm/mach-omap2/board-am335xevm.c
14+++ b/arch/arm/mach-omap2/board-am335xevm.c
15@@ -1056,6 +1056,82 @@ static void beaglebone_lcd7_keys_init(int evm_id, int profile)
16 pr_err("failed to register gpio keys for LCD7 cape\n");
17 }
18
19+/* pinmux for lcd3 keys */
20+static struct pinmux_config lcd3_keys_pin_mux[] = {
21+ {"gpmc_a0.gpio1_16", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},
22+ {"gpmc_a1.gpio1_17", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},
23+ {"mcasp0_fsr.gpio3_19", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},
24+ {"gpmc_ben1.gpio1_28", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},
25+ {"ecap0_in_pwm0_out.gpio0_7", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},
26+ {NULL, 0},
27+};
28+
29+/* Configure GPIOs for lcd3 keys */
30+static struct gpio_keys_button beaglebone_lcd3_gpio_keys[] = {
31+ {
32+ .code = KEY_LEFT,
33+ .gpio = GPIO_TO_PIN(1, 16),
34+ .active_low = false,
35+ .desc = "left",
36+ .type = EV_KEY,
37+ .wakeup = 1,
38+ },
39+ {
40+ .code = KEY_RIGHT,
41+ .gpio = GPIO_TO_PIN(1, 17),
42+ .active_low = false,
43+ .desc = "right",
44+ .type = EV_KEY,
45+ .wakeup = 1,
46+ },
47+ {
48+ .code = KEY_UP,
49+ .gpio = GPIO_TO_PIN(3, 19),
50+ .active_low = false,
51+ .desc = "up",
52+ .type = EV_KEY,
53+ .wakeup = 1,
54+ },
55+ {
56+ .code = KEY_DOWN,
57+ .gpio = GPIO_TO_PIN(1, 28),
58+ .active_low = false,
59+ .desc = "down",
60+ .type = EV_KEY,
61+ .wakeup = 1,
62+ },
63+ {
64+ .code = KEY_ENTER,
65+ .gpio = GPIO_TO_PIN(0, 7),
66+ .active_low = false,
67+ .desc = "down",
68+ .type = EV_KEY,
69+ .wakeup = 1,
70+ },
71+};
72+
73+static struct gpio_keys_platform_data beaglebone_lcd3_gpio_key_info = {
74+ .buttons = beaglebone_lcd3_gpio_keys,
75+ .nbuttons = ARRAY_SIZE(beaglebone_lcd3_gpio_keys),
76+};
77+
78+static struct platform_device beaglebone_lcd3_keys = {
79+ .name = "gpio-keys",
80+ .id = -1,
81+ .dev = {
82+ .platform_data = &beaglebone_lcd3_gpio_key_info,
83+ },
84+};
85+
86+static void beaglebone_lcd3_keys_init(int evm_id, int profile)
87+{
88+ int err;
89+ setup_pin_mux(lcd3_keys_pin_mux);
90+ err = platform_device_register(&beaglebone_lcd3_keys);
91+ if (err)
92+ pr_err("failed to register gpio keys for LCD3 cape\n");
93+}
94+
95 /*
96 * @evm_id - evm id which needs to be configured
97 * @dev_cfg - single evm structure which includes
98@@ -1967,10 +2043,8 @@ static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context
99 pr_info("BeagleBone cape: initializing LCD cape touchscreen\n");
100 tsc_init(0,0);
101 beaglebone_tsadcpins_free = 0;
102- // gpio1_16 -> button
103- // gpio1_17 -> button
104- // gpio3_19 -> button
105- // gpio1_28 -> button
106+ pr_info("BeagleBone cape: Registering gpio-keys for LCD cape\n");
107+ beaglebone_lcd3_keys_init(0,0);
108 }
109
110 if (!strncmp("BB-BONE-VGA0-01", cape_config.partnumber, 15)) {
111--
1121.7.2.5
113
diff --git a/recipes-kernel/linux/linux-ti33x-psp_3.2.bb b/recipes-kernel/linux/linux-ti33x-psp_3.2.bb
index 0b54e262..e6277cee 100644
--- a/recipes-kernel/linux/linux-ti33x-psp_3.2.bb
+++ b/recipes-kernel/linux/linux-ti33x-psp_3.2.bb
@@ -12,7 +12,7 @@ MULTI_CONFIG_BASE_SUFFIX = ""
12 12
13BRANCH = "v3.2-staging" 13BRANCH = "v3.2-staging"
14SRCREV = "09e9651bcf2ee8d86685f2a8075bc6557b1d3b91" 14SRCREV = "09e9651bcf2ee8d86685f2a8075bc6557b1d3b91"
15MACHINE_KERNEL_PR_append = "a+gitr${SRCREV}" 15MACHINE_KERNEL_PR_append = "b+gitr${SRCREV}"
16 16
17COMPATIBLE_MACHINE = "(ti33x)" 17COMPATIBLE_MACHINE = "(ti33x)"
18 18
@@ -667,4 +667,8 @@ PATCHES_OVER_PSP = " \
667 file://beaglebone/0020-beaglebone-add-support-for-Towertech-TT3201-CAN-cape.patch \ 667 file://beaglebone/0020-beaglebone-add-support-for-Towertech-TT3201-CAN-cape.patch \
668 file://beaglebone/0021-ARM-OMAP2-am33xx-fix-serial-mux-warnings-for-am33xx.patch \ 668 file://beaglebone/0021-ARM-OMAP2-am33xx-fix-serial-mux-warnings-for-am33xx.patch \
669 file://beaglebone/0022-ARM-OMAP2-am335x-correct-McASP0-pin-mux-detail.patch \ 669 file://beaglebone/0022-ARM-OMAP2-am335x-correct-McASP0-pin-mux-detail.patch \
670 file://beaglebone/0023-beaglebone-add-more-beagleboardtoys-cape-partnumbers.patch \
671 file://beaglebone/0024-beaglebone-add-gpio-keys-for-lcd7-add-notes-for-miss.patch \
672 file://beaglebone/0025-beaglebone-add-enter-key-for-lcd7-cape.patch \
673 file://beaglebone/0026-beaglebone-add-gpio-keys-for-lcd.patch \
670" 674"