* [PATCH] ARM: mvebu: Add gpio button to Mirabox board [not found] <CABx3TkVyVAzEJ54FV70fK3BoULKCOkgNcw32_K3XT-oCUWjEfg@mail.gmail.com> @ 2013-03-28 3:38 ` Ezequiel Garcia 2013-03-29 4:13 ` Ryan Press 0 siblings, 1 reply; 6+ messages in thread From: Ezequiel Garcia @ 2013-03-28 3:38 UTC (permalink / raw) To: linux-arm-kernel Hi Ryan, On Wed, Mar 27, 2013 at 05:42:36PM -0700, Ryan Press wrote: > Ezequiel Garcia wrote: > > > >The Globalscale Mirabox board has a little gpio button > >placed just above the SD card slot; the board user guide labels > >this button as "System reset button". > > > >This patch adds support for this button in the device tree file. > >diff --git a/arch/arm/boot/dts/armada-370-mirabox.dts b/arch/arm/boot/dts/armada-370-mirabox.dts > >+ gpio-keys { > >+ compatible = "gpio-keys"; > >+ #address-cells = <1>; > >+ #size-cells = <0>; > >+ reset at 1 { > >+ label = "Reset Button"; > >+ linux,code = <116>; > >+ gpios = <&gpio1 26 1>; > > Were you able to get the button to work in user space with > "gpio-keys"? I did a very minimal test using evdev debug interface. http://troll.ws/paste/ac62e292 http://troll.ws/paste/b22699e1 > I was not able to get this to work, I think there is > some IRQ problem. I was able to get it to work with > "gpio-keys-polled" however. > Could you explain what you did and what was your problem? > I've also added support for the LEDs; would you like me to submit a patch? > Mirabox LEDs? Sure! I'll definitely give them a try... -- Ezequiel Garc?a, Free Electrons Embedded Linux, Kernel and Android Engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: mvebu: Add gpio button to Mirabox board 2013-03-28 3:38 ` [PATCH] ARM: mvebu: Add gpio button to Mirabox board Ezequiel Garcia @ 2013-03-29 4:13 ` Ryan Press 2013-03-29 16:50 ` Ezequiel Garcia 0 siblings, 1 reply; 6+ messages in thread From: Ryan Press @ 2013-03-29 4:13 UTC (permalink / raw) To: linux-arm-kernel Hi Ezequiel, On Wed, Mar 27, 2013 at 8:38 PM, Ezequiel Garcia <ezequiel.garcia@free-electrons.com> wrote: > On Wed, Mar 27, 2013 at 05:42:36PM -0700, Ryan Press wrote: >> Ezequiel Garcia wrote: >> > >> >The Globalscale Mirabox board has a little gpio button >> >placed just above the SD card slot; the board user guide labels >> >this button as "System reset button". >> > >> >This patch adds support for this button in the device tree file. >> I was not able to get this to work, I think there is >> some IRQ problem. I was able to get it to work with >> "gpio-keys-polled" however. >> > > Could you explain what you did and what was your problem? Just to be on the same page, I pulled the latest 3-9-rc4, with no other changes, and then added your patch. Does this rely on a patch? No interrupt events are shown in /proc/interrupts. I have a lot more things running than your box, maybe there is a conflict. #cat /proc/interrupts CPU0 16: 12222 armada_370_xp_irq armada_370_xp_per_cpu_tick 17: 552 armada_370_xp_irq serial 25: 0 armada_370_xp_irq d0010300.rtc 27: 6438 armada_370_xp_irq ehci_hcd:usb1 28: 0 armada_370_xp_irq ehci_hcd:usb2 95: 0 d0018140.gpio Reset Button 104: 2 armada_370_xp_irq d0060800.xor 105: 2 armada_370_xp_irq d0060800.xor 106: 2 armada_370_xp_irq d0060900.xor 107: 2 armada_370_xp_irq d0060900.xor IPI0: 0 CPU wakeup interrupts IPI1: 0 Timer broadcast interrupts IPI2: 0 Rescheduling interrupts IPI3: 0 Function call interrupts IPI4: 0 Single function call interrupts IPI5: 0 CPU stop interrupts Err: 0 Here is my kernel config: http://pastebin.com/rFQSUAPs Maybe you can send me your config and I will try it. Oh and although I guess the bootloader sets it up, i wouldn't trust it. There should probably be the pinctrl in the device tree, yes? Thanks, Ryan diff --git a/arch/arm/boot/dts/armada-370-mirabox.dts b/arch/arm/boot/dts/armada-370-mirabox.dts index dd0c57d..f083f56 100644 --- a/arch/arm/boot/dts/armada-370-mirabox.dts +++ b/arch/arm/boot/dts/armada-370-mirabox.dts @@ -33,6 +33,14 @@ clock-frequency = <600000000>; status = "okay"; }; + + pinctrl { + reset_button_pin: reset-button-pin { + marvell,pins = "mpp58"; + marvell,function = "gpio"; + }; + } + gpio-keys { compatible = "gpio-keys"; #address-cells = <1>; ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] ARM: mvebu: Add gpio button to Mirabox board 2013-03-29 4:13 ` Ryan Press @ 2013-03-29 16:50 ` Ezequiel Garcia 2013-03-29 17:30 ` Ryan Press 0 siblings, 1 reply; 6+ messages in thread From: Ezequiel Garcia @ 2013-03-29 16:50 UTC (permalink / raw) To: linux-arm-kernel On Thu, Mar 28, 2013 at 09:13:48PM -0700, Ryan Press wrote: > Hi Ezequiel, > > On Wed, Mar 27, 2013 at 8:38 PM, Ezequiel Garcia > <ezequiel.garcia@free-electrons.com> wrote: > > On Wed, Mar 27, 2013 at 05:42:36PM -0700, Ryan Press wrote: > >> Ezequiel Garcia wrote: > >> > > >> >The Globalscale Mirabox board has a little gpio button > >> >placed just above the SD card slot; the board user guide labels > >> >this button as "System reset button". > >> > > >> >This patch adds support for this button in the device tree file. > >> I was not able to get this to work, I think there is > >> some IRQ problem. I was able to get it to work with > >> "gpio-keys-polled" however. > >> > > > > Could you explain what you did and what was your problem? > > Just to be on the same page, I pulled the latest 3-9-rc4, with no > other changes, and then added your patch. Does this rely on a patch? > No interrupt events are shown in /proc/interrupts. I have a lot more > things running than your box, maybe there is a conflict. > Try disabling SMP in your config. > > Oh and although I guess the bootloader sets it up, i wouldn't trust > it. There should probably be the pinctrl in the device tree, yes? > Yes, you're right. I'll take this into a v2. -- Ezequiel Garc?a, Free Electrons Embedded Linux, Kernel and Android Engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: mvebu: Add gpio button to Mirabox board 2013-03-29 16:50 ` Ezequiel Garcia @ 2013-03-29 17:30 ` Ryan Press 2013-03-29 18:13 ` Ezequiel Garcia 0 siblings, 1 reply; 6+ messages in thread From: Ryan Press @ 2013-03-29 17:30 UTC (permalink / raw) To: linux-arm-kernel On Fri, Mar 29, 2013 at 9:50 AM, Ezequiel Garcia <ezequiel.garcia@free-electrons.com> wrote: > On Thu, Mar 28, 2013 at 09:13:48PM -0700, Ryan Press wrote: >> On Wed, Mar 27, 2013 at 8:38 PM, Ezequiel Garcia >> <ezequiel.garcia@free-electrons.com> wrote: >> > On Wed, Mar 27, 2013 at 05:42:36PM -0700, Ryan Press wrote: >> >> Ezequiel Garcia wrote: >> >> > >> >> >The Globalscale Mirabox board has a little gpio button >> >> >placed just above the SD card slot; the board user guide labels >> >> >this button as "System reset button". >> >> > >> >> >This patch adds support for this button in the device tree file. >> >> I was not able to get this to work, I think there is >> >> some IRQ problem. I was able to get it to work with >> >> "gpio-keys-polled" however. >> >> >> > >> > Could you explain what you did and what was your problem? >> >> Just to be on the same page, I pulled the latest 3-9-rc4, with no >> other changes, and then added your patch. Does this rely on a patch? >> No interrupt events are shown in /proc/interrupts. I have a lot more >> things running than your box, maybe there is a conflict. >> > > Try disabling SMP in your config. Yes, that worked, thanks! I used mvebu_defconfig initially, and this has CONFIG_SMP. That's more for the Armada-XP I guess as for the Armada-370 it's not needed. So I guess that means that there's something wrong with the GPIO IRQs with SMP. Anyway it doesn't matter for the 370. Thanks, Ryan ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: mvebu: Add gpio button to Mirabox board 2013-03-29 17:30 ` Ryan Press @ 2013-03-29 18:13 ` Ezequiel Garcia 0 siblings, 0 replies; 6+ messages in thread From: Ezequiel Garcia @ 2013-03-29 18:13 UTC (permalink / raw) To: linux-arm-kernel On Fri, Mar 29, 2013 at 10:30:14AM -0700, Ryan Press wrote: > On Fri, Mar 29, 2013 at 9:50 AM, Ezequiel Garcia > <ezequiel.garcia@free-electrons.com> wrote: > > On Thu, Mar 28, 2013 at 09:13:48PM -0700, Ryan Press wrote: > >> On Wed, Mar 27, 2013 at 8:38 PM, Ezequiel Garcia > >> <ezequiel.garcia@free-electrons.com> wrote: > >> > On Wed, Mar 27, 2013 at 05:42:36PM -0700, Ryan Press wrote: > >> >> Ezequiel Garcia wrote: > >> >> > > >> >> >The Globalscale Mirabox board has a little gpio button > >> >> >placed just above the SD card slot; the board user guide labels > >> >> >this button as "System reset button". > >> >> > > >> >> >This patch adds support for this button in the device tree file. > >> >> I was not able to get this to work, I think there is > >> >> some IRQ problem. I was able to get it to work with > >> >> "gpio-keys-polled" however. > >> >> > >> > > >> > Could you explain what you did and what was your problem? > >> > >> Just to be on the same page, I pulled the latest 3-9-rc4, with no > >> other changes, and then added your patch. Does this rely on a patch? > >> No interrupt events are shown in /proc/interrupts. I have a lot more > >> things running than your box, maybe there is a conflict. > >> > > > > Try disabling SMP in your config. > > Yes, that worked, thanks! I used mvebu_defconfig initially, and this > has CONFIG_SMP. That's more for the Armada-XP I guess as for the > Armada-370 it's not needed. > Great. > So I guess that means that there's something wrong with the GPIO IRQs > with SMP. Anyway it doesn't matter for the 370. > Indeed, it doesn't matter if you plan to use your kernel only in a A370 SoC based product (A370 is single core). However, I'm afraid this could be a problem if you plan to use the same kernel on A370 *and* AXP (multi core) SoCs. Next week, we'll try to debug this issue (I've added Thomas, Gregory and Lior in Cc who might have better understanding about this). Thanks, -- Ezequiel Garc?a, Free Electrons Embedded Linux, Kernel and Android Engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: mvebu: Add gpio button to Mirabox board @ 2013-03-26 13:30 Ezequiel Garcia 0 siblings, 0 replies; 6+ messages in thread From: Ezequiel Garcia @ 2013-03-26 13:30 UTC (permalink / raw) To: linux-arm-kernel The Globalscale Mirabox board has a little gpio button placed just above the SD card slot; the board user guide labels this button as "System reset button". This patch adds support for this button in the device tree file. Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> --- arch/arm/boot/dts/armada-370-mirabox.dts | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/armada-370-mirabox.dts b/arch/arm/boot/dts/armada-370-mirabox.dts index dd0c57d..8fb7590 100644 --- a/arch/arm/boot/dts/armada-370-mirabox.dts +++ b/arch/arm/boot/dts/armada-370-mirabox.dts @@ -70,5 +70,16 @@ usb at d0051000 { status = "okay"; }; + + gpio-keys { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + reset at 1 { + label = "Reset Button"; + linux,code = <116>; + gpios = <&gpio1 26 1>; + }; + }; }; }; -- 1.7.8.6 ^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-03-29 18:13 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <CABx3TkVyVAzEJ54FV70fK3BoULKCOkgNcw32_K3XT-oCUWjEfg@mail.gmail.com> 2013-03-28 3:38 ` [PATCH] ARM: mvebu: Add gpio button to Mirabox board Ezequiel Garcia 2013-03-29 4:13 ` Ryan Press 2013-03-29 16:50 ` Ezequiel Garcia 2013-03-29 17:30 ` Ryan Press 2013-03-29 18:13 ` Ezequiel Garcia 2013-03-26 13:30 Ezequiel Garcia
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).