diff options
22 files changed, 974 insertions, 36 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/0001-f_rndis-HACK-around-undefined-variables.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/0001-f_rndis-HACK-around-undefined-variables.patch index 73a61dab..c2dc8524 100644 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/0001-f_rndis-HACK-around-undefined-variables.patch +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/0001-f_rndis-HACK-around-undefined-variables.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From d26b2d246668587049b1362a42c9b829f2ca288a Mon Sep 17 00:00:00 2001 | 1 | From d26b2d246668587049b1362a42c9b829f2ca288a Mon Sep 17 00:00:00 2001 |
2 | From: Koen Kooi <koen@dominion.thruhere.net> | 2 | From: Koen Kooi <koen@dominion.thruhere.net> |
3 | Date: Fri, 7 Oct 2011 15:29:28 +0200 | 3 | Date: Fri, 7 Oct 2011 15:29:28 +0200 |
4 | Subject: [PATCH 01/16] f_rndis: HACK around undefined variables | 4 | Subject: [PATCH 01/21] f_rndis: HACK around undefined variables |
5 | 5 | ||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | 6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> |
7 | --- | 7 | --- |
@@ -27,5 +27,5 @@ index 6614490..d2f1b6f 100644 | |||
27 | * the network link ... which is unavailable to this code | 27 | * the network link ... which is unavailable to this code |
28 | * until we're activated via set_alt(). | 28 | * until we're activated via set_alt(). |
29 | -- | 29 | -- |
30 | 1.7.7.5 | 30 | 1.7.7.4 |
31 | 31 | ||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/0002-da8xx-fb-add-DVI-support-for-beaglebone.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/0002-da8xx-fb-add-DVI-support-for-beaglebone.patch index c3b3da83..5a42aeaf 100644 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/0002-da8xx-fb-add-DVI-support-for-beaglebone.patch +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/0002-da8xx-fb-add-DVI-support-for-beaglebone.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 0188ea8b0633815f9ed9a728a6a1a53d64c1093c Mon Sep 17 00:00:00 2001 | 1 | From 0188ea8b0633815f9ed9a728a6a1a53d64c1093c Mon Sep 17 00:00:00 2001 |
2 | From: Koen Kooi <koen@dominion.thruhere.net> | 2 | From: Koen Kooi <koen@dominion.thruhere.net> |
3 | Date: Thu, 3 Nov 2011 17:35:50 +0100 | 3 | Date: Thu, 3 Nov 2011 17:35:50 +0100 |
4 | Subject: [PATCH 02/16] da8xx-fb: add DVI support for beaglebone | 4 | Subject: [PATCH 02/21] da8xx-fb: add DVI support for beaglebone |
5 | 5 | ||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | 6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> |
7 | --- | 7 | --- |
@@ -34,5 +34,5 @@ index 85eda33..dea8936 100644 | |||
34 | 34 | ||
35 | /* Enable the Raster Engine of the LCD Controller */ | 35 | /* Enable the Raster Engine of the LCD Controller */ |
36 | -- | 36 | -- |
37 | 1.7.7.5 | 37 | 1.7.7.4 |
38 | 38 | ||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/0003-arm-omap-mux33xx-Add-i2c2-pin-mux.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/0003-arm-omap-mux33xx-Add-i2c2-pin-mux.patch index 5d972f11..808868a4 100644 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/0003-arm-omap-mux33xx-Add-i2c2-pin-mux.patch +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/0003-arm-omap-mux33xx-Add-i2c2-pin-mux.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 11622554369db32c7c14572efb525ef5e418338d Mon Sep 17 00:00:00 2001 | 1 | From 11622554369db32c7c14572efb525ef5e418338d Mon Sep 17 00:00:00 2001 |
2 | From: Koen Kooi <koen@dominion.thruhere.net> | 2 | From: Koen Kooi <koen@dominion.thruhere.net> |
3 | Date: Tue, 31 Jan 2012 10:21:32 +0100 | 3 | Date: Tue, 31 Jan 2012 10:21:32 +0100 |
4 | Subject: [PATCH 03/16] arm:omap:mux33xx: Add i2c2 pin mux | 4 | Subject: [PATCH 03/21] arm:omap:mux33xx: Add i2c2 pin mux |
5 | 5 | ||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | 6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> |
7 | --- | 7 | --- |
@@ -26,5 +26,5 @@ index 81a657e..36bb10a 100644 | |||
26 | _AM33XX_MUXENTRY(UART1_RXD, 0, | 26 | _AM33XX_MUXENTRY(UART1_RXD, 0, |
27 | "uart1_rxd", "mmc1_sdwp", NULL, NULL, | 27 | "uart1_rxd", "mmc1_sdwp", NULL, NULL, |
28 | -- | 28 | -- |
29 | 1.7.7.5 | 29 | 1.7.7.4 |
30 | 30 | ||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/0004-omap-hwmod-33xx-Add-support-for-third-i2c-bus.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/0004-omap-hwmod-33xx-Add-support-for-third-i2c-bus.patch index 836b4a7d..6ec9f884 100644 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/0004-omap-hwmod-33xx-Add-support-for-third-i2c-bus.patch +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/0004-omap-hwmod-33xx-Add-support-for-third-i2c-bus.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 4f823ac4857d0d48b53b7a8799a745f746bfda1a Mon Sep 17 00:00:00 2001 | 1 | From 4f823ac4857d0d48b53b7a8799a745f746bfda1a Mon Sep 17 00:00:00 2001 |
2 | From: Koen Kooi <koen@dominion.thruhere.net> | 2 | From: Koen Kooi <koen@dominion.thruhere.net> |
3 | Date: Wed, 16 Nov 2011 07:23:37 -0600 | 3 | Date: Wed, 16 Nov 2011 07:23:37 -0600 |
4 | Subject: [PATCH 04/16] omap:hwmod:33xx: Add support for third i2c bus | 4 | Subject: [PATCH 04/21] omap:hwmod:33xx: Add support for third i2c bus |
5 | 5 | ||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | 6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> |
7 | --- | 7 | --- |
@@ -88,5 +88,5 @@ index 9b15ffe..f9b91fa 100644 | |||
88 | &am33xx_icss_hwmod, | 88 | &am33xx_icss_hwmod, |
89 | /* ieee5000 class */ | 89 | /* ieee5000 class */ |
90 | -- | 90 | -- |
91 | 1.7.7.5 | 91 | 1.7.7.4 |
92 | 92 | ||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/0005-beaglebone-rebase-everything-onto-3.2-WARNING-MEGAPA.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/0005-beaglebone-rebase-everything-onto-3.2-WARNING-MEGAPA.patch index 03b4c93c..c4590eba 100644 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/0005-beaglebone-rebase-everything-onto-3.2-WARNING-MEGAPA.patch +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/0005-beaglebone-rebase-everything-onto-3.2-WARNING-MEGAPA.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From c240df1d9fd60f318e719d0e77bc5955fecbb64e Mon Sep 17 00:00:00 2001 | 1 | From c240df1d9fd60f318e719d0e77bc5955fecbb64e Mon Sep 17 00:00:00 2001 |
2 | From: Koen Kooi <koen@dominion.thruhere.net> | 2 | From: Koen Kooi <koen@dominion.thruhere.net> |
3 | Date: Mon, 30 Jan 2012 21:30:09 +0100 | 3 | Date: Mon, 30 Jan 2012 21:30:09 +0100 |
4 | Subject: [PATCH 05/16] beaglebone: rebase everything onto 3.2 - WARNING | 4 | Subject: [PATCH 05/21] beaglebone: rebase everything onto 3.2 - WARNING |
5 | MEGAPATCH | 5 | MEGAPATCH |
6 | 6 | ||
7 | --- | 7 | --- |
@@ -544,5 +544,5 @@ index 4c09cc9..e0c20c5 100644 | |||
544 | /* Beagle Bone has Micro-SD slot which doesn't have Write Protect pin */ | 544 | /* Beagle Bone has Micro-SD slot which doesn't have Write Protect pin */ |
545 | am335x_mmc[0].gpio_wp = -EINVAL; | 545 | am335x_mmc[0].gpio_wp = -EINVAL; |
546 | -- | 546 | -- |
547 | 1.7.7.5 | 547 | 1.7.7.4 |
548 | 548 | ||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/0006-more-beaglebone-merges.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/0006-more-beaglebone-merges.patch index b72bb567..25c7fcc0 100644 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/0006-more-beaglebone-merges.patch +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/0006-more-beaglebone-merges.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 873c06849ccdb685b5cab1e6e809eda260427d42 Mon Sep 17 00:00:00 2001 | 1 | From 873c06849ccdb685b5cab1e6e809eda260427d42 Mon Sep 17 00:00:00 2001 |
2 | From: Koen Kooi <koen@dominion.thruhere.net> | 2 | From: Koen Kooi <koen@dominion.thruhere.net> |
3 | Date: Tue, 31 Jan 2012 10:04:03 +0100 | 3 | Date: Tue, 31 Jan 2012 10:04:03 +0100 |
4 | Subject: [PATCH 06/16] more beaglebone merges | 4 | Subject: [PATCH 06/21] more beaglebone merges |
5 | 5 | ||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | 6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> |
7 | --- | 7 | --- |
@@ -121,5 +121,5 @@ index e0c20c5..177ab9e 100644 | |||
121 | } else if (!strncmp("1.0", config.version, 3)) { | 121 | } else if (!strncmp("1.0", config.version, 3)) { |
122 | gp_evm_revision = GP_EVM_REV_IS_1_0; | 122 | gp_evm_revision = GP_EVM_REV_IS_1_0; |
123 | -- | 123 | -- |
124 | 1.7.7.5 | 124 | 1.7.7.4 |
125 | 125 | ||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/0007-beaglebone-disable-tsadc.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/0007-beaglebone-disable-tsadc.patch index 3d1a8eae..63a95751 100644 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/0007-beaglebone-disable-tsadc.patch +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/0007-beaglebone-disable-tsadc.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 6f50bf55f6182ecd09aac93d3b613a99159b606c Mon Sep 17 00:00:00 2001 | 1 | From 6f50bf55f6182ecd09aac93d3b613a99159b606c Mon Sep 17 00:00:00 2001 |
2 | From: Koen Kooi <koen@dominion.thruhere.net> | 2 | From: Koen Kooi <koen@dominion.thruhere.net> |
3 | Date: Tue, 31 Jan 2012 10:09:06 +0100 | 3 | Date: Tue, 31 Jan 2012 10:09:06 +0100 |
4 | Subject: [PATCH 07/16] beaglebone: disable tsadc | 4 | Subject: [PATCH 07/21] beaglebone: disable tsadc |
5 | 5 | ||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | 6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> |
7 | --- | 7 | --- |
@@ -27,5 +27,5 @@ index 177ab9e..87ccf14 100644 | |||
27 | 27 | ||
28 | static struct platform_device tsc_device = { | 28 | static struct platform_device tsc_device = { |
29 | -- | 29 | -- |
30 | 1.7.7.5 | 30 | 1.7.7.4 |
31 | 31 | ||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/0008-tscadc-Add-general-purpose-mode-untested-with-touchs.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/0008-tscadc-Add-general-purpose-mode-untested-with-touchs.patch index 5d5f95f4..ef1ece0e 100644 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/0008-tscadc-Add-general-purpose-mode-untested-with-touchs.patch +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/0008-tscadc-Add-general-purpose-mode-untested-with-touchs.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 7cb067cd1bd237a7a9978747fc4f96fa90b5d146 Mon Sep 17 00:00:00 2001 | 1 | From 7cb067cd1bd237a7a9978747fc4f96fa90b5d146 Mon Sep 17 00:00:00 2001 |
2 | From: Joel A Fernandes <joelagnel@ti.com> | 2 | From: Joel A Fernandes <joelagnel@ti.com> |
3 | Date: Wed, 30 Nov 2011 15:00:40 +0100 | 3 | Date: Wed, 30 Nov 2011 15:00:40 +0100 |
4 | Subject: [PATCH 08/16] tscadc: Add general purpose mode, untested with | 4 | Subject: [PATCH 08/21] tscadc: Add general purpose mode, untested with |
5 | touchscreen functionality | 5 | touchscreen functionality |
6 | 6 | ||
7 | Signed-off-by: Joel A Fernandes <joelagnel@ti.com> | 7 | Signed-off-by: Joel A Fernandes <joelagnel@ti.com> |
@@ -407,5 +407,5 @@ index 2c547bb..850cd4b 100644 | |||
407 | + int mode; | 407 | + int mode; |
408 | }; | 408 | }; |
409 | -- | 409 | -- |
410 | 1.7.7.5 | 410 | 1.7.7.4 |
411 | 411 | ||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/0009-tscadc-Add-board-file-mfd-support-fix-warning.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/0009-tscadc-Add-board-file-mfd-support-fix-warning.patch index bae95a9a..27133e89 100644 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/0009-tscadc-Add-board-file-mfd-support-fix-warning.patch +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/0009-tscadc-Add-board-file-mfd-support-fix-warning.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From f7330897eabdf0275cd51213fe1dc778e165d07c Mon Sep 17 00:00:00 2001 | 1 | From f7330897eabdf0275cd51213fe1dc778e165d07c Mon Sep 17 00:00:00 2001 |
2 | From: Joel A Fernandes <joelagnel@ti.com> | 2 | From: Joel A Fernandes <joelagnel@ti.com> |
3 | Date: Wed, 30 Nov 2011 15:02:17 +0100 | 3 | Date: Wed, 30 Nov 2011 15:02:17 +0100 |
4 | Subject: [PATCH 09/16] tscadc: Add board file mfd support, fix warning | 4 | Subject: [PATCH 09/21] tscadc: Add board file mfd support, fix warning |
5 | 5 | ||
6 | Signed-off-by: Joel A Fernandes <joelagnel@ti.com> | 6 | Signed-off-by: Joel A Fernandes <joelagnel@ti.com> |
7 | 7 | ||
@@ -40,5 +40,5 @@ index 699503d..f813564 100644 | |||
40 | int clk_value; | 40 | int clk_value; |
41 | int clock_rate, irqenable, ctrl; | 41 | int clock_rate, irqenable, ctrl; |
42 | -- | 42 | -- |
43 | 1.7.7.5 | 43 | 1.7.7.4 |
44 | 44 | ||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/0010-AM335X-init-tsc-bone-style-for-new-boards.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/0010-AM335X-init-tsc-bone-style-for-new-boards.patch index c78cb819..b5f3d482 100644 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/0010-AM335X-init-tsc-bone-style-for-new-boards.patch +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/0010-AM335X-init-tsc-bone-style-for-new-boards.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From f02d01f3f7bafede91847480a72b50d8a8d45a6a Mon Sep 17 00:00:00 2001 | 1 | From f02d01f3f7bafede91847480a72b50d8a8d45a6a Mon Sep 17 00:00:00 2001 |
2 | From: Joel A Fernandes <joelagnel@ti.com> | 2 | From: Joel A Fernandes <joelagnel@ti.com> |
3 | Date: Wed, 30 Nov 2011 15:03:59 +0100 | 3 | Date: Wed, 30 Nov 2011 15:03:59 +0100 |
4 | Subject: [PATCH 10/16] AM335X: init tsc bone style for new boards | 4 | Subject: [PATCH 10/21] AM335X: init tsc bone style for new boards |
5 | 5 | ||
6 | Signed-off-by: Joel A Fernandes <joelagnel@ti.com> | 6 | Signed-off-by: Joel A Fernandes <joelagnel@ti.com> |
7 | --- | 7 | --- |
@@ -22,5 +22,5 @@ index 17705b3..ac4f78f 100644 | |||
22 | }; | 22 | }; |
23 | 23 | ||
24 | -- | 24 | -- |
25 | 1.7.7.5 | 25 | 1.7.7.4 |
26 | 26 | ||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/0011-tscadc-make-stepconfig-channel-configurable.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/0011-tscadc-make-stepconfig-channel-configurable.patch index 64f5e37b..892f1968 100644 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/0011-tscadc-make-stepconfig-channel-configurable.patch +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/0011-tscadc-make-stepconfig-channel-configurable.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 0524d48ca4e3178d89d940b38f1fa26cf448ebb8 Mon Sep 17 00:00:00 2001 | 1 | From 0524d48ca4e3178d89d940b38f1fa26cf448ebb8 Mon Sep 17 00:00:00 2001 |
2 | From: Joel A Fernandes <joelagnel@ti.com> | 2 | From: Joel A Fernandes <joelagnel@ti.com> |
3 | Date: Mon, 28 Nov 2011 18:18:04 -0600 | 3 | Date: Mon, 28 Nov 2011 18:18:04 -0600 |
4 | Subject: [PATCH 11/16] tscadc: make stepconfig channel-configurable | 4 | Subject: [PATCH 11/21] tscadc: make stepconfig channel-configurable |
5 | 5 | ||
6 | Signed-off-by: Joel A Fernandes <joelagnel@ti.com> | 6 | Signed-off-by: Joel A Fernandes <joelagnel@ti.com> |
7 | --- | 7 | --- |
@@ -42,5 +42,5 @@ index f813564..0b91bdc 100644 | |||
42 | irqenable = TSCADC_IRQENB_FIFO0THRES; | 42 | irqenable = TSCADC_IRQENB_FIFO0THRES; |
43 | } | 43 | } |
44 | -- | 44 | -- |
45 | 1.7.7.5 | 45 | 1.7.7.4 |
46 | 46 | ||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/0012-tscadc-Trigger-through-sysfs.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/0012-tscadc-Trigger-through-sysfs.patch index 8375cf8b..398c951e 100644 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/0012-tscadc-Trigger-through-sysfs.patch +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/0012-tscadc-Trigger-through-sysfs.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 5b0c06b556db15cac8d14eb7e74307521481e185 Mon Sep 17 00:00:00 2001 | 1 | From 5b0c06b556db15cac8d14eb7e74307521481e185 Mon Sep 17 00:00:00 2001 |
2 | From: Joel A Fernandes <joelagnel@ti.com> | 2 | From: Joel A Fernandes <joelagnel@ti.com> |
3 | Date: Mon, 28 Nov 2011 20:55:25 -0600 | 3 | Date: Mon, 28 Nov 2011 20:55:25 -0600 |
4 | Subject: [PATCH 12/16] tscadc: Trigger through sysfs | 4 | Subject: [PATCH 12/21] tscadc: Trigger through sysfs |
5 | 5 | ||
6 | Signed-off-by: Joel A Fernandes <joelagnel@ti.com> | 6 | Signed-off-by: Joel A Fernandes <joelagnel@ti.com> |
7 | 7 | ||
@@ -143,5 +143,5 @@ index 850cd4b..fc239c6 100644 | |||
143 | #define TI_TSCADC_TSCMODE 0 | 143 | #define TI_TSCADC_TSCMODE 0 |
144 | #define TI_TSCADC_GENMODE 1 | 144 | #define TI_TSCADC_GENMODE 1 |
145 | -- | 145 | -- |
146 | 1.7.7.5 | 146 | 1.7.7.4 |
147 | 147 | ||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/0013-meta-ti-Remove-debug-messages-for-meta-ti.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/0013-meta-ti-Remove-debug-messages-for-meta-ti.patch index 7c06c098..866349db 100644 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/0013-meta-ti-Remove-debug-messages-for-meta-ti.patch +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/0013-meta-ti-Remove-debug-messages-for-meta-ti.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From edb40d9ed626b634bfe71c39a02602e2ae871175 Mon Sep 17 00:00:00 2001 | 1 | From edb40d9ed626b634bfe71c39a02602e2ae871175 Mon Sep 17 00:00:00 2001 |
2 | From: Joel A Fernandes <joelagnel@ti.com> | 2 | From: Joel A Fernandes <joelagnel@ti.com> |
3 | Date: Mon, 28 Nov 2011 20:56:48 -0600 | 3 | Date: Mon, 28 Nov 2011 20:56:48 -0600 |
4 | Subject: [PATCH 13/16] meta-ti: Remove debug messages for meta-ti | 4 | Subject: [PATCH 13/21] meta-ti: Remove debug messages for meta-ti |
5 | 5 | ||
6 | Signed-off-by: Joel A Fernandes <joelagnel@ti.com> | 6 | Signed-off-by: Joel A Fernandes <joelagnel@ti.com> |
7 | --- | 7 | --- |
@@ -30,5 +30,5 @@ index a74d9ba..1f9cbf5 100644 | |||
30 | for (i = 0; i < fifo1count; i++) { | 30 | for (i = 0; i < fifo1count; i++) { |
31 | read_sample = tscadc_readl(ts_dev, TSCADC_REG_FIFO0); | 31 | read_sample = tscadc_readl(ts_dev, TSCADC_REG_FIFO0); |
32 | -- | 32 | -- |
33 | 1.7.7.5 | 33 | 1.7.7.4 |
34 | 34 | ||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/0014-tscadc-switch-to-polling-instead-of-interrupts.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/0014-tscadc-switch-to-polling-instead-of-interrupts.patch index 0df53466..168230c6 100644 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/0014-tscadc-switch-to-polling-instead-of-interrupts.patch +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/0014-tscadc-switch-to-polling-instead-of-interrupts.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From f36d060e6965cdbf797308fb2d80a77c4bbaeac3 Mon Sep 17 00:00:00 2001 | 1 | From f36d060e6965cdbf797308fb2d80a77c4bbaeac3 Mon Sep 17 00:00:00 2001 |
2 | From: Joel A Fernandes <joelagnel@ti.com> | 2 | From: Joel A Fernandes <joelagnel@ti.com> |
3 | Date: Tue, 29 Nov 2011 09:44:22 -0600 | 3 | Date: Tue, 29 Nov 2011 09:44:22 -0600 |
4 | Subject: [PATCH 14/16] tscadc: switch to polling instead of interrupts | 4 | Subject: [PATCH 14/21] tscadc: switch to polling instead of interrupts |
5 | 5 | ||
6 | Signed-off-by: Joel A Fernandes <joelagnel@ti.com> | 6 | Signed-off-by: Joel A Fernandes <joelagnel@ti.com> |
7 | --- | 7 | --- |
@@ -50,5 +50,5 @@ index 1f9cbf5..8e2a994 100644 | |||
50 | tscadc_writel(ts_dev, TSCADC_REG_IRQENABLE, irqenable); | 50 | tscadc_writel(ts_dev, TSCADC_REG_IRQENABLE, irqenable); |
51 | 51 | ||
52 | -- | 52 | -- |
53 | 1.7.7.5 | 53 | 1.7.7.4 |
54 | 54 | ||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/0015-beaglebone-fix-ADC-init.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/0015-beaglebone-fix-ADC-init.patch index 2757844c..3220a5ce 100644 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/0015-beaglebone-fix-ADC-init.patch +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/0015-beaglebone-fix-ADC-init.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 9289020d4d0f1dc6a973feca4b6465ee1dbcb1b7 Mon Sep 17 00:00:00 2001 | 1 | From 9289020d4d0f1dc6a973feca4b6465ee1dbcb1b7 Mon Sep 17 00:00:00 2001 |
2 | From: Koen Kooi <koen@dominion.thruhere.net> | 2 | From: Koen Kooi <koen@dominion.thruhere.net> |
3 | Date: Tue, 31 Jan 2012 14:50:55 +0100 | 3 | Date: Tue, 31 Jan 2012 14:50:55 +0100 |
4 | Subject: [PATCH 15/16] beaglebone: fix ADC init | 4 | Subject: [PATCH 15/21] beaglebone: fix ADC init |
5 | 5 | ||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | 6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> |
7 | --- | 7 | --- |
@@ -43,5 +43,5 @@ index ac4f78f..177ab9e 100644 | |||
43 | }; | 43 | }; |
44 | 44 | ||
45 | -- | 45 | -- |
46 | 1.7.7.5 | 46 | 1.7.7.4 |
47 | 47 | ||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/0017-AM335x-MUX-add-ehrpwm1A.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/0017-AM335x-MUX-add-ehrpwm1A.patch new file mode 100644 index 00000000..ecaf9f55 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/0017-AM335x-MUX-add-ehrpwm1A.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | From 2d9d76c49c1a208d9cb4894bf26c9fb96f440e3f Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Tue, 31 Jan 2012 16:49:52 +0100 | ||
4 | Subject: [PATCH 17/21] AM335x: MUX: add ehrpwm1A | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | arch/arm/mach-omap2/mux33xx.c | 2 +- | ||
9 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
10 | |||
11 | diff --git a/arch/arm/mach-omap2/mux33xx.c b/arch/arm/mach-omap2/mux33xx.c | ||
12 | index e4cd407..0a06241 100644 | ||
13 | --- a/arch/arm/mach-omap2/mux33xx.c | ||
14 | +++ b/arch/arm/mach-omap2/mux33xx.c | ||
15 | @@ -85,7 +85,7 @@ static struct omap_mux __initdata am33xx_muxmodes[] = { | ||
16 | NULL, NULL, NULL, "gpio1_17"), | ||
17 | _AM33XX_MUXENTRY(GPMC_A2, 0, | ||
18 | "gpmc_a2", "mii2_txd3", "rgmii2_td3", "mmc2_dat1", | ||
19 | - NULL, NULL, NULL, "gpio1_18"), | ||
20 | + NULL, NULL, "ehrpwm1A", "gpio1_18"), | ||
21 | _AM33XX_MUXENTRY(GPMC_A3, 0, | ||
22 | "gpmc_a3", "mii2_txd2", "rgmii2_td2", "mmc2_dat2", | ||
23 | NULL, NULL, NULL, "gpio1_19"), | ||
24 | -- | ||
25 | 1.7.7.4 | ||
26 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/0018-beaglebone-enable-PWM-for-lcd-backlight-backlight-is.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/0018-beaglebone-enable-PWM-for-lcd-backlight-backlight-is.patch new file mode 100644 index 00000000..0449936a --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/0018-beaglebone-enable-PWM-for-lcd-backlight-backlight-is.patch | |||
@@ -0,0 +1,177 @@ | |||
1 | From 5fb56662c5ed2e0499b9bb43a542f896a8274cab Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Tue, 31 Jan 2012 17:02:10 +0100 | ||
4 | Subject: [PATCH 18/21] beaglebone: enable PWM for lcd backlight <- backlight | ||
5 | is inverted | ||
6 | |||
7 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
8 | --- | ||
9 | arch/arm/mach-omap2/board-am335xevm.c | 54 ++++++++++++++++++++++++++------ | ||
10 | arch/arm/mach-omap2/devices.c | 13 ++++++++ | ||
11 | arch/arm/mach-omap2/devices.h | 1 + | ||
12 | 3 files changed, 58 insertions(+), 10 deletions(-) | ||
13 | |||
14 | diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c | ||
15 | index 177ab9e..6a77194 100644 | ||
16 | --- a/arch/arm/mach-omap2/board-am335xevm.c | ||
17 | +++ b/arch/arm/mach-omap2/board-am335xevm.c | ||
18 | @@ -36,6 +36,7 @@ | ||
19 | #include <linux/mfd/tps65910.h> | ||
20 | #include <linux/mfd/tps65217.h> | ||
21 | #include <linux/pwm_backlight.h> | ||
22 | +#include <linux/pwm/pwm.h> | ||
23 | |||
24 | /* LCD controller is similar to DA850 */ | ||
25 | #include <video/da8xx-fb.h> | ||
26 | @@ -131,7 +132,7 @@ static const struct display_panel disp_panel = { | ||
27 | /* LCD backlight platform Data */ | ||
28 | #define AM335X_BACKLIGHT_MAX_BRIGHTNESS 100 | ||
29 | #define AM335X_BACKLIGHT_DEFAULT_BRIGHTNESS 100 | ||
30 | -#define AM335X_PWM_PERIOD_NANO_SECONDS (1000000 * 10) | ||
31 | +#define AM335X_PWM_PERIOD_NANO_SECONDS (1000000 * 5) | ||
32 | |||
33 | #define PWM_DEVICE_ID "ecap.0" | ||
34 | |||
35 | @@ -175,6 +176,16 @@ static const struct display_panel bbtoys7_panel = { | ||
36 | COLOR_ACTIVE, | ||
37 | }; | ||
38 | |||
39 | +#define BBTOYS7LCD_PWM_DEVICE_ID "ehrpwm.1:0" | ||
40 | + | ||
41 | +static struct platform_pwm_backlight_data bbtoys7lcd_backlight_data = { | ||
42 | + .pwm_id = BBTOYS7LCD_PWM_DEVICE_ID, | ||
43 | + .ch = -1, | ||
44 | + .max_brightness = AM335X_BACKLIGHT_MAX_BRIGHTNESS, | ||
45 | + .dft_brightness = AM335X_BACKLIGHT_DEFAULT_BRIGHTNESS, | ||
46 | + .pwm_period_ns = AM335X_PWM_PERIOD_NANO_SECONDS, | ||
47 | +}; | ||
48 | + | ||
49 | static struct lcd_ctrl_config bbtoys7_cfg = { | ||
50 | &bbtoys7_panel, | ||
51 | .ac_bias = 255, | ||
52 | @@ -586,9 +597,9 @@ static struct pinmux_config bbtoys7_pin_mux[] = { | ||
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 | - {"gpmc_a2.gpio1_18", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // Backlight | ||
58 | + {"lcd_ac_bias_en.lcd_ac_bias_en", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, | ||
59 | {"ecap0_in_pwm0_out.gpio0_7", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // AVDD_EN | ||
60 | + {"gpmc_a2.ehrpwm1A", OMAP_MUX_MODE6 | AM33XX_PIN_OUTPUT}, // Backlight | ||
61 | {NULL, 0}, | ||
62 | }; | ||
63 | |||
64 | @@ -1121,6 +1132,7 @@ static struct pinmux_config ecap0_pin_mux[] = { | ||
65 | {NULL, 0}, | ||
66 | }; | ||
67 | |||
68 | +static int ehrpwm_backlight_enable; | ||
69 | static int backlight_enable; | ||
70 | |||
71 | #define AM335XEVM_WLAN_PMENA_GPIO GPIO_TO_PIN(1, 30) | ||
72 | @@ -1190,6 +1202,30 @@ static int __init ecap0_init(void) | ||
73 | } | ||
74 | late_initcall(ecap0_init); | ||
75 | |||
76 | +static void enable_ehrpwm1(int evm_id, int profile) | ||
77 | +{ | ||
78 | + ehrpwm_backlight_enable = true; | ||
79 | +} | ||
80 | + | ||
81 | +/* Setup pwm-backlight for bbtoys7lcd */ | ||
82 | +static struct platform_device bbtoys7lcd_backlight = { | ||
83 | + .name = "pwm-backlight", | ||
84 | + .id = -1, | ||
85 | + .dev = { | ||
86 | + .platform_data = &bbtoys7lcd_backlight_data, | ||
87 | + } | ||
88 | +}; | ||
89 | + | ||
90 | +static int __init ehrpwm1_init(void) | ||
91 | +{ | ||
92 | + int status = 0; | ||
93 | + if (ehrpwm_backlight_enable) { | ||
94 | + platform_device_register(&bbtoys7lcd_backlight); | ||
95 | + } | ||
96 | + return status; | ||
97 | +} | ||
98 | +late_initcall(ehrpwm1_init); | ||
99 | + | ||
100 | static int __init conf_disp_pll(int rate) | ||
101 | { | ||
102 | struct clk *disp_pll; | ||
103 | @@ -1224,11 +1260,12 @@ static void lcdc_init(int evm_id, int profile) | ||
104 | } | ||
105 | |||
106 | #define BEAGLEBONE_LCD_AVDD_EN GPIO_TO_PIN(0, 7) | ||
107 | -#define BEAGLEBONE_LCD_BL GPIO_TO_PIN(1, 18) | ||
108 | |||
109 | static void bbtoys7lcd_init(int evm_id, int profile) | ||
110 | { | ||
111 | setup_pin_mux(bbtoys7_pin_mux); | ||
112 | + gpio_request(BEAGLEBONE_LCD_AVDD_EN, "BONE_LCD_AVDD_EN"); | ||
113 | + gpio_direction_output(BEAGLEBONE_LCD_AVDD_EN, 1); | ||
114 | |||
115 | // we are being stupid and setting pixclock from here instead of da8xx-fb.c | ||
116 | if (conf_disp_pll(300000000)) { | ||
117 | @@ -1239,12 +1276,7 @@ static void bbtoys7lcd_init(int evm_id, int profile) | ||
118 | |||
119 | if (am33xx_register_lcdc(&bbtoys7_pdata)) | ||
120 | pr_info("Failed to register Beagleboardtoys 7\" LCD cape device\n"); | ||
121 | - | ||
122 | - gpio_request(BEAGLEBONE_LCD_BL, "BONE_LCD_BL"); | ||
123 | - gpio_direction_output(BEAGLEBONE_LCD_BL, 1); | ||
124 | - gpio_request(BEAGLEBONE_LCD_AVDD_EN, "BONE_LCD_AVDD_EN"); | ||
125 | - gpio_direction_output(BEAGLEBONE_LCD_AVDD_EN, 1); | ||
126 | - | ||
127 | + | ||
128 | return; | ||
129 | } | ||
130 | |||
131 | @@ -1768,6 +1800,8 @@ static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context | ||
132 | bbtoys7lcd_init(0,0); | ||
133 | pr_info("BeagleBone cape: initializing LCD cape touchscreen\n"); | ||
134 | tsc_init(0,0); | ||
135 | + pr_info("BeagleBone cape: Registering PWM backlight for LCD cape\n"); | ||
136 | + enable_ehrpwm1(0,0); | ||
137 | beaglebone_tsadcpins_free = 0; | ||
138 | } | ||
139 | |||
140 | diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c | ||
141 | index 4b137e9..33291ae 100644 | ||
142 | --- a/arch/arm/mach-omap2/devices.c | ||
143 | +++ b/arch/arm/mach-omap2/devices.c | ||
144 | @@ -1277,6 +1277,19 @@ void register_ehrpwm(int max_freq) | ||
145 | platform_device_register(&am335x_epwm2_device); | ||
146 | } | ||
147 | |||
148 | +void register_ehrpwm1(int max_freq) | ||
149 | +{ | ||
150 | + int val; | ||
151 | + | ||
152 | + val = __raw_readw(AM33XX_CTRL_REGADDR(AM33XX_PWMSS_CTRL)); | ||
153 | + val |= PWMSS1_TBCLKEN; | ||
154 | + __raw_writew(val, AM33XX_CTRL_REGADDR(AM33XX_PWMSS_CTRL)); | ||
155 | + am335x_pwmss_config1.chan_attrib[1].max_freq = max_freq; | ||
156 | + sema_init(&am335x_pwmss_config1.config_semaphore, 1); | ||
157 | + am335x_pwmss_config1.version = PWM_VERSION_1; | ||
158 | + platform_device_register(&am335x_epwm1_device); | ||
159 | +} | ||
160 | + | ||
161 | static struct resource am335x_ecap0_resurce[] = { | ||
162 | { | ||
163 | .start = AM33XX_EPWMSS0_BASE , | ||
164 | diff --git a/arch/arm/mach-omap2/devices.h b/arch/arm/mach-omap2/devices.h | ||
165 | index e086839..5161eb4 100644 | ||
166 | --- a/arch/arm/mach-omap2/devices.h | ||
167 | +++ b/arch/arm/mach-omap2/devices.h | ||
168 | @@ -18,5 +18,6 @@ int omap3_init_camera(struct isp_platform_data *pdata); | ||
169 | |||
170 | void __init am335x_register_mcasp1(struct snd_platform_data *pdata); | ||
171 | extern void register_ehrpwm(int max_freq); | ||
172 | +extern void register_ehrpwm1(int max_freq); | ||
173 | |||
174 | #endif | ||
175 | -- | ||
176 | 1.7.7.4 | ||
177 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/0019-omap_hsmmc-Set-dto-to-max-value-of-14-to-avoid-SD-Ca.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/0019-omap_hsmmc-Set-dto-to-max-value-of-14-to-avoid-SD-Ca.patch new file mode 100644 index 00000000..d4255da8 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/0019-omap_hsmmc-Set-dto-to-max-value-of-14-to-avoid-SD-Ca.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 91e061ce4d020a11259adc79499cf7e6714eedb0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Steve Sakoman <steve@sakoman.com> | ||
3 | Date: Mon, 18 Jul 2011 23:13:41 -0500 | ||
4 | Subject: [PATCH 19/21] omap_hsmmc: Set dto to max value of 14 to avoid SD | ||
5 | Card timeouts | ||
6 | |||
7 | This fixes MMC errors due to timeouts on certain SD Cards following suggestions | ||
8 | to set dto to 14 by Jason Kridner and Steven Kipisz | ||
9 | |||
10 | Details of the issue: | ||
11 | http://talk.maemo.org/showthread.php?p=1000707#post1000707 | ||
12 | |||
13 | This fix was originally proposed by Sukumar Ghoral of TI. | ||
14 | --- | ||
15 | drivers/mmc/host/omap_hsmmc.c | 3 +++ | ||
16 | 1 files changed, 3 insertions(+), 0 deletions(-) | ||
17 | |||
18 | diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c | ||
19 | index 703013c..554237f 100644 | ||
20 | --- a/drivers/mmc/host/omap_hsmmc.c | ||
21 | +++ b/drivers/mmc/host/omap_hsmmc.c | ||
22 | @@ -1562,6 +1562,9 @@ static void set_data_timeout(struct omap_hsmmc_host *host, | ||
23 | dto = 14; | ||
24 | } | ||
25 | |||
26 | + /* Set dto to max value of 14 to avoid SD Card timeouts */ | ||
27 | + dto = 14; | ||
28 | + | ||
29 | reg &= ~DTO_MASK; | ||
30 | reg |= dto << DTO_SHIFT; | ||
31 | OMAP_HSMMC_WRITE(host->base, SYSCTL, reg); | ||
32 | -- | ||
33 | 1.7.7.4 | ||
34 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/0020-beaglebone-set-default-brightness-to-50-for-pwm-back.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/0020-beaglebone-set-default-brightness-to-50-for-pwm-back.patch new file mode 100644 index 00000000..d4d4622f --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/0020-beaglebone-set-default-brightness-to-50-for-pwm-back.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From 028a2779bf8e08a333b01a1c4fc71d6fae99ed73 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Wed, 1 Feb 2012 14:10:38 +0100 | ||
4 | Subject: [PATCH 20/21] beaglebone: set default brightness to 50% for pwm | ||
5 | backlights | ||
6 | |||
7 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
8 | --- | ||
9 | arch/arm/mach-omap2/board-am335xevm.c | 2 +- | ||
10 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
11 | |||
12 | diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c | ||
13 | index 6a77194..c31c0aa 100644 | ||
14 | --- a/arch/arm/mach-omap2/board-am335xevm.c | ||
15 | +++ b/arch/arm/mach-omap2/board-am335xevm.c | ||
16 | @@ -131,7 +131,7 @@ static const struct display_panel disp_panel = { | ||
17 | |||
18 | /* LCD backlight platform Data */ | ||
19 | #define AM335X_BACKLIGHT_MAX_BRIGHTNESS 100 | ||
20 | -#define AM335X_BACKLIGHT_DEFAULT_BRIGHTNESS 100 | ||
21 | +#define AM335X_BACKLIGHT_DEFAULT_BRIGHTNESS 50 | ||
22 | #define AM335X_PWM_PERIOD_NANO_SECONDS (1000000 * 5) | ||
23 | |||
24 | #define PWM_DEVICE_ID "ecap.0" | ||
25 | -- | ||
26 | 1.7.7.4 | ||
27 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/0021-st7735fb-WIP-framebuffer-driver-supporting-Adafruit-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/0021-st7735fb-WIP-framebuffer-driver-supporting-Adafruit-.patch new file mode 100644 index 00000000..2a716588 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/0021-st7735fb-WIP-framebuffer-driver-supporting-Adafruit-.patch | |||
@@ -0,0 +1,668 @@ | |||
1 | From effae95a02a22474626aa8abdfb8573fd3eb74b6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Matt Porter <mporter@ti.com> | ||
3 | Date: Mon, 21 Nov 2011 12:55:23 -0500 | ||
4 | Subject: [PATCH 21/21] st7735fb: WIP framebuffer driver supporting Adafruit | ||
5 | 1.8" SPI LCD | ||
6 | |||
7 | Signed-off-by: Matt Porter <mporter@ti.com> | ||
8 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
9 | --- | ||
10 | drivers/video/Kconfig | 11 + | ||
11 | drivers/video/Makefile | 1 + | ||
12 | drivers/video/st7735fb.c | 516 ++++++++++++++++++++++++++++++++++++++++++++++ | ||
13 | include/video/st7735fb.h | 86 ++++++++ | ||
14 | 4 files changed, 614 insertions(+), 0 deletions(-) | ||
15 | create mode 100644 drivers/video/st7735fb.c | ||
16 | create mode 100644 include/video/st7735fb.h | ||
17 | |||
18 | diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig | ||
19 | index f66bf0e..64754de 100644 | ||
20 | --- a/drivers/video/Kconfig | ||
21 | +++ b/drivers/video/Kconfig | ||
22 | @@ -2420,6 +2420,17 @@ config FB_PUV3_UNIGFX | ||
23 | Choose this option if you want to use the Unigfx device as a | ||
24 | framebuffer device. Without the support of PCI & AGP. | ||
25 | |||
26 | +config FB_ST7735 | ||
27 | + tristate "ST7735 framebuffer support" | ||
28 | + depends on FB && SPI | ||
29 | + select FB_SYS_FILLRECT | ||
30 | + select FB_SYS_COPYAREA | ||
31 | + select FB_SYS_IMAGEBLIT | ||
32 | + select FB_SYS_FOPS | ||
33 | + select FB_DEFERRED_IO | ||
34 | + help | ||
35 | + Framebuffer support for the ST7735 display controller in SPI mode. | ||
36 | + | ||
37 | source "drivers/video/omap/Kconfig" | ||
38 | source "drivers/video/omap2/Kconfig" | ||
39 | |||
40 | diff --git a/drivers/video/Makefile b/drivers/video/Makefile | ||
41 | index 9b9d8ff..c6d9851 100644 | ||
42 | --- a/drivers/video/Makefile | ||
43 | +++ b/drivers/video/Makefile | ||
44 | @@ -143,6 +143,7 @@ obj-$(CONFIG_FB_MSM) += msm/ | ||
45 | obj-$(CONFIG_FB_NUC900) += nuc900fb.o | ||
46 | obj-$(CONFIG_FB_JZ4740) += jz4740_fb.o | ||
47 | obj-$(CONFIG_FB_PUV3_UNIGFX) += fb-puv3.o | ||
48 | +obj-$(CONFIG_FB_ST7735) += st7735fb.o | ||
49 | |||
50 | # Platform or fallback drivers go here | ||
51 | obj-$(CONFIG_FB_UVESA) += uvesafb.o | ||
52 | diff --git a/drivers/video/st7735fb.c b/drivers/video/st7735fb.c | ||
53 | new file mode 100644 | ||
54 | index 0000000..500cc88 | ||
55 | --- /dev/null | ||
56 | +++ b/drivers/video/st7735fb.c | ||
57 | @@ -0,0 +1,516 @@ | ||
58 | +/* | ||
59 | + * linux/drivers/video/st7735fb.c -- FB driver for ST7735 LCD controller | ||
60 | + * Layout is based on skeletonfb.c by James Simmons and Geert Uytterhoeven. | ||
61 | + * | ||
62 | + * Copyright (C) 2011, Matt Porter | ||
63 | + * | ||
64 | + * This file is subject to the terms and conditions of the GNU General Public | ||
65 | + * License. See the file COPYING in the main directory of this archive for | ||
66 | + * more details. | ||
67 | + */ | ||
68 | + | ||
69 | +#include <linux/module.h> | ||
70 | +#include <linux/kernel.h> | ||
71 | +#include <linux/errno.h> | ||
72 | +#include <linux/string.h> | ||
73 | +#include <linux/mm.h> | ||
74 | +#include <linux/vmalloc.h> | ||
75 | +#include <linux/slab.h> | ||
76 | +#include <linux/init.h> | ||
77 | +#include <linux/fb.h> | ||
78 | +#include <linux/gpio.h> | ||
79 | +#include <linux/spi/spi.h> | ||
80 | +#include <linux/delay.h> | ||
81 | +#include <linux/uaccess.h> | ||
82 | + | ||
83 | +#include <video/st7735fb.h> | ||
84 | + | ||
85 | +static struct st7735_function st7735_cfg_script[] = { | ||
86 | + { ST7735_START, ST7735_START}, | ||
87 | + { ST7735_CMD, ST7735_SWRESET}, | ||
88 | + { ST7735_DELAY, 150}, | ||
89 | + { ST7735_CMD, ST7735_SLPOUT}, | ||
90 | + { ST7735_DELAY, 500}, | ||
91 | + { ST7735_CMD, ST7735_FRMCTR1}, | ||
92 | + { ST7735_DATA, 0x01}, | ||
93 | + { ST7735_DATA, 0x2c}, | ||
94 | + { ST7735_DATA, 0x2d}, | ||
95 | + { ST7735_CMD, ST7735_FRMCTR2}, | ||
96 | + { ST7735_DATA, 0x01}, | ||
97 | + { ST7735_DATA, 0x2c}, | ||
98 | + { ST7735_DATA, 0x2d}, | ||
99 | + { ST7735_CMD, ST7735_FRMCTR3}, | ||
100 | + { ST7735_DATA, 0x01}, | ||
101 | + { ST7735_DATA, 0x2c}, | ||
102 | + { ST7735_DATA, 0x2d}, | ||
103 | + { ST7735_DATA, 0x01}, | ||
104 | + { ST7735_DATA, 0x2c}, | ||
105 | + { ST7735_DATA, 0x2d}, | ||
106 | + { ST7735_CMD, ST7735_INVCTR}, | ||
107 | + { ST7735_DATA, 0x07}, | ||
108 | + { ST7735_CMD, ST7735_PWCTR1}, | ||
109 | + { ST7735_DATA, 0xa2}, | ||
110 | + { ST7735_DATA, 0x02}, | ||
111 | + { ST7735_DATA, 0x84}, | ||
112 | + { ST7735_CMD, ST7735_PWCTR2}, | ||
113 | + { ST7735_DATA, 0xc5}, | ||
114 | + { ST7735_CMD, ST7735_PWCTR3}, | ||
115 | + { ST7735_DATA, 0x0a}, | ||
116 | + { ST7735_DATA, 0x00}, | ||
117 | + { ST7735_CMD, ST7735_PWCTR4}, | ||
118 | + { ST7735_DATA, 0x8a}, | ||
119 | + { ST7735_DATA, 0x2a}, | ||
120 | + { ST7735_CMD, ST7735_PWCTR5}, | ||
121 | + { ST7735_DATA, 0x8a}, | ||
122 | + { ST7735_DATA, 0xee}, | ||
123 | + { ST7735_CMD, ST7735_VMCTR1}, | ||
124 | + { ST7735_DATA, 0x0e}, | ||
125 | + { ST7735_CMD, ST7735_INVOFF}, | ||
126 | + { ST7735_CMD, ST7735_MADCTL}, | ||
127 | + { ST7735_DATA, 0xc8}, | ||
128 | + { ST7735_CMD, ST7735_COLMOD}, | ||
129 | + { ST7735_DATA, 0x05}, | ||
130 | + { ST7735_CMD, ST7735_CASET}, | ||
131 | + { ST7735_DATA, 0x00}, | ||
132 | + { ST7735_DATA, 0x00}, | ||
133 | + { ST7735_DATA, 0x00}, | ||
134 | + { ST7735_DATA, 0x00}, | ||
135 | + { ST7735_DATA, 0x7f}, | ||
136 | + { ST7735_CMD, ST7735_RASET}, | ||
137 | + { ST7735_DATA, 0x00}, | ||
138 | + { ST7735_DATA, 0x00}, | ||
139 | + { ST7735_DATA, 0x00}, | ||
140 | + { ST7735_DATA, 0x00}, | ||
141 | + { ST7735_DATA, 0x9f}, | ||
142 | + { ST7735_CMD, ST7735_GMCTRP1}, | ||
143 | + { ST7735_DATA, 0x02}, | ||
144 | + { ST7735_DATA, 0x1c}, | ||
145 | + { ST7735_DATA, 0x07}, | ||
146 | + { ST7735_DATA, 0x12}, | ||
147 | + { ST7735_DATA, 0x37}, | ||
148 | + { ST7735_DATA, 0x32}, | ||
149 | + { ST7735_DATA, 0x29}, | ||
150 | + { ST7735_DATA, 0x2d}, | ||
151 | + { ST7735_DATA, 0x29}, | ||
152 | + { ST7735_DATA, 0x25}, | ||
153 | + { ST7735_DATA, 0x2b}, | ||
154 | + { ST7735_DATA, 0x39}, | ||
155 | + { ST7735_DATA, 0x00}, | ||
156 | + { ST7735_DATA, 0x01}, | ||
157 | + { ST7735_DATA, 0x03}, | ||
158 | + { ST7735_DATA, 0x10}, | ||
159 | + { ST7735_CMD, ST7735_GMCTRN1}, | ||
160 | + { ST7735_DATA, 0x03}, | ||
161 | + { ST7735_DATA, 0x1d}, | ||
162 | + { ST7735_DATA, 0x07}, | ||
163 | + { ST7735_DATA, 0x06}, | ||
164 | + { ST7735_DATA, 0x2e}, | ||
165 | + { ST7735_DATA, 0x2c}, | ||
166 | + { ST7735_DATA, 0x29}, | ||
167 | + { ST7735_DATA, 0x2d}, | ||
168 | + { ST7735_DATA, 0x2e}, | ||
169 | + { ST7735_DATA, 0x2e}, | ||
170 | + { ST7735_DATA, 0x37}, | ||
171 | + { ST7735_DATA, 0x3f}, | ||
172 | + { ST7735_DATA, 0x00}, | ||
173 | + { ST7735_DATA, 0x00}, | ||
174 | + { ST7735_DATA, 0x02}, | ||
175 | + { ST7735_DATA, 0x10}, | ||
176 | + { ST7735_CMD, ST7735_DISPON}, | ||
177 | + { ST7735_DELAY, 100}, | ||
178 | + { ST7735_CMD, ST7735_NORON}, | ||
179 | + { ST7735_DELAY, 10}, | ||
180 | + { ST7735_END, ST7735_END}, | ||
181 | +}; | ||
182 | + | ||
183 | +static struct fb_fix_screeninfo st7735fb_fix __devinitdata = { | ||
184 | + .id = "ST7735", | ||
185 | + .type = FB_TYPE_PACKED_PIXELS, | ||
186 | + .visual = FB_VISUAL_PSEUDOCOLOR, | ||
187 | + .xpanstep = 0, | ||
188 | + .ypanstep = 0, | ||
189 | + .ywrapstep = 0, | ||
190 | + .line_length = WIDTH*BPP/8, | ||
191 | + .accel = FB_ACCEL_NONE, | ||
192 | +}; | ||
193 | + | ||
194 | +static struct fb_var_screeninfo st7735fb_var __devinitdata = { | ||
195 | + .xres = WIDTH, | ||
196 | + .yres = HEIGHT, | ||
197 | + .xres_virtual = WIDTH, | ||
198 | + .yres_virtual = HEIGHT, | ||
199 | + .bits_per_pixel = BPP, | ||
200 | + .nonstd = 1, | ||
201 | +}; | ||
202 | + | ||
203 | +static int st7735_write(struct st7735fb_par *par, u8 data) | ||
204 | +{ | ||
205 | + u8 txbuf[2]; /* allocation from stack must go */ | ||
206 | + | ||
207 | + txbuf[0] = data; | ||
208 | + | ||
209 | + return spi_write(par->spi, &txbuf[0], 1); | ||
210 | +} | ||
211 | + | ||
212 | +static void st7735_write_data(struct st7735fb_par *par, u8 data) | ||
213 | +{ | ||
214 | + int ret = 0; | ||
215 | + | ||
216 | + /* Set data mode */ | ||
217 | + gpio_set_value(par->dc, 1); | ||
218 | + | ||
219 | + ret = st7735_write(par, data); | ||
220 | + if (ret < 0) | ||
221 | + pr_err("%s: write data %02x failed with status %d\n", | ||
222 | + par->info->fix.id, data, ret); | ||
223 | +} | ||
224 | + | ||
225 | +static int st7735_write_data_buf(struct st7735fb_par *par, | ||
226 | + u8 *txbuf, int size) | ||
227 | +{ | ||
228 | + /* Set data mode */ | ||
229 | + gpio_set_value(par->dc, 1); | ||
230 | + | ||
231 | + /* Write entire buffer */ | ||
232 | + return spi_write(par->spi, txbuf, size); | ||
233 | +} | ||
234 | + | ||
235 | +static void st7735_write_cmd(struct st7735fb_par *par, u8 data) | ||
236 | +{ | ||
237 | + int ret = 0; | ||
238 | + | ||
239 | + /* Set command mode */ | ||
240 | + gpio_set_value(par->dc, 0); | ||
241 | + | ||
242 | + ret = st7735_write(par, data); | ||
243 | + if (ret < 0) | ||
244 | + pr_err("%s: write command %02x failed with status %d\n", | ||
245 | + par->info->fix.id, data, ret); | ||
246 | +} | ||
247 | + | ||
248 | +static void st7735_run_cfg_script(struct st7735fb_par *par) | ||
249 | +{ | ||
250 | + int i = 0; | ||
251 | + int end_script = 0; | ||
252 | + | ||
253 | + do { | ||
254 | + switch (st7735_cfg_script[i].cmd) | ||
255 | + { | ||
256 | + case ST7735_START: | ||
257 | + break; | ||
258 | + case ST7735_CMD: | ||
259 | + st7735_write_cmd(par, | ||
260 | + st7735_cfg_script[i].data & 0xff); | ||
261 | + break; | ||
262 | + case ST7735_DATA: | ||
263 | + st7735_write_data(par, | ||
264 | + st7735_cfg_script[i].data & 0xff); | ||
265 | + break; | ||
266 | + case ST7735_DELAY: | ||
267 | + mdelay(st7735_cfg_script[i].data); | ||
268 | + break; | ||
269 | + case ST7735_END: | ||
270 | + end_script = 1; | ||
271 | + } | ||
272 | + i++; | ||
273 | + } while (!end_script); | ||
274 | +} | ||
275 | + | ||
276 | +static void st7735_set_addr_win(struct st7735fb_par *par, | ||
277 | + int xs, int ys, int xe, int ye) | ||
278 | +{ | ||
279 | + st7735_write_cmd(par, ST7735_CASET); | ||
280 | + st7735_write_data(par, 0x00); | ||
281 | + st7735_write_data(par, xs+2); | ||
282 | + st7735_write_data(par, 0x00); | ||
283 | + st7735_write_data(par, xe+2); | ||
284 | + st7735_write_cmd(par, ST7735_RASET); | ||
285 | + st7735_write_data(par, 0x00); | ||
286 | + st7735_write_data(par, ys+1); | ||
287 | + st7735_write_data(par, 0x00); | ||
288 | + st7735_write_data(par, ye+1); | ||
289 | +} | ||
290 | + | ||
291 | +static void st7735_reset(struct st7735fb_par *par) | ||
292 | +{ | ||
293 | + /* Reset controller */ | ||
294 | + gpio_set_value(par->rst, 0); | ||
295 | + udelay(10); | ||
296 | + gpio_set_value(par->rst, 1); | ||
297 | + mdelay(120); | ||
298 | +} | ||
299 | + | ||
300 | +static void st7735fb_update_display(struct st7735fb_par *par) | ||
301 | +{ | ||
302 | + int ret = 0; | ||
303 | + u8 *vmem = par->info->screen_base; | ||
304 | + | ||
305 | + /* | ||
306 | + TODO: | ||
307 | + Allow a subset of pages to be passed in | ||
308 | + (for deferred I/O). Check pages against | ||
309 | + pan display settings to see if they | ||
310 | + should be updated. | ||
311 | + */ | ||
312 | + /* For now, just write the full 40KiB on each update */ | ||
313 | + | ||
314 | + /* Set row/column data window */ | ||
315 | + st7735_set_addr_win(par, 0, 0, WIDTH-1, HEIGHT-1); | ||
316 | + | ||
317 | + /* Internal RAM write command */ | ||
318 | + st7735_write_cmd(par, ST7735_RAMWR); | ||
319 | + | ||
320 | + /* Blast framebuffer to ST7735 internal display RAM */ | ||
321 | + ret = st7735_write_data_buf(par, vmem, WIDTH*HEIGHT*BPP/8); | ||
322 | + if (ret < 0) | ||
323 | + pr_err("%s: spi_write failed to update display buffer\n", | ||
324 | + par->info->fix.id); | ||
325 | +} | ||
326 | + | ||
327 | +static void st7735fb_deferred_io(struct fb_info *info, | ||
328 | + struct list_head *pagelist) | ||
329 | +{ | ||
330 | + st7735fb_update_display(info->par); | ||
331 | +} | ||
332 | + | ||
333 | +static int st7735fb_init_display(struct st7735fb_par *par) | ||
334 | +{ | ||
335 | + /* TODO: Need some error checking on gpios */ | ||
336 | + | ||
337 | + /* Request GPIOs and initialize to default values */ | ||
338 | + gpio_request_one(par->rst, GPIOF_OUT_INIT_HIGH, | ||
339 | + "ST7735 Reset Pin"); | ||
340 | + gpio_request_one(par->dc, GPIOF_OUT_INIT_LOW, | ||
341 | + "ST7735 Data/Command Pin"); | ||
342 | + | ||
343 | + st7735_reset(par); | ||
344 | + | ||
345 | + st7735_run_cfg_script(par); | ||
346 | + | ||
347 | + return 0; | ||
348 | +} | ||
349 | + | ||
350 | +void st7735fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) | ||
351 | +{ | ||
352 | + struct st7735fb_par *par = info->par; | ||
353 | + | ||
354 | + sys_fillrect(info, rect); | ||
355 | + | ||
356 | + st7735fb_update_display(par); | ||
357 | +} | ||
358 | + | ||
359 | +void st7735fb_copyarea(struct fb_info *info, const struct fb_copyarea *area) | ||
360 | +{ | ||
361 | + struct st7735fb_par *par = info->par; | ||
362 | + | ||
363 | + sys_copyarea(info, area); | ||
364 | + | ||
365 | + st7735fb_update_display(par); | ||
366 | +} | ||
367 | + | ||
368 | +void st7735fb_imageblit(struct fb_info *info, const struct fb_image *image) | ||
369 | +{ | ||
370 | + struct st7735fb_par *par = info->par; | ||
371 | + | ||
372 | + sys_imageblit(info, image); | ||
373 | + | ||
374 | + st7735fb_update_display(par); | ||
375 | +} | ||
376 | + | ||
377 | +static ssize_t st7735fb_write(struct fb_info *info, const char __user *buf, | ||
378 | + size_t count, loff_t *ppos) | ||
379 | +{ | ||
380 | + struct st7735fb_par *par = info->par; | ||
381 | + unsigned long p = *ppos; | ||
382 | + void *dst; | ||
383 | + int err = 0; | ||
384 | + unsigned long total_size; | ||
385 | + | ||
386 | + if (info->state != FBINFO_STATE_RUNNING) | ||
387 | + return -EPERM; | ||
388 | + | ||
389 | + total_size = info->fix.smem_len; | ||
390 | + | ||
391 | + if (p > total_size) | ||
392 | + return -EFBIG; | ||
393 | + | ||
394 | + if (count > total_size) { | ||
395 | + err = -EFBIG; | ||
396 | + count = total_size; | ||
397 | + } | ||
398 | + | ||
399 | + if (count + p > total_size) { | ||
400 | + if (!err) | ||
401 | + err = -ENOSPC; | ||
402 | + | ||
403 | + count = total_size - p; | ||
404 | + } | ||
405 | + | ||
406 | + dst = (void __force *) (info->screen_base + p); | ||
407 | + | ||
408 | + if (copy_from_user(dst, buf, count)) | ||
409 | + err = -EFAULT; | ||
410 | + | ||
411 | + if (!err) | ||
412 | + *ppos += count; | ||
413 | + | ||
414 | + st7735fb_update_display(par); | ||
415 | + | ||
416 | + return (err) ? err : count; | ||
417 | +} | ||
418 | + | ||
419 | +static struct fb_ops st7735fb_ops = { | ||
420 | + .owner = THIS_MODULE, | ||
421 | + .fb_read = fb_sys_read, | ||
422 | + .fb_write = st7735fb_write, | ||
423 | + .fb_fillrect = st7735fb_fillrect, | ||
424 | + .fb_copyarea = st7735fb_copyarea, | ||
425 | + .fb_imageblit = st7735fb_imageblit, | ||
426 | +}; | ||
427 | + | ||
428 | +static struct fb_deferred_io st7735fb_defio = { | ||
429 | + .delay = HZ, | ||
430 | + .deferred_io = st7735fb_deferred_io, | ||
431 | +}; | ||
432 | + | ||
433 | +static int __devinit st7735fb_probe (struct spi_device *spi) | ||
434 | +{ | ||
435 | + int chip = spi_get_device_id(spi)->driver_data; | ||
436 | + struct st7735fb_platform_data *pdata = spi->dev.platform_data; | ||
437 | + int vmem_size = WIDTH*HEIGHT*BPP/8; | ||
438 | + u8 *vmem; | ||
439 | + struct fb_info *info; | ||
440 | + struct st7735fb_par *par; | ||
441 | + int retval = -ENOMEM; | ||
442 | + | ||
443 | + if (chip != ST7735_DISPLAY_AF_TFT18) { | ||
444 | + pr_err("%s: only the %s device is supported\n", DRVNAME, | ||
445 | + to_spi_driver(spi->dev.driver)->id_table->name); | ||
446 | + return -EINVAL; | ||
447 | + } | ||
448 | + | ||
449 | + if (!pdata) { | ||
450 | + pr_err("%s: platform data required for rst and dc info\n", | ||
451 | + DRVNAME); | ||
452 | + return -EINVAL; | ||
453 | + } | ||
454 | + | ||
455 | + vmem = vzalloc(vmem_size); | ||
456 | + if (!vmem) | ||
457 | + return retval; | ||
458 | + | ||
459 | + info = framebuffer_alloc(sizeof(struct st7735fb_par), &spi->dev); | ||
460 | + if (!info) | ||
461 | + goto fballoc_fail; | ||
462 | + | ||
463 | + info->screen_base = (u8 __force __iomem *)vmem; | ||
464 | + info->fbops = &st7735fb_ops; | ||
465 | + info->fix = st7735fb_fix; | ||
466 | + info->fix.smem_len = vmem_size; | ||
467 | + info->var = st7735fb_var; | ||
468 | + /* Choose any packed pixel format as long as it's RGB565 */ | ||
469 | + info->var.red.offset = 11; | ||
470 | + info->var.red.length = 5; | ||
471 | + info->var.green.offset = 5; | ||
472 | + info->var.green.length = 6; | ||
473 | + info->var.blue.offset = 0; | ||
474 | + info->var.blue.length = 5; | ||
475 | + info->var.transp.offset = 0; | ||
476 | + info->var.transp.length = 0; | ||
477 | + info->flags = FBINFO_FLAG_DEFAULT | | ||
478 | +#ifdef __LITTLE_ENDIAN | ||
479 | + FBINFO_FOREIGN_ENDIAN | | ||
480 | +#endif | ||
481 | + FBINFO_VIRTFB; | ||
482 | + | ||
483 | + info->fbdefio = &st7735fb_defio; | ||
484 | + fb_deferred_io_init(info); | ||
485 | + | ||
486 | + par = info->par; | ||
487 | + par->info = info; | ||
488 | + par->spi = spi; | ||
489 | + par->rst = pdata->rst_gpio; | ||
490 | + par->dc = pdata->dc_gpio; | ||
491 | + | ||
492 | + retval = register_framebuffer(info); | ||
493 | + if (retval < 0) | ||
494 | + goto fbreg_fail; | ||
495 | + | ||
496 | + spi_set_drvdata(spi, info); | ||
497 | + | ||
498 | + retval = st7735fb_init_display(par); | ||
499 | + if (retval < 0) | ||
500 | + goto init_fail; | ||
501 | + | ||
502 | + printk(KERN_INFO | ||
503 | + "fb%d: %s frame buffer device,\n\tusing %d KiB of video memory\n", | ||
504 | + info->node, info->fix.id, vmem_size); | ||
505 | + | ||
506 | + return 0; | ||
507 | + | ||
508 | + | ||
509 | + /* TODO: release gpios on fail */ | ||
510 | +init_fail: | ||
511 | + spi_set_drvdata(spi, NULL); | ||
512 | + | ||
513 | +fbreg_fail: | ||
514 | + framebuffer_release(info); | ||
515 | + | ||
516 | +fballoc_fail: | ||
517 | + vfree(vmem); | ||
518 | + | ||
519 | + return retval; | ||
520 | +} | ||
521 | + | ||
522 | +static int __devexit st7735fb_remove(struct spi_device *spi) | ||
523 | +{ | ||
524 | + struct fb_info *info = spi_get_drvdata(spi); | ||
525 | + | ||
526 | + spi_set_drvdata(spi, NULL); | ||
527 | + | ||
528 | + if (info) { | ||
529 | + unregister_framebuffer(info); | ||
530 | + vfree(info->screen_base); | ||
531 | + framebuffer_release(info); | ||
532 | + } | ||
533 | + | ||
534 | + /* TODO: release gpios */ | ||
535 | + | ||
536 | + return 0; | ||
537 | +} | ||
538 | + | ||
539 | +static const struct spi_device_id st7735fb_ids[] = { | ||
540 | + { "adafruit_tft18", ST7735_DISPLAY_AF_TFT18 }, | ||
541 | + { }, | ||
542 | +}; | ||
543 | + | ||
544 | +MODULE_DEVICE_TABLE(spi, st7735fb_ids); | ||
545 | + | ||
546 | +static struct spi_driver st7735fb_driver = { | ||
547 | + .driver = { | ||
548 | + .name = "st7735fb", | ||
549 | + .owner = THIS_MODULE, | ||
550 | + }, | ||
551 | + .id_table = st7735fb_ids, | ||
552 | + .probe = st7735fb_probe, | ||
553 | + .remove = __devexit_p(st7735fb_remove), | ||
554 | +}; | ||
555 | + | ||
556 | +static int __init st7735fb_init(void) | ||
557 | +{ | ||
558 | + return spi_register_driver(&st7735fb_driver); | ||
559 | +} | ||
560 | + | ||
561 | +static void __exit st7735fb_exit(void) | ||
562 | +{ | ||
563 | + spi_unregister_driver(&st7735fb_driver); | ||
564 | +} | ||
565 | + | ||
566 | +/* ------------------------------------------------------------------------- */ | ||
567 | + | ||
568 | +module_init(st7735fb_init); | ||
569 | +module_exit(st7735fb_exit); | ||
570 | + | ||
571 | +MODULE_DESCRIPTION("FB driver for ST7735 display controller"); | ||
572 | +MODULE_AUTHOR("Matt Porter"); | ||
573 | +MODULE_LICENSE("GPL"); | ||
574 | diff --git a/include/video/st7735fb.h b/include/video/st7735fb.h | ||
575 | new file mode 100644 | ||
576 | index 0000000..250f036 | ||
577 | --- /dev/null | ||
578 | +++ b/include/video/st7735fb.h | ||
579 | @@ -0,0 +1,86 @@ | ||
580 | +/* | ||
581 | + * linux/include/video/st7735fb.h -- FB driver for ST7735 LCD controller | ||
582 | + * | ||
583 | + * Copyright (C) 2011, Matt Porter | ||
584 | + * | ||
585 | + * This file is subject to the terms and conditions of the GNU General Public | ||
586 | + * License. See the file COPYING in the main directory of this archive for | ||
587 | + * more details. | ||
588 | + */ | ||
589 | + | ||
590 | +#define DRVNAME "st7735fb" | ||
591 | +#define WIDTH 128 | ||
592 | +#define HEIGHT 160 | ||
593 | +#define BPP 16 | ||
594 | + | ||
595 | +/* Supported display modules */ | ||
596 | +#define ST7735_DISPLAY_AF_TFT18 0 /* Adafruit SPI TFT 1.8" */ | ||
597 | + | ||
598 | +/* Init script function */ | ||
599 | +struct st7735_function { | ||
600 | + u16 cmd; | ||
601 | + u16 data; | ||
602 | +}; | ||
603 | + | ||
604 | +/* Init script commands */ | ||
605 | +enum st7735_cmd { | ||
606 | + ST7735_START, | ||
607 | + ST7735_END, | ||
608 | + ST7735_CMD, | ||
609 | + ST7735_DATA, | ||
610 | + ST7735_DELAY | ||
611 | +}; | ||
612 | + | ||
613 | +struct st7735fb_par { | ||
614 | + struct spi_device *spi; | ||
615 | + struct fb_info *info; | ||
616 | + int rst; | ||
617 | + int dc; | ||
618 | +}; | ||
619 | + | ||
620 | +struct st7735fb_platform_data { | ||
621 | + int rst_gpio; | ||
622 | + int dc_gpio; | ||
623 | +}; | ||
624 | + | ||
625 | +/* ST7735 Commands */ | ||
626 | +#define ST7735_NOP 0x0 | ||
627 | +#define ST7735_SWRESET 0x01 | ||
628 | +#define ST7735_RDDID 0x04 | ||
629 | +#define ST7735_RDDST 0x09 | ||
630 | +#define ST7735_SLPIN 0x10 | ||
631 | +#define ST7735_SLPOUT 0x11 | ||
632 | +#define ST7735_PTLON 0x12 | ||
633 | +#define ST7735_NORON 0x13 | ||
634 | +#define ST7735_INVOFF 0x20 | ||
635 | +#define ST7735_INVON 0x21 | ||
636 | +#define ST7735_DISPOFF 0x28 | ||
637 | +#define ST7735_DISPON 0x29 | ||
638 | +#define ST7735_CASET 0x2A | ||
639 | +#define ST7735_RASET 0x2B | ||
640 | +#define ST7735_RAMWR 0x2C | ||
641 | +#define ST7735_RAMRD 0x2E | ||
642 | +#define ST7735_COLMOD 0x3A | ||
643 | +#define ST7735_MADCTL 0x36 | ||
644 | +#define ST7735_FRMCTR1 0xB1 | ||
645 | +#define ST7735_FRMCTR2 0xB2 | ||
646 | +#define ST7735_FRMCTR3 0xB3 | ||
647 | +#define ST7735_INVCTR 0xB4 | ||
648 | +#define ST7735_DISSET5 0xB6 | ||
649 | +#define ST7735_PWCTR1 0xC0 | ||
650 | +#define ST7735_PWCTR2 0xC1 | ||
651 | +#define ST7735_PWCTR3 0xC2 | ||
652 | +#define ST7735_PWCTR4 0xC3 | ||
653 | +#define ST7735_PWCTR5 0xC4 | ||
654 | +#define ST7735_VMCTR1 0xC5 | ||
655 | +#define ST7735_RDID1 0xDA | ||
656 | +#define ST7735_RDID2 0xDB | ||
657 | +#define ST7735_RDID3 0xDC | ||
658 | +#define ST7735_RDID4 0xDD | ||
659 | +#define ST7735_GMCTRP1 0xE0 | ||
660 | +#define ST7735_GMCTRN1 0xE1 | ||
661 | +#define ST7735_PWCTR6 0xFC | ||
662 | + | ||
663 | + | ||
664 | + | ||
665 | + | ||
666 | -- | ||
667 | 1.7.7.4 | ||
668 | |||
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 fc8d3132..50f6c537 100644 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/defconfig +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/defconfig | |||
@@ -2285,14 +2285,14 @@ CONFIG_FB_CFB_FILLRECT=y | |||
2285 | CONFIG_FB_CFB_COPYAREA=y | 2285 | CONFIG_FB_CFB_COPYAREA=y |
2286 | CONFIG_FB_CFB_IMAGEBLIT=y | 2286 | CONFIG_FB_CFB_IMAGEBLIT=y |
2287 | # CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set | 2287 | # CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set |
2288 | CONFIG_FB_SYS_FILLRECT=m | 2288 | CONFIG_FB_SYS_FILLRECT=y |
2289 | CONFIG_FB_SYS_COPYAREA=m | 2289 | CONFIG_FB_SYS_COPYAREA=y |
2290 | CONFIG_FB_SYS_IMAGEBLIT=m | 2290 | CONFIG_FB_SYS_IMAGEBLIT=y |
2291 | CONFIG_FB_FOREIGN_ENDIAN=y | 2291 | CONFIG_FB_FOREIGN_ENDIAN=y |
2292 | CONFIG_FB_BOTH_ENDIAN=y | 2292 | CONFIG_FB_BOTH_ENDIAN=y |
2293 | # CONFIG_FB_BIG_ENDIAN is not set | 2293 | # CONFIG_FB_BIG_ENDIAN is not set |
2294 | # CONFIG_FB_LITTLE_ENDIAN is not set | 2294 | # CONFIG_FB_LITTLE_ENDIAN is not set |
2295 | CONFIG_FB_SYS_FOPS=m | 2295 | CONFIG_FB_SYS_FOPS=y |
2296 | # CONFIG_FB_WMT_GE_ROPS is not set | 2296 | # CONFIG_FB_WMT_GE_ROPS is not set |
2297 | CONFIG_FB_DEFERRED_IO=y | 2297 | CONFIG_FB_DEFERRED_IO=y |
2298 | # CONFIG_FB_SVGALIB is not set | 2298 | # CONFIG_FB_SVGALIB is not set |
@@ -2314,6 +2314,7 @@ CONFIG_FB_DA8XX_CONSISTENT_DMA_SIZE=4 | |||
2314 | # CONFIG_FB_VIRTUAL is not set | 2314 | # CONFIG_FB_VIRTUAL is not set |
2315 | # CONFIG_FB_METRONOME is not set | 2315 | # CONFIG_FB_METRONOME is not set |
2316 | # CONFIG_FB_BROADSHEET is not set | 2316 | # CONFIG_FB_BROADSHEET is not set |
2317 | CONFIG_FB_ST7735=y | ||
2317 | # CONFIG_FB_OMAP_BOOTLOADER_INIT is not set | 2318 | # CONFIG_FB_OMAP_BOOTLOADER_INIT is not set |
2318 | CONFIG_OMAP2_VRAM=y | 2319 | CONFIG_OMAP2_VRAM=y |
2319 | CONFIG_OMAP2_VRFB=y | 2320 | CONFIG_OMAP2_VRFB=y |
diff --git a/recipes-kernel/linux/linux-ti33x-psp_3.2.bb b/recipes-kernel/linux/linux-ti33x-psp_3.2.bb index 61396791..aa6d0566 100644 --- a/recipes-kernel/linux/linux-ti33x-psp_3.2.bb +++ b/recipes-kernel/linux/linux-ti33x-psp_3.2.bb | |||
@@ -11,7 +11,7 @@ MULTI_CONFIG_BASE_SUFFIX = "" | |||
11 | 11 | ||
12 | BRANCH = "v3.2-staging" | 12 | BRANCH = "v3.2-staging" |
13 | SRCREV = "83d907e1b05dabc44f3bb64532d7b58d059a14c0" | 13 | SRCREV = "83d907e1b05dabc44f3bb64532d7b58d059a14c0" |
14 | MACHINE_KERNEL_PR_append = "a+gitr${SRCREV}" | 14 | MACHINE_KERNEL_PR_append = "b+gitr${SRCREV}" |
15 | 15 | ||
16 | COMPATIBLE_MACHINE = "(ti33x)" | 16 | COMPATIBLE_MACHINE = "(ti33x)" |
17 | 17 | ||
@@ -40,7 +40,12 @@ PATCHES_OVER_PSP = " \ | |||
40 | file://0013-meta-ti-Remove-debug-messages-for-meta-ti.patch \ | 40 | file://0013-meta-ti-Remove-debug-messages-for-meta-ti.patch \ |
41 | file://0014-tscadc-switch-to-polling-instead-of-interrupts.patch \ | 41 | file://0014-tscadc-switch-to-polling-instead-of-interrupts.patch \ |
42 | file://0015-beaglebone-fix-ADC-init.patch \ | 42 | file://0015-beaglebone-fix-ADC-init.patch \ |
43 | file://0017-AM335x-MUX-add-ehrpwm1A.patch \ | ||
44 | file://0018-beaglebone-enable-PWM-for-lcd-backlight-backlight-is.patch \ | ||
45 | file://0019-omap_hsmmc-Set-dto-to-max-value-of-14-to-avoid-SD-Ca.patch \ | ||
46 | file://0020-beaglebone-set-default-brightness-to-50-for-pwm-back.patch \ | ||
47 | file://0021-st7735fb-WIP-framebuffer-driver-supporting-Adafruit-.patch \ | ||
43 | " | 48 | " |
44 | 49 | ||
45 | SRC_URI += "${@base_contains('DISTRO_FEATURES', 'tipspkernel', "", "${PATCHES_OVER_PSP}", d)}" | 50 | SRC_URI += "${@base_contains('DISTRO_FEATURES', 'tipspkernel', "", "${PATCHES_OVER_PSP}", d)}" |
46 | SRC_URI_append_beaglebone = " file://logo_linux_clut224.ppm" | 51 | |