Merge branch 'core/urgent' into x86/urgent, to pick up objtool fix
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / tegra124-apalis-eval.dts
1 /*
2  * Copyright 2016-2018 Toradex AG
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 , 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 <dt-bindings/input/input.h>
45 #include "tegra124-apalis.dtsi"
46
47 / {
48         model = "Toradex Apalis TK1 on Apalis Evaluation Board";
49         compatible = "toradex,apalis-tk1-eval", "toradex,apalis-tk1",
50                      "nvidia,tegra124";
51
52         aliases {
53                 rtc0 = "/i2c@7000c000/rtc@68";
54                 rtc1 = "/i2c@7000d000/pmic@40";
55                 rtc2 = "/rtc@7000e000";
56                 serial0 = &uarta;
57                 serial1 = &uartb;
58                 serial2 = &uartc;
59                 serial3 = &uartd;
60         };
61
62         chosen {
63                 stdout-path = "serial0:115200n8";
64         };
65
66         pcie@1003000 {
67                 pci@1,0 {
68                         status = "okay";
69                 };
70         };
71
72         host1x@50000000 {
73                 hdmi@54280000 {
74                         status = "okay";
75                         hdmi-supply = <&reg_5v0>;
76                 };
77         };
78
79         /* Apalis UART1 */
80         serial@70006000 {
81                 status = "okay";
82         };
83
84         /* Apalis UART2 */
85         serial@70006040 {
86                 status = "okay";
87         };
88
89         /* Apalis UART3 */
90         serial@70006200 {
91                 status = "okay";
92         };
93
94         /* Apalis UART4 */
95         serial@70006300 {
96                 status = "okay";
97         };
98
99         pwm@7000a000 {
100                 status = "okay";
101         };
102
103         /*
104          * GEN1_I2C: I2C1_SDA/SCL on MXM3 pin 209/211 (e.g. RTC on carrier
105          * board)
106          */
107         i2c@7000c000 {
108                 status = "okay";
109                 clock-frequency = <400000>;
110
111                 pcie-switch@58 {
112                         compatible = "plx,pex8605";
113                         reg = <0x58>;
114                 };
115
116                 /* M41T0M6 real time clock on carrier board */
117                 rtc@68 {
118                         compatible = "st,m41t0";
119                         reg = <0x68>;
120                 };
121         };
122
123         /*
124          * GEN2_I2C: I2C2_SDA/SCL (DDC) on MXM3 pin 205/207 (e.g. display EDID)
125          */
126         i2c@7000c400 {
127                 status = "okay";
128         };
129
130         /*
131          * CAM_I2C: I2C3_SDA/SCL (CAM) on MXM3 pin 201/203 (e.g. camera sensor
132          * on carrier board)
133          */
134         i2c@7000c500 {
135                 status = "okay";
136                 clock-frequency = <400000>;
137         };
138
139         /* I2C4 (DDC): unused */
140
141         /* SPI1: Apalis SPI1 */
142         spi@7000d400 {
143                 status = "okay";
144                 spi-max-frequency = <50000000>;
145         };
146
147         /* SPI4: Apalis SPI2 */
148         spi@7000da00 {
149                 status = "okay";
150                 spi-max-frequency = <50000000>;
151         };
152
153         /* Apalis Serial ATA */
154         sata@70020000 {
155                 status = "okay";
156                 target-5v-supply = <&reg_5v0>;
157                 target-12v-supply = <&reg_12v0>;
158         };
159
160         hda@70030000 {
161                 status = "okay";
162         };
163
164         usb@70090000 {
165                 status = "okay";
166         };
167
168         /* Apalis MMC1 */
169         sdhci@700b0000 {
170                 status = "okay";
171                 bus-width = <4>;
172                 /* MMC1_CD# */
173                 cd-gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_LOW>;
174                 vqmmc-supply = <&vddio_sdmmc1>;
175         };
176
177         /* Apalis SD1 */
178         sdhci@700b0400 {
179                 status = "okay";
180                 bus-width = <4>;
181                 /* SD1_CD# */
182                 cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
183                 vqmmc-supply = <&vddio_sdmmc3>;
184         };
185
186         /* EHCI instance 0: USB1_DP/N -> USBO1_DP/N */
187         usb@7d000000 {
188                 status = "okay";
189                 dr_mode = "otg";
190         };
191
192         usb-phy@7d000000 {
193                 status = "okay";
194                 vbus-supply = <&reg_usbo1_vbus>;
195         };
196
197         /* EHCI instance 1: USB2_DP/N -> USBH2_DP/N */
198         usb@7d004000 {
199                 status = "okay";
200         };
201
202         usb-phy@7d004000 {
203                 status = "okay";
204                 vbus-supply = <&reg_usbh_vbus>;
205         };
206
207         /* EHCI instance 2: USB3_DP/N -> USBH4_DP/N */
208         usb@7d008000 {
209                 status = "okay";
210         };
211
212         usb-phy@7d008000 {
213                 status = "okay";
214                 vbus-supply = <&reg_usbh_vbus>;
215         };
216
217         backlight: backlight {
218                 compatible = "pwm-backlight";
219                 brightness-levels = <255 231 223 207 191 159 127 0>;
220                 default-brightness-level = <6>;
221                 /* BKL1_ON */
222                 enable-gpios = <&gpio TEGRA_GPIO(BB, 5) GPIO_ACTIVE_HIGH>;
223                 power-supply = <&reg_3v3>;
224                 pwms = <&pwm 3 5000000>; /* BKL1_PWM */
225         };
226
227         gpio-keys {
228                 compatible = "gpio-keys";
229
230                 wakeup {
231                         label = "WAKE1_MICO";
232                         gpios = <&gpio TEGRA_GPIO(DD, 3) GPIO_ACTIVE_LOW>;
233                         linux,code = <KEY_WAKEUP>;
234                         debounce-interval = <10>;
235                         wakeup-source;
236                 };
237         };
238
239         reg_3v3: regulator-3v3 {
240                 compatible = "regulator-fixed";
241                 regulator-name = "3.3V_SW";
242                 regulator-min-microvolt = <3300000>;
243                 regulator-max-microvolt = <3300000>;
244         };
245
246         reg_5v0: regulator-5v0 {
247                 compatible = "regulator-fixed";
248                 regulator-name = "5V_SW";
249                 regulator-min-microvolt = <5000000>;
250                 regulator-max-microvolt = <5000000>;
251         };
252
253         reg_12v0: regulator-12v0 {
254                 compatible = "regulator-fixed";
255                 regulator-name = "12V_SW";
256                 regulator-min-microvolt = <12000000>;
257                 regulator-max-microvolt = <12000000>;
258         };
259
260         /* USBO1_EN */
261         reg_usbo1_vbus: regulator-usbo1-vbus {
262                 compatible = "regulator-fixed";
263                 regulator-name = "VCC_USBO1";
264                 regulator-min-microvolt = <5000000>;
265                 regulator-max-microvolt = <5000000>;
266                 gpio = <&gpio TEGRA_GPIO(N, 4) GPIO_ACTIVE_HIGH>;
267                 enable-active-high;
268                 vin-supply = <&reg_5v0>;
269         };
270
271         /* USBH_EN */
272         reg_usbh_vbus: regulator-usbh-vbus {
273                 compatible = "regulator-fixed";
274                 regulator-name = "VCC_USBH(2A|2C|2D|3|4)";
275                 regulator-min-microvolt = <5000000>;
276                 regulator-max-microvolt = <5000000>;
277                 gpio = <&gpio TEGRA_GPIO(N, 5) GPIO_ACTIVE_HIGH>;
278                 enable-active-high;
279                 vin-supply = <&reg_5v0>;
280         };
281 };
282
283 &gpio {
284         /* Apalis GPIO7 MXM3 pin 15 PLX PEX 8605 PCIe Switch Reset */
285         pex-perst-n {
286                 gpio-hog;
287                 gpios = <TEGRA_GPIO(DD, 1) GPIO_ACTIVE_HIGH>;
288                 output-high;
289                 line-name = "PEX_PERST_N";
290         };
291 };