Skip to content

Commit 071eb58

Browse files
Merge remote-tracking branch 'upstream/master' into syslog_telemetry_shared
2 parents 654a3bd + 15e59fc commit 071eb58

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2714
-112
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
3+
BWD_RESPIN_VERSION="/var/run/hw-management/system/config3"
4+
SWB_RESPIN_VERSION="/var/run/hw-management/system/config1"
5+
SENSORS_CONF_FILE="/usr/share/sonic/platform/sensors.conf"
6+
SENSORS_RESPIN_CONF_FILE="/usr/share/sonic/platform/sensors_respin.conf"
7+
SENSORS_SWB_RESPIN_CONF_FILE="/usr/share/sonic/platform/sensors_swb_respin.conf"
8+
9+
function get_sensor_conf_path() {
10+
local _BWD_RESPIN_VERSION="0"
11+
local _SWB_RESPIN_VERSION="0"
12+
if [[ -e $SWB_RESPIN_VERSION ]]; then
13+
_SWB_RESPIN_VERSION=$(cat $SWB_RESPIN_VERSION 2>&1)
14+
if (($_SWB_RESPIN_VERSION == "2" || $_SWB_RESPIN_VERSION == "6")); then
15+
if [[ -e $SENSORS_SWB_RESPIN_CONF_FILE ]]; then
16+
echo $SENSORS_SWB_RESPIN_CONF_FILE
17+
return
18+
fi
19+
fi
20+
fi
21+
if [[ -e $BWD_RESPIN_VERSION ]]; then
22+
_BWD_RESPIN_VERSION=$(cat $BWD_RESPIN_VERSION 2>&1)
23+
if [[ "$_BWD_RESPIN_VERSION" == "1" ]]; then
24+
if [[ -e $SENSORS_RESPIN_CONF_FILE ]]; then
25+
echo $SENSORS_RESPIN_CONF_FILE
26+
return
27+
fi
28+
fi
29+
fi
30+
echo $SENSORS_CONF_FILE
31+
}
32+
33+
get_sensor_conf_path
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
##
2+
## Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES.
3+
## Apache-2.0
4+
##
5+
## Licensed under the Apache License, Version 2.0 (the "License");
6+
## you may not use this file except in compliance with the License.
7+
## You may obtain a copy of the License at
8+
##
9+
## http://www.apache.org/licenses/LICENSE-2.0
10+
##
11+
## Unless required by applicable law or agreed to in writing, software
12+
## distributed under the License is distributed on an "AS IS" BASIS,
13+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
## See the License for the specific language governing permissions and
15+
## limitations under the License.
16+
##
17+
18+
# Temperature sensors
19+
bus "i2c-2" "i2c-1-mux (chan_id 1)"
20+
chip "mlxsw-i2c-*-48"
21+
label temp1 "Ambient ASIC Temp"
22+
23+
bus "i2c-7" "i2c-1-mux (chan_id 6)"
24+
chip "tmp102-i2c-*-49"
25+
label temp1 "Ambient Fan Side Temp (air intake)"
26+
chip "tmp102-i2c-*-4a"
27+
label temp1 "Ambient Port Side Temp (air exhaust)"
28+
29+
bus "i2c-15" "i2c-1-mux (chan_id 6)"
30+
chip "tmp102-i2c-15-49"
31+
label temp1 "Ambient COMEX Temp"
32+
33+
# Power controllers
34+
bus "i2c-5" "i2c-1-mux (chan_id 4)"
35+
chip "tps53679-i2c-*-70"
36+
label in1 "PMIC-1 PSU 12V Rail (in1)"
37+
label in2 "PMIC-1 PSU 12V Rail (in2)"
38+
label in3 "PMIC-1 ASIC 0.8V VCORE Rail (out)"
39+
label in4 "PMIC-1 ASIC 1.2V Rail (out)"
40+
label temp1 "PMIC-1 Temp 1"
41+
label temp2 "PMIC-1 Temp 2"
42+
label power1 "PMIC-1 ASIC 0.8V VCORE Rail Pwr (out)"
43+
label power2 "PMIC-1 ASIC 1.2V Rail Pwr (out)"
44+
label curr1 "PMIC-1 ASIC 0.8V VCORE Rail Curr (out)"
45+
label curr2 "PMIC-1 ASIC 1.2V Rail Curr (out)"
46+
chip "tps53679-i2c-*-71"
47+
label in1 "PMIC-2 PSU 12V Rail (in1)"
48+
label in2 "PMIC-2 PSU 12V Rail (in2)"
49+
label in3 "PMIC-2 ASIC 3.3V Rail (out)"
50+
compute in3 (1.5)*@, @/(1.5)
51+
label in4 "PMIC-2 ASIC 1.8V Rail (out)"
52+
label temp1 "PMIC-2 Temp 1"
53+
label temp2 "PMIC-2 Temp 2"
54+
label power1 "PMIC-2 ASIC 3.3V Rail Pwr (out)"
55+
label power2 "PMIC-2 ASIC 1.8V Rail Pwr (out)"
56+
label curr1 "PMIC-2 ASIC 3.3V Rail Curr (out)"
57+
label curr2 "PMIC-2 ASIC 1.8V Rail Curr (out)"
58+
59+
chip "mp2975-i2c-*-62"
60+
label in1 "PMIC-1 PSU 12V Rail (in)"
61+
label in2 "PMIC-1 ASIC 0.8V VCORE Rail (out)"
62+
label in3 "PMIC-1 ASIC 1.2V Rail (out)"
63+
ignore in4
64+
label temp1 "PMIC-1 Temp 1"
65+
label temp2 "PMIC-1 Temp 2"
66+
label power1 "PMIC-1 ASIC 0.8V VCORE Rail Pwr (out)"
67+
label power2 "PMIC-1 ASIC 1.2V Rail Pwr (out)"
68+
label curr1 "PMIC-1 ASIC 0.8V VCORE Rail Curr (out)"
69+
label curr2 "PMIC-1 ASIC 1.2V Rail Curr (out)"
70+
chip "mp2975-i2c-*-66"
71+
label in1 "PMIC-2 PSU 12V Rail (in)"
72+
label in2 "PMIC-2 ASIC 3.3V Rail (out)"
73+
compute in2 (2)*@, @/(2)
74+
label in3 "PMIC-2 ASIC 1.8V Rail (out)"
75+
ignore in4
76+
label temp1 "PMIC-2 Temp 1"
77+
label temp2 "PMIC-2 Temp 2"
78+
label power1 "PMIC-2 ASIC 3.3V Rail Pwr (out)"
79+
label power2 "PMIC-2 ASIC 1.8V Rail Pwr (out)"
80+
label curr1 "PMIC-2 ASIC 3.3V Rail Curr (out)"
81+
label curr2 "PMIC-2 ASIC 1.8V Rail Curr (out)"
82+
83+
bus "i2c-15" "i2c-1-mux (chan_id 6)"
84+
chip "tps53679-i2c-*-58"
85+
label in1 "PMIC-3 PSU 12V Rail (in1)"
86+
label in2 "PMIC-3 PSU 12V Rail (in2)"
87+
label in3 "PMIC-3 COMEX 1.8V Rail (out)"
88+
label in4 "PMIC-3 COMEX 1.05V Rail (out)"
89+
label temp1 "PMIC-3 Temp 1"
90+
label temp2 "PMIC-3 Temp 2"
91+
label power1 "PMIC-3 COMEX 1.8V Rail Pwr (out)"
92+
label power2 "PMIC-3 COMEX 1.05V Rail Pwr (out)"
93+
label curr1 "PMIC-3 COMEX 1.8V Rail Curr (out)"
94+
label curr2 "PMIC-3 COMEX 1.05V Rail Curr (out)"
95+
chip "tps53679-i2c-*-61"
96+
label in1 "PMIC-4 PSU 12V Rail (in1)"
97+
label in2 "PMIC-4 PSU 12V Rail (in2)"
98+
label in3 "PMIC-4 COMEX 1.2V Rail (out)"
99+
ignore in4
100+
label temp1 "PMIC-4 Temp 1"
101+
label temp2 "PMIC-4 Temp 2"
102+
label power1 "PMIC-4 COMEX 1.2V Rail Pwr (out)"
103+
ignore power2
104+
label curr1 "PMIC-4 COMEX 1.2V Rail Curr (out)"
105+
ignore curr2
106+
107+
chip "mp2975-i2c-*-6a"
108+
label in1 "PMIC-3 PSU 12V Rail (in1)"
109+
label in2 "PMIC-3 COMEX 1.8V Rail (out)"
110+
label in3 "PMIC-3 COMEX 1.05V Rail (out)"
111+
label temp1 "PMIC-3 Temp 1"
112+
label power1 "PMIC-3 COMEX 12V Rail Pwr (in)"
113+
label power2 "PMIC-3 COMEX 1.8V Rail Pwr (out)"
114+
label power3 "PMIC-3 COMEX 1.05V Rail Pwr (out)"
115+
label curr1 "PMIC-3 COMEX 12V Rail Curr (in)"
116+
label curr2 "PMIC-3 COMEX 1.8V Rail Curr (out)"
117+
ignore curr3
118+
ignore curr4
119+
label curr5 "PMIC-3 COMEX 1.05V Rail Curr (out)"
120+
ignore curr6
121+
122+
chip "mp2975-i2c-*-61"
123+
label in1 "PMIC-4 PSU 12V Rail (in1)"
124+
label in2 "PMIC-4 COMEX 1.2V Rail (out)"
125+
label temp1 "PMIC-4 Temp 1"
126+
label temp2 "PMIC-4 Temp 2"
127+
label power1 "PMIC-4 COMEX 12V Rail Pwr (in)"
128+
label power2 "PMIC-4 COMEX 1.2V Rail Pwr (out)"
129+
label curr1 "PMIC-4 COMEX 12V Rail Curr (in)"
130+
label curr2 "PMIC-4 COMEX 1.2V Rail Curr (out)"
131+
ignore curr3
132+
133+
# Power supplies
134+
bus "i2c-4" "i2c-1-mux (chan_id 3)"
135+
chip "dps460-i2c-*-58"
136+
label in1 "PSU-1 220V Rail (in)"
137+
ignore in2
138+
label in3 "PSU-1 12V Rail (out)"
139+
label fan1 "PSU-1 Fan 1"
140+
ignore fan2
141+
ignore fan3
142+
label temp1 "PSU-1 Temp 1"
143+
label temp2 "PSU-1 Temp 2"
144+
label temp3 "PSU-1 Temp 3"
145+
label power1 "PSU-1 220V Rail Pwr (in)"
146+
label power2 "PSU-1 12V Rail Pwr (out)"
147+
label curr1 "PSU-1 220V Rail Curr (in)"
148+
label curr2 "PSU-1 12V Rail Curr (out)"
149+
set in3_lcrit in3_crit * 0.662
150+
set in3_min in3_crit * 0.745
151+
set in3_max in3_crit * 0.952
152+
chip "dps460-i2c-*-59"
153+
label in1 "PSU-2 220V Rail (in)"
154+
ignore in2
155+
label in3 "PSU-2 12V Rail (out)"
156+
label fan1 "PSU-2 Fan 1"
157+
ignore fan2
158+
ignore fan3
159+
label temp1 "PSU-2 Temp 1"
160+
label temp2 "PSU-2 Temp 2"
161+
label temp3 "PSU-2 Temp 3"
162+
label power1 "PSU-2 220V Rail Pwr (in)"
163+
label power2 "PSU-2 12V Rail Pwr (out)"
164+
label curr1 "PSU-2 220V Rail Curr (in)"
165+
label curr2 "PSU-2 12V Rail Curr (out)"
166+
set in3_lcrit in3_crit * 0.662
167+
set in3_min in3_crit * 0.745
168+
set in3_max in3_crit * 0.952
169+
170+
# Chassis fans
171+
chip "mlxreg_fan-isa-*"
172+
label fan1 "Chassis Fan Drawer-1 Tach 1"
173+
label fan2 "Chassis Fan Drawer-1 Tach 2"
174+
label fan3 "Chassis Fan Drawer-2 Tach 1"
175+
label fan4 "Chassis Fan Drawer-2 Tach 2"
176+
label fan5 "Chassis Fan Drawer-3 Tach 1"
177+
label fan6 "Chassis Fan Drawer-3 Tach 2"
178+
label fan7 "Chassis Fan Drawer-4 Tach 1"
179+
label fan8 "Chassis Fan Drawer-4 Tach 2"
180+
label fan9 "Chassis Fan Drawer-5 Tach 1"
181+
label fan10 "Chassis Fan Drawer-5 Tach 2"
182+
label fan11 "Chassis Fan Drawer-6 Tach 1"
183+
label fan12 "Chassis Fan Drawer-6 Tach 2"
184+
185+
# Miscellaneous
186+
chip "*-virtual-*"
187+
ignore temp1

0 commit comments

Comments
 (0)