Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / exynos5422-odroidxu3-common.dtsi
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Hardkernel Odroid XU3 board device tree source
4  *
5  * Copyright (c) 2013 Samsung Electronics Co., Ltd.
6  *              http://www.samsung.com
7  * Copyright (c) 2014 Collabora Ltd.
8  * Copyright (c) 2015 Lukasz Majewski <l.majewski@samsung.com>
9  *                    Anand Moon <linux.amoon@gmail.com>
10  */
11
12 #include <dt-bindings/input/input.h>
13 #include "exynos5422-odroid-core.dtsi"
14
15 / {
16         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
37         emmc_pwrseq: pwrseq {
38                 pinctrl-0 = <&emmc_nrst_pin>;
39                 pinctrl-names = "default";
40                 compatible = "mmc-pwrseq-emmc";
41                 reset-gpios = <&gpd1 0 GPIO_ACTIVE_LOW>;
42         };
43
44         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         };
52
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 {
59                                 cpu0_alert0: cpu-alert-0 {
60                                         temperature = <50000>; /* millicelsius */
61                                         hysteresis = <5000>; /* millicelsius */
62                                         type = "active";
63                                 };
64                                 cpu0_alert1: cpu-alert-1 {
65                                         temperature = <60000>; /* millicelsius */
66                                         hysteresis = <5000>; /* millicelsius */
67                                         type = "active";
68                                 };
69                                 cpu0_alert2: cpu-alert-2 {
70                                         temperature = <70000>; /* millicelsius */
71                                         hysteresis = <5000>; /* millicelsius */
72                                         type = "active";
73                                 };
74                                 cpu0_crit0: cpu-crit-0 {
75                                         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
83                                  * interrupt-driven trip: cpu0_alert2
84                                  */
85                                 cpu0_alert3: cpu-alert-3 {
86                                         temperature = <70000>; /* millicelsius */
87                                         hysteresis = <10000>; /* millicelsius */
88                                         type = "passive";
89                                 };
90                                 cpu0_alert4: cpu-alert-4 {
91                                         temperature = <85000>; /* millicelsius */
92                                         hysteresis = <10000>; /* millicelsius */
93                                         type = "passive";
94                                 };
95                         };
96                         cooling-maps {
97                                 map0 {
98                                         trip = <&cpu0_alert0>;
99                                         cooling-device = <&fan0 0 1>;
100                                 };
101                                 map1 {
102                                         trip = <&cpu0_alert1>;
103                                         cooling-device = <&fan0 1 2>;
104                                 };
105                                 map2 {
106                                         trip = <&cpu0_alert2>;
107                                         cooling-device = <&fan0 2 3>;
108                                 };
109                                 /*
110                                  * When reaching cpu0_alert3, reduce CPU
111                                  * by 2 steps. On Exynos5422/5800 that would
112                                  * be: 1600 MHz and 1100 MHz.
113                                  */
114                                 map3 {
115                                         trip = <&cpu0_alert3>;
116                                         cooling-device = <&cpu0 0 2>;
117                                 };
118                                 map4 {
119                                         trip = <&cpu0_alert3>;
120                                         cooling-device = <&cpu4 0 2>;
121                                 };
122                                 /*
123                                  * When reaching cpu0_alert4, reduce CPU
124                                  * further, down to 600 MHz (12 steps for big,
125                                  * 7 steps for LITTLE).
126                                  */
127                                 map5 {
128                                         trip = <&cpu0_alert4>;
129                                         cooling-device = <&cpu0 3 7>;
130                                 };
131                                 map6 {
132                                         trip = <&cpu0_alert4>;
133                                         cooling-device = <&cpu4 3 12>;
134                                 };
135                         };
136                 };
137                 cpu1_thermal: cpu1-thermal {
138                         thermal-sensors = <&tmu_cpu1 0>;
139                         polling-delay-passive = <250>;
140                         polling-delay = <0>;
141                         trips {
142                                 cpu1_alert0: cpu-alert-0 {
143                                         temperature = <50000>;
144                                         hysteresis = <5000>;
145                                         type = "active";
146                                 };
147                                 cpu1_alert1: cpu-alert-1 {
148                                         temperature = <60000>;
149                                         hysteresis = <5000>;
150                                         type = "active";
151                                 };
152                                 cpu1_alert2: cpu-alert-2 {
153                                         temperature = <70000>;
154                                         hysteresis = <5000>;
155                                         type = "active";
156                                 };
157                                 cpu1_crit0: cpu-crit-0 {
158                                         temperature = <120000>;
159                                         hysteresis = <0>;
160                                         type = "critical";
161                                 };
162                                 cpu1_alert3: cpu-alert-3 {
163                                         temperature = <70000>;
164                                         hysteresis = <10000>;
165                                         type = "passive";
166                                 };
167                                 cpu1_alert4: cpu-alert-4 {
168                                         temperature = <85000>;
169                                         hysteresis = <10000>;
170                                         type = "passive";
171                                 };
172                         };
173                         cooling-maps {
174                                 map0 {
175                                         trip = <&cpu1_alert0>;
176                                         cooling-device = <&fan0 0 1>;
177                                 };
178                                 map1 {
179                                         trip = <&cpu1_alert1>;
180                                         cooling-device = <&fan0 1 2>;
181                                 };
182                                 map2 {
183                                         trip = <&cpu1_alert2>;
184                                         cooling-device = <&fan0 2 3>;
185                                 };
186                                 map3 {
187                                         trip = <&cpu1_alert3>;
188                                         cooling-device = <&cpu0 0 2>;
189                                 };
190                                 map4 {
191                                         trip = <&cpu1_alert3>;
192                                         cooling-device = <&cpu4 0 2>;
193                                 };
194                                 map5 {
195                                         trip = <&cpu1_alert4>;
196                                         cooling-device = <&cpu0 3 7>;
197                                 };
198                                 map6 {
199                                         trip = <&cpu1_alert4>;
200                                         cooling-device = <&cpu4 3 12>;
201                                 };
202                         };
203                 };
204                 cpu2_thermal: cpu2-thermal {
205                         thermal-sensors = <&tmu_cpu2 0>;
206                         polling-delay-passive = <250>;
207                         polling-delay = <0>;
208                         trips {
209                                 cpu2_alert0: cpu-alert-0 {
210                                         temperature = <50000>;
211                                         hysteresis = <5000>;
212                                         type = "active";
213                                 };
214                                 cpu2_alert1: cpu-alert-1 {
215                                         temperature = <60000>;
216                                         hysteresis = <5000>;
217                                         type = "active";
218                                 };
219                                 cpu2_alert2: cpu-alert-2 {
220                                         temperature = <70000>;
221                                         hysteresis = <5000>;
222                                         type = "active";
223                                 };
224                                 cpu2_crit0: cpu-crit-0 {
225                                         temperature = <120000>;
226                                         hysteresis = <0>;
227                                         type = "critical";
228                                 };
229                                 cpu2_alert3: cpu-alert-3 {
230                                         temperature = <70000>;
231                                         hysteresis = <10000>;
232                                         type = "passive";
233                                 };
234                                 cpu2_alert4: cpu-alert-4 {
235                                         temperature = <85000>;
236                                         hysteresis = <10000>;
237                                         type = "passive";
238                                 };
239                         };
240                         cooling-maps {
241                                 map0 {
242                                         trip = <&cpu2_alert0>;
243                                         cooling-device = <&fan0 0 1>;
244                                 };
245                                 map1 {
246                                         trip = <&cpu2_alert1>;
247                                         cooling-device = <&fan0 1 2>;
248                                 };
249                                 map2 {
250                                         trip = <&cpu2_alert2>;
251                                         cooling-device = <&fan0 2 3>;
252                                 };
253                                 map3 {
254                                         trip = <&cpu2_alert3>;
255                                         cooling-device = <&cpu0 0 2>;
256                                 };
257                                 map4 {
258                                         trip = <&cpu2_alert3>;
259                                         cooling-device = <&cpu4 0 2>;
260                                 };
261                                 map5 {
262                                         trip = <&cpu2_alert4>;
263                                         cooling-device = <&cpu0 3 7>;
264                                 };
265                                 map6 {
266                                         trip = <&cpu2_alert4>;
267                                         cooling-device = <&cpu4 3 12>;
268                                 };
269                         };
270                 };
271                 cpu3_thermal: cpu3-thermal {
272                         thermal-sensors = <&tmu_cpu3 0>;
273                         polling-delay-passive = <250>;
274                         polling-delay = <0>;
275                         trips {
276                                 cpu3_alert0: cpu-alert-0 {
277                                         temperature = <50000>;
278                                         hysteresis = <5000>;
279                                         type = "active";
280                                 };
281                                 cpu3_alert1: cpu-alert-1 {
282                                         temperature = <60000>;
283                                         hysteresis = <5000>;
284                                         type = "active";
285                                 };
286                                 cpu3_alert2: cpu-alert-2 {
287                                         temperature = <70000>;
288                                         hysteresis = <5000>;
289                                         type = "active";
290                                 };
291                                 cpu3_crit0: cpu-crit-0 {
292                                         temperature = <120000>;
293                                         hysteresis = <0>;
294                                         type = "critical";
295                                 };
296                                 cpu3_alert3: cpu-alert-3 {
297                                         temperature = <70000>;
298                                         hysteresis = <10000>;
299                                         type = "passive";
300                                 };
301                                 cpu3_alert4: cpu-alert-4 {
302                                         temperature = <85000>;
303                                         hysteresis = <10000>;
304                                         type = "passive";
305                                 };
306                         };
307                         cooling-maps {
308                                 map0 {
309                                         trip = <&cpu3_alert0>;
310                                         cooling-device = <&fan0 0 1>;
311                                 };
312                                 map1 {
313                                         trip = <&cpu3_alert1>;
314                                         cooling-device = <&fan0 1 2>;
315                                 };
316                                 map2 {
317                                         trip = <&cpu3_alert2>;
318                                         cooling-device = <&fan0 2 3>;
319                                 };
320                                 map3 {
321                                         trip = <&cpu3_alert3>;
322                                         cooling-device = <&cpu0 0 2>;
323                                 };
324                                 map4 {
325                                         trip = <&cpu3_alert3>;
326                                         cooling-device = <&cpu4 0 2>;
327                                 };
328                                 map5 {
329                                         trip = <&cpu3_alert4>;
330                                         cooling-device = <&cpu0 3 7>;
331                                 };
332                                 map6 {
333                                         trip = <&cpu3_alert4>;
334                                         cooling-device = <&cpu4 3 12>;
335                                 };
336                         };
337                 };
338         };
339 };
340
341 &adc {
342         vdd-supply = <&ldo4_reg>;
343         status = "okay";
344 };
345
346 &hdmi {
347         status = "okay";
348         ddc = <&i2c_2>;
349         hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>;
350         pinctrl-names = "default";
351         pinctrl-0 = <&hdmi_hpd_irq>;
352
353         vdd_osc-supply = <&ldo7_reg>;
354         vdd_pll-supply = <&ldo6_reg>;
355         vdd-supply = <&ldo6_reg>;
356 };
357
358 &hdmicec {
359         status = "okay";
360         needs-hpd;
361 };
362
363 &i2c_2 {
364         samsung,i2c-sda-delay = <100>;
365         samsung,i2c-max-bus-freq = <66000>;
366         /* used by HDMI DDC */
367         status = "okay";
368 };
369
370 &mixer {
371         status = "okay";
372 };
373
374 &mmc_0 {
375         status = "okay";
376         mmc-pwrseq = <&emmc_pwrseq>;
377         card-detect-delay = <200>;
378         samsung,dw-mshc-ciu-div = <3>;
379         samsung,dw-mshc-sdr-timing = <0 4>;
380         samsung,dw-mshc-ddr-timing = <0 2>;
381         samsung,dw-mshc-hs400-timing = <0 2>;
382         samsung,read-strobe-delay = <90>;
383         pinctrl-names = "default";
384         pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus1 &sd0_bus4 &sd0_bus8 &sd0_cd &sd0_rclk>;
385         bus-width = <8>;
386         cap-mmc-highspeed;
387         mmc-hs200-1_8v;
388         mmc-hs400-1_8v;
389         vmmc-supply = <&ldo18_reg>;
390         vqmmc-supply = <&ldo3_reg>;
391 };
392
393 &pinctrl_0 {
394         power_key: power-key {
395                 samsung,pins = "gpx0-3";
396                 samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
397                 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
398                 samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
399         };
400
401         hdmi_hpd_irq: hdmi-hpd-irq {
402                 samsung,pins = "gpx3-7";
403                 samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
404                 samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
405                 samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
406         };
407 };
408
409 &pinctrl_1 {
410         emmc_nrst_pin: emmc-nrst {
411                 samsung,pins = "gpd1-0";
412                 samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
413                 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
414                 samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
415         };
416 };