Add LastRebootCause property for BMC Reboot Cause feature

Scenario:
Customer want to know the last reboot cause of BMC through OpenBMC WebUI.
Thus, we need to add LastRebootCause property in BMC.interface.yaml.
Meanwhile, we also modify phosphor-state-manager and phosphor-webui
to support show BMC Reboot Cause information in Reboot BMC page.

Tested:
busctl get-property xyz.openbmc_project.State.BMC /xyz/openbmc_project/state/bmc0 xyz.openbmc_project.State.BMC LastRebootCause

When unplug/plug in BMC power cable then return as below: (POR i.e. Power-On-Reset)
s "xyz.openbmc_project.State.BMC.BMCResetCause.POR"

When executing reboot command then return as below:
s "xyz.openbmc_project.State.BMC.BMCResetCause.Watchdog"

Signed-off-by: Tim Lee <timlee660101@gmail.com>
Change-Id: Iac99adc1e12ab42076f0d33aa87a179f63b9c1ce
diff --git a/yaml/xyz/openbmc_project/State/BMC.interface.yaml b/yaml/xyz/openbmc_project/State/BMC.interface.yaml
index 2a7c5f9..60872dd 100644
--- a/yaml/xyz/openbmc_project/State/BMC.interface.yaml
+++ b/yaml/xyz/openbmc_project/State/BMC.interface.yaml
@@ -22,6 +22,12 @@
         The last time at which the BMC came out of a reboot as
         determined by its uptime, in epoch time, in milliseconds.
 
+   - name: LastRebootCause
+     type: enum[self.RebootCause]
+     default: 'Unknown'
+     description: >
+         The last BMC reboot cause
+
 enumerations:
    - name: Transition
      description: >
@@ -52,3 +58,17 @@
            UpdateInProgress implies BMC is in firmware update mode. CurrentBMCState
            will be set to "UpdateInProgress" while starting image download and
            reset to Ready, once activation is done or error case during update process.
+
+   - name: RebootCause
+     description: >
+       The recorded reboot cause of the BMC
+     values:
+       - name: 'POR'
+         description: >
+           Last reboot is caused by Power-On-Reset
+       - name: 'Watchdog'
+         description: >
+           Last reboot is caused by Watchdog
+       - name: 'Unknown'
+         description: >
+           Last reboot is caused by Unknown