Brandon Wyman | 34e257b | 2019-03-28 17:39:18 -0500 | [diff] [blame] | 1 | /* This is a generated file. */ |
Matt Spinler | b54357f | 2017-08-21 14:38:54 -0500 | [diff] [blame] | 2 | |
Brandon Wyman | 34e257b | 2019-03-28 17:39:18 -0500 | [diff] [blame] | 3 | #include "ucd90160.hpp" |
Matt Spinler | b54357f | 2017-08-21 14:38:54 -0500 | [diff] [blame] | 4 | |
| 5 | namespace witherspoon |
| 6 | { |
| 7 | namespace power |
| 8 | { |
| 9 | |
| 10 | using namespace ucd90160; |
| 11 | using namespace std::string_literals; |
| 12 | |
Matt Spinler | f0f02b9 | 2018-10-25 16:12:43 -0500 | [diff] [blame] | 13 | const DeviceMap UCD90160::deviceMap{ |
Brandon Wyman | f99887b | 2019-04-05 17:37:14 -0500 | [diff] [blame] | 14 | %for ucd_data in ucd90160s: |
| 15 | {${ucd_data['index']}, |
Matt Spinler | f0f02b9 | 2018-10-25 16:12:43 -0500 | [diff] [blame] | 16 | DeviceDefinition{ |
Brandon Wyman | ee21fd2 | 2019-04-11 15:46:45 -0500 | [diff] [blame^] | 17 | "${ucd_data['path']}", |
Matt Spinler | e7e432b | 2017-08-21 15:01:40 -0500 | [diff] [blame] | 18 | |
Brandon Wyman | ee21fd2 | 2019-04-11 15:46:45 -0500 | [diff] [blame^] | 19 | RailNames{ |
| 20 | %for rail in ucd_data['RailNames']: |
| 21 | "${rail}"s, |
| 22 | %endfor |
| 23 | }, |
Matt Spinler | d998b73 | 2017-08-21 15:35:54 -0500 | [diff] [blame] | 24 | |
Matt Spinler | f0f02b9 | 2018-10-25 16:12:43 -0500 | [diff] [blame] | 25 | GPIConfigs{ |
| 26 | GPIConfig{1, 8, "PGOOD_5P0V"s, false, extraAnalysisType::none}, |
| 27 | GPIConfig{2, 9, "MEM_GOOD0"s, false, extraAnalysisType::none}, |
| 28 | GPIConfig{3, 10, "MEM_GOOD1"s, false, extraAnalysisType::none}, |
| 29 | GPIConfig{4, 14, "GPU_PGOOD"s, false, extraAnalysisType::gpuPGOOD}, |
| 30 | GPIConfig{5, 17, "GPU_TH_OVERT"s, true, |
| 31 | extraAnalysisType::gpuOverTemp}, |
| 32 | GPIConfig{6, 11, "SOFTWARE_PGOOD"s, false, |
| 33 | extraAnalysisType::none}}, |
Matt Spinler | 2d248ae | 2017-09-19 11:06:48 -0500 | [diff] [blame] | 34 | |
Matt Spinler | f0f02b9 | 2018-10-25 16:12:43 -0500 | [diff] [blame] | 35 | GPIOAnalysis{ |
| 36 | {extraAnalysisType::gpuPGOOD, |
| 37 | GPIOGroup{ |
Matt Spinler | 57bee32 | 2019-03-22 10:39:03 -0500 | [diff] [blame] | 38 | "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@" |
Matt Spinler | f0f02b9 | 2018-10-25 16:12:43 -0500 | [diff] [blame] | 39 | "1e78a000/1e78a400.i2c-bus/i2c-11/11-0060", |
| 40 | gpio::Value::low, |
| 41 | [](auto& ucd, const auto& callout) { |
| 42 | ucd.gpuPGOODError(callout); |
| 43 | }, |
| 44 | optionFlags::none, |
| 45 | GPIODefinitions{ |
| 46 | GPIODefinition{8, |
| 47 | "/system/chassis/motherboard/gv100card0"s}, |
| 48 | GPIODefinition{9, |
| 49 | "/system/chassis/motherboard/gv100card1"s}, |
| 50 | GPIODefinition{10, |
| 51 | "/system/chassis/motherboard/gv100card2"s}, |
| 52 | GPIODefinition{11, |
| 53 | "/system/chassis/motherboard/gv100card3"s}, |
| 54 | GPIODefinition{12, |
| 55 | "/system/chassis/motherboard/gv100card4"s}, |
| 56 | GPIODefinition{ |
| 57 | 13, "/system/chassis/motherboard/gv100card5"s}}}}, |
Matt Spinler | 2d248ae | 2017-09-19 11:06:48 -0500 | [diff] [blame] | 58 | |
Matt Spinler | f0f02b9 | 2018-10-25 16:12:43 -0500 | [diff] [blame] | 59 | {extraAnalysisType::gpuOverTemp, |
| 60 | GPIOGroup{ |
Matt Spinler | 57bee32 | 2019-03-22 10:39:03 -0500 | [diff] [blame] | 61 | "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@" |
Matt Spinler | f0f02b9 | 2018-10-25 16:12:43 -0500 | [diff] [blame] | 62 | "1e78a000/1e78a400.i2c-bus/i2c-11/11-0060", |
| 63 | gpio::Value::low, |
| 64 | [](auto& ucd, |
| 65 | const auto& callout) { ucd.gpuOverTempError(callout); }, |
| 66 | optionFlags::shutdownOnFault, |
| 67 | GPIODefinitions{ |
| 68 | GPIODefinition{2, |
| 69 | "/system/chassis/motherboard/gv100card0"s}, |
| 70 | GPIODefinition{3, |
| 71 | "/system/chassis/motherboard/gv100card1"s}, |
| 72 | GPIODefinition{4, |
| 73 | "/system/chassis/motherboard/gv100card2"s}, |
| 74 | GPIODefinition{5, |
| 75 | "/system/chassis/motherboard/gv100card3"s}, |
| 76 | GPIODefinition{6, |
| 77 | "/system/chassis/motherboard/gv100card4"s}, |
| 78 | GPIODefinition{ |
Brandon Wyman | f99887b | 2019-04-05 17:37:14 -0500 | [diff] [blame] | 79 | 7, "/system/chassis/motherboard/gv100card5"s}}}}}} |
| 80 | }, |
| 81 | %endfor |
| 82 | }; |
Matt Spinler | b54357f | 2017-08-21 14:38:54 -0500 | [diff] [blame] | 83 | |
Matt Spinler | f0f02b9 | 2018-10-25 16:12:43 -0500 | [diff] [blame] | 84 | } // namespace power |
| 85 | } // namespace witherspoon |