diff options
author | Koen Kooi <koen@dominion.thruhere.net> | 2012-06-07 17:40:39 +0200 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2012-06-11 16:59:07 -0400 |
commit | 3dde332e522f2c38e25e11d3bd484410a002c55e (patch) | |
tree | fb7939755366f39693df41bec9d9b597785bb937 | |
parent | 4f684c71cc3a1624bc5fa26bfe02e963ee4b22ca (diff) | |
download | meta-ti-3dde332e522f2c38e25e11d3bd484410a002c55e.tar.gz |
linux-ti33x-psp 3.2: switch ADC to 16x averaging, disable 275MHz, add 4.3" LCD support
* The switch to 16x averaging is done to combat the excessive noise in the
signal. It's still *very* bad, but the TS cursor jitter has decreased a bit
* The OPP for 275MHz was disabled due to all the errata. Both the EMIF and MUSB
don't seem to like that OPP.
* The resistive touch version of the 4.3" LCD cape is supported in 24 bit mode.
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
5 files changed, 225 insertions, 1 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0065-ti_tscadc-switch-to-16x-averaging.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0065-ti_tscadc-switch-to-16x-averaging.patch new file mode 100644 index 00000000..ae5a4f99 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0065-ti_tscadc-switch-to-16x-averaging.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From 979f76376236287b2e4d4b4505ed34b1f9c9d389 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Mon, 28 May 2012 09:56:45 +0200 | ||
4 | Subject: [PATCH 65/68] ti_tscadc: switch to 16x averaging | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | drivers/input/touchscreen/ti_tscadc.c | 8 ++++---- | ||
9 | 1 files changed, 4 insertions(+), 4 deletions(-) | ||
10 | |||
11 | diff --git a/drivers/input/touchscreen/ti_tscadc.c b/drivers/input/touchscreen/ti_tscadc.c | ||
12 | index 7df7bb2..ae6c4c4 100644 | ||
13 | --- a/drivers/input/touchscreen/ti_tscadc.c | ||
14 | +++ b/drivers/input/touchscreen/ti_tscadc.c | ||
15 | @@ -161,7 +161,7 @@ static void tsc_adc_step_config(struct tscadc *ts_dev, int channel) | ||
16 | * sample channel 1 (SEL_INP mux bits = 0) | ||
17 | */ | ||
18 | stepconfig = TSCADC_STEPCONFIG_MODE_SWONESHOT | | ||
19 | - TSCADC_STEPCONFIG_4SAMPLES_AVG | | ||
20 | + TSCADC_STEPCONFIG_16SAMPLES_AVG | | ||
21 | ((channel-1) << 19); | ||
22 | |||
23 | delay = TSCADC_STEPCONFIG_SAMPLEDLY | TSCADC_STEPCONFIG_OPENDLY; | ||
24 | @@ -242,7 +242,7 @@ static void tsc_step_config(struct tscadc *ts_dev) | ||
25 | delay = TSCADC_STEPCONFIG_SAMPLEDLY | TSCADC_STEPCONFIG_OPENDLY; | ||
26 | |||
27 | stepconfigx = TSCADC_STEPCONFIG_MODE_HWSYNC | | ||
28 | - TSCADC_STEPCONFIG_4SAMPLES_AVG | TSCADC_STEPCONFIG_XPP; | ||
29 | + TSCADC_STEPCONFIG_16SAMPLES_AVG | TSCADC_STEPCONFIG_XPP; | ||
30 | |||
31 | switch (ts_dev->wires) { | ||
32 | case 4: | ||
33 | @@ -279,7 +279,7 @@ static void tsc_step_config(struct tscadc *ts_dev) | ||
34 | } | ||
35 | |||
36 | stepconfigy = TSCADC_STEPCONFIG_MODE_HWSYNC | | ||
37 | - TSCADC_STEPCONFIG_4SAMPLES_AVG | TSCADC_STEPCONFIG_YNN | | ||
38 | + TSCADC_STEPCONFIG_16SAMPLES_AVG | TSCADC_STEPCONFIG_YNN | | ||
39 | TSCADC_STEPCONFIG_INM | TSCADC_STEPCONFIG_FIFO1; | ||
40 | switch (ts_dev->wires) { | ||
41 | case 4: | ||
42 | @@ -324,7 +324,7 @@ static void tsc_step_config(struct tscadc *ts_dev) | ||
43 | |||
44 | /* Configure to calculate pressure */ | ||
45 | stepconfigz1 = TSCADC_STEPCONFIG_MODE_HWSYNC | | ||
46 | - TSCADC_STEPCONFIG_4SAMPLES_AVG | | ||
47 | + TSCADC_STEPCONFIG_16SAMPLES_AVG | | ||
48 | TSCADC_STEPCONFIG_XNP | | ||
49 | TSCADC_STEPCONFIG_YPN | TSCADC_STEPCONFIG_INM; | ||
50 | stepconfigz2 = stepconfigz1 | TSCADC_STEPCONFIG_Z1 | | ||
51 | -- | ||
52 | 1.7.7.6 | ||
53 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0066-beaglebone-disable-OPP-for-275MHz-due-to-silicon-err.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0066-beaglebone-disable-OPP-for-275MHz-due-to-silicon-err.patch new file mode 100644 index 00000000..aae97bbe --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0066-beaglebone-disable-OPP-for-275MHz-due-to-silicon-err.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From 954d199a0e9aaa4d7dbc7215cea0225cd3ffe186 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Mon, 28 May 2012 18:54:57 +0200 | ||
4 | Subject: [PATCH 66/68] beaglebone: disable OPP for 275MHz due to silicon | ||
5 | errata | ||
6 | |||
7 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
8 | --- | ||
9 | arch/arm/mach-omap2/board-am335xevm.c | 3 +++ | ||
10 | 1 files changed, 3 insertions(+), 0 deletions(-) | ||
11 | |||
12 | diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c | ||
13 | index da6020b..58c2754 100644 | ||
14 | --- a/arch/arm/mach-omap2/board-am335xevm.c | ||
15 | +++ b/arch/arm/mach-omap2/board-am335xevm.c | ||
16 | @@ -2975,6 +2975,9 @@ static void tps65217_init(int evm_id, int profile) | ||
17 | return; | ||
18 | } | ||
19 | |||
20 | + pr_info("Disabling OPP for 275MHz due to silicon errata"); | ||
21 | + opp_disable(mpu_dev, 275000000); | ||
22 | + | ||
23 | if (!(val & TPS65217_STATUS_ACPWR)) { | ||
24 | /* If powered by USB then disable OPP120 and OPPTURBO */ | ||
25 | pr_info("Maximum current provided by the USB port is 500mA" | ||
26 | -- | ||
27 | 1.7.7.6 | ||
28 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0067-video-da8xx-fb-Add-Newhaven-LCD-Panel-details.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0067-video-da8xx-fb-Add-Newhaven-LCD-Panel-details.patch new file mode 100644 index 00000000..27431b8a --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0067-video-da8xx-fb-Add-Newhaven-LCD-Panel-details.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From 3f166417b837d6fb44e1003a2286876cb5c682b4 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Patil, Rachna" <rachna@ti.com> | ||
3 | Date: Thu, 26 Apr 2012 15:20:20 +0530 | ||
4 | Subject: [PATCH 67/68] video: da8xx-fb: Add Newhaven LCD Panel details | ||
5 | |||
6 | This patch adds details for Newhaven display Panel. | ||
7 | This panel is used on AM335x EVM-SK An upcoming TI EVM. | ||
8 | |||
9 | Signed-off-by: Patil, Rachna <rachna@ti.com> | ||
10 | |||
11 | Conflicts: | ||
12 | |||
13 | drivers/video/da8xx-fb.c | ||
14 | --- | ||
15 | drivers/video/da8xx-fb.c | 14 ++++++++++++++ | ||
16 | 1 files changed, 14 insertions(+), 0 deletions(-) | ||
17 | |||
18 | diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c | ||
19 | index 9aaca5d..010a8bc 100644 | ||
20 | --- a/drivers/video/da8xx-fb.c | ||
21 | +++ b/drivers/video/da8xx-fb.c | ||
22 | @@ -301,6 +301,20 @@ static struct da8xx_panel known_lcd_panels[] = { | ||
23 | .pxl_clk = 8000000, | ||
24 | .invert_pxl_clk = 0, | ||
25 | }, | ||
26 | + /* Newhaven Display */ | ||
27 | + [5] = { | ||
28 | + .name = "NHD-4.3-ATXI#-T-1", | ||
29 | + .width = 480, | ||
30 | + .height = 272, | ||
31 | + .hfp = 8, | ||
32 | + .hbp = 43, | ||
33 | + .hsw = 4, | ||
34 | + .vfp = 4, | ||
35 | + .vbp = 12, | ||
36 | + .vsw = 10, | ||
37 | + .pxl_clk = 9000000, | ||
38 | + .invert_pxl_clk = 0, | ||
39 | + }, | ||
40 | }; | ||
41 | |||
42 | /* Enable the Raster Engine of the LCD Controller */ | ||
43 | -- | ||
44 | 1.7.7.6 | ||
45 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0068-beaglebone-add-support-for-the-4.3-lcd-cape-with-res.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0068-beaglebone-add-support-for-the-4.3-lcd-cape-with-res.patch new file mode 100644 index 00000000..6d2ab2a3 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/0068-beaglebone-add-support-for-the-4.3-lcd-cape-with-res.patch | |||
@@ -0,0 +1,94 @@ | |||
1 | From 6b69dbc7cee48dfa9ff281ae918cc468ed38a537 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Tue, 29 May 2012 14:12:44 +0200 | ||
4 | Subject: [PATCH 68/68] beaglebone: add support for the 4.3" lcd cape with | ||
5 | resistive touchscreen | ||
6 | |||
7 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
8 | --- | ||
9 | arch/arm/mach-omap2/board-am335xevm.c | 48 +++++++++++++++++++++++++++----- | ||
10 | 1 files changed, 40 insertions(+), 8 deletions(-) | ||
11 | |||
12 | diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c | ||
13 | index 58c2754..bb6049a 100644 | ||
14 | --- a/arch/arm/mach-omap2/board-am335xevm.c | ||
15 | +++ b/arch/arm/mach-omap2/board-am335xevm.c | ||
16 | @@ -272,6 +272,12 @@ struct da8xx_lcdc_platform_data bbtoys35_pdata = { | ||
17 | .type = "CDTech_S035Q01", | ||
18 | }; | ||
19 | |||
20 | +struct da8xx_lcdc_platform_data bbtoys43_pdata = { | ||
21 | + .manu_name = "BBToys", | ||
22 | + .controller_data = &lcd_cfg, | ||
23 | + .type = "NHD-4.3-ATXI#-T-1", | ||
24 | +}; | ||
25 | + | ||
26 | static const struct display_panel dvi_panel = { | ||
27 | WVGA, | ||
28 | 16, | ||
29 | @@ -562,14 +568,14 @@ static struct pinmux_config batterycape_pin_mux[] = { | ||
30 | |||
31 | /* Module pin mux for LCDC */ | ||
32 | static struct pinmux_config lcdc_pin_mux[] = { | ||
33 | - {"gpmc_ad8.lcd_data16", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | ||
34 | - {"gpmc_ad9.lcd_data17", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | ||
35 | - {"gpmc_ad10.lcd_data18", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | ||
36 | - {"gpmc_ad11.lcd_data19", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | ||
37 | - {"gpmc_ad12.lcd_data20", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | ||
38 | - {"gpmc_ad13.lcd_data21", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | ||
39 | - {"gpmc_ad14.lcd_data22", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | ||
40 | - {"gpmc_ad15.lcd_data23", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | ||
41 | + {"gpmc_ad8.lcd_data23", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | ||
42 | + {"gpmc_ad9.lcd_data22", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | ||
43 | + {"gpmc_ad10.lcd_data21", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | ||
44 | + {"gpmc_ad11.lcd_data20", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | ||
45 | + {"gpmc_ad12.lcd_data19", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | ||
46 | + {"gpmc_ad13.lcd_data18", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | ||
47 | + {"gpmc_ad14.lcd_data17", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | ||
48 | + {"gpmc_ad15.lcd_data16", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | ||
49 | {NULL, 0}, | ||
50 | }; | ||
51 | |||
52 | @@ -1659,6 +1665,24 @@ static void bbtoys35lcd_init(int evm_id, int profile) | ||
53 | return; | ||
54 | } | ||
55 | |||
56 | +static void bbtoys43lcd_init(int evm_id, int profile) | ||
57 | +{ | ||
58 | + setup_pin_mux(lcdc16_pin_mux); | ||
59 | + setup_pin_mux(lcdc_pin_mux); | ||
60 | + | ||
61 | + // we are being stupid and setting pixclock from here instead of da8xx-fb.c | ||
62 | + if (conf_disp_pll(18000000)) { | ||
63 | + pr_info("Failed to set pixclock to 18000000, not attempting to" | ||
64 | + "register LCD cape\n"); | ||
65 | + return; | ||
66 | + } | ||
67 | + | ||
68 | + if (am33xx_register_lcdc(&bbtoys43_pdata)) | ||
69 | + pr_info("Failed to register Beagleboardtoys 4.3\" LCD cape device\n"); | ||
70 | + | ||
71 | + return; | ||
72 | +} | ||
73 | + | ||
74 | #define BEAGLEBONEDVI_PDn_A1 GPIO_TO_PIN(1, 7) | ||
75 | #define BEAGLEBONEDVI_PDn_A2 GPIO_TO_PIN(1, 31) | ||
76 | |||
77 | @@ -2672,6 +2696,14 @@ static void beaglebone_cape_setup(struct memory_accessor *mem_acc, void *context | ||
78 | beaglebone_leds_free = 0; | ||
79 | lcd3leds_init(0,0); | ||
80 | } | ||
81 | + | ||
82 | + if (!strncmp("BB-BONE-LCD4-01", cape_config.partnumber, 15)) { | ||
83 | + pr_info("BeagleBone cape: initializing LCD cape\n"); | ||
84 | + bbtoys43lcd_init(0,0); | ||
85 | + pr_info("BeagleBone cape: initializing LCD cape touchscreen\n"); | ||
86 | + tsc_init(0,0); | ||
87 | + beaglebone_tsadcpins_free = 0; | ||
88 | + } | ||
89 | |||
90 | if (!strncmp("BB-BONE-VGA-01", cape_config.partnumber, 14)) { | ||
91 | pr_info("BeagleBone cape: initializing VGA cape\n"); | ||
92 | -- | ||
93 | 1.7.7.6 | ||
94 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp_3.2.bb b/recipes-kernel/linux/linux-ti33x-psp_3.2.bb index cd100444..46a6277f 100644 --- a/recipes-kernel/linux/linux-ti33x-psp_3.2.bb +++ b/recipes-kernel/linux/linux-ti33x-psp_3.2.bb | |||
@@ -15,7 +15,7 @@ PV = "${@base_contains('DISTRO_FEATURES', 'tipspkernel', "3.2", "3.2.18", d)}" | |||
15 | 15 | ||
16 | BRANCH = "v3.2-staging" | 16 | BRANCH = "v3.2-staging" |
17 | SRCREV = "720e07b4c1f687b61b147b31c698cb6816d72f01" | 17 | SRCREV = "720e07b4c1f687b61b147b31c698cb6816d72f01" |
18 | MACHINE_KERNEL_PR_append = "c+gitr${SRCREV}" | 18 | MACHINE_KERNEL_PR_append = "d+gitr${SRCREV}" |
19 | 19 | ||
20 | COMPATIBLE_MACHINE = "(ti33x)" | 20 | COMPATIBLE_MACHINE = "(ti33x)" |
21 | 21 | ||
@@ -1224,4 +1224,8 @@ PATCHES_OVER_PSP = " \ | |||
1224 | file://beaglebone/0062-da8xx-fb-Rounding-FB-size-to-satisfy-SGX-buffer-requ.patch \ | 1224 | file://beaglebone/0062-da8xx-fb-Rounding-FB-size-to-satisfy-SGX-buffer-requ.patch \ |
1225 | file://beaglebone/0063-beaglebone-dvi-cape-audio-hacks.patch \ | 1225 | file://beaglebone/0063-beaglebone-dvi-cape-audio-hacks.patch \ |
1226 | file://beaglebone/0064-beaglebone-always-execute-the-pin-free-checks.patch \ | 1226 | file://beaglebone/0064-beaglebone-always-execute-the-pin-free-checks.patch \ |
1227 | file://beaglebone/0065-ti_tscadc-switch-to-16x-averaging.patch \ | ||
1228 | file://beaglebone/0066-beaglebone-disable-OPP-for-275MHz-due-to-silicon-err.patch \ | ||
1229 | file://beaglebone/0067-video-da8xx-fb-Add-Newhaven-LCD-Panel-details.patch \ | ||
1230 | file://beaglebone/0068-beaglebone-add-support-for-the-4.3-lcd-cape-with-res.patch \ | ||
1227 | " | 1231 | " |