aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2016-11-16 08:15:08 -0500
committerMaxime Ripard <maxime.ripard@free-electrons.com>2016-11-22 09:34:09 -0500
commit9bfe7c8d1af5a8a55a21b5407e1a35ed3c1b98eb (patch)
treef0433c71a45992ed065257e59f8d31e3236eedc9
parentbe7bc6b98781451d9ec55fa9267ac895f060d172 (diff)
ARM: dts: sun5i: Add touchscreen node to reference-design-tablet.dtsi
Just like on sun8i all sun5i tablets use the same interrupt and power gpios for their touchscreens. I've checked all known a13 fex files and only the UTOO P66 uses a different gpio for the interrupt. Add a touchscreen node to sun5i-reference-design-tablet.dtsi, which fills in the necessary gpios to avoid duplication in the tablet dts files, just like we do in sun8i-reference-design-tablet.dtsi. This will make future patches adding touchscreen nodes to a13 tablets simpler. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
-rw-r--r--arch/arm/boot/dts/sun5i-a13-utoo-p66.dts38
-rw-r--r--arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi25
2 files changed, 39 insertions, 24 deletions
diff --git a/arch/arm/boot/dts/sun5i-a13-utoo-p66.dts b/arch/arm/boot/dts/sun5i-a13-utoo-p66.dts
index a8b0bcc04514..3d7ff10a48e9 100644
--- a/arch/arm/boot/dts/sun5i-a13-utoo-p66.dts
+++ b/arch/arm/boot/dts/sun5i-a13-utoo-p66.dts
@@ -83,22 +83,6 @@
83 allwinner,pins = "PG3"; 83 allwinner,pins = "PG3";
84}; 84};
85 85
86&i2c1 {
87 icn8318: touchscreen@40 {
88 compatible = "chipone,icn8318";
89 reg = <0x40>;
90 interrupt-parent = <&pio>;
91 interrupts = <6 9 IRQ_TYPE_EDGE_FALLING>; /* EINT9 (PG9) */
92 pinctrl-names = "default";
93 pinctrl-0 = <&ts_wake_pin_p66>;
94 wake-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
95 touchscreen-size-x = <800>;
96 touchscreen-size-y = <480>;
97 touchscreen-inverted-x;
98 touchscreen-swapped-x-y;
99 };
100};
101
102&mmc2 { 86&mmc2 {
103 pinctrl-names = "default"; 87 pinctrl-names = "default";
104 pinctrl-0 = <&mmc2_pins_a>; 88 pinctrl-0 = <&mmc2_pins_a>;
@@ -121,20 +105,26 @@
121 allwinner,drive = <SUN4I_PINCTRL_10_MA>; 105 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
122 allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 106 allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
123 }; 107 };
124
125 ts_wake_pin_p66: ts_wake_pin@0 {
126 allwinner,pins = "PB3";
127 allwinner,function = "gpio_out";
128 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
129 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
130 };
131
132}; 108};
133 109
134&reg_usb0_vbus { 110&reg_usb0_vbus {
135 gpio = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ 111 gpio = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
136}; 112};
137 113
114&touchscreen {
115 compatible = "chipone,icn8318";
116 reg = <0x40>;
117 /* The P66 uses a different EINT then the reference design */
118 interrupts = <6 9 IRQ_TYPE_EDGE_FALLING>; /* EINT9 (PG9) */
119 /* The icn8318 binding expects wake-gpios instead of power-gpios */
120 wake-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
121 touchscreen-size-x = <800>;
122 touchscreen-size-y = <480>;
123 touchscreen-inverted-x;
124 touchscreen-swapped-x-y;
125 status = "okay";
126};
127
138&uart1 { 128&uart1 {
139 /* The P66 uses the uart pins as gpios */ 129 /* The P66 uses the uart pins as gpios */
140 status = "disabled"; 130 status = "disabled";
diff --git a/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi b/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi
index 20cc940f5f91..82f87cdcd164 100644
--- a/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi
+++ b/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi
@@ -41,6 +41,7 @@
41 */ 41 */
42#include "sunxi-reference-design-tablet.dtsi" 42#include "sunxi-reference-design-tablet.dtsi"
43 43
44#include <dt-bindings/interrupt-controller/irq.h>
44#include <dt-bindings/pwm/pwm.h> 45#include <dt-bindings/pwm/pwm.h>
45 46
46/ { 47/ {
@@ -84,6 +85,23 @@
84}; 85};
85 86
86&i2c1 { 87&i2c1 {
88 /*
89 * The gsl1680 is rated at 400KHz and it will not work reliable at
90 * 100KHz, this has been confirmed on multiple different q8 tablets.
91 * All other devices on this bus are also rated for 400KHz.
92 */
93 clock-frequency = <400000>;
94
95 touchscreen: touchscreen {
96 interrupt-parent = <&pio>;
97 interrupts = <6 11 IRQ_TYPE_EDGE_FALLING>; /* EINT11 (PG11) */
98 pinctrl-names = "default";
99 pinctrl-0 = <&ts_power_pin>;
100 power-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
101 /* Tablet dts must provide reg and compatible */
102 status = "disabled";
103 };
104
87 pcf8563: rtc@51 { 105 pcf8563: rtc@51 {
88 compatible = "nxp,pcf8563"; 106 compatible = "nxp,pcf8563";
89 reg = <0x51>; 107 reg = <0x51>;
@@ -125,6 +143,13 @@
125 allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 143 allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
126 }; 144 };
127 145
146 ts_power_pin: ts_power_pin {
147 pins = "PB3";
148 function = "gpio_out";
149 drive-strength = <10>;
150 bias-disable;
151 };
152
128 usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 { 153 usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
129 allwinner,pins = "PG1"; 154 allwinner,pins = "PG1";
130 allwinner,function = "gpio_in"; 155 allwinner,function = "gpio_in";