Browse Source

BUILD-612
- added dts and updates for Display002_7inch_rs485 board
.
.

Reinhard Russinger 7 năm trước cách đây
mục cha
commit
0e8fd3f094

+ 65 - 0
GfA-buildroot-add-7inch_rs485-dts.patch

@@ -0,0 +1,65 @@
+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 42b1ddc..2ee5587 100644
+--- a/UpdateRootfs.sh.in
++++ b/UpdateRootfs.sh.in
+@@ -53,7 +53,7 @@ cp $TMP_PATH/uImage /mnt
+ cp $TMP_PATH/*.dtb /mnt
+ 
+ #rootfs auspacken
+-tar -C / --exclude=./opt --exclude=./tmp --exclude=./etc/inittab \
++tar -C / --exclude=./tmp --exclude=./etc/inittab \
+ 	--exclude=./etc/network/interfaces \
+ 	--exclude=./etc/hosts --exclude=./etc/hostname \
+ 	--exclude=./etc/passwd --exclude=./etc/shadow \
+@@ -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

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

@@ -49,6 +49,7 @@ patch -p1 < ../GfA/GfA-buildroot-qt57_on_Kernel_4_4_104.patch
 patch -p1 < ../GfA/GfA-buildroot-qt57_on_Kernel_4_4_104_part2.patch
 patch -p1 < ../GfA/GfA-buildroot-update-change-excludes.patch
 patch -p1 < ../GfA/GfA-buildroot-add-5-7-inch-to-update.patch
+patch -p1 < ../GfA/GfA-buildroot-add-7inch_rs485-dts.patch
 #
 chmod a+x *.sh
 cp ../GfA/configs/* ./configs

+ 1 - 1
board/GfA/Display001/BUILD

@@ -1 +1 @@
-610
+612

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

@@ -0,0 +1,449 @@
+/*
+ * 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 */
+                        >;
+
+		};
+
+              	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";
+
+		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";
+	};
+};

+ 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 - 8
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,7 +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.7_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