ARM: dts: sun7i: Add Goodix GT911 nodes for Wexler TAB7200
Subsystems (2)
PATCH 1/1 ARM: dts: sun7i: Add Goodix GT911 nodes for Wexler TAB7200
This patch adds nodes for the Goodix GT911 touchscreen controller found on the Wexler TAB7200 tablet. Controller uses one of following I2C
addresses: 0x5d or 0x14, so just add two nodes.
---
DT support for the Goodix GT911 touchscreen controller has been queued up by Dmitry Torokhov for merging into 4.1:
https://git.kernel.org/cgit/linux/kernel/git/dtor/input.git/commit/?h=next&id=771d8f1b178e7e09fcc641fccd48852958dbc329
IRQ flags are set by the touchscreen controller driver, so use IRQ_TYPE_NONE.
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +14 -0
@@ -101,6 +101,20 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c2_pins_a>; status = "okay"; + + gt911 at 5d { + compatible = "goodix,gt911"; + reg = <0x5d>; + interrupt-parent = <&pio>; + interrupts = <21 IRQ_TYPE_NONE>; /* EINT21 (PH21) */ + }; + + gt911 at 14 { + compatible = "goodix,gt911"; + reg = <0x14>; + interrupt-parent = <&pio>; + interrupts = <21 IRQ_TYPE_NONE>; /* EINT21 (PH21) */ + }; }; &lradc {
Signature · 1 line
2.0.5
PATCH 1/1 ARM: dts: sun7i: Add Goodix GT911 nodes for Wexler TAB7200
Hi,
Quoted 3 lines · Aleksei Mamlin
This patch adds nodes for the Goodix GT911 touchscreen controller found on the Wexler TAB7200 tablet. Controller uses one of following I2C
addresses:0x5dor0x14, so just add two nodes.
In which case are these different addresses encountered? Different revisions of the same board?
Quoted 16 lines
Signed-off-by Aleksei Mamlin <[email protected]>---
DT support for the Goodix GT911 touchscreen controller has been queued up by Dmitry Torokhov for merging into 4.1:
https://git.kernel.org/cgit/linux/kernel/git/dtor/input.git/commit/?h=next&id=771d8f1b178e7e09fcc641fccd48852958dbc329IRQ flags are set by the touchscreen controller driver, so use
IRQ_TYPE_NONE.arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+)arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +0
-0
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts line 105
Quoted 5 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +2
-0@@ -101,6 +101,20 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c2_pins_a>; status = "okay"; + + gt911 at 5d {
The node name should be the class of the device. touchscreen in this case.
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts line 109
Quoted 4 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +4
-0+ compatible = "goodix,gt911"; + reg = <0x5d>; + interrupt-parent = <&pio>; + interrupts = <21 IRQ_TYPE_NONE>; /* EINT21 (PH21) */
Unfortunately, IRQ_TYPE_NONE is not a valid value for the GIC bindings.
You're also not adding a pinctrl group for that pin?
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts line 117
Quoted 8 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +8
-0+ }; + + gt911 at 14 { + compatible = "goodix,gt911"; + reg = <0x14>; + interrupt-parent = <&pio>; + interrupts = <21 IRQ_TYPE_NONE>; /* EINT21 (PH21) */ + };
And nodes should be ordered by addresses ascending order.
Thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150331/a6c2adac/attachment.sig>
PATCH 1/1 ARM: dts: sun7i: Add Goodix GT911 nodes for Wexler TAB7200
Quoted 10 lines · On Tue, 31 Mar 2015 07:43:38 -0700 Maxime Ripard…
Hi,
Quoted 3 lines · Aleksei Mamlin
This patch adds nodes for the Goodix GT911 touchscreen controller found on the Wexler TAB7200 tablet. Controller uses one of following I2C
addresses:0x5dor0x14, so just add two nodes.In which case are these different addresses encountered? Different revisions of the same board?
According to the datasheet it is a feature of the controller. The address(0x5d or 0x14) can be configured using a reset sequence, which has not yet been implemented in the driver.
Quoted 54 lines
Quoted 17 lines
Signed-off-by Aleksei Mamlin <[email protected]>---
DT support for the Goodix GT911 touchscreen controller has been queued up by Dmitry Torokhov for merging into 4.1:
https://git.kernel.org/cgit/linux/kernel/git/dtor/input.git/commit/?h=next&id=771d8f1b178e7e09fcc641fccd48852958dbc329IRQ flags are set by the touchscreen controller driver, so use
IRQ_TYPE_NONE.arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+)arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +0
-0arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts line 105
Quoted 5 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +2
-0@@ -101,6 +101,20 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c2_pins_a>; status = "okay"; + + gt911 at 5d {The node name should be the class of the device. touchscreen in this case.
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts line 109
Quoted 4 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +4
-0+ compatible = "goodix,gt911"; + reg = <0x5d>; + interrupt-parent = <&pio>; + interrupts = <21 IRQ_TYPE_NONE>; /* EINT21 (PH21) */Unfortunately,
IRQ_TYPE_NONEis not a valid value for the GIC bindings.You're also not adding a pinctrl group for that pin?
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts line 117
Quoted 8 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +8
-0+ }; + + gt911 at 14 { + compatible = "goodix,gt911"; + reg = <0x14>; + interrupt-parent = <&pio>; + interrupts = <21 IRQ_TYPE_NONE>; /* EINT21 (PH21) */ + };And nodes should be ordered by addresses ascending order.
Thanks!
MaximeSignature · 3 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Signature · 2 lines
Thanks and regards, Aleksei Mamlin
PATCH 1/1 ARM: dts: sun7i: Add Goodix GT911 nodes for Wexler TAB7200
Quoted 10 lines · Aleksei Mamlin
Quoted 7 lines · On Tue, 31 Mar 2015 07:43:38 -0700 Maxime Ripard…
Hi,
Quoted 3 lines · Aleksei Mamlin
This patch adds nodes for the Goodix GT911 touchscreen controller found on the Wexler TAB7200 tablet. Controller uses one of following I2C
addresses:0x5dor0x14, so just add two nodes.
Quoted 6 lines
Quoted 2 lines
In which case are these different addresses encountered? Different revisions of the same board?
According to the datasheet it is a feature of the controller. The address(0x5d or
0x14) can be configured using a reset sequence, which has not yet been implemented in the driver.
Which address is set up by the bootloader then?
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150402/4c8233b4/attachment.sig>
PATCH 1/1 ARM: dts: sun7i: Add Goodix GT911 nodes for Wexler TAB7200
Quoted 11 lines · On Thu, 2 Apr 2015 11:22:59 +0200 Maxime Ripard…
Quoted 10 lines · Aleksei Mamlin
Quoted 7 lines · On Tue, 31 Mar 2015 07:43:38 -0700 Maxime Ripard…
Hi,
Quoted 3 lines · Aleksei Mamlin
This patch adds nodes for the Goodix GT911 touchscreen controller found on the Wexler TAB7200 tablet. Controller uses one of following I2C
addresses:0x5dor0x14, so just add two nodes.
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
In which case are these different addresses encountered? Different revisions of the same board?
According to the datasheet it is a feature of the controller. The address(0x5d or
0x14) can be configured using a reset sequence, which has not yet been implemented in the driver.Which address is set up by the bootloader then?
I assume that bootloader(u-boot) didn't sets up any address, but touchscreen controller usually uses 0x5d. Sometimes, after hard reset, it uses 0x14. For this we need nodes on both adresses.
Quoted 7 lines
Maxime
Signature · 3 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Signature · 2 lines
Thanks and regards, Aleksei Mamlin
PATCH 1/1 ARM: dts: sun7i: Add Goodix GT911 nodes for Wexler TAB7200
Quoted 21 lines · Aleksei Mamlin
Quoted 18 lines · On Thu, 2 Apr 2015 11:22:59 +0200 Maxime Ripard…
Quoted 16 lines · Aleksei Mamlin
Quoted 9 lines · On Tue, 31 Mar 2015 07:43:38 -0700 Maxime Ripard…
Hi,
Quoted 3 lines · Aleksei Mamlin
This patch adds nodes for the Goodix GT911 touchscreen controller found on the Wexler TAB7200 tablet. Controller uses one of following I2C
addresses:0x5dor0x14, so just add two nodes.In which case are these different addresses encountered? Different revisions of the same board?
According to the datasheet it is a feature of the controller. The address(0x5d or
0x14) can be configured using a reset sequence, which has not yet been implemented in the driver.
Quoted 5 lines
Quoted 1 line
Which address is set up by the bootloader then?
I assume that bootloader(u-boot) didn't sets up any address, but touchscreen controller usually uses
0x5d. Sometimes, after hard reset, it uses0x14. For this we need nodes on both adresses.
I'm confused, who changes that address then?
The controller itself?
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150413/94a5ec53/attachment.sig>
PATCH 1/1 ARM: dts: sun7i: Add Goodix GT911 nodes for Wexler TAB7200
Quoted 24 lines · On Mon, 13 Apr 2015 18:09:51 +0200 Maxime Ripard…
Quoted 23 lines · Aleksei Mamlin
Quoted 19 lines · On Thu, 2 Apr 2015 11:22:59 +0200 Maxime Ripard…
Quoted 10 lines · Aleksei Mamlin
Quoted 7 lines · On Tue, 31 Mar 2015 07:43:38 -0700 Maxime Ripard…
Hi,
Quoted 3 lines · Aleksei Mamlin
This patch adds nodes for the Goodix GT911 touchscreen controller found on the Wexler TAB7200 tablet. Controller uses one of following I2C
addresses:0x5dor0x14, so just add two nodes.Quoted 6 lines
Quoted 2 lines
In which case are these different addresses encountered? Different revisions of the same board?
According to the datasheet it is a feature of the controller. The address(0x5d or
0x14) can be configured using a reset sequence, which has not yet been implemented in the driver.Which address is set up by the bootloader then?
Quoted 8 lines
Quoted 3 lines
I assume that bootloader(u-boot) didn't sets up any address, but touchscreen controller usually uses
0x5d. Sometimes, after hard reset, it uses0x14. For this we need nodes on both adresses.I'm confused, who changes that address then?
The controller itself?
If I understood correctly, when device starts it sets reset pin (PB13) to high level and int pin(PH21) to low level. After this int pin sets up as external interrupt. This sequence triggers controller to use 0x5d address.
After hard reset both pins may be hight level and it triggers controller to use 0x14 address.
Please see datasheets at pages 8-10.
https://drive.google.com/file/d/0BxCVOQS3ZymGdEE0cHI3bnp5WVE
https://drive.google.com/file/d/0BxCVOQS3ZymGbDAzVnZwZ2lOZ1E
Quoted 7 lines
Maxime
Signature · 3 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Signature · 2 lines
Thanks and regards, Aleksei Mamlin
PATCH 1/1 ARM: dts: sun7i: Add Goodix GT911 nodes for Wexler TAB7200
Quoted 39 lines · Aleksei Mamlin
Quoted 24 lines · On Mon, 13 Apr 2015 18:09:51 +0200 Maxime Ripard…
Quoted 23 lines · Aleksei Mamlin
Quoted 19 lines · On Thu, 2 Apr 2015 11:22:59 +0200 Maxime Ripard…
Quoted 10 lines · Aleksei Mamlin
Quoted 7 lines · On Tue, 31 Mar 2015 07:43:38 -0700 Maxime Ripard…
Hi,
Quoted 3 lines · Aleksei Mamlin
This patch adds nodes for the Goodix GT911 touchscreen controller found on the Wexler TAB7200 tablet. Controller uses one of following I2C
addresses:0x5dor0x14, so just add two nodes.Quoted 6 lines
Quoted 2 lines
In which case are these different addresses encountered? Different revisions of the same board?
According to the datasheet it is a feature of the controller. The address(0x5d or
0x14) can be configured using a reset sequence, which has not yet been implemented in the driver.Which address is set up by the bootloader then?
Quoted 8 lines
Quoted 3 lines
I assume that bootloader(u-boot) didn't sets up any address, but touchscreen controller usually uses
0x5d. Sometimes, after hard reset, it uses0x14. For this we need nodes on both adresses.I'm confused, who changes that address then?
The controller itself?
If I understood correctly, when device starts it sets reset pin (PB13) to high level and int pin(PH21) to low level. After this int pin sets up as external interrupt. This sequence triggers controller to use
0x5daddress.
Quoted 7 lines
After hard reset both pins may be hight level and it triggers controller to use
0x14address.Please see datasheets at pages 8-10.
https://drive.google.com/file/d/0BxCVOQS3ZymGdEE0cHI3bnp5WVE
https://drive.google.com/file/d/0BxCVOQS3ZymGbDAzVnZwZ2lOZ1E
If so, then the driver should be fixed to handle that power sequence correctly and make sure that the device is using the 0x5d address, whatever the previous state was.
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150414/84b59097/attachment.sig>
PATCH 1/1 ARM: dts: sun7i: Add Goodix GT911 nodes for Wexler TAB7200
In reply to Maxime RipardQuoted 21 lines · On Tue, 31 Mar 2015 07:43:38 -0700 Maxime Ripard…
Hi,
Quoted 3 lines · Aleksei Mamlin
This patch adds nodes for the Goodix GT911 touchscreen controller found on the Wexler TAB7200 tablet. Controller uses one of following I2C
addresses:0x5dor0x14, so just add two nodes.In which case are these different addresses encountered? Different revisions of the same board?
Quoted 11 lines
Signed-off-by Aleksei Mamlin <[email protected]>---
DT support for the Goodix GT911 touchscreen controller has been queued up by Dmitry Torokhov for merging into 4.1:
https://git.kernel.org/cgit/linux/kernel/git/dtor/input.git/commit/?h=next&id=771d8f1b178e7e09fcc641fccd48852958dbc329IRQ flags are set by the touchscreen controller driver, so use
IRQ_TYPE_NONE.arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
Quoted 14 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts line 105
Quoted 10 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +2
-0@@ -101,6 +101,20 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c2_pins_a>; status = "okay"; + + gt911 at 5d {The node name should be the class of the device. touchscreen in this case.
Ok, I'll fix it.
Quoted 9 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts line 109
Quoted 5 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +4
-0+ compatible = "goodix,gt911"; + reg = <0x5d>; + interrupt-parent = <&pio>; + interrupts = <21 IRQ_TYPE_NONE>; /* EINT21 (PH21) */Unfortunately,
IRQ_TYPE_NONEis not a valid value for the GIC bindings.
Hmm. Which value I must use in this case? IRQ type is set by the touchscreen controller driver, so I think that value must be 0.
Quoted 3 lines
You're also not adding a pinctrl group for that pin?
No, because it works fine with this DT nodes. It seems that I should first configure pin to work in interrupt mode. Correct?
Quoted 12 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts line 117
Quoted 9 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +8
-0+ }; + + gt911 at 14 { + compatible = "goodix,gt911"; + reg = <0x14>; + interrupt-parent = <&pio>; + interrupts = <21 IRQ_TYPE_NONE>; /* EINT21 (PH21) */ + };And nodes should be ordered by addresses ascending order.
I'll fix it too.
Quoted 8 lines
Thanks!
MaximeSignature · 3 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Signature · 2 lines
Thanks and regards, Aleksei Mamlin
PATCH 1/1 ARM: dts: sun7i: Add Goodix GT911 nodes for Wexler TAB7200
Quoted 11 lines · Aleksei Mamlin
Quoted 8 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts line 109
Quoted 4 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +4
-0+ compatible = "goodix,gt911"; + reg = <0x5d>; + interrupt-parent = <&pio>; + interrupts = <21 IRQ_TYPE_NONE>; /* EINT21 (PH21) */Unfortunately,
IRQ_TYPE_NONEis not a valid value for the GIC bindings.Hmm. Which value I must use in this case? IRQ type is set by the touchscreen controller driver, so I think that value must be 0.
Whatever the hardware is using. Presumably the same value than the driver sets.
Quoted 5 lines
Quoted 2 lines
You're also not adding a pinctrl group for that pin?
No, because it works fine with this DT nodes. It seems that I should first configure pin to work in interrupt mode. Correct?
You don't have to, since the pio driver will already take care of muxing it to the right function, but that will prevent any driver to call pinctrl_request on the same pin.
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150402/26232ff0/attachment.sig>
PATCH 1/1 ARM: dts: sun7i: Add Goodix GT911 nodes for Wexler TAB7200
Quoted 17 lines · On Thu, 2 Apr 2015 20:50:08 +0200 Maxime Ripard…
Quoted 11 lines · Aleksei Mamlin
Quoted 8 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts line 109
Quoted 4 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +4
-0+ compatible = "goodix,gt911"; + reg = <0x5d>; + interrupt-parent = <&pio>; + interrupts = <21 IRQ_TYPE_NONE>; /* EINT21 (PH21) */Unfortunately,
IRQ_TYPE_NONEis not a valid value for the GIC bindings.Hmm. Which value I must use in this case? IRQ type is set by the touchscreen controller driver, so I think that value must be 0.
Whatever the hardware is using. Presumably the same value than the driver sets.
Quoted 1 line
Quoted 1 line
Quoted 9 lines
Quoted 4 lines
Quoted 1 line
You're also not adding a pinctrl group for that pin?
No, because it works fine with this DT nodes. It seems that I should first configure pin to work in interrupt mode. Correct?
You don't have to, since the pio driver will already take care of muxing it to the right function, but that will prevent any driver to call
pinctrl_requeston the same pin.
It is still necessary?
I see that you have accepted Hans de Goede's patches: http://www.spinics.net/lists/arm-kernel/msg411142.html
Quoted 7 lines
Maxime
Signature · 3 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Signature · 2 lines
Thanks and regards, Aleksei Mamlin
PATCH 1/1 ARM: dts: sun7i: Add Goodix GT911 nodes for Wexler TAB7200
Quoted 25 lines · Aleksei Mamlin
Quoted 22 lines · On Thu, 2 Apr 2015 20:50:08 +0200 Maxime Ripard…
Quoted 11 lines · Aleksei Mamlin
Quoted 8 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts line 109
Quoted 4 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +4
-0+ compatible = "goodix,gt911"; + reg = <0x5d>; + interrupt-parent = <&pio>; + interrupts = <21 IRQ_TYPE_NONE>; /* EINT21 (PH21) */Unfortunately,
IRQ_TYPE_NONEis not a valid value for the GIC bindings.Hmm. Which value I must use in this case? IRQ type is set by the touchscreen controller driver, so I think that value must be 0.
Whatever the hardware is using. Presumably the same value than the driver sets.
Quoted 5 lines
Quoted 2 lines
You're also not adding a pinctrl group for that pin?
No, because it works fine with this DT nodes. It seems that I should first configure pin to work in interrupt mode. Correct?
Quoted 6 lines
Quoted 3 lines
You don't have to, since the pio driver will already take care of muxing it to the right function, but that will prevent any driver to call
pinctrl_requeston the same pin.It is still necessary?
I see that you have accepted Hans de Goede's patches: http://www.spinics.net/lists/arm-kernel/msg411142.html
No, it's fine.
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150413/568ef726/attachment-0001.sig>