Skip to content

Commit

Permalink
ARM: dts: Add lid GPIO key device node for Peach boards
Browse files Browse the repository at this point in the history
The Exynos5420 Peach Pit and Exynos5800 Peach Pi boards have both
a power and lid GPIO keys but only the former was defined in the
DTS. Add DTS snippets for the lid GPIO key too. These were taken
from the downstream ChromeOS 3.8 kernel tree.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
  • Loading branch information
Javier Martinez Canillas authored and Kukjin Kim committed Jan 14, 2015
1 parent e5e5c6d commit 1f3cde4
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
18 changes: 17 additions & 1 deletion arch/arm/boot/dts/exynos5420-peach-pit.dts
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,23 @@
compatible = "gpio-keys";

pinctrl-names = "default";
pinctrl-0 = <&power_key_irq>;
pinctrl-0 = <&power_key_irq &lid_irq>;

power {
label = "Power";
gpios = <&gpx1 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
gpio-key,wakeup;
};

lid-switch {
label = "Lid";
gpios = <&gpx3 4 GPIO_ACTIVE_LOW>;
linux,input-type = <5>; /* EV_SW */
linux,code = <0>; /* SW_LID */
debounce-interval = <1>;
gpio-key,wakeup;
};
};

memory {
Expand Down Expand Up @@ -658,6 +667,13 @@
samsung,pin-drv = <0>;
};

lid_irq: lid-irq {
samsung,pins = "gpx3-4";
samsung,pin-function = <0xf>;
samsung,pin-pud = <0>;
samsung,pin-drv = <0>;
};

hdmi_hpd_irq: hdmi-hpd-irq {
samsung,pins = "gpx3-7";
samsung,pin-function = <0>;
Expand Down
19 changes: 18 additions & 1 deletion arch/arm/boot/dts/exynos5800-peach-pi.dts
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,24 @@
compatible = "gpio-keys";

pinctrl-names = "default";
pinctrl-0 = <&power_key_irq>;
pinctrl-0 = <&power_key_irq &lid_irq>;

power {
label = "Power";
gpios = <&gpx1 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
gpio-key,wakeup;
};

lid-switch {
label = "Lid";
gpios = <&gpx3 4 GPIO_ACTIVE_LOW>;
linux,input-type = <5>; /* EV_SW */
linux,code = <0>; /* SW_LID */
debounce-interval = <1>;
gpio-key,wakeup;
};

};

memory {
Expand Down Expand Up @@ -646,6 +656,13 @@
samsung,pin-drv = <0>;
};

lid_irq: lid-irq {
samsung,pins = "gpx3-4";
samsung,pin-function = <0xf>;
samsung,pin-pud = <0>;
samsung,pin-drv = <0>;
};

hdmi_hpd_irq: hdmi-hpd-irq {
samsung,pins = "gpx3-7";
samsung,pin-function = <0>;
Expand Down

0 comments on commit 1f3cde4

Please sign in to comment.