linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Enable ST Keyscan driver
@ 2014-05-05 15:38 Gabriel FERNANDEZ
  2014-05-05 15:38 ` [PATCH 1/4] ARM: STi: DT: add keyscan for stih415 Gabriel FERNANDEZ
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Gabriel FERNANDEZ @ 2014-05-05 15:38 UTC (permalink / raw)
  To: Srinivas Kandagatla, Maxime Coquelin, Patrice Chotard,
	Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Russell King
  Cc: linux-arm-kernel, kernel, devicetree, linux-kernel, Lee Jones,
	Gabriel Fernandez

The goal of this series is to enable ST Keyscan support to ST SoCs.
The DT definition is added for STiH415 and STiH416 SoCs on
B2000 board.
Tested on B2000 sti board.

Gabriel Fernandez (4):
  ARM: STi: DT: add keyscan for stih415
  ARM: STi: DT: add keyscan for stih416
  ARM: STi: DT: add keyscan for stih41x-b2000
  ARM: multi_v7_defconfig: add ST Keyscan driver

 arch/arm/boot/dts/stih415-pinctrl.dtsi | 16 ++++++++++++++++
 arch/arm/boot/dts/stih415.dtsi         | 12 ++++++++++++
 arch/arm/boot/dts/stih416-pinctrl.dtsi | 16 ++++++++++++++++
 arch/arm/boot/dts/stih416.dtsi         | 12 ++++++++++++
 arch/arm/boot/dts/stih41x-b2000.dtsi   | 23 +++++++++++++++++++++++
 arch/arm/configs/multi_v7_defconfig    |  1 +
 6 files changed, 80 insertions(+)

-- 
1.9.1


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

* [PATCH 1/4] ARM: STi: DT: add keyscan for stih415
  2014-05-05 15:38 [PATCH 0/4] Enable ST Keyscan driver Gabriel FERNANDEZ
@ 2014-05-05 15:38 ` Gabriel FERNANDEZ
  2014-05-05 15:38 ` [PATCH 2/4] ARM: STi: DT: add keyscan for stih416 Gabriel FERNANDEZ
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Gabriel FERNANDEZ @ 2014-05-05 15:38 UTC (permalink / raw)
  To: Srinivas Kandagatla, Maxime Coquelin, Patrice Chotard,
	Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Russell King
  Cc: linux-arm-kernel, kernel, devicetree, linux-kernel, Lee Jones,
	Gabriel Fernandez, Giuseppe Condorelli

Add keyscan support for stih415.
It is put disabled by default because it is not enabled on all boards
Also there are PIOs conflict with already claimed lines.

Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com>
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@linaro.org>
---
 arch/arm/boot/dts/stih415-pinctrl.dtsi | 16 ++++++++++++++++
 arch/arm/boot/dts/stih415.dtsi         | 12 ++++++++++++
 2 files changed, 28 insertions(+)

diff --git a/arch/arm/boot/dts/stih415-pinctrl.dtsi b/arch/arm/boot/dts/stih415-pinctrl.dtsi
index 81df870..8509a03 100644
--- a/arch/arm/boot/dts/stih415-pinctrl.dtsi
+++ b/arch/arm/boot/dts/stih415-pinctrl.dtsi
@@ -102,6 +102,22 @@
 				};
 			};
 
+			keyscan {
+				pinctrl_keyscan: keyscan {
+					st,pins {
+						keyin0 = <&PIO0 2 ALT2 IN>;
+						keyin1 = <&PIO0 3 ALT2 IN>;
+						keyin2 = <&PIO0 4 ALT2 IN>;
+						keyin3 = <&PIO2 6 ALT2 IN>;
+
+						keyout0 = <&PIO1 6 ALT2 OUT>;
+						keyout1 = <&PIO1 7 ALT2 OUT>;
+						keyout2 = <&PIO0 6 ALT2 OUT>;
+						keyout3 = <&PIO2 7 ALT2 OUT>;
+					};
+				};
+			};
+
 			sbc_i2c0 {
 				pinctrl_sbc_i2c0_default: sbc_i2c0-default {
 					st,pins {
diff --git a/arch/arm/boot/dts/stih415.dtsi b/arch/arm/boot/dts/stih415.dtsi
index d89064c..ba0905c 100644
--- a/arch/arm/boot/dts/stih415.dtsi
+++ b/arch/arm/boot/dts/stih415.dtsi
@@ -206,5 +206,17 @@
 			pinctrl-0	= <&pinctrl_ir>;
 			resets		= <&softreset STIH415_IRB_SOFTRESET>;
 		};
+
+		keyscan: keyscan@fe4b0000 {
+			compatible = "st,sti-keyscan";
+			status = "disabled";
+			reg = <0xfe4b0000 0x2000>;
+			interrupts = <GIC_SPI 212 IRQ_TYPE_NONE>;
+			clocks = <&CLK_SYSIN>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&pinctrl_keyscan>;
+			resets	= <&powerdown STIH415_KEYSCAN_POWERDOWN>,
+				  <&softreset STIH415_KEYSCAN_SOFTRESET>;
+		};
 	};
 };
-- 
1.9.1


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

* [PATCH 2/4] ARM: STi: DT: add keyscan for stih416
  2014-05-05 15:38 [PATCH 0/4] Enable ST Keyscan driver Gabriel FERNANDEZ
  2014-05-05 15:38 ` [PATCH 1/4] ARM: STi: DT: add keyscan for stih415 Gabriel FERNANDEZ
@ 2014-05-05 15:38 ` Gabriel FERNANDEZ
  2014-05-05 15:38 ` [PATCH 3/4] ARM: STi: DT: add keyscan for stih41x-b2000 Gabriel FERNANDEZ
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Gabriel FERNANDEZ @ 2014-05-05 15:38 UTC (permalink / raw)
  To: Srinivas Kandagatla, Maxime Coquelin, Patrice Chotard,
	Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Russell King
  Cc: linux-arm-kernel, kernel, devicetree, linux-kernel, Lee Jones,
	Gabriel Fernandez, Giuseppe Condorelli

Add keyscan support for stih416.
It is disabled by default given that it is not enabled on all boards.
Also there are PIOs conflict with already claimed lines.

Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com>
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@linaro.org>
---
 arch/arm/boot/dts/stih416-pinctrl.dtsi | 16 ++++++++++++++++
 arch/arm/boot/dts/stih416.dtsi         | 12 ++++++++++++
 2 files changed, 28 insertions(+)

diff --git a/arch/arm/boot/dts/stih416-pinctrl.dtsi b/arch/arm/boot/dts/stih416-pinctrl.dtsi
index 250d5ec..ee6c119 100644
--- a/arch/arm/boot/dts/stih416-pinctrl.dtsi
+++ b/arch/arm/boot/dts/stih416-pinctrl.dtsi
@@ -122,6 +122,22 @@
 				};
 			};
 
+			keyscan {
+				pinctrl_keyscan: keyscan {
+					st,pins {
+						keyin0 = <&PIO0 2 ALT2 IN>;
+						keyin1 = <&PIO0 3 ALT2 IN>;
+						keyin2 = <&PIO0 4 ALT2 IN>;
+						keyin3 = <&PIO2 6 ALT2 IN>;
+
+						keyout0 = <&PIO1 6 ALT2 OUT>;
+						keyout1 = <&PIO1 7 ALT2 OUT>;
+						keyout2 = <&PIO0 6 ALT2 OUT>;
+						keyout3 = <&PIO2 7 ALT2 OUT>;
+					};
+				};
+			};
+
 			sbc_i2c0 {
 				pinctrl_sbc_i2c0_default: sbc_i2c0-default {
 					st,pins {
diff --git a/arch/arm/boot/dts/stih416.dtsi b/arch/arm/boot/dts/stih416.dtsi
index 78746d2..d3bc263 100644
--- a/arch/arm/boot/dts/stih416.dtsi
+++ b/arch/arm/boot/dts/stih416.dtsi
@@ -224,5 +224,17 @@
 
 			status = "disabled";
 		};
+
+		keyscan: keyscan@fe4b0000 {
+			compatible = "st,sti-keyscan";
+			status = "disabled";
+			reg = <0xfe4b0000 0x2000>;
+			interrupts = <GIC_SPI 212 IRQ_TYPE_NONE>;
+			clocks = <&CLK_SYSIN>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&pinctrl_keyscan>;
+			resets	= <&powerdown STIH416_KEYSCAN_POWERDOWN>,
+				  <&softreset STIH416_KEYSCAN_SOFTRESET>;
+		};
 	};
 };
-- 
1.9.1


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

* [PATCH 3/4] ARM: STi: DT: add keyscan for stih41x-b2000
  2014-05-05 15:38 [PATCH 0/4] Enable ST Keyscan driver Gabriel FERNANDEZ
  2014-05-05 15:38 ` [PATCH 1/4] ARM: STi: DT: add keyscan for stih415 Gabriel FERNANDEZ
  2014-05-05 15:38 ` [PATCH 2/4] ARM: STi: DT: add keyscan for stih416 Gabriel FERNANDEZ
@ 2014-05-05 15:38 ` Gabriel FERNANDEZ
  2014-05-05 15:38 ` [PATCH 4/4] ARM: multi_v7_defconfig: add ST Keyscan driver Gabriel FERNANDEZ
  2014-05-06 12:39 ` [PATCH 0/4] Enable " Srinivas Kandagatla
  4 siblings, 0 replies; 7+ messages in thread
From: Gabriel FERNANDEZ @ 2014-05-05 15:38 UTC (permalink / raw)
  To: Srinivas Kandagatla, Maxime Coquelin, Patrice Chotard,
	Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Russell King
  Cc: linux-arm-kernel, kernel, devicetree, linux-kernel, Lee Jones,
	Gabriel Fernandez, Giuseppe Condorelli

Add keyscan setup for stih415/h416 b2000.
Both have same raw/column lines number, debounce time and keymap.

Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com>
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@linaro.org>
---
 arch/arm/boot/dts/stih41x-b2000.dtsi | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/arch/arm/boot/dts/stih41x-b2000.dtsi b/arch/arm/boot/dts/stih41x-b2000.dtsi
index bf65c49..403bf1b 100644
--- a/arch/arm/boot/dts/stih41x-b2000.dtsi
+++ b/arch/arm/boot/dts/stih41x-b2000.dtsi
@@ -6,6 +6,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * publishhed by the Free Software Foundation.
  */
+#include <dt-bindings/input/input.h>
 / {
 
 	memory{
@@ -68,5 +69,27 @@
 			snps,reset-active-low;
 			snps,reset-delays-us 	= <0 10000 10000>;
 		};
+
+		keyscan: keyscan@fe4b0000 {
+			keypad,num-rows = <4>;
+			keypad,num-columns = <4>;
+			st,debounce-us = <5000>;
+			linux,keymap = < MATRIX_KEY(0x00, 0x00, KEY_F13)
+					 MATRIX_KEY(0x00, 0x01, KEY_F9)
+					 MATRIX_KEY(0x00, 0x02, KEY_F5)
+					 MATRIX_KEY(0x00, 0x03, KEY_F1)
+					 MATRIX_KEY(0x01, 0x00, KEY_F14)
+					 MATRIX_KEY(0x01, 0x01, KEY_F10)
+					 MATRIX_KEY(0x01, 0x02, KEY_F6)
+					 MATRIX_KEY(0x01, 0x03, KEY_F2)
+					 MATRIX_KEY(0x02, 0x00, KEY_F15)
+					 MATRIX_KEY(0x02, 0x01, KEY_F11)
+					 MATRIX_KEY(0x02, 0x02, KEY_F7)
+					 MATRIX_KEY(0x02, 0x03, KEY_F3)
+					 MATRIX_KEY(0x03, 0x00, KEY_F16)
+					 MATRIX_KEY(0x03, 0x01, KEY_F12)
+					 MATRIX_KEY(0x03, 0x02, KEY_F8)
+					 MATRIX_KEY(0x03, 0x03, KEY_F4) >;
+		};
 	};
 };
-- 
1.9.1


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

* [PATCH 4/4] ARM: multi_v7_defconfig: add ST Keyscan driver
  2014-05-05 15:38 [PATCH 0/4] Enable ST Keyscan driver Gabriel FERNANDEZ
                   ` (2 preceding siblings ...)
  2014-05-05 15:38 ` [PATCH 3/4] ARM: STi: DT: add keyscan for stih41x-b2000 Gabriel FERNANDEZ
@ 2014-05-05 15:38 ` Gabriel FERNANDEZ
  2014-05-06 12:39 ` [PATCH 0/4] Enable " Srinivas Kandagatla
  4 siblings, 0 replies; 7+ messages in thread
From: Gabriel FERNANDEZ @ 2014-05-05 15:38 UTC (permalink / raw)
  To: Srinivas Kandagatla, Maxime Coquelin, Patrice Chotard,
	Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Russell King
  Cc: linux-arm-kernel, kernel, devicetree, linux-kernel, Lee Jones,
	Gabriel Fernandez

This patch adds KEYBOARD_ST_KEYSCAN config

Signed-off-by: Gabriel Fernandez <gabriel.fernandez@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/configs/multi_v7_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index d4e8a47..4f0dce1 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -143,6 +143,7 @@ CONFIG_INPUT_EVDEV=y
 CONFIG_KEYBOARD_GPIO=y
 CONFIG_KEYBOARD_TEGRA=y
 CONFIG_KEYBOARD_SPEAR=y
+CONFIG_KEYBOARD_ST_KEYSCAN=y
 CONFIG_KEYBOARD_CROS_EC=y
 CONFIG_MOUSE_PS2_ELANTECH=y
 CONFIG_INPUT_MISC=y
-- 
1.9.1


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

* Re: [PATCH 0/4] Enable ST Keyscan driver
  2014-05-05 15:38 [PATCH 0/4] Enable ST Keyscan driver Gabriel FERNANDEZ
                   ` (3 preceding siblings ...)
  2014-05-05 15:38 ` [PATCH 4/4] ARM: multi_v7_defconfig: add ST Keyscan driver Gabriel FERNANDEZ
@ 2014-05-06 12:39 ` Srinivas Kandagatla
  2014-05-06 15:48   ` Maxime Coquelin
  4 siblings, 1 reply; 7+ messages in thread
From: Srinivas Kandagatla @ 2014-05-06 12:39 UTC (permalink / raw)
  To: Gabriel FERNANDEZ, Srinivas Kandagatla, Maxime Coquelin,
	Patrice Chotard, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Russell King
  Cc: devicetree, kernel, linux-kernel, linux-arm-kernel, Lee Jones,
	Gabriel Fernandez

All the DT patches look good for me.
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

I think It will be better to send a pull request to Arnd/Olof including 
other reviewed DT patches.

thanks,
srini


On 05/05/14 16:38, Gabriel FERNANDEZ wrote:
> The goal of this series is to enable ST Keyscan support to ST SoCs.
> The DT definition is added for STiH415 and STiH416 SoCs on
> B2000 board.
> Tested on B2000 sti board.
>
> Gabriel Fernandez (4):
>    ARM: STi: DT: add keyscan for stih415
>    ARM: STi: DT: add keyscan for stih416
>    ARM: STi: DT: add keyscan for stih41x-b2000
>    ARM: multi_v7_defconfig: add ST Keyscan driver
>
>   arch/arm/boot/dts/stih415-pinctrl.dtsi | 16 ++++++++++++++++
>   arch/arm/boot/dts/stih415.dtsi         | 12 ++++++++++++
>   arch/arm/boot/dts/stih416-pinctrl.dtsi | 16 ++++++++++++++++
>   arch/arm/boot/dts/stih416.dtsi         | 12 ++++++++++++
>   arch/arm/boot/dts/stih41x-b2000.dtsi   | 23 +++++++++++++++++++++++
>   arch/arm/configs/multi_v7_defconfig    |  1 +
>   6 files changed, 80 insertions(+)
>

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

* Re: [PATCH 0/4] Enable ST Keyscan driver
  2014-05-06 12:39 ` [PATCH 0/4] Enable " Srinivas Kandagatla
@ 2014-05-06 15:48   ` Maxime Coquelin
  0 siblings, 0 replies; 7+ messages in thread
From: Maxime Coquelin @ 2014-05-06 15:48 UTC (permalink / raw)
  To: Srinivas Kandagatla, Gabriel FERNANDEZ, Srinivas Kandagatla,
	Patrice Chotard, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Russell King
  Cc: devicetree, kernel, linux-kernel, linux-arm-kernel, Lee Jones,
	Gabriel Fernandez

Hi Srini,

	I will prepare the branch next week for the pull request.

Thanks,
Maxime

On 05/06/2014 02:39 PM, Srinivas Kandagatla wrote:
> All the DT patches look good for me.
> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>
> I think It will be better to send a pull request to Arnd/Olof including
> other reviewed DT patches.
>
> thanks,
> srini
>
>
> On 05/05/14 16:38, Gabriel FERNANDEZ wrote:
>> The goal of this series is to enable ST Keyscan support to ST SoCs.
>> The DT definition is added for STiH415 and STiH416 SoCs on
>> B2000 board.
>> Tested on B2000 sti board.
>>
>> Gabriel Fernandez (4):
>>    ARM: STi: DT: add keyscan for stih415
>>    ARM: STi: DT: add keyscan for stih416
>>    ARM: STi: DT: add keyscan for stih41x-b2000
>>    ARM: multi_v7_defconfig: add ST Keyscan driver
>>
>>   arch/arm/boot/dts/stih415-pinctrl.dtsi | 16 ++++++++++++++++
>>   arch/arm/boot/dts/stih415.dtsi         | 12 ++++++++++++
>>   arch/arm/boot/dts/stih416-pinctrl.dtsi | 16 ++++++++++++++++
>>   arch/arm/boot/dts/stih416.dtsi         | 12 ++++++++++++
>>   arch/arm/boot/dts/stih41x-b2000.dtsi   | 23 +++++++++++++++++++++++
>>   arch/arm/configs/multi_v7_defconfig    |  1 +
>>   6 files changed, 80 insertions(+)
>>

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

end of thread, other threads:[~2014-05-06 15:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-05 15:38 [PATCH 0/4] Enable ST Keyscan driver Gabriel FERNANDEZ
2014-05-05 15:38 ` [PATCH 1/4] ARM: STi: DT: add keyscan for stih415 Gabriel FERNANDEZ
2014-05-05 15:38 ` [PATCH 2/4] ARM: STi: DT: add keyscan for stih416 Gabriel FERNANDEZ
2014-05-05 15:38 ` [PATCH 3/4] ARM: STi: DT: add keyscan for stih41x-b2000 Gabriel FERNANDEZ
2014-05-05 15:38 ` [PATCH 4/4] ARM: multi_v7_defconfig: add ST Keyscan driver Gabriel FERNANDEZ
2014-05-06 12:39 ` [PATCH 0/4] Enable " Srinivas Kandagatla
2014-05-06 15:48   ` Maxime Coquelin

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