summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2012-05-22 14:42:55 +0200
committerDenys Dmytriyenko <denys@ti.com>2012-05-30 13:48:52 -0400
commitd9d51a11b8ff53c5ee7ef12e221479a24e071f13 (patch)
treee455fbfc8f3ce098f33e2a2074b79994571bf02f
parent275240af94608bd4a2b4c2c7a6160a35c69031ed (diff)
downloadmeta-ti-d9d51a11b8ff53c5ee7ef12e221479a24e071f13.tar.gz
linux-ti33x-psp 3.2: i2c and cape fixes
* Fix I2C prescaler to run at full speed instead of 1/4 speed * fix led/spidev/w1 check * move RS232 cape to ttyO2 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/0057-i2c-prescalar-fix-i2c-fixed-prescalar-setting-issue.patch58
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0058-beaglebone-annotate-default-beaglebone-pinmux.patch32
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0059-beaglebone-fix-pin-free-thinko-this-method-doesn-t-g.patch78
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0060-beaglebone-switch-RS232-cape-to-ttyO2.patch29
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0061-beaglebone-make-uart2-pinmux-match-the-uart0-pinmux.patch31
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp_3.2.bb7
6 files changed, 234 insertions, 1 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0057-i2c-prescalar-fix-i2c-fixed-prescalar-setting-issue.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0057-i2c-prescalar-fix-i2c-fixed-prescalar-setting-issue.patch
new file mode 100644
index 00000000..da75695f
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0057-i2c-prescalar-fix-i2c-fixed-prescalar-setting-issue.patch
@@ -0,0 +1,58 @@
1From 2436d7177f75ffa852dc008ce5fe63e92cec963a Mon Sep 17 00:00:00 2001
2From: Al Pacifico <adpacifico@users.sourceforge.net>
3Date: Mon, 21 May 2012 11:50:32 -0700
4Subject: [PATCH 57/61] i2c-prescalar-fix: i2c: fixed prescalar setting issue
5
6Applied Steve's i2c prescalar fix patches.
7See https://groups.google.com/d/msg/beagleboard/Q1pDr1lT7Gk/jvxOxgg8_2MJ
8
9Signed-off-by: Al Pacifico <adpacifico@users.sourceforge.net>
10Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
11---
12 arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 3 ++-
13 drivers/i2c/busses/i2c-omap.c | 2 ++
14 include/linux/i2c-omap.h | 1 +
15 3 files changed, 5 insertions(+), 1 deletions(-)
16
17diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
18index 9d3c9a5..946e6b5 100644
19--- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
20+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
21@@ -1243,7 +1243,8 @@ static struct omap_hwmod_class_sysconfig am33xx_i2c_sysc = {
22
23 static struct omap_i2c_dev_attr i2c_dev_attr = {
24 .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE |
25- OMAP_I2C_FLAG_RESET_REGS_POSTIDLE,
26+ OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
27+ OMAP_I2C_FLAG_FORCE_12000_INT_CLK,
28 };
29
30 static struct omap_hwmod_class i2c_class = {
31diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
32index e0733b7..0ca6960 100644
33--- a/drivers/i2c/busses/i2c-omap.c
34+++ b/drivers/i2c/busses/i2c-omap.c
35@@ -408,6 +408,8 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)
36 if (dev->speed > 400 ||
37 pdata->flags & OMAP_I2C_FLAG_FORCE_19200_INT_CLK)
38 internal_clk = 19200;
39+ else if (pdata->flags & OMAP_I2C_FLAG_FORCE_12000_INT_CLK)
40+ internal_clk = 12000;
41 else if (dev->speed > 100)
42 internal_clk = 9600;
43 else
44diff --git a/include/linux/i2c-omap.h b/include/linux/i2c-omap.h
45index fd38249..818f5bf 100644
46--- a/include/linux/i2c-omap.h
47+++ b/include/linux/i2c-omap.h
48@@ -24,6 +24,7 @@
49 #define OMAP_I2C_FLAG_APPLY_ERRATA_I207 BIT(4)
50 #define OMAP_I2C_FLAG_ALWAYS_ARMXOR_CLK BIT(5)
51 #define OMAP_I2C_FLAG_FORCE_19200_INT_CLK BIT(6)
52+#define OMAP_I2C_FLAG_FORCE_12000_INT_CLK BIT(9)
53 /* how the CPU address bus must be translated for I2C unit access */
54 #define OMAP_I2C_FLAG_BUS_SHIFT_NONE 0
55 #define OMAP_I2C_FLAG_BUS_SHIFT_1 BIT(7)
56--
571.7.7.6
58
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0058-beaglebone-annotate-default-beaglebone-pinmux.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0058-beaglebone-annotate-default-beaglebone-pinmux.patch
new file mode 100644
index 00000000..66fb0de7
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0058-beaglebone-annotate-default-beaglebone-pinmux.patch
@@ -0,0 +1,32 @@
1From 178d60b5a56c1f8eff29d23c27cc14bc6c0a9e4c Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Tue, 22 May 2012 10:58:53 +0200
4Subject: [PATCH 58/61] beaglebone: annotate default beaglebone pinmux
5
6Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7---
8 arch/arm/mach-omap2/board-am335xevm.c | 8 ++++----
9 1 files changed, 4 insertions(+), 4 deletions(-)
10
11diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
12index 68ddfe2..b079279 100644
13--- a/arch/arm/mach-omap2/board-am335xevm.c
14+++ b/arch/arm/mach-omap2/board-am335xevm.c
15@@ -1431,10 +1431,10 @@ static struct platform_device lcd7_leds_gpio = {
16
17 static struct pinmux_config bone_pin_mux[] = {
18 /* User LED gpios (gpio1_21 to gpio1_24) */
19- {"gpmc_a5.rgmii2_td0", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT},
20- {"gpmc_a6.rgmii2_tclk", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT},
21- {"gpmc_a7.rgmii2_rclk", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT},
22- {"gpmc_a8.rgmii2_rd3", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT},
23+ {"gpmc_a5.rgmii2_td0", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // USR0
24+ {"gpmc_a6.rgmii2_tclk", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // USR1
25+ {"gpmc_a7.rgmii2_rclk", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // USR2
26+ {"gpmc_a8.rgmii2_rd3", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // USR3
27 /* Grounding gpio1_6 (pin 3 Conn A) signals bone tester to start diag tests */
28 {"gpmc_ad6.gpio1_6", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT_PULLUP},
29 {NULL, 0},
30--
311.7.7.6
32
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0059-beaglebone-fix-pin-free-thinko-this-method-doesn-t-g.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0059-beaglebone-fix-pin-free-thinko-this-method-doesn-t-g.patch
new file mode 100644
index 00000000..1b55abff
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0059-beaglebone-fix-pin-free-thinko-this-method-doesn-t-g.patch
@@ -0,0 +1,78 @@
1From f0f728e400d0512788e59a2d7a17e3aa8584c033 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Tue, 22 May 2012 11:00:00 +0200
4Subject: [PATCH 59/61] beaglebone: fix pin-free thinko, this method doesn't
5 get called when there's a cape at 0x57
6
7Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
8---
9 arch/arm/mach-omap2/board-am335xevm.c | 46 +++++++++++++++------------------
10 1 files changed, 21 insertions(+), 25 deletions(-)
11
12diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
13index b079279..dfe8df5 100644
14--- a/arch/arm/mach-omap2/board-am335xevm.c
15+++ b/arch/arm/mach-omap2/board-am335xevm.c
16@@ -2542,25 +2542,6 @@ static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context
17 ret = mem_acc->read(mem_acc, (char *)&cape_config, 0, sizeof(cape_config));
18 if (ret != sizeof(cape_config)) {
19 pr_warning("BeagleBone cape EEPROM: could not read eeprom at address 0x%x\n", capecount + 0x53);
20- if (capecount > 3) {
21- if (beaglebone_tsadcpins_free == 1) {
22- pr_info("BeagleBone cape: exporting ADC pins to sysfs\n");
23- bone_tsc_init(0,0);
24- beaglebone_tsadcpins_free = 0;
25- }
26- if (beaglebone_leds_free == 1) {
27- boneleds_init(0,0);
28- }
29- if(beaglebone_spi1_free == 1) {
30- beaglebone_spi1_free = 0;
31- pr_info("BeagleBone cape: exporting SPI pins as spidev\n");
32- setup_pin_mux(spi1_pin_mux);
33- spi_register_board_info(bone_spidev2_info, ARRAY_SIZE(bone_spidev2_info));
34- }
35- if(beaglebone_w1gpio_free == 1) {
36- bonew1_gpio_init(0,0);
37- }
38- }
39 return;
40 }
41
42@@ -2693,12 +2674,27 @@ static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context
43 pr_info("BeagleBone cape: recognized Camera cape\n");
44 beaglebone_w1gpio_free = 0;
45 }
46-
47- if ((capecount > 3) && (beaglebone_tsadcpins_free == 1)) {
48- pr_info("BeagleBone cape: exporting ADC pins to sysfs\n");
49- bone_tsc_init(0,0);
50- beaglebone_tsadcpins_free = 0;
51- }
52+
53+ if (capecount > 3) {
54+ if (beaglebone_tsadcpins_free == 1) {
55+ pr_info("BeagleBone cape: exporting ADC pins to sysfs\n");
56+ bone_tsc_init(0,0);
57+ beaglebone_tsadcpins_free = 0;
58+ }
59+ if (beaglebone_leds_free == 1) {
60+ pr_info("Beaglebone: initializing onboard LEDs");
61+ boneleds_init(0,0);
62+ }
63+ if(beaglebone_spi1_free == 1) {
64+ beaglebone_spi1_free = 0;
65+ pr_info("BeagleBone cape: exporting SPI pins as spidev\n");
66+ setup_pin_mux(spi1_pin_mux);
67+ spi_register_board_info(bone_spidev2_info, ARRAY_SIZE(bone_spidev2_info));
68+ }
69+ if(beaglebone_w1gpio_free == 1) {
70+ bonew1_gpio_init(0,0);
71+ }
72+ }
73
74 return;
75 out:
76--
771.7.7.6
78
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0060-beaglebone-switch-RS232-cape-to-ttyO2.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0060-beaglebone-switch-RS232-cape-to-ttyO2.patch
new file mode 100644
index 00000000..063b2b31
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0060-beaglebone-switch-RS232-cape-to-ttyO2.patch
@@ -0,0 +1,29 @@
1From b594d005ab1e622b9c3cbf45c2699dde4af3706f Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Tue, 22 May 2012 11:00:35 +0200
4Subject: [PATCH 60/61] beaglebone: switch RS232 cape to ttyO2
5
6Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7---
8 arch/arm/mach-omap2/board-am335xevm.c | 5 +++--
9 1 files changed, 3 insertions(+), 2 deletions(-)
10
11diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
12index dfe8df5..5902df0 100644
13--- a/arch/arm/mach-omap2/board-am335xevm.c
14+++ b/arch/arm/mach-omap2/board-am335xevm.c
15@@ -2657,8 +2657,9 @@ static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context
16 }
17 if (!strncmp("BB-BONE-SERL-03", cape_config.partnumber, 15)) {
18 pr_info("BeagleBone cape: initializing RS232 cape\n");
19- pr_info("BeagleBone cape: only uart1 is supported!\n");
20- setup_pin_mux(uart1_pin_mux);
21+ pr_info("BeagleBone RS232 cape: only uart2/ttyO2 is supported.\n");
22+ pr_info("BeagleBone RS232 cape: Jumper J27 and J23.\n");
23+ setup_pin_mux(uart2_pin_mux);
24 }
25 if (!strncmp("BB-BONE-SERL-04", cape_config.partnumber, 15)) {
26 pr_info("BeagleBone cape: not initializing RS485 cape\n");
27--
281.7.7.6
29
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0061-beaglebone-make-uart2-pinmux-match-the-uart0-pinmux.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0061-beaglebone-make-uart2-pinmux-match-the-uart0-pinmux.patch
new file mode 100644
index 00000000..91f324c1
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0061-beaglebone-make-uart2-pinmux-match-the-uart0-pinmux.patch
@@ -0,0 +1,31 @@
1From 9c7b14dcac75a1c6456e2cd4ae3e1737ed1c5f47 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Tue, 22 May 2012 12:25:33 +0200
4Subject: [PATCH 61/61] beaglebone: make uart2 pinmux match the uart0 pinmux
5
6Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7---
8 arch/arm/mach-omap2/board-am335xevm.c | 7 ++-----
9 1 files changed, 2 insertions(+), 5 deletions(-)
10
11diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
12index 5902df0..e8ce381 100644
13--- a/arch/arm/mach-omap2/board-am335xevm.c
14+++ b/arch/arm/mach-omap2/board-am335xevm.c
15@@ -885,11 +885,8 @@ static struct pinmux_config uart1_pin_mux[] = {
16
17 /* Module pin mux for uart2 */
18 static struct pinmux_config uart2_pin_mux[] = {
19- {"spi0_sclk.uart2_rxd", OMAP_MUX_MODE1 | AM33XX_SLEWCTRL_SLOW |
20- AM33XX_PIN_INPUT_PULLUP},
21- {"spi0_d0.uart2_txd", OMAP_MUX_MODE1 | AM33XX_PULL_UP |
22- AM33XX_PULL_DISA |
23- AM33XX_SLEWCTRL_SLOW},
24+ {"spi0_d0.uart2_txd", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT},
25+ {"spi0_sclk.uart2_rxd", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP},
26 {NULL, 0},
27 };
28
29--
301.7.7.6
31
diff --git a/recipes-kernel/linux/linux-ti33x-psp_3.2.bb b/recipes-kernel/linux/linux-ti33x-psp_3.2.bb
index 82fa5ebe..7df217d0 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 = "720e07b4c1f687b61b147b31c698cb6816d72f01" 14SRCREV = "720e07b4c1f687b61b147b31c698cb6816d72f01"
15MACHINE_KERNEL_PR_append = "n+gitr${SRCREV}" 15MACHINE_KERNEL_PR_append = "o+gitr${SRCREV}"
16 16
17COMPATIBLE_MACHINE = "(ti33x)" 17COMPATIBLE_MACHINE = "(ti33x)"
18 18
@@ -992,4 +992,9 @@ PATCHES_OVER_PSP = " \
992 file://beaglebone/0054-Workaround-for-boards-with-mistaken-ASCII-interpreta.patch \ 992 file://beaglebone/0054-Workaround-for-boards-with-mistaken-ASCII-interpreta.patch \
993 file://beaglebone/0055-Workaround-for-EEPROM-contents-blocking-further-I2C-.patch \ 993 file://beaglebone/0055-Workaround-for-EEPROM-contents-blocking-further-I2C-.patch \
994 file://beaglebone/0056-Added-check-on-EEPROM-revision-to-prevent-interpreti.patch \ 994 file://beaglebone/0056-Added-check-on-EEPROM-revision-to-prevent-interpreti.patch \
995 file://beaglebone/0057-i2c-prescalar-fix-i2c-fixed-prescalar-setting-issue.patch \
996 file://beaglebone/0058-beaglebone-annotate-default-beaglebone-pinmux.patch \
997 file://beaglebone/0059-beaglebone-fix-pin-free-thinko-this-method-doesn-t-g.patch \
998 file://beaglebone/0060-beaglebone-switch-RS232-cape-to-ttyO2.patch \
999 file://beaglebone/0061-beaglebone-make-uart2-pinmux-match-the-uart0-pinmux.patch \
995" 1000"