1eaf7b460SMauro Carvalho Chehab=================================== 2eaf7b460SMauro Carvalho ChehabKernel driver: x86_pkg_temp_thermal 3eaf7b460SMauro Carvalho Chehab=================================== 4eaf7b460SMauro Carvalho Chehab 5eaf7b460SMauro Carvalho ChehabSupported chips: 6eaf7b460SMauro Carvalho Chehab 7eaf7b460SMauro Carvalho Chehab* x86: with package level thermal management 8eaf7b460SMauro Carvalho Chehab 9eaf7b460SMauro Carvalho Chehab(Verify using: CPUID.06H:EAX[bit 6] =1) 10eaf7b460SMauro Carvalho Chehab 11eaf7b460SMauro Carvalho ChehabAuthors: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> 12eaf7b460SMauro Carvalho Chehab 13eaf7b460SMauro Carvalho ChehabReference 14eaf7b460SMauro Carvalho Chehab--------- 15eaf7b460SMauro Carvalho Chehab 16eaf7b460SMauro Carvalho ChehabIntel® 64 and IA-32 Architectures Software Developer’s Manual (Jan, 2013): 17eaf7b460SMauro Carvalho ChehabChapter 14.6: PACKAGE LEVEL THERMAL MANAGEMENT 18eaf7b460SMauro Carvalho Chehab 19eaf7b460SMauro Carvalho ChehabDescription 20eaf7b460SMauro Carvalho Chehab----------- 21eaf7b460SMauro Carvalho Chehab 22eaf7b460SMauro Carvalho ChehabThis driver register CPU digital temperature package level sensor as a thermal 23eaf7b460SMauro Carvalho Chehabzone with maximum two user mode configurable trip points. Number of trip points 24eaf7b460SMauro Carvalho Chehabdepends on the capability of the package. Once the trip point is violated, 25eaf7b460SMauro Carvalho Chehabuser mode can receive notification via thermal notification mechanism and can 26eaf7b460SMauro Carvalho Chehabtake any action to control temperature. 27eaf7b460SMauro Carvalho Chehab 28eaf7b460SMauro Carvalho Chehab 29eaf7b460SMauro Carvalho ChehabThreshold management 30eaf7b460SMauro Carvalho Chehab-------------------- 31eaf7b460SMauro Carvalho ChehabEach package will register as a thermal zone under /sys/class/thermal. 32eaf7b460SMauro Carvalho Chehab 33eaf7b460SMauro Carvalho ChehabExample:: 34eaf7b460SMauro Carvalho Chehab 35eaf7b460SMauro Carvalho Chehab /sys/class/thermal/thermal_zone1 36eaf7b460SMauro Carvalho Chehab 37eaf7b460SMauro Carvalho ChehabThis contains two trip points: 38eaf7b460SMauro Carvalho Chehab 39eaf7b460SMauro Carvalho Chehab- trip_point_0_temp 40eaf7b460SMauro Carvalho Chehab- trip_point_1_temp 41eaf7b460SMauro Carvalho Chehab 42eaf7b460SMauro Carvalho ChehabUser can set any temperature between 0 to TJ-Max temperature. Temperature units 43eaf7b460SMauro Carvalho Chehabare in milli-degree Celsius. Refer to "Documentation/driver-api/thermal/sysfs-api.rst" for 44eaf7b460SMauro Carvalho Chehabthermal sys-fs details. 45eaf7b460SMauro Carvalho Chehab 46eaf7b460SMauro Carvalho ChehabAny value other than 0 in these trip points, can trigger thermal notifications. 47eaf7b460SMauro Carvalho ChehabSetting 0, stops sending thermal notifications. 48eaf7b460SMauro Carvalho Chehab 49eaf7b460SMauro Carvalho ChehabThermal notifications: 50eaf7b460SMauro Carvalho ChehabTo get kobject-uevent notifications, set the thermal zone 51eaf7b460SMauro Carvalho Chehabpolicy to "user_space". 52eaf7b460SMauro Carvalho Chehab 53eaf7b460SMauro Carvalho ChehabFor example:: 54eaf7b460SMauro Carvalho Chehab 55eaf7b460SMauro Carvalho Chehab echo -n "user_space" > policy 56