All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] ARM: dts: Add Peach Pit and Pi dts entry for atmel touchpad
@ 2014-08-07  1:08 Javier Martinez Canillas
  2014-08-07  1:35 ` Fabio Estevam
  0 siblings, 1 reply; 4+ messages in thread
From: Javier Martinez Canillas @ 2014-08-07  1:08 UTC (permalink / raw)
  To: Kukjin Kim
  Cc: Sjoerd Simons, Dmitry Torokhov, Nick Dyer, Stephen Warren,
	Yufeng Shen, Benson Leung, Doug Anderson, Olof Johansson,
	linux-input, devicetree, linux-samsung-soc, linux-kernel,
	Javier Martinez Canillas

From: Sjoerd Simons <sjoerd.simons@collabora.co.uk>

The Peach Pit and Pi boards have an Atmel maXTouch device.
Add the needed Device Tree nodes to support it.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
[javier.martinez: added linux,gpio-keymap property and changed IRQ type]
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---

With only this patch the touchpad is probed but interrupts are not being
generated. The following is needed to have a fully functional touchpad:

[PATCH 1/2] "Input: atmel_mxt_ts - Get IRQ edge/level flags on DT booting"
https://lkml.org/lkml/2014/8/6/585

 arch/arm/boot/dts/exynos5420-peach-pit.dts | 29 +++++++++++++++++++++++++++++
 arch/arm/boot/dts/exynos5800-peach-pi.dts  | 29 +++++++++++++++++++++++++++++
 2 files changed, 58 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
index 228a6b1..7dce444 100644
--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
@@ -11,6 +11,7 @@
 /dts-v1/;
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 #include "exynos5420.dtsi"
 
 / {
@@ -157,6 +158,27 @@
 	};
 };
 
+&hsi2c_8 {
+	status = "okay";
+	clock-frequency = <333000>;
+
+	trackpad@4b {
+		compatible="atmel,maxtouch";
+		reg=<0x4b>;
+		interrupt-parent=<&gpx1>;
+		interrupts=<1 IRQ_TYPE_EDGE_FALLING>;
+		wakeup-source;
+		pinctrl-names = "default";
+		pinctrl-0 = <&trackpad_irq>;
+		linux,gpio-keymap = < BTN_LEFT
+				      BTN_TOOL_FINGER
+				      BTN_TOOL_DOUBLETAP
+				      BTN_TOOL_TRIPLETAP
+				      BTN_TOOL_QUADTAP
+				      BTN_TOOL_QUINTTAP >;
+	};
+};
+
 &hsi2c_9 {
 	status = "okay";
 	clock-frequency = <400000>;
@@ -249,6 +271,13 @@
 		samsung,pin-drv = <0>;
 	};
 
+	trackpad_irq: trackpad-irq {
+		samsung,pins = "gpx1-1";
+		samsung,pin-function = <0>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
 	power_key_irq: power-key-irq {
 		samsung,pins = "gpx1-2";
 		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 f3ee48b..de946b3 100644
--- a/arch/arm/boot/dts/exynos5800-peach-pi.dts
+++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts
@@ -11,6 +11,7 @@
 /dts-v1/;
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 #include "exynos5800.dtsi"
 
 / {
@@ -155,6 +156,27 @@
 	};
 };
 
+&hsi2c_8 {
+	status = "okay";
+	clock-frequency = <333000>;
+
+	trackpad@4b {
+		compatible="atmel,maxtouch";
+		reg=<0x4b>;
+		interrupt-parent=<&gpx1>;
+		interrupts=<1 IRQ_TYPE_EDGE_FALLING>;
+		wakeup-source;
+		pinctrl-names = "default";
+		pinctrl-0 = <&trackpad_irq>;
+		linux,gpio-keymap = < BTN_LEFT
+				      BTN_TOOL_FINGER
+				      BTN_TOOL_DOUBLETAP
+				      BTN_TOOL_TRIPLETAP
+				      BTN_TOOL_QUADTAP
+				      BTN_TOOL_QUINTTAP >;
+	};
+};
+
 &hsi2c_9 {
 	status = "okay";
 	clock-frequency = <400000>;
@@ -247,6 +269,13 @@
 		samsung,pin-drv = <0>;
 	};
 
+	trackpad_irq: trackpad-irq {
+		samsung,pins = "gpx1-1";
+		samsung,pin-function = <0>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
 	power_key_irq: power-key-irq {
 		samsung,pins = "gpx1-2";
 		samsung,pin-function = <0>;
-- 
2.0.0.rc2


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

* Re: [PATCH 1/1] ARM: dts: Add Peach Pit and Pi dts entry for atmel touchpad
  2014-08-07  1:08 [PATCH 1/1] ARM: dts: Add Peach Pit and Pi dts entry for atmel touchpad Javier Martinez Canillas
@ 2014-08-07  1:35 ` Fabio Estevam
  2014-08-07  1:49   ` Javier Martinez Canillas
  2014-08-07  2:18   ` Doug Anderson
  0 siblings, 2 replies; 4+ messages in thread
From: Fabio Estevam @ 2014-08-07  1:35 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Kukjin Kim, Sjoerd Simons, Dmitry Torokhov, Nick Dyer,
	Stephen Warren, Yufeng Shen, Benson Leung, Doug Anderson,
	Olof Johansson, linux-input, devicetree, linux-samsung-soc,
	linux-kernel

On Wed, Aug 6, 2014 at 10:08 PM, Javier Martinez Canillas
<javier.martinez@collabora.co.uk> wrote:

> +&hsi2c_8 {
> +       status = "okay";
> +       clock-frequency = <333000>;

Doesn't it work at the more standard 400kHz i2c frequency?

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

* Re: [PATCH 1/1] ARM: dts: Add Peach Pit and Pi dts entry for atmel touchpad
  2014-08-07  1:35 ` Fabio Estevam
@ 2014-08-07  1:49   ` Javier Martinez Canillas
  2014-08-07  2:18   ` Doug Anderson
  1 sibling, 0 replies; 4+ messages in thread
From: Javier Martinez Canillas @ 2014-08-07  1:49 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Kukjin Kim, Sjoerd Simons, Dmitry Torokhov, Nick Dyer,
	Stephen Warren, Yufeng Shen, Benson Leung, Doug Anderson,
	Olof Johansson, linux-input, devicetree, linux-samsung-soc,
	linux-kernel

Hello Fabio,

On 08/07/2014 03:35 AM, Fabio Estevam wrote:
> On Wed, Aug 6, 2014 at 10:08 PM, Javier Martinez Canillas
> <javier.martinez@collabora.co.uk> wrote:
> 
>> +&hsi2c_8 {
>> +       status = "okay";
>> +       clock-frequency = <333000>;
> 
> Doesn't it work at the more standard 400kHz i2c frequency?
> 

Most bits of this DTS snippet have been taken from the downstream Chrome OS 3.8
kernel so I'll let one of the Chromium folks to answer this question.

Best regards,
Javier

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

* Re: [PATCH 1/1] ARM: dts: Add Peach Pit and Pi dts entry for atmel touchpad
  2014-08-07  1:35 ` Fabio Estevam
  2014-08-07  1:49   ` Javier Martinez Canillas
@ 2014-08-07  2:18   ` Doug Anderson
  1 sibling, 0 replies; 4+ messages in thread
From: Doug Anderson @ 2014-08-07  2:18 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Javier Martinez Canillas, Kukjin Kim, Sjoerd Simons,
	Dmitry Torokhov, Nick Dyer, Stephen Warren, Yufeng Shen,
	Benson Leung, Olof Johansson, linux-input, devicetree,
	linux-samsung-soc, linux-kernel

Fabio,

On Wed, Aug 6, 2014 at 6:35 PM, Fabio Estevam <festevam@gmail.com> wrote:
> On Wed, Aug 6, 2014 at 10:08 PM, Javier Martinez Canillas
> <javier.martinez@collabora.co.uk> wrote:
>
>> +&hsi2c_8 {
>> +       status = "okay";
>> +       clock-frequency = <333000>;
>
> Doesn't it work at the more standard 400kHz i2c frequency?

I'm pretty sure that they had signaling problems at 400kHz, but
perhaps Benson will rememer.

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

end of thread, other threads:[~2014-08-07  2:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-07  1:08 [PATCH 1/1] ARM: dts: Add Peach Pit and Pi dts entry for atmel touchpad Javier Martinez Canillas
2014-08-07  1:35 ` Fabio Estevam
2014-08-07  1:49   ` Javier Martinez Canillas
2014-08-07  2:18   ` Doug Anderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.