This commit is contained in:
Vincent Vidal 2025-08-07 16:07:57 +02:00
commit 8710a52d67
123 changed files with 20007 additions and 0 deletions

View file

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
**
** Copyright 2022, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License")
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<irq-device-map>
<!-- This file maps devices (chips) that can send interrupts to the main processor (and bring it
out of sleep) to logical subsystems in userspace code. Since each Android device can have
a differently designed chipset, this mapping is expected to be empty by default and should
be overridden by device-specific configs.
This mapping helps the system to meaningfully attribute CPU wakeups to logical work that
happened on the device and the app activity that caused it. The devices are referred to by
their names as defined in the kernel. Currently, defined subsystems are:
- Alarm: Use this to denote wakeup alarms requested by apps via the AlarmManager API.
- Wifi: Use this to denote network traffic that uses the wifi transport.
- Sound_trigger: Use this to denote sound phrase detection, like the ones supported by
SoundTriggerManager.
- Sensor: Use this to denote wakeups due to sensor events.
- Cellular_data: Use this to denote network traffic on the cellular transport.
The overlay should use tags <device> and <subsystem> to describe this mapping in the
following way:
<irq-device-map>
<device name="device_name_1">
<subsystem>Subsystem1</subsystem>
<subsystem>Subsystem2</subsystem>
:
:
</device>
<device name="device_name_2">
:
</device>
:
</irq-device-map>
The tag <device> should have a "name" attribute specifying the kernel name of the device.
Each <device> tag can then enclose multiple <subsystem> tags. Each <subsystem> tag should
enclose the name of the logical subsystems (one of the ones defined above) as text.
Undefined subsystem names will be ignored by the framework.
-->
<device name="alarmtimer.0.auto">
<subsystem>Alarm</subsystem>
</device>
</irq-device-map>

View file

@ -0,0 +1,232 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
**
** Copyright 2009, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License")
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<device name="Android">
<!-- Most values are the incremental current used by a feature,
in mA (measured at nominal voltage).
The default values are deliberately incorrect dummy values.
OEM's must measure and provide actual values before
shipping a device.
Example real-world values are given in comments, but they
are totally dependent on the platform and can vary
significantly, so should be measured on the shipping platform
with a power meter. -->
<item name="ambient.on">0.1</item> <!-- ~100mA -->
<item name="screen.on">60</item> <!-- ~100mA -->
<item name="screen.full">199</item> <!-- ~100mA -->
<item name="bluetooth.active">32.8</item> <!-- Bluetooth data transfer, ~10mA -->
<item name="bluetooth.on">1.68</item> <!-- Bluetooth on & connectable, but not connected, ~0.1mA -->
<item name="wifi.on">0.4</item> <!-- ~3mA -->
<item name="wifi.active">225.85</item> <!-- WIFI data transfer, ~200mA -->
<item name="wifi.scan">21.5</item> <!-- WIFI network scanning, ~100mA -->
<item name="audio">15.3</item> <!-- ~10mA -->
<item name="video">63.1</item> <!-- ~50mA -->
<item name="camera.flashlight">123</item> <!-- Avg. power for camera flash, ~160mA -->
<item name="camera.avg">410</item> <!-- Avg. power use of camera in standard usecases, ~550mA -->
<item name="gps.on">29</item> <!-- ~50mA -->
<!-- Radio related values. For modems without energy reporting support in firmware, use
radio.active, radio.scanning, and radio.on. -->
<item name="radio.active">90</item> <!-- ~200mA -->
<item name="radio.scanning">116.3</item> <!-- cellular radio scanning for signal, ~10mA -->
<!-- Current consumed by the radio at different signal strengths, when paging -->
<array name="radio.on"> <!-- Strength 0 to BINS-1 -->
<value>4</value> <!-- ~2mA -->
<value>4</value> <!-- ~1mA -->
</array>
<!-- A list of heterogeneous CPU clusters, where the value for each cluster represents the
number of CPU cores for that cluster.
Ex:
<array name="cpu.clusters.cores">
<value>4</value> // cluster 0 has cpu0, cpu1, cpu2, cpu3
<value>2</value> // cluster 1 has cpu4, cpu5
</array> -->
<array name="cpu.clusters.cores">
<value>4</value> <!-- cluster 0 has 4 cores -->
<value>4</value> <!-- cluster 1 has 4 cores -->
</array>
<!-- Different CPU speeds for cluster 0 as reported in
/sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state.
There must be one of these for each cluster, labeled:
cpu.speeds.cluster0, cpu.speeds.cluster1, etc... -->
<array name="cpu.speeds.cluster0">
<value>400000</value> <!-- 400 MHz CPU speed -->
</array>
<!-- Current at each CPU speed for cluster 0, as per 'cpu.speeds.cluster0'.
Like cpu.speeds.cluster0, there must be one of these present for
each heterogeneous CPU cluster. -->
<array name="cpu.active.cluster0">
<value>0.1</value> <!-- ~100mA -->
</array>
<!-- Current when CPU is idle -->
<item name="cpu.idle">3.7</item>
<!-- Power consumption when CPU is suspended -->
<item name="cpu.suspend">5</item>
<!-- Additional power consumption by CPU excluding cluster and core when running -->
<item name="cpu.active">2.55</item>.
<!-- Additional power consumption by CPU cluster0 itself when running excluding cores in it -->
<item name="cpu.cluster_power.cluster0">2.11</item>
<!-- Additional power consumption by CPU cluster1 itself when running excluding cores in it -->
<item name="cpu.cluster_power.cluster1">2.22</item>
<!-- Different CPU speeds as reported in
/sys/devices/system/cpu/cpu0/cpufreq/stats/scaling_available_frequencies -->
<array name="cpu.core_speeds.cluster0">
<value>900000</value>
<value>979000</value>
<value>1085000</value>
<value>1218000</value>
<value>1351000</value>
<value>1484000</value>
<value>1617000</value>
<value>1750000</value>
<value>1814000</value>
<value>1879000</value>
<value>1944000</value>
<value>2009000</value>
<value>2074000</value>
<value>2139000</value>
<value>2215000</value>
<value>2301000</value>
</array>
<!-- Different CPU speeds as reported in
/sys/devices/system/cpu/cpu4/cpufreq/stats/scaling_available_frequencies -->
<array name="cpu.core_speeds.cluster1">
<value>400000</value>
<value>501000</value>
<value>542000</value>
<value>643000</value>
<value>745000</value>
<value>846000</value>
<value>948000</value>
<value>1050000</value>
<value>1138000</value>
<value>1226000</value>
<value>1314000</value>
<value>1402000</value>
<value>1491000</value>
<value>1579000</value>
<value>1682000</value>
<value>1800000</value>
</array>
<!-- Additional power used by a CPU from cluster 0 when running at different
speeds. Currently this measurement also includes cluster cost. -->
<array name="cpu.core_power.cluster0">
<value>74</value>
<value>77</value>
<value>81</value>
<value>85</value>
<value>89</value>
<value>92</value>
<value>94</value>
<value>97</value>
<value>100</value>
<value>104</value>
<value>107</value>
<value>109</value>
<value>113</value>
<value>116</value>
<value>121</value>
<value>125</value>
</array>
<!-- Additional power used by a CPU from cluster 1 when running at different
speeds. Currently this measurement also includes cluster cost. -->
<array name="cpu.core_power.cluster1">
<value>29</value>
<value>32</value>
<value>38</value>
<value>47</value>
<value>57</value>
<value>69</value>
<value>74</value>
<value>77</value>
<value>81</value>
<value>85</value>
<value>89</value>
<value>92</value>
<value>94</value>
<value>97</value>
<value>100</value>
<value>104</value>
</array>
<!-- Memory bandwidth power values in mA at the rail. There must be one value
for each bucket defined in the device tree. -->
<array name="memory.bandwidths">
<value>22.7</value> <!-- mA for bucket: 100mb/s-1.5 GB/s memory bandwidth -->
</array>
<!-- This is the battery capacity in mAh (measured at nominal voltage) -->
<!-- prize modlfy by wuliang Do not configure here. PRIZE_BATTERY_CAPACITY config PrizeConfig begin -->
<item name="battery.capacity">1000</item>
<!-- prize modlfy by wuliang Do not configure here. PRIZE_BATTERY_CAPACITY config PrizeConfig end -->
<!-- Wifi related values. -->
<!-- Idle Receive current for wifi radio in mA. 0 by default-->
<item name="wifi.controller.idle">0</item>
<!-- Rx current for wifi radio in mA. 0 by default-->
<item name="wifi.controller.rx">0</item>
<!-- Tx current for wifi radio in mA. 0 by default-->
<item name="wifi.controller.tx">0</item>
<!-- Current at each of the wifi Tx levels in mA. The number of tx levels varies per device
and is available only of wifi chipsets which support the tx level reporting. Use
wifi.tx for other chipsets. none by default -->
<array name="wifi.controller.tx_levels"> <!-- mA -->
</array>
<!-- Operating volatage for wifi radio in mV. 0 by default-->
<item name="wifi.controller.voltage">0</item>
<array name="wifi.batchedscan"> <!-- mA -->
<value>.0002</value> <!-- 1-8/hr -->
<value>.002</value> <!-- 9-64/hr -->
<value>.02</value> <!-- 65-512/hr -->
<value>.2</value> <!-- 513-4,096/hr -->
<value>2</value> <!-- 4097-/hr -->
</array>
<!-- Cellular modem related values. Default is 0.-->
<item name="modem.controller.sleep">0</item>
<item name="modem.controller.idle">0</item>
<item name="modem.controller.rx">0</item>
<array name="modem.controller.tx"> <!-- Strength 0 to 4 -->
<value>0</value>
<value>0</value>
<value>0</value>
<value>0</value>
<value>0</value>
</array>
<item name="modem.controller.voltage">0</item>
<!-- GPS related values. Default is 0.-->
<array name="gps.signalqualitybased"> <!-- Strength 0 to 1 -->
<value>0</value>
<value>0</value>
</array>
<item name="gps.voltage">0</item>
</device>