summaryrefslogtreecommitdiff
path: root/zephyr/projects/skyrim/adc.dts
blob: 3f044cecc88e5d53dfcbd40284ffe8112ef45276 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/* Copyright 2021 The Chromium OS Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include <cros/thermistor/thermistor.dtsi>

/ {
	named-adc-channels {
		compatible = "named-adc-channels";

		adc_temp_charger: temp-charger {
			enum-name = "ADC_TEMP_SENSOR_CHARGER";
			io-channels = <&adc0 1>;
		};
		adc_temp_memory: temp-memory {
			enum-name = "ADC_TEMP_SENSOR_MEMORY";
			io-channels = <&adc0 2>;
		};
		adc_core_imon1: core-imon1 {
			enum-name = "ADC_CORE_IMON1";
			io-channels = <&adc0 3>;
		};
		adc_core_imon2: core-imon2 {
			enum-name = "ADC_SOC_IMON2";
			io-channels = <&adc0 4>;
		};
	};

	named-temp-sensors {
		charger-thermistor {
			compatible = "cros-ec,temp-sensor-thermistor",
				     "cros-ec,temp-sensor";
			thermistor = <&thermistor_3V3_30K9_47K_4050B>;
			enum-name = "TEMP_SENSOR_CHARGER";
			temp_host_high = <100>;
			temp_host_halt = <105>;
			temp_host_release_high = <80>;
			adc = <&adc_temp_charger>;
		};
		memory-thermistor {
			compatible = "cros-ec,temp-sensor-thermistor",
				     "cros-ec,temp-sensor";
			thermistor = <&thermistor_3V3_30K9_47K_4050B>;
			enum-name = "TEMP_SENSOR_MEMORY";
			temp_host_high = <100>;
			temp_host_halt = <105>;
			temp_host_release_high = <80>;
			adc = <&adc_temp_memory>;
			power-good-pin = <&gpio_pg_pwr_s5>;
		};
		cpu {
			compatible = "cros-ec,temp-sensor-sb-tsi",
				     "cros-ec,temp-sensor";
			enum-name = "TEMP_SENSOR_CPU";
			port = <&i2c_soc_thermal>;
			temp_host_high = <100>;
			temp_host_halt = <105>;
			temp_host_release_high = <80>;
			temp_fan_off = <60>;
			temp_fan_max = <90>;
			power-good-pin = <&gpio_s0_pgood>;
		};
	};
};

&adc0 {
	status = "okay";
	pinctrl-0 = <&adc0_chan1_gp44
		     &adc0_chan2_gp43
		     &adc0_chan3_gp42
		     &adc0_chan4_gp41>;
	pinctrl-names = "default";
};

&thermistor_3V3_30K9_47K_4050B {
	status = "okay";
};