blob: 531a989394188c2a930518b27df990fe790fed60 [file] [log] [blame]
Matt Spinlerb54357f2017-08-21 14:38:54 -05001/**
2 * Copyright © 2017 IBM Corporation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#include "ucd90160.hpp"
17
Matt Spinlerf0f02b92018-10-25 16:12:43 -050018// Separated out to facilitate possible future generation of file.
Matt Spinlerb54357f2017-08-21 14:38:54 -050019
20namespace witherspoon
21{
22namespace power
23{
24
25using namespace ucd90160;
26using namespace std::string_literals;
27
Matt Spinlerf0f02b92018-10-25 16:12:43 -050028const DeviceMap UCD90160::deviceMap{
29 {0,
30 DeviceDefinition{
Matt Spinler57bee322019-03-22 10:39:03 -050031 "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/"
Matt Spinlerf0f02b92018-10-25 16:12:43 -050032 "1e78a400.i2c-bus/i2c-11/11-0064",
Matt Spinlere7e432b2017-08-21 15:01:40 -050033
Matt Spinlerf0f02b92018-10-25 16:12:43 -050034 RailNames{"5.0VCS"s, "12.0V"s, "3.3V"s, "1.8V"s, "1.1V"s, "1.0V"s,
35 "0.9V"s, "VDN-A"s, "VDN-B"s, "AVDD"s, "VIO-A"s, "VIO-B"s,
36 "VDD-A"s, "VDD-B"s, "VCS-A"s, "VCS-B"s},
Matt Spinlerd998b732017-08-21 15:35:54 -050037
Matt Spinlerf0f02b92018-10-25 16:12:43 -050038 GPIConfigs{
39 GPIConfig{1, 8, "PGOOD_5P0V"s, false, extraAnalysisType::none},
40 GPIConfig{2, 9, "MEM_GOOD0"s, false, extraAnalysisType::none},
41 GPIConfig{3, 10, "MEM_GOOD1"s, false, extraAnalysisType::none},
42 GPIConfig{4, 14, "GPU_PGOOD"s, false, extraAnalysisType::gpuPGOOD},
43 GPIConfig{5, 17, "GPU_TH_OVERT"s, true,
44 extraAnalysisType::gpuOverTemp},
45 GPIConfig{6, 11, "SOFTWARE_PGOOD"s, false,
46 extraAnalysisType::none}},
Matt Spinler2d248ae2017-09-19 11:06:48 -050047
Matt Spinlerf0f02b92018-10-25 16:12:43 -050048 GPIOAnalysis{
49 {extraAnalysisType::gpuPGOOD,
50 GPIOGroup{
Matt Spinler57bee322019-03-22 10:39:03 -050051 "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@"
Matt Spinlerf0f02b92018-10-25 16:12:43 -050052 "1e78a000/1e78a400.i2c-bus/i2c-11/11-0060",
53 gpio::Value::low,
54 [](auto& ucd, const auto& callout) {
55 ucd.gpuPGOODError(callout);
56 },
57 optionFlags::none,
58 GPIODefinitions{
59 GPIODefinition{8,
60 "/system/chassis/motherboard/gv100card0"s},
61 GPIODefinition{9,
62 "/system/chassis/motherboard/gv100card1"s},
63 GPIODefinition{10,
64 "/system/chassis/motherboard/gv100card2"s},
65 GPIODefinition{11,
66 "/system/chassis/motherboard/gv100card3"s},
67 GPIODefinition{12,
68 "/system/chassis/motherboard/gv100card4"s},
69 GPIODefinition{
70 13, "/system/chassis/motherboard/gv100card5"s}}}},
Matt Spinler2d248ae2017-09-19 11:06:48 -050071
Matt Spinlerf0f02b92018-10-25 16:12:43 -050072 {extraAnalysisType::gpuOverTemp,
73 GPIOGroup{
Matt Spinler57bee322019-03-22 10:39:03 -050074 "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@"
Matt Spinlerf0f02b92018-10-25 16:12:43 -050075 "1e78a000/1e78a400.i2c-bus/i2c-11/11-0060",
76 gpio::Value::low,
77 [](auto& ucd,
78 const auto& callout) { ucd.gpuOverTempError(callout); },
79 optionFlags::shutdownOnFault,
80 GPIODefinitions{
81 GPIODefinition{2,
82 "/system/chassis/motherboard/gv100card0"s},
83 GPIODefinition{3,
84 "/system/chassis/motherboard/gv100card1"s},
85 GPIODefinition{4,
86 "/system/chassis/motherboard/gv100card2"s},
87 GPIODefinition{5,
88 "/system/chassis/motherboard/gv100card3"s},
89 GPIODefinition{6,
90 "/system/chassis/motherboard/gv100card4"s},
91 GPIODefinition{
92 7, "/system/chassis/motherboard/gv100card5"s}}}}}}}};
Matt Spinlerb54357f2017-08-21 14:38:54 -050093
Matt Spinlerf0f02b92018-10-25 16:12:43 -050094} // namespace power
95} // namespace witherspoon