# Make a Backup
if [[ ! -f /usr/share/swampd/config.json.original ]]
then
cp /usr/share/swampd/config.json /usr/share/swampd/config.json.original
fi
# Change the "setpoints" where it says "temps" (which is CPU, M2, OCP NIC...)
cat << 'EOF' > /usr/share/swampd/config.json
{
"version": "R01",
"sensors" : [
{
"name": "SYS_FAN",
"type": "fan",
"readPath": "/xyz/openbmc_project/sensors/fan_tach/SYS_FAN",
"writePath": "/sys/devices/platform/ahb/ahb:apb/1e786000.pwm-tacho-controller/hwmon/**/pwm1",
"min": 0,
"max": 220
},
{
"name": "SYS_FAN1",
"type": "fan",
"readPath": "/xyz/openbmc_project/sensors/fan_tach/SYS_FAN1",
"writePath": "/sys/devices/platform/ahb/ahb:apb/1e786000.pwm-tacho-controller/hwmon/**/pwm2",
"min": 0,
"max": 220
},
{
"name": "SYS_FAN2",
"type": "fan",
"readPath": "/xyz/openbmc_project/sensors/fan_tach/SYS_FAN2",
"writePath": "/sys/devices/platform/ahb/ahb:apb/1e786000.pwm-tacho-controller/hwmon/**/pwm3",
"min": 0,
"max": 220
},
{
"name": "SYS_FAN3",
"type": "fan",
"readPath": "/xyz/openbmc_project/sensors/fan_tach/SYS_FAN3",
"writePath": "/sys/devices/platform/ahb/ahb:apb/1e786000.pwm-tacho-controller/hwmon/**/pwm4",
"min": 0,
"max": 220
},
{
"name": "SYS_FAN4",
"type": "fan",
"readPath": "/xyz/openbmc_project/sensors/fan_tach/SYS_FAN4",
"writePath": "/sys/devices/platform/ahb/ahb:apb/1e786000.pwm-tacho-controller/hwmon/**/pwm5",
"min": 0,
"max": 220
},
{
"name": "SYS_FAN5",
"type": "fan",
"readPath": "/xyz/openbmc_project/sensors/fan_tach/SYS_FAN5",
"writePath": "/sys/devices/platform/ahb/ahb:apb/1e786000.pwm-tacho-controller/hwmon/**/pwm6",
"min": 0,
"max": 220
},
{
"name": "M2_TEMP",
"type": "temp",
"readPath": "/xyz/openbmc_project/sensors/temperature/M2_TEMP",
"timeout": 0,
"ignoreDbusMinMax": true
},
{
"name": "OCP_NIC_TEMP",
"type": "temp",
"readPath": "/xyz/openbmc_project/sensors/temperature/OCP_NIC_TEMP",
"timeout": 0,
"ignoreDbusMinMax": true
},
{
"name": "CPU_CORE_MOSFET",
"type": "temp",
"readPath": "/xyz/openbmc_project/sensors/temperature/CPU_CORE_MOSFET",
"timeout": 0,
"ignoreDbusMinMax": true
},
{
"name": "CPU_SOC_MOSFET",
"type": "temp",
"readPath": "/xyz/openbmc_project/sensors/temperature/CPU_SOC_MOSFET",
"timeout": 0,
"ignoreDbusMinMax": true
},
{
"name": "CPU_TEMP",
"type": "temp",
"readPath": "/xyz/openbmc_project/sensors/temperature/CPU_TEMP",
"timeout": 0,
"ignoreDbusMinMax": true
},
{
"name": "DIMM_MOSFET_1",
"type": "temp",
"readPath": "/xyz/openbmc_project/sensors/temperature/DIMM_MOSFET_1",
"timeout": 0,
"ignoreDbusMinMax": true
},
{
"name": "DIMM_MOSFET_2",
"type": "temp",
"readPath": "/xyz/openbmc_project/sensors/temperature/DIMM_MOSFET_2",
"timeout": 0,
"ignoreDbusMinMax": true
},
{
"name": "PSU0_TEMP",
"type": "temp",
"readPath": "/xyz/openbmc_project/sensors/temperature/PSU0_TEMP",
"timeout": 0,
"ignoreDbusMinMax": true
},
{
"name": "PSU1_TEMP",
"type": "temp",
"readPath": "/xyz/openbmc_project/sensors/temperature/PSU1_TEMP",
"timeout": 0,
"ignoreDbusMinMax": true
},
{
"name": "SYS_AMB",
"type": "temp",
"readPath": "/xyz/openbmc_project/sensors/temperature/SYS_AMB",
"timeout": 0,
"ignoreDbusMinMax": true
}
],
"zones": [
{
"id": 1,
"minThermalOutput": 10.0,
"failsafePercent": 100.0,
"setpoint": 80.0,
"pids": [
{
"name": "Fan0",
"type": "fan",
"inputs": ["SYS_FAN"],
"setpoint": 40.0,
"pid": {
"samplePeriod": 1.0,
"proportionalCoeff": 0.0,
"integralCoeff": 0.0,
"feedFwdOffsetCoeff": 0.0,
"feedFwdGainCoeff": 1.0,
"integralLimit_min": 0.0,
"integralLimit_max": 0.0,
"outLim_min": 0.0,
"outLim_max": 100.0,
"slewNeg": 0.0,
"slewPos": 0.0
}
},
{
"name": "Fan1",
"type": "fan",
"inputs": ["SYS_FAN1"],
"setpoint": 40.0,
"pid": {
"samplePeriod": 1.0,
"proportionalCoeff": 0.0,
"integralCoeff": 0.0,
"feedFwdOffsetCoeff": 0.0,
"feedFwdGainCoeff": 1.0,
"integralLimit_min": 0.0,
"integralLimit_max": 0.0,
"outLim_min": 0.0,
"outLim_max": 100.0,
"slewNeg": 0.0,
"slewPos": 0.0
}
},
{
"name": "Fan2",
"type": "fan",
"inputs": ["SYS_FAN2"],
"setpoint": 40.0,
"pid": {
"samplePeriod": 1.0,
"proportionalCoeff": 0.0,
"integralCoeff": 0.0,
"feedFwdOffsetCoeff": 0.0,
"feedFwdGainCoeff": 1.0,
"integralLimit_min": 0.0,
"integralLimit_max": 0.0,
"outLim_min": 0.0,
"outLim_max": 100.0,
"slewNeg": 0.0,
"slewPos": 0.0
}
},
{
"name": "Fan3",
"type": "fan",
"inputs": ["SYS_FAN3"],
"setpoint": 40.0,
"pid": {
"samplePeriod": 1.0,
"proportionalCoeff": 0.0,
"integralCoeff": 0.0,
"feedFwdOffsetCoeff": 0.0,
"feedFwdGainCoeff": 1.0,
"integralLimit_min": 0.0,
"integralLimit_max": 0.0,
"outLim_min": 0.0,
"outLim_max": 100.0,
"slewNeg": 0.0,
"slewPos": 0.0
}
},
{
"name": "Fan4",
"type": "fan",
"inputs": ["SYS_FAN4"],
"setpoint": 40.0,
"pid": {
"samplePeriod": 1.0,
"proportionalCoeff": 0.0,
"integralCoeff": 0.0,
"feedFwdOffsetCoeff": 0.0,
"feedFwdGainCoeff": 1.0,
"integralLimit_min": 0.0,
"integralLimit_max": 0.0,
"outLim_min": 0.0,
"outLim_max": 100.0,
"slewNeg": 0.0,
"slewPos": 0.0
}
},
{
"name": "Fan5",
"type": "fan",
"inputs": ["SYS_FAN5"],
"setpoint": 40.0,
"pid": {
"samplePeriod": 1.0,
"proportionalCoeff": 0.0,
"integralCoeff": 0.0,
"feedFwdOffsetCoeff": 0.0,
"feedFwdGainCoeff": 1.0,
"integralLimit_min": 0.0,
"integralLimit_max": 0.0,
"outLim_min": 0.0,
"outLim_max": 100.0,
"slewNeg": 0.0,
"slewPos": 0.0
}
},
{
"name": "cpu_core",
"type": "temp",
"inputs": ["CPU_TEMP"],
"setpoint": 80.0,
"pid": {
"samplePeriod": 1.0,
"proportionalCoeff": -6.0,
"integralCoeff": -0.1,
"feedFwdOffsetCoeff": 0.0,
"feedFwdGainCoeff": 0.0,
"integralLimit_min": 0.0,
"integralLimit_max": 0.0,
"outLim_min": 0.0,
"outLim_max": 100.0,
"slewNeg": 0.0,
"slewPos": 0.0
}
},
{
"name": "m2_temp",
"type": "temp",
"inputs": ["M2_TEMP"],
"setpoint": 75.0,
"pid": {
"samplePeriod": 1.0,
"proportionalCoeff": -6.0,
"integralCoeff": -0.1,
"feedFwdOffsetCoeff": 0.0,
"feedFwdGainCoeff": 0.0,
"integralLimit_min": 0.0,
"integralLimit_max": 0.0,
"outLim_min": 0.0,
"outLim_max": 100.0,
"slewNeg": 0.0,
"slewPos": 0.0
}
},
{
"name": "ocp_nic_temp",
"type": "temp",
"inputs": ["OCP_NIC_TEMP"],
"setpoint": 75.0,
"pid": {
"samplePeriod": 1.0,
"proportionalCoeff": -3.0,
"integralCoeff": -1.0,
"feedFwdOffsetCoeff": 0.0,
"feedFwdGainCoeff": 0.0,
"integralLimit_min": 0.0,
"integralLimit_max": 0.0,
"outLim_min": 0.0,
"outLim_max": 100.0,
"slewNeg": 0.0,
"slewPos": 0.0
}
}
]
}
]
}
EOF
# Restart the service
sudo systemctl restart phosphor-pid-control.service