Hello. This is my first post here. I have a problem with GPIOs on my board (HTC
Blue Angel PDA) with kernel versions 3.3 and newer.
This board has PXA 263 CPU, which has 89 GPIOs
and ASIC3 chip with GPIOs 192-255.
The problem is that on kernel 3.3+ I can't access PXA GPIOs at all,
but the ASIC3 works.
Unfortunately, because of that I can't see whole kernel output or post dmesg
here,
because PXA GPIOs are needed for SD Card,USB and many more things.
But I caught a line "gpiochip_add: registered GPIOs 192 to 255 on device: asic3",
so it shows that ASIC3 really is detected and works.
Other errors are "gpio-keys failed to request gpio 0 error -22",
"tmio-mmc: probe of tmio-mmc failed with error -22".
With kernel 3.2 or older everything works. When requesting PXA GPIOs, it fails.
Reading GPIOs hangs the system. I hope that somebody can help me.
I know I haven't shown much info, but this is probably all I can get now.
From: Paul Parsons <hidden> Date: 2012-07-28 14:07:15
Hello Damian,
That sounds familiar. In 3.3 the number of PXA builtin GPIOs
(PXA_NR_BUILTIN_GPIO) was increased from 128 to 192.
Consequently the board GPIO numbers all increased by 64.
On the iPAQ hx4700 that had the effect of pushing EGPIO
numbers from 192-199 to 256-263, beyond the 256 maximum.
The fix is to set ARCH_NR_GPIO in arch/arm/Kconfig to a
higher maximum (for example, the iPAQ hx4700 sets 264).
Regards,
Paul
--- On Fri, 27/7/12, Damian Czarnecki <dczarn@o2.pl> wrote:
From: Damian Czarnecki <redacted>
Subject: PXA 26x GPIO possible regression in kernel 3.3 and newer
To: linux-arm-kernel at lists.infradead.org
Date: Friday, 27 July, 2012, 16:10
Hello. This is my first post here. I
have a problem with GPIOs on my board (HTC
Blue Angel PDA) with kernel versions 3.3 and newer.
This board has PXA 263 CPU, which has 89 GPIOs
and ASIC3 chip with GPIOs 192-255.
The problem is that on kernel 3.3+ I can't access PXA GPIOs
at all,
but the ASIC3 works.
Unfortunately, because of that I can't see whole kernel
output or post dmesg
here,
because PXA? GPIOs are needed for SD Card,USB and many
more things.
But I caught a line "gpiochip_add: registered GPIOs 192 to
255 on device: asic3",
so it shows that? ASIC3 really is detected and works.
Other errors are "gpio-keys failed to request gpio 0 error
-22",
"tmio-mmc: probe of tmio-mmc failed with error -22".
With kernel 3.2 or older everything works. When requesting
PXA GPIOs, it fails.
Reading GPIOs hangs the system. I hope that somebody can
help me.
I know I haven't shown much info, but this is probably all I
can get now.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Paul Parsons <lost.distance <at> yahoo.com> writes:
Hello Damian,
That sounds familiar. In 3.3 the number of PXA builtin GPIOs
(PXA_NR_BUILTIN_GPIO) was increased from 128 to 192.
Consequently the board GPIO numbers all increased by 64.
On the iPAQ hx4700 that had the effect of pushing EGPIO
numbers from 192-199 to 256-263, beyond the 256 maximum.
The fix is to set ARCH_NR_GPIO in arch/arm/Kconfig to a
higher maximum (for example, the iPAQ hx4700 sets 264).
Regards,
Paul
Thank you for taking your time to reply, Paul.
Yes, I remember reading about that change in kernel 3.3.
I tried almost every value that I thought may be correct
(but even the default 256 should be enough).
As I said, only the PXA GPIOs don't seem to work.
Another strange thing is that I managed to read a line:
"NR_IRQS: 16 nr_irqs: 358" early on boot.
This is suspicious, because on kernel 3.2 and lower
this is "NR_IRQS: 288 nr_irqs: 358".
I don't have any more ideas about that.
From: Paul Parsons <hidden> Date: 2012-07-28 20:23:18
Hello Damian,
oops, although my notes say that the number of PXA builtin
GPIOs increased from 128 to 192 in 3.3, in fact the change
was much earlier. It was in 3.3 that ARCH_NR_GPIO was added,
allowing me to fix the hx4700 GPIO values that had been
broken since 2.6.32. Apologies for the misleading advice.
That said, your HTC Blue Angel sounds very similar to the
PXA270 based iPAQ hx4700. For example both include the asic3.
But the kernel sources make only one mention of the HTC Blue
Angel, so I'm wondering if it is a fully supported platform.
Regards,
Paul
--- On Sat, 28/7/12, Damian Czarnecki <dczarn@o2.pl> wrote:
Thank you for taking your time to reply, Paul.
Yes, I remember reading about that change in kernel 3.3.
I tried almost every value that I thought may be correct
(but even the default 256 should be enough).
As I said, only the PXA GPIOs don't seem to work.
Another strange thing is that I managed to read a line:
"NR_IRQS: 16 nr_irqs: 358" early on boot.
This is suspicious, because on kernel 3.2 and lower
this is "NR_IRQS: 288 nr_irqs: 358".
I don't have any more ideas about that.
From: Mikołaj Siuda <hidden> Date: 2012-07-29 06:42:28
Paul Parsons <lost.distance <at> yahoo.com> writes:
Hello Damian,
oops, although my notes say that the number of PXA builtin
GPIOs increased from 128 to 192 in 3.3, in fact the change
was much earlier. It was in 3.3 that ARCH_NR_GPIO was added,
allowing me to fix the hx4700 GPIO values that had been
broken since 2.6.32. Apologies for the misleading advice.
That said, your HTC Blue Angel sounds very similar to the
PXA270 based iPAQ hx4700. For example both include the asic3.
But the kernel sources make only one mention of the HTC Blue
Angel, so I'm wondering if it is a fully supported platform.
Hello. This is a funny coincidence, because I also have a BA and I'm from
Poland, like Damian.
This is an easy fix, and I think it should go mainline.
just add lines to /arch/arm/mach-pxa/pxa25x.c :
static struct pxa_gpio_platform_data pxa25x_gpio_info __initdata = {
.gpio_set_wake = gpio_set_wake,
};
above pxa25x_devices[] declaration
and add
pxa_register_device(&pxa_device_gpio, &pxa25x_gpio_info);
in pxa25x_init() before adding devices.
This should fix it. It's interesting that it wasn't there.
And Paul, yes, the Blue Angel is very similiar to iPAQ hx4700.
It has PXA CPU, ASIC3, W100, gpio-keys, etc...
And no, it is not fully supported platform in the kernel.
Have a good day.
Thank you, Miko?aj. Your solution fixes the problem.
Maybe you should put in mainline?
As to Blue Angel and the kernel: I have given up on that.
Too many things doesn't work.