Inventory : Add Association interface for Cpu and Core

The change #38570 in bmcweb, uses associations between Cpu and CpuCore.
So document those associations in phosphor-dbus-interfaces

Change-Id: I5b12ca5a89c094e2a5b47a7fbc39482d6286e9d3
Signed-off-by: Nikhil Namjoshi <nikhilnamjoshi@google.com>
diff --git a/yaml/xyz/openbmc_project/Inventory/Item/Cpu.interface.yaml b/yaml/xyz/openbmc_project/Inventory/Item/Cpu.interface.yaml
index 74f5671..465bae7 100644
--- a/yaml/xyz/openbmc_project/Inventory/Item/Cpu.interface.yaml
+++ b/yaml/xyz/openbmc_project/Inventory/Item/Cpu.interface.yaml
@@ -99,3 +99,12 @@
           - upstream_processor
       required_endpoint_interfaces:
           - xyz.openbmc_project.Inventory.Item.PCIeSlot
+    - name: containing
+      description: >
+          Objects that implement Cpu can optionally implement the
+          cores association to provide a link to one or more
+          cores.
+      reverse_names:
+          - contained_by
+      required_endpoint_interfaces:
+          - xyz.openbmc_project.Inventory.Item.CpuCore
diff --git a/yaml/xyz/openbmc_project/Inventory/Item/CpuCore.interface.yaml b/yaml/xyz/openbmc_project/Inventory/Item/CpuCore.interface.yaml
index 2639d71..9eed466 100644
--- a/yaml/xyz/openbmc_project/Inventory/Item/CpuCore.interface.yaml
+++ b/yaml/xyz/openbmc_project/Inventory/Item/CpuCore.interface.yaml
@@ -6,3 +6,13 @@
       description: >
           The microcode information for this processor
       default: 0
+
+associations:
+    - name: contained_by
+      description: >
+          Objects that implement CpuCore can optionally implement the
+          cpus association to provide a link to cpu
+      reverse_names:
+          - containing
+      required_endpoint_interfaces:
+          - xyz.openbmc_project.Inventory.Item.Cpu
diff --git a/yaml/xyz/openbmc_project/Inventory/Item/README.md b/yaml/xyz/openbmc_project/Inventory/Item/README.md
new file mode 100644
index 0000000..237e4b0
--- /dev/null
+++ b/yaml/xyz/openbmc_project/Inventory/Item/README.md
@@ -0,0 +1,9 @@
+# Inventory Association
+
+DBus objects with xyz.opebmc_project.Inventory.Item.${ItemType} interface might
+be associated with other inventory objects. Such association can be translated
+to Redfish schemas and then indicate the system topology.
+
+Document ObjectMapper association forward and reverse names as follows:
+* cpu and PCIe slots: [associated_pcie_slots, upstream_processor]
+* cpu and core: [containing, contained_by]