summaryrefslogtreecommitdiff
path: root/r11_evt1_battery.dtsi
blob: dbbffc472e2ab71968a744a6706b16a0f416a6b5 (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/samsung.h>

&google_battery {
	battery,wlc_tz_name = "PPG_NTC";
	battery,wlc_cdev_name = "wlc_cool_dev";
	battery,charge_reset_soc = <80>;
};

&wlc_cool_dev {
	#cooling-cells = <2>;
};

&batt_cool_dev {
	#cooling-cells = <2>;
};

&tsmab104_ntc {
	io-channels = <&exynos_adc 0>, <&exynos_adc 1>, <&exynos_adc 5>, <&exynos_adc 4>, <&exynos_adc 6>;
	io-channel-names = "soc-ntc", "batt-ntc", "lte-ntc", "audio-ntc", "ppg-ntc";
	pinctrl-names = "default";
	pinctrl-0 = <&adc_en>;
};

&pinctrl_5 {
	adc_en: adc-en {
		samsung,pins = "gpg2-0";
		samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
		samsung,pin-con-pdn = <EXYNOS_PIN_PDN_PREV>;
		samsung,pin-pud-pdn = <EXYNOS_PIN_PULL_NONE>;
		samsung,pin-drv = <1>;	/* LVL2 DRV */
	};
};

&batt_ntc {
	governor = "fair_share";
	trips {
		batt_throttle_low: batt-throttle-low {
			temperature = <43000>;
			hysteresis = <2000>;
			type = "passive";
		};
		batt_throttle_high: batt-throttle-high {
			temperature = <46000>;
			hysteresis = <2000>;
			type = "passive";
		};
		battery_shutdown: battery-shutdown {
			temperature = <61000>;
			hysteresis = <1000>;
			type = "critical";
		};
	};
	cooling-maps {
		battery-charge-throttled {
			trip = <&batt_throttle_low>;
			cooling-device = <&batt_cool_dev (~0) (~0) >; /* THERMAL_NO_LIMIT THERMAL_NO_LIMIT */
		};
	};
};

&lte_pa_ntc {
	polling-delay = <15000>; /* milliseconds */
	polling-delay-passive = <0>; /* milliseconds */
	thermal-sensors = <&tsmab104_ntc 2>;
};

&audio_ntc {
	polling-delay = <15000>; /* milliseconds */
	polling-delay-passive = <0>; /* milliseconds */
	thermal-sensors = <&tsmab104_ntc 3>;
};

&ppg_ntc {
	polling-delay = <10000>; /* milliseconds */
	polling-delay-passive = <0>; /* milliseconds */
	thermal-sensors = <&tsmab104_ntc 4>;
	governor = "fair_share";
	trips {
		wlc_throttle_low: wlc-throttle-low {
			temperature = <49000>;
			hysteresis = <2000>;
			type = "passive";
		};
		wlc_throttle_high: wlc-throttle-high {
			temperature = <49000>;
			hysteresis = <2000>;
			type = "passive";
		};

		skin_backup_shutdown: skin-backup-shutdown {
			temperature = <54000>;
			hysteresis = <1000>;
			type = "critical";
		};
	};
	cooling-maps {
		wireless-charge-throttled {
			trip = <&wlc_throttle_low>;
			cooling-device = <&wlc_cool_dev (~0) (~0) >; /* THERMAL_NO_LIMIT THERMAL_NO_LIMIT */
		};
	};
};