1#!/bin/bash 2 3# Configure ODPM rails to measure CPU specific power. 4# See go/odpm-p21-userguide 5 6adb root 7 8# LDO2M(L2M_ALIVE) - DRAM Array Core Power 9adb shell 'echo "CH0=LDO2M" > /sys/bus/iio/devices/iio\:device0/enabled_rails' 10 11# These are the defaults. 12# BUCK2M(S2M_VDD_CPUCL2):CPU(BIG) 13# adb shell 'echo "CH3=BUCK2M" > /sys/bus/iio/devices/iio\:device0/enabled_rails' 14# BUCK3M(S3M_VDD_CPUCL1):CPU(MID) 15# adb shell 'echo "CH4=BUCK3M" > /sys/bus/iio/devices/iio\:device0/enabled_rails' 16# BUCK4M(S4M_VDD_CPUCL0):CPU(LITTLE) 17# adb shell 'echo "CH5=BUCK4M" > /sys/bus/iio/devices/iio\:device0/enabled_rails' 18# BUCK1M(S1M_VDD_MIF):MIF 19# adb shell 'echo "CH7=BUCK1M" > /sys/bus/iio/devices/iio\:device0/enabled_rails' 20 21# These are default on device1. 22# BUCK5S(S5S_VDDQ_MEM):DDR 23# adb shell 'echo "CH3=BUCK5S" > /sys/bus/iio/devices/iio\:device1/enabled_rails' 24# BUCK10S(S10S_VDD2L):DDR 25# adb shell 'echo "CH4=BUCK10S" > /sys/bus/iio/devices/iio\:device1/enabled_rails' 26# BUCK4S(S4S_VDD2H_MEM):DDR 27# adb shell 'echo "CH5=BUCK4S" > /sys/bus/iio/devices/iio\:device1/enabled_rails' 28 29adb shell 'cat /sys/bus/iio/devices/iio\:device0/enabled_rails' 30adb shell 'cat /sys/bus/iio/devices/iio\:device1/enabled_rails' 31 32adb unroot 33 34