meta-ampere: Initial AmpereOne(TM) Mt. Mitchell's non-DC-SCM BMC support

Add new Mt.Mitchell platform with basic features so that it can be
compiled and works.

Tested:
1. Compile for Mt.Mitchell successful.
2. Flash and check for the firmware can boot on the Mt.Mitchell
non-DC-SCM system without issue

Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com>
Change-Id: I8dc9db9029b27c0c6325c31d368cdbb614a3c8b6
diff --git a/meta-ampere/meta-mitchell/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend b/meta-ampere/meta-mitchell/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend
new file mode 100644
index 0000000..13ed796
--- /dev/null
+++ b/meta-ampere/meta-mitchell/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend
@@ -0,0 +1,2 @@
+FILESEXTRAPATHS:append := "${THISDIR}/${PN}:"
+
diff --git a/meta-ampere/meta-mitchell/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json b/meta-ampere/meta-mitchell/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
new file mode 100644
index 0000000..4998665
--- /dev/null
+++ b/meta-ampere/meta-mitchell/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
@@ -0,0 +1,178 @@
+{
+  "0" : {
+    "name" : "IPMB",
+    "is_valid" : true,
+    "active_sessions" : 0,
+    "channel_info" : {
+      "medium_type" : "ipmb",
+      "protocol_type" : "ipmb-1.0",
+      "session_supported" : "session-less",
+      "is_ipmi" : true
+    }
+  },
+  "1" : {
+    "name" : "eth0",
+    "is_valid" : true,
+    "active_sessions" : 0,
+    "channel_info" : {
+      "medium_type" : "lan-802.3",
+      "protocol_type" : "ipmb-1.0",
+      "session_supported" : "multi-session",
+      "is_ipmi" : true
+    }
+  },
+  "2" : {
+    "name" : "eth1",
+    "is_valid" : true,
+    "active_sessions" : 0,
+    "channel_info" : {
+      "medium_type" : "lan-802.3",
+      "protocol_type" : "ipmb-1.0",
+      "session_supported" : "multi-session",
+      "is_ipmi" : true
+    }
+  },
+  "3" : {
+    "name" : "usb0",
+    "is_valid" : true,
+    "active_sessions" : 0,
+    "channel_info" : {
+      "medium_type" : "lan-802.3",
+      "protocol_type" : "ipmb-1.0",
+      "session_supported" : "multi-session",
+      "is_ipmi" : true
+    }
+  },
+  "4" : {
+    "name" : "RESERVED",
+    "is_valid" : false,
+    "active_sessions" : 0,
+    "channel_info" : {
+      "medium_type" : "reserved",
+      "protocol_type" : "na",
+      "session_supported" : "session-less",
+      "is_ipmi" : true
+    }
+  },
+  "5" : {
+    "name" : "RESERVED",
+    "is_valid" : false,
+    "active_sessions" : 0,
+    "channel_info" : {
+      "medium_type" : "reserved",
+      "protocol_type" : "na",
+      "session_supported" : "session-less",
+      "is_ipmi" : true
+    }
+  },
+  "6" : {
+    "name" : "RESERVED",
+    "is_valid" : false,
+    "active_sessions" : 0,
+    "channel_info" : {
+      "medium_type" : "reserved",
+      "protocol_type" : "na",
+      "session_supported" : "session-less",
+      "is_ipmi" : true
+    }
+  },
+  "7" : {
+    "name" : "RESERVED",
+    "is_valid" : false,
+    "active_sessions" : 0,
+    "channel_info" : {
+      "medium_type" : "reserved",
+      "protocol_type" : "na",
+      "session_supported" : "session-less",
+      "is_ipmi" : true
+    }
+  },
+  "8" : {
+    "name" : "INTRABMC",
+    "is_valid" : true,
+    "active_sessions" : 0,
+    "channel_info" : {
+      "medium_type" : "oem",
+      "protocol_type" : "oem",
+      "session_supported" : "session-less",
+      "is_ipmi" : true
+    }
+  },
+  "9" : {
+    "name" : "RESERVED",
+    "is_valid" : false,
+    "active_sessions" : 0,
+    "channel_info" : {
+      "medium_type" : "reserved",
+      "protocol_type" : "na",
+      "session_supported" : "session-less",
+      "is_ipmi" : true
+    }
+  },
+  "10" : {
+    "name" : "RESERVED",
+    "is_valid" : false,
+    "active_sessions" : 0,
+    "channel_info" : {
+      "medium_type" : "reserved",
+      "protocol_type" : "na",
+      "session_supported" : "session-less",
+      "is_ipmi" : true
+    }
+  },
+  "11" : {
+    "name" : "RESERVED",
+    "is_valid" : false,
+    "active_sessions" : 0,
+    "channel_info" : {
+      "medium_type" : "reserved",
+      "protocol_type" : "na",
+      "session_supported" : "session-less",
+      "is_ipmi" : true
+    }
+  },
+  "12" : {
+    "name" : "RESERVED",
+    "is_valid" : false,
+    "active_sessions" : 0,
+    "channel_info" : {
+      "medium_type" : "reserved",
+      "protocol_type" : "na",
+      "session_supported" : "session-less",
+      "is_ipmi" : true
+    }
+  },
+  "13" : {
+    "name" : "RESERVED",
+    "is_valid" : false,
+    "active_sessions" : 0,
+    "channel_info" : {
+      "medium_type" : "reserved",
+      "protocol_type" : "na",
+      "session_supported" : "session-less",
+      "is_ipmi" : true
+    }
+  },
+  "14" : {
+    "name" : "SELF",
+    "is_valid" : false,
+    "active_sessions" : 0,
+    "channel_info" : {
+      "medium_type" : "ipmb",
+      "protocol_type" : "ipmb-1.0",
+      "session_supported" : "session-less",
+      "is_ipmi" : true
+    }
+  },
+  "15" : {
+    "name" : "ipmi_ssif",
+    "is_valid" : true,
+    "active_sessions" : 0,
+    "channel_info" : {
+      "medium_type" : "smbus-v2.0",
+      "protocol_type" : "ipmi-smbus",
+      "session_supported" : "session-less",
+      "is_ipmi" : true
+    }
+  }
+}
diff --git a/meta-ampere/meta-mitchell/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json b/meta-ampere/meta-mitchell/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json
new file mode 100644
index 0000000..8e89732
--- /dev/null
+++ b/meta-ampere/meta-mitchell/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json
@@ -0,0 +1,2 @@
+{"id": 32, "revision": 1, "addn_dev_support": 141,
+    "manuf_id": 52538, "prod_id": 131, "aux": 0}
diff --git a/meta-ampere/meta-mitchell/recipes-phosphor/leds/ampere-led-manager-config-native.bb b/meta-ampere/meta-mitchell/recipes-phosphor/leds/ampere-led-manager-config-native.bb
new file mode 100644
index 0000000..3b15b53
--- /dev/null
+++ b/meta-ampere/meta-mitchell/recipes-phosphor/leds/ampere-led-manager-config-native.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Phosphor LED Group Management for Mt. Mitchell"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit native
+
+PROVIDES += "virtual/phosphor-led-manager-config-native"
+
+SRC_URI += "file://led.yaml"
+
+# Overwrite the example led layout yaml file prior
+# to building the phosphor-led-manager package
+do_install() {
+    DEST=${D}${datadir}/phosphor-led-manager
+    install -D ${WORKDIR}/led.yaml ${DEST}/led.yaml
+}
diff --git a/meta-ampere/meta-mitchell/recipes-phosphor/leds/ampere-led-manager-config/led.yaml b/meta-ampere/meta-mitchell/recipes-phosphor/leds/ampere-led-manager-config/led.yaml
new file mode 100644
index 0000000..3e321ed
--- /dev/null
+++ b/meta-ampere/meta-mitchell/recipes-phosphor/leds/ampere-led-manager-config/led.yaml
@@ -0,0 +1,32 @@
+bmc_booted:
+    power:
+        Action: 'Blink'
+        DutyOn: 50
+        Period: 1000
+        Priority: 'On'
+
+power_on:
+    power:
+        Action: 'On'
+        DutyOn: 50
+        Period: 0
+        Priority: 'On'
+
+systemFault:
+    fault:
+        Action: 'On'
+        DutyOn: 50
+        Period: 0
+        Priority: 'Blink'
+
+enclosure_identify:
+    identify:
+        Action: 'On'
+        DutyOn: 50
+        Period: 1000
+
+enclosure_identify_blink:
+    identify:
+        Action: 'Blink'
+        DutyOn: 50
+        Period: 1000
diff --git a/meta-ampere/meta-mitchell/recipes-phosphor/skeleton/obmc-libobmc-intf/mtmitchell_gpio_defs.json b/meta-ampere/meta-mitchell/recipes-phosphor/skeleton/obmc-libobmc-intf/mtmitchell_gpio_defs.json
new file mode 100644
index 0000000..f354284
--- /dev/null
+++ b/meta-ampere/meta-mitchell/recipes-phosphor/skeleton/obmc-libobmc-intf/mtmitchell_gpio_defs.json
@@ -0,0 +1,45 @@
+{
+    "gpio_configs": {
+
+        "power_config": {
+            "power_good_in": "PGOOD",
+            "power_up_outs": [
+                {"name": "OCP_MAIN_PWREN", "polarity": true},
+                {"name": "BMC_SYS_PSON_L", "polarity": false}
+            ]
+        }
+    },
+
+    "gpio_definitions": [
+        {
+            "name": "PGOOD",
+            "pin": "H3",
+            "direction": "in"
+        },
+        {
+            "name": "BMC_SYS_PSON_L",
+            "pin": "F2",
+            "direction": "out"
+        },
+        {
+            "name": "POWER_BUTTON",
+            "pin": "I6",
+            "direction": "both"
+        },
+        {
+            "name": "RESET_BUTTON",
+            "pin": "Z0",
+            "direction": "both"
+        },
+        {
+            "name": "OCP_MAIN_PWREN",
+            "pin": "W1",
+            "direction": "out"
+        },
+        {
+            "name": "ID_BTN",
+            "pin": "S2",
+            "direction": "both"
+        }
+    ]
+}
diff --git a/meta-ampere/meta-mitchell/recipes-phosphor/skeleton/obmc-libobmc-intf_%.bbappend b/meta-ampere/meta-mitchell/recipes-phosphor/skeleton/obmc-libobmc-intf_%.bbappend
new file mode 100644
index 0000000..331c244
--- /dev/null
+++ b/meta-ampere/meta-mitchell/recipes-phosphor/skeleton/obmc-libobmc-intf_%.bbappend
@@ -0,0 +1,10 @@
+FILESEXTRAPATHS:append := "${THISDIR}/${PN}:"
+
+SRC_URI += "\
+            file://${MACHINE}_gpio_defs.json \
+           "
+
+do_install:append() {
+	install -d ${D}${sysconfdir}/default/obmc/gpio/
+	install -m 0644 ${WORKDIR}/${MACHINE}_gpio_defs.json ${D}/${sysconfdir}/default/obmc/gpio/gpio_defs.json
+}