瀏覽代碼

WRK:
- 5" Display anpassungen
- warten auf fertigstellen REST api
- Beschreibung erstellen

Reinhard Russinger 7 年之前
父節點
當前提交
efb4ae1bb3

+ 1 - 1
board/GfA/Display001/BUILD

@@ -1 +1 @@
-603
+607

+ 163 - 9
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,23 +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>;
+	};
+};
 
 
-&i2c2 {
+&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>;*/
+	};
+
         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 0>;
+                interrupts = <1 2>;
                 reset-gpios = <&gpio3 21 1>;
         };
 
@@ -220,6 +262,7 @@
                 compatible = "microchip,mcp7940x";
                 reg = <0x6f>;
                 };
+	
 };
 
 
@@ -346,8 +389,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";

+ 3 - 3
board/GfA/Display001/Display001_4.4.104_rt_defconfig

@@ -1672,7 +1672,7 @@ CONFIG_TI_DAC7512=m
 # CONFIG_LATTICE_ECP3_CONFIG is not set
 CONFIG_SRAM=y
 CONFIG_VEXPRESS_SYSCFG=y
-CONFIG_BONE_CAPEMGR=y
+# CONFIG_BONE_CAPEMGR is not set
 # CONFIG_DEV_OVERLAYMGR is not set
 CONFIG_TIEQEP=m
 CONFIG_C2PORT=m
@@ -1727,7 +1727,7 @@ CONFIG_ALTERA_STAPL=m
 # Argus cape driver for beaglebone black
 #
 CONFIG_CAPE_BONE_ARGUS=y
-CONFIG_BEAGLEBONE_PINMUX_HELPER=y
+# CONFIG_BEAGLEBONE_PINMUX_HELPER is not set
 # CONFIG_ECHO is not set
 # CONFIG_CXL_BASE is not set
 # CONFIG_CXL_KERNEL_API is not set
@@ -2263,7 +2263,7 @@ CONFIG_KEYBOARD_ATKBD=y
 CONFIG_KEYBOARD_QT1070=m
 CONFIG_KEYBOARD_QT2160=m
 CONFIG_KEYBOARD_LKKBD=m
-CONFIG_KEYBOARD_GPIO=y
+CONFIG_KEYBOARD_GPIO=m
 CONFIG_KEYBOARD_GPIO_POLLED=m
 CONFIG_KEYBOARD_TCA6416=m
 CONFIG_KEYBOARD_TCA8418=m

+ 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");

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

@@ -112,3 +112,4 @@ fi
 if [ "$BASEBOARD" == "DISPLAY002_DI4" ]; then
 	echo "$BOOTCNT ::"`date`" -- "`hwclock -ur` >> /etc/BOOTTIME 
 fi
+#-----------------------------

+ 0 - 2
board/GfA/Display001/rootfs/etc/profile

@@ -8,8 +8,6 @@ export PATH=\
 /usr/bin/X11:\
 /usr/local/bin
 
-export TSLIB_TSDEVICE=/dev/input/event1
-
 # If running interactively, then:
 if [ "$PS1" ]; then
 

+ 4 - 0
configs/Display001_4.4.104_rt21_Qt5.7_defconfig

@@ -98,6 +98,7 @@ BR2_PACKAGE_FLASHBENCH=y
 BR2_PACKAGE_MAKEDEVS=y
 BR2_PACKAGE_MMC_UTILS=y
 BR2_PACKAGE_DEJAVU=y
+BR2_PACKAGE_FONT_AWESOME=y
 BR2_PACKAGE_DIRECTFB=y
 BR2_PACKAGE_DIRECTFB_DIVINE=y
 BR2_PACKAGE_DIRECTFB_SAWMAN=y
@@ -248,6 +249,7 @@ BR2_PACKAGE_PYTHON_SSL=y
 BR2_PACKAGE_PYTHON_SQLITE=y
 BR2_PACKAGE_PYTHON_PYEXPAT=y
 BR2_PACKAGE_PYTHON_HASHLIB=y
+BR2_PACKAGE_PYTHON_PAHO_MQTT=y
 BR2_PACKAGE_PYTHON_PYUDEV=y
 BR2_PACKAGE_TCL=y
 BR2_PACKAGE_EXPECT=y
@@ -319,6 +321,7 @@ BR2_PACKAGE_NEON_SSL=y
 BR2_PACKAGE_NEON_LIBXML2=y
 BR2_PACKAGE_NSS_PAM_LDAPD=y
 BR2_PACKAGE_NSS_PAM_LDAPD_UTILITIES=y
+BR2_PACKAGE_PAHO_MQTT_C=y
 BR2_PACKAGE_BOOST_ATOMIC=y
 BR2_PACKAGE_BOOST_CHRONO=y
 BR2_PACKAGE_BOOST_CONTAINER=y
@@ -394,6 +397,7 @@ BR2_PACKAGE_IPSEC_TOOLS_READLINE=y
 BR2_PACKAGE_IPTABLES=y
 BR2_PACKAGE_IW=y
 BR2_PACKAGE_MINIDLNA=y
+BR2_PACKAGE_MOSQUITTO=y
 BR2_PACKAGE_NETPLUG=y
 BR2_PACKAGE_OPENSSH=y
 BR2_PACKAGE_OPENVPN=y