Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
+175
View File
@@ -0,0 +1,175 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
+12
View File
@@ -0,0 +1,12 @@
Different components of meta-ingrasys are under different licenses (a mix
of MIT and Apache-2.0). Please see:
COPYING.Apache-2.0
COPYING.MIT (MIT)
All metadata is MIT licensed unless otherwise stated. Source code
included in tree for individual recipes is under the LICENSE stated in
the associated recipe (.bb file) unless otherwise stated.
License information for any other files is either explicitly stated
or defaults to Apache-2.0.
+3
View File
@@ -0,0 +1,3 @@
owners:
- benjaminfair@google.com
- wak@google.com
+6
View File
@@ -0,0 +1,6 @@
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
BBFILE_COLLECTIONS += "ingrasys"
BBFILE_PATTERN_ingrasys := "^${LAYERDIR}/"
LAYERSERIES_COMPAT_ingrasys = "langdale mickledore"
@@ -0,0 +1 @@
require conf/machine/include/openpower.inc
+10
View File
@@ -0,0 +1,10 @@
# 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 += "zaius"
BBFILE_PATTERN_zaius := "^${LAYERDIR}/"
LAYERSERIES_COMPAT_zaius = "langdale mickledore"
@@ -0,0 +1,16 @@
KMACHINE = "aspeed"
KERNEL_DEVICETREE = "${KMACHINE}-bmc-opp-${MACHINE}.dtb"
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-aspeed"
PREFERRED_PROVIDER_u-boot = "u-boot-aspeed"
PREFERRED_PROVIDER_u-boot-fw-utils = "u-boot-fw-utils-aspeed"
UBOOT_MACHINE = "ast_g5_ncsi_config"
FLASH_SIZE = "65536"
require conf/machine/include/ast2500.inc
require conf/machine/include/obmc-bsp-common.inc
require conf/machine/include/ingrasys.inc
require conf/machine/include/p9.inc
require conf/distro/include/phosphor-aspeednic-use-mac2.inc
@@ -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-phosphor \
##OEROOT##/meta-aspeed \
##OEROOT##/meta-openpower \
##OEROOT##/meta-ingrasys \
##OEROOT##/meta-ingrasys/meta-zaius \
"
@@ -0,0 +1,2 @@
Common targets are:
obmc-phosphor-image
@@ -0,0 +1,17 @@
MACHINE ??= "zaius"
DISTRO ?= "openbmc-openpower"
PACKAGE_CLASSES ?= "package_ipk"
SANITY_TESTED_DISTROS:append ?= " *"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
HALT,${TMPDIR},100M,1K \
HALT,${DL_DIR},100M,1K \
HALT,${SSTATE_DIR},100M,1K \
HALT,/tmp,10M,1K"
CONF_VERSION = "2"
@@ -0,0 +1,60 @@
From 3cd9aa92ab8ddd230cf6a9a68a27a18705b6f57c Mon Sep 17 00:00:00 2001
From: Xo Wang <xow@google.com>
Date: Thu, 20 Oct 2016 16:26:29 -0700
Subject: [PATCH 1/2] board/aspeed: Add reset_phy() for Zaius
The Broadcom PHY for the Zaius BMC requires a hard reset after RGMII
clocks are enabled. Add reset_phy() implementation and configure it to
be called.
Signed-off-by: Xo Wang <xow@google.com>
---
board/aspeed/ast-g5/ast-g5.c | 19 +++++++++++++++++++
include/configs/ast-common.h | 3 +++
2 files changed, 22 insertions(+)
diff --git a/board/aspeed/ast-g5/ast-g5.c b/board/aspeed/ast-g5/ast-g5.c
index da79d7b..433ad18 100644
--- a/board/aspeed/ast-g5/ast-g5.c
+++ b/board/aspeed/ast-g5/ast-g5.c
@@ -33,6 +33,25 @@ int dram_init(void)
return 0;
}
+void reset_phy(void)
+{
+ unsigned long reg;
+ /* D3 in GPIOA/B/C/D direction and data registers */
+ unsigned long phy_reset_mask = BIT(27);
+
+ /* Assert MAC2 PHY hardware reset */
+ /* Set pin low */
+ reg = readl(AST_GPIO_BASE | 0x00);
+ writel(reg & ~phy_reset_mask, AST_GPIO_BASE | 0x00);
+ /* Enable pin for output */
+ reg = readl(AST_GPIO_BASE | 0x04);
+ writel(reg | phy_reset_mask, AST_GPIO_BASE | 0x04);
+ udelay(3);
+ /* Set pin high */
+ reg = readl(AST_GPIO_BASE | 0x00);
+ writel(reg | phy_reset_mask, AST_GPIO_BASE | 0x00);
+}
+
#ifdef CONFIG_FTGMAC100
int board_eth_init(bd_t *bd)
{
diff --git a/include/configs/ast-common.h b/include/configs/ast-common.h
index b39ea33..3566f73 100644
--- a/include/configs/ast-common.h
+++ b/include/configs/ast-common.h
@@ -104,4 +104,7 @@
"spi_dma=yes\0" \
""
+/* Call reset_phy() */
+#define CONFIG_RESET_PHY_R 1
+
#endif /* __AST_COMMON_CONFIG_H */
--
2.8.0.rc3.226.g39d4020
@@ -0,0 +1,2 @@
FILESEXTRAPATHS:prepend:zaius := "${THISDIR}/${PN}:"
SRC_URI:append:zaius = " file://0001-board-aspeed-Add-reset_phy-for-Zaius.patch"
@@ -0,0 +1,10 @@
CONFIG_I2C_MUX=y
CONFIG_I2C_MUX_PCA9541=y
CONFIG_I2C_MUX_PCA954x=y
CONFIG_W1=y
CONFIG_W1_MASTER_GPIO=y
CONFIG_W1_SLAVE_THERM=y
CONFIG_SENSORS_LM25066=y
CONFIG_RTC_DRV_PCF8523=y
CONFIG_SENSORS_ISL68137=y
CONFIG_SENSORS_IR38064=y
@@ -0,0 +1,2 @@
FILESEXTRAPATHS:prepend:zaius := "${THISDIR}/${PN}:"
SRC_URI:append:zaius = " file://zaius.cfg"
@@ -0,0 +1,29 @@
SUMMARY = "Zaius AVSBus control"
DESCRIPTION = "Voltage regulator module (VRM) AVSBus control for Zaius"
PR = "r0"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
inherit obmc-phosphor-systemd
TMPL_OFF = "avsbus-disable@.service"
TMPL_ON = "avsbus-enable@.service"
INSTFMT_OFF = "avsbus-disable@{0}.service"
INSTFMT_ON = "avsbus-enable@{0}.service"
TGTFMT_OFF = "obmc-host-stop@{0}.target"
TGTFMT_ON = "obmc-chassis-poweron@{0}.target"
FMT_OFF = "../${TMPL_OFF}:${TGTFMT_OFF}.wants/${INSTFMT_OFF}"
FMT_ON = "../${TMPL_ON}:${TGTFMT_ON}.requires/${INSTFMT_ON}"
SYSTEMD_SERVICE:${PN} += "${TMPL_OFF}"
SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT_OFF', 'OBMC_CHASSIS_INSTANCES')}"
SYSTEMD_SERVICE:${PN} += "${TMPL_ON}"
SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT_ON', 'OBMC_CHASSIS_INSTANCES')}"
SRC_URI += "file://zaius_avsbus.sh"
RDEPENDS:${PN} += "i2c-tools"
do_install() {
install -d ${D}${bindir}
install -m 0755 ${WORKDIR}/zaius_avsbus.sh ${D}${bindir}/zaius_avsbus.sh
}
@@ -0,0 +1,15 @@
[Unit]
Description=Disable AVSBus on VRMs
Wants=obmc-power-stop-pre@%i.target
Before=obmc-power-stop-pre@%i.target
Conflicts=obmc-host-startmin@%i.target
ConditionPathExists=!/run/openbmc/chassis@%i-on
[Service]
ExecStart=/usr/bin/env zaius_avsbus.sh disable
SyslogIdentifier=zaius_avsbus.sh
Type=oneshot
RemainAfterExit=yes
[Install]
WantedBy=obmc-host-stop@%i.target
@@ -0,0 +1,15 @@
[Unit]
Description=Enable AVSBus on VRMs
Wants=obmc-host-start-pre@%i.target
Before=obmc-host-start-pre@%i.target
Conflicts=obmc-host-stop@%i.target
ConditionPathExists=!/run/openbmc/chassis@%i-on
[Service]
ExecStart=/usr/bin/env zaius_avsbus.sh enable
SyslogIdentifier=zaius_avsbus.sh
Type=oneshot
RemainAfterExit=yes
[Install]
RequiredBy=obmc-chassis-poweron@%i.target
@@ -0,0 +1,58 @@
#!/bin/sh -e
# AVSBus control for PMBUS voltage regulator modules (VRMs)
# Switches output voltage target between
# - VOUT_COMMAND register (AVSBus disabled, default on Zaius)
# - AVSBus target output (AVSBus enabled, voltage set by host)
cpu0_i2c_bus="7"
cpu1_i2c_bus="8"
buses="$cpu0_i2c_bus $cpu1_i2c_bus"
vdd_i2c_addr_page="0x60:0x01"
vdn_i2c_addr_page="0x64:0x01"
vcs_i2c_addr_page="0x64:0x00"
addrs_pages="$vdd_i2c_addr_page $vdn_i2c_addr_page $vcs_i2c_addr_page"
i2c_path="/sys/bus/i2c/devices/"
# Usage: vrm_avs_enable <bus> <i2c_address> <page>
# Initializes the AVSBus VOUT setpoint to the value in PMBus VOUT_COMMAND
vrm_avs_enable()
{
echo "Enabling AVSBus on bus $1 VRM @$2 rail $3..."
echo 1 > "${i2c_path}/$1-$(printf "%04x" "$2")/hwmon/hwmon*/avs$(printf "%d" "$3")_enable"
}
# Usage: vrm_avs_disable <bus> <i2c_address> <page>
# Sets OPERATION PMBUS register to
# - Enable/Disable: On
# - VOUT Source: VOUT_COMMAND
# - AVSBus Copy: VOUT_COMMAND remains unchanged
vrm_avs_disable()
{
echo "Disabling AVSBus on bus $1 VRM @$2 rail $3..."
echo 0 > "${i2c_path}/$1-$(printf "%04x" "$2")/hwmon/hwmon*/avs$(printf "%d" "$3")_enable"
}
# Usage: for_each_rail <command>
# <command> will be invoked with <bus> <i2c_address> <page>
for_each_rail()
{
for bus in $buses
do
for addr_page in $addrs_pages
do
$1 "$bus" "$(echo "$addr_page" | tr : " ")"
done
done
}
if [ "$1" = "enable" ]
then
for_each_rail vrm_avs_enable
elif [ "$1" = "disable" ]
then
for_each_rail vrm_avs_disable
else
echo "\"$0 <enable|disable>\" to control whether VRMs use AVSBus"
echo "\"$0 <vdn_max>\" to set VDN rails VOUT_MAX to 1.1V"
fi
@@ -0,0 +1,29 @@
SUMMARY = "Zaius VCS rail control"
DESCRIPTION = "VCS voltage rail control implementation for Zaius"
PR = "r0"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
inherit obmc-phosphor-systemd
TMPL_OFF = "vcs-off@.service"
TMPL_ON = "vcs-on@.service"
INSTFMT_OFF = "vcs-off@{0}.service"
INSTFMT_ON = "vcs-on@{0}.service"
TGTFMT_OFF = "obmc-host-stop@{0}.target"
TGTFMT_ON = "obmc-chassis-poweron@{0}.target"
FMT_OFF = "../${TMPL_OFF}:${TGTFMT_OFF}.wants/${INSTFMT_OFF}"
FMT_ON = "../${TMPL_ON}:${TGTFMT_ON}.requires/${INSTFMT_ON}"
SYSTEMD_SERVICE:${PN} += "${TMPL_OFF}"
SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT_OFF', 'OBMC_CHASSIS_INSTANCES')}"
SYSTEMD_SERVICE:${PN} += "${TMPL_ON}"
SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT_ON', 'OBMC_CHASSIS_INSTANCES')}"
SRC_URI += "file://zaius_vcs.sh"
RDEPENDS:${PN} += "bash i2c-tools"
do_install() {
install -d ${D}${bindir}
install -m 0755 ${WORKDIR}/zaius_vcs.sh ${D}${bindir}/zaius_vcs.sh
}
@@ -0,0 +1,14 @@
[Unit]
Description=Turn VCS rails off
Wants=obmc-power-stop-pre@%i.target
Before=obmc-power-stop-pre@%i.target
Conflicts=obmc-host-startmin@%i.target
[Service]
ExecStart=/usr/bin/env zaius_vcs.sh off
SyslogIdentifier=zaius_vcs.sh
Type=oneshot
RemainAfterExit=yes
[Install]
WantedBy=obmc-host-stop@%i.target
@@ -0,0 +1,16 @@
[Unit]
Description=Turn VCS rails on
Wants=vcs_workaround@%i.service
After=vcs_workaround@%i.service
Wants=obmc-host-start-pre@%i.target
Before=obmc-host-start-pre@%i.target
Conflicts=obmc-host-stop@%i.target
[Service]
ExecStart=/usr/bin/env zaius_vcs.sh on
SyslogIdentifier=zaius_vcs.sh
Type=oneshot
RemainAfterExit=yes
[Install]
RequiredBy=obmc-chassis-poweron@%i.target
@@ -0,0 +1,71 @@
#!/bin/bash -e
# Read and control VCS rails by sending the UCD power sequencer I2C commands.
# This script assumes that the UCD is controlling VCS rails as GPIOs 5 and 6.
# Also assumes that those GPIOs are already enabled.
ucd_bus="0"
ucd_addr="0x64"
ucd_retries="5"
retry()
{
local i=0
until [ $i -ge $ucd_retries ]; do
i=$((i+1))
retry_output=$("$@") && break
done
local ret=$?
if [ $i -eq $ucd_retries ]; then exit $ret; fi
}
# Usage: ucd_get address
# Result stored in $ucd_reg
ucd_get()
{
retry i2cget -f -y $ucd_bus $ucd_addr "$1" b
ucd_reg=$retry_output
}
# Usage: ucd_get address value
ucd_set()
{
retry i2cset -f -y $ucd_bus $ucd_addr "$1" "$2" b
}
vcs_set_gpios()
{
echo -e "\tSetting UCD GPIO 5 to $1"
ucd_set 0xFA 5
ucd_set 0xFB "$1"
ucd_set 0xFB "$1"
echo -e "\tSetting UCD GPIO 6 to $1"
ucd_set 0xFA 6
ucd_set 0xFB "$1"
ucd_set 0xFB "$1"
}
vcs_get()
{
echo Reading VCS settings
ucd_set 0xFA 5
ucd_get 0xFB
local val=
val=$(echo "$ucd_reg" | grep -i -c 0x0f)
echo -e "\tUCD GPIO 5 state=$val"
ucd_set 0xFA 6
ucd_get 0xFB
val=$(echo "$ucd_reg" | grep -i -c 0x0f)
echo -e "\tUCD GPIO 6 state=$val"
}
if [ "$1" == "on" ]; then
echo Turning on VCS
vcs_set_gpios 0x7
elif [ "$1" == "off" ]; then
echo Turning off VCS
vcs_set_gpios 0x3
else
vcs_get
echo "$0 <on|off>" to set state
fi
@@ -0,0 +1,31 @@
SUMMARY = "YAML configuration for Zaius"
PR = "r1"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
inherit allarch
SRC_URI = " \
file://zaius-ipmi-fru.yaml \
file://zaius-ipmi-fru-properties.yaml \
file://zaius-ipmi-sensors.yaml \
"
S = "${WORKDIR}"
do_install() {
install -m 0644 -D zaius-ipmi-fru-properties.yaml \
${D}${datadir}/${BPN}/ipmi-extra-properties.yaml
install -m 0644 -D zaius-ipmi-fru.yaml \
${D}${datadir}/${BPN}/ipmi-fru-read.yaml
install -m 0644 -D zaius-ipmi-sensors.yaml \
${D}${datadir}/${BPN}/ipmi-sensors.yaml
}
FILES:${PN}-dev = " \
${datadir}/${BPN}/ipmi-extra-properties.yaml \
${datadir}/${BPN}/ipmi-fru-read.yaml \
${datadir}/${BPN}/ipmi-sensors.yaml \
"
ALLOW_EMPTY:${PN} = "1"
@@ -0,0 +1,15 @@
/system/chassis/motherboard/cpu0:
xyz.openbmc_project.Inventory.Decorator.Replaceable:
FieldReplaceable: 'true'
xyz.openbmc_project.Inventory.Decorator.Cacheable:
Cached: 'true'
xyz.openbmc_project.Inventory.Item:
Present: 'true'
/system/chassis/motherboard/cpu1:
xyz.openbmc_project.Inventory.Decorator.Replaceable:
FieldReplaceable: 'true'
xyz.openbmc_project.Inventory.Decorator.Cacheable:
Cached: 'true'
xyz.openbmc_project.Inventory.Item:
Present: 'true'
@@ -0,0 +1,54 @@
1:
/system/chassis/motherboard/cpu0:
entityID: 3
entityInstance: 1
interfaces:
xyz.openbmc_project.Inventory.Decorator.Revision:
Version:
IPMIFruProperty: Custom Field 2
IPMIFruSection: Board
IPMIFruValueDelimiter: 58
xyz.openbmc_project.Inventory.Decorator.Asset:
BuildDate:
IPMIFruProperty: Mfg Date
IPMIFruSection: Board
PartNumber:
IPMIFruProperty: Part Number
IPMIFruSection: Board
Manufacturer:
IPMIFruProperty: Manufacturer
IPMIFruSection: Board
SerialNumber:
IPMIFruProperty: Serial Number
IPMIFruSection: Board
xyz.openbmc_project.Inventory.Item:
PrettyName:
IPMIFruProperty: Name
IPMIFruSection: Board
2:
/system/chassis/motherboard/cpu1:
entityID: 3
entityInstance: 2
interfaces:
xyz.openbmc_project.Inventory.Decorator.Revision:
Version:
IPMIFruProperty: Custom Field 2
IPMIFruSection: Board
IPMIFruValueDelimiter: 58
xyz.openbmc_project.Inventory.Decorator.Asset:
BuildDate:
IPMIFruProperty: Mfg Date
IPMIFruSection: Board
PartNumber:
IPMIFruProperty: Part Number
IPMIFruSection: Board
Manufacturer:
IPMIFruProperty: Manufacturer
IPMIFruSection: Board
SerialNumber:
IPMIFruProperty: Serial Number
IPMIFruSection: Board
xyz.openbmc_project.Inventory.Item:
PrettyName:
IPMIFruProperty: Name
IPMIFruSection: Board
@@ -0,0 +1,713 @@
0x03:
sensorType: 0x0F
path: /xyz/openbmc_project/state/host0
sensorReadingType: 0x6F
serviceInterface: org.freedesktop.DBus.Properties
readingType: eventdata2
mutability: Mutability::Write|Mutability::Read
interfaces:
xyz.openbmc_project.State.Boot.Progress:
BootProgress:
Offsets:
0x13:
type: string
set: xyz.openbmc_project.State.Boot.Progress.ProgressStages.OSStart
0x00:
type: string
set: xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified
0x01:
type: string
set: xyz.openbmc_project.State.Boot.Progress.ProgressStages.MemoryInit
0x07:
type: string
set: xyz.openbmc_project.State.Boot.Progress.ProgressStages.PCIInit
0x14:
type: string
set: xyz.openbmc_project.State.Boot.Progress.ProgressStages.MotherboardInit
0x03:
type: string
set: xyz.openbmc_project.State.Boot.Progress.ProgressStages.SecondaryProcInit
0x05:
sensorType: 0x1F
path: /xyz/openbmc_project/state/host0
sensorReadingType: 0x6F
serviceInterface: org.freedesktop.DBus.Properties
readingType: assertion
mutability: Mutability::Write|Mutability::Read
interfaces:
xyz.openbmc_project.State.OperatingSystem.Status:
OperatingSystemState:
Offsets:
0x02:
assert: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.PXEBoot
type: string
0x06:
assert: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.BootComplete
type: string
0x04:
assert: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.CDROMBoot
type: string
0x01:
assert: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.CBoot
type: string
0x03:
assert: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.DiagBoot
type: string
0x05:
assert: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.ROMBoot
type: string
0x07:
sensorType: 0xC3
path: /xyz/openbmc_project/state/host0
sensorReadingType: 0x6F
serviceInterface: org.freedesktop.DBus.Properties
readingType: readingAssertion
mutability: Mutability::Write|Mutability::Read
interfaces:
xyz.openbmc_project.Control.Boot.RebootAttempts:
AttemptsLeft:
Offsets:
0xFF:
type: uint32_t
0x21:
sensorType: 0x07
path: /system/chassis/motherboard/cpu0
sensorReadingType: 0x6F
serviceInterface: xyz.openbmc_project.Inventory.Manager
readingType: assertion
mutability: Mutability::Write|Mutability::Read
interfaces:
xyz.openbmc_project.State.Decorator.OperationalStatus:
Functional:
Prereqs:
0x07:
assert: true
deassert: false
type: bool
Offsets:
0x08:
assert: false
deassert: true
type: bool
xyz.openbmc_project.Inventory.Item:
Present:
Offsets:
0x07:
assert: true
deassert: false
type: bool
0x6A:
sensorType: 0x07
path: /org/open_power/control/occ0
sensorReadingType: 0x09
serviceInterface: org.freedesktop.DBus.Properties
readingType: assertion
mutability: Mutability::Write|Mutability::Read
interfaces:
org.open_power.OCC.Status:
OccActive:
Offsets:
0x00:
assert: false
deassert: true
type: bool
0x01:
assert: true
deassert: false
type: bool
0x71:
sensorType: 0x07
path: /system/chassis/motherboard/cpu1
sensorReadingType: 0x6F
serviceInterface: xyz.openbmc_project.Inventory.Manager
readingType: assertion
mutability: Mutability::Write|Mutability::Read
interfaces:
xyz.openbmc_project.State.Decorator.OperationalStatus:
Functional:
Prereqs:
0x07:
assert: true
deassert: false
type: bool
Offsets:
0x08:
assert: false
deassert: true
type: bool
xyz.openbmc_project.Inventory.Item:
Present:
Offsets:
0x07:
assert: true
deassert: false
type: bool
0xBA:
sensorType: 0x07
path: /org/open_power/control/occ1
sensorReadingType: 0x09
serviceInterface: org.freedesktop.DBus.Properties
readingType: assertion
mutability: Mutability::Write|Mutability::Read
interfaces:
org.open_power.OCC.Status:
OccActive:
Offsets:
0x00:
assert: false
deassert: true
type: bool
0x01:
assert: true
deassert: false
type: bool
0xFC:
sensorType: 0xCD
path: /system/chassis/pcie_card_e2b
sensorReadingType: 0x03
serviceInterface: xyz.openbmc_project.Inventory.Manager
readingType: assertion
mutability: Mutability::Write|Mutability::Read
interfaces:
xyz.openbmc_project.Inventory.Item:
Present:
Offsets:
0x01:
assert: true
deassert: false
type: bool
0x72: &voltage
sensorType: 0x02
path: /xyz/openbmc_project/sensors/voltage/vr0_p1v2_03_vout
sensorReadingType: 0x01
multiplierM: 8
offsetB: 0
bExp: 0
unit: xyz.openbmc_project.Sensor.Value.Unit.Volts
scale: -3
rExp: -3
serviceInterface: org.freedesktop.DBus.Properties
readingType: readingData
interfaces:
xyz.openbmc_project.Sensor.Value:
Value:
Offsets:
0xFF:
type: double
0x73: &current
sensorType: 0x03
path: /xyz/openbmc_project/sensors/current/vr0_p1v2_03_iout
sensorReadingType: 0x01
multiplierM: 200
offsetB: 0
bExp: 0
unit: xyz.openbmc_project.Sensor.Value.Unit.Amperes
scale: -3
rExp: -3
serviceInterface: org.freedesktop.DBus.Properties
readingType: readingData
interfaces:
xyz.openbmc_project.Sensor.Value:
Value:
Offsets:
0xFF:
type: double
0x74: &power
sensorType: 0x08
path: /xyz/openbmc_project/sensors/power/vr0_p1v2_03_pout
sensorReadingType: 0x01
multiplierM: 100
offsetB: 0
bExp: 0
unit: xyz.openbmc_project.Sensor.Value.Unit.Watts
scale: -6
rExp: -2
serviceInterface: org.freedesktop.DBus.Properties
readingType: readingData
interfaces:
xyz.openbmc_project.Sensor.Value:
Value:
Offsets:
0xFF:
type: double
0x75: &temperature
sensorType: 0x01
path: /xyz/openbmc_project/sensors/temperature/vr0_p1v2_03
sensorReadingType: 0x01
multiplierM: 235
offsetB: 0
bExp: 0
unit: xyz.openbmc_project.Sensor.Value.Unit.DegreesC
scale: -3
rExp: -3
serviceInterface: org.freedesktop.DBus.Properties
readingType: readingData
interfaces:
xyz.openbmc_project.Sensor.Value:
Value:
Offsets:
0xFF:
type: double
0x76:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/vr0_p1v2_47_vout
0x77:
<<: *current
path: /xyz/openbmc_project/sensors/current/vr0_p1v2_47_iout
0x78:
<<: *power
path: /xyz/openbmc_project/sensors/power/vr0_p1v2_47_pout
0x79:
<<: *temperature
path: /xyz/openbmc_project/sensors/temperature/vr0_p1v2_47
0x7a:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/vr0_vio_vout
0x7b:
<<: *current
path: /xyz/openbmc_project/sensors/current/vr0_vio_iout
0x7c:
<<: *power
path: /xyz/openbmc_project/sensors/power/vr0_vio_pout
0x7d:
<<: *temperature
path: /xyz/openbmc_project/sensors/temperature/vr0_vio
0x7e:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/vr0_vdd_vout
0x7f:
<<: *current
path: /xyz/openbmc_project/sensors/current/vr0_vdd_iout
0x80:
<<: *power
path: /xyz/openbmc_project/sensors/power/vr0_vdd_pout
0x81:
<<: *temperature
path: /xyz/openbmc_project/sensors/temperature/vr0_vdd
0x82:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/vr0_vcs_vout
0x83:
<<: *current
path: /xyz/openbmc_project/sensors/current/vr0_vcs_iout
0x84:
<<: *power
path: /xyz/openbmc_project/sensors/power/vr0_vcs_pout
0x85:
<<: *temperature
path: /xyz/openbmc_project/sensors/temperature/vr0_vdncvs
0x86:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/vr0_vdn_vout
0x87:
<<: *current
path: /xyz/openbmc_project/sensors/current/vr0_vdn_iout
0x88:
<<: *power
path: /xyz/openbmc_project/sensors/power/vr0_vdn_pout
0x89:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/vr1_p1v2_03_vout
0x8a:
<<: *current
path: /xyz/openbmc_project/sensors/current/vr1_p1v2_03_iout
0x8b:
<<: *power
path: /xyz/openbmc_project/sensors/power/vr1_p1v2_03_pout
0x8c:
<<: *temperature
path: /xyz/openbmc_project/sensors/temperature/vr1_p1v2_03
0x8d:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/vr1_p1v2_47_vout
0x8e:
<<: *current
path: /xyz/openbmc_project/sensors/current/vr1_p1v2_47_iout
0x8f:
<<: *power
path: /xyz/openbmc_project/sensors/power/vr1_p1v2_47_pout
0x90:
<<: *temperature
path: /xyz/openbmc_project/sensors/temperature/vr1_p1v2_47
0x91:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/vr1_vio_vout
0x92:
<<: *current
path: /xyz/openbmc_project/sensors/current/vr1_vio_iout
0x93:
<<: *power
path: /xyz/openbmc_project/sensors/power/vr1_vio_pout
0x94:
<<: *temperature
path: /xyz/openbmc_project/sensors/temperature/vr1_vio
0x95:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/vr1_vdd_vout
0x96:
<<: *current
path: /xyz/openbmc_project/sensors/current/vr1_vdd_iout
0x97:
<<: *power
path: /xyz/openbmc_project/sensors/power/vr1_vdd_pout
0x98:
<<: *temperature
path: /xyz/openbmc_project/sensors/temperature/vr1_vdd
0x99:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/vr1_vcs_vout
0x9a:
<<: *current
path: /xyz/openbmc_project/sensors/current/vr1_vcs_iout
0x9b:
<<: *power
path: /xyz/openbmc_project/sensors/power/vr1_vcs_pout
0x9c:
<<: *temperature
path: /xyz/openbmc_project/sensors/temperature/vr1_vdncvs
0x9d:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/vr1_vdn_vout
0x9e:
<<: *current
path: /xyz/openbmc_project/sensors/current/vr1_vdn_iout
0x9f:
<<: *power
path: /xyz/openbmc_project/sensors/power/vr1_vdn_pout
0xA0:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/p12v
multiplierM: 51
offsetB: 0
bExp: 0
0xA1:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/p5v
multiplierM: 21
offsetB: 0
bExp: 0
0xA2:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/p3v3
multiplierM: 14
offsetB: 0
bExp: 0
0xA3:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/p1v8
multiplierM: 9
offsetB: 0
bExp: 0
0xA4:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/p1v05
multiplierM: 6
offsetB: 0
bExp: 0
0xA5:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/p1v0_sata
multiplierM: 5
offsetB: 0
bExp: 0
0xA6:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/cpu0_vdn
multiplierM: 5
offsetB: 0
bExp: 0
0xA7:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/cpu1_vdn
multiplierM: 5
offsetB: 0
bExp: 0
0xA8:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/p1v5
multiplierM: 7
offsetB: 0
bExp: 0
0xA9:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/cpu0_vio
multiplierM: 5
offsetB: 0
bExp: 0
0xAA:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/cpu1_vio
multiplierM: 5
offsetB: 0
bExp: 0
0xAB:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/cpu0_vdd
multiplierM: 5
offsetB: 0
bExp: 0
0xAC:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/cpu1_vdd
multiplierM: 5
offsetB: 0
bExp: 0
0xAD:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/cpu0_vcs
multiplierM: 5
offsetB: 0
bExp: 0
0xAE:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/cpu1_vcs
multiplierM: 5
offsetB: 0
bExp: 0
0xB0: &fan_tach
sensorType: 0x04
path: /xyz/openbmc_project/sensors/fan_tach/fan0
sensorReadingType: 0x01
multiplierM: 100
offsetB: 0
bExp: 0
unit: xyz.openbmc_project.Sensor.Value.Unit.RPMS
scale: 0
rExp: 0
serviceInterface: org.freedesktop.DBus.Properties
readingType: readingData
interfaces:
xyz.openbmc_project.Sensor.Value:
Value:
Offsets:
0xFF:
type: double
0xB1:
<<: *fan_tach
path: /xyz/openbmc_project/sensors/fan_tach/fan1
0xB2:
<<: *fan_tach
path: /xyz/openbmc_project/sensors/fan_tach/fan2
0xB3:
<<: *fan_tach
path: /xyz/openbmc_project/sensors/fan_tach/fan3
0xB4:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/brick_p12v_vin
multiplierM: 393
offsetB: 0
bExp: 0
0xB5:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/brick_p12v_vout
multiplierM: 212
offsetB: 0
bExp: 0
0xB6:
<<: *current
path: /xyz/openbmc_project/sensors/current/brick_p12v_iout
multiplierM: 393
offsetB: 0
bExp: 0
0xB7:
<<: *temperature
path: /xyz/openbmc_project/sensors/temperature/brick_p12v
multiplierM: 235
offsetB: 0
bExp: 0
0xC0:
sensorType: 0x01
path: /xyz/openbmc_project/sensors/temperature/w1_inlet
sensorReadingType: 0x01
multiplierM: 235
offsetB: 0
bExp: 0
unit: xyz.openbmc_project.Sensor.Value.Unit.DegreesC
scale: -3
rExp: -3
serviceInterface: org.freedesktop.DBus.Properties
readingType: readingData
interfaces:
xyz.openbmc_project.Sensor.Value:
Value:
Offsets:
0xFF:
type: double
0xC1:
<<: *temperature
path: /xyz/openbmc_project/sensors/temperature/w1_exhaust_left
0xC2:
<<: *temperature
path: /xyz/openbmc_project/sensors/temperature/w1_exhaust_right
0xC3:
<<: *temperature
path: /xyz/openbmc_project/sensors/temperature/w1_exhaust_mid
0xC4: &fanpwm
sensorType: 0x04
path: /xyz/openbmc_project/sensors/fan_tach/fan0
sensorReadingType: 0x01
multiplierM: 1
offsetB: 0
bExp: 0
mutability: Mutability::Write
serviceInterface: org.freedesktop.DBus.Properties
readingType: readingData
interfaces:
xyz.openbmc_project.Control.FanPwm:
Target:
Offsets:
0xFF:
type: uint64_t
0xC5:
<<: *fanpwm
path: /xyz/openbmc_project/sensors/fan_tach/fan1
0xC6:
<<: *fanpwm
path: /xyz/openbmc_project/sensors/fan_tach/fan2
0xC7:
<<: *fanpwm
path: /xyz/openbmc_project/sensors/fan_tach/fan3
0xD0:
sensorType: 0x02
path: /xyz/openbmc_project/sensors/voltage/p5v_aux
sensorReadingType: 0x01
multiplierM: 23
offsetB: 0
bExp: 0
unit: xyz.openbmc_project.Sensor.Value.Unit.Volts
scale: -3
rExp: -3
serviceInterface: org.freedesktop.DBus.Properties
readingType: readingData
interfaces:
xyz.openbmc_project.Sensor.Value:
Value:
Offsets:
0xFF:
type: double
0xD1:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/p2v5_aux
multiplierM: 15
offsetB: 0
bExp: 0
0xD2:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/p3v3_aux
multiplierM: 15
offsetB: 0
bExp: 0
0xD3:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/p1v1_aux
multiplierM: 15
offsetB: 0
bExp: 0
0xD4:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/cpu0_vpp1
multiplierM: 15
offsetB: 0
bExp: 0
0xD5:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/cpu0_vpp2
multiplierM: 15
offsetB: 0
bExp: 0
0xD6:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/cpu1_vpp1
multiplierM: 15
offsetB: 0
bExp: 0
0xD7:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/cpu1_vpp2
multiplierM: 15
offsetB: 0
bExp: 0
0xD8:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/cpu0_vddq1
multiplierM: 15
offsetB: 0
bExp: 0
0xD9:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/cpu0_vddq2
multiplierM: 15
offsetB: 0
bExp: 0
0xDA:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/cpu1_vddq1
multiplierM: 15
offsetB: 0
bExp: 0
0xDB:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/cpu1_vddq2
multiplierM: 15
offsetB: 0
bExp: 0
0xDC:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/vbat
multiplierM: 15
offsetB: 0
bExp: 0
0xDD:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/p1v2_aux
multiplierM: 15
offsetB: 0
bExp: 0
0xDE:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/vendor_id
multiplierM: 15
offsetB: 0
bExp: 0
0xDF:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/board_id
multiplierM: 15
offsetB: 0
bExp: 0
0xE1:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/hotswap_vin
multiplierM: 393
offsetB: 0
bExp: 0
0xE2:
<<: *current
path: /xyz/openbmc_project/sensors/current/hotswap_iin
multiplierM: 200
offsetB: 0
bExp: 0
0xE3:
<<: *voltage
path: /xyz/openbmc_project/sensors/voltage/hotswap_vout
multiplierM: 393
offsetB: 0
bExp: 0
0xE4:
<<: *power
path: /xyz/openbmc_project/sensors/power/hotswap_power
multiplierM: 80
offsetB: 0
bExp: 0
rExp: -1
0xE5:
<<: *temperature
path: /xyz/openbmc_project/sensors/temperature/hotswap_temp
multiplierM: 511
offsetB: 20
bExp: 3
@@ -0,0 +1,4 @@
lpc-address = 0x3f8
sirq = 4
local-tty = ttyS0
local-tty-baud = 115200
@@ -0,0 +1 @@
FILESEXTRAPATHS:prepend:zaius := "${THISDIR}/${PN}:"
@@ -0,0 +1,4 @@
INVENTORY=/system/chassis/pcie_card_e2b
DEVPATH=/dev/input/by-path/platform-gpio-keys-event
KEY=39
NAME=pcie_card_e2b
@@ -0,0 +1,13 @@
[Unit]
Description=Phosphor GPIO %I Presence
Wants=mapper-wait@-xyz-openbmc_project-inventory.service
After=mapper-wait@-xyz-openbmc_project-inventory.service
ConditionPathExists={envfiledir}/obmc/gpio/phosphor-pcie-card-e2b.conf
[Service]
EnvironmentFile={envfiledir}/obmc/gpio/phosphor-pcie-card-e2b.conf
ExecStart=/usr/bin/env phosphor-gpio-presence --path=${{DEVPATH}} --inventory=${{INVENTORY}} --key=${{KEY}} --name=${{NAME}}
SyslogIdentifier=phosphor-gpio-presence
[Install]
RequiredBy=multi-user.target
@@ -0,0 +1,11 @@
FILESEXTRAPATHS:append:zaius := "${THISDIR}/${PN}:"
PCIE_CARD_E2B_INSTANCE = "pcie-card-e2b"
TMPL = "phosphor-gpio-presence@.service"
INSTFMT = "phosphor-gpio-presence@{0}.service"
TGT = "multi-user.target"
FMT = "../${TMPL}:${TGT}.requires/${INSTFMT}"
SYSTEMD_LINK:${PN}-presence:append:zaius = " ${@compose_list(d, 'FMT', 'PCIE_CARD_E2B_INSTANCE')}"
SYSTEMD_ENVIRONMENT_FILE:${PN}-presence:append:zaius = " obmc/gpio/phosphor-pcie-card-e2b.conf"
@@ -0,0 +1 @@
FILESEXTRAPATHS:prepend:zaius := "${THISDIR}/${PN}:"
@@ -0,0 +1,4 @@
DEVPATH=/dev/input/by-path/platform-gpio-keys-event
KEY=47
POLARITY=1
TARGET=obmc-host-crash@0.target
@@ -0,0 +1 @@
RDEPENDS:${PN}:append:zaius = ' avsbus-control vcs-control'
@@ -0,0 +1 @@
PACKAGECONFIG:append:zaius = " 7seg"
@@ -0,0 +1 @@
OBMC_IMAGE_EXTRA_INSTALL:append:zaius = " mboxd"
@@ -0,0 +1,4 @@
DEPENDS:append:zaius = " zaius-yaml-config"
IPMI_FRU_YAML:zaius="${STAGING_DIR_HOST}${datadir}/zaius-yaml-config/ipmi-fru-read.yaml"
IPMI_FRU_PROP_YAML:zaius="${STAGING_DIR_HOST}${datadir}/zaius-yaml-config/ipmi-extra-properties.yaml"
@@ -0,0 +1,6 @@
DEPENDS:append:zaius = " zaius-yaml-config"
EXTRA_OEMESON:zaius = " \
-Dsensor-yaml-gen=${STAGING_DIR_HOST}${datadir}/zaius-yaml-config/ipmi-sensors.yaml \
-Dfru-yaml-gen=${STAGING_DIR_HOST}${datadir}/zaius-yaml-config/ipmi-fru-read.yaml \
"
@@ -0,0 +1 @@
MBOXD_FLASH_SIZE = "64M"
@@ -0,0 +1,3 @@
# Support OCC pass through and general occ control
# Support for GPIO presence service
RDEPENDS:${PN}-inventory:append:zaius = " openpower-occ-control phosphor-gpio-monitor-presence"
@@ -0,0 +1,7 @@
LABEL_curr1=hotswap_iin
GAIN_curr1=2.0
LABEL_in1=hotswap_vin
LABEL_in3=hotswap_vout
LABEL_power1=hotswap_power
GAIN_power1=2.0
LABEL_temp1=hotswap_temp
@@ -0,0 +1,5 @@
LABEL_curr1=brick_p12v_iout
LABEL_in1=brick_p12v_vin
LABEL_in2=brick_p12v_vout
LABEL_temp1=brick_p12v
INTERVAL=86400000000
@@ -0,0 +1,5 @@
LABEL_curr1=brick_p12v_iout
LABEL_in1=brick_p12v_vin
LABEL_in2=brick_p12v_vout
LABEL_temp1=brick_p12v
INTERVAL=86400000000
@@ -0,0 +1,8 @@
LABEL_curr1=vr0_p1v2_03_iin
LABEL_curr3=vr0_p1v2_03_iout
LABEL_in1=vr0_p1v2_03_vin
LABEL_in3=vr0_p1v2_03_vout
LABEL_power1=vr0_p1v2_03_pin
LABEL_power3=vr0_p1v2_03_pout
LABEL_temp3=vr0_p1v2_03
INTERVAL=86400000000
@@ -0,0 +1,8 @@
LABEL_curr1=vr0_p1v2_47_iin
LABEL_curr3=vr0_p1v2_47_iout
LABEL_in1=vr0_p1v2_47_vin
LABEL_in3=vr0_p1v2_47_vout
LABEL_power1=vr0_p1v2_47_pin
LABEL_power3=vr0_p1v2_47_pout
LABEL_temp3=vr0_p1v2_47
INTERVAL=86400000000
@@ -0,0 +1,6 @@
LABEL_curr1=vr0_vio_iout
LABEL_in1=vr0_vio_vin
LABEL_in2=vr0_vio_vout
LABEL_power1=vr0_vio_pout
LABEL_temp1=vr0_vio
INTERVAL=86400000000
@@ -0,0 +1,8 @@
LABEL_curr1=vr0_vdd_iin
LABEL_curr3=vr0_vdd_iout
LABEL_in1=vr0_vdd_vin
LABEL_in3=vr0_vdd_vout
LABEL_power1=vr0_vdd_pin
LABEL_power3=vr0_vdd_pout
LABEL_temp3=vr0_vdd
INTERVAL=86400000000
@@ -0,0 +1,11 @@
LABEL_curr1=vr0_vdnvcs_iin
LABEL_curr2=vr0_vcs_iout
LABEL_curr3=vr0_vdn_iout
LABEL_in1=vr0_vdnvcs_vin
LABEL_in2=vr0_vcs_vout
LABEL_in3=vr0_vdn_vout
LABEL_power1=vr0_vdnvcs_pin
LABEL_power2=vr0_vcs_pout
LABEL_power3=vr0_vdn_pout
LABEL_temp3=vr0_vdncvs
INTERVAL=86400000000
@@ -0,0 +1,8 @@
LABEL_curr1=vr1_p1v2_03_iin
LABEL_curr3=vr1_p1v2_03_iout
LABEL_in1=vr1_p1v2_03_vin
LABEL_in3=vr1_p1v2_03_vout
LABEL_power1=vr1_p1v2_03_pin
LABEL_power3=vr1_p1v2_03_pout
LABEL_temp3=vr1_p1v2_03
INTERVAL=86400000000
@@ -0,0 +1,8 @@
LABEL_curr1=vr1_p1v2_47_iin
LABEL_curr3=vr1_p1v2_47_iout
LABEL_in1=vr1_p1v2_47_vin
LABEL_in3=vr1_p1v2_47_vout
LABEL_power1=vr1_p1v2_47_pin
LABEL_power3=vr1_p1v2_47_pout
LABEL_temp3=vr1_p1v2_47
INTERVAL=86400000000
@@ -0,0 +1,6 @@
LABEL_curr1=vr1_vio_iout
LABEL_in1=vr1_vio_vin
LABEL_in2=vr1_vio_vout
LABEL_power1=vr1_vio_pout
LABEL_temp1=vr1_vio
INTERVAL=86400000000
@@ -0,0 +1,8 @@
LABEL_curr1=vr1_vdd_iin
LABEL_curr3=vr1_vdd_iout
LABEL_in1=vr1_vdd_vin
LABEL_in3=vr1_vdd_vout
LABEL_power1=vr1_vdd_pin
LABEL_power3=vr1_vdd_pout
LABEL_temp3=vr1_vdd
INTERVAL=86400000000
@@ -0,0 +1,11 @@
LABEL_curr1=vr1_vdnvcs_iin
LABEL_curr2=vr1_vcs_iout
LABEL_curr3=vr1_vdn_iout
LABEL_in1=vr1_vdnvcs_vin
LABEL_in2=vr1_vcs_vout
LABEL_in3=vr1_vdn_vout
LABEL_power1=vr1_vdnvcs_pin
LABEL_power2=vr1_vcs_pout
LABEL_power3=vr1_vdn_pout
LABEL_temp3=vr1_vdncvs
INTERVAL=86400000000
@@ -0,0 +1,15 @@
LABEL_in1=p12v
LABEL_in2=p5v
LABEL_in3=p3v3
LABEL_in4=p1v8
LABEL_in5=p1v05
LABEL_in6=p1v0_sata
LABEL_in7=cpu0_vdn
LABEL_in8=cpu1_vdn
LABEL_in9=p1v5
LABEL_in10=cpu0_vio
LABEL_in11=cpu1_vio
LABEL_in12=cpu0_vdd
LABEL_in13=cpu1_vdd
LABEL_in14=cpu0_vcs
LABEL_in15=cpu1_vcs
@@ -0,0 +1,4 @@
LABEL_fan1=fan0
LABEL_fan2=fan1
LABEL_fan3=fan2
LABEL_fan4=fan3
@@ -0,0 +1,84 @@
REMOVERCS = "11, 74, 90, 110"
MODE_temp1 = "label"
MODE_temp2 = "label"
MODE_temp3 = "label"
MODE_temp4 = "label"
MODE_temp5 = "label"
MODE_temp6 = "label"
MODE_temp7 = "label"
MODE_temp8 = "label"
MODE_temp9 = "label"
MODE_temp10 = "label"
MODE_temp11 = "label"
MODE_temp12 = "label"
MODE_temp13 = "label"
MODE_temp14 = "label"
MODE_temp15 = "label"
MODE_temp16 = "label"
MODE_temp17 = "label"
MODE_temp18 = "label"
MODE_temp19 = "label"
MODE_temp20 = "label"
MODE_temp21 = "label"
MODE_temp22 = "label"
MODE_temp23 = "label"
MODE_temp24 = "label"
MODE_temp25 = "label"
MODE_temp26 = "label"
MODE_temp27 = "label"
MODE_temp28 = "label"
MODE_temp29 = "label"
MODE_temp30 = "label"
MODE_temp31 = "label"
MODE_temp32 = "label"
MODE_temp33 = "label"
MODE_temp34 = "label"
MODE_temp35 = "label"
MODE_temp36 = "label"
MODE_temp37 = "label"
MODE_temp38 = "label"
MODE_temp39 = "label"
MODE_temp40 = "label"
LABEL_temp34 = "p0_core0_temp"
LABEL_temp37 = "p0_core1_temp"
LABEL_temp40 = "p0_core2_temp"
LABEL_temp43 = "p0_core3_temp"
LABEL_temp46 = "p0_core4_temp"
LABEL_temp49 = "p0_core5_temp"
LABEL_temp52 = "p0_core6_temp"
LABEL_temp55 = "p0_core7_temp"
LABEL_temp58 = "p0_core8_temp"
LABEL_temp61 = "p0_core9_temp"
LABEL_temp64 = "p0_core10_temp"
LABEL_temp67 = "p0_core11_temp"
LABEL_temp70 = "p0_core12_temp"
LABEL_temp73 = "p0_core13_temp"
LABEL_temp76 = "p0_core14_temp"
LABEL_temp79 = "p0_core15_temp"
LABEL_temp82 = "p0_core16_temp"
LABEL_temp85 = "p0_core17_temp"
LABEL_temp88 = "p0_core18_temp"
LABEL_temp91 = "p0_core19_temp"
LABEL_temp94 = "p0_core20_temp"
LABEL_temp97 = "p0_core21_temp"
LABEL_temp100 = "p0_core22_temp"
LABEL_temp103 = "p0_core23_temp"
LABEL_temp224 = "dimm0_temp"
LABEL_temp226 = "dimm1_temp"
LABEL_temp228 = "dimm2_temp"
LABEL_temp230 = "dimm3_temp"
LABEL_temp232 = "dimm4_temp"
LABEL_temp234 = "dimm5_temp"
LABEL_temp236 = "dimm6_temp"
LABEL_temp238 = "dimm7_temp"
LABEL_temp240 = "dimm8_temp"
LABEL_temp242 = "dimm9_temp"
LABEL_temp244 = "dimm10_temp"
LABEL_temp246 = "dimm11_temp"
LABEL_temp248 = "dimm12_temp"
LABEL_temp250 = "dimm13_temp"
LABEL_temp252 = "dimm14_temp"
LABEL_temp254 = "dimm15_temp"
LABEL_power2 = "p0_power"
LABEL_power3 = "p0_vdd_power"
LABEL_power4 = "p0_vdn_power"
@@ -0,0 +1,84 @@
REMOVERCS = "11, 74, 90, 110"
MODE_temp1 = "label"
MODE_temp2 = "label"
MODE_temp3 = "label"
MODE_temp4 = "label"
MODE_temp5 = "label"
MODE_temp6 = "label"
MODE_temp7 = "label"
MODE_temp8 = "label"
MODE_temp9 = "label"
MODE_temp10 = "label"
MODE_temp11 = "label"
MODE_temp12 = "label"
MODE_temp13 = "label"
MODE_temp14 = "label"
MODE_temp15 = "label"
MODE_temp16 = "label"
MODE_temp17 = "label"
MODE_temp18 = "label"
MODE_temp19 = "label"
MODE_temp20 = "label"
MODE_temp21 = "label"
MODE_temp22 = "label"
MODE_temp23 = "label"
MODE_temp24 = "label"
MODE_temp25 = "label"
MODE_temp26 = "label"
MODE_temp27 = "label"
MODE_temp28 = "label"
MODE_temp29 = "label"
MODE_temp30 = "label"
MODE_temp31 = "label"
MODE_temp32 = "label"
MODE_temp33 = "label"
MODE_temp34 = "label"
MODE_temp35 = "label"
MODE_temp36 = "label"
MODE_temp37 = "label"
MODE_temp38 = "label"
MODE_temp39 = "label"
MODE_temp40 = "label"
LABEL_temp114 = "p1_core0_temp"
LABEL_temp117 = "p1_core1_temp"
LABEL_temp120 = "p1_core2_temp"
LABEL_temp123 = "p1_core3_temp"
LABEL_temp126 = "p1_core4_temp"
LABEL_temp129 = "p1_core5_temp"
LABEL_temp132 = "p1_core6_temp"
LABEL_temp135 = "p1_core7_temp"
LABEL_temp138 = "p1_core8_temp"
LABEL_temp141 = "p1_core9_temp"
LABEL_temp144 = "p1_core10_temp"
LABEL_temp147 = "p1_core11_temp"
LABEL_temp150 = "p1_core12_temp"
LABEL_temp153 = "p1_core13_temp"
LABEL_temp156 = "p1_core14_temp"
LABEL_temp159 = "p1_core15_temp"
LABEL_temp162 = "p1_core16_temp"
LABEL_temp165 = "p1_core17_temp"
LABEL_temp168 = "p1_core18_temp"
LABEL_temp171 = "p1_core19_temp"
LABEL_temp174 = "p1_core20_temp"
LABEL_temp177 = "p1_core21_temp"
LABEL_temp180 = "p1_core22_temp"
LABEL_temp183 = "p1_core23_temp"
LABEL_temp192 = "dimm16_temp"
LABEL_temp194 = "dimm17_temp"
LABEL_temp196 = "dimm18_temp"
LABEL_temp198 = "dimm19_temp"
LABEL_temp200 = "dimm20_temp"
LABEL_temp202 = "dimm21_temp"
LABEL_temp204 = "dimm22_temp"
LABEL_temp206 = "dimm23_temp"
LABEL_temp208 = "dimm24_temp"
LABEL_temp210 = "dimm25_temp"
LABEL_temp212 = "dimm26_temp"
LABEL_temp224 = "dimm27_temp"
LABEL_temp216 = "dimm28_temp"
LABEL_temp218 = "dimm29_temp"
LABEL_temp220 = "dimm30_temp"
LABEL_temp222 = "dimm31_temp"
LABEL_power2 = "p1_power"
LABEL_power3 = "p1_vdd_power"
LABEL_power4 = "p1_vdn_power"
@@ -0,0 +1,7 @@
LABEL_in1=vbat
GAIN_in1=2.30
# The battery read is controlled by P2
GPIOCHIP_in1=0
GPIO_in1=122
# Sleep in microseconds (stored into a uint64_t)
INTERVAL=86400000000
@@ -0,0 +1,24 @@
LABEL_in1=p5v_aux
GAIN_in1=4.30
LABEL_in2=p2v5_aux
GAIN_in2=2.00
LABEL_in3=p3v3_aux
GAIN_in3=2.47
LABEL_in4=p1v1_aux
LABEL_in5=cpu0_vpp1
GAIN_in5=2.00
LABEL_in6=cpu0_vpp2
GAIN_in6=2.00
LABEL_in7=cpu1_vpp1
GAIN_in7=2.00
LABEL_in8=cpu1_vpp2
GAIN_in8=2.00
LABEL_in9=cpu0_vddq1
LABEL_in10=cpu0_vddq2
LABEL_in11=cpu1_vddq1
LABEL_in12=cpu1_vddq2
LABEL_in13=p1v2_aux
LABEL_in14=vendor_id
LABEL_in15=board_id
# Sleep in microseconds (stored into a uint64_t)
INTERVAL=86400000000
@@ -0,0 +1 @@
LABEL_temp1=w1_inlet
@@ -0,0 +1 @@
LABEL_temp1=w1_exhaust_left
@@ -0,0 +1 @@
LABEL_temp1=w1_exhaust_right
@@ -0,0 +1 @@
LABEL_temp1=w1_exhaust_mid
@@ -0,0 +1,37 @@
FILESEXTRAPATHS:prepend:zaius := "${THISDIR}/${PN}:"
ZAIUS_CHIPS = "bus@1e78a000/i2c-bus@40/ucd90160@64"
ZAIUS_CHIPS += " bus@1e78a000/i2c-bus@300/pca9541a@70/i2c-arb/hotswap@54"
ZAIUS_CHIPS += " pwm-tacho-controller@1e786000"
ZAIUS_CHIPS += " bus@1e78a000/i2c-bus@300/power-brick@30"
ZAIUS_CHIPS += " bus@1e78a000/i2c-bus@300/power-brick@6a"
ZAIUS_CHIPS += " bus@1e78a000/i2c-bus@300/vrm@40"
ZAIUS_CHIPS += " bus@1e78a000/i2c-bus@300/vrm@41"
ZAIUS_CHIPS += " bus@1e78a000/i2c-bus@300/vrm@43"
ZAIUS_CHIPS += " bus@1e78a000/i2c-bus@300/vrm@60"
ZAIUS_CHIPS += " bus@1e78a000/i2c-bus@300/vrm@64"
ZAIUS_CHIPS += " bus@1e78a000/i2c-bus@340/vrm@40"
ZAIUS_CHIPS += " bus@1e78a000/i2c-bus@340/vrm@41"
ZAIUS_CHIPS += " bus@1e78a000/i2c-bus@340/vrm@42"
ZAIUS_CHIPS += " bus@1e78a000/i2c-bus@340/vrm@60"
ZAIUS_CHIPS += " bus@1e78a000/i2c-bus@340/vrm@64"
ZAIUS_ITEMSFMT = "ahb/apb/{0}.conf"
ZAIUS_ITEMS = "${@compose_list(d, 'ZAIUS_ITEMSFMT', 'ZAIUS_CHIPS')}"
ZAIUS_ITEMS += "iio-hwmon.conf iio-hwmon-battery.conf"
ZAIUS_ITEMS += " onewire0.conf"
ZAIUS_ITEMS += " onewire1.conf"
ZAIUS_ITEMS += " onewire2.conf"
ZAIUS_ITEMS += " onewire3.conf"
ZAIUS_OCCS = " \
00--00--00--06/sbefifo1-dev0/occ-hwmon.1 \
00--00--00--0a/fsi1/slave@01--00/01--01--00--06/sbefifo2-dev0/occ-hwmon.2 \
"
ZAIUS_OCCSFMT = "devices/platform/gpio-fsi/fsi0/slave@00--00/{0}.conf"
ZAIUS_OCCITEMS = "${@compose_list(d, 'ZAIUS_OCCSFMT', 'ZAIUS_OCCS')}"
ENVS = "obmc/hwmon/{0}"
# compose_list is not defined immediately so don't use :=
SYSTEMD_ENVIRONMENT_FILE:${PN}:append:zaius = " ${@compose_list(d, 'ENVS', 'ZAIUS_ITEMS')}"
SYSTEMD_ENVIRONMENT_FILE:${PN}:append:zaius = " ${@compose_list(d, 'ENVS', 'ZAIUS_OCCITEMS')}"
@@ -0,0 +1,6 @@
---
/xyz/openbmc_project/control/host0/power_restore_policy:
- Interface: xyz.openbmc_project.Control.Power.RestorePolicy
Properties:
PowerRestorePolicy:
Default: RestorePolicy::Policy::AlwaysOn
@@ -0,0 +1,2 @@
FILESEXTRAPATHS:append:zaius := ":${THISDIR}/${PN}"
SRC_URI:append:zaius = " file://powerpolicy-default-ALWAYS_POWER_ON.override.yml"
@@ -0,0 +1,78 @@
{
"gpio_configs": {
"power_config": {
"power_good_in": "SYS_PWROK_BUFF",
"latch_out": "BMC_UCD_LATCH_LE",
"power_up_outs": [
{ "name": "SOFTWARE_PGOOD", "polarity": true},
{ "name": "BMC_POWER_UP", "polarity": true}
],
"reset_outs": [
]
}
},
"gpio_definitions": [
{
"name": "SOFTWARE_PGOOD",
"pin": "R1",
"direction": "out"
},
{
"name": "BMC_POWER_UP",
"pin": "D1",
"direction": "out"
},
{
"name": "SYS_PWROK_BUFF",
"pin": "D2",
"direction": "in"
},
{
"name": "PHY_RST_N",
"pin": "D3",
"direction": "out"
},
{
"name": "HDD_PWR_EN",
"pin": "D4",
"direction": "out"
},
{
"name": "CP0_DEVICES_RESET_N",
"pin": "A1",
"direction": "out"
},
{
"name": "BMC_CP0_PERST_ENABLE",
"pin": "A3",
"direction": "out"
},
{
"name": "BMC_UCD_LATCH_LE",
"pin": "B4",
"direction": "out"
},
{
"name": "POWER_BUTTON",
"pin": "I3",
"direction": "both"
},
{
"name": "RESET_BUTTON",
"pin": "AA0",
"direction": "both"
},
{
"name": "PE_MEZZB_PRSNT_N",
"pin": "P7",
"direction": "in"
},
{
"name": "CHECKSTOP",
"pin": "F7",
"direction": "falling"
}
]
}
@@ -0,0 +1 @@
FILESEXTRAPATHS:prepend:zaius := "${THISDIR}/${PN}:"
+1
View File
@@ -0,0 +1 @@
recipes-phosphor - Phosphor OpenBMC applications and configuration