diff --git a/libs/utils/energy.py b/libs/utils/energy.py index 7a44edc7fae51f9addf0332e6a2abbb11253fe57..e2bb5ea8a6e153f0145abec4699dccfb99a57185 100644 --- a/libs/utils/energy.py +++ b/libs/utils/energy.py @@ -40,6 +40,13 @@ DEFAULT_ENERGY_METER = { 'kinds' : [ 'energy' ] } }, + 'juno2' : { + 'instrument' : 'hwmon', + 'conf' : { + 'sites' : [ 'BOARDLITTLE', 'BOARDBIG' ], + 'kinds' : [ 'energy' ] + } + }, # Hikey: by default use AEP 'hikey' : { @@ -167,6 +174,10 @@ class HWMon(EnergyMeter): clusters_nrg['LITTLE'] = '{:.6f}'.format(nrg_total) elif self._target.big_core.upper() in ch.upper(): clusters_nrg['big'] = '{:.6f}'.format(nrg_total) + elif 'LITTLE' in ch.upper(): + clusters_nrg['LITTLE'] = '{:.6f}'.format(nrg_total) + elif 'BIG' in ch.upper(): + clusters_nrg['big'] = '{:.6f}'.format(nrg_total) else: logging.warning('%14s - Unable to bind hwmon channel [%s]'\ ' to a big.LITTLE cluster', diff --git a/libs/utils/env.py b/libs/utils/env.py index 198855209627b78da3ba1ad8f1dc19ac6ed79fdd..67910873aae08108f4623beb24f383a0e3655b94 100644 --- a/libs/utils/env.py +++ b/libs/utils/env.py @@ -343,6 +343,9 @@ class TestEnv(ShareState): elif self.conf['board'].upper() == 'JUNO': platform = devlib.platform.arm.Juno() self.__modules = ['bl', 'hwmon', 'cpufreq'] + elif self.conf['board'].upper() == 'JUNO2': + platform = devlib.platform.arm.Juno() + self.__modules = ['bl', 'hwmon', 'cpufreq'] # Initialize OAK board elif self.conf['board'].upper() == 'OAK': diff --git a/target.config b/target.config index 35edbe4c1d94be09e7c53dc741ef886e41ddfe2c..f7ae3ba93567947fa9e3f7ab9dc3b8a5feff7103 100644 --- a/target.config +++ b/target.config @@ -15,10 +15,15 @@ /* Board */ /* Currently supported boards are: */ - /* juno : target is a JUNO board */ - /* tc2 : target is a TC2 board */ + /* juno : target is a JUNO board */ + /* juno2 : target is a JUNO board, with mainline Hwmon */ + /* tc2 : target is a TC2 board */ /* Leave commented if your board is not listed above */ - "board" : "juno", + /* If your Juno board /sys/class/hwmon/hwmon0/energy?_name is */ + /* of the form BOARD_*_ENERGY, then you need 'juno2'. */ + /* Otherwise 'juno' is sufficient. In either case, lisa uses */ + /* devlib's 'juno' target definition to talk to the board. */ + "board" : "juno2", /* Target IP or MAC address */ "host" : "192.168.0.20",