Commit | Line | Data |
---|---|---|
85afd20e MZ |
1 | /* |
2 | * Copyright 2016 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-controller@01003000 { | |
67 | pci@1,0 { | |
68 | status = "okay"; | |
69 | }; | |
70 | }; | |
71 | ||
72 | host1x@50000000 { | |
73 | hdmi@54280000 { | |
74 | status = "okay"; | |
75 | }; | |
76 | }; | |
77 | ||
78 | /* Apalis UART1 */ | |
79 | serial@70006000 { | |
80 | status = "okay"; | |
81 | }; | |
82 | ||
83 | /* Apalis UART2 */ | |
84 | serial@70006040 { | |
85 | status = "okay"; | |
86 | }; | |
87 | ||
88 | /* Apalis UART3 */ | |
89 | serial@70006200 { | |
90 | status = "okay"; | |
91 | }; | |
92 | ||
93 | /* Apalis UART4 */ | |
94 | serial@70006300 { | |
95 | status = "okay"; | |
96 | }; | |
97 | ||
98 | pwm@7000a000 { | |
99 | status = "okay"; | |
100 | }; | |
101 | ||
102 | /* | |
103 | * GEN1_I2C: I2C1_SDA/SCL on MXM3 pin 209/211 (e.g. RTC on carrier | |
104 | * board) | |
105 | */ | |
106 | i2c@7000c000 { | |
107 | status = "okay"; | |
108 | clock-frequency = <100000>; | |
109 | ||
110 | pcie-switch@58 { | |
111 | compatible = "plx,pex8605"; | |
112 | reg = <0x58>; | |
113 | }; | |
114 | ||
115 | /* M41T0M6 real time clock on carrier board */ | |
116 | rtc@68 { | |
117 | compatible = "st,m41t00"; | |
118 | reg = <0x68>; | |
119 | }; | |
120 | }; | |
121 | ||
122 | /* | |
123 | * GEN2_I2C: I2C2_SDA/SCL (DDC) on MXM3 pin 205/207 (e.g. display EDID) | |
124 | */ | |
125 | hdmi_ddc: i2c@7000c400 { | |
126 | status = "okay"; | |
127 | clock-frequency = <100000>; | |
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 = <100000>; | |
137 | }; | |
138 | ||
139 | /* I2C4 (DDC): unused */ | |
140 | ||
141 | /* SPI1: Apalis SPI1 */ | |
142 | spi@7000d400 { | |
143 | status = "okay"; | |
144 | spi-max-frequency = <50000000>; | |
145 | ||
146 | spidev0: spidev@0 { | |
147 | compatible = "spidev"; | |
148 | reg = <0>; | |
149 | spi-max-frequency = <50000000>; | |
150 | }; | |
151 | }; | |
152 | ||
153 | /* SPI4: Apalis SPI2 */ | |
154 | spi@7000da00 { | |
155 | status = "okay"; | |
156 | spi-max-frequency = <50000000>; | |
157 | ||
158 | spidev1: spidev@0 { | |
159 | compatible = "spidev"; | |
160 | reg = <0>; | |
161 | spi-max-frequency = <50000000>; | |
162 | }; | |
163 | }; | |
164 | ||
165 | /* Apalis Serial ATA */ | |
166 | sata@70020000 { | |
167 | status = "okay"; | |
168 | }; | |
169 | ||
170 | hda@70030000 { | |
171 | status = "okay"; | |
172 | }; | |
173 | ||
174 | usb@70090000 { | |
175 | status = "okay"; | |
176 | }; | |
177 | ||
178 | /* Apalis MMC1 */ | |
179 | sdhci@700b0000 { | |
180 | status = "okay"; | |
181 | /* MMC1_CD# */ | |
182 | cd-gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_LOW>; | |
183 | bus-width = <4>; | |
184 | vqmmc-supply = <&vddio_sdmmc1>; | |
185 | }; | |
186 | ||
187 | /* Apalis SD1 */ | |
188 | sdhci@700b0400 { | |
189 | status = "okay"; | |
190 | /* | |
191 | * Don't use SD1_CD# aka SDMMC3_CLK_LB_OUT for now as it | |
192 | * features some magic properties even though the external | |
193 | * loopback is disabled and the internal loopback used as per | |
194 | * SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1 bits being | |
195 | * set to 0xfffd according to the TRM! | |
196 | * cd-gpios = <&gpio TEGRA_GPIO(EE, 4) GPIO_ACTIVE_LOW>; | |
197 | */ | |
198 | bus-width = <4>; | |
199 | vqmmc-supply = <&vddio_sdmmc3>; | |
200 | }; | |
201 | ||
202 | /* EHCI instance 0: USB1_DP/N -> USBO1_DP/N */ | |
203 | usb@7d000000 { | |
204 | status = "okay"; | |
205 | dr_mode = "otg"; | |
206 | }; | |
207 | ||
208 | usb-phy@7d000000 { | |
209 | status = "okay"; | |
210 | vbus-supply = <®_usbo1_vbus>; | |
211 | }; | |
212 | ||
213 | /* EHCI instance 1: USB2_DP/N -> USBH2_DP/N */ | |
214 | usb@7d004000 { | |
215 | status = "okay"; | |
216 | }; | |
217 | ||
218 | usb-phy@7d004000 { | |
219 | status = "okay"; | |
220 | vbus-supply = <®_usbh_vbus>; | |
221 | }; | |
222 | ||
223 | /* EHCI instance 2: USB3_DP/N -> USBH4_DP/N */ | |
224 | usb@7d008000 { | |
225 | status = "okay"; | |
226 | }; | |
227 | ||
228 | usb-phy@7d008000 { | |
229 | status = "okay"; | |
230 | vbus-supply = <®_usbh_vbus>; | |
231 | }; | |
232 | ||
233 | backlight: backlight { | |
234 | compatible = "pwm-backlight"; | |
235 | ||
236 | /* BKL1_PWM */ | |
237 | pwms = <&pwm 3 5000000>; | |
238 | brightness-levels = <255 231 223 207 191 159 127 0>; | |
239 | default-brightness-level = <6>; | |
240 | /* BKL1_ON */ | |
241 | enable-gpios = <&gpio TEGRA_GPIO(BB, 5) GPIO_ACTIVE_HIGH>; | |
242 | }; | |
243 | ||
244 | gpio-keys { | |
245 | compatible = "gpio-keys"; | |
246 | ||
247 | wakeup { | |
248 | label = "WAKE1_MICO"; | |
249 | gpios = <&gpio TEGRA_GPIO(DD, 3) GPIO_ACTIVE_LOW>; | |
250 | linux,code = <KEY_WAKEUP>; | |
251 | debounce-interval = <10>; | |
252 | wakeup-source; | |
253 | }; | |
254 | }; | |
255 | ||
256 | reg_5v0: regulator-5v0 { | |
257 | compatible = "regulator-fixed"; | |
258 | regulator-name = "5V_SW"; | |
259 | regulator-min-microvolt = <5000000>; | |
260 | regulator-max-microvolt = <5000000>; | |
261 | }; | |
262 | ||
263 | /* USBO1_EN */ | |
264 | reg_usbo1_vbus: regulator-usbo1-vbus { | |
265 | compatible = "regulator-fixed"; | |
266 | regulator-name = "VCC_USBO1"; | |
267 | regulator-min-microvolt = <5000000>; | |
268 | regulator-max-microvolt = <5000000>; | |
269 | gpio = <&gpio TEGRA_GPIO(N, 4) GPIO_ACTIVE_HIGH>; | |
270 | enable-active-high; | |
271 | vin-supply = <®_5v0>; | |
272 | }; | |
273 | ||
274 | /* USBH_EN */ | |
275 | reg_usbh_vbus: regulator-usbh-vbus { | |
276 | compatible = "regulator-fixed"; | |
277 | regulator-name = "VCC_USBH(2A|2C|2D|3|4)"; | |
278 | regulator-min-microvolt = <5000000>; | |
279 | regulator-max-microvolt = <5000000>; | |
280 | gpio = <&gpio TEGRA_GPIO(N, 5) GPIO_ACTIVE_HIGH>; | |
281 | enable-active-high; | |
282 | vin-supply = <®_5v0>; | |
283 | }; | |
284 | }; |