blob: 03badf6af4032b3103860e30d9749ebbf8539f41 [file] [log] [blame]
Norman James88872672015-09-21 16:51:35 -05001HOME_PATH = './'
Norman Jamesb38ea5a2015-10-28 12:44:56 -05002GPIO_BASE = 320
Norman James2943cc62015-10-28 18:59:53 -05003SYSTEM_NAME = "Barreleye"
Norman James3e5c8592015-10-22 14:33:01 -05004
5
6## System states
7## state can change to next state in 2 ways:
8## - a process emits a GotoSystemState signal with state name to goto
9## - objects specified in EXIT_STATE_DEPEND have started
Norman James362a80f2015-09-14 14:04:39 -050010SYSTEM_STATES = [
Norman Jamesa9966b32015-10-28 06:55:58 -050011 'BASE_APPS',
Norman James3e5c8592015-10-22 14:33:01 -050012 'BMC_STARTING',
Norman James8ea118d2015-11-17 08:58:04 -060013 'BMC_STARTING2',
Norman James3e5c8592015-10-22 14:33:01 -050014 'BMC_READY',
15 'HOST_POWERING_ON',
16 'HOST_POWERED_ON',
Brad Bishop2c0e6142016-06-06 00:02:24 -040017 'INVENTORY_UPLOADED',
Norman James3e5c8592015-10-22 14:33:01 -050018 'HOST_BOOTING',
Norman James2656f332015-10-26 06:42:41 -050019 'HOST_BOOTED',
Norman James3cb0f982015-12-03 01:07:16 -060020 'HOST_POWERED_OFF',
Norman James362a80f2015-09-14 14:04:39 -050021]
22
Norman James3e5c8592015-10-22 14:33:01 -050023EXIT_STATE_DEPEND = {
Norman Jamesa9966b32015-10-28 06:55:58 -050024 'BASE_APPS' : {
Norman James76abea32015-10-29 06:17:54 -050025 '/org/openbmc/sensors': 0,
Norman Jamesa9966b32015-10-28 06:55:58 -050026 },
Norman James3e5c8592015-10-22 14:33:01 -050027 'BMC_STARTING' : {
Norman James3e5c8592015-10-22 14:33:01 -050028 '/org/openbmc/control/power0' : 0,
Norman Jamesb38ea5a2015-10-28 12:44:56 -050029 '/org/openbmc/control/host0' : 0,
Norman James2943cc62015-10-28 18:59:53 -050030 '/org/openbmc/control/flash/bios' : 0,
Norman James67b3bcc2015-11-11 10:41:38 -060031 '/org/openbmc/sensors/speed/fan5': 0,
Norman James98e1f7b2015-11-24 22:17:56 -060032 '/org/openbmc/inventory/system/chassis/io_board' : 0,
Norman James8ea118d2015-11-17 08:58:04 -060033 },
34 'BMC_STARTING2' : {
Kenfb444c52015-12-18 17:56:30 -060035 '/org/openbmc/control/fans' : 0,
Norman Jamesf5d2e5c2015-11-20 09:18:00 -060036 '/org/openbmc/control/chassis0': 0,
Norman James8ea118d2015-11-17 08:58:04 -060037 },
Norman James3e5c8592015-10-22 14:33:01 -050038}
39
Norman Jamesa9966b32015-10-28 06:55:58 -050040CACHED_INTERFACES = {
41 "org.openbmc.InventoryItem" : True,
42 "org.openbmc.control.Chassis" : True,
43 }
Norman James3e5c8592015-10-22 14:33:01 -050044INVENTORY_ROOT = '/org/openbmc/inventory'
Norman James362a80f2015-09-14 14:04:39 -050045
Norman James88872672015-09-21 16:51:35 -050046FRU_INSTANCES = {
Norman James7427e582015-12-03 17:54:54 -060047 '<inventory_root>/system' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" },
Norman James3bb97d92015-12-18 14:57:22 -060048 '<inventory_root>/system/bios' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" },
49 '<inventory_root>/system/misc' : { 'fru_type' : 'SYSTEM','is_fru' : False, },
Norman James19e45912015-10-04 20:19:41 -050050
Norman James7427e582015-12-03 17:54:54 -060051 '<inventory_root>/system/chassis' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" },
Norman James3e5c8592015-10-22 14:33:01 -050052
53 '<inventory_root>/system/chassis/motherboard' : { 'fru_type' : 'MAIN_PLANAR','is_fru' : True, },
54 '<inventory_root>/system/chassis/io_board' : { 'fru_type' : 'DAUGHTER_CARD','is_fru' : True, },
Norman James2abcddb2016-01-19 14:05:00 -060055 '<inventory_root>/system/chassis/sas_expander' : { 'fru_type' : 'DAUGHTER_CARD','is_fru' : True, },
56 '<inventory_root>/system/chassis/hdd_backplane' : { 'fru_type' : 'DAUGHTER_CARD','is_fru' : True, },
Norman James3e5c8592015-10-22 14:33:01 -050057
Norman James7427e582015-12-03 17:54:54 -060058 '<inventory_root>/system/systemevent' : { 'fru_type' : 'SYSTEM_EVENT', 'is_fru' : False, },
59 '<inventory_root>/system/chassis/motherboard/refclock' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
60 '<inventory_root>/system/chassis/motherboard/pcieclock': { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
61 '<inventory_root>/system/chassis/motherboard/todclock' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
62 '<inventory_root>/system/chassis/motherboard/apss' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
Norman James3e5c8592015-10-22 14:33:01 -050063
64 '<inventory_root>/system/chassis/fan0' : { 'fru_type' : 'FAN','is_fru' : True, },
65 '<inventory_root>/system/chassis/fan1' : { 'fru_type' : 'FAN','is_fru' : True, },
66 '<inventory_root>/system/chassis/fan2' : { 'fru_type' : 'FAN','is_fru' : True, },
67 '<inventory_root>/system/chassis/fan3' : { 'fru_type' : 'FAN','is_fru' : True, },
68 '<inventory_root>/system/chassis/fan4' : { 'fru_type' : 'FAN','is_fru' : True, },
Norman James2abcddb2016-01-19 14:05:00 -060069 '<inventory_root>/system/chassis/fan5' : { 'fru_type' : 'FAN','is_fru' : True, },
Norman James3e5c8592015-10-22 14:33:01 -050070
71 '<inventory_root>/system/chassis/motherboard/bmc' : { 'fru_type' : 'BMC','is_fru' : False, 'manufacturer' : 'ASPEED' },
72
73 '<inventory_root>/system/chassis/motherboard/cpu0' : { 'fru_type' : 'CPU', 'is_fru' : True, },
74 '<inventory_root>/system/chassis/motherboard/cpu1' : { 'fru_type' : 'CPU', 'is_fru' : True, },
75
76 '<inventory_root>/system/chassis/motherboard/cpu0/core0' : { 'fru_type' : 'CORE', 'is_fru' : False, },
77 '<inventory_root>/system/chassis/motherboard/cpu0/core1' : { 'fru_type' : 'CORE', 'is_fru' : False, },
78 '<inventory_root>/system/chassis/motherboard/cpu0/core2' : { 'fru_type' : 'CORE', 'is_fru' : False, },
79 '<inventory_root>/system/chassis/motherboard/cpu0/core3' : { 'fru_type' : 'CORE', 'is_fru' : False, },
80 '<inventory_root>/system/chassis/motherboard/cpu0/core4' : { 'fru_type' : 'CORE', 'is_fru' : False, },
81 '<inventory_root>/system/chassis/motherboard/cpu0/core5' : { 'fru_type' : 'CORE', 'is_fru' : False, },
82 '<inventory_root>/system/chassis/motherboard/cpu0/core6' : { 'fru_type' : 'CORE', 'is_fru' : False, },
83 '<inventory_root>/system/chassis/motherboard/cpu0/core7' : { 'fru_type' : 'CORE', 'is_fru' : False, },
84 '<inventory_root>/system/chassis/motherboard/cpu0/core8' : { 'fru_type' : 'CORE', 'is_fru' : False, },
85 '<inventory_root>/system/chassis/motherboard/cpu0/core9' : { 'fru_type' : 'CORE', 'is_fru' : False, },
86 '<inventory_root>/system/chassis/motherboard/cpu0/core10': { 'fru_type' : 'CORE', 'is_fru' : False, },
87 '<inventory_root>/system/chassis/motherboard/cpu0/core11': { 'fru_type' : 'CORE', 'is_fru' : False, },
88
89 '<inventory_root>/system/chassis/motherboard/cpu1/core0' : { 'fru_type' : 'CORE', 'is_fru' : False, },
90 '<inventory_root>/system/chassis/motherboard/cpu1/core1' : { 'fru_type' : 'CORE', 'is_fru' : False, },
91 '<inventory_root>/system/chassis/motherboard/cpu1/core2' : { 'fru_type' : 'CORE', 'is_fru' : False, },
92 '<inventory_root>/system/chassis/motherboard/cpu1/core3' : { 'fru_type' : 'CORE', 'is_fru' : False, },
93 '<inventory_root>/system/chassis/motherboard/cpu1/core4' : { 'fru_type' : 'CORE', 'is_fru' : False, },
94 '<inventory_root>/system/chassis/motherboard/cpu1/core5' : { 'fru_type' : 'CORE', 'is_fru' : False, },
95 '<inventory_root>/system/chassis/motherboard/cpu1/core6' : { 'fru_type' : 'CORE', 'is_fru' : False, },
96 '<inventory_root>/system/chassis/motherboard/cpu1/core7' : { 'fru_type' : 'CORE', 'is_fru' : False, },
97 '<inventory_root>/system/chassis/motherboard/cpu1/core8' : { 'fru_type' : 'CORE', 'is_fru' : False, },
98 '<inventory_root>/system/chassis/motherboard/cpu1/core9' : { 'fru_type' : 'CORE', 'is_fru' : False, },
99 '<inventory_root>/system/chassis/motherboard/cpu1/core10' : { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman James7427e582015-12-03 17:54:54 -0600100 '<inventory_root>/system/chassis/motherboard/cpu1/core11' : { 'fru_type' : 'CORE', 'is_fru' : False, },
Kenfb444c52015-12-18 17:56:30 -0600101
Norman James3bb97d92015-12-18 14:57:22 -0600102 '<inventory_root>/system/chassis/motherboard/membuf0' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
103 '<inventory_root>/system/chassis/motherboard/membuf1' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
104 '<inventory_root>/system/chassis/motherboard/membuf2' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
105 '<inventory_root>/system/chassis/motherboard/membuf3' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
106 '<inventory_root>/system/chassis/motherboard/membuf4' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
107 '<inventory_root>/system/chassis/motherboard/membuf5' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
108 '<inventory_root>/system/chassis/motherboard/membuf6' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
109 '<inventory_root>/system/chassis/motherboard/membuf7' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
Norman James3e5c8592015-10-22 14:33:01 -0500110
111 '<inventory_root>/system/chassis/motherboard/dimm0' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
112 '<inventory_root>/system/chassis/motherboard/dimm1' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
113 '<inventory_root>/system/chassis/motherboard/dimm2' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
114 '<inventory_root>/system/chassis/motherboard/dimm3' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
115 '<inventory_root>/system/chassis/motherboard/dimm4' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
116 '<inventory_root>/system/chassis/motherboard/dimm5' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
117 '<inventory_root>/system/chassis/motherboard/dimm6' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
118 '<inventory_root>/system/chassis/motherboard/dimm7' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
119 '<inventory_root>/system/chassis/motherboard/dimm8' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
120 '<inventory_root>/system/chassis/motherboard/dimm9' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
121 '<inventory_root>/system/chassis/motherboard/dimm10' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
122 '<inventory_root>/system/chassis/motherboard/dimm11' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
123 '<inventory_root>/system/chassis/motherboard/dimm12' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
124 '<inventory_root>/system/chassis/motherboard/dimm13' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
125 '<inventory_root>/system/chassis/motherboard/dimm14' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
126 '<inventory_root>/system/chassis/motherboard/dimm15' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
127 '<inventory_root>/system/chassis/motherboard/dimm16' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
128 '<inventory_root>/system/chassis/motherboard/dimm17' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
129 '<inventory_root>/system/chassis/motherboard/dimm18' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
130 '<inventory_root>/system/chassis/motherboard/dimm19' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
131 '<inventory_root>/system/chassis/motherboard/dimm20' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
132 '<inventory_root>/system/chassis/motherboard/dimm21' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
133 '<inventory_root>/system/chassis/motherboard/dimm22' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
134 '<inventory_root>/system/chassis/motherboard/dimm23' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
135 '<inventory_root>/system/chassis/motherboard/dimm24' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
136 '<inventory_root>/system/chassis/motherboard/dimm25' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
137 '<inventory_root>/system/chassis/motherboard/dimm26' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
138 '<inventory_root>/system/chassis/motherboard/dimm27' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
139 '<inventory_root>/system/chassis/motherboard/dimm28' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
140 '<inventory_root>/system/chassis/motherboard/dimm29' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
141 '<inventory_root>/system/chassis/motherboard/dimm30' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
142 '<inventory_root>/system/chassis/motherboard/dimm31' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
143
144 '<inventory_root>/system/chassis/io_board/pcie_slot0_riser' : { 'fru_type' : 'PCIE_RISER', 'is_fru' : True,},
145 '<inventory_root>/system/chassis/io_board/pcie_slot1_riser' : { 'fru_type' : 'PCIE_RISER', 'is_fru' : True,},
Norman James7427e582015-12-03 17:54:54 -0600146 '<inventory_root>/system/chassis/io_board/pcie_slot2_riser' : { 'fru_type' : 'PCIE_RISER', 'is_fru' : True,},
Norman James3e5c8592015-10-22 14:33:01 -0500147 '<inventory_root>/system/chassis/io_board/pcie_slot0' : { 'fru_type' : 'PCIE_CARD', 'is_fru' : True,},
148 '<inventory_root>/system/chassis/io_board/pcie_slot1' : { 'fru_type' : 'PCIE_CARD', 'is_fru' : True,},
Norman James8ea118d2015-11-17 08:58:04 -0600149 '<inventory_root>/system/chassis/io_board/pcie_slot2' : { 'fru_type' : 'PCIE_CARD', 'is_fru' : True,},
Norman James3e5c8592015-10-22 14:33:01 -0500150 '<inventory_root>/system/chassis/io_board/pcie_mezz0' : { 'fru_type' : 'PCIE_CARD', 'is_fru' : True,},
151 '<inventory_root>/system/chassis/io_board/pcie_mezz1' : { 'fru_type' : 'PCIE_CARD', 'is_fru' : True,},
Norman James88872672015-09-21 16:51:35 -0500152}
Norman James362a80f2015-09-14 14:04:39 -0500153
Norman James19e45912015-10-04 20:19:41 -0500154ID_LOOKUP = {
155 'FRU' : {
Kend6affe62015-11-05 14:44:01 +0800156 0x03 : '<inventory_root>/system/chassis/motherboard',
Norman James4f4bb6e2015-11-09 10:53:23 -0600157 0x40 : '<inventory_root>/system/chassis/io_board',
Norman James3e5c8592015-10-22 14:33:01 -0500158 0x01 : '<inventory_root>/system/chassis/motherboard/cpu0',
Kend6affe62015-11-05 14:44:01 +0800159 0x02 : '<inventory_root>/system/chassis/motherboard/cpu1',
Norman James3bb97d92015-12-18 14:57:22 -0600160 0x04 : '<inventory_root>/system/chassis/motherboard/membuf0',
161 0x05 : '<inventory_root>/system/chassis/motherboard/membuf1',
162 0x06 : '<inventory_root>/system/chassis/motherboard/membuf2',
163 0x07 : '<inventory_root>/system/chassis/motherboard/membuf3',
164 0x08 : '<inventory_root>/system/chassis/motherboard/membuf4',
165 0x09 : '<inventory_root>/system/chassis/motherboard/membuf5',
166 0x0a : '<inventory_root>/system/chassis/motherboard/membuf6',
167 0x0b : '<inventory_root>/system/chassis/motherboard/membuf7',
Kend6affe62015-11-05 14:44:01 +0800168 0x0c : '<inventory_root>/system/chassis/motherboard/dimm0',
169 0x0d : '<inventory_root>/system/chassis/motherboard/dimm1',
170 0x0e : '<inventory_root>/system/chassis/motherboard/dimm2',
171 0x0f : '<inventory_root>/system/chassis/motherboard/dimm3',
172 0x10 : '<inventory_root>/system/chassis/motherboard/dimm4',
173 0x11 : '<inventory_root>/system/chassis/motherboard/dimm5',
174 0x12 : '<inventory_root>/system/chassis/motherboard/dimm6',
175 0x13 : '<inventory_root>/system/chassis/motherboard/dimm7',
176 0x14 : '<inventory_root>/system/chassis/motherboard/dimm8',
177 0x15 : '<inventory_root>/system/chassis/motherboard/dimm9',
178 0x16 : '<inventory_root>/system/chassis/motherboard/dimm10',
179 0x17 : '<inventory_root>/system/chassis/motherboard/dimm11',
180 0x18 : '<inventory_root>/system/chassis/motherboard/dimm12',
181 0x19 : '<inventory_root>/system/chassis/motherboard/dimm13',
182 0x1a : '<inventory_root>/system/chassis/motherboard/dimm14',
183 0x1b : '<inventory_root>/system/chassis/motherboard/dimm15',
184 0x1c : '<inventory_root>/system/chassis/motherboard/dimm16',
185 0x1d : '<inventory_root>/system/chassis/motherboard/dimm17',
186 0x1e : '<inventory_root>/system/chassis/motherboard/dimm18',
187 0x1f : '<inventory_root>/system/chassis/motherboard/dimm19',
188 0x20 : '<inventory_root>/system/chassis/motherboard/dimm20',
189 0x21 : '<inventory_root>/system/chassis/motherboard/dimm21',
190 0x22 : '<inventory_root>/system/chassis/motherboard/dimm22',
191 0x23 : '<inventory_root>/system/chassis/motherboard/dimm23',
192 0x24 : '<inventory_root>/system/chassis/motherboard/dimm24',
193 0x25 : '<inventory_root>/system/chassis/motherboard/dimm25',
194 0x26 : '<inventory_root>/system/chassis/motherboard/dimm26',
195 0x27 : '<inventory_root>/system/chassis/motherboard/dimm27',
196 0x28 : '<inventory_root>/system/chassis/motherboard/dimm28',
197 0x29 : '<inventory_root>/system/chassis/motherboard/dimm29',
198 0x2a : '<inventory_root>/system/chassis/motherboard/dimm30',
199 0x2b : '<inventory_root>/system/chassis/motherboard/dimm31',
200 0x33 : '<inventory_root>/system',
Norman James3e5c8592015-10-22 14:33:01 -0500201 },
202 'FRU_STR' : {
Norman James3bb97d92015-12-18 14:57:22 -0600203 'PRODUCT_0' : '<inventory_root>/system/bios',
204 'BOARD_3' : '<inventory_root>/system/misc',
205 'PRODUCT_51' : '<inventory_root>/system/misc',
Norman James13162102015-11-23 21:04:06 -0600206 'BOARD_100' : '<inventory_root>/system/chassis/io_board',
Norman James2abcddb2016-01-19 14:05:00 -0600207 'BOARD_101' : '<inventory_root>/system/chassis/sas_expander',
208 'BOARD_102' : '<inventory_root>/system/chassis/hdd_backplane',
Norman James7427e582015-12-03 17:54:54 -0600209 'CHASSIS_3' : '<inventory_root>/system/chassis/motherboard',
Norman James4f4bb6e2015-11-09 10:53:23 -0600210 'BOARD_1' : '<inventory_root>/system/chassis/motherboard/cpu0',
211 'BOARD_2' : '<inventory_root>/system/chassis/motherboard/cpu1',
Norman James3bb97d92015-12-18 14:57:22 -0600212 'BOARD_4' : '<inventory_root>/system/chassis/motherboard/membuf0',
213 'BOARD_5' : '<inventory_root>/system/chassis/motherboard/membuf1',
214 'BOARD_6' : '<inventory_root>/system/chassis/motherboard/membuf2',
215 'BOARD_7' : '<inventory_root>/system/chassis/motherboard/membuf3',
216 'BOARD_8' : '<inventory_root>/system/chassis/motherboard/membuf4',
217 'BOARD_9' : '<inventory_root>/system/chassis/motherboard/membuf5',
218 'BOARD_10' : '<inventory_root>/system/chassis/motherboard/membuf6',
219 'BOARD_11' : '<inventory_root>/system/chassis/motherboard/membuf7',
Norman James4f4bb6e2015-11-09 10:53:23 -0600220 'PRODUCT_12' : '<inventory_root>/system/chassis/motherboard/dimm0',
221 'PRODUCT_13' : '<inventory_root>/system/chassis/motherboard/dimm1',
222 'PRODUCT_14' : '<inventory_root>/system/chassis/motherboard/dimm2',
223 'PRODUCT_15' : '<inventory_root>/system/chassis/motherboard/dimm3',
224 'PRODUCT_16' : '<inventory_root>/system/chassis/motherboard/dimm4',
225 'PRODUCT_17' : '<inventory_root>/system/chassis/motherboard/dimm5',
226 'PRODUCT_18' : '<inventory_root>/system/chassis/motherboard/dimm6',
227 'PRODUCT_19' : '<inventory_root>/system/chassis/motherboard/dimm7',
228 'PRODUCT_20' : '<inventory_root>/system/chassis/motherboard/dimm8',
229 'PRODUCT_21' : '<inventory_root>/system/chassis/motherboard/dimm9',
230 'PRODUCT_22' : '<inventory_root>/system/chassis/motherboard/dimm10',
231 'PRODUCT_23' : '<inventory_root>/system/chassis/motherboard/dimm11',
232 'PRODUCT_24' : '<inventory_root>/system/chassis/motherboard/dimm12',
233 'PRODUCT_25' : '<inventory_root>/system/chassis/motherboard/dimm13',
234 'PRODUCT_26' : '<inventory_root>/system/chassis/motherboard/dimm14',
235 'PRODUCT_27' : '<inventory_root>/system/chassis/motherboard/dimm15',
236 'PRODUCT_28' : '<inventory_root>/system/chassis/motherboard/dimm16',
237 'PRODUCT_29' : '<inventory_root>/system/chassis/motherboard/dimm17',
238 'PRODUCT_30' : '<inventory_root>/system/chassis/motherboard/dimm18',
239 'PRODUCT_31' : '<inventory_root>/system/chassis/motherboard/dimm19',
240 'PRODUCT_32' : '<inventory_root>/system/chassis/motherboard/dimm20',
241 'PRODUCT_33' : '<inventory_root>/system/chassis/motherboard/dimm21',
242 'PRODUCT_34' : '<inventory_root>/system/chassis/motherboard/dimm22',
243 'PRODUCT_35' : '<inventory_root>/system/chassis/motherboard/dimm23',
244 'PRODUCT_36' : '<inventory_root>/system/chassis/motherboard/dimm24',
245 'PRODUCT_37' : '<inventory_root>/system/chassis/motherboard/dimm25',
246 'PRODUCT_38' : '<inventory_root>/system/chassis/motherboard/dimm26',
247 'PRODUCT_39' : '<inventory_root>/system/chassis/motherboard/dimm27',
248 'PRODUCT_40' : '<inventory_root>/system/chassis/motherboard/dimm28',
249 'PRODUCT_41' : '<inventory_root>/system/chassis/motherboard/dimm29',
250 'PRODUCT_42' : '<inventory_root>/system/chassis/motherboard/dimm30',
251 'PRODUCT_43' : '<inventory_root>/system/chassis/motherboard/dimm31',
Norman James19e45912015-10-04 20:19:41 -0500252 },
253 'SENSOR' : {
Norman James7427e582015-12-03 17:54:54 -0600254 0x35 : '<inventory_root>/system/systemevent',
255 0x36 : '<inventory_root>/system/powerlimit',
Kend6affe62015-11-05 14:44:01 +0800256 0x34 : '<inventory_root>/system/chassis/motherboard',
Norman James7427e582015-12-03 17:54:54 -0600257 0x31 : '<inventory_root>/system/chassis/motherboard/pcielink',
258 0x37 : '<inventory_root>/system/chassis/motherboard/refclock',
259 0x38 : '<inventory_root>/system/chassis/motherboard/pcieclock',
260 0x39 : '<inventory_root>/system/chassis/motherboard/todclock',
Kenfb444c52015-12-18 17:56:30 -0600261 0x3A : '<inventory_root>/system/chassis/motherboard/apss',
Kend6affe62015-11-05 14:44:01 +0800262 0x0c : '<inventory_root>/system/chassis/motherboard/cpu0',
263 0x0e : '<inventory_root>/system/chassis/motherboard/cpu1',
264 0xc8 : '<inventory_root>/system/chassis/motherboard/cpu0/core0',
265 0xc9 : '<inventory_root>/system/chassis/motherboard/cpu0/core1',
266 0xca : '<inventory_root>/system/chassis/motherboard/cpu0/core2',
267 0xcb : '<inventory_root>/system/chassis/motherboard/cpu0/core3',
268 0xcc : '<inventory_root>/system/chassis/motherboard/cpu0/core4',
269 0xcd : '<inventory_root>/system/chassis/motherboard/cpu0/core5',
270 0xce : '<inventory_root>/system/chassis/motherboard/cpu0/core6',
271 0xcf : '<inventory_root>/system/chassis/motherboard/cpu0/core7',
272 0xd0 : '<inventory_root>/system/chassis/motherboard/cpu0/core8',
273 0xd1 : '<inventory_root>/system/chassis/motherboard/cpu0/core9',
274 0xd2 : '<inventory_root>/system/chassis/motherboard/cpu0/core10',
275 0xd3 : '<inventory_root>/system/chassis/motherboard/cpu0/core11',
Norman James7427e582015-12-03 17:54:54 -0600276 0xd4 : '<inventory_root>/system/chassis/motherboard/cpu1/core0',
277 0xd5 : '<inventory_root>/system/chassis/motherboard/cpu1/core1',
278 0xd6 : '<inventory_root>/system/chassis/motherboard/cpu1/core2',
279 0xd7 : '<inventory_root>/system/chassis/motherboard/cpu1/core3',
280 0xd8 : '<inventory_root>/system/chassis/motherboard/cpu1/core4',
281 0xd9 : '<inventory_root>/system/chassis/motherboard/cpu1/core5',
282 0xda : '<inventory_root>/system/chassis/motherboard/cpu1/core6',
283 0xdb : '<inventory_root>/system/chassis/motherboard/cpu1/core7',
284 0xdc : '<inventory_root>/system/chassis/motherboard/cpu1/core8',
285 0xdd : '<inventory_root>/system/chassis/motherboard/cpu1/core9',
286 0xde : '<inventory_root>/system/chassis/motherboard/cpu1/core10',
287 0xdf : '<inventory_root>/system/chassis/motherboard/cpu1/core11',
Norman James3bb97d92015-12-18 14:57:22 -0600288 0x40 : '<inventory_root>/system/chassis/motherboard/membuf0',
289 0x41 : '<inventory_root>/system/chassis/motherboard/membuf1',
290 0x42 : '<inventory_root>/system/chassis/motherboard/membuf2',
291 0x43 : '<inventory_root>/system/chassis/motherboard/membuf3',
292 0x44 : '<inventory_root>/system/chassis/motherboard/membuf4',
293 0x45 : '<inventory_root>/system/chassis/motherboard/membuf5',
294 0x46 : '<inventory_root>/system/chassis/motherboard/membuf6',
295 0x47 : '<inventory_root>/system/chassis/motherboard/membuf7',
Kend6affe62015-11-05 14:44:01 +0800296 0x10 : '<inventory_root>/system/chassis/motherboard/dimm0',
297 0x11 : '<inventory_root>/system/chassis/motherboard/dimm1',
298 0x12 : '<inventory_root>/system/chassis/motherboard/dimm2',
299 0x13 : '<inventory_root>/system/chassis/motherboard/dimm3',
300 0x14 : '<inventory_root>/system/chassis/motherboard/dimm4',
301 0x15 : '<inventory_root>/system/chassis/motherboard/dimm5',
302 0x16 : '<inventory_root>/system/chassis/motherboard/dimm6',
303 0x17 : '<inventory_root>/system/chassis/motherboard/dimm7',
304 0x18 : '<inventory_root>/system/chassis/motherboard/dimm8',
305 0x19 : '<inventory_root>/system/chassis/motherboard/dimm9',
306 0x1a : '<inventory_root>/system/chassis/motherboard/dimm10',
307 0x1b : '<inventory_root>/system/chassis/motherboard/dimm11',
308 0x1c : '<inventory_root>/system/chassis/motherboard/dimm12',
309 0x1d : '<inventory_root>/system/chassis/motherboard/dimm13',
310 0x1e : '<inventory_root>/system/chassis/motherboard/dimm14',
311 0x1f : '<inventory_root>/system/chassis/motherboard/dimm15',
312 0x20 : '<inventory_root>/system/chassis/motherboard/dimm16',
313 0x21 : '<inventory_root>/system/chassis/motherboard/dimm17',
314 0x22 : '<inventory_root>/system/chassis/motherboard/dimm18',
315 0x23 : '<inventory_root>/system/chassis/motherboard/dimm19',
316 0x24 : '<inventory_root>/system/chassis/motherboard/dimm20',
317 0x25 : '<inventory_root>/system/chassis/motherboard/dimm21',
318 0x26 : '<inventory_root>/system/chassis/motherboard/dimm22',
319 0x27 : '<inventory_root>/system/chassis/motherboard/dimm23',
320 0x28 : '<inventory_root>/system/chassis/motherboard/dimm24',
321 0x29 : '<inventory_root>/system/chassis/motherboard/dimm25',
322 0x2a : '<inventory_root>/system/chassis/motherboard/dimm26',
323 0x2b : '<inventory_root>/system/chassis/motherboard/dimm27',
324 0x2c : '<inventory_root>/system/chassis/motherboard/dimm28',
325 0x2d : '<inventory_root>/system/chassis/motherboard/dimm29',
326 0x2e : '<inventory_root>/system/chassis/motherboard/dimm30',
Kenfb444c52015-12-18 17:56:30 -0600327 0x2f : '<inventory_root>/system/chassis/motherboard/dimm31',
Chris Austen4c9ea5d2015-12-09 23:26:08 -0600328 0x09 : '/org/openbmc/sensors/host/BootCount',
329 0x05 : '/org/openbmc/sensors/host/BootProgress',
330 0x04 : '/org/openbmc/sensors/host/HostStatus',
Norman James86f2a072016-01-30 22:48:54 -0600331 0x08 : '/org/openbmc/sensors/host/cpu0/OccStatus',
332 0x0A : '/org/openbmc/sensors/host/cpu1/OccStatus',
Chris Austen4c9ea5d2015-12-09 23:26:08 -0600333 0x32 : '/org/openbmc/sensors/host/OperatingSystemStatus',
334 0x33 : '/org/openbmc/sensors/host/powercap',
Norman James19e45912015-10-04 20:19:41 -0500335 },
336 'GPIO_PRESENT' : {
Kenfb444c52015-12-18 17:56:30 -0600337 'SLOT0_RISER_PRESENT' : '<inventory_root>/system/chassis/io_board/pcie_slot0_riser',
338 'SLOT1_RISER_PRESENT' : '<inventory_root>/system/chassis/io_board/pcie_slot1_riser',
339 'SLOT2_RISER_PRESENT' : '<inventory_root>/system/chassis/io_board/pcie_slot2_riser',
340 'SLOT0_PRESENT' : '<inventory_root>/system/chassis/io_board/pcie_slot0',
341 'SLOT1_PRESENT' : '<inventory_root>/system/chassis/io_board/pcie_slot1',
342 'SLOT2_PRESENT' : '<inventory_root>/system/chassis/io_board/pcie_slot2',
343 'MEZZ0_PRESENT' : '<inventory_root>/system/chassis/io_board/pcie_mezz0',
344 'MEZZ1_PRESENT' : '<inventory_root>/system/chassis/io_board/pcie_mezz1',
Norman James19e45912015-10-04 20:19:41 -0500345 }
346}
Norman James362a80f2015-09-14 14:04:39 -0500347
Norman Jamesce46e3e2015-08-30 22:25:55 -0500348GPIO_CONFIG = {}
Norman Jamesb38ea5a2015-10-28 12:44:56 -0500349GPIO_CONFIG['FSI_CLK'] = { 'gpio_pin': 'A4', 'direction': 'out' }
350GPIO_CONFIG['FSI_DATA'] = { 'gpio_pin': 'A5', 'direction': 'out' }
351GPIO_CONFIG['FSI_ENABLE'] = { 'gpio_pin': 'D0', 'direction': 'out' }
352GPIO_CONFIG['POWER_PIN'] = { 'gpio_pin': 'E1', 'direction': 'out' }
353GPIO_CONFIG['CRONUS_SEL'] = { 'gpio_pin': 'A6', 'direction': 'out' }
354GPIO_CONFIG['PGOOD'] = { 'gpio_pin': 'C7', 'direction': 'in' }
Norman James2943cc62015-10-28 18:59:53 -0500355GPIO_CONFIG['POWER_BUTTON'] = { 'gpio_pin': 'E0', 'direction': 'both' }
Norman Jamese62f4452015-10-31 17:33:10 -0500356GPIO_CONFIG['PCIE_RESET'] = { 'gpio_pin': 'B5', 'direction': 'out' }
357GPIO_CONFIG['USB_RESET'] = { 'gpio_pin': 'B6', 'direction': 'out' }
Kenfb444c52015-12-18 17:56:30 -0600358
Ken584747e2016-05-18 15:18:05 +0800359GPIO_CONFIG['IDBTN'] = { 'gpio_pin': 'Q7', 'direction': 'out' }
Kenfb444c52015-12-18 17:56:30 -0600360GPIO_CONFIG['BMC_THROTTLE'] = { 'gpio_pin': 'J3', 'direction': 'out' }
361GPIO_CONFIG['RESET_BUTTON'] = { 'gpio_pin': 'E2', 'direction': 'both' }
362GPIO_CONFIG['CPLD_TCK'] = { 'gpio_pin': 'P0', 'direction': 'out' }
363GPIO_CONFIG['CPLD_TDO'] = { 'gpio_pin': 'P1', 'direction': 'out' }
364GPIO_CONFIG['CPLD_TDI'] = { 'gpio_pin': 'P2', 'direction': 'out' }
365GPIO_CONFIG['CPLD_TMS'] = { 'gpio_pin': 'P3', 'direction': 'out' }
Adriana Kobylak341c8c22016-06-16 09:20:55 -0500366GPIO_CONFIG['CHECKSTOP'] = { 'gpio_pin': 'P5', 'direction': 'falling' }
Kenfb444c52015-12-18 17:56:30 -0600367
Norman Jamesb38ea5a2015-10-28 12:44:56 -0500368GPIO_CONFIG['SLOT0_RISER_PRESENT'] = { 'gpio_pin': 'N0', 'direction': 'in' }
369GPIO_CONFIG['SLOT1_RISER_PRESENT'] = { 'gpio_pin': 'N1', 'direction': 'in' }
370GPIO_CONFIG['SLOT2_RISER_PRESENT'] = { 'gpio_pin': 'N2', 'direction': 'in' }
371GPIO_CONFIG['SLOT0_PRESENT'] = { 'gpio_pin': 'N3', 'direction': 'in' }
372GPIO_CONFIG['SLOT1_PRESENT'] = { 'gpio_pin': 'N4', 'direction': 'in' }
373GPIO_CONFIG['SLOT2_PRESENT'] = { 'gpio_pin': 'N5', 'direction': 'in' }
374GPIO_CONFIG['MEZZ0_PRESENT'] = { 'gpio_pin': 'O0', 'direction': 'in' }
375GPIO_CONFIG['MEZZ1_PRESENT'] = { 'gpio_pin': 'O1', 'direction': 'in' }
Norman Jamesa9966b32015-10-28 06:55:58 -0500376
377def convertGpio(name):
378 name = name.upper()
379 c = name[0:1]
380 offset = int(name[1:])
381 a = ord(c)-65
382 base = a*8+GPIO_BASE
383 return base+offset
384
385
Norman James3cb0f982015-12-03 01:07:16 -0600386HWMON_CONFIG = {
Norman James3bb97d92015-12-18 14:57:22 -0600387 '0-004a' : {
Kenfb444c52015-12-18 17:56:30 -0600388 'names' : {
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500389 'temp1_input' : { 'object_path' : 'temperature/ambient','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
Norman James3bb97d92015-12-18 14:57:22 -0600390 }
Norman James3cb0f982015-12-03 01:07:16 -0600391 },
392 '6-002d' : {
Norman James3bb97d92015-12-18 14:57:22 -0600393 'names' : {
394 'pwm1' : { 'object_path' : 'speed/fan0','poll_interval' : 10000,'scale' : 1,'units' : '' },
395 'pwm2' : { 'object_path' : 'speed/fan1','poll_interval' : 10000,'scale' : 1,'units' : '' },
Kenfb444c52015-12-18 17:56:30 -0600396 'pwm3' : { 'object_path' : 'speed/fan2','poll_interval' : 10000,'scale' : 1,'units' : '' },
397 'in1_input' : { 'object_path' : 'voltage/P1V35_CPU0_BUF4','poll_interval' : 10000,'scale' : 1,'units' : '' },
398 'in2_input' : { 'object_path' : 'voltage/P0V9_CPU0_BUF1','poll_interval' : 10000,'scale' : 1,'units' : '' },
399 'in3_input' : { 'object_path' : 'voltage/P0V9_CPU0_BUF2','poll_interval' : 10000,'scale' : 1,'units' : '' },
400 'in4_input' : { 'object_path' : 'voltage/P0V9_CPU0_BUF3','poll_interval' : 10000,'scale' : 1,'units' : '' },
401 'in5_input' : { 'object_path' : 'voltage/P0V9_CPU0_BUF4','poll_interval' : 10000,'scale' : 1,'units' : '' },
402 'in6_input' : { 'object_path' : 'voltage/P1V09_CPU0_BUF1','poll_interval' : 10000,'scale' : 1,'units' : '' },
403 'in7_input' : { 'object_path' : 'voltage/P1V09_CPU0_BUF2','poll_interval' : 10000,'scale' : 1,'units' : '' },
404 'in8_input' : { 'object_path' : 'voltage/P1V09_CPU0_BUF3','poll_interval' : 10000,'scale' : 1,'units' : '' },
405 'in9_input' : { 'object_path' : 'voltage/P1V09_CPU0_BUF4','poll_interval' : 10000,'scale' : 1,'units' : '' },
406 'in10_input' : { 'object_path' : 'voltage/P0V97_CPU0','poll_interval' : 10000,'scale' : 1,'units' : '' },
407 'in11_input' : { 'object_path' : 'voltage/P1V1_MEM0','poll_interval' : 10000,'scale' : 1,'units' : '' },
408 'in12_input' : { 'object_path' : 'voltage/P1V35_CPU0_BUF1','poll_interval' : 10000,'scale' : 1,'units' : '' },
409 'in13_input' : { 'object_path' : 'voltage/P1V35_CPU0_BUF2','poll_interval' : 10000,'scale' : 1,'units' : '' },
410 'in14_input' : { 'object_path' : 'voltage/P1V35_CPU0_BUF3','poll_interval' : 10000,'scale' : 1,'units' : '' },
Norman James3bb97d92015-12-18 14:57:22 -0600411 }
Norman James3cb0f982015-12-03 01:07:16 -0600412 },
413 '6-002e' : {
Norman James3bb97d92015-12-18 14:57:22 -0600414 'names' : {
415 'pwm1' : { 'object_path' : 'speed/fan3','poll_interval' : 10000,'scale' : 1,'units' : '' },
416 'pwm2' : { 'object_path' : 'speed/fan4','poll_interval' : 10000,'scale' : 1,'units' : '' },
417 'pwm3' : { 'object_path' : 'speed/fan5','poll_interval' : 10000,'scale' : 1,'units' : '' },
Kenfb444c52015-12-18 17:56:30 -0600418 'in1_input' : { 'object_path' : 'voltage/P1V35_CPU1_BUF4','poll_interval' : 10000,'scale' : 1,'units' : '' },
419 'in2_input' : { 'object_path' : 'voltage/P0V9_CPU1_BUF1','poll_interval' : 10000,'scale' : 1,'units' : '' },
420 'in3_input' : { 'object_path' : 'voltage/P0V9_CPU1_BUF2','poll_interval' : 10000,'scale' : 1,'units' : '' },
421 'in4_input' : { 'object_path' : 'voltage/P0V9_CPU1_BUF3','poll_interval' : 10000,'scale' : 1,'units' : '' },
422 'in5_input' : { 'object_path' : 'voltage/P0V9_CPU1_BUF4','poll_interval' : 10000,'scale' : 1,'units' : '' },
423 'in6_input' : { 'object_path' : 'voltage/P1V09_CPU1_BUF1','poll_interval' : 10000,'scale' : 1,'units' : '' },
424 'in7_input' : { 'object_path' : 'voltage/P1V09_CPU1_BUF2','poll_interval' : 10000,'scale' : 1,'units' : '' },
425 'in8_input' : { 'object_path' : 'voltage/P1V09_CPU1_BUF3','poll_interval' : 10000,'scale' : 1,'units' : '' },
426 'in9_input' : { 'object_path' : 'voltage/P1V09_CPU1_BUF4','poll_interval' : 10000,'scale' : 1,'units' : '' },
427 'in10_input' : { 'object_path' : 'voltage/P0V97_CPU1','poll_interval' : 10000,'scale' : 1,'units' : '' },
428 'in11_input' : { 'object_path' : 'voltage/P1V1_MEM1','poll_interval' : 10000,'scale' : 1,'units' : '' },
429 'in12_input' : { 'object_path' : 'voltage/P1V35_CPU1_BUF1','poll_interval' : 10000,'scale' : 1,'units' : '' },
430 'in13_input' : { 'object_path' : 'voltage/P1V35_CPU1_BUF2','poll_interval' : 10000,'scale' : 1,'units' : '' },
431 'in14_input' : { 'object_path' : 'voltage/P1V35_CPU1_BUF3','poll_interval' : 10000,'scale' : 1,'units' : '' },
Norman James3bb97d92015-12-18 14:57:22 -0600432 }
Kenfb444c52015-12-18 17:56:30 -0600433 },
Norman James3cb0f982015-12-03 01:07:16 -0600434 '3-0050' : {
Yi Li155f93f2016-01-30 15:30:14 +0800435 'names' : {
436 'caps_curr_powercap' : { 'object_path' : 'powercap/curr_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
437 'caps_curr_powerreading' : { 'object_path' : 'powercap/system_power','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
438 'caps_max_powercap' : { 'object_path' : 'powercap/max_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
439 'caps_min_powercap' : { 'object_path' : 'powercap/min_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
440 'caps_norm_powercap' : { 'object_path' : 'powercap/n_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
441 'caps_user_powerlimit' : { 'object_path' : 'powercap/user_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
442 },
Norman James3bb97d92015-12-18 14:57:22 -0600443 'labels' : {
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500444 '176' : { 'object_path' : 'temperature/cpu0/core0','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Norman James72567ba2016-01-13 16:57:48 -0600445 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500446 '177' : { 'object_path' : 'temperature/cpu0/core1','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Norman James72567ba2016-01-13 16:57:48 -0600447 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500448 '178' : { 'object_path' : 'temperature/cpu0/core2','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Norman James72567ba2016-01-13 16:57:48 -0600449 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500450 '179' : { 'object_path' : 'temperature/cpu0/core3','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Norman James72567ba2016-01-13 16:57:48 -0600451 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500452 '180' : { 'object_path' : 'temperature/cpu0/core4','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Norman James72567ba2016-01-13 16:57:48 -0600453 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500454 '181' : { 'object_path' : 'temperature/cpu0/core5','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Norman James72567ba2016-01-13 16:57:48 -0600455 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500456 '182' : { 'object_path' : 'temperature/cpu0/core6','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Norman James72567ba2016-01-13 16:57:48 -0600457 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500458 '183' : { 'object_path' : 'temperature/cpu0/core7','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Norman James72567ba2016-01-13 16:57:48 -0600459 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500460 '184' : { 'object_path' : 'temperature/cpu0/core8','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Norman James72567ba2016-01-13 16:57:48 -0600461 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500462 '185' : { 'object_path' : 'temperature/cpu0/core9','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Norman James72567ba2016-01-13 16:57:48 -0600463 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500464 '186' : { 'object_path' : 'temperature/cpu0/core10','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Norman James72567ba2016-01-13 16:57:48 -0600465 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500466 '187' : { 'object_path' : 'temperature/cpu0/core11','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Norman James72567ba2016-01-13 16:57:48 -0600467 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500468 '102' : { 'object_path' : 'temperature/dimm0','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
469 '103' : { 'object_path' : 'temperature/dimm1','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
470 '104' : { 'object_path' : 'temperature/dimm2','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
471 '105' : { 'object_path' : 'temperature/dimm3','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
472 '106' : { 'object_path' : 'temperature/dimm4','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
473 '107' : { 'object_path' : 'temperature/dimm5','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
474 '108' : { 'object_path' : 'temperature/dimm6','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
475 '109' : { 'object_path' : 'temperature/dimm7','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
476 '110' : { 'object_path' : 'temperature/dimm8','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
477 '111' : { 'object_path' : 'temperature/dimm9','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
478 '112' : { 'object_path' : 'temperature/dimm10','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
479 '113' : { 'object_path' : 'temperature/dimm11','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
480 '114' : { 'object_path' : 'temperature/dimm12','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
481 '115' : { 'object_path' : 'temperature/dimm13','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
482 '116' : { 'object_path' : 'temperature/dimm14','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
483 '117' : { 'object_path' : 'temperature/dimm15','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
484 '94' : { 'object_path' : 'temperature/membuf0','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
485 '95' : { 'object_path' : 'temperature/membuf1','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
486 '96' : { 'object_path' : 'temperature/membuf2','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
487 '97' : { 'object_path' : 'temperature/membuf3','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
Norman James3bb97d92015-12-18 14:57:22 -0600488 }
Norman James3cb0f982015-12-03 01:07:16 -0600489 },
490 '3-0051' : {
Norman James3bb97d92015-12-18 14:57:22 -0600491 'labels' : {
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500492 '188' : { 'object_path' : 'temperature/cpu1/core0','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Norman James72567ba2016-01-13 16:57:48 -0600493 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500494 '189' : { 'object_path' : 'temperature/cpu1/core1','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Norman James72567ba2016-01-13 16:57:48 -0600495 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500496 '190' : { 'object_path' : 'temperature/cpu1/core2','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Norman James72567ba2016-01-13 16:57:48 -0600497 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500498 '191' : { 'object_path' : 'temperature/cpu1/core3','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Norman James72567ba2016-01-13 16:57:48 -0600499 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500500 '192' : { 'object_path' : 'temperature/cpu1/core4','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Norman James72567ba2016-01-13 16:57:48 -0600501 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500502 '193' : { 'object_path' : 'temperature/cpu1/core5','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Norman James72567ba2016-01-13 16:57:48 -0600503 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500504 '194' : { 'object_path' : 'temperature/cpu1/core6','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Norman James72567ba2016-01-13 16:57:48 -0600505 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500506 '195' : { 'object_path' : 'temperature/cpu1/core7','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Norman James72567ba2016-01-13 16:57:48 -0600507 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500508 '196' : { 'object_path' : 'temperature/cpu1/core8','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Norman James72567ba2016-01-13 16:57:48 -0600509 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500510 '197' : { 'object_path' : 'temperature/cpu1/core9','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Norman James72567ba2016-01-13 16:57:48 -0600511 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500512 '198' : { 'object_path' : 'temperature/cpu1/core10','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Norman James72567ba2016-01-13 16:57:48 -0600513 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500514 '199' : { 'object_path' : 'temperature/cpu1/core11','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Norman James72567ba2016-01-13 16:57:48 -0600515 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500516 '118' : { 'object_path' : 'temperature/dimm16','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
517 '119' : { 'object_path' : 'temperature/dimm17','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
518 '120' : { 'object_path' : 'temperature/dimm18','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
519 '121' : { 'object_path' : 'temperature/dimm19','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
520 '122' : { 'object_path' : 'temperature/dimm20','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
521 '123' : { 'object_path' : 'temperature/dimm21','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
522 '124' : { 'object_path' : 'temperature/dimm22','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
523 '125' : { 'object_path' : 'temperature/dimm23','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
524 '126' : { 'object_path' : 'temperature/dimm24','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
525 '127' : { 'object_path' : 'temperature/dimm25','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
526 '128' : { 'object_path' : 'temperature/dimm26','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
527 '129' : { 'object_path' : 'temperature/dimm27','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
528 '130' : { 'object_path' : 'temperature/dimm28','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
529 '131' : { 'object_path' : 'temperature/dimm29','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
530 '132' : { 'object_path' : 'temperature/dimm30','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
531 '133' : { 'object_path' : 'temperature/dimm31','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
532 '98' : { 'object_path' : 'temperature/membuf4','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
533 '99' : { 'object_path' : 'temperature/membuf5','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
534 '100' : { 'object_path' : 'temperature/membuf6','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
535 '101' : { 'object_path' : 'temperature/membuf7','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
Norman James3bb97d92015-12-18 14:57:22 -0600536 }
Norman James3cb0f982015-12-03 01:07:16 -0600537 },
Yi Lia8260c82016-03-16 14:37:57 +0800538 '4-0010' : {
539 'names' : {
540 # Barreleye uses 0.25 millioohms sense resistor for adm1278
541 # To convert Iout register value Y to real-world value X, use an equation:
542 # X= 1/m * (Y * 10^-R - b), here m = 800 * R_sense, and R_sense is expressed in milliohms.
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500543 # The adm1278 driver did the conversion.
544 # We need to convert to the base unit from mA/mV. Scale is an exponent (10^x)
545 'curr1_input' : { 'object_path' : 'HSCA/Iout','poll_interval' : 5000,'adjust' : 0.25,'scale' : -3,'units' : 'A' },
546 'in2_input' : { 'object_path' : 'HSCA/Vout','poll_interval' : 5000,'scale' : -3,'units' : 'V' },
Yi Lia8260c82016-03-16 14:37:57 +0800547 }
548 },
549 '5-0010' : {
550 'names' : {
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500551 'curr1_input' : { 'object_path' : 'HSCB/Iout','poll_interval' : 5000,'adjust' : 0.25,'scale' : -3,'units' : 'A' },
552 'in2_input' : { 'object_path' : 'HSCB/Vout','poll_interval' : 5000,'scale' : -3,'units' : 'V' },
Yi Lia8260c82016-03-16 14:37:57 +0800553 }
554 },
555 '6-0010' : {
556 'names' : {
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500557 'curr1_input' : { 'object_path' : 'HSCC/Iout','poll_interval' : 5000,'adjust' : 0.25,'scale' : -3,'units' : 'A' },
558 'in2_input' : { 'object_path' : 'HSCC/Vout','poll_interval' : 5000,'scale' : -3,'units' : 'V' },
Yi Lia8260c82016-03-16 14:37:57 +0800559 }
560 },
Norman James3cb0f982015-12-03 01:07:16 -0600561}
Norman Jamesa9966b32015-10-28 06:55:58 -0500562
Yi Li54decc82016-05-05 17:42:56 +0800563# Miscellaneous non-poll sensor with system specific properties.
564# The sensor id is the same as those defined in ID_LOOKUP['SENSOR'].
565MISC_SENSORS = {
566 0x09 : { 'class' : 'BootCountSensor' },
567 0x05 : { 'class' : 'BootProgressSensor' },
568 0x08 : { 'class' : 'OccStatusSensor',
569 'os_path' : '/sys/class/i2c-adapter/i2c-3/3-0050/online' },
570 0x0A : { 'class' : 'OccStatusSensor',
571 'os_path' : '/sys/class/i2c-adapter/i2c-3/3-0051/online' },
572 0x32 : { 'class' : 'OperatingSystemStatusSensor' },
573 0x33 : { 'class' : 'PowerCap',
574 'os_path' : '/sys/class/hwmon/hwmon3/user_powercap' },
575}
Brad Bishop53066752016-09-21 08:48:04 -0400576
577# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4