imx6ull-somdevices.dts: Added LCD, ecspi2, changed UART2 pins and corrected indent.
authorJosep Orga <jorga@somdevices.com>
Wed, 27 Nov 2019 16:58:37 +0000 (17:58 +0100)
committerJosep Orga <jorga@somdevices.com>
Wed, 27 Nov 2019 16:58:37 +0000 (17:58 +0100)
spidev: Added spidev not to have kernel warnings.

Signed-off-by: Josep Orga <jorga@somdevices.com>
arch/arm/boot/dts/imx6ull-somdevices.dts
drivers/spi/spidev.c

index 021f05a..1f890f7 100644 (file)
@@ -6,9 +6,11 @@
  * published by the Free Software Foundation.
  */
 /* #define DUAL_ETH */
+/* #define BIG_LCD */
 /dts-v1/;
 
 #define DUAL_ETH
+#define BIG_LCD
 
 #include <dt-bindings/input/input.h>
 #include "imx6ull.dtsi"
@@ -40,7 +42,7 @@
 
        backlight {
                compatible = "pwm-backlight";
-               pwms = <&pwm1 0 5000000>;
+               pwms = <&pwm3 0 2000000>;
                brightness-levels = <0 4 8 16 32 64 128 255>;
                default-brightness-level = <6>;
                status = "okay";
        };
 };
 
+&ecspi2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_ecspi2>;
+       fsl,spi-num-chipselects = <1>;
+       cs-gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+
+       spidev0: spi@0 {
+               compatible = "spidev";
+               reg = <0>;
+               spi-max-frequency = <60000000>;
+       };
+};
+
 &iomuxc {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_hog_1>;
                >;
        };
 
-       pinctrl_pwm1: pwm1grp {
+       pinctrl_pwm3: pwm3grp {
                fsl,pins = <
-                       MX6UL_PAD_GPIO1_IO08__PWM1_OUT   0x110b0
+                       MX6UL_PAD_GPIO1_IO04__PWM3_OUT   0x110b0
                >;
        };
 
                fsl,pins = <
                        MX6UL_PAD_UART2_TX_DATA__UART2_DCE_TX   0x1b0b1
                        MX6UL_PAD_UART2_RX_DATA__UART2_DCE_RX   0x1b0b1
-                       MX6UL_PAD_UART3_RX_DATA__UART2_DCE_RTS  0x1b0b1
-                       MX6UL_PAD_UART3_TX_DATA__UART2_DCE_CTS  0x1b0b1
+                       MX6UL_PAD_UART2_RTS_B__UART2_DCE_RTS    0x1b0b1
+                       MX6UL_PAD_UART2_CTS_B__UART2_DCE_CTS    0x1b0b1
                >;
        };
 
                fsl,pins = <
                        MX6UL_PAD_UART2_TX_DATA__UART2_DTE_RX   0x1b0b1
                        MX6UL_PAD_UART2_RX_DATA__UART2_DTE_TX   0x1b0b1
-                       MX6UL_PAD_UART3_RX_DATA__UART2_DTE_CTS  0x1b0b1
-                       MX6UL_PAD_UART3_TX_DATA__UART2_DTE_RTS  0x1b0b1
+                       MX6UL_PAD_UART2_RTS_B__UART2_DTE_CTS    0x1b0b1
+                       MX6UL_PAD_UART2_CTS_B__UART2_DTE_RTS    0x1b0b1
                >;
        };
 
                        MX6UL_PAD_LCD_RESET__WDOG1_WDOG_ANY    0x30b0
                >;
        };
+
+       pinctrl_ecspi2: ecspi2grp {
+               fsl,pins = <
+                       MX6UL_PAD_UART5_TX_DATA__ECSPI2_MOSI    0x0b0b0 /* CSPI_MOSI */
+                       MX6UL_PAD_UART5_RX_DATA__ECSPI2_MISO    0x0b0b0 /* CSPI_MISO */
+                       MX6UL_PAD_UART4_TX_DATA__ECSPI2_SCLK    0x0b0b0 /* CSPI_SCLK */
+                       MX6UL_PAD_UART4_RX_DATA__GPIO1_IO29     0x0b0b0         /* CSPI_SS */
+               >;
+       };
 };
 
 &iomuxc_snvs {
        pinctrl-names = "default_snvs";
-        pinctrl-0 = <&pinctrl_hog_2>;
-        imx6ul-evk {
+       pinctrl-0 = <&pinctrl_hog_2>;
+       imx6ul-evk {
                pinctrl_hog_2: hoggrp-2 {
                        fsl,pins = <
                                MX6ULL_PAD_SNVS_TAMPER0__GPIO5_IO00      0x80000000
                                                        MX6ULL_PAD_SNVS_TAMPER7__GPIO5_IO07     0x10071
                                        >;
                        };
-               };
+       };
 };
 
 
 &lcdif {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_lcdif_dat
-                    &pinctrl_lcdif_ctrl
-                    &pinctrl_lcdif_reset>;
+                                &pinctrl_lcdif_ctrl
+                                &pinctrl_lcdif_reset>;
        display = <&display0>;
        status = "okay";
 
                display-timings {
                        native-mode = <&timing0>;
                        timing0: timing0 {
-                       clock-frequency = <9200000>;
-                       hactive = <480>;
-                       vactive = <272>;
-                       hfront-porch = <8>;
-                       hback-porch = <4>;
-                       hsync-len = <41>;
-                       vback-porch = <2>;
-                       vfront-porch = <4>;
-                       vsync-len = <10>;
-
-                       hsync-active = <0>;
-                       vsync-active = <0>;
-                       de-active = <1>;
-                       pixelclk-active = <0>;
+                       #ifdef BIG_LCD
+                               //7INCH LCD
+                               clock-frequency = <33000000>;
+                               hactive = <800>;
+                               vactive = <480>;
+                               hfront-porch = <210>;
+                               hback-porch = <30>;
+                               hsync-len = <16>;
+                               vback-porch = <13>;
+                               vfront-porch = <22>;
+                               vsync-len = <10>;
+                       #else
+                               //4INCH LCD
+                               clock-frequency = <9000000>;
+                               hactive = <480>;
+                               vactive = <272>;
+                               hfront-porch = <2>;
+                               hback-porch = <43>;
+                               hsync-len = <0>;
+                               vback-porch = <12>;
+                               vfront-porch = <1>;
+                               vsync-len = <0>;
+                       #endif
+
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <0>;
                        };
                };
        };
 };
 
-&pwm1 {
+&pwm3 {
        pinctrl-names = "default";
-       pinctrl-0 = <&pinctrl_pwm1>;
+       pinctrl-0 = <&pinctrl_pwm3>;
        status = "okay";
 };
 
index 2e05046..d780491 100644 (file)
@@ -696,6 +696,7 @@ static struct class *spidev_class;
 static const struct of_device_id spidev_dt_ids[] = {
        { .compatible = "rohm,dh2228fv" },
        { .compatible = "lineartechnology,ltc2488" },
+       { .compatible = "spidev" },
        {},
 };
 MODULE_DEVICE_TABLE(of, spidev_dt_ids);