blob: 569606198da045c86b5baf0dcc926a03e104aab5 [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
18//Separated out to facilitate possible future generation of file.
19
20namespace witherspoon
21{
22namespace power
23{
24
25using namespace ucd90160;
26using namespace std::string_literals;
27
28const DeviceMap UCD90160::deviceMap
29{
30 {0, DeviceDefinition{
31 "/sys/devices/platform/ahb/ahb:apb/ahb:apb:i2c@1e78a000/"
Matt Spinlere7e432b2017-08-21 15:01:40 -050032 "1e78a400.i2c-bus/i2c-11/11-0064",
33
34 RailNames{
35 "5.0VCS"s,
36 "12.0V"s,
37 "3.3V"s,
38 "1.8V"s,
39 "1.1V"s,
40 "1.0V"s,
41 "0.9V"s,
42 "VDN-A"s,
43 "VDN-B"s,
44 "AVDD"s,
45 "VIO-A"s,
46 "VIO-B"s,
47 "VDD-A"s,
48 "VDD-B"s,
49 "VCS-A"s,
50 "VCS-B"s
Matt Spinlerd998b732017-08-21 15:35:54 -050051 },
52
53 GPIConfigs{
Matt Spinler2d248ae2017-09-19 11:06:48 -050054 GPIConfig{1, 8, "PGOOD_5P0V"s, false,
55 extraAnalysisType::none},
56 GPIConfig{2, 9, "MEM_GOOD0"s, false,
57 extraAnalysisType::none},
58 GPIConfig{3, 10, "MEM_GOOD1"s, false,
59 extraAnalysisType::none},
Matt Spinler701eef62017-12-13 13:27:03 -060060 GPIConfig{4, 14, "GPU_PGOOD"s, false,
Matt Spinler2d248ae2017-09-19 11:06:48 -050061 extraAnalysisType::gpuPGOOD},
62 GPIConfig{5, 17, "GPU_TH_OVERT"s, true,
63 extraAnalysisType::gpuOverTemp},
64 GPIConfig{6, 11, "SOFTWARE_PGOOD"s, false,
65 extraAnalysisType::none}
66 },
67
68 GPIOAnalysis{
69 {extraAnalysisType::gpuPGOOD,
70 GPIOGroup{
71 "/sys/devices/platform/ahb/ahb:apb/ahb:apb:i2c@"
72 "1e78a000/1e78a400.i2c-bus/i2c-11/11-0060",
73 gpio::Value::low,
Matt Spinler0e45ced2018-02-12 14:36:07 -060074 [](auto& ucd, const auto& callout)
75 { ucd.gpuPGOODError(callout); },
Matt Spinler2d248ae2017-09-19 11:06:48 -050076 optionFlags::none,
77 GPIODefinitions{
Matt Spinler0e45ced2018-02-12 14:36:07 -060078 GPIODefinition{8,
79 "/system/chassis/motherboard/gv100card0"s},
80 GPIODefinition{9,
81 "/system/chassis/motherboard/gv100card1"s},
82 GPIODefinition{10,
83 "/system/chassis/motherboard/gv100card2"s},
84 GPIODefinition{11,
85 "/system/chassis/motherboard/gv100card3"s},
86 GPIODefinition{12,
87 "/system/chassis/motherboard/gv100card4"s},
88 GPIODefinition{13,
89 "/system/chassis/motherboard/gv100card5"s}}
Matt Spinler2d248ae2017-09-19 11:06:48 -050090 }},
91
92 {extraAnalysisType::gpuOverTemp,
93 GPIOGroup{
94 "/sys/devices/platform/ahb/ahb:apb/ahb:apb:i2c@"
95 "1e78a000/1e78a400.i2c-bus/i2c-11/11-0060",
96 gpio::Value::low,
Matt Spinler0e45ced2018-02-12 14:36:07 -060097 [](auto& ucd, const auto& callout)
98 { ucd.gpuOverTempError(callout); },
Matt Spinler2d248ae2017-09-19 11:06:48 -050099 optionFlags::shutdownOnFault,
100 GPIODefinitions{
Matt Spinler0e45ced2018-02-12 14:36:07 -0600101 GPIODefinition{2,
102 "/system/chassis/motherboard/gv100card0"s},
103 GPIODefinition{3,
104 "/system/chassis/motherboard/gv100card1"s},
105 GPIODefinition{4,
106 "/system/chassis/motherboard/gv100card2"s},
107 GPIODefinition{5,
108 "/system/chassis/motherboard/gv100card3"s},
109 GPIODefinition{6,
110 "/system/chassis/motherboard/gv100card4"s},
111 GPIODefinition{7,
112 "/system/chassis/motherboard/gv100card5"s}}
Matt Spinler2d248ae2017-09-19 11:06:48 -0500113 }}
Matt Spinlere7e432b2017-08-21 15:01:40 -0500114 }
115 }
Matt Spinlerb54357f2017-08-21 14:38:54 -0500116 }
117};
118
119}
120}