0001 /*
0002 * Copyright 2013 CompuLab Ltd.
0003 * Copyright 2016 Christopher Spinrath
0004 *
0005 * Based on the devicetree distributed with the vendor kernel for the
0006 * Utilite Pro:
0007 * Copyright 2013 CompuLab Ltd.
0008 * Author: Valentin Raevsky <valentin@compulab.co.il>
0009 *
0010 * This file is dual-licensed: you can use it either under the terms
0011 * of the GPL or the X11 license, at your option. Note that this dual
0012 * licensing only applies to this file, and not this project as a
0013 * whole.
0014 *
0015 * a) This file is free software; you can redistribute it and/or
0016 * modify it under the terms of the GNU General Public License as
0017 * published by the Free Software Foundation; either version 2 of the
0018 * License, or (at your option) any later version.
0019 *
0020 * This file is distributed in the hope that it will be useful,
0021 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0022 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0023 * GNU General Public License for more details.
0024 *
0025 * Or, alternatively,
0026 *
0027 * b) Permission is hereby granted, free of charge, to any person
0028 * obtaining a copy of this software and associated documentation
0029 * files (the "Software"), to deal in the Software without
0030 * restriction, including without limitation the rights to use,
0031 * copy, modify, merge, publish, distribute, sublicense, and/or
0032 * sell copies of the Software, and to permit persons to whom the
0033 * Software is furnished to do so, subject to the following
0034 * conditions:
0035 *
0036 * The above copyright notice and this permission notice shall be
0037 * included in all copies or substantial portions of the Software.
0038 *
0039 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0040 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0041 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0042 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0043 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0044 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0045 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0046 * OTHER DEALINGS IN THE SOFTWARE.
0047 */
0048
0049 #include <dt-bindings/input/input.h>
0050 #include "imx6q-cm-fx6.dts"
0051
0052 / {
0053 model = "CompuLab Utilite Pro";
0054 compatible = "compulab,utilite-pro", "compulab,cm-fx6", "fsl,imx6q";
0055
0056 aliases {
0057 ethernet1 = ð1;
0058 rtc0 = &em3027;
0059 rtc1 = &snvs_rtc;
0060 };
0061
0062 encoder {
0063 compatible = "ti,tfp410";
0064
0065 ports {
0066 #address-cells = <1>;
0067 #size-cells = <0>;
0068
0069 port@0 {
0070 reg = <0>;
0071
0072 tfp410_in: endpoint {
0073 remote-endpoint = <¶llel_display_out>;
0074 };
0075 };
0076
0077 port@1 {
0078 reg = <1>;
0079
0080 tfp410_out: endpoint {
0081 remote-endpoint = <&hdmi_connector_in>;
0082 };
0083 };
0084 };
0085 };
0086
0087 gpio-keys {
0088 compatible = "gpio-keys";
0089 pinctrl-names = "default";
0090 pinctrl-0 = <&pinctrl_gpio_keys>;
0091
0092 power {
0093 label = "Power Button";
0094 gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;
0095 linux,code = <KEY_POWER>;
0096 wakeup-source;
0097 };
0098 };
0099
0100 hdmi-connector {
0101 compatible = "hdmi-connector";
0102 pinctrl-names = "default";
0103 pinctrl-0 = <&pinctrl_hpd>;
0104 type = "a";
0105 ddc-i2c-bus = <&i2c_dvi_ddc>;
0106 hpd-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
0107
0108 port {
0109 hdmi_connector_in: endpoint {
0110 remote-endpoint = <&tfp410_out>;
0111 };
0112 };
0113 };
0114
0115 i2cmux {
0116 compatible = "i2c-mux-gpio";
0117 pinctrl-names = "default";
0118 pinctrl-0 = <&pinctrl_i2c1mux>;
0119 #address-cells = <1>;
0120 #size-cells = <0>;
0121
0122 mux-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
0123 i2c-parent = <&i2c1>;
0124
0125 i2c@0 {
0126 reg = <0>;
0127 #address-cells = <1>;
0128 #size-cells = <0>;
0129
0130 eeprom@50 {
0131 compatible = "atmel,24c02";
0132 reg = <0x50>;
0133 pagesize = <16>;
0134 };
0135
0136 em3027: rtc@56 {
0137 compatible = "emmicro,em3027";
0138 reg = <0x56>;
0139 };
0140 };
0141
0142 i2c_dvi_ddc: i2c@1 {
0143 reg = <1>;
0144 #address-cells = <1>;
0145 #size-cells = <0>;
0146 };
0147 };
0148
0149 parallel-display {
0150 compatible = "fsl,imx-parallel-display";
0151 #address-cells = <1>;
0152 #size-cells = <0>;
0153 pinctrl-names = "default";
0154 pinctrl-0 = <&pinctrl_ipu1>;
0155
0156 interface-pix-fmt = "rgb24";
0157
0158 port@0 {
0159 reg = <0>;
0160
0161 parallel_display_in: endpoint {
0162 remote-endpoint = <&ipu1_di0_disp0>;
0163 };
0164 };
0165
0166 port@1 {
0167 reg = <1>;
0168
0169 parallel_display_out: endpoint {
0170 remote-endpoint = <&tfp410_in>;
0171 };
0172 };
0173 };
0174 };
0175
0176 /*
0177 * A single IPU is not able to drive both display interfaces available on the
0178 * Utilite Pro at high resolution due to its bandwidth limitation. Since the
0179 * tfp410 encoder is wired up to IPU1, sever the link between IPU1 and the
0180 * SoC-internal Designware HDMI encoder forcing the latter to be connected to
0181 * IPU2 instead of IPU1.
0182 */
0183 /delete-node/&ipu1_di0_hdmi;
0184 /delete-node/&hdmi_mux_0;
0185 /delete-node/&ipu1_di1_hdmi;
0186 /delete-node/&hdmi_mux_1;
0187
0188 &hdmi {
0189 pinctrl-names = "default";
0190 pinctrl-0 = <&pinctrl_hdmicec>;
0191 ddc-i2c-bus = <&i2c2>;
0192 status = "okay";
0193 };
0194
0195 &i2c1 {
0196 pinctrl-names = "default";
0197 pinctrl-0 = <&pinctrl_i2c1>;
0198 status = "okay";
0199 };
0200
0201 &i2c2 {
0202 pinctrl-names = "default";
0203 pinctrl-0 = <&pinctrl_i2c2>;
0204 status = "okay";
0205 };
0206
0207 &iomuxc {
0208 pinctrl_gpio_keys: gpio_keysgrp {
0209 fsl,pins = <
0210 MX6QDL_PAD_ENET_TXD1__GPIO1_IO29 0x1b0b0
0211 >;
0212 };
0213
0214 pinctrl_hdmicec: hdmicecgrp {
0215 fsl,pins = <
0216 MX6QDL_PAD_KEY_ROW2__HDMI_TX_CEC_LINE 0x1f8b0
0217 >;
0218 };
0219
0220 pinctrl_hpd: hpdgrp {
0221 fsl,pins = <
0222 MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x1b0b0
0223 >;
0224 };
0225
0226 pinctrl_i2c1: i2c1grp {
0227 fsl,pins = <
0228 MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1
0229 MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1
0230 >;
0231 };
0232
0233 pinctrl_i2c1mux: i2c1muxgrp {
0234 fsl,pins = <
0235 MX6QDL_PAD_GPIO_2__GPIO1_IO02 0x1b0b0
0236 >;
0237 };
0238
0239 pinctrl_i2c2: i2c2grp {
0240 fsl,pins = <
0241 MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
0242 MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
0243 >;
0244 };
0245
0246 pinctrl_ipu1: ipu1grp {
0247 fsl,pins = <
0248 MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK 0x38
0249 MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15 0x38
0250 MX6QDL_PAD_DI0_PIN2__IPU1_DI0_PIN02 0x38
0251 MX6QDL_PAD_DI0_PIN3__IPU1_DI0_PIN03 0x38
0252 MX6QDL_PAD_DISP0_DAT0__IPU1_DISP0_DATA00 0x38
0253 MX6QDL_PAD_DISP0_DAT1__IPU1_DISP0_DATA01 0x38
0254 MX6QDL_PAD_DISP0_DAT2__IPU1_DISP0_DATA02 0x38
0255 MX6QDL_PAD_DISP0_DAT3__IPU1_DISP0_DATA03 0x38
0256 MX6QDL_PAD_DISP0_DAT4__IPU1_DISP0_DATA04 0x38
0257 MX6QDL_PAD_DISP0_DAT5__IPU1_DISP0_DATA05 0x38
0258 MX6QDL_PAD_DISP0_DAT6__IPU1_DISP0_DATA06 0x38
0259 MX6QDL_PAD_DISP0_DAT7__IPU1_DISP0_DATA07 0x38
0260 MX6QDL_PAD_DISP0_DAT8__IPU1_DISP0_DATA08 0x38
0261 MX6QDL_PAD_DISP0_DAT9__IPU1_DISP0_DATA09 0x38
0262 MX6QDL_PAD_DISP0_DAT10__IPU1_DISP0_DATA10 0x38
0263 MX6QDL_PAD_DISP0_DAT11__IPU1_DISP0_DATA11 0x38
0264 MX6QDL_PAD_DISP0_DAT12__IPU1_DISP0_DATA12 0x38
0265 MX6QDL_PAD_DISP0_DAT13__IPU1_DISP0_DATA13 0x38
0266 MX6QDL_PAD_DISP0_DAT14__IPU1_DISP0_DATA14 0x38
0267 MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15 0x38
0268 MX6QDL_PAD_DISP0_DAT16__IPU1_DISP0_DATA16 0x38
0269 MX6QDL_PAD_DISP0_DAT17__IPU1_DISP0_DATA17 0x38
0270 MX6QDL_PAD_DISP0_DAT18__IPU1_DISP0_DATA18 0x38
0271 MX6QDL_PAD_DISP0_DAT19__IPU1_DISP0_DATA19 0x38
0272 MX6QDL_PAD_DISP0_DAT20__IPU1_DISP0_DATA20 0x38
0273 MX6QDL_PAD_DISP0_DAT21__IPU1_DISP0_DATA21 0x38
0274 MX6QDL_PAD_DISP0_DAT22__IPU1_DISP0_DATA22 0x38
0275 MX6QDL_PAD_DISP0_DAT23__IPU1_DISP0_DATA23 0x38
0276 >;
0277 };
0278
0279 pinctrl_uart2: uart2grp {
0280 fsl,pins = <
0281 MX6QDL_PAD_GPIO_7__UART2_TX_DATA 0x1b0b1
0282 MX6QDL_PAD_GPIO_8__UART2_RX_DATA 0x1b0b1
0283 MX6QDL_PAD_SD4_DAT5__UART2_RTS_B 0x1b0b1
0284 MX6QDL_PAD_SD4_DAT6__UART2_CTS_B 0x1b0b1
0285 >;
0286 };
0287
0288 pinctrl_usdhc3: usdhc3grp {
0289 fsl,pins = <
0290 MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059
0291 MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059
0292 MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059
0293 MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059
0294 MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059
0295 MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059
0296 >;
0297 };
0298
0299 pinctrl_usdhc3_100mhz: usdhc3grp-100mhz {
0300 fsl,pins = <
0301 MX6QDL_PAD_SD3_CMD__SD3_CMD 0x170B9
0302 MX6QDL_PAD_SD3_CLK__SD3_CLK 0x100B9
0303 MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x170B9
0304 MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x170B9
0305 MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x170B9
0306 MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x170B9
0307 >;
0308 };
0309
0310 pinctrl_usdhc3_200mhz: usdhc3grp-200mhz {
0311 fsl,pins = <
0312 MX6QDL_PAD_SD3_CMD__SD3_CMD 0x170F9
0313 MX6QDL_PAD_SD3_CLK__SD3_CLK 0x100F9
0314 MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x170F9
0315 MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x170F9
0316 MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x170F9
0317 MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x170F9
0318 >;
0319 };
0320 };
0321
0322 &ipu1_di0_disp0 {
0323 remote-endpoint = <¶llel_display_in>;
0324 };
0325
0326 &pcie {
0327 pcie@0,0 {
0328 reg = <0x000000 0 0 0 0>;
0329 #address-cells = <3>;
0330 #size-cells = <2>;
0331
0332 /* non-removable i211 ethernet card */
0333 eth1: intel,i211@pcie0,0 {
0334 reg = <0x010000 0 0 0 0>;
0335 };
0336 };
0337 };
0338
0339 &uart2 {
0340 pinctrl-names = "default";
0341 pinctrl-0 = <&pinctrl_uart2>;
0342 uart-has-rtscts;
0343 status = "okay";
0344 };
0345
0346 &usdhc3 {
0347 pinctrl-names = "default", "state_100mhz", "state_200mhz";
0348 pinctrl-0 = <&pinctrl_usdhc3>;
0349 pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
0350 pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
0351 no-1-8-v;
0352 broken-cd;
0353 keep-power-in-suspend;
0354 status = "okay";
0355 };