1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Hardkernel Odroid HC1 board device tree source
4 *
5 * Copyright (c) 2017 Marek Szyprowski
6 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
7 *		http://www.samsung.com
8 */
9
10/dts-v1/;
11#include <dt-bindings/leds/common.h>
12#include "exynos5422-odroid-core.dtsi"
13
14/ {
15	model = "Hardkernel Odroid HC1";
16	compatible = "hardkernel,odroid-hc1", "samsung,exynos5800", \
17		     "samsung,exynos5";
18
19	led-controller {
20		compatible = "pwm-leds";
21
22		led-1 {
23			function = LED_FUNCTION_HEARTBEAT;
24			color = <LED_COLOR_ID_BLUE>;
25			pwms = <&pwm 2 2000000 0>;
26			pwm-names = "pwm2";
27			max-brightness = <255>;
28			linux,default-trigger = "heartbeat";
29		};
30	};
31
32	thermal-zones {
33		cpu0_thermal: cpu0-thermal {
34			thermal-sensors = <&tmu_cpu0>;
35			trips {
36				cpu0_alert0: cpu-alert-0 {
37					temperature = <70000>; /* millicelsius */
38					hysteresis = <10000>; /* millicelsius */
39					type = "active";
40				};
41				cpu0_alert1: cpu-alert-1 {
42					temperature = <85000>; /* millicelsius */
43					hysteresis = <10000>; /* millicelsius */
44					type = "active";
45				};
46				cpu0_crit0: cpu-crit-0 {
47					temperature = <120000>; /* millicelsius */
48					hysteresis = <0>; /* millicelsius */
49					type = "critical";
50				};
51			};
52
53			cooling-maps {
54				/*
55				 * When reaching cpu0_alert0, reduce CPU
56				 * by 2 steps. On Exynos5422/5800 that would
57				 * be: 1600 MHz and 1100 MHz.
58				 */
59				map0 {
60					trip = <&cpu0_alert0>;
61					cooling-device = <&cpu0 0 2>,
62							 <&cpu1 0 2>,
63							 <&cpu2 0 2>,
64							 <&cpu3 0 2>,
65							 <&cpu4 0 2>,
66							 <&cpu5 0 2>,
67							 <&cpu6 0 2>,
68							 <&cpu7 0 2>;
69				};
70				/*
71				 * When reaching cpu0_alert1, reduce CPU
72				 * further, down to 600 MHz (12 steps for big,
73				 * 7 steps for LITTLE).
74				 */
75				map1 {
76					trip = <&cpu0_alert1>;
77					cooling-device = <&cpu0 3 8>,
78							 <&cpu1 3 8>,
79							 <&cpu2 3 8>,
80							 <&cpu3 3 8>,
81							 <&cpu4 3 14>,
82							 <&cpu5 3 14>,
83							 <&cpu6 3 14>,
84							 <&cpu7 3 14>;
85				};
86			};
87		};
88		cpu1_thermal: cpu1-thermal {
89			thermal-sensors = <&tmu_cpu1>;
90			trips {
91				cpu1_alert0: cpu-alert-0 {
92					temperature = <70000>;
93					hysteresis = <10000>;
94					type = "active";
95				};
96				cpu1_alert1: cpu-alert-1 {
97					temperature = <85000>;
98					hysteresis = <10000>;
99					type = "active";
100				};
101				cpu1_crit0: cpu-crit-0 {
102					temperature = <120000>;
103					hysteresis = <0>;
104					type = "critical";
105				};
106			};
107			cooling-maps {
108				map0 {
109					trip = <&cpu1_alert0>;
110					cooling-device = <&cpu0 0 2>,
111							 <&cpu1 0 2>,
112							 <&cpu2 0 2>,
113							 <&cpu3 0 2>,
114							 <&cpu4 0 2>,
115							 <&cpu5 0 2>,
116							 <&cpu6 0 2>,
117							 <&cpu7 0 2>;
118				};
119				map1 {
120					trip = <&cpu1_alert1>;
121					cooling-device = <&cpu0 3 8>,
122							 <&cpu1 3 8>,
123							 <&cpu2 3 8>,
124							 <&cpu3 3 8>,
125							 <&cpu4 3 14>,
126							 <&cpu5 3 14>,
127							 <&cpu6 3 14>,
128							 <&cpu7 3 14>;
129				};
130			};
131		};
132		cpu2_thermal: cpu2-thermal {
133			thermal-sensors = <&tmu_cpu2>;
134			trips {
135				cpu2_alert0: cpu-alert-0 {
136					temperature = <70000>;
137					hysteresis = <10000>;
138					type = "active";
139				};
140				cpu2_alert1: cpu-alert-1 {
141					temperature = <85000>;
142					hysteresis = <10000>;
143					type = "active";
144				};
145				cpu2_crit0: cpu-crit-0 {
146					temperature = <120000>;
147					hysteresis = <0>;
148					type = "critical";
149				};
150			};
151			cooling-maps {
152				map0 {
153					trip = <&cpu2_alert0>;
154					cooling-device = <&cpu0 0 2>,
155							 <&cpu1 0 2>,
156							 <&cpu2 0 2>,
157							 <&cpu3 0 2>,
158							 <&cpu4 0 2>,
159							 <&cpu5 0 2>,
160							 <&cpu6 0 2>,
161							 <&cpu7 0 2>;
162				};
163				map1 {
164					trip = <&cpu2_alert1>;
165					cooling-device = <&cpu0 3 8>,
166							 <&cpu1 3 8>,
167							 <&cpu2 3 8>,
168							 <&cpu3 3 8>,
169							 <&cpu4 3 14>,
170							 <&cpu5 3 14>,
171							 <&cpu6 3 14>,
172							 <&cpu7 3 14>;
173				};
174			};
175		};
176		cpu3_thermal: cpu3-thermal {
177			thermal-sensors = <&tmu_cpu3>;
178			trips {
179				cpu3_alert0: cpu-alert-0 {
180					temperature = <70000>;
181					hysteresis = <10000>;
182					type = "active";
183				};
184				cpu3_alert1: cpu-alert-1 {
185					temperature = <85000>;
186					hysteresis = <10000>;
187					type = "active";
188				};
189				cpu3_crit0: cpu-crit-0 {
190					temperature = <120000>;
191					hysteresis = <0>;
192					type = "critical";
193				};
194			};
195			cooling-maps {
196				map0 {
197					trip = <&cpu3_alert0>;
198					cooling-device = <&cpu0 0 2>,
199							 <&cpu1 0 2>,
200							 <&cpu2 0 2>,
201							 <&cpu3 0 2>,
202							 <&cpu4 0 2>,
203							 <&cpu5 0 2>,
204							 <&cpu6 0 2>,
205							 <&cpu7 0 2>;
206				};
207				map1 {
208					trip = <&cpu3_alert1>;
209					cooling-device = <&cpu0 3 8>,
210							 <&cpu1 3 8>,
211							 <&cpu2 3 8>,
212							 <&cpu3 3 8>,
213							 <&cpu4 3 14>,
214							 <&cpu5 3 14>,
215							 <&cpu6 3 14>,
216							 <&cpu7 3 14>;
217				};
218			};
219		};
220		gpu_thermal: gpu-thermal {
221			thermal-sensors = <&tmu_gpu>;
222			trips {
223				gpu_alert0: gpu-alert-0 {
224					temperature = <70000>;
225					hysteresis = <10000>;
226					type = "active";
227				};
228				gpu_alert1: gpu-alert-1 {
229					temperature = <85000>;
230					hysteresis = <10000>;
231					type = "active";
232				};
233				gpu_crit0: gpu-crit-0 {
234					temperature = <120000>;
235					hysteresis = <0>;
236					type = "critical";
237				};
238			};
239			cooling-maps {
240				map0 {
241					trip = <&gpu_alert0>;
242					cooling-device = <&gpu 0 2>;
243				};
244				map1 {
245					trip = <&gpu_alert1>;
246					cooling-device = <&gpu 3 6>;
247				};
248			};
249		};
250	};
251
252};
253
254&pwm {
255	/*
256	 * PWM 2 -- Blue LED
257	 */
258	pinctrl-0 = <&pwm2_out>;
259	pinctrl-names = "default";
260	samsung,pwm-outputs = <2>;
261	status = "okay";
262};
263
264&usbdrd_dwc3_1 {
265	dr_mode = "host";
266};
267