GNU Linux-libre 4.19.264-gnu1
[releases.git] / arch / arm / boot / dts / imx6q-h100.dts
1 /*
2  * Copyright (C) 2015 Lucas Stach <kernel@pengutronix.de>
3  *
4  * This file is dual-licensed: you can use it either under the terms
5  * of the GPL or the X11 license, at your option. Note that this dual
6  * licensing only applies to this file, and not this project as a
7  * whole.
8  *
9  *  a) This file is free software; you can redistribute it and/or
10  *     modify it under the terms of the GNU General Public License
11  *     version 2 as published by the Free Software Foundation.
12  *
13  *     This file is distributed in the hope that it will be useful,
14  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *     GNU General Public License for more details.
17  *
18  * Or, alternatively,
19  *
20  *  b) Permission is hereby granted, free of charge, to any person
21  *     obtaining a copy of this software and associated documentation
22  *     files (the "Software"), to deal in the Software without
23  *     restriction, including without limitation the rights to use,
24  *     copy, modify, merge, publish, distribute, sublicense, and/or
25  *     sell copies of the Software, and to permit persons to whom the
26  *     Software is furnished to do so, subject to the following
27  *     conditions:
28  *
29  *     The above copyright notice and this permission notice shall be
30  *     included in all copies or substantial portions of the Software.
31  *
32  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
33  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
34  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
35  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
36  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
37  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
38  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
39  *     OTHER DEALINGS IN THE SOFTWARE.
40  */
41
42 /dts-v1/;
43
44 #include "imx6q.dtsi"
45 #include "imx6qdl-sr-som.dtsi"
46 #include "imx6qdl-sr-som-brcm.dtsi"
47
48 / {
49         model = "Auvidea H100";
50         compatible = "auvidea,h100", "fsl,imx6q";
51
52         /* Will be filled by the bootloader */
53         memory@10000000 {
54                 reg = <0x10000000 0>;
55         };
56
57         aliases {
58                 rtc0 = &rtc;
59                 rtc1 = &snvs_rtc;
60         };
61
62         chosen {
63                 stdout-path = &uart2;
64         };
65
66         hdmi_osc: hdmi-osc {
67                 compatible = "fixed-clock";
68                 clock-output-names = "hdmi-osc";
69                 clock-frequency = <27000000>;
70                 #clock-cells = <0>;
71         };
72
73         leds {
74                 compatible = "gpio-leds";
75                 pinctrl-names = "default";
76                 pinctrl-0 = <&pinctrl_h100_leds>;
77
78                 led0: power {
79                         label = "power";
80                         gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
81                         default-state = "on";
82                 };
83
84                 led1: stream {
85                         label = "stream";
86                         gpios = <&gpio2 29 GPIO_ACTIVE_LOW>;
87                         default-state = "off";
88                 };
89
90                 led2: rec {
91                         label = "rec";
92                         gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
93                         default-state = "off";
94                 };
95         };
96
97         reg_3p3v: regulator-3p3v {
98                 compatible = "regulator-fixed";
99                 regulator-name = "3P3V";
100                 regulator-min-microvolt = <3300000>;
101                 regulator-max-microvolt = <3300000>;
102         };
103
104         reg_hdmi: regulator-hdmi {
105                 pinctrl-names = "default";
106                 pinctrl-0 = <&pinctrl_h100_reg_hdmi>;
107                 compatible = "regulator-fixed";
108                 enable-active-high;
109                 gpio = <&gpio2 20 GPIO_ACTIVE_HIGH>;
110                 regulator-name = "V_HDMI";
111                 regulator-min-microvolt = <5000000>;
112                 regulator-max-microvolt = <5000000>;
113                 regulator-always-on;
114         };
115
116         reg_usbh1_vbus: regulator-usb-h1-vbus {
117                 compatible = "regulator-fixed";
118                 enable-active-high;
119                 gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
120                 pinctrl-names = "default";
121                 pinctrl-0 = <&pinctrl_h100_usbh1_vbus>;
122                 regulator-name = "USB_H1_VBUS";
123                 regulator-min-microvolt = <5000000>;
124                 regulator-max-microvolt = <5000000>;
125         };
126
127         reg_usbotg_vbus: regulator-usb-otg-vbus {
128                 compatible = "regulator-fixed";
129                 enable-active-high;
130                 gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
131                 pinctrl-names = "default";
132                 pinctrl-0 = <&pinctrl_h100_usbotg_vbus>;
133                 regulator-name = "USB_OTG_VBUS";
134                 regulator-min-microvolt = <5000000>;
135                 regulator-max-microvolt = <5000000>;
136         };
137
138         sound-sgtl5000 {
139                 compatible = "fsl,imx-audio-sgtl5000";
140                 model = "H100 on-board codec";
141                 audio-codec = <&sgtl5000>;
142                 audio-routing =
143                         "MIC_IN", "Mic Jack",
144                         "Mic Jack", "Mic Bias",
145                         "Headphone Jack", "HP_OUT";
146                 mux-ext-port = <5>;
147                 mux-int-port = <1>;
148                 ssi-controller = <&ssi1>;
149         };
150 };
151
152 &audmux {
153         status = "okay";
154 };
155
156 &hdmi {
157         pinctrl-names = "default";
158         pinctrl-0 = <&pinctrl_h100_hdmi>;
159         ddc-i2c-bus = <&i2c2>;
160         status = "okay";
161 };
162
163 &i2c1 {
164         pinctrl-names = "default";
165         pinctrl-0 = <&pinctrl_h100_i2c1>;
166         status = "okay";
167
168         eeprom: 24c02@51 {
169                 compatible = "microchip,24c02", "atmel,24c02";
170                 reg = <0x51>;
171         };
172
173         rtc: pcf8523@68 {
174                 compatible = "nxp,pcf8523";
175                 reg = <0x68>;
176         };
177
178         sgtl5000: sgtl5000@a {
179                 compatible = "fsl,sgtl5000";
180                 reg = <0x0a>;
181                 pinctrl-names = "default";
182                 pinctrl-0 = <&pinctrl_h100_sgtl5000>;
183                 clocks = <&clks IMX6QDL_CLK_CKO>;
184                 VDDA-supply = <&reg_3p3v>;
185                 VDDIO-supply = <&reg_3p3v>;
186         };
187
188         tc358743: tc358743@f {
189                 compatible = "toshiba,tc358743";
190                 reg = <0x0f>;
191                 pinctrl-names = "default";
192                 pinctrl-0 = <&pinctrl_h100_tc358743>;
193                 clocks = <&hdmi_osc>;
194                 clock-names = "refclk";
195                 reset-gpios = <&gpio6 15 GPIO_ACTIVE_LOW>;
196                 /* IRQ has a wrong pull resistor which renders it useless  */
197
198                 port {
199                         tc358743_out: endpoint {
200                                 remote-endpoint = <&mipi_csi2_in>;
201                                 data-lanes = <1 2 3 4>;
202                                 clock-lanes = <0>;
203                                 clock-noncontinuous;
204                                 link-frequencies = /bits/ 64 <297000000>;
205                         };
206                 };
207         };
208 };
209
210 &i2c2 {
211         clock-frequency = <100000>;
212         pinctrl-names = "default";
213         pinctrl-0 = <&pinctrl_h100_i2c2>;
214         status = "okay";
215 };
216
217 &iomuxc {
218         h100 {
219                 pinctrl_h100_hdmi: h100-hdmi {
220                         fsl,pins = <
221                                 MX6QDL_PAD_KEY_ROW2__HDMI_TX_CEC_LINE   0x1f8b0
222                         >;
223                 };
224
225                 pinctrl_h100_i2c1: h100-i2c1 {
226                         fsl,pins = <
227                                 MX6QDL_PAD_EIM_D21__I2C1_SCL            0x4001b8b1
228                                 MX6QDL_PAD_EIM_D28__I2C1_SDA            0x4001b8b1
229                         >;
230                 };
231
232                 pinctrl_h100_i2c2: h100-i2c2 {
233                         fsl,pins = <
234                                 MX6QDL_PAD_KEY_COL3__I2C2_SCL           0x4001b8b1
235                                 MX6QDL_PAD_KEY_ROW3__I2C2_SDA           0x4001b8b1
236                         >;
237                 };
238
239                 pinctrl_h100_leds: pinctrl-h100-leds {
240                         fsl,pins = <
241                                 MX6QDL_PAD_EIM_DA0__GPIO3_IO00          0x1b0b0
242                                 MX6QDL_PAD_EIM_EB1__GPIO2_IO29          0x1b0b0
243                                 MX6QDL_PAD_EIM_EB0__GPIO2_IO28          0x1b0b0
244                         >;
245                 };
246
247                 pinctrl_h100_reg_hdmi: h100-reg-hdmi {
248                         fsl,pins = <
249                                 MX6QDL_PAD_EIM_A18__GPIO2_IO20          0x1b0b0
250                         >;
251                 };
252
253                 pinctrl_h100_sgtl5000: h100-sgtl5000 {
254                         fsl,pins = <
255                                 MX6QDL_PAD_DISP0_DAT19__AUD5_RXD        0x130b0
256                                 MX6QDL_PAD_KEY_COL0__AUD5_TXC           0x130b0
257                                 MX6QDL_PAD_KEY_ROW0__AUD5_TXD           0x110b0
258                                 MX6QDL_PAD_KEY_COL1__AUD5_TXFS          0x130b0
259                                 MX6QDL_PAD_GPIO_5__CCM_CLKO1            0x130b0
260                         >;
261                 };
262
263                 pinctrl_h100_tc358743: h100-tc358743 {
264                         fsl,pins = <
265                                 MX6QDL_PAD_NANDF_CS2__GPIO6_IO15        0x1b0b0
266                         >;
267                 };
268
269                 pinctrl_h100_uart2: h100-uart2 {
270                         fsl,pins = <
271                                 MX6QDL_PAD_SD4_DAT4__UART2_RX_DATA      0x1b0b1
272                                 MX6QDL_PAD_SD4_DAT7__UART2_TX_DATA      0x1b0b1
273                         >;
274                 };
275
276                 pinctrl_h100_usbh1_vbus: hummingboard-usbh1-vbus {
277                         fsl,pins = <
278                                 MX6QDL_PAD_GPIO_0__GPIO1_IO00           0x1b0b0
279                         >;
280                 };
281
282                 pinctrl_h100_usbotg_id: hummingboard-usbotg-id {
283                         fsl,pins = <
284                                 MX6QDL_PAD_GPIO_1__USB_OTG_ID           0x13059
285                         >;
286                 };
287
288                 pinctrl_h100_usbotg_vbus: hummingboard-usbotg-vbus {
289                         fsl,pins = <
290                                 MX6QDL_PAD_EIM_D22__GPIO3_IO22          0x1b0b0
291                         >;
292                 };
293
294                 pinctrl_h100_usdhc2: h100-usdhc2 {
295                         fsl,pins = <
296                                 MX6QDL_PAD_GPIO_4__GPIO1_IO04           0x1f071
297                                 MX6QDL_PAD_SD2_CMD__SD2_CMD             0x17059
298                                 MX6QDL_PAD_SD2_CLK__SD2_CLK             0x10059
299                                 MX6QDL_PAD_SD2_DAT0__SD2_DATA0          0x17059
300                                 MX6QDL_PAD_SD2_DAT1__SD2_DATA1          0x17059
301                                 MX6QDL_PAD_SD2_DAT2__SD2_DATA2          0x17059
302                                 MX6QDL_PAD_SD2_DAT3__SD2_DATA3          0x13059
303                                 MX6QDL_PAD_KEY_ROW1__SD2_VSELECT        0x1b0b0
304                         >;
305                 };
306
307                 pinctrl_h100_usdhc2_100mhz: h100-usdhc2-100mhz {
308                         fsl,pins = <
309                                 MX6QDL_PAD_GPIO_4__GPIO1_IO04           0x1f071
310                                 MX6QDL_PAD_SD2_CMD__SD2_CMD             0x170b9
311                                 MX6QDL_PAD_SD2_CLK__SD2_CLK             0x100b9
312                                 MX6QDL_PAD_SD2_DAT0__SD2_DATA0          0x170b9
313                                 MX6QDL_PAD_SD2_DAT1__SD2_DATA1          0x170b9
314                                 MX6QDL_PAD_SD2_DAT2__SD2_DATA2          0x170b9
315                                 MX6QDL_PAD_SD2_DAT3__SD2_DATA3          0x170b9
316                                 MX6QDL_PAD_KEY_ROW1__SD2_VSELECT        0x1b0b0
317                         >;
318                 };
319
320                 pinctrl_h100_usdhc2_200mhz: h100-usdhc2-200mhz {
321                         fsl,pins = <
322                                 MX6QDL_PAD_GPIO_4__GPIO1_IO04           0x1f071
323                                 MX6QDL_PAD_SD2_CMD__SD2_CMD             0x170f9
324                                 MX6QDL_PAD_SD2_CLK__SD2_CLK             0x100f9
325                                 MX6QDL_PAD_SD2_DAT0__SD2_DATA0          0x170f9
326                                 MX6QDL_PAD_SD2_DAT1__SD2_DATA1          0x170f9
327                                 MX6QDL_PAD_SD2_DAT2__SD2_DATA2          0x170f9
328                                 MX6QDL_PAD_SD2_DAT3__SD2_DATA3          0x170f9
329                                 MX6QDL_PAD_KEY_ROW1__SD2_VSELECT        0x1b0b0
330                         >;
331                 };
332         };
333 };
334
335 &mipi_csi {
336         status = "okay";
337
338         port {
339                 mipi_csi2_in: endpoint {
340                         remote-endpoint = <&tc358743_out>;
341                         data-lanes = <1 2 3 4>;
342                         clock-lanes = <0>;
343                         clock-noncontinuous;
344                         link-frequencies = /bits/ 64 <297000000>;
345                 };
346         };
347 };
348
349 &ssi1 {
350         status = "okay";
351 };
352
353 &uart2 {
354         pinctrl-names = "default";
355         pinctrl-0 = <&pinctrl_h100_uart2>;
356         status = "okay";
357 };
358
359 &usbh1 {
360         disable-over-current;
361         vbus-supply = <&reg_usbh1_vbus>;
362         status = "okay";
363 };
364
365 &usbotg {
366         disable-over-current;
367         pinctrl-names = "default";
368         pinctrl-0 = <&pinctrl_h100_usbotg_id>;
369         vbus-supply = <&reg_usbotg_vbus>;
370         status = "okay";
371 };
372
373 &usdhc2 {
374         pinctrl-names = "default", "state_100mhz", "state_200mhz";
375         pinctrl-0 = <&pinctrl_h100_usdhc2>;
376         pinctrl-1 = <&pinctrl_h100_usdhc2_100mhz>;
377         pinctrl-2 = <&pinctrl_h100_usdhc2_200mhz>;
378         vmmc-supply = <&reg_3p3v>;
379         cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
380         status = "okay";
381 };