powerpc: wii.dts: GPIO interrupt and button support
Subsystems (2)
cover powerpc: wii.dts: GPIO interrupt and button support
This patchset adds the necessary bits to wii.dts to enable interrupt support in the GPIO controller, and defines two GPIO-based buttons, the POWER button and the EJECT button.
I will send another patchset which will implement interrupt support in the GPIO driver (gpio-hlwd.c).
Jonathan Neuschäfer (2):
powerpc: wii.dts: Add interrupt-related properties to GPIO node
powerpc: wii.dts: Add GPIO keys
arch/powerpc/boot/dts/wii.dts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
Signature · 1 line
2.20.1
PATCH 1/2 powerpc: wii.dts: Add interrupt-related properties to GPIO node
The Hollywood GPIO controller is connected to the Hollywood PIC (&PIC1) at IRQs 10 and 11; IRQ 10 for GPIO lines that are configured for access by the PPC, 11 for GPIO lines that are configured for access by the ARM926.
--- arch/powerpc/boot/dts/wii.dts | 5 +++++ 1 file changed, 5 insertions(+)
arch/powerpc/boot/dts/wii.dts +5 -0
@@ -187,6 +187,11 @@ "DEBUG0", "DEBUG1", "DEBUG2", "DEBUG3", "DEBUG4", "DEBUG5", "DEBUG6", "DEBUG7"; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = <10>; + interrupt-parent = <&PIC1>; + /* * This is commented out while a standard binding * for i2c over gpio is defined.
Signature · 1 line
2.20.1
Michael Ellerman
AppliedRe: [1/2] powerpc: wii.dts: Add interrupt-related properties to GPIO node
Quoted 6 lines · On Sat, 2019-01-12 at 16:21:23 UTC, =?utf-8?q?Jonathan_Neusch=C3=A4fer?= wrote:
The Hollywood GPIO controller is connected to the Hollywood PIC (&PIC1) at IRQs 10 and 11; IRQ 10 for GPIO lines that are configured for access by the PPC, 11 for GPIO lines that are configured for access by the ARM926.
Signed-off-by Jonathan Neuschäfer <[email protected]>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/8de7547e03059281fda075355c114694
cheers
Michael Ellerman
AppliedRe: [1/2] powerpc: wii.dts: Add interrupt-related properties to GPIO node
In reply to Jonathan NeuschäferQuoted 6 lines · On Sat, 2019-01-12 at 16:21:23 UTC, =?utf-8?q?Jonathan_Neusch=C3=A4fer?= wrote:
The Hollywood GPIO controller is connected to the Hollywood PIC (&PIC1) at IRQs 10 and 11; IRQ 10 for GPIO lines that are configured for access by the PPC, 11 for GPIO lines that are configured for access by the ARM926.
Signed-off-by Jonathan Neuschäfer <[email protected]>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/f4ddc19a711736eb54fb8259499faf5a
cheers
PATCH 2/2 powerpc: wii.dts: Add GPIO keys
In reply to Jonathan NeuschäferThe Wii has POWER and EJECT buttons, which are connected through normalization logic to the GPIO controller (the length of an assertion of these signals is always the same, regardless of how long the user pressed the buttons).
--- arch/powerpc/boot/dts/wii.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
arch/powerpc/boot/dts/wii.dts +17 -0
@@ -14,6 +14,7 @@ /dts-v1/; #include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> /* * This is commented-out for now.
@@ -249,5 +250,21 @@ gpios = <&GPIO 8 GPIO_ACTIVE_HIGH>; }; }; + + gpio-keys { + compatible = "gpio-keys"; + + power { + label = "Power Button"; + gpios = <&GPIO 0 GPIO_ACTIVE_HIGH>; + linux,code = <KEY_POWER>; + }; + + eject { + label = "Eject Button"; + gpios = <&GPIO 6 GPIO_ACTIVE_HIGH>; + linux,code = <KEY_EJECTCD>; + }; + }; };
Signature · 1 line
2.20.1