summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOskar Senft <osk@google.com>2021-12-01 00:05:59 +0300
committerPatrick Williams <patrick@stwcx.xyz>2021-12-21 22:52:49 +0300
commit4091a0d42e312c8c9ec9af6525f1074103b97639 (patch)
tree6815c1c8ae503dede3bd70210f67b102009ecc39
parenta6b6c4abdf1b67e34701d2a9e36123f7f8b4d9a6 (diff)
downloadopenbmc-4091a0d42e312c8c9ec9af6525f1074103b97639.tar.xz
tyan, s7106: Initial commit for TYAN S7106
The TYAN S7106 is a server mainboard with an Aspeed AST2500 BMC. Signed-off-by: Oskar Senft <osk@google.com> Change-Id: I75e4938bbc7d25bd8e949a4bae5761205aa0ff22
-rw-r--r--meta-tyan/OWNERS3
-rw-r--r--meta-tyan/conf/layer.conf11
-rw-r--r--meta-tyan/conf/machine/include/tyan.inc20
-rw-r--r--meta-tyan/meta-common/recipes-phosphor/console/obmc-console/obmc-console.conf3
-rw-r--r--meta-tyan/meta-common/recipes-phosphor/console/obmc-console_%.bbappend2
-rw-r--r--meta-tyan/meta-common/recipes-phosphor/dummy/tyan-dummy.bb8
-rw-r--r--meta-tyan/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend1
-rw-r--r--meta-tyan/meta-common/recipes-phosphor/packagegroups/packagegroup-tyan-apps.bb39
-rw-r--r--meta-tyan/meta-common/recipes-x86/chassis/x86-power-control/power-config-host0.json69
-rw-r--r--meta-tyan/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend11
-rw-r--r--meta-tyan/meta-s7106/conf/bblayers.conf.sample19
-rw-r--r--meta-tyan/meta-s7106/conf/conf-notes.txt2
-rw-r--r--meta-tyan/meta-s7106/conf/layer.conf11
-rw-r--r--meta-tyan/meta-s7106/conf/local.conf.sample17
-rw-r--r--meta-tyan/meta-s7106/conf/machine/s7106.conf16
-rw-r--r--meta-tyan/meta-s7106/recipes-kernel/linux/linux-aspeed/s7106.cfg20
-rw-r--r--meta-tyan/meta-s7106/recipes-kernel/linux/linux-aspeed_%.bbappend4
-rw-r--r--meta-tyan/meta-s7106/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend1
18 files changed, 257 insertions, 0 deletions
diff --git a/meta-tyan/OWNERS b/meta-tyan/OWNERS
new file mode 100644
index 000000000..3080f8540
--- /dev/null
+++ b/meta-tyan/OWNERS
@@ -0,0 +1,3 @@
+owners:
+- aaelhaj@google.com
+- osk@google.com
diff --git a/meta-tyan/conf/layer.conf b/meta-tyan/conf/layer.conf
new file mode 100644
index 000000000..e0bd4cac7
--- /dev/null
+++ b/meta-tyan/conf/layer.conf
@@ -0,0 +1,11 @@
+# We have a conf and classes directory, add to BBPATH
+BBPATH .= ":${LAYERDIR}"
+
+# We have recipes-* directories, add to BBFILES
+BBFILES += "${LAYERDIR}/meta-common/recipes-*/*/*.bb \
+ ${LAYERDIR}/meta-common/recipes-*/*/*.bbappend"
+
+BBFILE_COLLECTIONS += "tyan-layer"
+BBFILE_PATTERN_tyan-layer = "^${LAYERDIR}/"
+LAYERSERIES_COMPAT_tyan-layer = "hardknott honister"
+
diff --git a/meta-tyan/conf/machine/include/tyan.inc b/meta-tyan/conf/machine/include/tyan.inc
new file mode 100644
index 000000000..3180704c2
--- /dev/null
+++ b/meta-tyan/conf/machine/include/tyan.inc
@@ -0,0 +1,20 @@
+MACHINE_FEATURES += "\
+ obmc-bmc-state-mgmt \
+ obmc-chassis-state-mgmt \
+ obmc-host-ipmi \
+ obmc-host-state-mgmt \
+ obmc-phosphor-chassis-mgmt \
+ obmc-phosphor-fan-mgmt \
+ obmc-phosphor-flash-mgmt \
+ "
+
+VIRTUAL-RUNTIME_obmc-inventory-manager = "entity-manager"
+PREFERRED_PROVIDER_virtual/obmc-inventory-data = "entity-manager"
+
+VIRTUAL-RUNTIME_obmc-host-state-manager ?= "x86-power-control"
+VIRTUAL-RUNTIME_obmc-chassis-state-manager ?= "x86-power-control"
+
+PREFERRED_PROVIDER_virtual/obmc-chassis-mgmt = "packagegroup-tyan-apps"
+PREFERRED_PROVIDER_virtual/obmc-flash-mgmt = "packagegroup-tyan-apps"
+PREFERRED_PROVIDER_virtual/obmc-host-ipmi-hw ?= "phosphor-ipmi-kcs"
+PREFERRED_PROVIDER_virtual/obmc-system-mgmt = "packagegroup-tyan-apps"
diff --git a/meta-tyan/meta-common/recipes-phosphor/console/obmc-console/obmc-console.conf b/meta-tyan/meta-common/recipes-phosphor/console/obmc-console/obmc-console.conf
new file mode 100644
index 000000000..8491f5365
--- /dev/null
+++ b/meta-tyan/meta-common/recipes-phosphor/console/obmc-console/obmc-console.conf
@@ -0,0 +1,3 @@
+baud = 115200
+local-tty = ttyS3
+local-tty-baud = 115200
diff --git a/meta-tyan/meta-common/recipes-phosphor/console/obmc-console_%.bbappend b/meta-tyan/meta-common/recipes-phosphor/console/obmc-console_%.bbappend
new file mode 100644
index 000000000..18bcfe350
--- /dev/null
+++ b/meta-tyan/meta-common/recipes-phosphor/console/obmc-console_%.bbappend
@@ -0,0 +1,2 @@
+FILESEXTRAPATHS:append := "${THISDIR}/${PN}:"
+OBMC_CONSOLE_HOST_TTY = "ttyS2"
diff --git a/meta-tyan/meta-common/recipes-phosphor/dummy/tyan-dummy.bb b/meta-tyan/meta-common/recipes-phosphor/dummy/tyan-dummy.bb
new file mode 100644
index 000000000..54b93855a
--- /dev/null
+++ b/meta-tyan/meta-common/recipes-phosphor/dummy/tyan-dummy.bb
@@ -0,0 +1,8 @@
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+ALLOW_EMPTY_${PN} = "1"
+
+PROVIDES += "virtual/obmc-fan-mgmt"
+RPROVIDES:${PN} += "virtual-obmc-fan-mgmt"
+
diff --git a/meta-tyan/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-tyan/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
new file mode 100644
index 000000000..bc70432fd
--- /dev/null
+++ b/meta-tyan/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
@@ -0,0 +1 @@
+PACKAGECONFIG:append = " dynamic-sensors"
diff --git a/meta-tyan/meta-common/recipes-phosphor/packagegroups/packagegroup-tyan-apps.bb b/meta-tyan/meta-common/recipes-phosphor/packagegroups/packagegroup-tyan-apps.bb
new file mode 100644
index 000000000..b29cca434
--- /dev/null
+++ b/meta-tyan/meta-common/recipes-phosphor/packagegroups/packagegroup-tyan-apps.bb
@@ -0,0 +1,39 @@
+SUMMARY = "OpenBMC for TYAN - Applications"
+PR = "r1"
+
+inherit packagegroup
+
+PROVIDES = "${PACKAGES}"
+PACKAGES = " \
+ ${PN}-chassis \
+ ${PN}-flash \
+ ${PN}-system \
+ "
+
+PROVIDES += "virtual/obmc-chassis-mgmt"
+PROVIDES += "virtual/obmc-flash-mgmt"
+PROVIDES += "virtual/obmc-system-mgmt"
+
+RPROVIDES:${PN}-chassis += "virtual-obmc-chassis-mgmt"
+RPROVIDES:${PN}-flash += "virtual-obmc-flash-mgmt"
+RPROVIDES:${PN}-system += "virtual-obmc-system-mgmt"
+
+SUMMARY:${PN}-chassis = "TYAN Chassis"
+RDEPENDS:${PN}-chassis = " \
+ x86-power-control \
+ "
+
+SUMMARY:${PN}-flash = "TYAN Flash"
+RDEPENDS:${PN}-flash = " \
+ phosphor-software-manager \
+ "
+
+SUMMARY:${PN}-system = "TYAN System"
+RDEPENDS:${PN}-system = " \
+ dbus-sensors \
+ phosphor-hostlogger \
+ phosphor-sel-logger \
+ ipmitool \
+ phosphor-post-code-manager \
+ phosphor-host-postd \
+ "
diff --git a/meta-tyan/meta-common/recipes-x86/chassis/x86-power-control/power-config-host0.json b/meta-tyan/meta-common/recipes-x86/chassis/x86-power-control/power-config-host0.json
new file mode 100644
index 000000000..bbeea06c6
--- /dev/null
+++ b/meta-tyan/meta-common/recipes-x86/chassis/x86-power-control/power-config-host0.json
@@ -0,0 +1,69 @@
+{
+ "gpio_configs":[
+ {
+ "Name" : "IdButton",
+ "LineName" : "id-button",
+ "Type" : "GPIO",
+ "Polarity" : "ActiveLow"
+ },
+ {
+ "Name" : "NMIButton",
+ "LineName" : "nmi-button",
+ "Type" : "GPIO",
+ "Polarity" : "ActiveLow"
+ },
+ {
+ "Name" : "NMIOut",
+ "LineName" : "nmi-control",
+ "Type" : "GPIO",
+ "Polarity" : "ActiveLow"
+ },
+ {
+ "Name" : "PostComplete",
+ "LineName" : "post-complete",
+ "Type" : "GPIO",
+ "Polarity" : "ActiveLow"
+ },
+ {
+ "Name" : "PowerButton",
+ "LineName" : "power-button",
+ "Type" : "GPIO",
+ "Polarity" : "ActiveLow"
+ },
+ {
+ "Name" : "PowerOk",
+ "LineName" : "power-chassis-good",
+ "Type" : "GPIO",
+ "Polarity" : "ActiveHigh"
+ },
+ {
+ "Name" : "PowerOut",
+ "LineName" : "power-chassis-control",
+ "Type" : "GPIO",
+ "Polarity" : "ActiveLow"
+ },
+ {
+ "Name" : "ResetButton",
+ "LineName" : "reset-button",
+ "Type" : "GPIO",
+ "Polarity" : "ActiveLow"
+ },
+ {
+ "Name" : "ResetOut",
+ "LineName" : "reset-control",
+ "Type" : "GPIO",
+ "Polarity" : "ActiveLow"
+ }
+ ],
+ "timing_configs":{
+ "PowerPulseMs": 200,
+ "ForceOffPulseMs": 15000,
+ "ResetPulseMs": 500,
+ "PowerCycleMs": 5000,
+ "SioPowerGoodWatchdogMs": 1000,
+ "PsPowerOKWatchdogMs": 8000,
+ "GracefulPowerOffS": 300,
+ "WarmResetCheckMs": 500,
+ "PowerOffSaveMs": 7000
+ }
+}
diff --git a/meta-tyan/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend b/meta-tyan/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend
new file mode 100644
index 000000000..c0fe1dd72
--- /dev/null
+++ b/meta-tyan/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend
@@ -0,0 +1,11 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+SRC_URI:append = " \
+ file://power-config-host0.json \
+"
+
+RDEPENDS:${PN}:append = " bash"
+
+do_install:append() {
+ install -d ${D}${datadir}/${PN}
+ install -m 0644 ${WORKDIR}/power-config-host0.json ${D}${datadir}/${PN}
+}
diff --git a/meta-tyan/meta-s7106/conf/bblayers.conf.sample b/meta-tyan/meta-s7106/conf/bblayers.conf.sample
new file mode 100644
index 000000000..956b2a759
--- /dev/null
+++ b/meta-tyan/meta-s7106/conf/bblayers.conf.sample
@@ -0,0 +1,19 @@
+# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
+# changes incompatibly
+LCONF_VERSION = "8"
+
+BBPATH = "${TOPDIR}"
+BBFILES ?= ""
+
+BBLAYERS ?= " \
+ ##OEROOT##/meta \
+ ##OEROOT##/meta-openembedded/meta-oe \
+ ##OEROOT##/meta-openembedded/meta-networking \
+ ##OEROOT##/meta-openembedded/meta-perl \
+ ##OEROOT##/meta-openembedded/meta-python \
+ ##OEROOT##/meta-security \
+ ##OEROOT##/meta-phosphor \
+ ##OEROOT##/meta-aspeed \
+ ##OEROOT##/meta-tyan \
+ ##OEROOT##/meta-tyan/meta-s7106 \
+"
diff --git a/meta-tyan/meta-s7106/conf/conf-notes.txt b/meta-tyan/meta-s7106/conf/conf-notes.txt
new file mode 100644
index 000000000..43d4ab099
--- /dev/null
+++ b/meta-tyan/meta-s7106/conf/conf-notes.txt
@@ -0,0 +1,2 @@
+Common targets are:
+ obmc-phosphor-image
diff --git a/meta-tyan/meta-s7106/conf/layer.conf b/meta-tyan/meta-s7106/conf/layer.conf
new file mode 100644
index 000000000..dae8f08f5
--- /dev/null
+++ b/meta-tyan/meta-s7106/conf/layer.conf
@@ -0,0 +1,11 @@
+# We have a conf and classes directory, add to BBPATH
+BBPATH .= ":${LAYERDIR}"
+
+# We have recipes-* directories, add to BBFILES
+BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
+ ${LAYERDIR}/recipes-*/*/*.bbappend"
+
+BBFILE_COLLECTIONS += "s7106-layer"
+BBFILE_PATTERN_s7106-layer = "^${LAYERDIR}/"
+BBFILE_PRIORITY_s7106-layer = "5"
+LAYERSERIES_COMPAT_s7106-layer = "hardknott honister"
diff --git a/meta-tyan/meta-s7106/conf/local.conf.sample b/meta-tyan/meta-s7106/conf/local.conf.sample
new file mode 100644
index 000000000..ec1b849eb
--- /dev/null
+++ b/meta-tyan/meta-s7106/conf/local.conf.sample
@@ -0,0 +1,17 @@
+MACHINE ??= "s7106"
+DISTRO ?= "openbmc-phosphor"
+PACKAGE_CLASSES ?= "package_rpm"
+SANITY_TESTED_DISTROS:append ?= " *"
+EXTRA_IMAGE_FEATURES = "debug-tweaks"
+USER_CLASSES ?= "buildstats image-prelink"
+PATCHRESOLVE = "noop"
+BB_DISKMON_DIRS = "\
+ STOPTASKS,${TMPDIR},1G,100K \
+ STOPTASKS,${DL_DIR},1G,100K \
+ STOPTASKS,${SSTATE_DIR},1G,100K \
+ STOPTASKS,/tmp,100M,100K \
+ ABORT,${TMPDIR},100M,1K \
+ ABORT,${DL_DIR},100M,1K \
+ ABORT,${SSTATE_DIR},100M,1K \
+ ABORT,/tmp,10M,1K"
+CONF_VERSION = "2"
diff --git a/meta-tyan/meta-s7106/conf/machine/s7106.conf b/meta-tyan/meta-s7106/conf/machine/s7106.conf
new file mode 100644
index 000000000..0244ebd76
--- /dev/null
+++ b/meta-tyan/meta-s7106/conf/machine/s7106.conf
@@ -0,0 +1,16 @@
+KMACHINE = "aspeed"
+KERNEL_DEVICETREE = "${KMACHINE}-bmc-tyan-${MACHINE}.dtb"
+
+UBOOT_MACHINE = "ast_g5_phy_config"
+
+require conf/machine/include/ast2500.inc
+require conf/machine/include/obmc-bsp-common.inc
+require conf/machine/include/tyan.inc
+
+FLASH_SIZE = "32768"
+
+# We don't have configuration for these components yet, so remove them.
+PREFERRED_PROVIDER_virtual/obmc-fan-mgmt = "tyan-dummy"
+IMAGE_FEATURES:remove = "obmc-fan-control"
+IMAGE_FEATURES:remove = "obmc-fan-mgmt"
+IMAGE_FEATURES:remove = "obmc-flash-mgmt"
diff --git a/meta-tyan/meta-s7106/recipes-kernel/linux/linux-aspeed/s7106.cfg b/meta-tyan/meta-s7106/recipes-kernel/linux/linux-aspeed/s7106.cfg
new file mode 100644
index 000000000..c427a19be
--- /dev/null
+++ b/meta-tyan/meta-s7106/recipes-kernel/linux/linux-aspeed/s7106.cfg
@@ -0,0 +1,20 @@
+CONFIG_ASPEED_UART_ROUTING=y
+CONFIG_DEVMEM=y
+CONFIG_I2C_MUX_GPIO=y
+CONFIG_SENSORS_NCT7802=y
+
+# Support for virtual USB NIC
+CONFIG_USB_U_ETHER=y
+CONFIG_USB_F_ECM=y
+CONFIG_USB_CONFIGFS_ECM=y
+CONFIG_USB_CONFIGFS_ECM_SUBSET=y
+
+# Enable PECI
+CONFIG_PECI=y
+CONFIG_PECI_CHARDEV=y
+CONFIG_PECI_ASPEED=y
+CONFIG_SENSORS_PECI_CPUTEMP=y
+CONFIG_SENSORS_PECI_DIMMTEMP=y
+CONFIG_SENSORS_PECI_CPUPOWER=y
+CONFIG_SENSORS_PECI_DIMMPOWER=y
+CONFIG_IPMB_DEVICE_INTERFACE=y
diff --git a/meta-tyan/meta-s7106/recipes-kernel/linux/linux-aspeed_%.bbappend b/meta-tyan/meta-s7106/recipes-kernel/linux/linux-aspeed_%.bbappend
new file mode 100644
index 000000000..6307e1bb6
--- /dev/null
+++ b/meta-tyan/meta-s7106/recipes-kernel/linux/linux-aspeed_%.bbappend
@@ -0,0 +1,4 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+SRC_URI:append = " \
+ file://s7106.cfg \
+ "
diff --git a/meta-tyan/meta-s7106/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend b/meta-tyan/meta-s7106/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend
new file mode 100644
index 000000000..9f7857036
--- /dev/null
+++ b/meta-tyan/meta-s7106/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend
@@ -0,0 +1 @@
+KCS_DEVICE = "ipmi-kcs1"