1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * OMAP thermal definitions
5 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
7 * Eduardo Valentin <eduardo.valentin@ti.com>
10 #define __TI_THERMAL_H
12 #include "ti-bandgap.h"
14 /* PCB sensor calculation constants */
15 #define OMAP_GRADIENT_SLOPE_W_PCB_4430 0
16 #define OMAP_GRADIENT_CONST_W_PCB_4430 20000
17 #define OMAP_GRADIENT_SLOPE_W_PCB_4460 1142
18 #define OMAP_GRADIENT_CONST_W_PCB_4460 -393
19 #define OMAP_GRADIENT_SLOPE_W_PCB_4470 1063
20 #define OMAP_GRADIENT_CONST_W_PCB_4470 -477
22 #define OMAP_GRADIENT_SLOPE_W_PCB_5430_CPU 100
23 #define OMAP_GRADIENT_CONST_W_PCB_5430_CPU 484
24 #define OMAP_GRADIENT_SLOPE_W_PCB_5430_GPU 464
25 #define OMAP_GRADIENT_CONST_W_PCB_5430_GPU -5102
27 #define DRA752_GRADIENT_SLOPE_W_PCB 0
28 #define DRA752_GRADIENT_CONST_W_PCB 2000
30 /* trip points of interest in milicelsius (at hotspot level) */
31 #define OMAP_TRIP_COLD 100000
32 #define OMAP_TRIP_HOT 110000
33 #define OMAP_TRIP_SHUTDOWN 125000
34 #define OMAP_TRIP_NUMBER 2
35 #define OMAP_TRIP_STEP \
36 ((OMAP_TRIP_SHUTDOWN - OMAP_TRIP_HOT) / (OMAP_TRIP_NUMBER - 1))
39 #define FAST_TEMP_MONITORING_RATE 250
41 #ifdef CONFIG_TI_THERMAL
42 int ti_thermal_expose_sensor(struct ti_bandgap
*bgp
, int id
, char *domain
);
43 int ti_thermal_remove_sensor(struct ti_bandgap
*bgp
, int id
);
44 int ti_thermal_report_sensor_temperature(struct ti_bandgap
*bgp
, int id
);
45 int ti_thermal_register_cpu_cooling(struct ti_bandgap
*bgp
, int id
);
46 int ti_thermal_unregister_cpu_cooling(struct ti_bandgap
*bgp
, int id
);
49 int ti_thermal_expose_sensor(struct ti_bandgap
*bgp
, int id
, char *domain
)
55 int ti_thermal_remove_sensor(struct ti_bandgap
*bgp
, int id
)
61 int ti_thermal_report_sensor_temperature(struct ti_bandgap
*bgp
, int id
)
67 int ti_thermal_register_cpu_cooling(struct ti_bandgap
*bgp
, int id
)
73 int ti_thermal_unregister_cpu_cooling(struct ti_bandgap
*bgp
, int id
)