* [PATCH 0/2] ARM: shmobile: gose: Add GPIO keys and leds to DT
@ 2015-11-18 22:20 Simon Horman
2015-11-18 22:20 ` [PATCH 1/2] ARM: shmobile: gose: Add GPIO keys " Simon Horman
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Simon Horman @ 2015-11-18 22:20 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
this short series adds GPIO keys and leds to the device tree
of the r8a7793 based Gose board.
It uses the makes use of the recently addition of GPIO devices
to the device tree of the r8a7793. Thanks Magnus!
I have booted a system with these changes and verified that the
relevant entries appear to be present in sysfs.
I have not tested button press events or illumination of the leds
as I do not currently have physical access to a Gose board.
Based on renesas-devel-20151118-v4.4-rc1
Simon Horman (2):
ARM: shmobile: gose: Add GPIO keys to DT
ARM: shmobile: gose: Add GPIO leds to DT
arch/arm/boot/dts/r8a7793-gose.dts | 98 ++++++++++++++++++++++++++++++++++++++
1 file changed, 98 insertions(+)
--
2.1.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] ARM: shmobile: gose: Add GPIO keys to DT
2015-11-18 22:20 [PATCH 0/2] ARM: shmobile: gose: Add GPIO keys and leds to DT Simon Horman
@ 2015-11-18 22:20 ` Simon Horman
2015-11-18 22:20 ` [PATCH 2/2] ARM: shmobile: gose: Add GPIO leds " Simon Horman
2015-12-17 3:53 ` [PATCH 0/2] ARM: shmobile: gose: Add GPIO keys and " Magnus Damm
2 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2015-11-18 22:20 UTC (permalink / raw)
To: linux-arm-kernel
Instantiate the GPIO keys in the gose device tree.
Based on similar work for the koelsch board by Laurent Pinchart.
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
* Compile Tested Only
---
arch/arm/boot/dts/r8a7793-gose.dts | 82 ++++++++++++++++++++++++++++++++++++++
1 file changed, 82 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7793-gose.dts b/arch/arm/boot/dts/r8a7793-gose.dts
index d842ce77b7c8..ff391d2fb767 100644
--- a/arch/arm/boot/dts/r8a7793-gose.dts
+++ b/arch/arm/boot/dts/r8a7793-gose.dts
@@ -31,6 +31,88 @@
device_type = "memory";
reg = <0 0x40000000 0 0x40000000>;
};
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ key-1 {
+ gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_1>;
+ label = "SW2-1";
+ gpio-key,wakeup;
+ debounce-interval = <20>;
+ };
+ key-2 {
+ gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_2>;
+ label = "SW2-2";
+ gpio-key,wakeup;
+ debounce-interval = <20>;
+ };
+ key-3 {
+ gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_3>;
+ label = "SW2-3";
+ gpio-key,wakeup;
+ debounce-interval = <20>;
+ };
+ key-4 {
+ gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_4>;
+ label = "SW2-4";
+ gpio-key,wakeup;
+ debounce-interval = <20>;
+ };
+ key-a {
+ gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_A>;
+ label = "SW30";
+ gpio-key,wakeup;
+ debounce-interval = <20>;
+ };
+ key-b {
+ gpios = <&gpio7 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_B>;
+ label = "SW31";
+ gpio-key,wakeup;
+ debounce-interval = <20>;
+ };
+ key-c {
+ gpios = <&gpio7 2 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_C>;
+ label = "SW32";
+ gpio-key,wakeup;
+ debounce-interval = <20>;
+ };
+ key-d {
+ gpios = <&gpio7 3 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_D>;
+ label = "SW33";
+ gpio-key,wakeup;
+ debounce-interval = <20>;
+ };
+ key-e {
+ gpios = <&gpio7 4 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_E>;
+ label = "SW34";
+ gpio-key,wakeup;
+ debounce-interval = <20>;
+ };
+ key-f {
+ gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_F>;
+ label = "SW35";
+ gpio-key,wakeup;
+ debounce-interval = <20>;
+ };
+ key-g {
+ gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_G>;
+ label = "SW36";
+ gpio-key,wakeup;
+ debounce-interval = <20>;
+ };
+ };
};
&extal_clk {
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] ARM: shmobile: gose: Add GPIO leds to DT
2015-11-18 22:20 [PATCH 0/2] ARM: shmobile: gose: Add GPIO keys and leds to DT Simon Horman
2015-11-18 22:20 ` [PATCH 1/2] ARM: shmobile: gose: Add GPIO keys " Simon Horman
@ 2015-11-18 22:20 ` Simon Horman
2015-12-17 3:53 ` [PATCH 0/2] ARM: shmobile: gose: Add GPIO keys and " Magnus Damm
2 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2015-11-18 22:20 UTC (permalink / raw)
To: linux-arm-kernel
Instantiate the GPIO leds in the gose device tree.
Based on similar work for the koelsch board by Magnus Damm.
Cc: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
* Compile Tested Only
---
arch/arm/boot/dts/r8a7793-gose.dts | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7793-gose.dts b/arch/arm/boot/dts/r8a7793-gose.dts
index ff391d2fb767..7e1794736aa9 100644
--- a/arch/arm/boot/dts/r8a7793-gose.dts
+++ b/arch/arm/boot/dts/r8a7793-gose.dts
@@ -113,6 +113,22 @@
debounce-interval = <20>;
};
};
+
+ leds {
+ compatible = "gpio-leds";
+ led6 {
+ gpios = <&gpio2 19 GPIO_ACTIVE_HIGH>;
+ label = "LED6";
+ };
+ led7 {
+ gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>;
+ label = "LED7";
+ };
+ led8 {
+ gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
+ label = "LED8";
+ };
+ };
};
&extal_clk {
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] ARM: shmobile: gose: Add GPIO keys and leds to DT
2015-11-18 22:20 [PATCH 0/2] ARM: shmobile: gose: Add GPIO keys and leds to DT Simon Horman
2015-11-18 22:20 ` [PATCH 1/2] ARM: shmobile: gose: Add GPIO keys " Simon Horman
2015-11-18 22:20 ` [PATCH 2/2] ARM: shmobile: gose: Add GPIO leds " Simon Horman
@ 2015-12-17 3:53 ` Magnus Damm
2015-12-18 1:46 ` Simon Horman
2 siblings, 1 reply; 5+ messages in thread
From: Magnus Damm @ 2015-12-17 3:53 UTC (permalink / raw)
To: linux-arm-kernel
Hi Simon,
On Thu, Nov 19, 2015 at 7:20 AM, Simon Horman
<horms+renesas@verge.net.au> wrote:
> Hi,
>
> this short series adds GPIO keys and leds to the device tree
> of the r8a7793 based Gose board.
>
> It uses the makes use of the recently addition of GPIO devices
> to the device tree of the r8a7793. Thanks Magnus!
>
> I have booted a system with these changes and verified that the
> relevant entries appear to be present in sysfs.
>
> I have not tested button press events or illumination of the leds
> as I do not currently have physical access to a Gose board.
>
> Based on renesas-devel-20151118-v4.4-rc1
>
> Simon Horman (2):
> ARM: shmobile: gose: Add GPIO keys to DT
> ARM: shmobile: gose: Add GPIO leds to DT
>
> arch/arm/boot/dts/r8a7793-gose.dts | 98 ++++++++++++++++++++++++++++++++++++++
> 1 file changed, 98 insertions(+)
Thanks a lot for these patches! Very useful as basic a test
environment for the r8a7793 GPIO device nodes.
So I've now managed to test the GPIO keys and LED devices on a
physical Gose board. The LED6 -> LED 8 entries will be lit as expected
by controlling brightness in /sys/class/leds/. The GPIO keys
associated with buttons SW30 to SW36 and the dip switch SW2 all
generate interrupts in /proc/interrupts on key press or dip switch
change. All good!
Please queue up these changes. Feel free to add:
Tested-by: Magnus Damm <damm+renesas@opensource.se>
Cheers,
/ magnus
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] ARM: shmobile: gose: Add GPIO keys and leds to DT
2015-12-17 3:53 ` [PATCH 0/2] ARM: shmobile: gose: Add GPIO keys and " Magnus Damm
@ 2015-12-18 1:46 ` Simon Horman
0 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2015-12-18 1:46 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Dec 17, 2015 at 12:53:12PM +0900, Magnus Damm wrote:
> Hi Simon,
>
> On Thu, Nov 19, 2015 at 7:20 AM, Simon Horman
> <horms+renesas@verge.net.au> wrote:
> > Hi,
> >
> > this short series adds GPIO keys and leds to the device tree
> > of the r8a7793 based Gose board.
> >
> > It uses the makes use of the recently addition of GPIO devices
> > to the device tree of the r8a7793. Thanks Magnus!
> >
> > I have booted a system with these changes and verified that the
> > relevant entries appear to be present in sysfs.
> >
> > I have not tested button press events or illumination of the leds
> > as I do not currently have physical access to a Gose board.
> >
> > Based on renesas-devel-20151118-v4.4-rc1
> >
> > Simon Horman (2):
> > ARM: shmobile: gose: Add GPIO keys to DT
> > ARM: shmobile: gose: Add GPIO leds to DT
> >
> > arch/arm/boot/dts/r8a7793-gose.dts | 98 ++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 98 insertions(+)
>
> Thanks a lot for these patches! Very useful as basic a test
> environment for the r8a7793 GPIO device nodes.
>
> So I've now managed to test the GPIO keys and LED devices on a
> physical Gose board. The LED6 -> LED 8 entries will be lit as expected
> by controlling brightness in /sys/class/leds/. The GPIO keys
> associated with buttons SW30 to SW36 and the dip switch SW2 all
> generate interrupts in /proc/interrupts on key press or dip switch
> change. All good!
>
> Please queue up these changes. Feel free to add:
>
> Tested-by: Magnus Damm <damm+renesas@opensource.se>
Thanks, I have queued these up for v4.6.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-12-18 1:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-18 22:20 [PATCH 0/2] ARM: shmobile: gose: Add GPIO keys and leds to DT Simon Horman
2015-11-18 22:20 ` [PATCH 1/2] ARM: shmobile: gose: Add GPIO keys " Simon Horman
2015-11-18 22:20 ` [PATCH 2/2] ARM: shmobile: gose: Add GPIO leds " Simon Horman
2015-12-17 3:53 ` [PATCH 0/2] ARM: shmobile: gose: Add GPIO keys and " Magnus Damm
2015-12-18 1:46 ` Simon Horman
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).