Update power supply inventory path to match MRW

I2C device access failures can lead to the correct FRU
callouts only when the inventory path of the FRU matches
in the inventory and the MRW, as a build time script
parses the MRW to map device paths to inventory items.

In the MRW it is not possible to hang a FRU off the chassis
like the BMC currently has it, so adding the motherboard
into the BMC inventory paths to match the MRW ones.

With this change, device access failures by phosphor-hwmon-readd
and witherspoon-psu-monitor will now lead to the proper
inventory object callouts.

Resolves openbmc/openbmc#2924

Change-Id: I7d76d1879ead48c95ec28c7536ae404f1fc9856d
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/meta-witherspoon/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/phosphor-power-supply-0.conf b/meta-witherspoon/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/phosphor-power-supply-0.conf
index f2ba6a3..285a8f7 100644
--- a/meta-witherspoon/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/phosphor-power-supply-0.conf
+++ b/meta-witherspoon/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/phosphor-power-supply-0.conf
@@ -1,4 +1,4 @@
-INVENTORY=/system/chassis/powersupply0
+INVENTORY=/system/chassis/motherboard/powersupply0
 DEVPATH=/dev/input/by-path/platform-gpio-keys-event
 KEY=104
 NAME=powersupply0
diff --git a/meta-witherspoon/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/phosphor-power-supply-1.conf b/meta-witherspoon/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/phosphor-power-supply-1.conf
index 98c4db3..56e16c5 100644
--- a/meta-witherspoon/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/phosphor-power-supply-1.conf
+++ b/meta-witherspoon/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/phosphor-power-supply-1.conf
@@ -1,4 +1,4 @@
-INVENTORY=/system/chassis/powersupply1
+INVENTORY=/system/chassis/motherboard/powersupply1
 DEVPATH=/dev/input/by-path/platform-gpio-keys-event
 KEY=127
 NAME=powersupply1
diff --git a/meta-witherspoon/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml b/meta-witherspoon/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml
index 454ae5d..0d179ef 100644
--- a/meta-witherspoon/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml
+++ b/meta-witherspoon/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml
@@ -11,3 +11,5 @@
             paths:
                 - /system/chassis/power_supply0
                 - /system/chassis/power_supply1
+                - /system/chassis/powersupply0
+                - /system/chassis/powersupply1
diff --git a/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis/obmc/power-supply-monitor/power-supply-monitor-0.conf b/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis/obmc/power-supply-monitor/power-supply-monitor-0.conf
index 8640e62..207eb50 100644
--- a/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis/obmc/power-supply-monitor/power-supply-monitor-0.conf
+++ b/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis/obmc/power-supply-monitor/power-supply-monitor-0.conf
@@ -1,6 +1,6 @@
 DEVPATH=/sys/bus/i2c/devices/3-0069
 INSTANCE=0
-INVENTORY=/system/chassis/powersupply0
+INVENTORY=/system/chassis/motherboard/powersupply0
 NUM_HISTORY_RECORDS=120
 SYNC_GPIO_PATH=/dev/gpiochip0
 SYNC_GPIO_NUM=105
\ No newline at end of file
diff --git a/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis/obmc/power-supply-monitor/power-supply-monitor-1.conf b/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis/obmc/power-supply-monitor/power-supply-monitor-1.conf
index b481ef2..73efd45 100644
--- a/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis/obmc/power-supply-monitor/power-supply-monitor-1.conf
+++ b/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis/obmc/power-supply-monitor/power-supply-monitor-1.conf
@@ -1,6 +1,6 @@
 DEVPATH=/sys/bus/i2c/devices/3-0068
 INSTANCE=1
-INVENTORY=/system/chassis/powersupply1
+INVENTORY=/system/chassis/motherboard/powersupply1
 NUM_HISTORY_RECORDS=120
 SYNC_GPIO_PATH=/dev/gpiochip0
 SYNC_GPIO_NUM=105
\ No newline at end of file
diff --git a/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis/witherspoon-power-supply-monitor@.service b/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis/witherspoon-power-supply-monitor@.service
index a4f17e9..ba4e368 100644
--- a/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis/witherspoon-power-supply-monitor@.service
+++ b/meta-witherspoon/recipes-phosphor/power/witherspoon-pfault-analysis/witherspoon-power-supply-monitor@.service
@@ -1,7 +1,7 @@
 [Unit]
 Description=Witherspoon Power Supply %I Monitor
-Wants=mapper-wait@-xyz-openbmc_project-inventory-system-chassis-powersupply%i.service
-After=mapper-wait@-xyz-openbmc_project-inventory-system-chassis-powersupply%i.service
+Wants=mapper-wait@-xyz-openbmc_project-inventory-system-chassis-motherboard-powersupply%i.service
+After=mapper-wait@-xyz-openbmc_project-inventory-system-chassis-motherboard-powersupply%i.service
 Wants=mapper-wait@-org-openbmc-control-power0.service
 After=mapper-wait@-org-openbmc-control-power0.service
 ConditionPathExists={envfiledir}/obmc/power-supply-monitor/power-supply-monitor-%i.conf
diff --git a/meta-witherspoon/recipes-phosphor/power/witherspoon-power-supply-policy/power-supply-policy.yaml b/meta-witherspoon/recipes-phosphor/power/witherspoon-power-supply-policy/power-supply-policy.yaml
index a97f4b8..20141c9 100644
--- a/meta-witherspoon/recipes-phosphor/power/witherspoon-power-supply-policy/power-supply-policy.yaml
+++ b/meta-witherspoon/recipes-phosphor/power/witherspoon-power-supply-policy/power-supply-policy.yaml
@@ -7,14 +7,14 @@
   group: path
   members:
     - meta: POWER SUPPLY
-      path: /xyz/openbmc_project/inventory/system/chassis/powersupply0
+      path: /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0
 
 - name: power supply1
   class: group
   group: path
   members:
     - meta: POWER SUPPLY
-      path: /xyz/openbmc_project/inventory/system/chassis/powersupply1
+      path: /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply1
 
 - name: power supplies
   description: >
@@ -23,9 +23,9 @@
   group: path
   members:
     - meta: POWER SUPPLY
-      path: /xyz/openbmc_project/inventory/system/chassis/powersupply0
+      path: /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0
     - meta: POWER SUPPLY
-      path: /xyz/openbmc_project/inventory/system/chassis/powersupply1
+      path: /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply1
 
 - name: chassis state
   description: >
@@ -142,7 +142,7 @@
   error: xyz::openbmc_project::Inventory::Error::NotPresent
   metadata:
     - name: xyz::openbmc_project::Inventory::NotPresent::CALLOUT_INVENTORY_PATH
-      value: /xyz/openbmc_project/inventory/system/chassis/powersupply0
+      value: /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0
       type: string
 
 - name: notpresent power supply1 error
@@ -153,7 +153,7 @@
   error: xyz::openbmc_project::Inventory::Error::NotPresent
   metadata:
     - name: xyz::openbmc_project::Inventory::NotPresent::CALLOUT_INVENTORY_PATH
-      value: /xyz/openbmc_project/inventory/system/chassis/powersupply1
+      value: /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply1
       type: string
 
 - name: resolve power supply0 errors if present
@@ -187,14 +187,14 @@
   callback: resolve callout
   paths: power supply0
   properties: power supply present
-  callout: /xyz/openbmc_project/inventory/system/chassis/powersupply0
+  callout: /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0
 
 - name: resolve power supply1 errors
   class: callback
   callback: resolve callout
   paths: power supply1
   properties: power supply present
-  callout: /xyz/openbmc_project/inventory/system/chassis/powersupply1
+  callout: /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply1
 
 - name: watch power supply0 present for resolving error logs
   description: >