Explorar el Código

BUILD 704, no bitbang

Reinhard Russinger hace 8 meses
padre
commit
bda3c665aa

+ 1 - 1
board/GfA/Display001/BUILD

@@ -1 +1 @@
-703
+704

+ 22 - 31
board/GfA/Display001/DTS_4.4/Display001.dts

@@ -97,10 +97,10 @@
 		};
 
 
-                i2c_gpio_pins: pinmux_i2c_gpio_pins {
+                i2c2_pins: pinmux_i2c2_pins {
                         pinctrl-single,pins = <
-                                0x150 (PIN_INPUT | MUX_MODE7)    /* spi0_sclk.i2c2_sda */
-                                0x154 (PIN_INPUT | MUX_MODE7)    /* spi0_d0.i2c2_scl */
+                                0x150 (PIN_INPUT | MUX_MODE2)    /* spi0_sclk.i2c2_sda */
+                                0x154 (PIN_INPUT | MUX_MODE2)    /* spi0_d0.i2c2_scl */
                         >;
                 };
 
@@ -200,36 +200,27 @@
 	};
 };
 
-/ {
-i2c@3 {
-        compatible = "i2c-gpio";
-        pinctrl-names = "default";
-        pinctrl-0 = <&i2c_gpio_pins>;
-        status = "okay";
+&i2c2 {
+    pinctrl-names = "default";
+    pinctrl-0 = <&i2c2_pins>;
+    status = "okay";
+    clock-frequency = <400000>;
+};
 
-        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 0>;
-                        reset-gpios = <&gpio3 21 1>;
-                };
+&i2c2 {
+    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>;
+        };
 
-        mcp7940x: rtc@6f {
-                compatible = "microchip,mcp7940x";
-                reg = <0x6f>;
-                };
+    mcp7940x: rtc@6f {
+        compatible = "microchip,mcp7940x";
+        reg = <0x6f>;
         };
 };
 

+ 3 - 38
board/GfA/Display001/DTS_4.4/Display001_5.dts

@@ -96,26 +96,10 @@
 			>;
 		};
 
-
-             /* 	i2c1_pins: pinmux_i2c1_pins { 
-                        pinctrl-single,pins = <
-                                0x158 (PIN_INPUT | MUX_MODE2) */   /* spi0_d1.i2c1_sda */
-                              /*  0x15c (PIN_INPUT | MUX_MODE2) */    /* spi0_cs0.i2c1_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 */
+			0x150 (PIN_INPUT | MUX_MODE2)    /* spi0_sclk.i2c2_sda */
+			0x154 (PIN_INPUT | MUX_MODE2)    /* spi0_d0.i2c2_scl */
 			>;
 		};
 
@@ -215,33 +199,14 @@
 	};
 };
 
-/*
 &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 {
+&i2c2 {
 	pca9538_0: gpio@70 {
 		compatible = "nxp,pca9538";
 		reg = <0x70>;

+ 23 - 32
board/GfA/Display001/DTS_4.4/Display001_7.dts

@@ -97,10 +97,10 @@
 		};
 
 
-                i2c_gpio_pins: pinmux_i2c_gpio_pins {
+                i2c2_pins: pinmux_i2c2_pins {
                         pinctrl-single,pins = <
-                                0x150 (PIN_INPUT | MUX_MODE7)    /* spi0_sclk.i2c2_sda */
-                                0x154 (PIN_INPUT | MUX_MODE7)    /* spi0_d0.i2c2_scl */
+                                0x150 (PIN_INPUT | MUX_MODE2)    /* spi0_sclk.i2c2_sda */
+                                0x154 (PIN_INPUT | MUX_MODE2)    /* spi0_d0.i2c2_scl */
                         >;
                 };
 
@@ -200,36 +200,27 @@
 	};
 };
 
-/ {
-i2c@3 {
-        compatible = "i2c-gpio";
-        pinctrl-names = "default";
-        pinctrl-0 = <&i2c_gpio_pins>;
-        status = "okay";
+&i2c2 {
+    pinctrl-names = "default";
+    pinctrl-0 = <&i2c2_pins>;
+    status = "okay";
+    clock-frequency = <400000>;
+};
 
-        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 0>;
-                        reset-gpios = <&gpio3 21 1>;
-                };
+&i2c2 {
+    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>;
+        };
 
-        mcp7940x: rtc@6f {
-                compatible = "microchip,mcp7940x";
-                reg = <0x6f>;
-                };
+    mcp7940x: rtc@6f {
+        compatible = "microchip,mcp7940x";
+        reg = <0x6f>;
         };
 };
 
@@ -361,7 +352,7 @@ i2c@3 {
 / {
 	vendorinfo {
 		vendor_name = "GfA Display001";
-		display_dtb = "Display001_7.dtb";
+		display_dtb = "Display001_7_i2c2.dtb";
 		display_physical_width = "153"; /* in mm */
 		display_physical_height = "92"; /* in mm */
 	};

+ 19 - 28
board/GfA/Display001/DTS_4.4/Display001_7_30Hz.dts

@@ -200,36 +200,27 @@
 	};
 };
 
-/ {
-i2c@3 {
-        compatible = "i2c-gpio";
-        pinctrl-names = "default";
-        pinctrl-0 = <&i2c_gpio_pins>;
-        status = "okay";
+&i2c2 {
+    pinctrl-names = "default";
+    pinctrl-0 = <&i2c2_pins>;
+    status = "okay";
+    clock-frequency = <400000>;
+};
 
-        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 0>;
-                        reset-gpios = <&gpio3 21 1>;
-                };
+&i2c2 {
+    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>;
+        };
 
-        mcp7940x: rtc@6f {
-                compatible = "microchip,mcp7940x";
-                reg = <0x6f>;
-                };
+    mcp7940x: rtc@6f {
+        compatible = "microchip,mcp7940x";
+        reg = <0x6f>;
         };
 };
 

+ 5 - 16
board/GfA/Display001/DTS_4.4/Display001_7_gain1.dts

@@ -200,21 +200,11 @@
 	};
 };
 
-/ {
-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>;
+&i2c2 {
+    pinctrl-names = "default";
+    pinctrl-0 = <&i2c2_pins>;
+    status = "okay";
+    clock-frequency = <400000>;
 
         polytouch: edt-ft5x06@38 {
                         compatible = "edt,edt-ft5406", "edt,edt-ft5x06";
@@ -230,7 +220,6 @@ i2c@3 {
                 compatible = "microchip,mcp7940x";
                 reg = <0x6f>;
                 };
-        };
 };
 
 &spi1 {

+ 17 - 16
board/GfA/Display001/DTS_4.4/Display002_7.dts

@@ -197,21 +197,24 @@
 	};
 };
 
-/ {
-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>;
+&i2c2 {
+    pinctrl-names = "default";
+    pinctrl-0 = <&i2c2_pins>;
+    status = "okay";
+    clock-frequency = <400000>;
+};
+
+&i2c2 {
+    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>;
+        };
 
         polytouch: edt-ft5x06@38 {
                         compatible = "edt,edt-ft5406", "edt,edt-ft5x06";
@@ -239,8 +242,6 @@ i2c@3 {
 		compatible = "microchip,mcp7940x";
 		reg = <0x6f>;
 		};
-        };
-
 };
 
 &spi1 {

+ 9 - 19
board/GfA/Display001/DTS_4.4/Display002_7_rs485.dts

@@ -99,8 +99,8 @@
 
                 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 */
+                                0x150 (PIN_INPUT | MUX_MODE2)    /* spi0_sclk.i2c2_sda */
+                                0x154 (PIN_INPUT | MUX_MODE2)    /* spi0_d0.i2c2_scl */
                         >;
                 };
 
@@ -212,22 +212,14 @@
 	};
 };
 
-/ {
-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>;
+&i2c2 {
+    pinctrl-names = "default";
+    pinctrl-0 = <&i2c2_pins>;
+    status = "okay";
+    clock-frequency = <400000>;
+};
 
+&i2c2 {
         polytouch: edt-ft5x06@38 {
                         compatible = "edt,edt-ft5406", "edt,edt-ft5x06";
                         reg = <0x38>;
@@ -254,8 +246,6 @@ i2c@3 {
 		compatible = "microchip,mcp7940x";
 		reg = <0x6f>;
 		};
-        };
-
 };
 
 &spi1 {