ARM: dts: imx6dl-colibri: Move common nodes to SoM dtsi
authorMax Krummenacher <max.krummenacher@toradex.com>
Mon, 11 Apr 2022 15:22:29 +0000 (17:22 +0200)
committerShawn Guo <shawnguo@kernel.org>
Tue, 19 Apr 2022 00:43:07 +0000 (08:43 +0800)
The following two nodes define module level functionality, move
them from the carrier board dts file to the SoM file.
While at it, reorder the properties in the gpio-keys node alphabetical.

- gpio-keys defining the wakeup pin
- memory node

The atmel touchscreen node can be used on any carrier board.
Move it from the carrier board to the module-level device tree and
keep it disabled.
Set the default pinmuxing to the dedicated connector available
on newer carrier boards and rename the pinctrl labels specifying
the INT/Reset signal to a common pattern.
  pinctrl_atmel_conn - uses 107/106 pins as used on dedicated connector
  pinctrl_atmel_adap - uses 28/30 pins as used with jumper wires

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts
arch/arm/boot/dts/imx6qdl-colibri.dtsi

index 535b5c15622994364b8c60ca2b54d25d0ff45921..dff2d35e693bb26c6f207b9df46be23c22dc98c5 100644 (file)
        compatible = "toradex,colibri_imx6dl-eval-v3", "toradex,colibri_imx6dl",
                     "fsl,imx6dl";
 
-       /* Will be filled by the bootloader */
-       memory@10000000 {
-               device_type = "memory";
-               reg = <0x10000000 0>;
-       };
-
        aliases {
                i2c0 = &i2c2;
                i2c1 = &i2c3;
                clock-frequency = <16000000>;
                clock-output-names = "clk16m";
        };
-
-       gpio-keys {
-               compatible = "gpio-keys";
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_gpio_keys>;
-
-               wakeup {
-                       label = "Wake-Up";
-                       gpios = <&gpio2 22 GPIO_ACTIVE_HIGH>; /* SODIMM 45 */
-                       linux,code = <KEY_WAKEUP>;
-                       debounce-interval = <10>;
-                       wakeup-source;
-               };
-       };
 };
 
 /* Colibri SSP */
 &i2c3 {
        status = "okay";
 
-       /*
-        * Touchscreen is using SODIMM 28/30, also used for PWM<B>, PWM<C>,
-        * aka pwm2, pwm3. so if you enable touchscreen, disable the pwms
-        */
-       touchscreen@4a {
-               compatible = "atmel,maxtouch";
-               pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_pcap_1>;
-               reg = <0x4a>;
-               interrupt-parent = <&gpio1>;
-               interrupts = <9 IRQ_TYPE_EDGE_FALLING>;         /* SODIMM 28 */
-               reset-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;      /* SODIMM 30 */
-               status = "disabled";
-       };
-
        /* M41T0M6 real time clock on carrier board */
        rtc_i2c: rtc@68 {
                compatible = "st,m41t0";
                &pinctrl_weim_gpio_5 &pinctrl_weim_gpio_6
                &pinctrl_usbh_oc_1 &pinctrl_usbc_id_1
        >;
-
-       pinctrl_pcap_1: pcap1grp {
-               fsl,pins = <
-                       MX6QDL_PAD_GPIO_9__GPIO1_IO09   0x1b0b0 /* SODIMM 28 */
-                       MX6QDL_PAD_SD4_DAT2__GPIO2_IO10 0x1b0b0 /* SODIMM 30 */
-               >;
-       };
-
-       pinctrl_mxt_ts: mxttsgrp {
-               fsl,pins = <
-                       MX6QDL_PAD_EIM_CS1__GPIO2_IO24  0x130b0 /* SODIMM 107 */
-                       MX6QDL_PAD_SD2_DAT1__GPIO1_IO14 0x130b0 /* SODIMM 106 */
-               >;
-       };
 };
 
 &pwm1 {
index 3459bfb5c60ba8a7f90d798bac1b5fb5c82e1776..1c49fd3e6286c95cfcd695b2fa44d91ee5b0effe 100644 (file)
                status = "disabled";
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_gpio_keys>;
+
+               wakeup {
+                       debounce-interval = <10>;
+                       gpios = <&gpio2 22 GPIO_ACTIVE_HIGH>; /* SODIMM 45 */
+                       label = "Wake-Up";
+                       linux,code = <KEY_WAKEUP>;
+                       wakeup-source;
+               };
+       };
+
        lcd_display: disp0 {
                compatible = "fsl,imx-parallel-display";
                interface-pix-fmt = "bgr666";
                };
        };
 
+       /* Will be filled by the bootloader */
+       memory@10000000 {
+               device_type = "memory";
+               reg = <0x10000000 0>;
+       };
+
        panel_dpi: panel-dpi {
                /*
                 * edt,et057090dhu: EDT 5.7" LCD TFT
        scl-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
        sda-gpios = <&gpio1 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
        status = "disabled";
+
+       atmel_mxt_ts: touchscreen@4a {
+               compatible = "atmel,maxtouch";
+               interrupt-parent = <&gpio2>;
+               interrupts = <24 IRQ_TYPE_EDGE_FALLING>;        /* SODIMM 107 */
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_atmel_conn>;
+               reg = <0x4a>;
+               reset-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;     /* SODIMM 106 */
+               status = "disabled";
+       };
 };
 
 &ipu1_di0_disp0 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_usbh_oc_1>;
 
+       /* Atmel MXT touchsceen + Capacitive Touch Adapter */
+       /* NOTE: This pin group conflicts with pin groups
+        * pinctrl_pwm1/pinctrl_pwm4. Don't use them simultaneously.
+        */
+       pinctrl_atmel_adap: atmeladaptergrp {
+               fsl,pins = <
+                       MX6QDL_PAD_GPIO_9__GPIO1_IO09   0xb0b1  /* SODIMM  28 */
+                       MX6QDL_PAD_SD4_DAT2__GPIO2_IO10 0xb0b1  /* SODIMM  30 */
+               >;
+       };
+
+       /* Atmel MXT touchsceen + boards with built-in Capacitive Touch Connector */
+       /* NOTE: This pin group conflicts with pin groups pinctrl_weim_cs1 and
+        * pinctrl_weim_cs2. Don't use them simultaneously.
+        */
+       pinctrl_atmel_conn: atmelconnectorgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_CS1__GPIO2_IO24  0xb0b1  /* SODIMM_107 */
+                       MX6QDL_PAD_SD2_DAT1__GPIO1_IO14 0xb0b1  /* SODIMM_106 */
+               >;
+       };
+
        pinctrl_audmux: audmuxgrp {
                fsl,pins = <
                        MX6QDL_PAD_KEY_COL0__AUD5_TXC   0x130b0