Skip to contentSkip to conversation

ARM: dts: am437x-gp-evm: Add wakeup interrupt source for pixcir_i2c_ts

PATCH Superseded Vignesh R 2 participants 5 messages Oct 14, 2015 Device tree bindings

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Vignesh R

author
#0 lore raw

PATCH 1/1 ARM: dts: am437x-gp-evm: Add wakeup interrupt source for pixcir_i2c_ts

On am437x-gp-evm, pixcir_i2c_ts can wakeup the system from lower power state via pinctrl and IO daisy chain using generic wakeirq framework. With commit 3fffd1283927 ("i2c: allow specifying separate wakeup interrupt in device tree") i2c core allows optional wakeirq to be specified via device tree. Add wakeup irq entry to enable pixcir_i2c_ts to wake the system from low power state.

---
 arch/arm/boot/dts/am437x-gp-evm.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/am437x-gp-evm.dts +5 -0
index 22038f21f228..69e93af7df0d 100644
@@ -581,8 +581,13 @@
 
 		attb-gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
 
+		interrupts-extended = <&gpio3 22 GPIO_ACTIVE_HIGH>,
+				      <&am43xx_pinmux 0x264>;
+		interrupt-names = "tsc", "wakeup";
+
 		touchscreen-size-x = <1024>;
 		touchscreen-size-y = <600>;
+		wakeup-source;
 	};
 
 	ov2659 at 30 {
Signature · 1 line
2.6.1
#1 lore raw

+Dave

Quoted 17 lines · Vignesh R

On am437x-gp-evm, pixcir_i2c_ts can wakeup the system from lower power state via pinctrl and IO daisy chain using generic wakeirq framework. With commit 3fffd1283927 ("i2c: allow specifying separate wakeup interrupt in device tree") i2c core allows optional wakeirq to be specified via device tree. Add wakeup irq entry to enable pixcir_i2c_ts to wake the system from low power state.

---
 arch/arm/boot/dts/am437x-gp-evm.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/am437x-gp-evm.dts +0 -0
index 22038f21f228..69e93af7df0d 100644

arch/arm/boot/dts/am437x-gp-evm.dts line 585

Quoted 5 lines
arch/arm/boot/dts/am437x-gp-evm.dts +2 -0
@@ -581,8 +581,13 @@
 
 		attb-gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
 
+		interrupts-extended = <&gpio3 22 GPIO_ACTIVE_HIGH>,
+				      <&am43xx_pinmux 0x264>;

How does this work?

interrupts-extended property must have
1) interrupt parent
2) interrupt number
3) interrupt flags

Your change doesn't seem to comply with those requirements.

arch/arm/boot/dts/am437x-gp-evm.dts line 593

Quoted 9 lines
arch/arm/boot/dts/am437x-gp-evm.dts +3 -0
+		interrupt-names = "tsc", "wakeup";
+
 		touchscreen-size-x = <1024>;
 		touchscreen-size-y = <600>;
+		wakeup-source;
 	};
 
 	ov2659 at 30 {

cheers,
-roger

author
#2 lore raw
Quoted 27 lines · Roger Quadros
Quoted 17 lines · Vignesh R

On am437x-gp-evm, pixcir_i2c_ts can wakeup the system from lower power state via pinctrl and IO daisy chain using generic wakeirq framework. With commit 3fffd1283927 ("i2c: allow specifying separate wakeup interrupt in device tree") i2c core allows optional wakeirq to be specified via device tree. Add wakeup irq entry to enable pixcir_i2c_ts to wake the system from low power state.

---
 arch/arm/boot/dts/am437x-gp-evm.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/am437x-gp-evm.dts +0 -0
index 22038f21f228..69e93af7df0d 100644

arch/arm/boot/dts/am437x-gp-evm.dts line 585

Quoted 5 lines
arch/arm/boot/dts/am437x-gp-evm.dts +2 -0
@@ -581,8 +581,13 @@
 
 		attb-gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
 
+		interrupts-extended = <&gpio3 22 GPIO_ACTIVE_HIGH>,
+				      <&am43xx_pinmux 0x264>;

How does this work?

Quoted 6 lines

interrupts-extended property must have
1) interrupt parent
2) interrupt number
3) interrupt flags

Your change doesn't seem to comply with those requirements.

AFAIU, interrupts-extended has two parts: interrupt parent phandle and interrupt specifier.
The number of cells in interrupt specifier is determined by interrupt-cells property of interrupt parent node.
In above case, gpio3 has interrupt-cells = 2 hence interrupt specifier has interrupt number and interrupt flag field.
But in case am43xx_pinmux node, interrupt-cells is 1 hence has no interrupt flag field.

Signature · 2 lines
Regards
Vignesh
#3 lore raw

Vignesh,

Quoted 36 lines · Vignesh R
Quoted 32 lines · Roger Quadros
Quoted 17 lines · Vignesh R

On am437x-gp-evm, pixcir_i2c_ts can wakeup the system from lower power state via pinctrl and IO daisy chain using generic wakeirq framework. With commit 3fffd1283927 ("i2c: allow specifying separate wakeup interrupt in device tree") i2c core allows optional wakeirq to be specified via device tree. Add wakeup irq entry to enable pixcir_i2c_ts to wake the system from low power state.

---
 arch/arm/boot/dts/am437x-gp-evm.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/am437x-gp-evm.dts +0 -0
index 22038f21f228..69e93af7df0d 100644

arch/arm/boot/dts/am437x-gp-evm.dts line 585

Quoted 5 lines
arch/arm/boot/dts/am437x-gp-evm.dts +2 -0
@@ -581,8 +581,13 @@
 
 		attb-gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
 
+		interrupts-extended = <&gpio3 22 GPIO_ACTIVE_HIGH>,
+				      <&am43xx_pinmux 0x264>;

How does this work?

interrupts-extended property must have
1) interrupt parent
2) interrupt number
3) interrupt flags

Quoted 6 lines
Quoted 1 line

Your change doesn't seem to comply with those requirements.

AFAIU, interrupts-extended has two parts: interrupt parent phandle and interrupt specifier.
The number of cells in interrupt specifier is determined by interrupt-cells property of interrupt parent node.

Got it.

Quoted 2 lines

In above case, gpio3 has interrupt-cells = 2 hence interrupt specifier has interrupt number and interrupt flag field.

But is GPIO_ACTIVE_HIGH an interrupt flag?

Quoted 3 lines

But in case am43xx_pinmux node, interrupt-cells is 1 hence has no interrupt flag field.

Understood, thanks. Might be worth adding a comment as to what 0x264 means though.

cheers,
-roger

author
#4 lore raw
Quoted 46 lines · Roger Quadros

Vignesh,

Quoted 36 lines · Vignesh R
Quoted 32 lines · Roger Quadros
Quoted 17 lines · Vignesh R

On am437x-gp-evm, pixcir_i2c_ts can wakeup the system from lower power state via pinctrl and IO daisy chain using generic wakeirq framework. With commit 3fffd1283927 ("i2c: allow specifying separate wakeup interrupt in device tree") i2c core allows optional wakeirq to be specified via device tree. Add wakeup irq entry to enable pixcir_i2c_ts to wake the system from low power state.

---
 arch/arm/boot/dts/am437x-gp-evm.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/am437x-gp-evm.dts +0 -0
index 22038f21f228..69e93af7df0d 100644

arch/arm/boot/dts/am437x-gp-evm.dts line 585

Quoted 5 lines
arch/arm/boot/dts/am437x-gp-evm.dts +2 -0
@@ -581,8 +581,13 @@
 
 		attb-gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
 
+		interrupts-extended = <&gpio3 22 GPIO_ACTIVE_HIGH>,
+				      <&am43xx_pinmux 0x264>;

How does this work?

interrupts-extended property must have
1) interrupt parent
2) interrupt number
3) interrupt flags

Quoted 6 lines
Quoted 1 line

Your change doesn't seem to comply with those requirements.

AFAIU, interrupts-extended has two parts: interrupt parent phandle and interrupt specifier.
The number of cells in interrupt specifier is determined by interrupt-cells property of interrupt parent node.

Quoted 6 lines

Got it.

Quoted 2 lines

In above case, gpio3 has interrupt-cells = 2 hence interrupt specifier has interrupt number and interrupt flag field.

But is GPIO_ACTIVE_HIGH an interrupt flag?

Oops.. I will change it to IRQ_TYPE_NONE as represented in interrupts property.

Quoted 6 lines
Quoted 4 lines

But in case am43xx_pinmux node, interrupt-cells is 1 hence has no interrupt flag field.

Understood, thanks. Might be worth adding a comment as to what 0x264 means though.

Will add a one line comment indicating its the offset of gpio3_22 padconf register from am43xx_pinmux base.

Quoted 3 lines

cheers,
-roger

Signature · 2 lines
Regards
Vignesh