Przeglądaj źródła

BUILD-473
- edt touchtreiber anpassungen
- unterstützung 5.7 Zoll und 7 zoll glasfront gerät

Reinhard Russinger 7 lat temu
rodzic
commit
8c70eefd2e

+ 70 - 0
GfA-buildroot-add-5-7-and-7inch-glass.patch

@@ -0,0 +1,70 @@
+diff --git a/UpdateDTS.sh.in b/UpdateDTS.sh.in
+index e123282..3a5cb18 100644
+--- a/UpdateDTS.sh.in
++++ b/UpdateDTS.sh.in
+@@ -76,11 +76,17 @@ if [ "$BASEBOARD" == "DISPLAY002_DI4" ]; then
+   sh /root/Display2To_7inch.sh
+   DONE=1
+ else
++if [ "$BASEBOARD" == "DISPLAY002_RS485" ]; then
++  echo "7 Inch Display 2 rs485"
++  sh /root/Display2To_7inch_rs485.sh
++  DONE=1
++else
+   echo "7 Inch"
+   sh /root/DisplayTo_7inch.sh
+   DONE=1
+ fi
+ fi
++fi
+ 
+ if [ "$XRES" == "1280" -a "$YRES" == "800" ]; then
+ if [ "$BASEBOARD" == "DISPLAY002_DI4" ]; then
+diff --git a/UpdateRootfs.sh.in b/UpdateRootfs.sh.in
+index 76a75fb..eeec914 100644
+--- a/UpdateRootfs.sh.in
++++ b/UpdateRootfs.sh.in
+@@ -150,11 +150,29 @@ if [ "$BASEBOARD" == "DISPLAY002_DI4" ]; then
+   sh /root/Display2To_7inch.sh
+   DONE=1
+ else
++if [ "$BASEBOARD" == "DISPLAY002_RS485" ]; then
++  echo "7 Inch Display 2 rs485"
++  sh /root/Display2To_7inch_rs485.sh
++  DONE=1
++else
+   echo "7 Inch"
+   sh /root/DisplayTo_7inch.sh
+   DONE=1
+ fi
+ fi
++fi
++
++if [ "$XRES" == "640" -a "$YRES" == "480" ]; then
++if [ "$BASEBOARD" == "DISPLAY002_DI4" ]; then
++  echo "5.7 Inch Display 2"
++  sh /root/Display2To_5_7inch.sh
++  DONE=1
++else
++  echo "5.7 Inch"
++  sh /root/DisplayTo_5_7inch.sh
++  DONE=1
++fi
++fi
+ 
+ if [ "$XRES" == "1280" -a "$YRES" == "800" ]; then
+ if [ "$BASEBOARD" == "DISPLAY002_DI4" ]; then
+@@ -170,11 +188,11 @@ fi
+ 
+ if [ "$XRES" == "1920" -a "$YRES" == "1080" ]; then
+ if [ "$BASEBOARD" == "DISPLAY002_DI4" ]; then
+-  echo "10 Inch Display 2"
++  echo "15 Inch Display 2"
+   sh /root/Display2To_15inch.sh
+   DONE=1
+ else
+-  echo "10 Inch"
++  echo "15 Inch"
+   sh /root/DisplayTo_15inch.sh
+   DONE=1
+ fi

+ 1 - 0
Make-bb-kernel_Qt5.6.2.sh

@@ -47,6 +47,7 @@ patch -p1 < ../GfA/GfA-buildroot-update-add-fullhd.patch
 patch -p1 < ../GfA/GfA-buildroot-MakeDTSupdate.patch
 patch -p1 < ../GfA/GfA-buildroot_fontconfig_mtime_always_ok.patch
 patch -p1 < ../GfA/GfA-buildroot_make_image_update.patch
+patch -p1 < ../GfA/GfA-buildroot-add-5-7-and-7inch-glass.patch
 #
 chmod a+x *.sh
 cp ../GfA/configs/* ./configs

+ 1 - 1
board/GfA/Display001/BUILD

@@ -1 +1 @@
-472
+473

+ 167 - 8
board/GfA/Display001/DTS_4.4/Display001_5.dts

@@ -104,13 +104,20 @@
 /*                        >;
                 };
 */
-              	i2c2_pins: pinmux_i2c2_pins { 
-                        pinctrl-single,pins = <
-                                0x150 (PIN_INPUT_PULLUP | MUX_MODE2)    /* spi0_sclk.i2c2_sda */
-                                0x154 (PIN_INPUT_PULLUP | MUX_MODE2)    /* spi0_d0.i2c2_scl */
-                        >;
-                };
 
+              	/*i2c2_pins: pinmux_i2c2_pins { 
+                        pinctrl-single,pins = <*/
+                                /*0x150 (PIN_INPUT_PULLUP | MUX_MODE2) */   /* spi0_sclk.i2c2_sda */
+                                /*0x154 (PIN_INPUT_PULLUP | MUX_MODE2) */   /* spi0_d0.i2c2_scl */
+                        /*>;
+                };*/
+
+		i2c_gpio_pins: pinmux_i2c_gpio_pins {
+			pinctrl-single,pins = <
+			0x150 (PIN_INPUT | MUX_MODE7)    /* spi0_sclk.i2c2_sda */
+			0x154 (PIN_INPUT | MUX_MODE7)    /* spi0_d0.i2c2_scl */
+			>;
+		};
 
                spi1_pins: pinmux_spi1_pins {
                         pinctrl-single,pins = <
@@ -196,18 +203,58 @@
 	};
 };
 
-
+/*
 &i2c2 {
     pinctrl-names = "default";
     pinctrl-0 = <&i2c2_pins>;
     status = "okay";
     clock-frequency = <400000>;
 };
+*/
 
+/{
+i2c3: i2c@3 {
+	compatible = "i2c-gpio";
+	pinctrl-names = "default";
+	status = "okay";
+	gpios = <&gpio0 2 0 /* sda */
+		 &gpio0 3 0 /* scl */
+		>;
+	/*i2c-gpio,sda-open-drain;
+	i2c-gpio,scl-open-drain;*/ 
+	i2c-gpio,delay-us = <1>;        /* ~200 kHz */
+	#address-cells = <1>;
+	#size-cells = <0>;
+	};
+};
+
+
+&i2c3 {
+	pca9538_0: gpio@70 {
+		compatible = "nxp,pca9538";
+		reg = <0x70>;
+		gpio-controller;
+		#gpio-cells = <2>;
+		/*interrupt-parent = <&gpio2>;*/
+		/*interrupts = <1 8>;*/
+	};
+
+	pca9538_1: gpio@71 {
+		compatible = "nxp,pca9538";
+		reg = <0x71>;
+		gpio-controller;
+		#gpio-cells = <2>;
+		/*interrupt-parent = <&gpio2>;*/
+		/*interrupts = <1 8>;*/
+	};
 
-&i2c2 {
         polytouch: edt-ft5x06@38 {
                 compatible = "edt,edt-ft5406", "edt,edt-ft5x06";
+
+		gain_M09 = <4>;
+		threshold_M09 = <18>;
+		offset_M09 = <31>;
+
                 reg = <0x38>;
                 pinctrl-names = "default";
                 pinctrl-0 = <&edt_ft5x06_pins>;
@@ -220,6 +267,7 @@
                 compatible = "microchip,mcp7940x";
                 reg = <0x6f>;
                 };
+	
 };
 
 
@@ -346,8 +394,119 @@
                 compatible = "pwm-beeper";
                 pwms = <&pwm7 0 0 0>;
         };
+
+       gfa_panel_leds {
+                compatible = "gpio-leds";
+
+                led0 {
+                        label = "GfA-LED0";
+                        gpios = <&pca9538_1 2 0>;
+                        linux,default-trigger = "default-off";
+                };
+
+                led1 {
+                        label = "GfA-LED1";
+                        gpios = <&pca9538_1 3 0>;
+                        linux,default-trigger = "default-off";
+                };
+
+                led2 {
+                        label = "GfA-LED2";
+                        gpios = <&pca9538_1 4 0>;
+                        linux,default-trigger = "default-off";
+                };
+
+                led3 {
+                        label = "GfA-LED3";
+                        gpios = <&pca9538_1 5 0>;
+                        linux,default-trigger = "default-off";
+                };
+
+                led4 {
+                        label = "GfA-LED4";
+                        gpios = <&pca9538_1 6 0>;
+                        linux,default-trigger = "default-off";
+                };
+
+                led5 {
+                        label = "GfA-LED5";
+                        gpios = <&pca9538_1 7 0>;
+                        linux,default-trigger = "default-off";
+                };
+        };
+
+	gpio-keys {
+		compatible = "gpio-keys-polled";
+		poll-interval = <100>;
+
+		F2 {
+			linux,code = <60>;
+			label = "F2";
+			gpios = <&pca9538_0 0 0x1>;
+                        };
+
+		F5 {
+			linux,code = <63>;
+			label = "F2";
+			gpios = <&pca9538_0 1 0x1>;
+                        };
+
+		F6 {
+			linux,code = <64>;
+			label = "F6";
+			gpios = <&pca9538_0 2 0x1>;
+                        };
+
+		F7 {
+			linux,code = <65>;
+			label = "F7";
+			gpios = <&pca9538_0 3 0x1>;
+                        };
+
+		F8 {
+			linux,code = <66>;
+			label = "F8";
+			gpios = <&pca9538_0 4 0x1>;
+                        };
+
+		F9 {
+			linux,code = <67>;
+			label = "F9";
+			gpios = <&pca9538_0 5 0x1>;
+                        };
+
+
+		F10 {
+			linux,code = <68>;
+			label = "F10";
+			gpios = <&pca9538_0 6 0x1>;
+                        };
+
+
+		F4 {
+			linux,code = <62>;
+			label = "F4";
+			gpios = <&pca9538_0 7 0x1>;
+                        };
+
+
+		F1 {
+			linux,code = <59>;
+			label = "F1";
+			gpios = <&pca9538_1 0 0x1>;
+                        };
+
+		F3 {
+			linux,code = <61>;
+			label = "F3";
+			gpios = <&pca9538_1 1 0x1>;
+                        };
+
+	};
+
 };
 
+
 / {
 	vendorinfo { 
 		vendor_name = "GfA Display001";

+ 11 - 1
board/GfA/Display001/DTS_4.4/Display002_7.dts

@@ -219,12 +219,22 @@ i2c@3 {
                         pinctrl-names = "default";
                         pinctrl-0 = <&edt_ft5x06_pins>;
                         interrupt-parent = <&gpio2>;
-                        interrupts = <1 0>;
+                        interrupts = <1 8>;
                         reset-gpios = <&gpio3 21 1>;
 			max_x = <800>;
 			max_y = <480>;
                 };
 
+        maxtouch: atmel_mxt_ts@4a {
+                        compatible = "atmel,maxtouch";
+                   	invert_y;
+			reg = <0x4a>;
+                        pinctrl-names = "default";
+                        pinctrl-0 = <&edt_ft5x06_pins>;
+                        interrupt-parent = <&gpio2>;
+                        interrupts = <1 8>;
+                };
+
 	mcp7940x: rtc@6f {
 		compatible = "microchip,mcp7940x";
 		reg = <0x6f>;

+ 470 - 0
board/GfA/Display001/DTS_4.4/Display002_7_rs485.dts

@@ -0,0 +1,470 @@
+/*
+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+/dts-v1/;
+
+#include "am33xx.dtsi"
+#include "am335x-bone-common.dtsi"
+
+&ldo3_reg {
+	regulator-min-microvolt = <1800000>;
+	regulator-max-microvolt = <1800000>;
+	regulator-always-on;
+};
+
+&mmc1 {
+	vmmc-supply = <&vmmcsd_fixed>;
+};
+
+&mmc2 {
+	vmmc-supply = <&vmmcsd_fixed>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&emmc_pins>;
+	bus-width = <8>;
+	ti,non-removable;
+	status = "okay";
+};
+
+&am33xx_pinmux {
+		lcd_pins_default: lcd_pins_default {
+			pinctrl-single,pins = <
+				0x20 0x01	/* gpmc_ad8.lcd_data16, OUTPUT | MODE1 */
+				0x24 0x01	/* gpmc_ad9.lcd_data17, OUTPUT | MODE1 */
+				0x28 0x01	/* gpmc_ad10.lcd_data18, OUTPUT | MODE1 */
+				0x2c 0x01	/* gpmc_ad11.lcd_data19, OUTPUT | MODE1 */
+				0x30 0x01	/* gpmc_ad12.lcd_data20, OUTPUT | MODE1 */
+				0x34 0x01	/* gpmc_ad13.lcd_data21, OUTPUT | MODE1 */
+				0x38 0x01	/* gpmc_ad14.lcd_data22, OUTPUT | MODE1 */
+				0x3c 0x01	/* gpmc_ad15.lcd_data23, OUTPUT | MODE1 */
+				0xa0 0x00	/* lcd_data0.lcd_data0, OUTPUT | MODE0 */
+				0xa4 0x00	/* lcd_data1.lcd_data1, OUTPUT | MODE0 */
+				0xa8 0x00	/* lcd_data2.lcd_data2, OUTPUT | MODE0 */
+				0xac 0x00	/* lcd_data3.lcd_data3, OUTPUT | MODE0 */
+				0xb0 0x00	/* lcd_data4.lcd_data4, OUTPUT | MODE0 */
+				0xb4 0x00	/* lcd_data5.lcd_data5, OUTPUT | MODE0 */
+				0xb8 0x00	/* lcd_data6.lcd_data6, OUTPUT | MODE0 */
+				0xbc 0x00	/* lcd_data7.lcd_data7, OUTPUT | MODE0 */
+				0xc0 0x00	/* lcd_data8.lcd_data8, OUTPUT | MODE0 */
+				0xc4 0x00	/* lcd_data9.lcd_data9, OUTPUT | MODE0 */
+				0xc8 0x00	/* lcd_data10.lcd_data10, OUTPUT | MODE0 */
+				0xcc 0x00	/* lcd_data11.lcd_data11, OUTPUT | MODE0 */
+				0xd0 0x00	/* lcd_data12.lcd_data12, OUTPUT | MODE0 */
+				0xd4 0x00	/* lcd_data13.lcd_data13, OUTPUT | MODE0 */
+				0xd8 0x00	/* lcd_data14.lcd_data14, OUTPUT | MODE0 */
+				0xdc 0x00	/* lcd_data15.lcd_data15, OUTPUT | MODE0 */
+				0xe0 0x00	/* lcd_vsync.lcd_vsync, OUTPUT | MODE0 */
+				0xe4 0x00	/* lcd_hsync.lcd_hsync, OUTPUT | MODE0 */
+				0xe8 0x00	/* lcd_pclk.lcd_pclk, OUTPUT | MODE0 */
+				0xec 0x00	/* lcd_ac_bias_en.lcd_ac_bias_en, OUTPUT | MODE0 */
+			>;
+		};
+
+		lcd_pins_sleep: lcd_pins_sleep {
+			pinctrl-single,pins = <
+				0x20 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* gpmc_ad8.lcd_data16 */
+				0x24 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* gpmc_ad9.lcd_data17 */
+				0x28 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* gpmc_ad10.lcd_data18 */
+				0x2c (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* gpmc_ad11.lcd_data19 */
+				0x30 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* gpmc_ad12.lcd_data20 */
+				0x34 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* gpmc_ad13.lcd_data21 */
+				0x38 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* gpmc_ad14.lcd_data22 */
+				0x3c (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* gpmc_ad15.lcd_data23 */
+				0xa0 (PULL_DISABLE | MUX_MODE7)		/* lcd_data0.lcd_data0 */
+				0xa4 (PULL_DISABLE | MUX_MODE7)		/* lcd_data1.lcd_data1 */
+				0xa8 (PULL_DISABLE | MUX_MODE7)		/* lcd_data2.lcd_data2 */
+				0xac (PULL_DISABLE | MUX_MODE7)		/* lcd_data3.lcd_data3 */
+				0xb0 (PULL_DISABLE | MUX_MODE7)		/* lcd_data4.lcd_data4 */
+				0xb4 (PULL_DISABLE | MUX_MODE7)		/* lcd_data5.lcd_data5 */
+				0xb8 (PULL_DISABLE | MUX_MODE7)		/* lcd_data6.lcd_data6 */
+				0xbc (PULL_DISABLE | MUX_MODE7)		/* lcd_data7.lcd_data7 */
+				0xc0 (PULL_DISABLE | MUX_MODE7)		/* lcd_data8.lcd_data8 */
+				0xc4 (PULL_DISABLE | MUX_MODE7)		/* lcd_data9.lcd_data9 */
+				0xc8 (PULL_DISABLE | MUX_MODE7)		/* lcd_data10.lcd_data10 */
+				0xcc (PULL_DISABLE | MUX_MODE7)		/* lcd_data11.lcd_data11 */
+				0xd0 (PULL_DISABLE | MUX_MODE7)		/* lcd_data12.lcd_data12 */
+				0xd4 (PULL_DISABLE | MUX_MODE7)		/* lcd_data13.lcd_data13 */
+				0xd8 (PULL_DISABLE | MUX_MODE7)		/* lcd_data14.lcd_data14 */
+				0xdc (PULL_DISABLE | MUX_MODE7)		/* lcd_data15.lcd_data15 */
+				0xe0 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* lcd_vsync.lcd_vsync, OUTPUT | MODE0 */
+				0xe4 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* lcd_hsync.lcd_hsync */
+				0xe8 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* lcd_pclk.lcd_pclk */
+				0xec (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* lcd_ac_bias_en.lcd_ac_bias_en */
+			>;
+		};
+
+
+                i2c_gpio_pins: pinmux_i2c_gpio_pins {
+                        pinctrl-single,pins = <
+                                0x150 (PIN_INPUT | MUX_MODE7)    /* spi0_sclk.i2c2_sda */
+                                0x154 (PIN_INPUT | MUX_MODE7)    /* spi0_d0.i2c2_scl */
+                        >;
+                };
+
+               spi1_pins: pinmux_spi1_pins {
+                        pinctrl-single,pins = <
+                                0x190 (PIN_INPUT_PULLUP | MUX_MODE3) /* mcasp0_aclkx.spi1_sclk */
+                                0x194 (PIN_INPUT_PULLUP | MUX_MODE3)  /* mcasp0_fsx.spi1_d0 */
+                                0x198 (PIN_OUTPUT_PULLUP | MUX_MODE3) /* mcasp0_axr0.spi1_d1 */
+                                0x19c (PIN_OUTPUT_PULLUP | MUX_MODE3) /* mcasp0_ahclrk.spi1_cs0 */
+                                0x164 (PIN_OUTPUT_PULLUP | MUX_MODE2) /* ecap0_in.pwm0_out */
+                        >;
+                };
+
+
+		edt_ft5x06_pins: pinmux_edt_ft5x06_pins{
+                        pinctrl-single,pins = <
+                                0x1ac (PIN_OUTPUT | MUX_MODE7)    /* mcasp0_ahclkx.gpio3.21 RESET TOUCH P9_25*/
+                                0x8c  (PIN_INPUT | MUX_MODE7)    /* gpmc_clk_mux0.gpio2.1  INT TOUCH P8_18 */
+                        >;
+
+		};
+
+              	igt_emerg_pins: pinmux_igt_emerg_pins {
+                        pinctrl-single,pins = <
+                                0x048 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)    /* ehrpwm1a.gpio1.18 emerg */
+                                0x04C (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /*ehrpwm1b.gpio1.19 igt*/ 
+                        >;
+                };
+
+              	uart4_pins_default: pinmux_uart4_pins_default {
+                        pinctrl-single,pins = <
+                                0x070 (PIN_INPUT_PULLUP | MUX_MODE6)    /* gpmc_wait0.uart4_rxd */
+                                0x074 (PIN_OUTPUT_PULLDOWN | MUX_MODE6) /* gpmc_wpn.uart4_txd */ 
+				0x078 (PIN_OUTPUT | MUX_MODE7)		/* gpmc_ben1.gpio1.28 */
+                        >;
+                };
+
+                uart4_pins_sleep: pinmux_uart4_pins_sleep {
+                        pinctrl-single,pins = <
+                                0x070 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                                0x074 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+				0x078 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                        >;
+                };
+
+               uart1_pins_default: pinmux_uart1_pins_default {
+                        pinctrl-single,pins = <
+                                0x180 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart1_rxd.uart1_rxd */
+                                0x184 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart1_txd.uart1_txd */ 
+				0x178 (PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c2_sda.uart1_ctsn */
+                                0x17c (PIN_OUTPUT | MUX_MODE0)  	/* i2c2_scl.uart1_rtsn */
+                        >;
+                };
+
+
+                uart1_pins_sleep: pinmux_uart1_pins_sleep {
+                        pinctrl-single,pins = <
+                                0x180 (PIN_INPUT_PULLDOWN | MUX_MODE0)  /* uart1_rxd.uart1_rxd */
+                                0x184 (PIN_INPUT_PULLDOWN | MUX_MODE0)	/* uart1_txd.uart1_txd */ 
+				0x178 (PIN_INPUT_PULLDOWN | MUX_MODE0)	/* i2c2_sda.uart1_ctsn */
+                                0x17c (PIN_INPUT_PULLDOWN | MUX_MODE0)  /* i2c2_scl.uart1_rtsn */
+                        >;
+                };
+
+		timer7_pins: pinmux_timer7_pins {
+                        pinctrl-single,pins = <
+                               0x094 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_oen_ren.timer7 */
+				>;
+				};
+
+		timer4_pins: pinmux_timer4_pins {
+                        pinctrl-single,pins = <
+                               0x090 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_advn_ale.timer4 */
+				>;
+				};
+
+		timer5_pins: pinmux_timer5_pins {
+                        pinctrl-single,pins = <
+                               0x09c (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_ben0_cle.timer5 */
+				>;
+				};
+
+
+
+};
+
+&timer7 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&timer7_pins>; 
+	status = "okay";
+};
+
+&timer4 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&timer4_pins>; 
+	status = "okay";
+};
+
+&timer5 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&timer5_pins>; 
+	status = "okay";
+};
+
+&i2c0 {
+	hdmi1: hdmi@70 {
+	      compatible = "nxp,tda998x";
+	      reg = <0x70>;
+	};
+};
+
+/ {
+i2c@3 {
+        compatible = "i2c-gpio";
+        pinctrl-names = "default";
+        pinctrl-0 = <&i2c_gpio_pins>;
+        status = "okay";
+
+        gpios = <&gpio0 2 0 /* sda */
+                 &gpio0 3 0 /* scl */
+                >;
+        /*i2c-gpio,sda-open-drain;
+        i2c-gpio,scl-open-drain;*/ 
+        i2c-gpio,delay-us = <1>;        /* ~200 kHz */
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        polytouch: edt-ft5x06@38 {
+                        compatible = "edt,edt-ft5406", "edt,edt-ft5x06";
+                        reg = <0x38>;
+                        pinctrl-names = "default";
+                        pinctrl-0 = <&edt_ft5x06_pins>;
+                        interrupt-parent = <&gpio2>;
+                        interrupts = <1 8>;
+                        reset-gpios = <&gpio3 21 1>;
+			max_x = <800>;
+			max_y = <480>;
+                };
+
+        maxtouch: atmel_mxt_ts@4a {
+                        compatible = "atmel,maxtouch";
+			reg = <0x4a>;
+                        pinctrl-names = "default";
+                        pinctrl-0 = <&edt_ft5x06_pins>;
+                        interrupt-parent = <&gpio2>;
+                        interrupts = <1 8>;
+                };
+
+	mcp7940x: rtc@6f {
+		compatible = "microchip,mcp7940x";
+		reg = <0x6f>;
+		};
+        };
+
+};
+
+&spi1 {
+	pinctrl-names = "default";
+        pinctrl-0 = <&spi1_pins>;
+
+	clock-frequency = <1000000>;
+        status = "okay";
+
+/*
+	spi1_0{
+		compatible = "spidev";
+                reg = <0>;
+		spi-max-frequency = <10000000>;
+        };
+*/
+
+	gpio_gfa: gpio_gfa@0 {
+		compatible = "fairchild,74hc595";
+		reg = <0>;
+		gpio-controller;
+		#gpio-cells = <2>;
+		registers-number = <1>;
+		spi-max-frequency = <1000000>;
+	};
+
+
+	spi1_1{
+		compatible = "spidev";
+                reg = <1>;
+		spi-max-frequency = <10000000>;
+        };
+
+
+};
+
+&lcdc {
+        status = "okay";
+};
+
+/ {
+  panel {
+	compatible = "ti,tilcdc,panel";
+        pinctrl-names = "default", "sleep";
+        pinctrl-0 = <&lcd_pins_default>;
+        pinctrl-1 = <&lcd_pins_sleep>;
+        status = "okay";
+
+       panel-info {
+                ac-bias           = <255>;
+                ac-bias-intrpt    = <0>;  
+                dma-burst-sz      = <16>; 
+                bpp               = <32>; 
+                fdd               = <0x80>;
+                sync-edge         = <0>;   
+                sync-ctrl         = <1>;   
+                raster-order      = <0>;   
+                fifo-th           = <0>;   
+               };
+
+        display-timings {
+			800x480 {
+				hactive         = <800>;
+				vactive         = <480>;
+				hback-porch     = <88>;
+				hfront-porch    = <40>;
+				hsync-len       = <128>;
+				vback-porch     = <33>;
+				vfront-porch    = <10>;
+				vsync-len       = <2>;
+				clock-frequency = <33000000>;
+				hsync-active    = <0>;
+				vsync-active    = <0>;
+				de-active	= <1>;
+				pixelclk-active = <0>;
+			};
+
+
+        };
+  };
+};
+
+/*
+&tscadc {
+        status = "okay";
+        tsc {
+                ti,wires = <4>;
+                ti,x-plate-resistance = <200>;
+                ti,coordinate-readouts = <5>; 
+                ti,wire-config = <0x00 0x11 0x22 0x33>;
+        };
+};
+*/
+
+&tscadc {
+        status = "okay";
+};
+
+&am335x_adc {
+        ti,adc-channels = <0 1 2 3 4 5 6 7>;
+};
+
+&uart4 {
+	pinctrl-names = "default", "sleep";
+        pinctrl-0 = <&uart4_pins_default>;
+        pinctrl-1 = <&uart4_pins_sleep>;
+
+        status = "okay";
+
+	rts-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
+	rs485-rts-active-high;
+	rs485-rts-delay = <0 0 100>;
+	linux,rs485-enabled-at-boot-time;
+	rs485-rx-during-tx;
+};
+
+&uart1 {
+	pinctrl-names = "default", "sleep";
+        pinctrl-0 = <&uart1_pins_default>;
+        pinctrl-1 = <&uart1_pins_sleep>;
+
+        status = "okay";
+};
+
+
+/ {
+
+        pwm7: dmtimer-pwm@7 {
+                compatible = "ti,omap-dmtimer-pwm";
+                ti,timers = <&timer7>;
+                #pwm-cells = <3>;
+        };
+
+
+        pwm-beeper {
+                compatible = "pwm-beeper";
+                pwms = <&pwm7 0 0 0>;
+        };
+
+        pwm4: dmtimer-pwm@4 {
+                compatible = "ti,omap-dmtimer-pwm";
+                ti,timers = <&timer4>;
+                #pwm-cells = <3>;
+        };
+
+        pwm5: dmtimer-pwm@5 {
+                compatible = "ti,omap-dmtimer-pwm";
+                ti,timers = <&timer5>;
+                #pwm-cells = <3>;
+        };
+
+	pwmleds {
+		compatible = "pwm-leds";
+		gfa-backlight { 
+			pwms = <&pwm4 0 1000000 0>;
+			label = "backlight";
+			max-brightness = <255>;
+		};
+
+		gfa-leds { 
+			pwms = <&pwm5 0 1000000 0>;
+			label = "led_brightness";
+			max-brightness = <255>;
+		};
+	};
+
+
+	gfa_panel_leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&igt_emerg_pins>; 	
+
+		emerg {
+			label = "EMERG";
+			gpios = <&gpio1 18 0>;
+			default-state = "off";
+		};
+
+		ignit {
+			label = "IGNIT";
+			gpios = <&gpio1 19 0>;
+			default-state = "off";
+		};
+
+		led0 {
+			label = "GfA-LED0";
+			gpios = <&gpio_gfa 0 0>;
+			linux,default-trigger = "default-on";
+		};
+
+		led1 {
+			label = "GfA-LED1";
+			gpios = <&gpio_gfa 1 0>;
+			linux,default-trigger = "mmc1";
+		};
+
+		led2 {
+			label = "GfA-LED2";
+			gpios = <&gpio_gfa 2 0>;
+			linux,default-trigger = "heartbeat";
+		};
+
+	};
+
+               
+};
+
+/ {
+	vendorinfo { 
+		vendor_name = "GfA Display002";
+		display_dtb = "Display002_7_rs485.dtb";
+	};
+};

+ 108 - 0
board/GfA/Display001/linux_4.4.94_rt19/linux-022-add-dts-flags-to-atmel-mxt-touch.patch

@@ -0,0 +1,108 @@
+diff -Naurp a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
+--- a/drivers/input/touchscreen/atmel_mxt_ts.c	2018-01-20 11:42:13.000000000 +0100
++++ b/drivers/input/touchscreen/atmel_mxt_ts.c	2018-01-25 09:03:33.876115406 +0100
+@@ -24,6 +24,7 @@
+ #include <linux/i2c.h>
+ #include <linux/platform_data/atmel_mxt_ts.h>
+ #include <linux/input/mt.h>
++#include <linux/input/touchscreen.h>
+ #include <linux/interrupt.h>
+ #include <linux/of.h>
+ #include <linux/slab.h>
+@@ -216,6 +217,9 @@ struct mxt_data {
+ 	unsigned int irq;
+ 	unsigned int max_x;
+ 	unsigned int max_y;
++	bool invert_x;
++	bool invert_y;
++	bool swap_x_y;
+ 	bool xy_switch;
+ 	bool in_bootloader;
+ 	u16 mem_size;
+@@ -257,6 +261,22 @@ struct mxt_data {
+ 	struct completion crc_completion;
+ };
+ 
++static void mxt_apply_prop_to_x_y(const struct mxt_data *data,
++                             int *x, int *y)
++{
++        if (data->invert_x)
++                *x = data->max_x - *x;
++
++        if (data->invert_y)
++                *y = data->max_y - *y;
++
++        if (data->swap_x_y)
++                swap(*x, *y);
++}
++
++
++
++
+ static size_t mxt_obj_size(const struct mxt_object *obj)
+ {
+ 	return obj->size_minus_one + 1;
+@@ -741,6 +761,8 @@ static void mxt_proc_t9_message(struct m
+ 
+ 		/* Touch active */
+ 		input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, 1);
++		mxt_apply_prop_to_x_y(data, &x, &y);
++		
+ 		input_report_abs(input_dev, ABS_MT_POSITION_X, x);
+ 		input_report_abs(input_dev, ABS_MT_POSITION_Y, y);
+ 		input_report_abs(input_dev, ABS_MT_PRESSURE, amplitude);
+@@ -760,8 +782,8 @@ static void mxt_proc_t100_message(struct
+ 	int id;
+ 	u8 status;
+ 	u8 type = 0;
+-	u16 x;
+-	u16 y;
++	/*u16*/ int x;
++	/*u16*/ int y;
+ 	int distance = 0;
+ 	int tool = 0;
+ 	u8 major = 0;
+@@ -845,6 +867,7 @@ static void mxt_proc_t100_message(struct
+ 			id, type, x, y, major, pressure, orientation);
+ 
+ 		input_mt_report_slot_state(input_dev, tool, 1);
++		mxt_apply_prop_to_x_y(data, &x, &y);
+ 		input_report_abs(input_dev, ABS_MT_POSITION_X, x);
+ 		input_report_abs(input_dev, ABS_MT_POSITION_Y, y);
+ 		input_report_abs(input_dev, ABS_MT_TOUCH_MAJOR, major);
+@@ -1778,7 +1801,8 @@ static int mxt_initialize_input_device(s
+ 	int error;
+ 	unsigned int num_mt_slots;
+ 	unsigned int mt_flags = 0;
+-
++	struct device_node *np = dev->of_node;
++	
+ 	switch (data->multitouch) {
+ 	case MXT_TOUCH_MULTI_T9:
+ 		num_mt_slots = data->T9_reportid_max - data->T9_reportid_min + 1;
+@@ -1818,6 +1842,7 @@ static int mxt_initialize_input_device(s
+ 		return -ENOMEM;
+ 	}
+ 
++
+ 	input_dev->name = "Atmel maXTouch Touchscreen";
+ 	input_dev->phys = data->phys;
+ 	input_dev->id.bustype = BUS_I2C;
+@@ -1908,6 +1933,17 @@ static int mxt_initialize_input_device(s
+ 
+ 	data->input_dev = input_dev;
+ 
++	if (np) {
++		data->invert_x = of_property_read_bool(np, "invert_x")?1:0;
++		data->invert_y = of_property_read_bool(np, "invert_y")?1:0;
++        	data->swap_x_y = of_property_read_bool(np, "swap_x_y")?1:0;
++        	
++        	dev_info(dev, "loaded toucscreen properties\n");
++        	dev_info(dev, "touchscreen-inverted-x %d\n", data->invert_x);
++        	dev_info(dev, "touchscreen-inverted-y %d\n", data->invert_y);
++        	dev_info(dev, "touchscreen-swap-x-y %d\n", data->swap_x_y);
++        }
++
+ 	return 0;
+ 
+ err_free_mem:

+ 47 - 0
board/GfA/Display001/linux_4.4.94_rt19/linux-023-edt-ft5x06-shared-irq.disabled__patch

@@ -0,0 +1,47 @@
+diff -Naurp a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
+--- a/drivers/input/touchscreen/edt-ft5x06.c	2018-01-30 21:28:53.696245462 +0100
++++ b/drivers/input/touchscreen/edt-ft5x06.c	2018-01-30 21:28:19.220223683 +0100
+@@ -188,6 +188,7 @@ static irqreturn_t edt_ft5x06_ts_isr(int
+ 	int i, type, x, y, id;
+ 	int offset, tplen, datalen;
+ 	int error;
++	
+ 
+ 	switch (tsdata->version) {
+ 	case M06:
+@@ -532,7 +533,7 @@ static int edt_ft5x06_factory_mode(struc
+ 	int ret;
+ 	int error;
+ 
+-	disable_irq(client->irq);
++//	disable_irq(client->irq);
+ 
+ 	if (!tsdata->raw_buffer) {
+ 		tsdata->raw_bufsize = tsdata->num_x * tsdata->num_y *
+@@ -577,7 +578,7 @@ err_out:
+ 	kfree(tsdata->raw_buffer);
+ 	tsdata->raw_buffer = NULL;
+ 	tsdata->factory_mode = false;
+-	enable_irq(client->irq);
++//	enable_irq(client->irq);
+ 
+ 	return error;
+ 
+@@ -634,7 +635,7 @@ static int edt_ft5x06_work_mode(struct e
+ 		edt_ft5x06_register_write(tsdata, reg_addr->reg_report_rate,
+ 				  tsdata->report_rate);
+ 
+-	enable_irq(client->irq);
++//	enable_irq(client->irq);
+ 
+ 	return 0;
+ }
+@@ -1293,7 +1294,7 @@ static int edt_ft5x06_ts_probe(struct i2
+ 
+ 	error = devm_request_threaded_irq(&client->dev, client->irq, NULL,
+ 					edt_ft5x06_ts_isr,
+-					IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
++					IRQF_TRIGGER_LOW | IRQF_ONESHOT | IRQF_SHARED,
+ 					client->name, tsdata);
+ 	if (error) {
+ 		dev_err(&client->dev, "Unable to request touchscreen IRQ.\n");

+ 65 - 0
board/GfA/Display001/linux_4.4.94_rt19/linux-024-edt-ft5x06-fix-report-rate-for-M09.patch

@@ -0,0 +1,65 @@
+diff -Naurp a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
+--- a/drivers/input/touchscreen/edt-ft5x06.c	2018-02-13 23:46:04.845194636 +0100
++++ b/drivers/input/touchscreen/edt-ft5x06.c	2018-02-13 23:45:01.705110745 +0100
+@@ -53,6 +53,7 @@
+ #define M09_REGISTER_OFFSET		0x93
+ #define M09_REGISTER_NUM_X		0x94
+ #define M09_REGISTER_NUM_Y		0x95
++#define M09_REGISTER_REPORT_RATE	0x88
+ 
+ #define M12_REGISTER_THRESHOLD		0x80
+ #define M12_REGISTER_GAIN		0x92
+@@ -510,7 +511,7 @@ static EDT_ATTR(offset, S_IWUSR | S_IRUG
+ static EDT_ATTR(threshold, S_IWUSR | S_IRUGO, WORK_REGISTER_THRESHOLD,
+ 		M09_REGISTER_THRESHOLD, M12_REGISTER_THRESHOLD, 1, 255);
+ static EDT_ATTR(report_rate, S_IWUSR | S_IRUGO, WORK_REGISTER_REPORT_RATE,
+-		NO_REGISTER, M12_REGISTER_REPORT_RATE, 3, 14);
++		M09_REGISTER_REPORT_RATE, M12_REGISTER_REPORT_RATE, 3, 14);
+ 
+ static struct attribute *edt_ft5x06_attrs[] = {
+ 	&edt_ft5x06_attr_gain.dattr.attr,
+@@ -530,7 +531,7 @@ static int edt_ft5x06_factory_mode(struc
+ 	struct i2c_client *client = tsdata->client;
+ 	int retries = EDT_SWITCH_MODE_RETRIES;
+ 	int ret;
+-	int error;
++	int error = 0;
+ 
+ 	disable_irq(client->irq);
+ 
+@@ -570,7 +571,8 @@ static int edt_ft5x06_factory_mode(struc
+ 		error = -EIO;
+ 		goto err_out;
+ 	}
+-
++	
++	printk(KERN_INFO "EDT-TC: %s: set to factory mode\n", __func__);
+ 	return 0;
+ 
+ err_out:
+@@ -891,7 +893,8 @@ edt_ft5x06_ts_prepare_debugfs(struct edt
+ 			    tsdata->debug_dir, tsdata, &debugfs_raw_data_fops);
+ 			    
+ 	if (reg_addr->reg_report_rate != NO_REGISTER)
+-           debugfs_create_u32("report_rate", S_IRUSR, tsdata->debug_dir, &tsdata->report_rate);
++           debugfs_create_u32("report_rate", S_IRUSR, tsdata->debug_dir, 
++           	&tsdata->report_rate);
+            
+ 	debugfs_create_u32("invert_x", S_IRUSR | S_IWUSR,
+ 			    tsdata->debug_dir, &tsdata->invert_x);
+@@ -989,7 +992,6 @@ static int edt_ft5x06_ts_identify(struct
+ 	if (error)
+ 		return error;
+ 
+-        printk(KERN_INFO "EDT-TC:: %s ::-----%s----\n", __func__, rdbuf);
+ 	/* if we find something consistent, stay with that assumption
+ 	 * at least M09 won't send 3 bytes here
+ 	 */
+@@ -1148,6 +1150,7 @@ edt_ft5x06_ts_set_regs(struct edt_ft5x06
+ 
+ 	case M09:
+ 		reg_addr->reg_threshold = M09_REGISTER_THRESHOLD;
++		reg_addr->reg_report_rate = M09_REGISTER_REPORT_RATE;
+ 		reg_addr->reg_gain = M09_REGISTER_GAIN;
+ 		reg_addr->reg_offset = M09_REGISTER_OFFSET;
+ 		reg_addr->reg_num_x = M09_REGISTER_NUM_X;

+ 20 - 0
board/GfA/Display001/linux_4.4.94_rt19/linux-025-edt-ft5x06-fix-M9-M12-registercount-on-write.patch

@@ -0,0 +1,20 @@
+diff -Naurp a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
+--- a/drivers/input/touchscreen/edt-ft5x06.c	2018-02-20 20:55:48.828441552 +0100
++++ b/drivers/input/touchscreen/edt-ft5x06.c	2018-02-20 20:55:02.332357749 +0100
+@@ -292,7 +292,6 @@ static int edt_ft5x06_register_write(str
+ 	case M06:
+ 		wrbuf[0] = tsdata->factory_mode ? 0xf3 : 0xfc;
+ 		wrbuf[1] = tsdata->factory_mode ? addr & 0x7f : addr & 0x3f;
+-		wrbuf[1] = tsdata->factory_mode ? addr & 0x7f : addr & 0x3f;
+ 		wrbuf[2] = value;
+ 		wrbuf[3] = wrbuf[0] ^ wrbuf[1] ^ wrbuf[2];
+ 		return edt_ft5x06_ts_readwrite(tsdata->client, 4, wrbuf, 0, NULL);
+@@ -302,7 +301,7 @@ static int edt_ft5x06_register_write(str
+ 		wrbuf[0] = addr;
+ 		wrbuf[1] = value;
+ 
+-		return edt_ft5x06_ts_readwrite(tsdata->client, 3,
++		return edt_ft5x06_ts_readwrite(tsdata->client, 2,
+ 					wrbuf, 0, NULL);
+ 
+ 	default:

+ 21 - 7
board/GfA/Display001/rootfs/etc/init.d/gsmMuxd_PH8Ser

@@ -1,15 +1,29 @@
 #!/bin/sh
 #
+BASEBOARD=`cat /tmp/BASEBOARD`
 
 case "$1" in
 	start)
-		/root/gfa_spi -o 0x40025040 0x00000010
-		/bin/sleep 4
-		/root/gfa_spi -o 0x40025040 0x00000000
-		/bin/sleep 1
-		/root/gfa_spi -o 0x40027200 0x00000080
-		/bin/sleep 2
-		/root/gfa_spi -o 0x40027200 0x00000000
+		if [ "$BASEBOARD" == "DISPLAY002_DI4" -o "$BASEBOARD" == "DISPLAY002_RS485" ]; then
+			echo "DISPLAY002"
+			echo 255 > /sys/class/leds/EMERG/brightness		
+			/bin/sleep 4
+			echo 0 > /sys/class/leds/EMERG/brightness		
+			/bin/sleep 1
+			echo 255 > /sys/class/leds/IGNIT/brightness		
+			/bin/sleep 2
+			echo 0 > /sys/class/leds/IGNIT/brightness		
+		else
+			echo "DISPLAY001"
+			/root/gfa_spi -o 0x40025040 0x00000010
+			/bin/sleep 4
+			/root/gfa_spi -o 0x40025040 0x00000000
+			/bin/sleep 1
+			/root/gfa_spi -o 0x40027200 0x00000080
+			/bin/sleep 2
+			/root/gfa_spi -o 0x40027200 0x00000000
+		fi
+		#-------------------
 		/bin/sleep 5	
 		/var/GfA/gsmMuxd_Ser -p /dev/ttyO1 -m ph8 -B 921600 -b 115200 -r -w -s /dev/mux /dev/ptmx /dev/ptmx /dev/ptmx
 		;;

+ 22 - 8
board/GfA/Display001/rootfs/etc/init.d/gsmMuxd_TC65i

@@ -1,17 +1,31 @@
 #!/bin/sh
 #
+BASEBOARD=`cat /tmp/BASEBOARD`
 
 case "$1" in
 	start)
-		/root/gfa_spi -o 0x40025040 0x00000010
-		/bin/sleep 4
-		/root/gfa_spi -o 0x40025040 0x00000000
-		/bin/sleep 1
-		/root/gfa_spi -o 0x40027200 0x00000080
-		/bin/sleep 2
-		/root/gfa_spi -o 0x40027200 0x00000000
+		if [ "$BASEBOARD" == "DISPLAY002_DI4" -o "$BASEBOARD" == "DISPLAY002_RS485" ]; then
+			echo "DISPLAY002"
+			echo 255 > /sys/class/leds/EMERG/brightness		
+			/bin/sleep 4
+			echo 0 > /sys/class/leds/EMERG/brightness		
+			/bin/sleep 1
+			echo 255 > /sys/class/leds/IGNIT/brightness		
+			/bin/sleep 2
+			echo 0 > /sys/class/leds/IGNIT/brightness		
+		else
+			echo "DISPLAY001"
+			/root/gfa_spi -o 0x40025040 0x00000010
+			/bin/sleep 4
+			/root/gfa_spi -o 0x40025040 0x00000000
+			/bin/sleep 1
+			/root/gfa_spi -o 0x40027200 0x00000080
+			/bin/sleep 2
+			/root/gfa_spi -o 0x40027200 0x00000000
+		fi
+		#-------------------
 		/bin/sleep 5	
-		/var/GfA/gsmMuxd_Ser -p /dev/ttyO1 -m mc35 -B 460800 -b 115200 -r -w -s /dev/mux /dev/ptmx /dev/ptmx /dev/ptmx
+		/var/GfA/gsmMuxd_Ser -p /dev/ttyO1 -m mc35  -B 460800 -b 115200 -r -w -s /dev/mux /dev/ptmx /dev/ptmx /dev/ptmx
 		;;
 	stop)
 		killall gsmMuxd_Ser

+ 1 - 1
board/GfA/Display001/rootfs/etc/init.d/rcK

@@ -6,7 +6,7 @@ if [ "$BASEBOARD" == "DISPLAY001" ]; then
 	/root/gfa_spi -b 0
 fi
           
-if [ "$BASEBOARD" == "DISPLAY002_DI4" ]; then
+if [ "$BASEBOARD" == "DISPLAY002_DI4" -o "$BASEBOARD" == "DISPLAY002_RS485" ]; then
 	echo 0 > /sys/class/leds/backlight/brightness
 fi
 

+ 11 - 7
board/GfA/Display001/rootfs/etc/init.d/rcS

@@ -22,17 +22,21 @@ if [ "$BASEBOARD" == "DISPLAY002" ]; then
 	ANIN6=`cat /sys/bus/iio/devices/iio\\:device0/in_voltage6_raw`
 
 	if [ "$ANIN6" -gt "2000" -a "$ANIN6" -lt "2100" ]; then
-		echo "DISPLAY002_DI4" >> /tmp/BASEBOARD
+		echo "DISPLAY002_DI4" > /tmp/BASEBOARD
 	else
-		echo "--unknown--" >> /tmp/BASEBOARD	
+        if [ "$ANIN6" -gt "2680" -a "$ANIN6" -lt "2780" ]; then
+                echo "DISPLAY002_RS485" > /tmp/BASEBOARD
+        else
+		echo "--unknown--" > /tmp/BASEBOARD	
+	fi
 	fi
 else
-	echo "$BASEBOARD" >> /tmp/BASEBOARD 		
+	echo "$BASEBOARD" > /tmp/BASEBOARD 		
 fi
 BASEBOARD=`cat /tmp/BASEBOARD`
 #================================
 
-if [ "$BASEBOARD" == "DISPLAY002_DI4" ]; then
+if [ "$BASEBOARD" == "DISPLAY002_DI4" -o "$BASEBOARD" == "DISPLAY002_RS485" ]; then
 	rm /dev/rtc
 	ln -s /dev/rtc1 /dev/rtc
 	hwclock -us
@@ -82,13 +86,13 @@ done
 # clear screen and cursor off for customer logo
 echo -e "\033[3J\033[?25l\033[9;0]\033[14;0]" > /dev/tty0
 #==== set rtcdev again
-if [ "$BASEBOARD" == "DISPLAY002_DI4" ]; then
+if [ "$BASEBOARD" == "DISPLAY002_DI4" -o "$BASEBOARD" == "DISPLAY002_RS485" ]; then
 	rm /dev/rtc
 	ln -s /dev/rtc1 /dev/rtc
 fi
 
 #=== turn on backlight, depends on baseboard
-if [ "$BASEBOARD" == "DISPLAY002_DI4" ]; then
+if [ "$BASEBOARD" == "DISPLAY002_DI4" -o "$BASEBOARD" == "DISPLAY002_RS485" ]; then
 	echo 255 > /sys/class/leds/backlight/brightness
 fi
 
@@ -109,6 +113,6 @@ if [ "$BASEBOARD" == "DISPLAY001" ]; then
 	echo "$BOOTCNT ::"`date`" -- "`/root/gfa_spi -u` >> /etc/BOOTTIME 
 fi
 
-if [ "$BASEBOARD" == "DISPLAY002_DI4" ]; then
+if [ "$BASEBOARD" == "DISPLAY002_DI4" -o "$BASEBOARD" == "DISPLAY002_RS485" ]; then
 	echo "$BOOTCNT ::"`date`" -- "`hwclock -ur` >> /etc/BOOTTIME 
 fi

+ 34 - 0
board/GfA/Display001/rootfs/root/Display2To_7inch_rs485.sh

@@ -0,0 +1,34 @@
+#!/bin/sh
+umount /var/tmp/mnt 2> /dev/null
+rm -rf /var/tmp/mnt 2> /dev/null
+
+from=/var/tmp/mnt/Display002_7_rs485.dtb
+to=/var/tmp/mnt/Display001.dtb
+
+such="root=/dev/mmcblk1"
+grep -q $such /proc/cmdline
+if [ $? == 0 ]
+then
+	bootpart="/dev/mmcblk1p1"
+else
+	bootpart="/dev/mmcblk0p1"
+fi  
+
+echo "Bootpart == $bootpart"
+                
+mkdir /var/tmp/mnt
+mount $bootpart /var/tmp/mnt
+
+if [ -e $from ]
+then
+	echo "copy $from --> $to"
+	cp $from $to
+	sync
+	echo "pls. reboot !!"
+else
+	echo " no such file $from"
+fi
+
+umount /var/tmp/mnt 2> /dev/null
+rm -rf /var/tmp/mnt 2> /dev/null
+

+ 1 - 1
configs/Display001_4.4.104_rt21_Qt5.6.2_defconfig

@@ -36,7 +36,7 @@ BR2_LINUX_KERNEL_UIMAGE=y
 BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x80008000"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_USE_CUSTOM_DTS=y
-BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="../GfA/board/GfA/Display001/DTS_4.4/Display001.dts ../GfA/board/GfA/Display001/DTS_4.4/Display001_4.dts ../GfA/board/GfA/Display001/DTS_4.4/Display001_7.dts ../GfA/board/GfA/Display001/DTS_4.4/Display001_10.dts ../GfA/board/GfA/Display001/DTS_4.4/Display001_15.dts ../GfA/board/GfA/Display001/DTS_4.4/Display001_rru.dts ../GfA/board/GfA/Display001/DTS_4.4/Display001_4_nopruss.dts ../GfA/board/GfA/Display001/DTS_4.4/Display001_7_gain1.dts ../GfA/board/GfA/Display001/DTS_4.4/Display001_5.dts ../GfA/board/GfA/Display001/DTS_4.4/Display002_7.dts ../GfA/board/GfA/Display001/DTS_4.4/Display002_10.dts ../GfA/board/GfA/Display001/DTS_4.4/Display002_4.dts"
+BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="../GfA/board/GfA/Display001/DTS_4.4/Display001.dts ../GfA/board/GfA/Display001/DTS_4.4/Display001_4.dts ../GfA/board/GfA/Display001/DTS_4.4/Display001_7.dts ../GfA/board/GfA/Display001/DTS_4.4/Display001_10.dts ../GfA/board/GfA/Display001/DTS_4.4/Display001_15.dts ../GfA/board/GfA/Display001/DTS_4.4/Display001_rru.dts ../GfA/board/GfA/Display001/DTS_4.4/Display001_4_nopruss.dts ../GfA/board/GfA/Display001/DTS_4.4/Display001_7_gain1.dts ../GfA/board/GfA/Display001/DTS_4.4/Display001_5.dts ../GfA/board/GfA/Display001/DTS_4.4/Display002_7.dts ../GfA/board/GfA/Display001/DTS_4.4/Display002_10.dts ../GfA/board/GfA/Display001/DTS_4.4/Display002_4.dts ../GfA/board/GfA/Display001/DTS_4.4/Display002_7_rs485.dts"
 BR2_PACKAGE_BUSYBOX_CONFIG="../GfA/board/GfA/Display001/busybox.config"
 BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
 BR2_PACKAGE_FFMPEG_GPL=y