control:p10bmc:ibm,rainier-2u: Add increase actions for OCC temps

Add the initial target increase actions for each of the OCC provided
temperature groups. The core and ioring temperatures use a managed
parameter to determine their state at which target increases should be
calculated and requested. The events to set those managed parameters
is:

https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-fan-presence/+/49236

Each of the other dimm temperatures and the vrm temperatures use a
static state to determine at which target increases should be calculated
and requested.

All groups are given an initial delta which is multiplied by the number
of degrees each sensor is above their respective state values (whether
set statically or by a managed parameter), and that is the amount to
increase the target of the zone's fans by.

Change-Id: Ied03a4b30c253bff815dc538adc5738f7830523d
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/config_files/p10bmc/ibm,rainier-2u/events.json b/control/config_files/p10bmc/ibm,rainier-2u/events.json
index bd2c1a5..cf1fff4 100644
--- a/control/config_files/p10bmc/ibm,rainier-2u/events.json
+++ b/control/config_files/p10bmc/ibm,rainier-2u/events.json
@@ -589,6 +589,176 @@
          "interval": 2000000,
          "preload_groups": true
        }
+     ],
+     "actions": [
+       {
+         "name": "set_net_increase_target",
+         "groups": [
+           {
+             "name": "proc0 core temps",
+             "interface": "xyz.openbmc_project.Sensor.Value",
+             "property": { "name": "Value" }
+           }
+         ],
+         "state_parameter_name": "proc_0_core_dvfs_increase_temp",
+         "delta": 300
+       },
+       {
+         "name": "set_net_increase_target",
+         "groups": [
+           {
+             "name": "proc1 core temps",
+             "interface": "xyz.openbmc_project.Sensor.Value",
+             "property": { "name": "Value" }
+           }
+         ],
+         "state_parameter_name": "proc_1_core_dvfs_increase_temp",
+         "delta": 300
+       },
+       {
+         "name": "set_net_increase_target",
+         "groups": [
+           {
+             "name": "proc2 core temps",
+             "interface": "xyz.openbmc_project.Sensor.Value",
+             "property": { "name": "Value" }
+           }
+         ],
+         "state_parameter_name": "proc_2_core_dvfs_increase_temp",
+         "delta": 300
+       },
+       {
+         "name": "set_net_increase_target",
+         "groups": [
+           {
+             "name": "proc3 core temps",
+             "interface": "xyz.openbmc_project.Sensor.Value",
+             "property": { "name": "Value" }
+           }
+         ],
+         "state_parameter_name": "proc_3_core_dvfs_increase_temp",
+         "delta": 300
+       },
+       {
+         "name": "set_net_increase_target",
+         "groups": [
+           {
+             "name": "proc0 ioring temp",
+             "interface": "xyz.openbmc_project.Sensor.Value",
+             "property": { "name": "Value" }
+           }
+         ],
+         "state_parameter_name": "proc_0_ioring_dvfs_increase_temp",
+         "delta": 300
+       },
+       {
+         "name": "set_net_increase_target",
+         "groups": [
+           {
+             "name": "proc1 ioring temp",
+             "interface": "xyz.openbmc_project.Sensor.Value",
+             "property": { "name": "Value" }
+           }
+         ],
+         "state_parameter_name": "proc_1_ioring_dvfs_increase_temp",
+         "delta": 300
+       },
+       {
+         "name": "set_net_increase_target",
+         "groups": [
+           {
+             "name": "proc2 ioring temp",
+             "interface": "xyz.openbmc_project.Sensor.Value",
+             "property": { "name": "Value" }
+           }
+         ],
+         "state_parameter_name": "proc_2_ioring_dvfs_increase_temp",
+         "delta": 300
+       },
+       {
+         "name": "set_net_increase_target",
+         "groups": [
+           {
+             "name": "proc3 ioring temp",
+             "interface": "xyz.openbmc_project.Sensor.Value",
+             "property": { "name": "Value" }
+           }
+         ],
+         "state_parameter_name": "proc_3_ioring_dvfs_increase_temp",
+         "delta": 300
+       },
+       {
+         "name": "set_net_increase_target",
+         "groups": [
+           {
+             "name": "dram temps",
+             "interface": "xyz.openbmc_project.Sensor.Value",
+             "property": { "name": "Value" }
+           }
+         ],
+         "state": 66.0,
+         "delta": 200
+       },
+       {
+         "name": "set_net_increase_target",
+         "groups": [
+           {
+             "name": "pmic temps",
+             "interface": "xyz.openbmc_project.Sensor.Value",
+             "property": { "name": "Value" }
+           }
+         ],
+         "state": 62.0,
+         "delta": 200
+       },
+       {
+         "name": "set_net_increase_target",
+         "groups": [
+           {
+             "name": "internal memory buffer temps",
+             "interface": "xyz.openbmc_project.Sensor.Value",
+             "property": { "name": "Value" }
+           }
+         ],
+         "state": 72.0,
+         "delta": 200
+       },
+       {
+         "name": "set_net_increase_target",
+         "groups": [
+           {
+             "name": "dram and external memory buffer temps",
+             "interface": "xyz.openbmc_project.Sensor.Value",
+             "property": { "name": "Value" }
+           }
+         ],
+         "state": 55.0,
+         "delta": 200
+       },
+       {
+         "name": "set_net_increase_target",
+         "groups": [
+           {
+             "name": "external memory buffer temps",
+             "interface": "xyz.openbmc_project.Sensor.Value",
+             "property": { "name": "Value" }
+           }
+         ],
+         "state": 55.0,
+         "delta": 200
+       },
+       {
+         "name": "set_net_increase_target",
+         "groups": [
+           {
+             "name": "vdd vrm temps",
+             "interface": "xyz.openbmc_project.Sensor.Value",
+             "property": { "name": "Value" }
+           }
+         ],
+         "state": 82.0,
+         "delta": 300
+       }
      ]
    }
 ]