blob: b299e541cac079fc317e54f33c47ab4be13331eb [file] [log] [blame]
Krzysztof Kozlowskicc4637f2017-12-25 11:40:09 +01001// SPDX-License-Identifier: GPL-2.0
Krzysztof Kozlowski3a7c01d2015-05-25 21:13:17 +09002/*
Krzysztof Kozlowski6e2422f2018-11-13 20:46:26 +01003 * Hardkernel Odroid XU3/XU3-Lite/XU4 boards common device tree source
Krzysztof Kozlowski3a7c01d2015-05-25 21:13:17 +09004 *
Krzysztof Kozlowski3a7c01d2015-05-25 21:13:17 +09005 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
6 * http://www.samsung.com
Krzysztof Kozlowskif4715dc2016-05-09 08:19:49 +02007 * Copyright (c) 2014 Collabora Ltd.
8 * Copyright (c) 2015 Lukasz Majewski <l.majewski@samsung.com>
9 * Anand Moon <linux.amoon@gmail.com>
Krzysztof Kozlowskicc4637f2017-12-25 11:40:09 +010010 */
Krzysztof Kozlowski3a7c01d2015-05-25 21:13:17 +090011
Brian Kim227c23b2017-09-12 13:57:54 +020012#include <dt-bindings/input/input.h>
Marek Szyprowski1ac49422017-10-02 08:39:34 +020013#include "exynos5422-odroid-core.dtsi"
Krzysztof Kozlowski3a7c01d2015-05-25 21:13:17 +090014
15/ {
Brian Kim227c23b2017-09-12 13:57:54 +020016 gpio_keys {
17 compatible = "gpio-keys";
18 pinctrl-names = "default";
19 pinctrl-0 = <&power_key>;
20
21 power_key {
22 /*
23 * The power button (SW2) is connected to the PWRON
24 * pin (active high) of the S2MPS11 PMIC, which acts
25 * as a 16ms debouce filter and signal inverter with
26 * output on ONOB pin (active low). ONOB PMIC pin is
27 * then connected to XEINT3 SoC pin.
28 */
29 gpios = <&gpx0 3 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_POWER>;
31 label = "power key";
32 debounce-interval = <0>;
33 wakeup-source;
34 };
35 };
36
Krzysztof Kozlowski3a7c01d2015-05-25 21:13:17 +090037 emmc_pwrseq: pwrseq {
38 pinctrl-0 = <&emmc_nrst_pin>;
39 pinctrl-names = "default";
40 compatible = "mmc-pwrseq-emmc";
Javier Martinez Canillas31b99032015-10-08 07:39:58 +090041 reset-gpios = <&gpd1 0 GPIO_ACTIVE_LOW>;
Krzysztof Kozlowski3a7c01d2015-05-25 21:13:17 +090042 };
43
Anand Moonb685d542015-06-15 12:23:20 +093044 fan0: pwm-fan {
45 compatible = "pwm-fan";
46 pwms = <&pwm 0 20972 0>;
47 cooling-min-state = <0>;
48 cooling-max-state = <3>;
49 #cooling-cells = <2>;
50 cooling-levels = <0 130 170 230>;
51 };
Krzysztof Kozlowskif4715dc2016-05-09 08:19:49 +020052
53 thermal-zones {
54 cpu0_thermal: cpu0-thermal {
55 thermal-sensors = <&tmu_cpu0 0>;
56 polling-delay-passive = <250>;
57 polling-delay = <0>;
58 trips {
Willy Wolffe7407312017-09-07 18:10:00 +020059 cpu0_alert0: cpu-alert-0 {
Krzysztof Kozlowskif4715dc2016-05-09 08:19:49 +020060 temperature = <50000>; /* millicelsius */
61 hysteresis = <5000>; /* millicelsius */
62 type = "active";
63 };
Willy Wolffe7407312017-09-07 18:10:00 +020064 cpu0_alert1: cpu-alert-1 {
Krzysztof Kozlowskif4715dc2016-05-09 08:19:49 +020065 temperature = <60000>; /* millicelsius */
66 hysteresis = <5000>; /* millicelsius */
67 type = "active";
68 };
Willy Wolffe7407312017-09-07 18:10:00 +020069 cpu0_alert2: cpu-alert-2 {
Krzysztof Kozlowskif4715dc2016-05-09 08:19:49 +020070 temperature = <70000>; /* millicelsius */
71 hysteresis = <5000>; /* millicelsius */
72 type = "active";
73 };
Willy Wolffe7407312017-09-07 18:10:00 +020074 cpu0_crit0: cpu-crit-0 {
Krzysztof Kozlowskif4715dc2016-05-09 08:19:49 +020075 temperature = <120000>; /* millicelsius */
76 hysteresis = <0>; /* millicelsius */
77 type = "critical";
78 };
79 /*
80 * Exynos542x supports only 4 trip-points
81 * so for these polling mode is required.
82 * Start polling at temperature level of last
Willy Wolffe7407312017-09-07 18:10:00 +020083 * interrupt-driven trip: cpu0_alert2
Krzysztof Kozlowskif4715dc2016-05-09 08:19:49 +020084 */
Willy Wolffe7407312017-09-07 18:10:00 +020085 cpu0_alert3: cpu-alert-3 {
Krzysztof Kozlowskif4715dc2016-05-09 08:19:49 +020086 temperature = <70000>; /* millicelsius */
87 hysteresis = <10000>; /* millicelsius */
88 type = "passive";
89 };
Willy Wolffe7407312017-09-07 18:10:00 +020090 cpu0_alert4: cpu-alert-4 {
Krzysztof Kozlowskif4715dc2016-05-09 08:19:49 +020091 temperature = <85000>; /* millicelsius */
92 hysteresis = <10000>; /* millicelsius */
93 type = "passive";
94 };
Krzysztof Kozlowskif4715dc2016-05-09 08:19:49 +020095 };
96 cooling-maps {
97 map0 {
Willy Wolffe7407312017-09-07 18:10:00 +020098 trip = <&cpu0_alert0>;
Krzysztof Kozlowskif4715dc2016-05-09 08:19:49 +020099 cooling-device = <&fan0 0 1>;
100 };
101 map1 {
Willy Wolffe7407312017-09-07 18:10:00 +0200102 trip = <&cpu0_alert1>;
Krzysztof Kozlowskif4715dc2016-05-09 08:19:49 +0200103 cooling-device = <&fan0 1 2>;
104 };
105 map2 {
Willy Wolffe7407312017-09-07 18:10:00 +0200106 trip = <&cpu0_alert2>;
Krzysztof Kozlowskif4715dc2016-05-09 08:19:49 +0200107 cooling-device = <&fan0 2 3>;
108 };
109 /*
Willy Wolffe7407312017-09-07 18:10:00 +0200110 * When reaching cpu0_alert3, reduce CPU
Krzysztof Kozlowskif4715dc2016-05-09 08:19:49 +0200111 * by 2 steps. On Exynos5422/5800 that would
112 * be: 1600 MHz and 1100 MHz.
113 */
114 map3 {
Willy Wolffe7407312017-09-07 18:10:00 +0200115 trip = <&cpu0_alert3>;
Viresh Kumar670734f2018-11-16 15:31:10 +0530116 cooling-device = <&cpu0 0 2>,
117 <&cpu1 0 2>,
118 <&cpu2 0 2>,
119 <&cpu3 0 2>,
120 <&cpu4 0 2>,
121 <&cpu5 0 2>,
122 <&cpu6 0 2>,
123 <&cpu7 0 2>;
Krzysztof Kozlowskif4715dc2016-05-09 08:19:49 +0200124 };
Krzysztof Kozlowskif4715dc2016-05-09 08:19:49 +0200125 /*
Willy Wolffe7407312017-09-07 18:10:00 +0200126 * When reaching cpu0_alert4, reduce CPU
127 * further, down to 600 MHz (12 steps for big,
Krzysztof Kozlowskif4715dc2016-05-09 08:19:49 +0200128 * 7 steps for LITTLE).
129 */
Viresh Kumar670734f2018-11-16 15:31:10 +0530130 map4 {
Willy Wolffe7407312017-09-07 18:10:00 +0200131 trip = <&cpu0_alert4>;
Viresh Kumar670734f2018-11-16 15:31:10 +0530132 cooling-device = <&cpu0 3 7>,
133 <&cpu1 3 7>,
134 <&cpu2 3 7>,
135 <&cpu3 3 7>,
136 <&cpu4 3 12>,
137 <&cpu5 3 12>,
138 <&cpu6 3 12>,
139 <&cpu7 3 12>;
Willy Wolffe7407312017-09-07 18:10:00 +0200140 };
141 };
142 };
143 cpu1_thermal: cpu1-thermal {
144 thermal-sensors = <&tmu_cpu1 0>;
145 polling-delay-passive = <250>;
146 polling-delay = <0>;
147 trips {
148 cpu1_alert0: cpu-alert-0 {
149 temperature = <50000>;
150 hysteresis = <5000>;
151 type = "active";
152 };
153 cpu1_alert1: cpu-alert-1 {
154 temperature = <60000>;
155 hysteresis = <5000>;
156 type = "active";
157 };
158 cpu1_alert2: cpu-alert-2 {
159 temperature = <70000>;
160 hysteresis = <5000>;
161 type = "active";
162 };
163 cpu1_crit0: cpu-crit-0 {
164 temperature = <120000>;
165 hysteresis = <0>;
166 type = "critical";
167 };
168 cpu1_alert3: cpu-alert-3 {
169 temperature = <70000>;
170 hysteresis = <10000>;
171 type = "passive";
172 };
173 cpu1_alert4: cpu-alert-4 {
174 temperature = <85000>;
175 hysteresis = <10000>;
176 type = "passive";
177 };
178 };
179 cooling-maps {
180 map0 {
181 trip = <&cpu1_alert0>;
182 cooling-device = <&fan0 0 1>;
183 };
184 map1 {
185 trip = <&cpu1_alert1>;
186 cooling-device = <&fan0 1 2>;
187 };
188 map2 {
189 trip = <&cpu1_alert2>;
190 cooling-device = <&fan0 2 3>;
191 };
192 map3 {
193 trip = <&cpu1_alert3>;
Viresh Kumar670734f2018-11-16 15:31:10 +0530194 cooling-device = <&cpu0 0 2>,
195 <&cpu1 0 2>,
196 <&cpu2 0 2>,
197 <&cpu3 0 2>,
198 <&cpu4 0 2>,
199 <&cpu5 0 2>,
200 <&cpu6 0 2>,
201 <&cpu7 0 2>;
Willy Wolffe7407312017-09-07 18:10:00 +0200202 };
203 map4 {
Willy Wolffe7407312017-09-07 18:10:00 +0200204 trip = <&cpu1_alert4>;
Viresh Kumar670734f2018-11-16 15:31:10 +0530205 cooling-device = <&cpu0 3 7>,
206 <&cpu1 3 7>,
207 <&cpu2 3 7>,
208 <&cpu3 3 7>,
209 <&cpu4 3 12>,
210 <&cpu5 3 12>,
211 <&cpu6 3 12>,
212 <&cpu7 3 12>;
Willy Wolffe7407312017-09-07 18:10:00 +0200213 };
214 };
215 };
216 cpu2_thermal: cpu2-thermal {
217 thermal-sensors = <&tmu_cpu2 0>;
218 polling-delay-passive = <250>;
219 polling-delay = <0>;
220 trips {
221 cpu2_alert0: cpu-alert-0 {
222 temperature = <50000>;
223 hysteresis = <5000>;
224 type = "active";
225 };
226 cpu2_alert1: cpu-alert-1 {
227 temperature = <60000>;
228 hysteresis = <5000>;
229 type = "active";
230 };
231 cpu2_alert2: cpu-alert-2 {
232 temperature = <70000>;
233 hysteresis = <5000>;
234 type = "active";
235 };
236 cpu2_crit0: cpu-crit-0 {
237 temperature = <120000>;
238 hysteresis = <0>;
239 type = "critical";
240 };
241 cpu2_alert3: cpu-alert-3 {
242 temperature = <70000>;
243 hysteresis = <10000>;
244 type = "passive";
245 };
246 cpu2_alert4: cpu-alert-4 {
247 temperature = <85000>;
248 hysteresis = <10000>;
249 type = "passive";
250 };
251 };
252 cooling-maps {
253 map0 {
254 trip = <&cpu2_alert0>;
255 cooling-device = <&fan0 0 1>;
256 };
257 map1 {
258 trip = <&cpu2_alert1>;
259 cooling-device = <&fan0 1 2>;
260 };
261 map2 {
262 trip = <&cpu2_alert2>;
263 cooling-device = <&fan0 2 3>;
264 };
265 map3 {
266 trip = <&cpu2_alert3>;
Viresh Kumar670734f2018-11-16 15:31:10 +0530267 cooling-device = <&cpu0 0 2>,
268 <&cpu1 0 2>,
269 <&cpu2 0 2>,
270 <&cpu3 0 2>,
271 <&cpu4 0 2>,
272 <&cpu5 0 2>,
273 <&cpu6 0 2>,
274 <&cpu7 0 2>;
Willy Wolffe7407312017-09-07 18:10:00 +0200275 };
276 map4 {
Willy Wolffe7407312017-09-07 18:10:00 +0200277 trip = <&cpu2_alert4>;
Viresh Kumar670734f2018-11-16 15:31:10 +0530278 cooling-device = <&cpu0 3 7>,
279 <&cpu1 3 7>,
280 <&cpu2 3 7>,
281 <&cpu3 3 7>,
282 <&cpu4 3 12>,
283 <&cpu5 3 12>,
284 <&cpu6 3 12>,
285 <&cpu7 3 12>;
Willy Wolffe7407312017-09-07 18:10:00 +0200286 };
287 };
288 };
289 cpu3_thermal: cpu3-thermal {
290 thermal-sensors = <&tmu_cpu3 0>;
291 polling-delay-passive = <250>;
292 polling-delay = <0>;
293 trips {
294 cpu3_alert0: cpu-alert-0 {
295 temperature = <50000>;
296 hysteresis = <5000>;
297 type = "active";
298 };
299 cpu3_alert1: cpu-alert-1 {
300 temperature = <60000>;
301 hysteresis = <5000>;
302 type = "active";
303 };
304 cpu3_alert2: cpu-alert-2 {
305 temperature = <70000>;
306 hysteresis = <5000>;
307 type = "active";
308 };
309 cpu3_crit0: cpu-crit-0 {
310 temperature = <120000>;
311 hysteresis = <0>;
312 type = "critical";
313 };
314 cpu3_alert3: cpu-alert-3 {
315 temperature = <70000>;
316 hysteresis = <10000>;
317 type = "passive";
318 };
319 cpu3_alert4: cpu-alert-4 {
320 temperature = <85000>;
321 hysteresis = <10000>;
322 type = "passive";
323 };
324 };
325 cooling-maps {
326 map0 {
327 trip = <&cpu3_alert0>;
328 cooling-device = <&fan0 0 1>;
329 };
330 map1 {
331 trip = <&cpu3_alert1>;
332 cooling-device = <&fan0 1 2>;
333 };
334 map2 {
335 trip = <&cpu3_alert2>;
336 cooling-device = <&fan0 2 3>;
337 };
338 map3 {
339 trip = <&cpu3_alert3>;
Viresh Kumar670734f2018-11-16 15:31:10 +0530340 cooling-device = <&cpu0 0 2>,
341 <&cpu1 0 2>,
342 <&cpu2 0 2>,
343 <&cpu3 0 2>,
344 <&cpu4 0 2>,
345 <&cpu5 0 2>,
346 <&cpu6 0 2>,
347 <&cpu7 0 2>;
Willy Wolffe7407312017-09-07 18:10:00 +0200348 };
349 map4 {
Willy Wolffe7407312017-09-07 18:10:00 +0200350 trip = <&cpu3_alert4>;
Viresh Kumar670734f2018-11-16 15:31:10 +0530351 cooling-device = <&cpu0 3 7>,
352 <&cpu1 3 7>,
353 <&cpu2 3 7>,
354 <&cpu3 3 7>,
355 <&cpu4 3 12>,
356 <&cpu5 3 12>,
357 <&cpu6 3 12>,
358 <&cpu7 3 12>;
Krzysztof Kozlowskif4715dc2016-05-09 08:19:49 +0200359 };
360 };
361 };
362 };
Krzysztof Kozlowski3a7c01d2015-05-25 21:13:17 +0900363};
364
Markus Reichlc9a865b2016-11-18 10:55:04 +0100365&adc {
366 vdd-supply = <&ldo4_reg>;
367 status = "okay";
368};
369
Krzysztof Kozlowski3a7c01d2015-05-25 21:13:17 +0900370&hdmi {
371 status = "okay";
Marek Szyprowskic9c51fd2017-09-15 11:11:21 +0200372 ddc = <&i2c_2>;
Milo Kim05b01dd2016-08-24 22:07:16 +0900373 hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>;
Krzysztof Kozlowski3a7c01d2015-05-25 21:13:17 +0900374 pinctrl-names = "default";
375 pinctrl-0 = <&hdmi_hpd_irq>;
376
377 vdd_osc-supply = <&ldo7_reg>;
378 vdd_pll-supply = <&ldo6_reg>;
379 vdd-supply = <&ldo6_reg>;
380};
381
Marek Szyprowski5343b152017-05-31 13:00:17 +0200382&hdmicec {
383 status = "okay";
Hans Verkuil93a4c832017-08-23 18:24:50 +0200384 needs-hpd;
Marek Szyprowski5343b152017-05-31 13:00:17 +0200385};
386
Krzysztof Kozlowski3a7c01d2015-05-25 21:13:17 +0900387&i2c_2 {
388 samsung,i2c-sda-delay = <100>;
389 samsung,i2c-max-bus-freq = <66000>;
Marek Szyprowskic9c51fd2017-09-15 11:11:21 +0200390 /* used by HDMI DDC */
Krzysztof Kozlowski3a7c01d2015-05-25 21:13:17 +0900391 status = "okay";
Krzysztof Kozlowski3a7c01d2015-05-25 21:13:17 +0900392};
393
Krzysztof Kozlowskib5124e42018-08-06 18:09:32 +0200394&ldo26_reg {
395 regulator-min-microvolt = <3000000>;
396 regulator-max-microvolt = <3000000>;
397 regulator-always-on;
398};
399
Marek Szyprowski1cb686c2017-09-15 11:11:23 +0200400&mixer {
401 status = "okay";
402};
403
Krzysztof Kozlowski3a7c01d2015-05-25 21:13:17 +0900404&mmc_0 {
405 status = "okay";
406 mmc-pwrseq = <&emmc_pwrseq>;
Krzysztof Kozlowski3a7c01d2015-05-25 21:13:17 +0900407 card-detect-delay = <200>;
408 samsung,dw-mshc-ciu-div = <3>;
409 samsung,dw-mshc-sdr-timing = <0 4>;
410 samsung,dw-mshc-ddr-timing = <0 2>;
411 samsung,dw-mshc-hs400-timing = <0 2>;
412 samsung,read-strobe-delay = <90>;
413 pinctrl-names = "default";
414 pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus1 &sd0_bus4 &sd0_bus8 &sd0_cd &sd0_rclk>;
415 bus-width = <8>;
416 cap-mmc-highspeed;
417 mmc-hs200-1_8v;
418 mmc-hs400-1_8v;
Anand Moon4289c862018-09-27 14:07:37 +0000419 max-frequency = <200000000>;
Markus Reichl399fc182016-04-04 11:55:13 +0200420 vmmc-supply = <&ldo18_reg>;
421 vqmmc-supply = <&ldo3_reg>;
Krzysztof Kozlowski3a7c01d2015-05-25 21:13:17 +0900422};
423
Krzysztof Kozlowski3a7c01d2015-05-25 21:13:17 +0900424&pinctrl_0 {
Brian Kim227c23b2017-09-12 13:57:54 +0200425 power_key: power-key {
426 samsung,pins = "gpx0-3";
427 samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
428 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
429 samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
430 };
431
Krzysztof Kozlowski3a7c01d2015-05-25 21:13:17 +0900432 hdmi_hpd_irq: hdmi-hpd-irq {
433 samsung,pins = "gpx3-7";
Krzysztof Kozlowskia2f2bc32016-09-04 13:04:14 +0200434 samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
435 samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
436 samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
Krzysztof Kozlowski3a7c01d2015-05-25 21:13:17 +0900437 };
Krzysztof Kozlowski3a7c01d2015-05-25 21:13:17 +0900438};
439
440&pinctrl_1 {
441 emmc_nrst_pin: emmc-nrst {
442 samsung,pins = "gpd1-0";
Krzysztof Kozlowskia2f2bc32016-09-04 13:04:14 +0200443 samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
444 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
445 samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
Krzysztof Kozlowski3a7c01d2015-05-25 21:13:17 +0900446 };
447};