Skip to content

Commit

Permalink
Convert BPro touch screen patch to a DT overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
zador-blood-stained committed Mar 3, 2017
1 parent 4a4517c commit c8de734
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 94 deletions.
46 changes: 0 additions & 46 deletions patch/kernel/sunxi-dev/bananapipro_lemaker_lcd.patch.disabled

This file was deleted.

54 changes: 52 additions & 2 deletions patch/kernel/sunxi-next/add-a20-overlays.patch
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
diff --git a/arch/arm/boot/dts/overlay/Makefile b/arch/arm/boot/dts/overlay/Makefile
new file mode 100644
index 00000000..be4f2595
index 00000000..194dddba
--- /dev/null
+++ b/arch/arm/boot/dts/overlay/Makefile
@@ -0,0 +1,28 @@
@@ -0,0 +1,29 @@
+ifeq ($(CONFIG_OF_CONFIGFS),y)
+
+dtbo-$(CONFIG_MACH_SUN7I) += \
Expand All @@ -12,6 +12,7 @@ index 00000000..be4f2595
+ sun7i-a20-i2c1.dtbo \
+ sun7i-a20-i2c2.dtbo \
+ sun7i-a20-i2c3.dtbo \
+ sun7i-a20-i2c3-edt-ft5x06.dtbo \
+ sun7i-a20-nand.dtbo \
+ sun7i-a20-spdif-out.dtbo \
+ sun7i-a20-spi0-cs0-spidev.dtbo \
Expand Down Expand Up @@ -144,6 +145,55 @@ index 00000000..3f94c827
+ };
+ };
+};
diff --git a/arch/arm/boot/dts/overlay/sun7i-a20-i2c3-edt-ft5x06.dts b/arch/arm/boot/dts/overlay/sun7i-a20-i2c3-edt-ft5x06.dts
new file mode 100644
index 00000000..3ff36cd0
--- /dev/null
+++ b/arch/arm/boot/dts/overlay/sun7i-a20-i2c3-edt-ft5x06.dts
@@ -0,0 +1,43 @@
+/dts-v1/ /plugin/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ compatible = "allwinner,sun7i-a20";
+
+ fragment@0 {
+ target = <&pio>;
+ __overlay__ {
+ edt_ft5x06_pins: edt_ft5x06_pins@0 {
+ allwinner,pins = "PH7", "PH9";
+ allwinner,function = "gpio_out";
+ allwinner,drive = <0>;
+ allwinner,pull = <0>;
+ };
+ };
+ };
+
+ fragment@1 {
+ target = <&i2c3>;
+ __overlay__ {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c3_pins_a>;
+ edt: edt-ft5x06@38 {
+ compatible = "edt,edt-ft5x06";
+ reg = <0x38>;
+ interrupt-parent = <&pio>;
+ interrupts = <7 9 IRQ_TYPE_EDGE_FALLING>;
+ wake-gpios = <7 7 GPIO_ACTIVE_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&edt_ft5x06_pins>;
+ touchscreen-size-x = <1024>;
+ touchscreen-size-y = <600>;
+ touchscreen-inverted-x;
+ touchscreen-swapped-x-y;
+ };
+ };
+
+ };
+};
diff --git a/arch/arm/boot/dts/overlay/sun7i-a20-i2c3.dts b/arch/arm/boot/dts/overlay/sun7i-a20-i2c3.dts
new file mode 100644
index 00000000..0236b5ae
Expand Down
46 changes: 0 additions & 46 deletions patch/kernel/sunxi-next/bananapipro_lemaker_lcd.patch.disabled

This file was deleted.

0 comments on commit c8de734

Please sign in to comment.