Merge branch 'x86-tsx-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[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/XU3-Lite/XU4 boards common 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                                                          <&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>;
124                                 };
125                                 /*
126                                  * When reaching cpu0_alert4, reduce CPU
127                                  * further, down to 600 MHz (12 steps for big,
128                                  * 7 steps for LITTLE).
129                                  */
130                                 map4 {
131                                         trip = <&cpu0_alert4>;
132                                         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>;
140                                 };
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>;
194                                         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>;
202                                 };
203                                 map4 {
204                                         trip = <&cpu1_alert4>;
205                                         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>;
213                                 };
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>;
267                                         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>;
275                                 };
276                                 map4 {
277                                         trip = <&cpu2_alert4>;
278                                         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>;
286                                 };
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>;
340                                         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>;
348                                 };
349                                 map4 {
350                                         trip = <&cpu3_alert4>;
351                                         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>;
359                                 };
360                         };
361                 };
362         };
363 };
364
365 &hdmi {
366         status = "okay";
367         ddc = <&i2c_2>;
368         hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>;
369         pinctrl-names = "default";
370         pinctrl-0 = <&hdmi_hpd_irq>;
371
372         vdd_osc-supply = <&ldo7_reg>;
373         vdd_pll-supply = <&ldo6_reg>;
374         vdd-supply = <&ldo6_reg>;
375 };
376
377 &hdmicec {
378         status = "okay";
379         needs-hpd;
380 };
381
382 &i2c_2 {
383         samsung,i2c-sda-delay = <100>;
384         samsung,i2c-max-bus-freq = <66000>;
385         /* used by HDMI DDC */
386         status = "okay";
387 };
388
389 &ldo26_reg {
390         regulator-min-microvolt = <3000000>;
391         regulator-max-microvolt = <3000000>;
392         regulator-always-on;
393 };
394
395 &mixer {
396         status = "okay";
397 };
398
399 &mmc_0 {
400         status = "okay";
401         mmc-pwrseq = <&emmc_pwrseq>;
402         card-detect-delay = <200>;
403         samsung,dw-mshc-ciu-div = <3>;
404         samsung,dw-mshc-sdr-timing = <0 4>;
405         samsung,dw-mshc-ddr-timing = <0 2>;
406         samsung,dw-mshc-hs400-timing = <0 2>;
407         samsung,read-strobe-delay = <90>;
408         pinctrl-names = "default";
409         pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus1 &sd0_bus4 &sd0_bus8 &sd0_cd &sd0_rclk>;
410         bus-width = <8>;
411         cap-mmc-highspeed;
412         mmc-hs200-1_8v;
413         mmc-hs400-1_8v;
414         max-frequency = <200000000>;
415         vmmc-supply = <&ldo18_reg>;
416         vqmmc-supply = <&ldo3_reg>;
417 };
418
419 &pinctrl_0 {
420         power_key: power-key {
421                 samsung,pins = "gpx0-3";
422                 samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
423                 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
424                 samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
425         };
426
427         hdmi_hpd_irq: hdmi-hpd-irq {
428                 samsung,pins = "gpx3-7";
429                 samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
430                 samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
431                 samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
432         };
433 };
434
435 &pinctrl_1 {
436         emmc_nrst_pin: emmc-nrst {
437                 samsung,pins = "gpd1-0";
438                 samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
439                 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
440                 samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
441         };
442 };