ARM: dts: sun7i: Devicetree improvements for the Wexler TAB7200
Subsystems (2)
cover ARM: dts: sun7i: Devicetree improvements for the Wexler TAB7200
Hi Maxime,
This is a batch of patches with devicetree improvements for Wexler TAB7200 tablet.
The first one add Goodix GT911 touchscreen node to dts. The second add PWM node, which need for LCD backlight. The third add LCD backlight support via PWM.
The last add PA gpio pin for controlling external amplifiers.
The touchscreen patch depends on "Goodix touchscreen enhancements" [1] and "Input: goodix - add axis swapping and axis inversion support" [2] patchsets. Both merged into Dmitry Torokhov's input tree (goodix branch)
[1] https://lkml.org/lkml/2015/11/19/241
[2] https://lkml.org/lkml/2015/11/21/44
Aleksei Mamlin (4):
ARM: dts: sun7i: Enable touchscreen on Wexler TAB7200 tablet
ARM: dts: sun7i: Enable PWM controller on Wexler TAB7200 tablet
ARM: dts: sun7i: Add backlight node to Wexler TAB7200 tablet
ARM: dts: sun7i: Add PA gpio pin to Wexler TAB7200 tablet
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts | 53 ++++++++++++++++++++++++++ 1 file changed, 53 insertions(+)
Signature · 1 line
2.4.10
PATCH 1/4 ARM: dts: sun7i: Enable touchscreen on Wexler TAB7200 tablet
Add a node for the Goodix GT911 touchscreen found on the Wexler TAB7200 tablet
--- arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +19 -0
@@ -102,6 +102,18 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c2_pins_a>; status = "okay"; + + gt911: touchscreen at 5d { + compatible = "goodix,gt911"; + reg = <0x5d>; + interrupt-parent = <&pio>; + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */ + pinctrl-names = "default"; + pinctrl-0 = <&ts_reset_pin>; + irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */ + reset-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* RST (PB13) */ + touchscreen-swapped-x-y; + }; }; &lradc {
@@ -146,6 +158,13 @@ }; &pio { + ts_reset_pin: ts_reset_pin at 0 { + allwinner,pins = "PB13"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + usb0_id_detect_pin: usb0_id_detect_pin at 0 { allwinner,pins = "PH4"; allwinner,function = "gpio_in";
Signature · 1 line
2.4.10
PATCH 1/4 ARM: dts: sun7i: Enable touchscreen on Wexler TAB7200 tablet
Hi,
Quoted 14 lines · Aleksei Mamlin
Add a node for the Goodix GT911 touchscreen found on the Wexler TAB7200 tablet
Signed-off-by Aleksei Mamlin <[email protected]>--- arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +0
-0@@ -102,6 +102,18 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c2_pins_a>;
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts line 113
Quoted 10 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +9
-0status = "okay"; + + gt911: touchscreen at 5d { + compatible = "goodix,gt911"; + reg = <0x5d>; + interrupt-parent = <&pio>; + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */ + pinctrl-names = "default"; + pinctrl-0 = <&ts_reset_pin>; + irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */
It seems odd that you need both irq-gpios and interrupts. These two are completely redundant, and you should even actually use only one in your driver, since the second request_irq will fail.
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/20151218/18d43e8e/attachment.sig>
Re: [PATCH 1/4] ARM: dts: sun7i: Enable touchscreen on Wexler TAB7200 tablet
2015-12-19 0:25 GMT+03:00 Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/[email protected]>:
Quoted 27 lines
Hi,
Quoted 1 line · Aleksei Mamlin
Add a node for the Goodix GT911 touchscreen found on the Wexler TAB7200
tablet
Review
Quoted 7 lines
Signed-off-by Aleksei Mamlin <[email protected]>--- arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)(quoted diff) +0
-0
b/arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dtsarch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts line 110
Quoted 13 lines
index 239b5d2..ec3b837 100644
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +6
-0@@ -102,6 +102,18 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c2_pins_a>; status = "okay"; + + gt911: touchscreen@5d { + compatible = "goodix,gt911"; + reg = <0x5d>; + interrupt-parent = <&pio>; + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21(PH21) */
Quoted 9 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts line 113
Quoted 3 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +3
-0+ pinctrl-names = "default"; + pinctrl-0 = <&ts_reset_pin>; + irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */It seems odd that you need both irq-gpios and interrupts. These two are completely redundant, and you should even actually use only one in your driver, since the second
request_irqwill fail.
We need both interrupts and irq-gpios because the driver uses the interrupt gpio pin as output to reset the device. See bindings documentation [1]
Thanks!
Quoted 7 lines
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Signature · 7 lines
Thanks and regards, Aleksei Mamlin -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] For more options, visit https://groups.google.com/d/optout.
PATCH 1/4 ARM: dts: sun7i: Enable touchscreen on Wexler TAB7200 tablet
Quoted 38 lines · Aleksei Mamlin
2015-12-19 0:25 GMT+03:00 Maxime Ripard <[email protected]>:
Quoted 27 lines
Hi,
Quoted 1 line · Aleksei Mamlin
Add a node for the Goodix GT911 touchscreen found on the Wexler TAB7200
tablet
Review
Quoted 7 lines
Signed-off-by Aleksei Mamlin <[email protected]>--- arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)(quoted diff) +0
-0
b/arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dtsarch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts line 110
Quoted 13 lines
index 239b5d2..ec3b837 100644
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +6
-0@@ -102,6 +102,18 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c2_pins_a>; status = "okay"; + + gt911: touchscreen at 5d { + compatible = "goodix,gt911"; + reg = <0x5d>; + interrupt-parent = <&pio>; + interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21(PH21) */
Quoted 9 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts line 113
Quoted 3 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +3
-0+ pinctrl-names = "default"; + pinctrl-0 = <&ts_reset_pin>; + irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */It seems odd that you need both irq-gpios and interrupts. These two are completely redundant, and you should even actually use only one in your driver, since the second
request_irqwill fail.
Quoted 5 lines
We need both interrupts and irq-gpios because the driver uses the interrupt gpio pin as output to reset the device. See bindings documentation [1]
Hmm, indeed, and even the documentation is confusing.
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/20151221/d7bf2b64/attachment-0001.sig>
Re: [linux-sunxi] Re: [PATCH 1/4] ARM: dts: sun7i: Enable touchscreen on Wexler TAB7200 tablet
In reply to Maxime RipardQuoted 21 lines · Maxime Ripard
Quoted 20 lines · Aleksei Mamlin
Add a node for the Goodix GT911 touchscreen found on the Wexler TAB7200 tablet
Signed-off-by Aleksei Mamlin <[email protected]>--- arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +5
-0@@ -102,6 +102,18 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c2_pins_a>; status = "okay"; + + gt911: touchscreen@5d { + compatible = "goodix,gt911"; + reg = <0x5d>; + interrupt-parent = <&pio>;
Quoted 8 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts line 113
Quoted 4 lines
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +4
-0+ interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */ + pinctrl-names = "default"; + pinctrl-0 = <&ts_reset_pin>; + irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */It seems odd that you need both irq-gpios and interrupts. These two are completely redundant, and you should even actually use only one in your driver, since the second
request_irqwill fail.
Hello,
there is a "specialty" on this type of touchscreen controller - the irq pin on the GT9xx series of chips has two distinct functions:
The first is the regular function for signalling interrupts to the CPU, which is set up with the "interrupts" property.
The second function comes into play when initializing the chip. Without a special initialization procedure, the chip provides basic touchscreen functionality, but several advanced functions are unavailable. To enable those advanced functions, the host needs to temporarily configure the irq pin as a (host-side) output and transmit a specific pattern on the reset and irq lines. This method doesn't work on all systems, so the driver only attempts to reprogram the irq line on the host side as an output if it is explicitly declared with the irq-gpios property.
Regards,
Karsten
Signature · 3 lines
Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung sowie der Weitergabe meiner personenbezogenen Daten für Zwecke der Werbung sowie der Markt- oder Meinungsforschung.
Maxime Ripard
AppliedPATCH 1/4 ARM: dts: sun7i: Enable touchscreen on Wexler TAB7200 tablet
In reply to Aleksei MamlinQuoted 3 lines · Aleksei Mamlin
Add a node for the Goodix GT911 touchscreen found on the Wexler TAB7200 tablet
Signed-off-by Aleksei Mamlin <[email protected]>
Applied, 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/20151221/57134f80/attachment.sig>
PATCH 2/4 ARM: dts: sun7i: Enable PWM controller on Wexler TAB7200 tablet
In reply to Aleksei MamlinWexler TAB7200 tablet use channel 0 of the PWM controller for backlight dimming
--- arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +6 -0
@@ -173,6 +173,12 @@ }; }; +&pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pwm0_pins_a>; + status = "okay"; +}; + ®_dcdc2 { regulator-always-on; regulator-min-microvolt = <1000000>;
Signature · 1 line
2.4.10
Maxime Ripard
AppliedPATCH 2/4 ARM: dts: sun7i: Enable PWM controller on Wexler TAB7200 tablet
Quoted 3 lines · Aleksei Mamlin
Wexler TAB7200 tablet use channel 0 of the PWM controller for backlight dimming
Signed-off-by Aleksei Mamlin <[email protected]>
Applied, 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/20151218/74ae10f1/attachment.sig>
PATCH 3/4 ARM: dts: sun7i: Add backlight node to Wexler TAB7200 tablet
In reply to Aleksei MamlinAdd a backlight for controlling the lcd panel backlight on Wexler TAB7200 tablet
--- arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +18 -0
@@ -48,6 +48,7 @@ #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/input/input.h> #include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/pwm/pwm.h> / { model = "Wexler TAB7200";
@@ -57,6 +58,16 @@ serial0 = &uart0; }; + backlight { + compatible = "pwm-backlight"; + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; + default-brightness-level = <8>; + pinctrl-names = "default"; + pinctrl-0 = <&bl_enable_pin>; + enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */ + }; + chosen { stdout-path = "serial0:115200n8"; };
@@ -158,6 +169,13 @@ }; &pio { + bl_enable_pin: bl_enable_pin at 0 { + allwinner,pins = "PH7"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + ts_reset_pin: ts_reset_pin at 0 { allwinner,pins = "PB13"; allwinner,function = "gpio_out";
Signature · 1 line
2.4.10
PATCH 3/4 ARM: dts: sun7i: Add backlight node to Wexler TAB7200 tablet
Quoted 3 lines · Aleksei Mamlin
Add a backlight for controlling the lcd panel backlight on Wexler TAB7200 tablet
Signed-off-by Aleksei Mamlin <[email protected]>
This one doesn't apply (probably because of some dependency on the first patch).
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/20151218/0c2e7a50/attachment.sig>
Maxime Ripard
AppliedPATCH 3/4 ARM: dts: sun7i: Add backlight node to Wexler TAB7200 tablet
In reply to Aleksei MamlinQuoted 3 lines · Aleksei Mamlin
Add a backlight for controlling the lcd panel backlight on Wexler TAB7200 tablet
Signed-off-by Aleksei Mamlin <[email protected]>
Applied, 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/20151221/ee535b3b/attachment.sig>
PATCH 4/4 ARM: dts: sun7i: Add PA gpio pin to Wexler TAB7200 tablet
In reply to Aleksei MamlinAdd PA gpio pin for controlling power of two external amplifiers (NS4890) which are used on the Wexler TAB7200 tablet
--- arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts +10 -0
@@ -74,6 +74,9 @@ }; &codec { + pinctrl-names = "default"; + pinctrl-0 = <&codec_pa_pin>; + allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */ status = "okay"; };
@@ -176,6 +179,13 @@ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; }; + codec_pa_pin: codec_pa_pin at 0 { + allwinner,pins = "PH15"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + ts_reset_pin: ts_reset_pin at 0 { allwinner,pins = "PB13"; allwinner,function = "gpio_out";
Signature · 1 line
2.4.10
Maxime Ripard
AppliedPATCH 4/4 ARM: dts: sun7i: Add PA gpio pin to Wexler TAB7200 tablet
Quoted 3 lines · Aleksei Mamlin
Add PA gpio pin for controlling power of two external amplifiers (NS4890) which are used on the Wexler TAB7200 tablet
Signed-off-by Aleksei Mamlin <[email protected]>
Applied, 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/20151221/98cbe149/attachment.sig>