All of lore.kernel.org
 help / color / mirror / Atom feed
* colibri PXA320 and UCB1400 - touch screen troubles
       [not found] <AANLkTimZeDeS+44=BfchT0gwK5NDLhzLSX1vua8oFBQp@mail.gmail.com>
@ 2010-08-11  8:42 ` Marek Vasut
       [not found]   ` <AANLkTimL7kt0-Do9VQUQvktHfsvdKjm_NJ-eDbxcAu2m@mail.gmail.com>
  0 siblings, 1 reply; 13+ messages in thread
From: Marek Vasut @ 2010-08-11  8:42 UTC (permalink / raw)
  To: linux-arm-kernel

Dne St 11. srpna 2010 09:43:30 Yuri Ludkevich napsal(a):
> Hi Marek
> 
> I am working on colibri PXA320 so-dimm module and toradex orchid board. I
> flash it with OBM2 and U-boot - this work just fine. Ather that i compile
> 2.6.35 kernel and fount what touchscreen do not work =(. I turn on UCB1400
> support in MFD kernel section and UCB1400 touchscreen support in input
> device/touchscreen section. While booting ALSA founded UCB1400 sound device
> and input subsystem found UCB1400 touchscreen interface according to boot
> log:
> 
> [   28.336798] UCB1400: found IRQ
> 0
> [   28.356179] UCB1400: x/y =
> 601/735
> [   28.363892] input: UCB1400 touchscreen interface as
> /class/input/input0
> [   28.379487] ALSA device
> list:
> [   28.386389]   #0: pxa2xx-ac97 (Philips UCB1400)
> 
> but tapping touchscreen gets no samples from /dev/input/event0. And no
> interrupts in /proc/interrupts:
>   0:          0          SC  UCB1400
>   3:          1          SC  ohci_hcd:usb1
>  11:          0          SC  pxa27x_udc
>  14:        460          SC  AC97
>  17:          1          SC  LCD
>  21:         19          SC  BTUART
>  22:         71          SC  FFUART
>  23:      97011          SC  pxa2xx-mci
>  25:          0          SC  DMA
>  26:       9218          SC  ost0
> 124:          0        GPIO  MMC card detect
> 132:        107        GPIO  eth0
> Err:          0
> 
> Can you please point me to right way - i do not know where to dig =(.

Hi, it looks like the IRQ was misdetected probably. Check the following two 
patches (and possibly the vpac270 source file, the "Audio and Touchscreen" 
section will give you an idea how to force IRQ line to the driver).

http://git.kernel.org/?p=linux/kernel/git/marex/pxa-
linux-2.6.git;a=commitdiff;h=417eb54b3aba8f9aa1707fa1dae606ccaeb94599;hp=94616fcb8d6e5e51391f34463afafaad3bd20da6

http://git.kernel.org/?p=linux/kernel/git/marex/pxa-
linux-2.6.git;a=commitdiff;h=ced7f2ca8e8d99ec35ff34841c6e6a307a115fa0;hp=417eb54b3aba8f9aa1707fa1dae606ccaeb94599

Hope this helps you.
> 
> ps: sorry for my poor English.

It's actually quite ok :)
> 
> Thanks anyway.

Cheers

^ permalink raw reply	[flat|nested] 13+ messages in thread

* colibri PXA320 and UCB1400 - touch screen troubles
       [not found]   ` <AANLkTimL7kt0-Do9VQUQvktHfsvdKjm_NJ-eDbxcAu2m@mail.gmail.com>
@ 2010-08-11  9:07     ` Marek Vasut
  2010-08-11  9:45       ` Daniel Mack
  0 siblings, 1 reply; 13+ messages in thread
From: Marek Vasut @ 2010-08-11  9:07 UTC (permalink / raw)
  To: linux-arm-kernel

Dne St 11. srpna 2010 10:54:08 Yuri Ludkevich napsal(a):
> 2010/8/11 Marek Vasut <marek.vasut@gmail.com>
> 
> > Dne St 11. srpna 2010 09:43:30 Yuri Ludkevich napsal(a):
> > 
> > Hi, it looks like the IRQ was misdetected probably. Check the following
> > two patches (and possibly the vpac270 source file, the "Audio and
> > Touchscreen" section will give you an idea how to force IRQ line to the
> > driver).
> 
> BTW do you know which GPIO used for UCB1400 interrupt?

Please keep the lists CCed. And no, I have no idea which GPIO it is, but if you 
check the Colibri 320 datasheet (available from toradex website) and the kernel 
source for pxa320 colibri, you should be able to get quite a small set of GPIOs 
and you can try which of these it is (echo "GPIO_NUMBER" > 
/sys/class/gpio/export ; echo "in" > /sys/class/gpio/gpioGPIO_NUMBER/direction ; 
cat /sys/class/gpio/gpioGPIO_NUMBER/value ). You can use the thing in braces for 
multiple GPIOs too ... first export them all and set direction and then read 
them (in a loop for example). Of course, when you touch the panel, the GPIO will 
toggle and so it will do when you release the pen.

Cheers
> 
> > http://git.kernel.org/?p=linux/kernel/git/marex/pxa-
> > 
> > linux-2.6.git;a=commitdiff;h=417eb54b3aba8f9aa1707fa1dae606ccaeb94599;hp=
> > 94616fcb8d6e5e51391f34463afafaad3bd20da6
> > 
> > http://git.kernel.org/?p=linux/kernel/git/marex/pxa-
> > 
> > linux-2.6.git;a=commitdiff;h=ced7f2ca8e8d99ec35ff34841c6e6a307a115fa0;hp=
> > 417eb54b3aba8f9aa1707fa1dae606ccaeb94599
> > 
> > Thanks for fast reply!
> 
> I  had seen vpac270 couple minuts ago source - as  I understand I need to
> know which GPIO is used for irq to specify it in ucb1400_data  structure..
> But Toradex does not provide any schematics...

http://www.toradex.com/Products/Colibri_Modules/Colibri_PXA320 The do, but not 
the module schematics unfortunatelly. You can use the way outlined above, it 
should do what you need and should be easy.

Cheers
> 
> With best regards, Yuri.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* colibri PXA320 and UCB1400 - touch screen troubles
  2010-08-11  9:07     ` Marek Vasut
@ 2010-08-11  9:45       ` Daniel Mack
       [not found]         ` <AANLkTim+kNyEL2s0k9wLoctRMKDWoaYy66y=adhog1wc@mail.gmail.com>
  0 siblings, 1 reply; 13+ messages in thread
From: Daniel Mack @ 2010-08-11  9:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 11, 2010 at 11:07:29AM +0200, Marek Vasut wrote:
> Dne St 11. srpna 2010 10:54:08 Yuri Ludkevich napsal(a):
> > 2010/8/11 Marek Vasut <marek.vasut@gmail.com>
> > 
> > > Dne St 11. srpna 2010 09:43:30 Yuri Ludkevich napsal(a):
> > > 
> > > Hi, it looks like the IRQ was misdetected probably. Check the following
> > > two patches (and possibly the vpac270 source file, the "Audio and
> > > Touchscreen" section will give you an idea how to force IRQ line to the
> > > driver).
> > 
> > BTW do you know which GPIO used for UCB1400 interrupt?

According to my reverse engineering, this should be GPIO4_2.


Daniel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* colibri PXA320 and UCB1400 - touch screen troubles
       [not found]         ` <AANLkTim+kNyEL2s0k9wLoctRMKDWoaYy66y=adhog1wc@mail.gmail.com>
@ 2010-08-11 10:02           ` Daniel Mack
  2010-08-11 10:08             ` Yuri Ludkevich
  0 siblings, 1 reply; 13+ messages in thread
From: Daniel Mack @ 2010-08-11 10:02 UTC (permalink / raw)
  To: linux-arm-kernel

You dropped all recipients again and only replied to me.
PLEASE DON'T DO THAT.
Always keep all people in the loop, always.

On Wed, Aug 11, 2010 at 01:50:43PM +0400, Yuri Ludkevich wrote:
> 2010/8/11 Daniel Mack <daniel@caiaq.de>
> > According to my reverse engineering, this should be GPIO4_2.
> >
> 
> Thanks a lot.
> 
> BTW: does /sys/class/gpio/export support GPIOX_2 pins?

Yes, they are aliases to the signals without the "_2" suffix. Quoting
the PXA reference manual, chapter 5.3:

GPIO<6_0>_2:

General-Purpose IO Ports, second instantiation. The same signals as
GPIO<6:0>, but they are given separate names because they are configured
on separate multi-function pins. The recommended configuration is for
both multi-function pin instantiations of these GPIOs not to be
configured simultaneously for GPIO functionality. The preferred
configuration for dual instantiation GPIO usage (that is, using both
GPIO<6:0> and GPIO<6:0>_2 functions) is to configure one multi-function
pin as a GPIO and the second multi-function pin instantiation for an
alternate function other than a GPIO function. Configuring GPIO<6:0> to
be present on two separate multi-function pins is not recommended.
However, when GPIO<6:0> is configured as an output and both
multi-function pin instantiations are programmed for GPIO function, the
primary and secondary instantiation of the multi-function pins are both
outputs from the common GGPIO<6:0> signal. However, when GPIO<6:0> is an
input, the inputs from both multi-function pin instantiations are ORed
together before the result is sent to the internal GPIO<6:0> input
logic.


HTH,
Daniel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* colibri PXA320 and UCB1400 - touch screen troubles
  2010-08-11 10:02           ` Daniel Mack
@ 2010-08-11 10:08             ` Yuri Ludkevich
  2010-08-11 10:12               ` Daniel Mack
  0 siblings, 1 reply; 13+ messages in thread
From: Yuri Ludkevich @ 2010-08-11 10:08 UTC (permalink / raw)
  To: linux-arm-kernel

2010/8/11 Daniel Mack <daniel@caiaq.de>

> You dropped all recipients again and only replied to me.
> PLEASE DON'T DO THAT.
> Always keep all people in the loop, always.
>
> On Wed, Aug 11, 2010 at 01:50:43PM +0400, Yuri Ludkevich wrote:
> > 2010/8/11 Daniel Mack <daniel@caiaq.de>
> > > According to my reverse engineering, this should be GPIO4_2.
> > >
> >
> > Thanks a lot.
> >
> > BTW: does /sys/class/gpio/export support GPIOX_2 pins?
>
> Yes, they are aliases to the signals without the "_2" suffix. Quoting
> the PXA reference manual, chapter 5.3:
>
> GPIO<6_0>_2:
>
> General-Purpose IO Ports, second instantiation. The same signals as
> GPIO<6:0>, but they are given separate names because they are configured
> on separate multi-function pins. The recommended configuration is for
> both multi-function pin instantiations of these GPIOs not to be
> configured simultaneously for GPIO functionality. The preferred
> configuration for dual instantiation GPIO usage (that is, using both
> GPIO<6:0> and GPIO<6:0>_2 functions) is to configure one multi-function
> pin as a GPIO and the second multi-function pin instantiation for an
> alternate function other than a GPIO function. Configuring GPIO<6:0> to
> be present on two separate multi-function pins is not recommended.
> However, when GPIO<6:0> is configured as an output and both
> multi-function pin instantiations are programmed for GPIO function, the
> primary and secondary instantiation of the multi-function pins are both
> outputs from the common GGPIO<6:0> signal. However, when GPIO<6:0> is an
> input, the inputs from both multi-function pin instantiations are ORed
> together before the result is sent to the internal GPIO<6:0> input
> logic.
>
>
> HTH,
> Daniel
>
> Sorry about other recipients.

Hmmm. I found with pxaregs tool what both GPIO4 and GPIO4_2 configured as
GPIO. May be this cause irq autodetection to fail?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100811/821cdf9a/attachment-0001.html>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* colibri PXA320 and UCB1400 - touch screen troubles
  2010-08-11 10:08             ` Yuri Ludkevich
@ 2010-08-11 10:12               ` Daniel Mack
  2010-08-11 10:46                 ` Yuri Ludkevich
  0 siblings, 1 reply; 13+ messages in thread
From: Daniel Mack @ 2010-08-11 10:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 11, 2010 at 02:08:10PM +0400, Yuri Ludkevich wrote:
> 2010/8/11 Daniel Mack <daniel@caiaq.de>
> > Yes, they are aliases to the signals without the "_2" suffix. Quoting
> > the PXA reference manual, chapter 5.3:
> >
> > GPIO<6_0>_2:
> >
> > General-Purpose IO Ports, second instantiation. The same signals as
> > GPIO<6:0>, but they are given separate names because they are configured
> > on separate multi-function pins. The recommended configuration is for
> > both multi-function pin instantiations of these GPIOs not to be
> > configured simultaneously for GPIO functionality. The preferred
> > configuration for dual instantiation GPIO usage (that is, using both
> > GPIO<6:0> and GPIO<6:0>_2 functions) is to configure one multi-function
> > pin as a GPIO and the second multi-function pin instantiation for an
> > alternate function other than a GPIO function. Configuring GPIO<6:0> to
> > be present on two separate multi-function pins is not recommended.
> > However, when GPIO<6:0> is configured as an output and both
> > multi-function pin instantiations are programmed for GPIO function, the
> > primary and secondary instantiation of the multi-function pins are both
> > outputs from the common GGPIO<6:0> signal. However, when GPIO<6:0> is an
> > input, the inputs from both multi-function pin instantiations are ORed
> > together before the result is sent to the internal GPIO<6:0> input
> > logic.
> 
> Hmmm. I found with pxaregs tool what both GPIO4 and GPIO4_2 configured as
> GPIO. May be this cause irq autodetection to fail?

No - if you don't tell the driver which GPIO the interrupt line is
connected to, it can't know. But as the reference manual says, such
configurations should be avoided.

You're welcome to come up with a patch :)

Daniel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* colibri PXA320 and UCB1400 - touch screen troubles
  2010-08-11 10:12               ` Daniel Mack
@ 2010-08-11 10:46                 ` Yuri Ludkevich
  2010-08-11 10:51                   ` Daniel Mack
  0 siblings, 1 reply; 13+ messages in thread
From: Yuri Ludkevich @ 2010-08-11 10:46 UTC (permalink / raw)
  To: linux-arm-kernel

2010/8/11 Daniel Mack <daniel@caiaq.de>

> On Wed, Aug 11, 2010 at 02:08:10PM +0400, Yuri Ludkevich wrote:
> > 2010/8/11 Daniel Mack <daniel@caiaq.de>
> > > Yes, they are aliases to the signals without the "_2" suffix. Quoting
> > > the PXA reference manual, chapter 5.3:
> > >
> > > GPIO<6_0>_2:
> > >
> > > General-Purpose IO Ports, second instantiation. The same signals as
> > > GPIO<6:0>, but they are given separate names because they are
> configured
> > > on separate multi-function pins. The recommended configuration is for
> > > both multi-function pin instantiations of these GPIOs not to be
> > > configured simultaneously for GPIO functionality. The preferred
> > > configuration for dual instantiation GPIO usage (that is, using both
> > > GPIO<6:0> and GPIO<6:0>_2 functions) is to configure one multi-function
> > > pin as a GPIO and the second multi-function pin instantiation for an
> > > alternate function other than a GPIO function. Configuring GPIO<6:0> to
> > > be present on two separate multi-function pins is not recommended.
> > > However, when GPIO<6:0> is configured as an output and both
> > > multi-function pin instantiations are programmed for GPIO function, the
> > > primary and secondary instantiation of the multi-function pins are both
> > > outputs from the common GGPIO<6:0> signal. However, when GPIO<6:0> is
> an
> > > input, the inputs from both multi-function pin instantiations are ORed
> > > together before the result is sent to the internal GPIO<6:0> input
> > > logic.
> >
> > Hmmm. I found with pxaregs tool what both GPIO4 and GPIO4_2 configured as
> > GPIO. May be this cause irq autodetection to fail?
>
> No - if you don't tell the driver which GPIO the interrupt line is
> connected to, it can't know. But as the reference manual says, such
> configurations should be avoided.
>
> You're welcome to come up with a patch :)
>
> Daniel
>
> I configure GPIO4 pin as nCS3 (alternate function #1) in colibri-pxa320.c
and after that irq autoprobing found valid irq for UCB1400. So touchscreen
now working just fine.

May be I need to check other second instantiation pins for same thing?


PS: i am really sorry for may replaying.. i did not notice in time :(
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100811/7048faee/attachment-0001.html>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* colibri PXA320 and UCB1400 - touch screen troubles
  2010-08-11 10:46                 ` Yuri Ludkevich
@ 2010-08-11 10:51                   ` Daniel Mack
  2010-08-11 10:55                     ` Marek Vasut
  0 siblings, 1 reply; 13+ messages in thread
From: Daniel Mack @ 2010-08-11 10:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 11, 2010 at 02:46:15PM +0400, Yuri Ludkevich wrote:
> 2010/8/11 Daniel Mack <daniel@caiaq.de>
> > On Wed, Aug 11, 2010 at 02:08:10PM +0400, Yuri Ludkevich wrote:
> > > 2010/8/11 Daniel Mack <daniel@caiaq.de>
> > > > Yes, they are aliases to the signals without the "_2" suffix. Quoting
> > > > the PXA reference manual, chapter 5.3:
> > > >
> > > > GPIO<6_0>_2:
> > > >
> > > > General-Purpose IO Ports, second instantiation. The same signals as
> > > > GPIO<6:0>, but they are given separate names because they are
> > configured
> > > > on separate multi-function pins. The recommended configuration is for
> > > > both multi-function pin instantiations of these GPIOs not to be
> > > > configured simultaneously for GPIO functionality. The preferred
> > > > configuration for dual instantiation GPIO usage (that is, using both
> > > > GPIO<6:0> and GPIO<6:0>_2 functions) is to configure one multi-function
> > > > pin as a GPIO and the second multi-function pin instantiation for an
> > > > alternate function other than a GPIO function. Configuring GPIO<6:0> to
> > > > be present on two separate multi-function pins is not recommended.
> > > > However, when GPIO<6:0> is configured as an output and both
> > > > multi-function pin instantiations are programmed for GPIO function, the
> > > > primary and secondary instantiation of the multi-function pins are both
> > > > outputs from the common GGPIO<6:0> signal. However, when GPIO<6:0> is
> > an
> > > > input, the inputs from both multi-function pin instantiations are ORed
> > > > together before the result is sent to the internal GPIO<6:0> input
> > > > logic.
> > >
> > > Hmmm. I found with pxaregs tool what both GPIO4 and GPIO4_2 configured as
> > > GPIO. May be this cause irq autodetection to fail?
> >
> > No - if you don't tell the driver which GPIO the interrupt line is
> > connected to, it can't know. But as the reference manual says, such
> > configurations should be avoided.
> >
> > You're welcome to come up with a patch :)
> >
> > Daniel
> >
> I configure GPIO4 pin as nCS3 (alternate function #1) in colibri-pxa320.c
> and after that irq autoprobing found valid irq for UCB1400. So touchscreen
> now working just fine.

Good. Can you share a patch?

> May be I need to check other second instantiation pins for same thing?

Sure, double-checking can't harm. If you find anything, feel free to fix
it up.

Just make sure you read Documentation/SubmittingPatches in order to
avoid the most common pitfalls :)

Thanks,
Daniel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* colibri PXA320 and UCB1400 - touch screen troubles
  2010-08-11 10:51                   ` Daniel Mack
@ 2010-08-11 10:55                     ` Marek Vasut
  2010-08-11 11:10                       ` Yuri Ludkevich
  0 siblings, 1 reply; 13+ messages in thread
From: Marek Vasut @ 2010-08-11 10:55 UTC (permalink / raw)
  To: linux-arm-kernel

Dne St 11. srpna 2010 12:51:25 Daniel Mack napsal(a):
> On Wed, Aug 11, 2010 at 02:46:15PM +0400, Yuri Ludkevich wrote:
> > 2010/8/11 Daniel Mack <daniel@caiaq.de>
> > 
> > > On Wed, Aug 11, 2010 at 02:08:10PM +0400, Yuri Ludkevich wrote:
> > > > 2010/8/11 Daniel Mack <daniel@caiaq.de>
> > > > 
> > > > > Yes, they are aliases to the signals without the "_2" suffix.
> > > > > Quoting the PXA reference manual, chapter 5.3:
> > > > > 
> > > > > GPIO<6_0>_2:
> > > > > 
> > > > > General-Purpose IO Ports, second instantiation. The same signals as
> > > > > GPIO<6:0>, but they are given separate names because they are
> > > 
> > > configured
> > > 
> > > > > on separate multi-function pins. The recommended configuration is
> > > > > for both multi-function pin instantiations of these GPIOs not to
> > > > > be configured simultaneously for GPIO functionality. The preferred
> > > > > configuration for dual instantiation GPIO usage (that is, using
> > > > > both GPIO<6:0> and GPIO<6:0>_2 functions) is to configure one
> > > > > multi-function pin as a GPIO and the second multi-function pin
> > > > > instantiation for an alternate function other than a GPIO
> > > > > function. Configuring GPIO<6:0> to be present on two separate
> > > > > multi-function pins is not recommended. However, when GPIO<6:0> is
> > > > > configured as an output and both multi-function pin instantiations
> > > > > are programmed for GPIO function, the primary and secondary
> > > > > instantiation of the multi-function pins are both outputs from the
> > > > > common GGPIO<6:0> signal. However, when GPIO<6:0> is
> > > 
> > > an
> > > 
> > > > > input, the inputs from both multi-function pin instantiations are
> > > > > ORed together before the result is sent to the internal GPIO<6:0>
> > > > > input logic.
> > > > 
> > > > Hmmm. I found with pxaregs tool what both GPIO4 and GPIO4_2
> > > > configured as GPIO. May be this cause irq autodetection to fail?
> > > 
> > > No - if you don't tell the driver which GPIO the interrupt line is
> > > connected to, it can't know. But as the reference manual says, such
> > > configurations should be avoided.
> > > 
> > > You're welcome to come up with a patch :)
> > > 
> > > Daniel
> > 
> > I configure GPIO4 pin as nCS3 (alternate function #1) in colibri-pxa320.c
> > and after that irq autoprobing found valid irq for UCB1400. So
> > touchscreen now working just fine.
> 
> Good. Can you share a patch?

nCS3 is the chipselect for CPLD space actually (and the EXT chipselects). If 
it's configured as nCS3, you can write to the CPLD, but in case you don't need 
PCMCIA (and ext. chipselects), you should be ok either way.

And as Dan said, don't mix GPIO4 and GPIO4_2 :)

Cheers
> 
> > May be I need to check other second instantiation pins for same thing?
> 
> Sure, double-checking can't harm. If you find anything, feel free to fix
> it up.
> 
> Just make sure you read Documentation/SubmittingPatches in order to
> avoid the most common pitfalls :)
> 
> Thanks,
> Daniel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* colibri PXA320 and UCB1400 - touch screen troubles
  2010-08-11 10:55                     ` Marek Vasut
@ 2010-08-11 11:10                       ` Yuri Ludkevich
  2010-08-11 11:24                         ` Daniel Mack
  0 siblings, 1 reply; 13+ messages in thread
From: Yuri Ludkevich @ 2010-08-11 11:10 UTC (permalink / raw)
  To: linux-arm-kernel

2010/8/11 Marek Vasut <marek.vasut@gmail.com>

> Dne St 11. srpna 2010 12:51:25 Daniel Mack napsal(a):
> > On Wed, Aug 11, 2010 at 02:46:15PM +0400, Yuri Ludkevich wrote:
> > > 2010/8/11 Daniel Mack <daniel@caiaq.de>
> > >
> > > > On Wed, Aug 11, 2010 at 02:08:10PM +0400, Yuri Ludkevich wrote:
> > > > > 2010/8/11 Daniel Mack <daniel@caiaq.de>
> > > > >
> > > > > > Yes, they are aliases to the signals without the "_2" suffix.
> > > > > > Quoting the PXA reference manual, chapter 5.3:
> > > > > >
> > > > > > GPIO<6_0>_2:
> > > > > >
> > > > > > General-Purpose IO Ports, second instantiation. The same signals
> as
> > > > > > GPIO<6:0>, but they are given separate names because they are
> > > >
> > > > configured
> > > >
> > > > > > on separate multi-function pins. The recommended configuration is
> > > > > > for both multi-function pin instantiations of these GPIOs not to
> > > > > > be configured simultaneously for GPIO functionality. The
> preferred
> > > > > > configuration for dual instantiation GPIO usage (that is, using
> > > > > > both GPIO<6:0> and GPIO<6:0>_2 functions) is to configure one
> > > > > > multi-function pin as a GPIO and the second multi-function pin
> > > > > > instantiation for an alternate function other than a GPIO
> > > > > > function. Configuring GPIO<6:0> to be present on two separate
> > > > > > multi-function pins is not recommended. However, when GPIO<6:0>
> is
> > > > > > configured as an output and both multi-function pin
> instantiations
> > > > > > are programmed for GPIO function, the primary and secondary
> > > > > > instantiation of the multi-function pins are both outputs from
> the
> > > > > > common GGPIO<6:0> signal. However, when GPIO<6:0> is
> > > >
> > > > an
> > > >
> > > > > > input, the inputs from both multi-function pin instantiations are
> > > > > > ORed together before the result is sent to the internal GPIO<6:0>
> > > > > > input logic.
> > > > >
> > > > > Hmmm. I found with pxaregs tool what both GPIO4 and GPIO4_2
> > > > > configured as GPIO. May be this cause irq autodetection to fail?
> > > >
> > > > No - if you don't tell the driver which GPIO the interrupt line is
> > > > connected to, it can't know. But as the reference manual says, such
> > > > configurations should be avoided.
> > > >
> > > > You're welcome to come up with a patch :)
> > > >
> > > > Daniel
> > >
> > > I configure GPIO4 pin as nCS3 (alternate function #1) in
> colibri-pxa320.c
> > > and after that irq autoprobing found valid irq for UCB1400. So
> > > touchscreen now working just fine.
> >
> > Good. Can you share a patch?
>
> nCS3 is the chipselect for CPLD space actually (and the EXT chipselects).
> If
> it's configured as nCS3, you can write to the CPLD, but in case you don't
> need
> PCMCIA (and ext. chipselects), you should be ok either way.
>
> And as Dan said, don't mix GPIO4 and GPIO4_2 :)
>
> Yep. I know about CPLD. Our board do not use PCMCIA, only SD/MMC. So for us
it should work.

But if someone wants to use both PCMCIA and touchscreen - how to configure
this GPIOs properly?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100811/0038fa56/attachment-0001.html>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* colibri PXA320 and UCB1400 - touch screen troubles
  2010-08-11 11:10                       ` Yuri Ludkevich
@ 2010-08-11 11:24                         ` Daniel Mack
  2010-08-11 12:32                           ` Yuri Ludkevich
  0 siblings, 1 reply; 13+ messages in thread
From: Daniel Mack @ 2010-08-11 11:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 11, 2010 at 03:10:08PM +0400, Yuri Ludkevich wrote:
> 2010/8/11 Marek Vasut <marek.vasut@gmail.com>
> > Dne St 11. srpna 2010 12:51:25 Daniel Mack napsal(a):
> > > Good. Can you share a patch?
> >
> > nCS3 is the chipselect for CPLD space actually (and the EXT chipselects).
> > If
> > it's configured as nCS3, you can write to the CPLD, but in case you don't
> > need
> > PCMCIA (and ext. chipselects), you should be ok either way.
> >
> > And as Dan said, don't mix GPIO4 and GPIO4_2 :)
> >
> Yep. I know about CPLD. Our board do not use PCMCIA, only SD/MMC. So for us
> it should work.
> 
> But if someone wants to use both PCMCIA and touchscreen - how to configure
> this GPIOs properly?

It won't collide. GPIO4 should be configured to the application function
nCS3, and GPIO4_2 is used as GPIO and interrupt input. The signals
aren't shared on the die, and there are two seperate balls (pins) on the
package.

The only limitation is that you can't use them both as GPIOs, because
GPIO register accesses for GPIO4_2 would also affect GPIO4, and
vice-versa.

And in the setup described above, you would just access GPIO4 and be
fine.

Daniel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* colibri PXA320 and UCB1400 - touch screen troubles
  2010-08-11 11:24                         ` Daniel Mack
@ 2010-08-11 12:32                           ` Yuri Ludkevich
  2010-08-11 12:35                             ` Daniel Mack
  0 siblings, 1 reply; 13+ messages in thread
From: Yuri Ludkevich @ 2010-08-11 12:32 UTC (permalink / raw)
  To: linux-arm-kernel

2010/8/11 Daniel Mack <daniel@caiaq.de>

> On Wed, Aug 11, 2010 at 03:10:08PM +0400, Yuri Ludkevich wrote:
> > 2010/8/11 Marek Vasut <marek.vasut@gmail.com>
> > > Dne St 11. srpna 2010 12:51:25 Daniel Mack napsal(a):
> > > > Good. Can you share a patch?
> > >
> > > nCS3 is the chipselect for CPLD space actually (and the EXT
> chipselects).
> > > If
> > > it's configured as nCS3, you can write to the CPLD, but in case you
> don't
> > > need
> > > PCMCIA (and ext. chipselects), you should be ok either way.
> > >
> > > And as Dan said, don't mix GPIO4 and GPIO4_2 :)
> > >
> > Yep. I know about CPLD. Our board do not use PCMCIA, only SD/MMC. So for
> us
> > it should work.
> >
> > But if someone wants to use both PCMCIA and touchscreen - how to
> configure
> > this GPIOs properly?
>
> It won't collide. GPIO4 should be configured to the application function
> nCS3, and GPIO4_2 is used as GPIO and interrupt input. The signals
> aren't shared on the die, and there are two seperate balls (pins) on the
> package.
>
> The only limitation is that you can't use them both as GPIOs, because
> GPIO register accesses for GPIO4_2 would also affect GPIO4, and
> vice-versa.
>
> And in the setup described above, you would just access GPIO4 and be
> fine.
>
> Daniel
>

Which list i should use to send patch?  linux-arm-kernel at lists.infradead.orgor
openpxa-users at lists.sourceforge.net? or both?

sorry for dumb question, but it my first expirience of sending patches =)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100811/c8f48afd/attachment-0001.html>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* colibri PXA320 and UCB1400 - touch screen troubles
  2010-08-11 12:32                           ` Yuri Ludkevich
@ 2010-08-11 12:35                             ` Daniel Mack
  0 siblings, 0 replies; 13+ messages in thread
From: Daniel Mack @ 2010-08-11 12:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 11, 2010 at 04:32:48PM +0400, Yuri Ludkevich wrote:
> 2010/8/11 Daniel Mack <daniel@caiaq.de>
> > It won't collide. GPIO4 should be configured to the application function
> > nCS3, and GPIO4_2 is used as GPIO and interrupt input. The signals
> > aren't shared on the die, and there are two seperate balls (pins) on the
> > package.
> >
> > The only limitation is that you can't use them both as GPIOs, because
> > GPIO register accesses for GPIO4_2 would also affect GPIO4, and
> > vice-versa.
> >
> > And in the setup described above, you would just access GPIO4 and be
> > fine.
> >
> > Daniel
> >
> 
> Which list i should use to send patch?  linux-arm-kernel at lists.infradead.orgor
> openpxa-users at lists.sourceforge.net? or both?

It will be merged to the kernel source code eventually, so send it to
linux-arm-kernel, but you can copy openpxa-users as well if you like.

> sorry for dumb question, but it my first expirience of sending patches =)

No problem at all :)

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-08-11 12:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <AANLkTimZeDeS+44=BfchT0gwK5NDLhzLSX1vua8oFBQp@mail.gmail.com>
2010-08-11  8:42 ` colibri PXA320 and UCB1400 - touch screen troubles Marek Vasut
     [not found]   ` <AANLkTimL7kt0-Do9VQUQvktHfsvdKjm_NJ-eDbxcAu2m@mail.gmail.com>
2010-08-11  9:07     ` Marek Vasut
2010-08-11  9:45       ` Daniel Mack
     [not found]         ` <AANLkTim+kNyEL2s0k9wLoctRMKDWoaYy66y=adhog1wc@mail.gmail.com>
2010-08-11 10:02           ` Daniel Mack
2010-08-11 10:08             ` Yuri Ludkevich
2010-08-11 10:12               ` Daniel Mack
2010-08-11 10:46                 ` Yuri Ludkevich
2010-08-11 10:51                   ` Daniel Mack
2010-08-11 10:55                     ` Marek Vasut
2010-08-11 11:10                       ` Yuri Ludkevich
2010-08-11 11:24                         ` Daniel Mack
2010-08-11 12:32                           ` Yuri Ludkevich
2010-08-11 12:35                             ` Daniel Mack

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.