* Re: [PATCH] ARM: mach-shmobile: ap4evb: modify FSI2 ID
2010-08-18 3:37 [PATCH] ARM: mach-shmobile: ap4evb: modify FSI2 ID Kuninori Morimoto
@ 2010-08-18 7:31 ` Paul Mundt
2010-08-27 9:49 ` [PATCH] ARM: mach-shmobile: ap4evb: modify tsc2007 platform settings Kuninori Morimoto
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Paul Mundt @ 2010-08-18 7:31 UTC (permalink / raw)
To: linux-sh
On Wed, Aug 18, 2010 at 12:37:19PM +0900, Kuninori Morimoto wrote:
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> arch/arm/mach-shmobile/board-ap4evb.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
Applied, thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH] ARM: mach-shmobile: ap4evb: modify tsc2007 platform settings
2010-08-18 3:37 [PATCH] ARM: mach-shmobile: ap4evb: modify FSI2 ID Kuninori Morimoto
2010-08-18 7:31 ` Paul Mundt
@ 2010-08-27 9:49 ` Kuninori Morimoto
2010-08-27 9:49 ` Kuninori Morimoto
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Kuninori Morimoto @ 2010-08-27 9:49 UTC (permalink / raw)
To: linux-sh
This patch modify x_plate_ohms to correct value for tsc2007,
and removed un-necessary ts_get_pendown_state().
gpio_pull_up() was removed also.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
arch/arm/mach-shmobile/board-ap4evb.c | 51 ++-------------------------------
1 files changed, 3 insertions(+), 48 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index 23d472f..46e75a2 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -716,7 +716,6 @@ device_initcall(hdmi_init_pm_clock);
* FIXME !!
*
* gpio_no_direction
- * gpio_pull_up
* are quick_hack.
*
* current gpio frame work doesn't have
@@ -728,58 +727,12 @@ static void __init gpio_no_direction(u32 addr)
__raw_writeb(0x00, addr);
}
-static void __init gpio_pull_up(u32 addr)
-{
- u8 data = __raw_readb(addr);
-
- data &= 0x0F;
- data |= 0xC0;
- __raw_writeb(data, addr);
-}
-
/* TouchScreen */
#define IRQ28 evt2irq(0x3380) /* IRQ28A */
#define IRQ7 evt2irq(0x02e0) /* IRQ7A */
-static int ts_get_pendown_state(void)
-{
- int val1, val2;
-
- gpio_free(GPIO_FN_IRQ28_123);
- gpio_free(GPIO_FN_IRQ7_40);
-
- gpio_request(GPIO_PORT123, NULL);
- gpio_request(GPIO_PORT40, NULL);
-
- gpio_direction_input(GPIO_PORT123);
- gpio_direction_input(GPIO_PORT40);
-
- val1 = gpio_get_value(GPIO_PORT123);
- val2 = gpio_get_value(GPIO_PORT40);
-
- gpio_request(GPIO_FN_IRQ28_123, NULL); /* for QHD */
- gpio_request(GPIO_FN_IRQ7_40, NULL); /* for WVGA */
-
- return val1 ^ val2;
-}
-
-#define PORT40CR 0xE6051028
-#define PORT123CR 0xE605007B
-static int ts_init(void)
-{
- gpio_request(GPIO_FN_IRQ28_123, NULL); /* for QHD */
- gpio_request(GPIO_FN_IRQ7_40, NULL); /* for WVGA */
-
- gpio_pull_up(PORT40CR);
- gpio_pull_up(PORT123CR);
-
- return 0;
-}
-
static struct tsc2007_platform_data tsc2007_info = {
.model = 2007,
- .x_plate_ohms = 180,
- .get_pendown_state = ts_get_pendown_state,
- .init_platform_hw = ts_init,
+ .x_plate_ohms = 1000,
};
static struct i2c_board_info tsc_device = {
@@ -968,6 +921,7 @@ static void __init ap4evb_init(void)
gpio_request(GPIO_FN_KEYIN4, NULL);
/* enable TouchScreen */
+ gpio_request(GPIO_FN_IRQ28_123, NULL);
set_irq_type(IRQ28, IRQ_TYPE_LEVEL_LOW);
tsc_device.irq = IRQ28;
@@ -1043,6 +997,7 @@ static void __init ap4evb_init(void)
lcdc_info.ch[0].lcd_size_cfg.height = 91;
/* enable TouchScreen */
+ gpio_request(GPIO_FN_IRQ7_40, NULL);
set_irq_type(IRQ7, IRQ_TYPE_LEVEL_LOW);
tsc_device.irq = IRQ7;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH] ARM: mach-shmobile: ap4evb: modify tsc2007 platform settings
2010-08-18 3:37 [PATCH] ARM: mach-shmobile: ap4evb: modify FSI2 ID Kuninori Morimoto
2010-08-18 7:31 ` Paul Mundt
2010-08-27 9:49 ` [PATCH] ARM: mach-shmobile: ap4evb: modify tsc2007 platform settings Kuninori Morimoto
@ 2010-08-27 9:49 ` Kuninori Morimoto
2010-08-31 9:59 ` Magnus Damm
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Kuninori Morimoto @ 2010-08-27 9:49 UTC (permalink / raw)
To: linux-sh
This patch modify x_plate_ohms to correct value for tsc2007,
and removed un-necessary ts_get_pendown_state().
gpio_pull_up() was removed also.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
arch/arm/mach-shmobile/board-ap4evb.c | 51 ++-------------------------------
1 files changed, 3 insertions(+), 48 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index 23d472f..46e75a2 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -716,7 +716,6 @@ device_initcall(hdmi_init_pm_clock);
* FIXME !!
*
* gpio_no_direction
- * gpio_pull_up
* are quick_hack.
*
* current gpio frame work doesn't have
@@ -728,58 +727,12 @@ static void __init gpio_no_direction(u32 addr)
__raw_writeb(0x00, addr);
}
-static void __init gpio_pull_up(u32 addr)
-{
- u8 data = __raw_readb(addr);
-
- data &= 0x0F;
- data |= 0xC0;
- __raw_writeb(data, addr);
-}
-
/* TouchScreen */
#define IRQ28 evt2irq(0x3380) /* IRQ28A */
#define IRQ7 evt2irq(0x02e0) /* IRQ7A */
-static int ts_get_pendown_state(void)
-{
- int val1, val2;
-
- gpio_free(GPIO_FN_IRQ28_123);
- gpio_free(GPIO_FN_IRQ7_40);
-
- gpio_request(GPIO_PORT123, NULL);
- gpio_request(GPIO_PORT40, NULL);
-
- gpio_direction_input(GPIO_PORT123);
- gpio_direction_input(GPIO_PORT40);
-
- val1 = gpio_get_value(GPIO_PORT123);
- val2 = gpio_get_value(GPIO_PORT40);
-
- gpio_request(GPIO_FN_IRQ28_123, NULL); /* for QHD */
- gpio_request(GPIO_FN_IRQ7_40, NULL); /* for WVGA */
-
- return val1 ^ val2;
-}
-
-#define PORT40CR 0xE6051028
-#define PORT123CR 0xE605007B
-static int ts_init(void)
-{
- gpio_request(GPIO_FN_IRQ28_123, NULL); /* for QHD */
- gpio_request(GPIO_FN_IRQ7_40, NULL); /* for WVGA */
-
- gpio_pull_up(PORT40CR);
- gpio_pull_up(PORT123CR);
-
- return 0;
-}
-
static struct tsc2007_platform_data tsc2007_info = {
.model = 2007,
- .x_plate_ohms = 180,
- .get_pendown_state = ts_get_pendown_state,
- .init_platform_hw = ts_init,
+ .x_plate_ohms = 1000,
};
static struct i2c_board_info tsc_device = {
@@ -968,6 +921,7 @@ static void __init ap4evb_init(void)
gpio_request(GPIO_FN_KEYIN4, NULL);
/* enable TouchScreen */
+ gpio_request(GPIO_FN_IRQ28_123, NULL);
set_irq_type(IRQ28, IRQ_TYPE_LEVEL_LOW);
tsc_device.irq = IRQ28;
@@ -1043,6 +997,7 @@ static void __init ap4evb_init(void)
lcdc_info.ch[0].lcd_size_cfg.height = 91;
/* enable TouchScreen */
+ gpio_request(GPIO_FN_IRQ7_40, NULL);
set_irq_type(IRQ7, IRQ_TYPE_LEVEL_LOW);
tsc_device.irq = IRQ7;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH] ARM: mach-shmobile: ap4evb: modify tsc2007 platform settings
2010-08-18 3:37 [PATCH] ARM: mach-shmobile: ap4evb: modify FSI2 ID Kuninori Morimoto
` (2 preceding siblings ...)
2010-08-27 9:49 ` Kuninori Morimoto
@ 2010-08-31 9:59 ` Magnus Damm
2010-09-01 5:02 ` [PATCH] ARM: mach-shmobile: ap4evb: modify tsc2007 platform Kuninori Morimoto
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Magnus Damm @ 2010-08-31 9:59 UTC (permalink / raw)
To: linux-sh
Hi Morimoto-san,
On Fri, Aug 27, 2010 at 6:49 PM, Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
> This patch modify x_plate_ohms to correct value for tsc2007,
> and removed un-necessary ts_get_pendown_state().
> gpio_pull_up() was removed also.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> arch/arm/mach-shmobile/board-ap4evb.c | 51 ++-------------------------------
> 1 files changed, 3 insertions(+), 48 deletions(-)
Thanks for your work on this. I think removing unnecessary code is a good idea.
I just did some simple testing of this patch on AP4EVB with WVGA panel.
Are you sure the pressure value is working correctly? Maybe this is
normal behavior but I get different pressure ranges on different parts
of the screen. The top left corner next to the fbdev penguin seems to
have the lowest range for some unknown reason.
Top left corner: Pressure value 140-440
Top right corner: Pressure value 650-800
Bottom left corner: Pressure value 200-900
Bottom right corner: Pressure value 140-840
To test I use the following line:
# /evtest /dev/event0 | grep Pressure
I did not test without your patch. Maybe the pressure ranges are
strange because the touch screen is rotated incorrectly?
Do you see the same behavior on your hardware? Thanks for your help!
Cheers,
/ magnus
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH] ARM: mach-shmobile: ap4evb: modify tsc2007 platform
2010-08-18 3:37 [PATCH] ARM: mach-shmobile: ap4evb: modify FSI2 ID Kuninori Morimoto
` (3 preceding siblings ...)
2010-08-31 9:59 ` Magnus Damm
@ 2010-09-01 5:02 ` Kuninori Morimoto
2010-09-07 2:05 ` [PATCH] ARM: mach-shmobile: ap4evb: modify touchpanel judgment Kuninori Morimoto
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Kuninori Morimoto @ 2010-09-01 5:02 UTC (permalink / raw)
To: linux-sh
Hi Magnus
Thank you for checking/testing patch
> Top left corner: Pressure value 140-440
> Top right corner: Pressure value 650-800
> Bottom left corner: Pressure value 200-900
> Bottom right corner: Pressure value 140-840
(snip)
> I did not test without your patch. Maybe the pressure ranges are
> strange because the touch screen is rotated incorrectly?
>
> Do you see the same behavior on your hardware? Thanks for your help!
It is same behavior on your hardware too.
I tested without my patch.
The pressure ranges seem not to depend on the parts.
This mean my patch seems not correct...
Best regards
--
Kuninori Morimoto
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH] ARM: mach-shmobile: ap4evb: modify touchpanel judgment
2010-08-18 3:37 [PATCH] ARM: mach-shmobile: ap4evb: modify FSI2 ID Kuninori Morimoto
` (4 preceding siblings ...)
2010-09-01 5:02 ` [PATCH] ARM: mach-shmobile: ap4evb: modify tsc2007 platform Kuninori Morimoto
@ 2010-09-07 2:05 ` Kuninori Morimoto
2010-10-20 2:53 ` [PATCH] ARM: mach-shmobile: ap4evb: modify LCDC1 irq number Kuninori Morimoto
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Kuninori Morimoto @ 2010-09-07 2:05 UTC (permalink / raw)
To: linux-sh
Current touchpanel had below 2 issues
- LCDD2 pin which is needed for WVGA was changed to
IRQ28_123 pin on ts_get_pendown_state
- GPIO pull up on ts_init was disabled by gpio_request
on ts_get_pendown_state.
This mean the return value from gpio_get_value is untrusted.
This patch solve these issues
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
This is bug fix patch.
And is NOT V2 of
[PATCH] ARM: mach-shmobile: ap4evb: modify tsc2007 platform settings
arch/arm/mach-shmobile/board-ap4evb.c | 45 +++++++++++---------------------
1 files changed, 16 insertions(+), 29 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index 95935c8..b954848 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -756,7 +756,6 @@ device_initcall(hdmi_init_pm_clock);
* FIXME !!
*
* gpio_no_direction
- * gpio_pull_up
* are quick_hack.
*
* current gpio frame work doesn't have
@@ -768,49 +767,37 @@ static void __init gpio_no_direction(u32 addr)
__raw_writeb(0x00, addr);
}
-static void __init gpio_pull_up(u32 addr)
-{
- u8 data = __raw_readb(addr);
-
- data &= 0x0F;
- data |= 0xC0;
- __raw_writeb(data, addr);
-}
-
/* TouchScreen */
+#ifdef CONFIG_AP4EVB_QHD
+# define GPIO_TSC_IRQ GPIO_FN_IRQ28_123
+# define GPIO_TSC_PORT GPIO_PORT123
+#else /* WVGA */
+# define GPIO_TSC_IRQ GPIO_FN_IRQ7_40
+# define GPIO_TSC_PORT GPIO_PORT40
+#endif
+
#define IRQ28 evt2irq(0x3380) /* IRQ28A */
#define IRQ7 evt2irq(0x02e0) /* IRQ7A */
static int ts_get_pendown_state(void)
{
- int val1, val2;
+ int val;
- gpio_free(GPIO_FN_IRQ28_123);
- gpio_free(GPIO_FN_IRQ7_40);
+ gpio_free(GPIO_TSC_IRQ);
- gpio_request(GPIO_PORT123, NULL);
- gpio_request(GPIO_PORT40, NULL);
+ gpio_request(GPIO_TSC_PORT, NULL);
- gpio_direction_input(GPIO_PORT123);
- gpio_direction_input(GPIO_PORT40);
+ gpio_direction_input(GPIO_TSC_PORT);
- val1 = gpio_get_value(GPIO_PORT123);
- val2 = gpio_get_value(GPIO_PORT40);
+ val = gpio_get_value(GPIO_TSC_PORT);
- gpio_request(GPIO_FN_IRQ28_123, NULL); /* for QHD */
- gpio_request(GPIO_FN_IRQ7_40, NULL); /* for WVGA */
+ gpio_request(GPIO_TSC_IRQ, NULL);
- return val1 ^ val2;
+ return !val;
}
-#define PORT40CR 0xE6051028
-#define PORT123CR 0xE605007B
static int ts_init(void)
{
- gpio_request(GPIO_FN_IRQ28_123, NULL); /* for QHD */
- gpio_request(GPIO_FN_IRQ7_40, NULL); /* for WVGA */
-
- gpio_pull_up(PORT40CR);
- gpio_pull_up(PORT123CR);
+ gpio_request(GPIO_TSC_IRQ, NULL);
return 0;
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH] ARM: mach-shmobile: ap4evb: modify LCDC1 irq number
2010-08-18 3:37 [PATCH] ARM: mach-shmobile: ap4evb: modify FSI2 ID Kuninori Morimoto
` (5 preceding siblings ...)
2010-09-07 2:05 ` [PATCH] ARM: mach-shmobile: ap4evb: modify touchpanel judgment Kuninori Morimoto
@ 2010-10-20 2:53 ` Kuninori Morimoto
2010-10-25 1:42 ` Paul Mundt
2011-03-02 9:05 ` [PATCH] ARM: mach-shmobile: ap4evb: modify LCDC clock divider value Kuninori Morimoto
8 siblings, 0 replies; 10+ messages in thread
From: Kuninori Morimoto @ 2010-10-20 2:53 UTC (permalink / raw)
To: linux-sh
From: TAKEI Mitsuharu <takei.andr@gmail.com>
Signed-off-by: TAKEI Mitsuharu <takei.andr@gmail.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
arch/arm/mach-shmobile/board-ap4evb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index d21637d..901000c 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -596,7 +596,7 @@ static struct resource lcdc1_resources[] = {
.flags = IORESOURCE_MEM,
},
[1] = {
- .start = intcs_evt2irq(0x17a0),
+ .start = intcs_evt2irq(0x1780),
.flags = IORESOURCE_IRQ,
},
};
--
1.7.0.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH] ARM: mach-shmobile: ap4evb: modify LCDC1 irq number
2010-08-18 3:37 [PATCH] ARM: mach-shmobile: ap4evb: modify FSI2 ID Kuninori Morimoto
` (6 preceding siblings ...)
2010-10-20 2:53 ` [PATCH] ARM: mach-shmobile: ap4evb: modify LCDC1 irq number Kuninori Morimoto
@ 2010-10-25 1:42 ` Paul Mundt
2011-03-02 9:05 ` [PATCH] ARM: mach-shmobile: ap4evb: modify LCDC clock divider value Kuninori Morimoto
8 siblings, 0 replies; 10+ messages in thread
From: Paul Mundt @ 2010-10-25 1:42 UTC (permalink / raw)
To: linux-sh
On Wed, Oct 20, 2010 at 11:53:17AM +0900, Kuninori Morimoto wrote:
> From: TAKEI Mitsuharu <takei.andr@gmail.com>
>
> Signed-off-by: TAKEI Mitsuharu <takei.andr@gmail.com>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Applied, thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH] ARM: mach-shmobile: ap4evb: modify LCDC clock divider value
2010-08-18 3:37 [PATCH] ARM: mach-shmobile: ap4evb: modify FSI2 ID Kuninori Morimoto
` (7 preceding siblings ...)
2010-10-25 1:42 ` Paul Mundt
@ 2011-03-02 9:05 ` Kuninori Morimoto
8 siblings, 0 replies; 10+ messages in thread
From: Kuninori Morimoto @ 2011-03-02 9:05 UTC (permalink / raw)
To: linux-sh
ap4evb WVGA LCDC panel expect 33.3MHz for dot-clock,
but current dot-clock was 50.0MHz.
This patch modify clock divider value.
Signed-off-by: Makoto Ueda <makoto.ueda.ub@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
arch/arm/mach-shmobile/board-ap4evb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index 3cf0951..81d6536 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -1303,7 +1303,7 @@ static void __init ap4evb_init(void)
lcdc_info.clock_source = LCDC_CLK_BUS;
lcdc_info.ch[0].interface_type = RGB18;
- lcdc_info.ch[0].clock_divider = 2;
+ lcdc_info.ch[0].clock_divider = 3;
lcdc_info.ch[0].flags = 0;
lcdc_info.ch[0].lcd_size_cfg.width = 152;
lcdc_info.ch[0].lcd_size_cfg.height = 91;
--
1.7.1
^ permalink raw reply related [flat|nested] 10+ messages in thread