android jb thermal sw flow

22

Upload: stanley-chang

Post on 02-Jul-2015

113 views

Category:

Software


2 download

TRANSCRIPT

Page 1: Android jb thermal sw flow
Page 2: Android jb thermal sw flow
Page 3: Android jb thermal sw flow
Page 4: Android jb thermal sw flow

Tegra3 Thermal Management cont.

Thermal

SensorCPU PMU

Get data from CPU (D+/D-)

Feedback external temperature

Monitoring if temperature is greater

than Throttle threshold

Change power control to reduce

CPU clock and low frequency

Feedback external temperature

Update DVFS table

Get data from CPU (D+/D-)

Notify to start Throttling task

Page 5: Android jb thermal sw flow

Tegra3 Thermal Management cont.

Thermal

SensorCPU PMU

Get data from CPU (D+/D-)

Feedback external temperature

Clear DEV_ON bit to prepare to

shutdown power for CPU

Disable peripheral driver

Monitoring if temperature is greater

than Shutdown threshold

Page 6: Android jb thermal sw flow

Configure IRQ as Low-level trigger. HW sends interrupt according to initial threshold stored

in thermal sensor register (FW).

Page 7: Android jb thermal sw flow

Acer-specific initial value were set as follow:

Implementation was done in file: nct1008.c (Driver layer configuration)

board-acer-t30.c (NV default value for vendor customization)

board-acer-t30-sensors.c (set into nct1008 non-violate flash)

Pin Function Threshold

TEMP_ALERT Throttling 85 ℃

AP_OVERHEAT Shutdown 90 ℃

Page 8: Android jb thermal sw flow

Verification for specific value by commands as follow, cat /sys/class/i2c-dev/i2c-4/device/4-004c/tempaerature_alert

cat /sys/class/i2c-dev/i2c-4/device/4-004c/tempaerature_overheat

Page 9: Android jb thermal sw flow

The ALERT output deasserts only when:

1. Temperature has fallen below the high temperature limit.

2. Master has read the device address.

3. Cleared the status register.

Page 10: Android jb thermal sw flow

Thermal Sensor

T30

Throttlenode

Monitor

DVFS

AdjustDVFS

Cooling device N

.

.

.

Cooling device 1

Update

Update

CPU EDP Table1400/1300/1200/1100

Switch

ALERT

Update

Bind

Monitor

Bind

UpdateUpdateUpdate

Page 11: Android jb thermal sw flow

nct1008.c

configure_sensor ()

configure_irq ()

get_temp ()

show_temp ()

set alert ()

show alert ()

work_func ()

SW Code Flow cont.

tegra3_thermal.c

tegra_thermal_alert_unlocked ()

tegra_edp_update_thermal_zone ()

cpu_tegra.c edp.c

tegra3_throttle.c

thermal_sys.c

edp_update_limit ()

tegra_cpu_set_speed

show_throttle

tegra_system_edp

_map[]

Page 12: Android jb thermal sw flow

SW Code Flow cont.

Thermal threshold initialization

board-acer-t30.c

board-acer-t30-sensors.c

Page 13: Android jb thermal sw flow

SW Code Flow cont.

HW interrupt triggers work_func to proceed throttling task!

Master has read the device address

Cleared the status register

Page 14: Android jb thermal sw flow

SW Code Flow cont.

Stop charging if throttling starts.

After finish each throttling call, update temperature to T30.

Page 15: Android jb thermal sw flow

SW Code Flow cont.

Check if temperature is over limit stored in EDP table.

Update index for new temperature to mapping EDP table.

Update CPU rate according to the temperature which was reported by nct1008 work function.

Adjust and update DVFS latest setting for CPU clock.

Page 16: Android jb thermal sw flow

SW Code Flow cont.

Throttle sysfs node is the “answer” for CPU to know when throttling process ends.

Sysfs node stores in path:sys/devices/system/cpu/cpu0/cpufreq/throttle

Page 17: Android jb thermal sw flow

SW Code Flow cont.

tegra3_throttle.c will report the latest status of throttling process.

Page 18: Android jb thermal sw flow

SW Code Flow cont.

thermal_sys.c (cooling device) write TRUE/FALSE TO sysfs node “throttle” to update for tegra3_throttle.c and cpu-tegra.c

Page 19: Android jb thermal sw flow

SW Code Flow cont.

CPU frequency adjustment mapping table with throttling stage.

Interrupt will be send to notify when temperature isn’t within limit,

45~60: 1.3GHz

60~75: 1.3GHz

75~85: 1.2GHz

over 85: 1.1GHz

StageCore On (cpu0 to 3)

Page 20: Android jb thermal sw flow

SW Code Flow cont.

CPU frequency adjustment mapping table

Page 21: Android jb thermal sw flow

SW verification step

Page 22: Android jb thermal sw flow

HW verification step

Throttling

Shutdown