summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2012-05-04 13:29:46 +0200
committerDenys Dmytriyenko <denys@ti.com>2012-05-10 15:33:43 -0400
commit8f53db29b99e79f3e0e82bfc75a0a58741c9145b (patch)
treeea9fa02f209331f1255d9c9312b7a907810df04a
parent1af87d9126c541cb890c46bb8fd98b4d8d796bd6 (diff)
downloadmeta-ti-8f53db29b99e79f3e0e82bfc75a0a58741c9145b.tar.gz
linux-ti335x-psp 3.2: add support for CAN, RS232 and Battery beaglebone capes
Also change defconfig to prepare for audio support and fix lcd35 pinmux 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/0033-beaglebone-fix-3.5-cape-support.patch73
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0034-beaglebone-connect-batterycape-GPIO-to-gpio-charger.patch84
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0035-beaglebone-add-support-for-CAN-and-RS232-cape.patch67
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/defconfig21
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp_3.2.bb5
5 files changed, 238 insertions, 12 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0033-beaglebone-fix-3.5-cape-support.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0033-beaglebone-fix-3.5-cape-support.patch
new file mode 100644
index 00000000..caee6fcf
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0033-beaglebone-fix-3.5-cape-support.patch
@@ -0,0 +1,73 @@
1From d698dff8ded6583a447d81362534bacf77b8cbe5 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Thu, 19 Apr 2012 14:33:53 +0200
4Subject: [PATCH 33/35] beaglebone: fix 3.5" cape support
5
6Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7---
8 arch/arm/mach-omap2/board-am335xevm.c | 42 ++++++++++++++++++++++++++++++++-
9 1 files changed, 41 insertions(+), 1 deletions(-)
10
11diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
12index 08a0425..7a4b766 100644
13--- a/arch/arm/mach-omap2/board-am335xevm.c
14+++ b/arch/arm/mach-omap2/board-am335xevm.c
15@@ -597,6 +597,46 @@ static struct pinmux_config dvi_pin_mux[] = {
16 {NULL, 0},
17 };
18
19+/* Module pin mux for Beagleboardtoys 3.5" LCD cape */
20+static struct pinmux_config bbtoys35_pin_mux[] = {
21+ {"lcd_data0.lcd_data0", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
22+ | AM33XX_PULL_DISA},
23+ {"lcd_data1.lcd_data1", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
24+ | AM33XX_PULL_DISA},
25+ {"lcd_data2.lcd_data2", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
26+ | AM33XX_PULL_DISA},
27+ {"lcd_data3.lcd_data3", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
28+ | AM33XX_PULL_DISA},
29+ {"lcd_data4.lcd_data4", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
30+ | AM33XX_PULL_DISA},
31+ {"lcd_data5.lcd_data5", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
32+ | AM33XX_PULL_DISA},
33+ {"lcd_data6.lcd_data6", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
34+ | AM33XX_PULL_DISA},
35+ {"lcd_data7.lcd_data7", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
36+ | AM33XX_PULL_DISA},
37+ {"lcd_data8.lcd_data8", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
38+ | AM33XX_PULL_DISA},
39+ {"lcd_data9.lcd_data9", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
40+ | AM33XX_PULL_DISA},
41+ {"lcd_data10.lcd_data10", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
42+ | AM33XX_PULL_DISA},
43+ {"lcd_data11.lcd_data11", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
44+ | AM33XX_PULL_DISA},
45+ {"lcd_data12.lcd_data12", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
46+ | AM33XX_PULL_DISA},
47+ {"lcd_data13.lcd_data13", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
48+ | AM33XX_PULL_DISA},
49+ {"lcd_data14.lcd_data14", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
50+ | AM33XX_PULL_DISA},
51+ {"lcd_data15.lcd_data15", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
52+ | AM33XX_PULL_DISA},
53+ {"lcd_vsync.lcd_vsync", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
54+ {"lcd_hsync.lcd_hsync", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
55+ {"lcd_pclk.lcd_pclk", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
56+ {"lcd_ac_bias_en.lcd_ac_bias_en", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
57+ {NULL, 0},
58+};
59 /* Module pin mux for Beagleboardtoys 7" LCD cape */
60 static struct pinmux_config bbtoys7_pin_mux[] = {
61 {"lcd_data0.lcd_data0", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
62@@ -1512,7 +1552,7 @@ static void bbtoys7lcd_init(int evm_id, int profile)
63
64 static void bbtoys35lcd_init(int evm_id, int profile)
65 {
66- setup_pin_mux(bbtoys7_pin_mux);
67+ setup_pin_mux(bbtoys35_pin_mux);
68
69 // we are being stupid and setting pixclock from here instead of da8xx-fb.c
70 if (conf_disp_pll(16000000)) {
71--
721.7.7.6
73
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0034-beaglebone-connect-batterycape-GPIO-to-gpio-charger.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0034-beaglebone-connect-batterycape-GPIO-to-gpio-charger.patch
new file mode 100644
index 00000000..0a3c70ab
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0034-beaglebone-connect-batterycape-GPIO-to-gpio-charger.patch
@@ -0,0 +1,84 @@
1From 759b49957081a1ccecf7302efc85c5141d00fe69 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Wed, 25 Apr 2012 12:35:07 +0200
4Subject: [PATCH 34/35] beaglebone: connect batterycape GPIO to gpio-charger
5
6Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7---
8 arch/arm/mach-omap2/board-am335xevm.c | 46 ++++++++++++++++++++++++++++++++-
9 1 files changed, 45 insertions(+), 1 deletions(-)
10
11diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
12index 7a4b766..2bc9b14 100644
13--- a/arch/arm/mach-omap2/board-am335xevm.c
14+++ b/arch/arm/mach-omap2/board-am335xevm.c
15@@ -133,6 +133,36 @@ static const struct display_panel disp_panel = {
16 COLOR_ACTIVE,
17 };
18
19+
20+#if defined(CONFIG_CHARGER_GPIO)
21+
22+#include <linux/power_supply.h>
23+#include <linux/power/gpio-charger.h>
24+
25+/* charger */
26+static char *beaglebone_batteries[] = {
27+ "battery",
28+};
29+
30+static struct gpio_charger_platform_data beaglebone_charger_pdata = {
31+ .name = "battery-cape",
32+ .type = POWER_SUPPLY_TYPE_BATTERY,
33+ .gpio = GPIO_TO_PIN(1,16),
34+ .gpio_active_low = 0,
35+ .supplied_to = beaglebone_batteries,
36+ .num_supplicants = ARRAY_SIZE(beaglebone_batteries),
37+};
38+
39+static struct platform_device beaglebone_charger_device = {
40+ .name = "gpio-charger",
41+ .dev = {
42+ .platform_data = &beaglebone_charger_pdata,
43+ },
44+};
45+
46+#endif /* gpio-charger */
47+
48+
49 /* LCD backlight platform Data */
50 #define AM335X_BACKLIGHT_MAX_BRIGHTNESS 100
51 #define AM335X_BACKLIGHT_DEFAULT_BRIGHTNESS 50
52@@ -504,6 +534,13 @@ static struct pinmux_config haptics_pin_mux[] = {
53 {NULL, 0},
54 };
55
56+/* Module pin mux for battery cape */
57+static struct pinmux_config batterycape_pin_mux[] = {
58+ {"gpmc_a0.gpio1_16", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},
59+ {NULL, 0},
60+};
61+
62+
63 /* Module pin mux for LCDC */
64 static struct pinmux_config lcdc_pin_mux[] = {
65 {"lcd_data0.lcd_data0", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
66@@ -2201,7 +2238,14 @@ static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context
67 pr_info("BeagleBone cape: initializing battery cape\n");
68 // gpio1_6, P9_15 lowbat output
69 // AIN4, P9_33 vbat
70- //foo_init(0,0);
71+ setup_pin_mux(batterycape_pin_mux);
72+ #if defined(CONFIG_CHARGER_GPIO)
73+ int err;
74+ err = platform_device_register(&beaglebone_charger_device);
75+ if (err)
76+ pr_err("failed to register BeagleBone battery cape gpio\n");
77+
78+ #endif
79 }
80
81 if (!strncmp("BB-BONE-SERL", cape_config.partnumber, 12)) {
82--
831.7.7.6
84
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0035-beaglebone-add-support-for-CAN-and-RS232-cape.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0035-beaglebone-add-support-for-CAN-and-RS232-cape.patch
new file mode 100644
index 00000000..caf5ad37
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0035-beaglebone-add-support-for-CAN-and-RS232-cape.patch
@@ -0,0 +1,67 @@
1From caa3254ea2054e6b5cf6a5c52002dfeba6aa3f4c Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Fri, 4 May 2012 13:19:45 +0200
4Subject: [PATCH 35/35] beaglebone: add support for CAN and RS232 cape
5
6Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7---
8 arch/arm/mach-omap2/board-am335xevm.c | 36 +++++++++++++++++++++++++++-----
9 1 files changed, 30 insertions(+), 6 deletions(-)
10
11diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
12index 2bc9b14..66d7613 100644
13--- a/arch/arm/mach-omap2/board-am335xevm.c
14+++ b/arch/arm/mach-omap2/board-am335xevm.c
15@@ -951,6 +951,18 @@ static struct pinmux_config tt3201_pin_mux[] = {
16 {NULL, 0},
17 };
18
19+static struct pinmux_config uart1dcan1_pin_mux[] = {
20+ {"uart1_rxd.d_can1_tx", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT },
21+ {"uart1_txd.d_can1_rx", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLUP },
22+ {NULL, 0},
23+};
24+
25+static struct pinmux_config uart1_pin_mux[] = {
26+ {"uart1_txd.uart1_txd", OMAP_MUX_MODE0 | AM33XX_PULL_ENBL},
27+ {"uart1_rxd.uart1_rxd", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
28+ {NULL, 0},
29+};
30+
31 /* Module pin mux for uart2 */
32 static struct pinmux_config uart2_pin_mux[] = {
33 {"spi0_sclk.uart2_rxd", OMAP_MUX_MODE1 | AM33XX_SLEWCTRL_SLOW |
34@@ -2248,12 +2260,24 @@ static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context
35 #endif
36 }
37
38- if (!strncmp("BB-BONE-SERL", cape_config.partnumber, 12)) {
39- pr_info("BeagleBone cape: initializing serial cape\n");
40- // 01 -> CAN
41- // 02 -> Profibus
42- // 03 -> RS232
43- // 04 -> RS485
44+ if (!strncmp("BB-BONE-SERL-01", cape_config.partnumber, 15)) {
45+ pr_info("BeagleBone cape: initializing CAN cape\n");
46+ setup_pin_mux(uart1dcan1_pin_mux);
47+ am33xx_d_can_init(1);
48+ }
49+ if (!strncmp("BB-BONE-SERL-02", cape_config.partnumber, 15)) {
50+ pr_info("BeagleBone cape: not initializing Profibus cape\n");
51+ // gpio1_0
52+ // gpio1_4
53+ //foo_init(0,0);
54+ }
55+ if (!strncmp("BB-BONE-SERL-03", cape_config.partnumber, 15)) {
56+ pr_info("BeagleBone cape: initializing RS232 cape\n");
57+ pr_info("BeagleBone cape: only uart1 is supported!\n");
58+ setup_pin_mux(uart1_pin_mux);
59+ }
60+ if (!strncmp("BB-BONE-SERL-04", cape_config.partnumber, 15)) {
61+ pr_info("BeagleBone cape: not initializing RS485 cape\n");
62 //foo_init(0,0);
63 }
64
65--
661.7.7.6
67
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/defconfig b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/defconfig
index 09128754..c5e447fc 100644
--- a/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/defconfig
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/defconfig
@@ -1657,7 +1657,7 @@ CONFIG_W1_SLAVE_BQ27000=m
1657CONFIG_POWER_SUPPLY=y 1657CONFIG_POWER_SUPPLY=y
1658# CONFIG_POWER_SUPPLY_DEBUG is not set 1658# CONFIG_POWER_SUPPLY_DEBUG is not set
1659# CONFIG_PDA_POWER is not set 1659# CONFIG_PDA_POWER is not set
1660# CONFIG_TEST_POWER is not set 1660CONFIG_TEST_POWER=m
1661# CONFIG_BATTERY_DS2760 is not set 1661# CONFIG_BATTERY_DS2760 is not set
1662# CONFIG_BATTERY_DS2780 is not set 1662# CONFIG_BATTERY_DS2780 is not set
1663# CONFIG_BATTERY_DS2782 is not set 1663# CONFIG_BATTERY_DS2782 is not set
@@ -1668,7 +1668,7 @@ CONFIG_POWER_SUPPLY=y
1668# CONFIG_CHARGER_ISP1704 is not set 1668# CONFIG_CHARGER_ISP1704 is not set
1669# CONFIG_CHARGER_MAX8903 is not set 1669# CONFIG_CHARGER_MAX8903 is not set
1670# CONFIG_CHARGER_TWL4030 is not set 1670# CONFIG_CHARGER_TWL4030 is not set
1671# CONFIG_CHARGER_GPIO is not set 1671CONFIG_CHARGER_GPIO=y
1672CONFIG_HWMON=y 1672CONFIG_HWMON=y
1673CONFIG_HWMON_VID=m 1673CONFIG_HWMON_VID=m
1674# CONFIG_HWMON_DEBUG_CHIP is not set 1674# CONFIG_HWMON_DEBUG_CHIP is not set
@@ -1858,19 +1858,19 @@ CONFIG_REGULATOR=y
1858# CONFIG_REGULATOR_DEBUG is not set 1858# CONFIG_REGULATOR_DEBUG is not set
1859CONFIG_REGULATOR_DUMMY=y 1859CONFIG_REGULATOR_DUMMY=y
1860CONFIG_REGULATOR_FIXED_VOLTAGE=y 1860CONFIG_REGULATOR_FIXED_VOLTAGE=y
1861CONFIG_REGULATOR_VIRTUAL_CONSUMER=y 1861# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
1862CONFIG_REGULATOR_USERSPACE_CONSUMER=y 1862# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
1863CONFIG_REGULATOR_GPIO=y 1863CONFIG_REGULATOR_GPIO=y
1864# CONFIG_REGULATOR_BQ24022 is not set 1864# CONFIG_REGULATOR_BQ24022 is not set
1865# CONFIG_REGULATOR_MAX1586 is not set 1865# CONFIG_REGULATOR_MAX1586 is not set
1866# CONFIG_REGULATOR_MAX8649 is not set 1866# CONFIG_REGULATOR_MAX8649 is not set
1867# CONFIG_REGULATOR_MAX8660 is not set 1867# CONFIG_REGULATOR_MAX8660 is not set
1868# CONFIG_REGULATOR_MAX8952 is not set 1868# CONFIG_REGULATOR_MAX8952 is not set
1869CONFIG_REGULATOR_TWL4030=y 1869# CONFIG_REGULATOR_TWL4030 is not set
1870# CONFIG_REGULATOR_LP3971 is not set 1870# CONFIG_REGULATOR_LP3971 is not set
1871# CONFIG_REGULATOR_LP3972 is not set 1871# CONFIG_REGULATOR_LP3972 is not set
1872CONFIG_REGULATOR_TPS65023=y 1872# CONFIG_REGULATOR_TPS65023 is not set
1873CONFIG_REGULATOR_TPS6507X=y 1873# CONFIG_REGULATOR_TPS6507X is not set
1874CONFIG_REGULATOR_TPS65217=y 1874CONFIG_REGULATOR_TPS65217=y
1875# CONFIG_REGULATOR_ISL6271A is not set 1875# CONFIG_REGULATOR_ISL6271A is not set
1876# CONFIG_REGULATOR_AD5398 is not set 1876# CONFIG_REGULATOR_AD5398 is not set
@@ -2452,12 +2452,12 @@ CONFIG_SND_USB_AUDIO=y
2452CONFIG_SND_SOC=y 2452CONFIG_SND_SOC=y
2453# CONFIG_SND_SOC_CACHE_LZO is not set 2453# CONFIG_SND_SOC_CACHE_LZO is not set
2454CONFIG_SND_AM33XX_SOC=y 2454CONFIG_SND_AM33XX_SOC=y
2455CONFIG_SND_DAVINCI_SOC_MCASP=m 2455CONFIG_SND_DAVINCI_SOC_MCASP=y
2456CONFIG_SND_AM335X_SOC_EVM=m 2456CONFIG_SND_AM335X_SOC_EVM=y
2457# CONFIG_SND_OMAP_SOC is not set 2457# CONFIG_SND_OMAP_SOC is not set
2458CONFIG_SND_SOC_I2C_AND_SPI=y 2458CONFIG_SND_SOC_I2C_AND_SPI=y
2459# CONFIG_SND_SOC_ALL_CODECS is not set 2459# CONFIG_SND_SOC_ALL_CODECS is not set
2460CONFIG_SND_SOC_TLV320AIC3X=m 2460CONFIG_SND_SOC_TLV320AIC3X=y
2461# CONFIG_SOUND_PRIME is not set 2461# CONFIG_SOUND_PRIME is not set
2462CONFIG_HID_SUPPORT=y 2462CONFIG_HID_SUPPORT=y
2463CONFIG_HID=y 2463CONFIG_HID=y
@@ -2764,7 +2764,6 @@ CONFIG_USB_G_WEBCAM=m
2764CONFIG_USB_OTG_UTILS=y 2764CONFIG_USB_OTG_UTILS=y
2765# CONFIG_USB_GPIO_VBUS is not set 2765# CONFIG_USB_GPIO_VBUS is not set
2766# CONFIG_USB_ULPI is not set 2766# CONFIG_USB_ULPI is not set
2767# CONFIG_TWL4030_USB is not set
2768# CONFIG_TWL6030_USB is not set 2767# CONFIG_TWL6030_USB is not set
2769CONFIG_NOP_USB_XCEIV=y 2768CONFIG_NOP_USB_XCEIV=y
2770CONFIG_MMC=y 2769CONFIG_MMC=y
diff --git a/recipes-kernel/linux/linux-ti33x-psp_3.2.bb b/recipes-kernel/linux/linux-ti33x-psp_3.2.bb
index 70dd7be7..954e5cad 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 = "0d0567b6c1a61a374120b985559768077c511a6d" 14SRCREV = "0d0567b6c1a61a374120b985559768077c511a6d"
15MACHINE_KERNEL_PR_append = "a+gitr${SRCREV}" 15MACHINE_KERNEL_PR_append = "c+gitr${SRCREV}"
16 16
17COMPATIBLE_MACHINE = "(ti33x)" 17COMPATIBLE_MACHINE = "(ti33x)"
18 18
@@ -956,4 +956,7 @@ PATCHES_OVER_PSP = " \
956 file://beaglebone/0030-beaglebone-don-t-compare-undefined-characters-it-mak.patch \ 956 file://beaglebone/0030-beaglebone-don-t-compare-undefined-characters-it-mak.patch \
957 file://beaglebone/0031-omap2-irq-process-all-4-irq-banks-for-am335x.patch \ 957 file://beaglebone/0031-omap2-irq-process-all-4-irq-banks-for-am335x.patch \
958 file://beaglebone/0032-omap2-irqs.h-increase-number-or-irq-banks.patch \ 958 file://beaglebone/0032-omap2-irqs.h-increase-number-or-irq-banks.patch \
959 file://beaglebone/0033-beaglebone-fix-3.5-cape-support.patch \
960 file://beaglebone/0034-beaglebone-connect-batterycape-GPIO-to-gpio-charger.patch \
961 file://beaglebone/0035-beaglebone-add-support-for-CAN-and-RS232-cape.patch \
959" 962"