Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright 2013-2017 Lothar Waßmann <LW@KARO-electronics.de>
0003  *
0004  * This file is dual-licensed: you can use it either under the terms
0005  * of the GPL or the X11 license, at your option. Note that this dual
0006  * licensing only applies to this file, and not this project as a
0007  * whole.
0008  *
0009  *  a) This file is free software; you can redistribute it and/or
0010  *     modify it under the terms of the GNU General Public License
0011  *     version 2 as published by the Free Software Foundation.
0012  *
0013  *     This file is distributed in the hope that it will be useful,
0014  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
0015  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0016  *     GNU General Public License for more details.
0017  *
0018  * Or, alternatively,
0019  *
0020  *  b) Permission is hereby granted, free of charge, to any person
0021  *     obtaining a copy of this software and associated documentation
0022  *     files (the "Software"), to deal in the Software without
0023  *     restriction, including without limitation the rights to use,
0024  *     copy, modify, merge, publish, distribute, sublicense, and/or
0025  *     sell copies of the Software, and to permit persons to whom the
0026  *     Software is furnished to do so, subject to the following
0027  *     conditions:
0028  *
0029  *     The above copyright notice and this permission notice shall be
0030  *     included in all copies or substantial portions of the Software.
0031  *
0032  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0033  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0034  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0035  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0036  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0037  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0038  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0039  *     OTHER DEALINGS IN THE SOFTWARE.
0040  */
0041 
0042 /dts-v1/;
0043 #include "imx53-tx53.dtsi"
0044 #include <dt-bindings/input/input.h>
0045 #include <dt-bindings/interrupt-controller/irq.h>
0046 #include <dt-bindings/pwm/pwm.h>
0047 
0048 / {
0049         model = "Ka-Ro electronics TX53 module (LCD)";
0050         compatible = "karo,tx53", "fsl,imx53";
0051 
0052         aliases {
0053                 display = &display;
0054         };
0055 
0056         display: disp0 {
0057                 compatible = "fsl,imx-parallel-display";
0058                 interface-pix-fmt = "rgb24";
0059                 pinctrl-names = "default";
0060                 pinctrl-0 = <&pinctrl_rgb24_vga1>;
0061                 status = "okay";
0062 
0063                 port {
0064                         display0_in: endpoint {
0065                                 remote-endpoint = <&ipu_di0_disp0>;
0066                         };
0067                 };
0068 
0069                 display-timings {
0070                         VGA {
0071                                 clock-frequency = <25200000>;
0072                                 hactive = <640>;
0073                                 vactive = <480>;
0074                                 hback-porch = <48>;
0075                                 hsync-len = <96>;
0076                                 hfront-porch = <16>;
0077                                 vback-porch = <31>;
0078                                 vsync-len = <2>;
0079                                 vfront-porch = <12>;
0080                                 hsync-active = <0>;
0081                                 vsync-active = <0>;
0082                                 de-active = <1>;
0083                                 pixelclk-active = <0>;
0084                         };
0085 
0086                         ETV570 {
0087                                 clock-frequency = <25200000>;
0088                                 hactive = <640>;
0089                                 vactive = <480>;
0090                                 hback-porch = <114>;
0091                                 hsync-len = <30>;
0092                                 hfront-porch = <16>;
0093                                 vback-porch = <32>;
0094                                 vsync-len = <3>;
0095                                 vfront-porch = <10>;
0096                                 hsync-active = <0>;
0097                                 vsync-active = <0>;
0098                                 de-active = <1>;
0099                                 pixelclk-active = <0>;
0100                         };
0101 
0102                         ET0350 {
0103                                 clock-frequency = <6413760>;
0104                                 hactive = <320>;
0105                                 vactive = <240>;
0106                                 hback-porch = <34>;
0107                                 hsync-len = <34>;
0108                                 hfront-porch = <20>;
0109                                 vback-porch = <15>;
0110                                 vsync-len = <3>;
0111                                 vfront-porch = <4>;
0112                                 hsync-active = <0>;
0113                                 vsync-active = <0>;
0114                                 de-active = <1>;
0115                                 pixelclk-active = <0>;
0116                         };
0117 
0118                         ET0430 {
0119                                 clock-frequency = <9009000>;
0120                                 hactive = <480>;
0121                                 vactive = <272>;
0122                                 hback-porch = <2>;
0123                                 hsync-len = <41>;
0124                                 hfront-porch = <2>;
0125                                 vback-porch = <2>;
0126                                 vsync-len = <10>;
0127                                 vfront-porch = <2>;
0128                                 hsync-active = <0>;
0129                                 vsync-active = <0>;
0130                                 de-active = <1>;
0131                                 pixelclk-active = <1>;
0132                         };
0133 
0134                         ET0500 {
0135                                 clock-frequency = <33264000>;
0136                                 hactive = <800>;
0137                                 vactive = <480>;
0138                                 hback-porch = <88>;
0139                                 hsync-len = <128>;
0140                                 hfront-porch = <40>;
0141                                 vback-porch = <33>;
0142                                 vsync-len = <2>;
0143                                 vfront-porch = <10>;
0144                                 hsync-active = <0>;
0145                                 vsync-active = <0>;
0146                                 de-active = <1>;
0147                                 pixelclk-active = <0>;
0148                         };
0149 
0150                         ET0700 { /* same as ET0500 */
0151                                 clock-frequency = <33264000>;
0152                                 hactive = <800>;
0153                                 vactive = <480>;
0154                                 hback-porch = <88>;
0155                                 hsync-len = <128>;
0156                                 hfront-porch = <40>;
0157                                 vback-porch = <33>;
0158                                 vsync-len = <2>;
0159                                 vfront-porch = <10>;
0160                                 hsync-active = <0>;
0161                                 vsync-active = <0>;
0162                                 de-active = <1>;
0163                                 pixelclk-active = <0>;
0164                         };
0165 
0166                         ETQ570 {
0167                                 clock-frequency = <6596040>;
0168                                 hactive = <320>;
0169                                 vactive = <240>;
0170                                 hback-porch = <38>;
0171                                 hsync-len = <30>;
0172                                 hfront-porch = <30>;
0173                                 vback-porch = <16>;
0174                                 vsync-len = <3>;
0175                                 vfront-porch = <4>;
0176                                 hsync-active = <0>;
0177                                 vsync-active = <0>;
0178                                 de-active = <1>;
0179                                 pixelclk-active = <0>;
0180                         };
0181                 };
0182         };
0183 
0184         backlight: backlight {
0185                 compatible = "pwm-backlight";
0186                 pwms = <&pwm2 0 500000 PWM_POLARITY_INVERTED>;
0187                 power-supply = <&reg_3v3>;
0188                 brightness-levels = <
0189                           0  1  2  3  4  5  6  7  8  9
0190                          10 11 12 13 14 15 16 17 18 19
0191                          20 21 22 23 24 25 26 27 28 29
0192                          30 31 32 33 34 35 36 37 38 39
0193                          40 41 42 43 44 45 46 47 48 49
0194                          50 51 52 53 54 55 56 57 58 59
0195                          60 61 62 63 64 65 66 67 68 69
0196                          70 71 72 73 74 75 76 77 78 79
0197                          80 81 82 83 84 85 86 87 88 89
0198                          90 91 92 93 94 95 96 97 98 99
0199                         100
0200                 >;
0201                 default-brightness-level = <50>;
0202         };
0203 
0204         reg_lcd_pwr: regulator-lcd-pwr {
0205                 compatible = "regulator-fixed";
0206                 regulator-name = "LCD POWER";
0207                 regulator-min-microvolt = <3300000>;
0208                 regulator-max-microvolt = <3300000>;
0209                 gpio = <&gpio2 31 GPIO_ACTIVE_HIGH>;
0210                 enable-active-high;
0211                 regulator-boot-on;
0212         };
0213 
0214         reg_lcd_reset: regulator-lcd-reset {
0215                 compatible = "regulator-fixed";
0216                 regulator-name = "LCD RESET";
0217                 regulator-min-microvolt = <3300000>;
0218                 regulator-max-microvolt = <3300000>;
0219                 gpio = <&gpio3 29 GPIO_ACTIVE_HIGH>;
0220                 enable-active-high;
0221                 regulator-boot-on;
0222         };
0223 };
0224 
0225 &i2c3 {
0226         pinctrl-names = "default";
0227         pinctrl-0 = <&pinctrl_i2c3>;
0228         status = "okay";
0229 
0230         sgtl5000: codec@a {
0231                 compatible = "fsl,sgtl5000";
0232                 reg = <0x0a>;
0233                 #sound-dai-cells = <0>;
0234                 VDDA-supply = <&reg_2v5>;
0235                 VDDIO-supply = <&reg_3v3>;
0236                 clocks = <&mclk>;
0237         };
0238 
0239         polytouch: edt-ft5x06@38 {
0240                 compatible = "edt,edt-ft5x06";
0241                 reg = <0x38>;
0242                 pinctrl-names = "default";
0243                 pinctrl-0 = <&pinctrl_edt_ft5x06_1>;
0244                 interrupt-parent = <&gpio6>;
0245                 interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
0246                 reset-gpios = <&gpio2 22 GPIO_ACTIVE_LOW>;
0247                 wake-gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
0248                 wakeup-source;
0249         };
0250 
0251         touchscreen: tsc2007@48 {
0252                 compatible = "ti,tsc2007";
0253                 reg = <0x48>;
0254                 pinctrl-names = "default";
0255                 pinctrl-0 = <&pinctrl_tsc2007>;
0256                 interrupt-parent = <&gpio3>;
0257                 interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
0258                 gpios = <&gpio3 26 GPIO_ACTIVE_LOW>;
0259                 ti,x-plate-ohms = <660>;
0260                 wakeup-source;
0261         };
0262 };
0263 
0264 &iomuxc {
0265         imx53-tx53-x03x {
0266                 pinctrl_edt_ft5x06_1: edt-ft5x06grp-1 {
0267                         fsl,pins = <
0268                                 MX53_PAD_NANDF_CS2__GPIO6_15 0x1f0 /* Interrupt */
0269                                 MX53_PAD_EIM_A16__GPIO2_22   0x04 /* Reset */
0270                                 MX53_PAD_EIM_A17__GPIO2_21   0x04 /* Wake */
0271                         >;
0272                 };
0273 
0274                 pinctrl_kpp: kppgrp {
0275                         fsl,pins = <
0276                                 MX53_PAD_GPIO_9__KPP_COL_6 0x1f4
0277                                 MX53_PAD_GPIO_4__KPP_COL_7 0x1f4
0278                                 MX53_PAD_KEY_COL2__KPP_COL_2 0x1f4
0279                                 MX53_PAD_KEY_COL3__KPP_COL_3 0x1f4
0280                                 MX53_PAD_GPIO_2__KPP_ROW_6 0x1f4
0281                                 MX53_PAD_GPIO_5__KPP_ROW_7 0x1f4
0282                                 MX53_PAD_KEY_ROW2__KPP_ROW_2 0x1f4
0283                                 MX53_PAD_KEY_ROW3__KPP_ROW_3 0x1f4
0284                         >;
0285                 };
0286 
0287                 pinctrl_rgb24_vga1: rgb24-vgagrp1 {
0288                         fsl,pins = <
0289                                 MX53_PAD_DI0_DISP_CLK__IPU_DI0_DISP_CLK         0x5
0290                                 MX53_PAD_DI0_PIN15__IPU_DI0_PIN15               0x5
0291                                 MX53_PAD_DI0_PIN2__IPU_DI0_PIN2                 0x5
0292                                 MX53_PAD_DI0_PIN3__IPU_DI0_PIN3                 0x5
0293                                 MX53_PAD_DISP0_DAT0__IPU_DISP0_DAT_0            0x5
0294                                 MX53_PAD_DISP0_DAT1__IPU_DISP0_DAT_1            0x5
0295                                 MX53_PAD_DISP0_DAT2__IPU_DISP0_DAT_2            0x5
0296                                 MX53_PAD_DISP0_DAT3__IPU_DISP0_DAT_3            0x5
0297                                 MX53_PAD_DISP0_DAT4__IPU_DISP0_DAT_4            0x5
0298                                 MX53_PAD_DISP0_DAT5__IPU_DISP0_DAT_5            0x5
0299                                 MX53_PAD_DISP0_DAT6__IPU_DISP0_DAT_6            0x5
0300                                 MX53_PAD_DISP0_DAT7__IPU_DISP0_DAT_7            0x5
0301                                 MX53_PAD_DISP0_DAT8__IPU_DISP0_DAT_8            0x5
0302                                 MX53_PAD_DISP0_DAT9__IPU_DISP0_DAT_9            0x5
0303                                 MX53_PAD_DISP0_DAT10__IPU_DISP0_DAT_10          0x5
0304                                 MX53_PAD_DISP0_DAT11__IPU_DISP0_DAT_11          0x5
0305                                 MX53_PAD_DISP0_DAT12__IPU_DISP0_DAT_12          0x5
0306                                 MX53_PAD_DISP0_DAT13__IPU_DISP0_DAT_13          0x5
0307                                 MX53_PAD_DISP0_DAT14__IPU_DISP0_DAT_14          0x5
0308                                 MX53_PAD_DISP0_DAT15__IPU_DISP0_DAT_15          0x5
0309                                 MX53_PAD_DISP0_DAT16__IPU_DISP0_DAT_16          0x5
0310                                 MX53_PAD_DISP0_DAT17__IPU_DISP0_DAT_17          0x5
0311                                 MX53_PAD_DISP0_DAT18__IPU_DISP0_DAT_18          0x5
0312                                 MX53_PAD_DISP0_DAT19__IPU_DISP0_DAT_19          0x5
0313                                 MX53_PAD_DISP0_DAT20__IPU_DISP0_DAT_20          0x5
0314                                 MX53_PAD_DISP0_DAT21__IPU_DISP0_DAT_21          0x5
0315                                 MX53_PAD_DISP0_DAT22__IPU_DISP0_DAT_22          0x5
0316                                 MX53_PAD_DISP0_DAT23__IPU_DISP0_DAT_23          0x5
0317                         >;
0318                 };
0319 
0320                 pinctrl_tsc2007: tsc2007grp {
0321                         fsl,pins = <
0322                                 MX53_PAD_EIM_D26__GPIO3_26 0x1f0 /* Interrupt */
0323                         >;
0324                 };
0325         };
0326 };
0327 
0328 &ipu_di0_disp0 {
0329         remote-endpoint = <&display0_in>;
0330 };
0331 
0332 &kpp {
0333         pinctrl-names = "default";
0334         pinctrl-0 = <&pinctrl_kpp>;
0335         /* sample keymap */
0336         /* row/col 0,1 are mapped to KPP row/col 6,7 */
0337         linux,keymap = <
0338                 MATRIX_KEY(6, 6, KEY_POWER)
0339                 MATRIX_KEY(6, 7, KEY_KP0)
0340                 MATRIX_KEY(6, 2, KEY_KP1)
0341                 MATRIX_KEY(6, 3, KEY_KP2)
0342                 MATRIX_KEY(7, 6, KEY_KP3)
0343                 MATRIX_KEY(7, 7, KEY_KP4)
0344                 MATRIX_KEY(7, 2, KEY_KP5)
0345                 MATRIX_KEY(7, 3, KEY_KP6)
0346                 MATRIX_KEY(2, 6, KEY_KP7)
0347                 MATRIX_KEY(2, 7, KEY_KP8)
0348                 MATRIX_KEY(2, 2, KEY_KP9)
0349         >;
0350         status = "okay";
0351 };