blob: 52d1c4f1782a5b3afaa4a4ba32f5eea6abc21958 [file] [log] [blame]
Brandon Wyman34e257b2019-03-28 17:39:18 -05001/* This is a generated file. */
Matt Spinlerb54357f2017-08-21 14:38:54 -05002
Brandon Wyman34e257b2019-03-28 17:39:18 -05003#include "ucd90160.hpp"
Matt Spinlerb54357f2017-08-21 14:38:54 -05004
5namespace witherspoon
6{
7namespace power
8{
9
10using namespace ucd90160;
11using namespace std::string_literals;
12
Matt Spinlerf0f02b92018-10-25 16:12:43 -050013const DeviceMap UCD90160::deviceMap{
Brandon Wymanf99887b2019-04-05 17:37:14 -050014%for ucd_data in ucd90160s:
15 {${ucd_data['index']},
Matt Spinlerf0f02b92018-10-25 16:12:43 -050016 DeviceDefinition{
Brandon Wymanee21fd22019-04-11 15:46:45 -050017 "${ucd_data['path']}",
Matt Spinlere7e432b2017-08-21 15:01:40 -050018
Brandon Wymanee21fd22019-04-11 15:46:45 -050019 RailNames{
20 %for rail in ucd_data['RailNames']:
21 "${rail}"s,
22 %endfor
23 },
Matt Spinlerd998b732017-08-21 15:35:54 -050024
Brandon Wyman2ca8e482019-04-11 16:33:14 -050025 GPIConfigs{
26 %for gpi_config in ucd_data['GPIConfigs']:
27 <%
28 poll = str(gpi_config['poll']).lower()
29 %>\
30 GPIConfig{${gpi_config['gpi']}, ${gpi_config['pinID']}, "${gpi_config['name']}"s, ${poll}, extraAnalysisType::${gpi_config['analysis']}},
31 %endfor
32 },
Matt Spinler2d248ae2017-09-19 11:06:48 -050033
Matt Spinlerf0f02b92018-10-25 16:12:43 -050034 GPIOAnalysis{
35 {extraAnalysisType::gpuPGOOD,
36 GPIOGroup{
Matt Spinler57bee322019-03-22 10:39:03 -050037 "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@"
Matt Spinlerf0f02b92018-10-25 16:12:43 -050038 "1e78a000/1e78a400.i2c-bus/i2c-11/11-0060",
39 gpio::Value::low,
40 [](auto& ucd, const auto& callout) {
41 ucd.gpuPGOODError(callout);
42 },
43 optionFlags::none,
44 GPIODefinitions{
45 GPIODefinition{8,
46 "/system/chassis/motherboard/gv100card0"s},
47 GPIODefinition{9,
48 "/system/chassis/motherboard/gv100card1"s},
49 GPIODefinition{10,
50 "/system/chassis/motherboard/gv100card2"s},
51 GPIODefinition{11,
52 "/system/chassis/motherboard/gv100card3"s},
53 GPIODefinition{12,
54 "/system/chassis/motherboard/gv100card4"s},
55 GPIODefinition{
56 13, "/system/chassis/motherboard/gv100card5"s}}}},
Matt Spinler2d248ae2017-09-19 11:06:48 -050057
Matt Spinlerf0f02b92018-10-25 16:12:43 -050058 {extraAnalysisType::gpuOverTemp,
59 GPIOGroup{
Matt Spinler57bee322019-03-22 10:39:03 -050060 "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@"
Matt Spinlerf0f02b92018-10-25 16:12:43 -050061 "1e78a000/1e78a400.i2c-bus/i2c-11/11-0060",
62 gpio::Value::low,
63 [](auto& ucd,
64 const auto& callout) { ucd.gpuOverTempError(callout); },
65 optionFlags::shutdownOnFault,
66 GPIODefinitions{
67 GPIODefinition{2,
68 "/system/chassis/motherboard/gv100card0"s},
69 GPIODefinition{3,
70 "/system/chassis/motherboard/gv100card1"s},
71 GPIODefinition{4,
72 "/system/chassis/motherboard/gv100card2"s},
73 GPIODefinition{5,
74 "/system/chassis/motherboard/gv100card3"s},
75 GPIODefinition{6,
76 "/system/chassis/motherboard/gv100card4"s},
77 GPIODefinition{
Brandon Wymanf99887b2019-04-05 17:37:14 -050078 7, "/system/chassis/motherboard/gv100card5"s}}}}}}
79 },
80%endfor
81};
Matt Spinlerb54357f2017-08-21 14:38:54 -050082
Matt Spinlerf0f02b92018-10-25 16:12:43 -050083} // namespace power
84} // namespace witherspoon