linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] arm: atmel: at91sam9n12: add i2c pinctrl and qt1070 support
@ 2013-07-10  9:51 Bo Shen
  2013-07-10  9:51 ` [PATCH 1/3] arm: atmel: at91sam9n12: add pinctrl of TWI Bo Shen
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Bo Shen @ 2013-07-10  9:51 UTC (permalink / raw)
  To: Jean-Christophe Plagniol-Villard, Nicolas Ferre
  Cc: ludovic.desroches, linux-arm-kernel, linux-kernel,
	devicetree-discuss, Bo Shen

this patch is based on linux master branch, implementation as following:
  - add the i2c pinctrl which needed for using at91sam9n12 TWI
  - enable qt1070
  - trivial fix for the gpio-key pin number


Bo Shen (3):
  arm: atmel: at91sam9n12: add pinctrl of TWI
  arm: atmel: at91sam9n12: add qt1070 support
  arm: atmel: at91sam9n12: correct pin number of gpio-key

 arch/arm/boot/dts/at91sam9n12.dtsi  |   20 ++++++++++++++++++++
 arch/arm/boot/dts/at91sam9n12ek.dts |   18 +++++++++++++++++-
 2 files changed, 37 insertions(+), 1 deletion(-)

-- 
1.7.9.5


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

* [PATCH 1/3] arm: atmel: at91sam9n12: add pinctrl of TWI
  2013-07-10  9:51 [PATCH 0/3] arm: atmel: at91sam9n12: add i2c pinctrl and qt1070 support Bo Shen
@ 2013-07-10  9:51 ` Bo Shen
  2013-07-10 14:39   ` Jean-Christophe PLAGNIOL-VILLARD
  2013-07-10  9:51 ` [PATCH 2/3] arm: atmel: at91sam9n12: add qt1070 support Bo Shen
  2013-07-10  9:51 ` [PATCH 3/3] arm: atmel: at91sam9n12: correct pin number of gpio-key Bo Shen
  2 siblings, 1 reply; 8+ messages in thread
From: Bo Shen @ 2013-07-10  9:51 UTC (permalink / raw)
  To: Jean-Christophe Plagniol-Villard, Nicolas Ferre
  Cc: ludovic.desroches, linux-arm-kernel, linux-kernel,
	devicetree-discuss, Bo Shen

add pinctrl of TWI for at91sam9n12 SoC

Signed-off-by: Bo Shen <voice.shen@atmel.com>
---
 arch/arm/boot/dts/at91sam9n12.dtsi |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm/boot/dts/at91sam9n12.dtsi b/arch/arm/boot/dts/at91sam9n12.dtsi
index bb7f564..3db62f6 100644
--- a/arch/arm/boot/dts/at91sam9n12.dtsi
+++ b/arch/arm/boot/dts/at91sam9n12.dtsi
@@ -291,6 +291,22 @@
 					};
 				};
 
+				i2c0 {
+					pinctrl_i2c0: i2c0-0 {
+						atmel,pins =
+							<AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PA30 periph A I2C0 data */
+							 AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_NONE>;	/* PA31 periph A I2C0 clock */
+					};
+				};
+
+				i2c1 {
+					pinctrl_i2c1: i2c1-0 {
+						atmel,pins =
+							<AT91_PIOC 0 AT91_PERIPH_C AT91_PINCTRL_NONE	/* PC0 periph C I2C1 data */
+							 AT91_PIOC 1 AT91_PERIPH_C AT91_PINCTRL_NONE>;	/* PC1 periph C I2C1 clock */
+					};
+				};
+
 				tcb0 {
 					pinctrl_tcb0_tclk0: tcb0_tclk0-0 {
 						atmel,pins = <AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_NONE>;
@@ -471,6 +487,8 @@
 				dma-names = "tx", "rx";
 				#address-cells = <1>;
 				#size-cells = <0>;
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_i2c0>;
 				status = "disabled";
 			};
 
@@ -483,6 +501,8 @@
 				dma-names = "tx", "rx";
 				#address-cells = <1>;
 				#size-cells = <0>;
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_i2c1>;
 				status = "disabled";
 			};
 
-- 
1.7.9.5


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

* [PATCH 2/3] arm: atmel: at91sam9n12: add qt1070 support
  2013-07-10  9:51 [PATCH 0/3] arm: atmel: at91sam9n12: add i2c pinctrl and qt1070 support Bo Shen
  2013-07-10  9:51 ` [PATCH 1/3] arm: atmel: at91sam9n12: add pinctrl of TWI Bo Shen
@ 2013-07-10  9:51 ` Bo Shen
  2013-07-10 14:38   ` Jean-Christophe PLAGNIOL-VILLARD
  2013-07-10  9:51 ` [PATCH 3/3] arm: atmel: at91sam9n12: correct pin number of gpio-key Bo Shen
  2 siblings, 1 reply; 8+ messages in thread
From: Bo Shen @ 2013-07-10  9:51 UTC (permalink / raw)
  To: Jean-Christophe Plagniol-Villard, Nicolas Ferre
  Cc: ludovic.desroches, linux-arm-kernel, linux-kernel,
	devicetree-discuss, Bo Shen

add qt1070 support on at91sam9n12ek board

Signed-off-by: Bo Shen <voice.shen@atmel.com>
---
 arch/arm/boot/dts/at91sam9n12ek.dts |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/arm/boot/dts/at91sam9n12ek.dts b/arch/arm/boot/dts/at91sam9n12ek.dts
index d59b70c..3acac62 100644
--- a/arch/arm/boot/dts/at91sam9n12ek.dts
+++ b/arch/arm/boot/dts/at91sam9n12ek.dts
@@ -40,6 +40,15 @@
 
 			i2c0: i2c@f8010000 {
 				status = "okay";
+
+				qt1070: keyboard@1b {
+					compatible = "qt1070";
+					reg = <0x1b>;
+					interrupt-parent = <&pioA>;
+					interrupts = <2 0x0>;
+					pinctrl-names = "default";
+					pinctrl-0 = <&pinctrl_qt1070_irq>;
+				};
 			};
 
 			i2c1: i2c@f8014000 {
@@ -66,6 +75,13 @@
 							<AT91_PIOA 7 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;	/* PA7 gpio CD pin pull up and deglitch */
 					};
 				};
+
+				qt1070 {
+					pinctrl_qt1070_irq: qt1070_irq {
+						atmel,pins =
+							<AT91_PIOA 2 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PA2 GPIO with pull up deglith */
+					};
+				};
 			};
 
 			spi0: spi@f0000000 {
-- 
1.7.9.5


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

* [PATCH 3/3] arm: atmel: at91sam9n12: correct pin number of gpio-key
  2013-07-10  9:51 [PATCH 0/3] arm: atmel: at91sam9n12: add i2c pinctrl and qt1070 support Bo Shen
  2013-07-10  9:51 ` [PATCH 1/3] arm: atmel: at91sam9n12: add pinctrl of TWI Bo Shen
  2013-07-10  9:51 ` [PATCH 2/3] arm: atmel: at91sam9n12: add qt1070 support Bo Shen
@ 2013-07-10  9:51 ` Bo Shen
  2 siblings, 0 replies; 8+ messages in thread
From: Bo Shen @ 2013-07-10  9:51 UTC (permalink / raw)
  To: Jean-Christophe Plagniol-Villard, Nicolas Ferre
  Cc: ludovic.desroches, linux-arm-kernel, linux-kernel,
	devicetree-discuss, Bo Shen

correct pin number of gpio-key for at91sam9n12ek board
the pioB4 is connect to LED, the pioB3 use as gpio-key

Signed-off-by: Bo Shen <voice.shen@atmel.com>

---
 arch/arm/boot/dts/at91sam9n12ek.dts |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/at91sam9n12ek.dts b/arch/arm/boot/dts/at91sam9n12ek.dts
index 3acac62..9f4c601 100644
--- a/arch/arm/boot/dts/at91sam9n12ek.dts
+++ b/arch/arm/boot/dts/at91sam9n12ek.dts
@@ -137,7 +137,7 @@
 
 		enter {
 			label = "Enter";
-			gpios = <&pioB 4 GPIO_ACTIVE_LOW>;
+			gpios = <&pioB 3 GPIO_ACTIVE_LOW>;
 			linux,code = <28>;
 			gpio-key,wakeup;
 		};
-- 
1.7.9.5


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

* Re: [PATCH 2/3] arm: atmel: at91sam9n12: add qt1070 support
  2013-07-10  9:51 ` [PATCH 2/3] arm: atmel: at91sam9n12: add qt1070 support Bo Shen
@ 2013-07-10 14:38   ` Jean-Christophe PLAGNIOL-VILLARD
  2013-07-11  1:17     ` Bo Shen
  0 siblings, 1 reply; 8+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-07-10 14:38 UTC (permalink / raw)
  To: Bo Shen
  Cc: Nicolas Ferre, ludovic.desroches, linux-arm-kernel, linux-kernel,
	devicetree-discuss

On 17:51 Wed 10 Jul     , Bo Shen wrote:
> add qt1070 support on at91sam9n12ek board
> 
> Signed-off-by: Bo Shen <voice.shen@atmel.com>
> ---
>  arch/arm/boot/dts/at91sam9n12ek.dts |   16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/at91sam9n12ek.dts b/arch/arm/boot/dts/at91sam9n12ek.dts
> index d59b70c..3acac62 100644
> --- a/arch/arm/boot/dts/at91sam9n12ek.dts
> +++ b/arch/arm/boot/dts/at91sam9n12ek.dts
> @@ -40,6 +40,15 @@
>  
>  			i2c0: i2c@f8010000 {
>  				status = "okay";
> +
> +				qt1070: keyboard@1b {
> +					compatible = "qt1070";
> +					reg = <0x1b>;
> +					interrupt-parent = <&pioA>;
> +					interrupts = <2 0x0>;
use the macro
> +					pinctrl-names = "default";
> +					pinctrl-0 = <&pinctrl_qt1070_irq>;
> +				};
>  			};
>  
>  			i2c1: i2c@f8014000 {
> @@ -66,6 +75,13 @@
>  							<AT91_PIOA 7 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;	/* PA7 gpio CD pin pull up and deglitch */
>  					};
>  				};
> +
> +				qt1070 {
> +					pinctrl_qt1070_irq: qt1070_irq {
> +						atmel,pins =
> +							<AT91_PIOA 2 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PA2 GPIO with pull up deglith */
drop the comment as we use macro
> +					};
> +				};
>  			};
>  
>  			spi0: spi@f0000000 {
> -- 

Best Regards,
J.

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

* Re: [PATCH 1/3] arm: atmel: at91sam9n12: add pinctrl of TWI
  2013-07-10  9:51 ` [PATCH 1/3] arm: atmel: at91sam9n12: add pinctrl of TWI Bo Shen
@ 2013-07-10 14:39   ` Jean-Christophe PLAGNIOL-VILLARD
  2013-07-11  1:17     ` Bo Shen
  0 siblings, 1 reply; 8+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-07-10 14:39 UTC (permalink / raw)
  To: Bo Shen
  Cc: Nicolas Ferre, ludovic.desroches, linux-arm-kernel, linux-kernel,
	devicetree-discuss

On 17:51 Wed 10 Jul     , Bo Shen wrote:
> add pinctrl of TWI for at91sam9n12 SoC
> 
> Signed-off-by: Bo Shen <voice.shen@atmel.com>
> ---
>  arch/arm/boot/dts/at91sam9n12.dtsi |   20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/at91sam9n12.dtsi b/arch/arm/boot/dts/at91sam9n12.dtsi
> index bb7f564..3db62f6 100644
> --- a/arch/arm/boot/dts/at91sam9n12.dtsi
> +++ b/arch/arm/boot/dts/at91sam9n12.dtsi
> @@ -291,6 +291,22 @@
>  					};
>  				};
>  
> +				i2c0 {
> +					pinctrl_i2c0: i2c0-0 {
> +						atmel,pins =
> +							<AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PA30 periph A I2C0 data */
> +							 AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_NONE>;	/* PA31 periph A I2C0 clock */
> +					};
> +				};
> +
> +				i2c1 {
> +					pinctrl_i2c1: i2c1-0 {
> +						atmel,pins =
> +							<AT91_PIOC 0 AT91_PERIPH_C AT91_PINCTRL_NONE	/* PC0 periph C I2C1 data */
> +							 AT91_PIOC 1 AT91_PERIPH_C AT91_PINCTRL_NONE>;	/* PC1 periph C I2C1 clock */
drop  the comment as we use macro
> +					};
> +				};
> +
>  				tcb0 {
>  					pinctrl_tcb0_tclk0: tcb0_tclk0-0 {
>  						atmel,pins = <AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_NONE>;
> @@ -471,6 +487,8 @@
>  				dma-names = "tx", "rx";
>  				#address-cells = <1>;
>  				#size-cells = <0>;
> +				pinctrl-names = "default";
> +				pinctrl-0 = <&pinctrl_i2c0>;
>  				status = "disabled";
>  			};
>  
> @@ -483,6 +501,8 @@
>  				dma-names = "tx", "rx";
>  				#address-cells = <1>;
>  				#size-cells = <0>;
> +				pinctrl-names = "default";
> +				pinctrl-0 = <&pinctrl_i2c1>;
>  				status = "disabled";
>  			};
>  
> -- 
> 1.7.9.5
> 

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

* Re: [PATCH 2/3] arm: atmel: at91sam9n12: add qt1070 support
  2013-07-10 14:38   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2013-07-11  1:17     ` Bo Shen
  0 siblings, 0 replies; 8+ messages in thread
From: Bo Shen @ 2013-07-11  1:17 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD
  Cc: Nicolas Ferre, ludovic.desroches, linux-arm-kernel, linux-kernel,
	devicetree-discuss

Hi J,

On 7/10/2013 22:38, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 17:51 Wed 10 Jul     , Bo Shen wrote:
>> add qt1070 support on at91sam9n12ek board
>>
>> Signed-off-by: Bo Shen <voice.shen@atmel.com>
>> ---
>>   arch/arm/boot/dts/at91sam9n12ek.dts |   16 ++++++++++++++++
>>   1 file changed, 16 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/at91sam9n12ek.dts b/arch/arm/boot/dts/at91sam9n12ek.dts
>> index d59b70c..3acac62 100644
>> --- a/arch/arm/boot/dts/at91sam9n12ek.dts
>> +++ b/arch/arm/boot/dts/at91sam9n12ek.dts
>> @@ -40,6 +40,15 @@
>>
>>   			i2c0: i2c@f8010000 {
>>   				status = "okay";
>> +
>> +				qt1070: keyboard@1b {
>> +					compatible = "qt1070";
>> +					reg = <0x1b>;
>> +					interrupt-parent = <&pioA>;
>> +					interrupts = <2 0x0>;
> use the macro

Thanks, I will use macro here.

>> +					pinctrl-names = "default";
>> +					pinctrl-0 = <&pinctrl_qt1070_irq>;
>> +				};
>>   			};
>>
>>   			i2c1: i2c@f8014000 {
>> @@ -66,6 +75,13 @@
>>   							<AT91_PIOA 7 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;	/* PA7 gpio CD pin pull up and deglitch */
>>   					};
>>   				};
>> +
>> +				qt1070 {
>> +					pinctrl_qt1070_irq: qt1070_irq {
>> +						atmel,pins =
>> +							<AT91_PIOA 2 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PA2 GPIO with pull up deglith */
> drop the comment as we use macro

OK, I will drop the comment

>> +					};
>> +				};
>>   			};
>>
>>   			spi0: spi@f0000000 {
>> --
>
> Best Regards,
> J.
>

Best Regards,
Bo Shen


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

* Re: [PATCH 1/3] arm: atmel: at91sam9n12: add pinctrl of TWI
  2013-07-10 14:39   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2013-07-11  1:17     ` Bo Shen
  0 siblings, 0 replies; 8+ messages in thread
From: Bo Shen @ 2013-07-11  1:17 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD
  Cc: Nicolas Ferre, ludovic.desroches, linux-arm-kernel, linux-kernel,
	devicetree-discuss

Hi J,

On 7/10/2013 22:39, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 17:51 Wed 10 Jul     , Bo Shen wrote:
>> add pinctrl of TWI for at91sam9n12 SoC
>>
>> Signed-off-by: Bo Shen <voice.shen@atmel.com>
>> ---
>>   arch/arm/boot/dts/at91sam9n12.dtsi |   20 ++++++++++++++++++++
>>   1 file changed, 20 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/at91sam9n12.dtsi b/arch/arm/boot/dts/at91sam9n12.dtsi
>> index bb7f564..3db62f6 100644
>> --- a/arch/arm/boot/dts/at91sam9n12.dtsi
>> +++ b/arch/arm/boot/dts/at91sam9n12.dtsi
>> @@ -291,6 +291,22 @@
>>   					};
>>   				};
>>
>> +				i2c0 {
>> +					pinctrl_i2c0: i2c0-0 {
>> +						atmel,pins =
>> +							<AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PA30 periph A I2C0 data */
>> +							 AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_NONE>;	/* PA31 periph A I2C0 clock */
>> +					};
>> +				};
>> +
>> +				i2c1 {
>> +					pinctrl_i2c1: i2c1-0 {
>> +						atmel,pins =
>> +							<AT91_PIOC 0 AT91_PERIPH_C AT91_PINCTRL_NONE	/* PC0 periph C I2C1 data */
>> +							 AT91_PIOC 1 AT91_PERIPH_C AT91_PINCTRL_NONE>;	/* PC1 periph C I2C1 clock */
> drop  the comment as we use macro

Thanks, I will drop the comment.

>> +					};
>> +				};
>> +
>>   				tcb0 {
>>   					pinctrl_tcb0_tclk0: tcb0_tclk0-0 {
>>   						atmel,pins = <AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_NONE>;
>> @@ -471,6 +487,8 @@
>>   				dma-names = "tx", "rx";
>>   				#address-cells = <1>;
>>   				#size-cells = <0>;
>> +				pinctrl-names = "default";
>> +				pinctrl-0 = <&pinctrl_i2c0>;
>>   				status = "disabled";
>>   			};
>>
>> @@ -483,6 +501,8 @@
>>   				dma-names = "tx", "rx";
>>   				#address-cells = <1>;
>>   				#size-cells = <0>;
>> +				pinctrl-names = "default";
>> +				pinctrl-0 = <&pinctrl_i2c1>;
>>   				status = "disabled";
>>   			};
>>
>> --
>> 1.7.9.5
>>

Best Regards,
Bo Shen


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

end of thread, other threads:[~2013-07-11  1:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-10  9:51 [PATCH 0/3] arm: atmel: at91sam9n12: add i2c pinctrl and qt1070 support Bo Shen
2013-07-10  9:51 ` [PATCH 1/3] arm: atmel: at91sam9n12: add pinctrl of TWI Bo Shen
2013-07-10 14:39   ` Jean-Christophe PLAGNIOL-VILLARD
2013-07-11  1:17     ` Bo Shen
2013-07-10  9:51 ` [PATCH 2/3] arm: atmel: at91sam9n12: add qt1070 support Bo Shen
2013-07-10 14:38   ` Jean-Christophe PLAGNIOL-VILLARD
2013-07-11  1:17     ` Bo Shen
2013-07-10  9:51 ` [PATCH 3/3] arm: atmel: at91sam9n12: correct pin number of gpio-key Bo Shen

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