diff --git a/usr/etc/hw-management-sensors/sn2201_sensors.conf b/usr/etc/hw-management-sensors/sn2201_sensors.conf index 063b04b9c..799fc482d 100755 --- a/usr/etc/hw-management-sensors/sn2201_sensors.conf +++ b/usr/etc/hw-management-sensors/sn2201_sensors.conf @@ -141,6 +141,14 @@ bus "i2c-3" "i2c-1-mux (chan_id 1)" label power2 "PSU-1 12V Rail Pwr(out)" ignore power3 + chip "lm5066i-i2c-*-15" + label in1 "Hotswap Rail(vin)" + ignore in2 + label in3 "Hotswap Rail(vout)" + label temp1 "Hotswap MOS temp" + label power1 "Hotswap Rail pwr(in)" + label curr1 "Hotswap Rail curr(in)" + bus "i2c-4" "i2c-1-mux (chan_id 2)" chip "pmbus-i2c-4-58" label in1 "PSU-2 220V Rail(in)" diff --git a/usr/etc/hw-management-thermal/tc_config_msn2201_busbar.json b/usr/etc/hw-management-thermal/tc_config_msn2201_busbar.json new file mode 100644 index 000000000..abeae8b13 --- /dev/null +++ b/usr/etc/hw-management-thermal/tc_config_msn2201_busbar.json @@ -0,0 +1,41 @@ + { + "name": "msn2201", + "dmin" : { + "C2P": { + "untrusted": {"-127:20": 30, "21:25": 40, "26:30": 50, "31:35": 60, "36:40": 70, "41:120": 80}, + "fan_err": { + "tacho": {"-127:120": 50}, + "present": {"-127:120": 50}, + "direction": {"-127:125": 50} + }, + "sensor_read_error" : {"-127:120": 50} + }, + "P2C": { + "untrusted":{"-127:15": 30, "16:20": 40, "21:25": 50, "26:30": 60, "31:35": 70, "36:40": 80, "41:120": 90}, + "fan_err": { + "tacho": {"-127:120": 50}, + "present": {"-127:120": 50}, + "direction": {"-127:120": 50} + }, + "sensor_read_error":{"-127:20": 20, "21:30": 30, "31:40": 40, "41:120": 50} + } + }, + "fan_trend" : { + "C2P": { + "0" : {"rpm_min":1983, "rpm_max":22000, "slope": 227, "pwm_min" : 10, "pwm_max_reduction" : 10, "rpm_tolerance" : 30}, + "1" : {"rpm_min":1983, "rpm_max":22000, "slope": 227, "pwm_min" : 10, "pwm_max_reduction" : 10, "rpm_tolerance" : 30}}, + "P2C": { + "0" : {"rpm_min":1983, "rpm_max":22000, "slope": 227, "pwm_min" : 10, "pwm_max_reduction" : 10, "rpm_tolerance" : 30}, + "1" : {"rpm_min":1983, "rpm_max":22000, "slope": 227, "pwm_min" : 10, "pwm_max_reduction" : 10, "rpm_tolerance" : 30}} + }, + "dev_parameters" : { + "asic\\d*": {"pwm_min": 20, "pwm_max" : 100, "val_min":"!70000", "val_max":"!105000", "poll_time": 3, "sensor_read_error":70}, + "(cpu_pack|cpu_core\\d+)": {"pwm_min": 20, "pwm_max" : 100, "val_min": "!70000", "val_max": "!95000", "poll_time": 3, "sensor_read_error":70}, + "module\\d+": {"pwm_min": 20, "pwm_max" : 100, "val_min":60000, "val_max":80000, "poll_time": 20}, + "sensor_amb": {"pwm_min": 20, "pwm_max" : 50, "val_min": 30000, "val_max": 50000, "poll_time": 30}, + "voltmon\\d+_temp": {"pwm_min": 20, "pwm_max": 100, "val_min": "!85000", "val_max": "!125000", "poll_time": 60}, + "sodimm\\d_temp" :{"pwm_min": 20, "pwm_max" : 70, "val_min": "!70000", "val_max": 95000, "poll_time": 60} + }, + "asic_config" : {"1": {"bus" : 2, "addr" : "0048", "pwm_control": true, "fan_control": true}}, + "sensor_list" : ["asic1", "cpu", "drwr1", "drwr2", "drwr3", "drwr4", "sensor_amb", "sodimm1", "voltmon2"] +} diff --git a/usr/lib/udev/rules.d/50-hw-management-events.rules b/usr/lib/udev/rules.d/50-hw-management-events.rules index 350d44b10..6368e2ec2 100644 --- a/usr/lib/udev/rules.d/50-hw-management-events.rules +++ b/usr/lib/udev/rules.d/50-hw-management-events.rules @@ -667,13 +667,16 @@ SUBSYSTEM=="i2c", DEVPATH=="/devices/pci0000:00/0000:00:*.*/0000:0[1-4]:00.0/i2c SUBSYSTEM=="hwmon", DEVPATH=="/devices/pci0000:00/0000:00:*.*/0000:0[1-4]:00.0/i2c-*/*-*/hwmon/hwmon*", ACTION=="add", RUN+="/usr/bin/hw-management-chassis-events.sh add voltmonX %S %p" SUBSYSTEM=="hwmon", DEVPATH=="/devices/pci0000:00/0000:00:*.*/0000:0[1-4]:00.0/i2c-*/*-*/hwmon/hwmon*", ACTION=="remove", RUN+="/usr/bin/hw-management-chassis-events.sh rm voltmonX %S %p" -# SN2201 voltage controllers 1. powr1014, 2. ir35223 +# SN2201 voltage controllers 1. powr1014, 2. ir35223 3. lm5066i SUBSYSTEM=="hwmon", DEVPATH=="/devices/pci0000:00/*/NVSN2201:*/i2c_mlxcpld*/i2c-*/i2c-*/*-0037/hwmon/hwmon*", ACTION=="add", RUN+="/usr/bin/hw-management-chassis-events.sh add voltmon1 %S %p" SUBSYSTEM=="hwmon", DEVPATH=="/devices/pci0000:00/*/NVSN2201:*/i2c_mlxcpld*/i2c-*/i2c-*/*-0037/hwmon/hwmon*", ACTION=="remove", RUN+="/usr/bin/hw-management-chassis-events.sh rm voltmon1 %S %p" SUBSYSTEM=="hwmon", DEVPATH=="/devices/pci0000:00/*/NVSN2201:*/i2c_mlxcpld*/i2c-*/i2c-*/*-0040/hwmon/hwmon*", ACTION=="add", RUN+="/usr/bin/hw-management-chassis-events.sh add voltmon2 %S %p" SUBSYSTEM=="hwmon", DEVPATH=="/devices/pci0000:00/*/NVSN2201:*/i2c_mlxcpld*/i2c-*/i2c-*/*-0040/hwmon/hwmon*", ACTION=="remove", RUN+="/usr/bin/hw-management-chassis-events.sh rm voltmon2 %S %p" +SUBSYSTEM=="hwmon", DEVPATH=="/devices/pci0000:00/*/NVSN2201:*/i2c_mlxcpld*/i2c-*/i2c-*/*-0015/hwmon/hwmon*", ACTION=="add", RUN+="/usr/bin/hw-management-chassis-events.sh add pmbus %S %p" +SUBSYSTEM=="hwmon", DEVPATH=="/devices/pci0000:00/*/NVSN2201:*/i2c_mlxcpld*/i2c-*/i2c-*/*-0015/hwmon/hwmon*", ACTION=="remove", RUN+="/usr/bin/hw-management-chassis-events.sh rm pmbus %S %p" + # Power-converters and hotswap devices. They are supported by generic pmbus driver. Exact name is found from devtree file. SUBSYSTEM=="hwmon", DEVPATH=="/devices/platform/mlxplat/i2c_mlxcpld*/i2c-*/i2c-*/*-0010/hwmon/hwmon*", ACTION=="add", RUN+="/usr/bin/hw-management-chassis-events.sh add pmbus %S %p" SUBSYSTEM=="hwmon", DEVPATH=="/devices/platform/mlxplat/i2c_mlxcpld*/i2c-*/i2c-*/*-0010/hwmon/hwmon*", ACTION=="remove", RUN+="/usr/bin/hw-management-chassis-events.sh rm pmbus %S %p" diff --git a/usr/usr/bin/hw-management.sh b/usr/usr/bin/hw-management.sh index 8d3c7f97b..1ee046a5f 100755 --- a/usr/usr/bin/hw-management.sh +++ b/usr/usr/bin/hw-management.sh @@ -1958,8 +1958,6 @@ sn2201_specific() thermal_type=$thermal_type_t11 i2c_asic_bus_default=6 hotplug_fans=4 - hotplug_pwrs=2 - hotplug_psus=2 echo 1 > $config_path/fan_dir_eeprom echo 22000 > $config_path/fan_max_speed echo 2200 > $config_path/fan_min_speed @@ -1984,8 +1982,19 @@ sn2201_specific() sed -i "s/label temp8/label temp$id0/g" $lm_sensors_configs_path/sn2201_sensors.conf sed -i "s/label temp14/label temp$id1/g" $lm_sensors_configs_path/sn2201_sensors.conf lm_sensors_config="$lm_sensors_configs_path/sn2201_sensors.conf" - thermal_control_config="$thermal_control_configs_path/tc_config_msn2201.json" echo 13 > $config_path/reset_attr_num + # WA for mux idle state issue. + echo -2 > /sys/devices/pci0000\:00/0000\:00\:1f.0/NVSN2201\:00/i2c_mlxcpld.1/i2c-1/1-0070/idle_state + if [ "$sku" == "HI168" ]; then + hotplug_pwrs=0 + hotplug_psus=0 + psu_count=0 + thermal_control_config="$thermal_control_configs_path/tc_config_msn2201_busbar.json" + else + hotplug_pwrs=2 + hotplug_psus=2 + thermal_control_config="$thermal_control_configs_path/tc_config_msn2201.json" + fi } p2317_specific()