linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Small updates to Snow and Peach Pit/Pi DTS
@ 2014-12-12 10:25 Javier Martinez Canillas
  2014-12-12 10:25 ` [PATCH 1/3] ARM: dts: Add power and lid GPIO keys pinctrl for exynos5250-snow Javier Martinez Canillas
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Javier Martinez Canillas @ 2014-12-12 10:25 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Kukjin,

This series adds some DTS snippets that were missing in the mainline
Snow and Peach Pit/Pi Device Trees but are present in the downstream
ChromeOS kernel.

The series is composed of the following patches:

Javier Martinez Canillas (3):
  ARM: dts: Add power and lid GPIO keys pinctrl for exynos5250-snow
  ARM: dts: Add lid GPIO key device node for Peach boards
  ARM: dts: Set Peach boards USB WebCam regulators to always on

 arch/arm/boot/dts/exynos5250-snow.dts      | 16 ++++++++++++++++
 arch/arm/boot/dts/exynos5420-peach-pit.dts | 19 ++++++++++++++++++-
 arch/arm/boot/dts/exynos5800-peach-pi.dts  | 20 +++++++++++++++++++-
 3 files changed, 53 insertions(+), 2 deletions(-)

Patch #1 adds some pinctrl lines for the GPIO keys in the Snow DTS.

Patch #2 adds a device node and pinctrl lines for the lid GPIO in
the Peach boards DTS.

Patch #3 sets the regulators that supply voltage to the USB WebCam
in Peach boards as always on.

Best regards,
Javier

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] ARM: dts: Add power and lid GPIO keys pinctrl for exynos5250-snow
  2014-12-12 10:25 [PATCH 0/3] Small updates to Snow and Peach Pit/Pi DTS Javier Martinez Canillas
@ 2014-12-12 10:25 ` Javier Martinez Canillas
  2014-12-12 10:25 ` [PATCH 2/3] ARM: dts: Add lid GPIO key device node for Peach boards Javier Martinez Canillas
  2014-12-12 10:25 ` [PATCH 3/3] ARM: dts: Set Peach boards USB WebCam regulators to always on Javier Martinez Canillas
  2 siblings, 0 replies; 4+ messages in thread
From: Javier Martinez Canillas @ 2014-12-12 10:25 UTC (permalink / raw)
  To: linux-arm-kernel

The Exynos5250 Snow Chromebook has GPIO keys for power and lid
so the SoC I/O pins have to be configured in external interrupt
mode. Currently, this is working without setting the pinctrl
lines but is better to set it explicitly instead of relying on
the previous state of the I/O pins.

The DTS snippets were taken from the downstream ChromeOS tree.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
 arch/arm/boot/dts/exynos5250-snow.dts | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5250-snow.dts b/arch/arm/boot/dts/exynos5250-snow.dts
index effaf2a..b9aeec4 100644
--- a/arch/arm/boot/dts/exynos5250-snow.dts
+++ b/arch/arm/boot/dts/exynos5250-snow.dts
@@ -33,6 +33,8 @@
 
 	gpio-keys {
 		compatible = "gpio-keys";
+		pinctrl-names = "default";
+		pinctrl-0 = <&power_key_irq &lid_irq>;
 
 		power {
 			label = "Power";
@@ -540,6 +542,13 @@
 };
 
 &pinctrl_0 {
+	power_key_irq: power-key-irq {
+		samsung,pins = "gpx1-3";
+		samsung,pin-function = <0xf>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
 	ec_irq: ec-irq {
 		samsung,pins = "gpx1-6";
 		samsung,pin-function = <0>;
@@ -575,6 +584,13 @@
 		samsung,pin-drv = <0>;
 	};
 
+	lid_irq: lid-irq {
+		samsung,pins = "gpx3-5";
+		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>;
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] ARM: dts: Add lid GPIO key device node for Peach boards
  2014-12-12 10:25 [PATCH 0/3] Small updates to Snow and Peach Pit/Pi DTS Javier Martinez Canillas
  2014-12-12 10:25 ` [PATCH 1/3] ARM: dts: Add power and lid GPIO keys pinctrl for exynos5250-snow Javier Martinez Canillas
@ 2014-12-12 10:25 ` Javier Martinez Canillas
  2014-12-12 10:25 ` [PATCH 3/3] ARM: dts: Set Peach boards USB WebCam regulators to always on Javier Martinez Canillas
  2 siblings, 0 replies; 4+ messages in thread
From: Javier Martinez Canillas @ 2014-12-12 10:25 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 arch/arm/boot/dts/exynos5420-peach-pit.dts | 18 +++++++++++++++++-
 arch/arm/boot/dts/exynos5800-peach-pi.dts  | 19 ++++++++++++++++++-
 2 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
index 9a050e1..fa74a73 100644
--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
@@ -53,7 +53,7 @@
 		compatible = "gpio-keys";
 
 		pinctrl-names = "default";
-		pinctrl-0 = <&power_key_irq>;
+		pinctrl-0 = <&power_key_irq &lid_irq>;
 
 		power {
 			label = "Power";
@@ -61,6 +61,15 @@
 			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 {
@@ -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>;
diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts
index e8fdda8..d603e73 100644
--- a/arch/arm/boot/dts/exynos5800-peach-pi.dts
+++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts
@@ -52,7 +52,7 @@
 		compatible = "gpio-keys";
 
 		pinctrl-names = "default";
-		pinctrl-0 = <&power_key_irq>;
+		pinctrl-0 = <&power_key_irq &lid_irq>;
 
 		power {
 			label = "Power";
@@ -60,6 +60,16 @@
 			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 {
@@ -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>;
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] ARM: dts: Set Peach boards USB WebCam regulators to always on
  2014-12-12 10:25 [PATCH 0/3] Small updates to Snow and Peach Pit/Pi DTS Javier Martinez Canillas
  2014-12-12 10:25 ` [PATCH 1/3] ARM: dts: Add power and lid GPIO keys pinctrl for exynos5250-snow Javier Martinez Canillas
  2014-12-12 10:25 ` [PATCH 2/3] ARM: dts: Add lid GPIO key device node for Peach boards Javier Martinez Canillas
@ 2014-12-12 10:25 ` Javier Martinez Canillas
  2 siblings, 0 replies; 4+ messages in thread
From: Javier Martinez Canillas @ 2014-12-12 10:25 UTC (permalink / raw)
  To: linux-arm-kernel

The Exynos5420 Peach Pit and Exynos5800 Peach Pi boards have a built-in
Silicon Motion USB UVC WebCam whose power supply is the tps65090 fet5
regulator. Since the camera uses the generic USB Video Class driver and
this does not grab a regulator, mark the regulator as always on so the
USB device is enumerated and usable.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
 arch/arm/boot/dts/exynos5420-peach-pit.dts | 1 +
 arch/arm/boot/dts/exynos5800-peach-pi.dts  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
index fa74a73..a4c5152 100644
--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
@@ -831,6 +831,7 @@
 					};
 					tps65090_fet5: fet5 {
 						regulator-name = "camout";
+						regulator-always-on;
 					};
 					tps65090_fet6: fet6 {
 						regulator-name = "lcd_vdd";
diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts
index d603e73..1367276 100644
--- a/arch/arm/boot/dts/exynos5800-peach-pi.dts
+++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts
@@ -820,6 +820,7 @@
 					};
 					tps65090_fet5: fet5 {
 						regulator-name = "camout";
+						regulator-always-on;
 					};
 					tps65090_fet6: fet6 {
 						regulator-name = "lcd_vdd";
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-12-12 10:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-12 10:25 [PATCH 0/3] Small updates to Snow and Peach Pit/Pi DTS Javier Martinez Canillas
2014-12-12 10:25 ` [PATCH 1/3] ARM: dts: Add power and lid GPIO keys pinctrl for exynos5250-snow Javier Martinez Canillas
2014-12-12 10:25 ` [PATCH 2/3] ARM: dts: Add lid GPIO key device node for Peach boards Javier Martinez Canillas
2014-12-12 10:25 ` [PATCH 3/3] ARM: dts: Set Peach boards USB WebCam regulators to always on Javier Martinez Canillas

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).