All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: at91: improve at91sam9m10g45ek support
@ 2014-03-18 23:15 ` Alexandre Belloni
  0 siblings, 0 replies; 10+ messages in thread
From: Alexandre Belloni @ 2014-03-18 23:15 UTC (permalink / raw)
  To: Nicolas Ferre
  Cc: Jean-Christophe Plagniol-Villard, linux-arm-kernel, linux-kernel,
	Alexandre Belloni

Here are a few DT improvements for the at91sam9m10g45ek.

The first patch corrects the ADC support for the at91sam9g45.

The second patch adds ADC and touchscreen support to the at91sam9m10g45ek.

The last one corrects the PWM polarity after the polarity got right in the
driver, following patch "PWM: atmel-pwm: Fix polarity handling"


Alexandre Belloni (3):
  ARM: at91/dt: sam9g45: improve ADC/touchscreen support
  ARM: at91/dt: at91sam9m10g45ek: add ADC and touchscreen support
  ARM: at91/dt: at91sam9m10g45ek PWM leds polarity is inversed

 arch/arm/boot/dts/at91sam9g45.dtsi     | 33 +++++++++++++++++++++++++++++++--
 arch/arm/boot/dts/at91sam9m10g45ek.dts | 20 ++++++++++++++++++--
 2 files changed, 49 insertions(+), 4 deletions(-)

-- 
1.8.3.2


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

* [PATCH 0/3] ARM: at91: improve at91sam9m10g45ek support
@ 2014-03-18 23:15 ` Alexandre Belloni
  0 siblings, 0 replies; 10+ messages in thread
From: Alexandre Belloni @ 2014-03-18 23:15 UTC (permalink / raw)
  To: linux-arm-kernel

Here are a few DT improvements for the at91sam9m10g45ek.

The first patch corrects the ADC support for the at91sam9g45.

The second patch adds ADC and touchscreen support to the at91sam9m10g45ek.

The last one corrects the PWM polarity after the polarity got right in the
driver, following patch "PWM: atmel-pwm: Fix polarity handling"


Alexandre Belloni (3):
  ARM: at91/dt: sam9g45: improve ADC/touchscreen support
  ARM: at91/dt: at91sam9m10g45ek: add ADC and touchscreen support
  ARM: at91/dt: at91sam9m10g45ek PWM leds polarity is inversed

 arch/arm/boot/dts/at91sam9g45.dtsi     | 33 +++++++++++++++++++++++++++++++--
 arch/arm/boot/dts/at91sam9m10g45ek.dts | 20 ++++++++++++++++++--
 2 files changed, 49 insertions(+), 4 deletions(-)

-- 
1.8.3.2

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

* [PATCH 1/3] ARM: at91/dt: sam9g45: improve ADC/touchscreen support
  2014-03-18 23:15 ` Alexandre Belloni
@ 2014-03-18 23:15   ` Alexandre Belloni
  -1 siblings, 0 replies; 10+ messages in thread
From: Alexandre Belloni @ 2014-03-18 23:15 UTC (permalink / raw)
  To: Nicolas Ferre
  Cc: Jean-Christophe Plagniol-Villard, linux-arm-kernel, linux-kernel,
	Alexandre Belloni

Fixes the compatible string, adds the pinmuxing for the ADC pins.

Also, removes atmel,adc-use-external-triggers as it is not possible to remove it
unless redefining the whole adc node

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 arch/arm/boot/dts/at91sam9g45.dtsi | 33 +++++++++++++++++++++++++++++++--
 1 file changed, 31 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
index dc4fb7d99902..b1d67282b0b6 100644
--- a/arch/arm/boot/dts/at91sam9g45.dtsi
+++ b/arch/arm/boot/dts/at91sam9g45.dtsi
@@ -136,6 +136,36 @@
 				      >;
 
 				/* shared pinctrl settings */
+				adc0 {
+					pinctrl_adc0_adtrg: adc0_adtrg {
+						atmel,pins = <AT91_PIOD 28 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+					};
+					pinctrl_adc0_ad0: adc0_ad0 {
+						atmel,pins = <AT91_PIOD 20 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+					};
+					pinctrl_adc0_ad1: adc0_ad1 {
+						atmel,pins = <AT91_PIOD 21 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+					};
+					pinctrl_adc0_ad2: adc0_ad2 {
+						atmel,pins = <AT91_PIOD 22 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+					};
+					pinctrl_adc0_ad3: adc0_ad3 {
+						atmel,pins = <AT91_PIOD 23 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+					};
+					pinctrl_adc0_ad4: adc0_ad4 {
+						atmel,pins = <AT91_PIOD 24 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+					};
+					pinctrl_adc0_ad5: adc0_ad5 {
+						atmel,pins = <AT91_PIOD 25 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+					};
+					pinctrl_adc0_ad6: adc0_ad6 {
+						atmel,pins = <AT91_PIOD 26 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+					};
+					pinctrl_adc0_ad7: adc0_ad7 {
+						atmel,pins = <AT91_PIOD 27 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+					};
+				};
+
 				dbgu {
 					pinctrl_dbgu: dbgu-0 {
 						atmel,pins =
@@ -634,10 +664,9 @@
 			adc0: adc@fffb0000 {
 				#address-cells = <1>;
 				#size-cells = <0>;
-				compatible = "atmel,at91sam9260-adc";
+				compatible = "atmel,at91sam9g45-adc";
 				reg = <0xfffb0000 0x100>;
 				interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>;
-				atmel,adc-use-external-triggers;
 				atmel,adc-channels-used = <0xff>;
 				atmel,adc-vref = <3300>;
 				atmel,adc-startup-time = <40>;
-- 
1.8.3.2


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

* [PATCH 1/3] ARM: at91/dt: sam9g45: improve ADC/touchscreen support
@ 2014-03-18 23:15   ` Alexandre Belloni
  0 siblings, 0 replies; 10+ messages in thread
From: Alexandre Belloni @ 2014-03-18 23:15 UTC (permalink / raw)
  To: linux-arm-kernel

Fixes the compatible string, adds the pinmuxing for the ADC pins.

Also, removes atmel,adc-use-external-triggers as it is not possible to remove it
unless redefining the whole adc node

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 arch/arm/boot/dts/at91sam9g45.dtsi | 33 +++++++++++++++++++++++++++++++--
 1 file changed, 31 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
index dc4fb7d99902..b1d67282b0b6 100644
--- a/arch/arm/boot/dts/at91sam9g45.dtsi
+++ b/arch/arm/boot/dts/at91sam9g45.dtsi
@@ -136,6 +136,36 @@
 				      >;
 
 				/* shared pinctrl settings */
+				adc0 {
+					pinctrl_adc0_adtrg: adc0_adtrg {
+						atmel,pins = <AT91_PIOD 28 AT91_PERIPH_A AT91_PINCTRL_NONE>;
+					};
+					pinctrl_adc0_ad0: adc0_ad0 {
+						atmel,pins = <AT91_PIOD 20 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+					};
+					pinctrl_adc0_ad1: adc0_ad1 {
+						atmel,pins = <AT91_PIOD 21 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+					};
+					pinctrl_adc0_ad2: adc0_ad2 {
+						atmel,pins = <AT91_PIOD 22 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+					};
+					pinctrl_adc0_ad3: adc0_ad3 {
+						atmel,pins = <AT91_PIOD 23 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+					};
+					pinctrl_adc0_ad4: adc0_ad4 {
+						atmel,pins = <AT91_PIOD 24 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+					};
+					pinctrl_adc0_ad5: adc0_ad5 {
+						atmel,pins = <AT91_PIOD 25 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+					};
+					pinctrl_adc0_ad6: adc0_ad6 {
+						atmel,pins = <AT91_PIOD 26 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+					};
+					pinctrl_adc0_ad7: adc0_ad7 {
+						atmel,pins = <AT91_PIOD 27 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
+					};
+				};
+
 				dbgu {
 					pinctrl_dbgu: dbgu-0 {
 						atmel,pins =
@@ -634,10 +664,9 @@
 			adc0: adc at fffb0000 {
 				#address-cells = <1>;
 				#size-cells = <0>;
-				compatible = "atmel,at91sam9260-adc";
+				compatible = "atmel,at91sam9g45-adc";
 				reg = <0xfffb0000 0x100>;
 				interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>;
-				atmel,adc-use-external-triggers;
 				atmel,adc-channels-used = <0xff>;
 				atmel,adc-vref = <3300>;
 				atmel,adc-startup-time = <40>;
-- 
1.8.3.2

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

* [PATCH 2/3] ARM: at91/dt: at91sam9m10g45ek: add ADC and touchscreen support
  2014-03-18 23:15 ` Alexandre Belloni
@ 2014-03-18 23:15   ` Alexandre Belloni
  -1 siblings, 0 replies; 10+ messages in thread
From: Alexandre Belloni @ 2014-03-18 23:15 UTC (permalink / raw)
  To: Nicolas Ferre
  Cc: Jean-Christophe Plagniol-Villard, linux-arm-kernel, linux-kernel,
	Alexandre Belloni

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 arch/arm/boot/dts/at91sam9m10g45ek.dts | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts
index 7ff665a8c708..7800931a4b16 100644
--- a/arch/arm/boot/dts/at91sam9m10g45ek.dts
+++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts
@@ -130,6 +130,21 @@
 				status = "okay";
 			};
 
+			adc0: adc@fffb0000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <
+					&pinctrl_adc0_ad0
+					&pinctrl_adc0_ad1
+					&pinctrl_adc0_ad2
+					&pinctrl_adc0_ad3
+					&pinctrl_adc0_ad4
+					&pinctrl_adc0_ad5
+					&pinctrl_adc0_ad6
+					&pinctrl_adc0_ad7>;
+				atmel,adc-ts-wires = <4>;
+				status = "okay";
+			};
+
 			pwm0: pwm@fffb8000 {
 				status = "okay";
 
-- 
1.8.3.2


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

* [PATCH 2/3] ARM: at91/dt: at91sam9m10g45ek: add ADC and touchscreen support
@ 2014-03-18 23:15   ` Alexandre Belloni
  0 siblings, 0 replies; 10+ messages in thread
From: Alexandre Belloni @ 2014-03-18 23:15 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 arch/arm/boot/dts/at91sam9m10g45ek.dts | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts
index 7ff665a8c708..7800931a4b16 100644
--- a/arch/arm/boot/dts/at91sam9m10g45ek.dts
+++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts
@@ -130,6 +130,21 @@
 				status = "okay";
 			};
 
+			adc0: adc at fffb0000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <
+					&pinctrl_adc0_ad0
+					&pinctrl_adc0_ad1
+					&pinctrl_adc0_ad2
+					&pinctrl_adc0_ad3
+					&pinctrl_adc0_ad4
+					&pinctrl_adc0_ad5
+					&pinctrl_adc0_ad6
+					&pinctrl_adc0_ad7>;
+				atmel,adc-ts-wires = <4>;
+				status = "okay";
+			};
+
 			pwm0: pwm at fffb8000 {
 				status = "okay";
 
-- 
1.8.3.2

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

* [PATCH 3/3] ARM: at91/dt: at91sam9m10g45ek PWM leds polarity is inversed
  2014-03-18 23:15 ` Alexandre Belloni
@ 2014-03-18 23:15   ` Alexandre Belloni
  -1 siblings, 0 replies; 10+ messages in thread
From: Alexandre Belloni @ 2014-03-18 23:15 UTC (permalink / raw)
  To: Nicolas Ferre
  Cc: Jean-Christophe Plagniol-Villard, linux-arm-kernel, linux-kernel,
	Alexandre Belloni

The real polarity of the LEDs is inversed. The led is between 3.3v and the PWM.
It was working before because the driver was getting the duty cycle calculation
wrong.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 arch/arm/boot/dts/at91sam9m10g45ek.dts | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts
index 7800931a4b16..9f5b0a674995 100644
--- a/arch/arm/boot/dts/at91sam9m10g45ek.dts
+++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts
@@ -8,6 +8,7 @@
  */
 /dts-v1/;
 #include "at91sam9g45.dtsi"
+#include <dt-bindings/pwm/pwm.h>
 
 / {
 	model = "Atmel AT91SAM9M10G45-EK";
@@ -231,14 +232,14 @@
 
 		d6 {
 			label = "d6";
-			pwms = <&pwm0 3 5000 0>;
+			pwms = <&pwm0 3 5000 PWM_POLARITY_INVERTED>;
 			max-brightness = <255>;
 			linux,default-trigger = "nand-disk";
 		};
 
 		d7 {
 			label = "d7";
-			pwms = <&pwm0 1 5000 0>;
+			pwms = <&pwm0 1 5000 PWM_POLARITY_INVERTED>;
 			max-brightness = <255>;
 			linux,default-trigger = "mmc0";
 		};
-- 
1.8.3.2


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

* [PATCH 3/3] ARM: at91/dt: at91sam9m10g45ek PWM leds polarity is inversed
@ 2014-03-18 23:15   ` Alexandre Belloni
  0 siblings, 0 replies; 10+ messages in thread
From: Alexandre Belloni @ 2014-03-18 23:15 UTC (permalink / raw)
  To: linux-arm-kernel

The real polarity of the LEDs is inversed. The led is between 3.3v and the PWM.
It was working before because the driver was getting the duty cycle calculation
wrong.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 arch/arm/boot/dts/at91sam9m10g45ek.dts | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts
index 7800931a4b16..9f5b0a674995 100644
--- a/arch/arm/boot/dts/at91sam9m10g45ek.dts
+++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts
@@ -8,6 +8,7 @@
  */
 /dts-v1/;
 #include "at91sam9g45.dtsi"
+#include <dt-bindings/pwm/pwm.h>
 
 / {
 	model = "Atmel AT91SAM9M10G45-EK";
@@ -231,14 +232,14 @@
 
 		d6 {
 			label = "d6";
-			pwms = <&pwm0 3 5000 0>;
+			pwms = <&pwm0 3 5000 PWM_POLARITY_INVERTED>;
 			max-brightness = <255>;
 			linux,default-trigger = "nand-disk";
 		};
 
 		d7 {
 			label = "d7";
-			pwms = <&pwm0 1 5000 0>;
+			pwms = <&pwm0 1 5000 PWM_POLARITY_INVERTED>;
 			max-brightness = <255>;
 			linux,default-trigger = "mmc0";
 		};
-- 
1.8.3.2

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

* Re: [PATCH 0/3] ARM: at91: improve at91sam9m10g45ek support
  2014-03-18 23:15 ` Alexandre Belloni
@ 2014-04-18 16:14   ` Nicolas Ferre
  -1 siblings, 0 replies; 10+ messages in thread
From: Nicolas Ferre @ 2014-04-18 16:14 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Jean-Christophe Plagniol-Villard, linux-arm-kernel, linux-kernel

On 19/03/2014 00:15, Alexandre Belloni :
> Here are a few DT improvements for the at91sam9m10g45ek.
> 
> The first patch corrects the ADC support for the at91sam9g45.
> 
> The second patch adds ADC and touchscreen support to the at91sam9m10g45ek.
> 
> The last one corrects the PWM polarity after the polarity got right in the
> driver, following patch "PWM: atmel-pwm: Fix polarity handling"
> 
> 
> Alexandre Belloni (3):
>   ARM: at91/dt: sam9g45: improve ADC/touchscreen support
>   ARM: at91/dt: at91sam9m10g45ek: add ADC and touchscreen support
>   ARM: at91/dt: at91sam9m10g45ek PWM leds polarity is inversed

Ok, nice: the whole series stacked on top of at91-3.16-dt. Thanks.

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>


>  arch/arm/boot/dts/at91sam9g45.dtsi     | 33 +++++++++++++++++++++++++++++++--
>  arch/arm/boot/dts/at91sam9m10g45ek.dts | 20 ++++++++++++++++++--
>  2 files changed, 49 insertions(+), 4 deletions(-)
> 


-- 
Nicolas Ferre

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

* [PATCH 0/3] ARM: at91: improve at91sam9m10g45ek support
@ 2014-04-18 16:14   ` Nicolas Ferre
  0 siblings, 0 replies; 10+ messages in thread
From: Nicolas Ferre @ 2014-04-18 16:14 UTC (permalink / raw)
  To: linux-arm-kernel

On 19/03/2014 00:15, Alexandre Belloni :
> Here are a few DT improvements for the at91sam9m10g45ek.
> 
> The first patch corrects the ADC support for the at91sam9g45.
> 
> The second patch adds ADC and touchscreen support to the at91sam9m10g45ek.
> 
> The last one corrects the PWM polarity after the polarity got right in the
> driver, following patch "PWM: atmel-pwm: Fix polarity handling"
> 
> 
> Alexandre Belloni (3):
>   ARM: at91/dt: sam9g45: improve ADC/touchscreen support
>   ARM: at91/dt: at91sam9m10g45ek: add ADC and touchscreen support
>   ARM: at91/dt: at91sam9m10g45ek PWM leds polarity is inversed

Ok, nice: the whole series stacked on top of at91-3.16-dt. Thanks.

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>


>  arch/arm/boot/dts/at91sam9g45.dtsi     | 33 +++++++++++++++++++++++++++++++--
>  arch/arm/boot/dts/at91sam9m10g45ek.dts | 20 ++++++++++++++++++--
>  2 files changed, 49 insertions(+), 4 deletions(-)
> 


-- 
Nicolas Ferre

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

end of thread, other threads:[~2014-04-18 16:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-18 23:15 [PATCH 0/3] ARM: at91: improve at91sam9m10g45ek support Alexandre Belloni
2014-03-18 23:15 ` Alexandre Belloni
2014-03-18 23:15 ` [PATCH 1/3] ARM: at91/dt: sam9g45: improve ADC/touchscreen support Alexandre Belloni
2014-03-18 23:15   ` Alexandre Belloni
2014-03-18 23:15 ` [PATCH 2/3] ARM: at91/dt: at91sam9m10g45ek: add ADC and touchscreen support Alexandre Belloni
2014-03-18 23:15   ` Alexandre Belloni
2014-03-18 23:15 ` [PATCH 3/3] ARM: at91/dt: at91sam9m10g45ek PWM leds polarity is inversed Alexandre Belloni
2014-03-18 23:15   ` Alexandre Belloni
2014-04-18 16:14 ` [PATCH 0/3] ARM: at91: improve at91sam9m10g45ek support Nicolas Ferre
2014-04-18 16:14   ` Nicolas Ferre

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.