exynos5422-odroidxu3-common.dtsi 9.84 KB
Newer Older
1
// SPDX-License-Identifier: GPL-2.0
2
/*
3
 * Hardkernel Odroid XU3/XU3-Lite/XU4 boards common device tree source
4 5 6
 *
 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
 *		http://www.samsung.com
7 8 9
 * Copyright (c) 2014 Collabora Ltd.
 * Copyright (c) 2015 Lukasz Majewski <l.majewski@samsung.com>
 *                    Anand Moon <linux.amoon@gmail.com>
10
 */
11

12
#include <dt-bindings/input/input.h>
13
#include "exynos5422-odroid-core.dtsi"
14 15

/ {
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
	gpio_keys {
		compatible = "gpio-keys";
		pinctrl-names = "default";
		pinctrl-0 = <&power_key>;

		power_key {
			/*
			 * The power button (SW2) is connected to the PWRON
			 * pin (active high) of the S2MPS11 PMIC, which acts
			 * as a 16ms debouce filter and signal inverter with
			 * output on ONOB pin (active low). ONOB PMIC pin is
			 * then connected to XEINT3 SoC pin.
			 */
			gpios = <&gpx0 3 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_POWER>;
			label = "power key";
			debounce-interval = <0>;
			wakeup-source;
		};
	};

37 38 39 40
	emmc_pwrseq: pwrseq {
		pinctrl-0 = <&emmc_nrst_pin>;
		pinctrl-names = "default";
		compatible = "mmc-pwrseq-emmc";
41
		reset-gpios = <&gpd1 0 GPIO_ACTIVE_LOW>;
42 43
	};

44 45 46 47 48 49 50 51
	fan0: pwm-fan {
		compatible = "pwm-fan";
		pwms = <&pwm 0 20972 0>;
		cooling-min-state = <0>;
		cooling-max-state = <3>;
		#cooling-cells = <2>;
		cooling-levels = <0 130 170 230>;
	};
52 53 54 55 56 57 58

	thermal-zones {
		cpu0_thermal: cpu0-thermal {
			thermal-sensors = <&tmu_cpu0 0>;
			polling-delay-passive = <250>;
			polling-delay = <0>;
			trips {
59
				cpu0_alert0: cpu-alert-0 {
60 61 62 63
					temperature = <50000>; /* millicelsius */
					hysteresis = <5000>; /* millicelsius */
					type = "active";
				};
64
				cpu0_alert1: cpu-alert-1 {
65 66 67 68
					temperature = <60000>; /* millicelsius */
					hysteresis = <5000>; /* millicelsius */
					type = "active";
				};
69
				cpu0_alert2: cpu-alert-2 {
70 71 72 73
					temperature = <70000>; /* millicelsius */
					hysteresis = <5000>; /* millicelsius */
					type = "active";
				};
74
				cpu0_crit0: cpu-crit-0 {
75 76 77 78 79 80 81 82
					temperature = <120000>; /* millicelsius */
					hysteresis = <0>; /* millicelsius */
					type = "critical";
				};
				/*
				 * Exynos542x supports only 4 trip-points
				 * so for these polling mode is required.
				 * Start polling at temperature level of last
83
				 * interrupt-driven trip: cpu0_alert2
84
				 */
85
				cpu0_alert3: cpu-alert-3 {
86 87 88 89
					temperature = <70000>; /* millicelsius */
					hysteresis = <10000>; /* millicelsius */
					type = "passive";
				};
90
				cpu0_alert4: cpu-alert-4 {
91 92 93 94 95 96 97
					temperature = <85000>; /* millicelsius */
					hysteresis = <10000>; /* millicelsius */
					type = "passive";
				};
			};
			cooling-maps {
				map0 {
98
					trip = <&cpu0_alert0>;
99 100 101
					cooling-device = <&fan0 0 1>;
				};
				map1 {
102
					trip = <&cpu0_alert1>;
103 104 105
					cooling-device = <&fan0 1 2>;
				};
				map2 {
106
					trip = <&cpu0_alert2>;
107 108 109
					cooling-device = <&fan0 2 3>;
				};
				/*
110
				 * When reaching cpu0_alert3, reduce CPU
111 112 113 114
				 * by 2 steps. On Exynos5422/5800 that would
				 * be: 1600 MHz and 1100 MHz.
				 */
				map3 {
115
					trip = <&cpu0_alert3>;
116 117 118 119 120 121 122 123
					cooling-device = <&cpu0 0 2>,
							 <&cpu1 0 2>,
							 <&cpu2 0 2>,
							 <&cpu3 0 2>,
							 <&cpu4 0 2>,
							 <&cpu5 0 2>,
							 <&cpu6 0 2>,
							 <&cpu7 0 2>;
124 125
				};
				/*
126 127
				 * When reaching cpu0_alert4, reduce CPU
				 * further, down to 600 MHz (12 steps for big,
128 129
				 * 7 steps for LITTLE).
				 */
130
				map4 {
131
					trip = <&cpu0_alert4>;
132 133 134 135 136 137 138 139
					cooling-device = <&cpu0 3 7>,
							 <&cpu1 3 7>,
							 <&cpu2 3 7>,
							 <&cpu3 3 7>,
							 <&cpu4 3 12>,
							 <&cpu5 3 12>,
							 <&cpu6 3 12>,
							 <&cpu7 3 12>;
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193
				};
			};
		};
		cpu1_thermal: cpu1-thermal {
			thermal-sensors = <&tmu_cpu1 0>;
			polling-delay-passive = <250>;
			polling-delay = <0>;
			trips {
				cpu1_alert0: cpu-alert-0 {
					temperature = <50000>;
					hysteresis = <5000>;
					type = "active";
				};
				cpu1_alert1: cpu-alert-1 {
					temperature = <60000>;
					hysteresis = <5000>;
					type = "active";
				};
				cpu1_alert2: cpu-alert-2 {
					temperature = <70000>;
					hysteresis = <5000>;
					type = "active";
				};
				cpu1_crit0: cpu-crit-0 {
					temperature = <120000>;
					hysteresis = <0>;
					type = "critical";
				};
				cpu1_alert3: cpu-alert-3 {
					temperature = <70000>;
					hysteresis = <10000>;
					type = "passive";
				};
				cpu1_alert4: cpu-alert-4 {
					temperature = <85000>;
					hysteresis = <10000>;
					type = "passive";
				};
			};
			cooling-maps {
				map0 {
					trip = <&cpu1_alert0>;
					cooling-device = <&fan0 0 1>;
				};
				map1 {
					trip = <&cpu1_alert1>;
					cooling-device = <&fan0 1 2>;
				};
				map2 {
					trip = <&cpu1_alert2>;
					cooling-device = <&fan0 2 3>;
				};
				map3 {
					trip = <&cpu1_alert3>;
194 195 196 197 198 199 200 201
					cooling-device = <&cpu0 0 2>,
							 <&cpu1 0 2>,
							 <&cpu2 0 2>,
							 <&cpu3 0 2>,
							 <&cpu4 0 2>,
							 <&cpu5 0 2>,
							 <&cpu6 0 2>,
							 <&cpu7 0 2>;
202 203 204
				};
				map4 {
					trip = <&cpu1_alert4>;
205 206 207 208 209 210 211 212
					cooling-device = <&cpu0 3 7>,
							 <&cpu1 3 7>,
							 <&cpu2 3 7>,
							 <&cpu3 3 7>,
							 <&cpu4 3 12>,
							 <&cpu5 3 12>,
							 <&cpu6 3 12>,
							 <&cpu7 3 12>;
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266
				};
			};
		};
		cpu2_thermal: cpu2-thermal {
			thermal-sensors = <&tmu_cpu2 0>;
			polling-delay-passive = <250>;
			polling-delay = <0>;
			trips {
				cpu2_alert0: cpu-alert-0 {
					temperature = <50000>;
					hysteresis = <5000>;
					type = "active";
				};
				cpu2_alert1: cpu-alert-1 {
					temperature = <60000>;
					hysteresis = <5000>;
					type = "active";
				};
				cpu2_alert2: cpu-alert-2 {
					temperature = <70000>;
					hysteresis = <5000>;
					type = "active";
				};
				cpu2_crit0: cpu-crit-0 {
					temperature = <120000>;
					hysteresis = <0>;
					type = "critical";
				};
				cpu2_alert3: cpu-alert-3 {
					temperature = <70000>;
					hysteresis = <10000>;
					type = "passive";
				};
				cpu2_alert4: cpu-alert-4 {
					temperature = <85000>;
					hysteresis = <10000>;
					type = "passive";
				};
			};
			cooling-maps {
				map0 {
					trip = <&cpu2_alert0>;
					cooling-device = <&fan0 0 1>;
				};
				map1 {
					trip = <&cpu2_alert1>;
					cooling-device = <&fan0 1 2>;
				};
				map2 {
					trip = <&cpu2_alert2>;
					cooling-device = <&fan0 2 3>;
				};
				map3 {
					trip = <&cpu2_alert3>;
267 268 269 270 271 272 273 274
					cooling-device = <&cpu0 0 2>,
							 <&cpu1 0 2>,
							 <&cpu2 0 2>,
							 <&cpu3 0 2>,
							 <&cpu4 0 2>,
							 <&cpu5 0 2>,
							 <&cpu6 0 2>,
							 <&cpu7 0 2>;
275 276 277
				};
				map4 {
					trip = <&cpu2_alert4>;
278 279 280 281 282 283 284 285
					cooling-device = <&cpu0 3 7>,
							 <&cpu1 3 7>,
							 <&cpu2 3 7>,
							 <&cpu3 3 7>,
							 <&cpu4 3 12>,
							 <&cpu5 3 12>,
							 <&cpu6 3 12>,
							 <&cpu7 3 12>;
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339
				};
			};
		};
		cpu3_thermal: cpu3-thermal {
			thermal-sensors = <&tmu_cpu3 0>;
			polling-delay-passive = <250>;
			polling-delay = <0>;
			trips {
				cpu3_alert0: cpu-alert-0 {
					temperature = <50000>;
					hysteresis = <5000>;
					type = "active";
				};
				cpu3_alert1: cpu-alert-1 {
					temperature = <60000>;
					hysteresis = <5000>;
					type = "active";
				};
				cpu3_alert2: cpu-alert-2 {
					temperature = <70000>;
					hysteresis = <5000>;
					type = "active";
				};
				cpu3_crit0: cpu-crit-0 {
					temperature = <120000>;
					hysteresis = <0>;
					type = "critical";
				};
				cpu3_alert3: cpu-alert-3 {
					temperature = <70000>;
					hysteresis = <10000>;
					type = "passive";
				};
				cpu3_alert4: cpu-alert-4 {
					temperature = <85000>;
					hysteresis = <10000>;
					type = "passive";
				};
			};
			cooling-maps {
				map0 {
					trip = <&cpu3_alert0>;
					cooling-device = <&fan0 0 1>;
				};
				map1 {
					trip = <&cpu3_alert1>;
					cooling-device = <&fan0 1 2>;
				};
				map2 {
					trip = <&cpu3_alert2>;
					cooling-device = <&fan0 2 3>;
				};
				map3 {
					trip = <&cpu3_alert3>;
340 341 342 343 344 345 346 347
					cooling-device = <&cpu0 0 2>,
							 <&cpu1 0 2>,
							 <&cpu2 0 2>,
							 <&cpu3 0 2>,
							 <&cpu4 0 2>,
							 <&cpu5 0 2>,
							 <&cpu6 0 2>,
							 <&cpu7 0 2>;
348 349 350
				};
				map4 {
					trip = <&cpu3_alert4>;
351 352 353 354 355 356 357 358
					cooling-device = <&cpu0 3 7>,
							 <&cpu1 3 7>,
							 <&cpu2 3 7>,
							 <&cpu3 3 7>,
							 <&cpu4 3 12>,
							 <&cpu5 3 12>,
							 <&cpu6 3 12>,
							 <&cpu7 3 12>;
359 360 361 362
				};
			};
		};
	};
363 364
};

365 366 367 368 369
&adc {
	vdd-supply = <&ldo4_reg>;
	status = "okay";
};

370 371
&hdmi {
	status = "okay";
372
	ddc = <&i2c_2>;
373
	hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>;
374 375 376 377 378 379 380 381
	pinctrl-names = "default";
	pinctrl-0 = <&hdmi_hpd_irq>;

	vdd_osc-supply = <&ldo7_reg>;
	vdd_pll-supply = <&ldo6_reg>;
	vdd-supply = <&ldo6_reg>;
};

382 383
&hdmicec {
	status = "okay";
384
	needs-hpd;
385 386
};

387 388 389
&i2c_2 {
	samsung,i2c-sda-delay = <100>;
	samsung,i2c-max-bus-freq = <66000>;
390
	/* used by HDMI DDC */
391 392 393
	status = "okay";
};

394 395 396 397 398 399
&ldo26_reg {
	regulator-min-microvolt = <3000000>;
	regulator-max-microvolt = <3000000>;
	regulator-always-on;
};

400 401 402 403
&mixer {
	status = "okay";
};

404 405 406 407 408 409 410 411 412 413 414 415 416 417 418
&mmc_0 {
	status = "okay";
	mmc-pwrseq = <&emmc_pwrseq>;
	card-detect-delay = <200>;
	samsung,dw-mshc-ciu-div = <3>;
	samsung,dw-mshc-sdr-timing = <0 4>;
	samsung,dw-mshc-ddr-timing = <0 2>;
	samsung,dw-mshc-hs400-timing = <0 2>;
	samsung,read-strobe-delay = <90>;
	pinctrl-names = "default";
	pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus1 &sd0_bus4 &sd0_bus8 &sd0_cd &sd0_rclk>;
	bus-width = <8>;
	cap-mmc-highspeed;
	mmc-hs200-1_8v;
	mmc-hs400-1_8v;
419
	max-frequency = <200000000>;
420 421
	vmmc-supply = <&ldo18_reg>;
	vqmmc-supply = <&ldo3_reg>;
422 423 424
};

&pinctrl_0 {
425 426 427 428 429 430 431
	power_key: power-key {
		samsung,pins = "gpx0-3";
		samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
		samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
	};

432 433
	hdmi_hpd_irq: hdmi-hpd-irq {
		samsung,pins = "gpx3-7";
434 435 436
		samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
		samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
		samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
437 438 439 440 441 442
	};
};

&pinctrl_1 {
	emmc_nrst_pin: emmc-nrst {
		samsung,pins = "gpd1-0";
443 444 445
		samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
		samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
446 447
	};
};