feat(master : nicsensor.sh)添加对服务器5688m7的I2C拓扑支持
This commit is contained in:
parent
914889f21f
commit
af5c649a40
58
nicsensor.sh
58
nicsensor.sh
@ -57,7 +57,7 @@ TMP112_Sensor_name="Temperature"
|
|||||||
fru_offset="0x00 0x00"
|
fru_offset="0x00 0x00"
|
||||||
|
|
||||||
Support_Sensor_List="emc1413, adc128, ina3221, tmp468, tmp112"
|
Support_Sensor_List="emc1413, adc128, ina3221, tmp468, tmp112"
|
||||||
Support_Server_List="5280m7, 5468m7, donghu, yichun, qiandaohu"
|
Support_Server_List="5280m7, 5468m7, 5688m7, donghu, yichun, qiandaohu"
|
||||||
# Which server will use this script
|
# Which server will use this script
|
||||||
server_type="5280m7"
|
server_type="5280m7"
|
||||||
|
|
||||||
@ -134,7 +134,7 @@ ina3221_ch2_volt="0"
|
|||||||
ina3221_ch0_current="0"
|
ina3221_ch0_current="0"
|
||||||
ina3221_ch1_current="0"
|
ina3221_ch1_current="0"
|
||||||
ina3221_ch2_current="0"
|
ina3221_ch2_current="0"
|
||||||
SCRIPT_VERSION="1.4 Standard"
|
SCRIPT_VERSION="1.4 Rev1"
|
||||||
|
|
||||||
fru_file_name=$option_data2
|
fru_file_name=$option_data2
|
||||||
fru_write_size=0
|
fru_write_size=0
|
||||||
@ -416,6 +416,39 @@ set_configuration_qiandaohu(){
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_configuration_5688m7(){
|
||||||
|
is_have_pca9641=1
|
||||||
|
pca9641_slave="0x41"
|
||||||
|
i2c_bus=13
|
||||||
|
|
||||||
|
if [ $slot_number -le 3 ];then
|
||||||
|
pca9548_slave=0x71
|
||||||
|
else
|
||||||
|
pca9548_slave=0x72
|
||||||
|
fi
|
||||||
|
|
||||||
|
# set pca9548 switch channel
|
||||||
|
if [ $slot_number -eq 0 ];then
|
||||||
|
pca9548_channel="0x01"
|
||||||
|
elif [ $slot_number -eq 1 ];then
|
||||||
|
pca9548_channel="0x02"
|
||||||
|
elif [ $slot_number -eq 2 ];then
|
||||||
|
pca9548_channel="0x04"
|
||||||
|
elif [ $slot_number -eq 3 ];then
|
||||||
|
pca9548_channel="0x08"
|
||||||
|
elif [ $slot_number -eq 4 ];then
|
||||||
|
pca9548_channel="0x01"
|
||||||
|
elif [ $slot_number -eq 5 ];then
|
||||||
|
pca9548_channel="0x02"
|
||||||
|
elif [ $slot_number -eq 6 ];then
|
||||||
|
pca9548_channel="0x04"
|
||||||
|
elif [ $slot_number -eq 7 ];then
|
||||||
|
pca9548_channel="0x08"
|
||||||
|
else
|
||||||
|
format_print $WARNING "Unspecified card slot!"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Get nic type and slot number
|
# Get nic type and slot number
|
||||||
parse_nic_slot(){
|
parse_nic_slot(){
|
||||||
fullname=0
|
fullname=0
|
||||||
@ -469,6 +502,9 @@ set_configuration(){
|
|||||||
"qiandaohu")
|
"qiandaohu")
|
||||||
set_configuration_qiandaohu
|
set_configuration_qiandaohu
|
||||||
;;
|
;;
|
||||||
|
"5688m7")
|
||||||
|
set_configuration_5688m7
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
format_print $ERROR "Error: Unsupport Server Type !!! - $server_type"
|
format_print $ERROR "Error: Unsupport Server Type !!! - $server_type"
|
||||||
format_print $INFO "Support list: $Support_Server_List"
|
format_print $INFO "Support list: $Support_Server_List"
|
||||||
@ -1248,6 +1284,21 @@ detect_on_qiandaohu(){
|
|||||||
do_i2c_detect 6 0x71 0x08 3 11
|
do_i2c_detect 6 0x71 0x08 3 11
|
||||||
}
|
}
|
||||||
|
|
||||||
|
detect_on_5688m7(){
|
||||||
|
i2c_bus=13
|
||||||
|
pca9641_slave=0x41
|
||||||
|
get_pca9641_control
|
||||||
|
|
||||||
|
do_i2c_detect $i2c_bus 0x71 0x01 0 0
|
||||||
|
do_i2c_detect $i2c_bus 0x71 0x02 1 1
|
||||||
|
do_i2c_detect $i2c_bus 0x71 0x04 2 2
|
||||||
|
do_i2c_detect $i2c_bus 0x71 0x08 3 3
|
||||||
|
do_i2c_detect $i2c_bus 0x72 0x01 0 4
|
||||||
|
do_i2c_detect $i2c_bus 0x72 0x02 1 5
|
||||||
|
do_i2c_detect $i2c_bus 0x72 0x04 2 6
|
||||||
|
do_i2c_detect $i2c_bus 0x72 0x08 3 7
|
||||||
|
}
|
||||||
|
|
||||||
debug_user_defined_detect(){
|
debug_user_defined_detect(){
|
||||||
format_print $INFO "Detect by user-defined"
|
format_print $INFO "Detect by user-defined"
|
||||||
|
|
||||||
@ -1282,6 +1333,9 @@ start_detect_device(){
|
|||||||
"qiandaohu")
|
"qiandaohu")
|
||||||
detect_on_qiandaohu
|
detect_on_qiandaohu
|
||||||
;;
|
;;
|
||||||
|
"5688m7")
|
||||||
|
detect_on_5688m7
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
format_print $ERROR "Unsupport Server Type - $server_type"
|
format_print $ERROR "Unsupport Server Type - $server_type"
|
||||||
format_print $INFO "Support list : $Support_Server_List"
|
format_print $INFO "Support list : $Support_Server_List"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user