Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright (C) 2017 Milo Kim <woogyom.kim@gmail.com>
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 as
0011  *     published by the Free Software Foundation; either version 2 of the
0012  *     License, or (at your option) any later version.
0013  *
0014  *     This file is distributed in the hope that it will be useful,
0015  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
0016  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0017  *     GNU General Public License for more details.
0018  *
0019  * Or, alternatively,
0020  *
0021  *  b) Permission is hereby granted, free of charge, to any person
0022  *     obtaining a copy of this software and associated documentation
0023  *     files (the "Software"), to deal in the Software without
0024  *     restriction, including without limitation the rights to use,
0025  *     copy, modify, merge, publish, distribute, sublicense, and/or
0026  *     sell copies of the Software, and to permit persons to whom the
0027  *     Software is furnished to do so, subject to the following
0028  *     conditions:
0029  *
0030  *     The above copyright notice and this permission notice shall be
0031  *     included in all copies or substantial portions of the Software.
0032  *
0033  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0034  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0035  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0036  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0037  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0038  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0039  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0040  *     OTHER DEALINGS IN THE SOFTWARE.
0041  */
0042 
0043 #include <dt-bindings/gpio/gpio.h>
0044 #include <dt-bindings/input/input.h>
0045 
0046 / {
0047         chosen {
0048                 stdout-path = &uart1;
0049         };
0050 
0051         memory@10000000 {
0052                 device_type = "memory";
0053                 reg = <0x10000000 0x40000000>;
0054         };
0055 
0056         gpio-keys {
0057                 compatible = "gpio-keys";
0058                 pinctrl-names = "default";
0059                 pinctrl-0 = <&pinctrl_gpio_keys>;
0060 
0061                 power {
0062                         gpios = <&gpio3 7 GPIO_ACTIVE_LOW>;
0063                         label = "Power Button";
0064                         linux,code = <KEY_POWER>;
0065                         wakeup-source;
0066                 };
0067         };
0068 
0069         panel {
0070                 compatible = "avic,tm097tdh02", "hannstar,hsd100pxn1";
0071                 backlight = <&panel_bl>;
0072                 power-supply = <&reg_3p3v>;
0073 
0074                 port {
0075                         panel_in: endpoint {
0076                                 remote-endpoint = <&lvds0_out>;
0077                         };
0078                 };
0079         };
0080 
0081         panel_bl: backlight {
0082                 compatible = "pwm-backlight";
0083                 brightness-levels = <0 4 8 16 32 64 128 255>;
0084                 default-brightness-level = <4>;
0085                 power-supply = <&reg_3p3v>;
0086                 pwms = <&pwm1 0 10000>;
0087         };
0088 
0089         reg_3p3v: regulator-3p3v {
0090                 compatible = "regulator-fixed";
0091                 regulator-name = "3P3V";
0092                 regulator-min-microvolt = <3300000>;
0093                 regulator-max-microvolt = <3300000>;
0094                 regulator-always-on;
0095         };
0096 };
0097 
0098 &clks {
0099         assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
0100                           <&clks IMX6QDL_CLK_LDB_DI1_SEL>;
0101         assigned-clock-parents = <&clks IMX6QDL_CLK_PLL3_USB_OTG>,
0102                                  <&clks IMX6QDL_CLK_PLL3_USB_OTG>;
0103 };
0104 
0105 &fec {
0106         phy-mode = "rgmii";
0107         phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
0108         pinctrl-names = "default";
0109         pinctrl-0 = <&pinctrl_enet>;
0110         status = "okay";
0111 };
0112 
0113 &hdmi {
0114         ddc-i2c-bus = <&i2c2>;
0115         status = "okay";
0116 };
0117 
0118 &i2c2 {
0119         clock-frequency = <100000>;
0120         pinctrl-names = "default";
0121         pinctrl-0 = <&pinctrl_i2c2>;
0122         status = "okay";
0123 };
0124 
0125 &ldb {
0126         status = "okay";
0127 
0128         lvds-channel@0 {
0129                 reg = <0>;
0130                 status = "okay";
0131 
0132                 port@4 {
0133                         reg = <4>;
0134 
0135                         lvds0_out: endpoint {
0136                                 remote-endpoint = <&panel_in>;
0137                         };
0138                 };
0139         };
0140 };
0141 
0142 &pwm1 {
0143         #pwm-cells = <2>;
0144         pinctrl-names = "default";
0145         pinctrl-0 = <&pinctrl_pwm1>;
0146         status = "okay";
0147 };
0148 
0149 &uart1 {
0150         pinctrl-names = "default";
0151         pinctrl-0 = <&pinctrl_uart1>;
0152         status = "okay";
0153 };
0154 
0155 &usbh1 {
0156         status = "okay";
0157 };
0158 
0159 /* SD card */
0160 &usdhc3 {
0161         bus-width = <4>;
0162         cd-gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
0163         no-1-8-v;
0164         pinctrl-names = "default";
0165         pinctrl-0 = <&pinctrl_sd>;
0166         status = "okay";
0167 };
0168 
0169 /* eMMC */
0170 &usdhc4 {
0171         bus-width = <8>;
0172         keep-power-in-suspend;
0173         no-1-8-v;
0174         non-removable;
0175         pinctrl-names = "default";
0176         pinctrl-0 = <&pinctrl_emmc>;
0177         status = "okay";
0178 };
0179 
0180 &iomuxc {
0181         pinctrl_emmc: emmcgrp {
0182                 fsl,pins = <
0183                         MX6QDL_PAD_SD4_CMD__SD4_CMD             0x17059
0184                         MX6QDL_PAD_SD4_CLK__SD4_CLK             0x10059
0185                         MX6QDL_PAD_SD4_DAT0__SD4_DATA0          0x17059
0186                         MX6QDL_PAD_SD4_DAT1__SD4_DATA1          0x17059
0187                         MX6QDL_PAD_SD4_DAT2__SD4_DATA2          0x17059
0188                         MX6QDL_PAD_SD4_DAT3__SD4_DATA3          0x17059
0189                         MX6QDL_PAD_SD4_DAT4__SD4_DATA4          0x17059
0190                         MX6QDL_PAD_SD4_DAT5__SD4_DATA5          0x17059
0191                         MX6QDL_PAD_SD4_DAT6__SD4_DATA6          0x17059
0192                         MX6QDL_PAD_SD4_DAT7__SD4_DATA7          0x17059
0193                 >;
0194         };
0195 
0196         pinctrl_enet: enetgrp {
0197                 fsl,pins = <
0198                         MX6QDL_PAD_ENET_MDIO__ENET_MDIO         0x1b0b0
0199                         MX6QDL_PAD_ENET_MDC__ENET_MDC           0x1b0b0
0200                         MX6QDL_PAD_RGMII_TXC__RGMII_TXC         0x1b030
0201                         MX6QDL_PAD_RGMII_TD0__RGMII_TD0         0x1b030
0202                         MX6QDL_PAD_RGMII_TD1__RGMII_TD1         0x1b030
0203                         MX6QDL_PAD_RGMII_TD2__RGMII_TD2         0x1b030
0204                         MX6QDL_PAD_RGMII_TD3__RGMII_TD3         0x1b030
0205                         MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL   0x1b030
0206                         MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK    0x1b0b0
0207                         MX6QDL_PAD_RGMII_RXC__RGMII_RXC         0x1b030
0208                         MX6QDL_PAD_RGMII_RD0__RGMII_RD0         0x1b030
0209                         MX6QDL_PAD_RGMII_RD1__RGMII_RD1         0x1b030
0210                         MX6QDL_PAD_RGMII_RD2__RGMII_RD2         0x1b030
0211                         MX6QDL_PAD_RGMII_RD3__RGMII_RD3         0x1b030
0212                         MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL   0x1b030
0213                         /* PHY reset */
0214                         MX6QDL_PAD_ENET_CRS_DV__GPIO1_IO25      0x1b0b0
0215                 >;
0216         };
0217 
0218         pinctrl_gpio_keys: gpiokeysgrp {
0219                 fsl,pins = <
0220                         MX6QDL_PAD_EIM_DA7__GPIO3_IO07          0x1b0b1
0221                 >;
0222         };
0223 
0224         pinctrl_i2c2: i2c2grp {
0225                 fsl,pins = <
0226                         MX6QDL_PAD_KEY_COL3__I2C2_SCL           0x4001b8b1
0227                         MX6QDL_PAD_KEY_ROW3__I2C2_SDA           0x4001b8b1
0228                 >;
0229         };
0230 
0231         pinctrl_pwm1: pwm1grp {
0232                 fsl,pins = <
0233                         MX6QDL_PAD_SD1_DAT3__PWM1_OUT           0x1b0b1
0234                 >;
0235         };
0236 
0237         pinctrl_sd: sdgrp {
0238                 fsl,pins = <
0239                         MX6QDL_PAD_SD3_CMD__SD3_CMD             0x17059
0240                         MX6QDL_PAD_SD3_CLK__SD3_CLK             0x10059
0241                         MX6QDL_PAD_SD3_DAT0__SD3_DATA0          0x17059
0242                         MX6QDL_PAD_SD3_DAT1__SD3_DATA1          0x17059
0243                         MX6QDL_PAD_SD3_DAT2__SD3_DATA2          0x17059
0244                         MX6QDL_PAD_SD3_DAT3__SD3_DATA3          0x17059
0245                         /* CD pin */
0246                         MX6QDL_PAD_NANDF_D0__GPIO2_IO00         0x1b0b1
0247                 >;
0248         };
0249 
0250         pinctrl_uart1: uart1grp {
0251                 fsl,pins = <
0252                         MX6QDL_PAD_CSI0_DAT10__UART1_TX_DATA    0x1b0b1
0253                         MX6QDL_PAD_CSI0_DAT11__UART1_RX_DATA    0x1b0b1
0254                 >;
0255         };
0256 };