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
+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 += "nicole-layer"
BBFILE_PATTERN_nicole-layer := "^${LAYERDIR}/"
LAYERSERIES_COMPAT_nicole-layer = "langdale mickledore"
@@ -0,0 +1,19 @@
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"
require conf/machine/include/ast2500.inc
require conf/machine/include/obmc-bsp-common.inc
require conf/machine/include/openpower.inc
require conf/machine/include/p9.inc
IMAGE_FEATURES:remove = " obmc-fan-control obmc-fan-mgmt"
PREFERRED_PROVIDER_virtual/openpower-fru-vpd-layout = "nicole-openpower-fru-vpd-layout-native"
PREFERRED_PROVIDER_virtual/openpower-fru-inventory = "nicole-openpower-fru-inventory-native"
PREFERRED_PROVIDER_virtual/openpower-fru-properties = "nicole-openpower-fru-properties-native"
PREFERRED_PROVIDER_virtual/phosphor-led-manager-config-native = "nicole-led-manager-config-native"
@@ -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-yadro \
##OEROOT##/meta-yadro/meta-nicole \
"
@@ -0,0 +1,2 @@
Common targets are:
obmc-phosphor-image
@@ -0,0 +1,264 @@
#
# This file is your local configuration file and is where all local user settings
# are placed. The comments in this file give some guide to the options a new user
# to the system might want to change but pretty much any configuration option can
# be set in this file. More adventurous users can look at local.conf.extended
# which contains other examples of configuration which can be placed in this file
# but new users likely won't need any of them initially.
#
# Lines starting with the '#' character are commented out and in some cases the
# default values are provided as comments to show people example syntax. Enabling
# the option is a question of removing the # character and making any change to the
# variable as required.
#
# Machine Selection
#
MACHINE ??= "nicole"
#
# Where to place downloads
#
# During a first build the system will download many different source code tarballs
# from various upstream projects. This can take a while, particularly if your network
# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you
# can preserve this directory to speed up this part of subsequent builds. This directory
# is safe to share between multiple builds on the same machine too.
#
# The default is a downloads directory under TOPDIR which is the build directory.
#
#DL_DIR ?= "${TOPDIR}/downloads"
#
# Where to place shared-state files
#
# BitBake has the capability to accelerate builds based on previously built output.
# This is done using "shared state" files which can be thought of as cache objects
# and this option determines where those files are placed.
#
# You can wipe out TMPDIR leaving this directory intact and the build would regenerate
# from these files if no changes were made to the configuration. If changes were made
# to the configuration, only shared state files where the state was still valid would
# be used (done using checksums).
#
# The default is a sstate-cache directory under TOPDIR.
#
#SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
#
# Where to place the build output
#
# This option specifies where the bulk of the building work should be done and
# where BitBake should place its temporary files and output. Keep in mind that
# this includes the extraction and compilation of many applications and the toolchain
# which can use Gigabytes of hard disk space.
#
# The default is a tmp directory under TOPDIR.
#
#TMPDIR = "${TOPDIR}/tmp"
#
# Default policy config
#
# The distribution setting controls which policy settings are used as defaults.
# The default value is fine for general Yocto project use, at least initially.
# Ultimately when creating custom policy, people will likely end up subclassing
# these defaults.
#
DISTRO ?= "openbmc-openpower"
# As an example of a subclass there is a "bleeding" edge policy configuration
# where many versions are set to the absolute latest code from the upstream
# source control systems. This is just mentioned here as an example, its not
# useful to most new users.
# DISTRO ?= "poky-bleeding"
#
# Package Management configuration
#
# This variable lists which packaging formats to enable. Multiple package backends
# can be enabled at once and the first item listed in the variable will be used
# to generate the root filesystems.
# Options are:
# - 'package_deb' for debian style deb files
# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager)
# - 'package_rpm' for rpm style packages
# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk"
# We default to ipk:
PACKAGE_CLASSES ?= "package_ipk"
#
# SDK target architecture
#
# This variable specifies the architecture to build SDK items for and means
# you can build the SDK packages for architectures other than the machine you are
# running the build on (i.e. building i686 packages on an x86_64 host).
# Supported values are i686, x86_64, aarch64
#SDKMACHINE ?= "i686"
SANITY_TESTED_DISTROS:append ?= " *"
#
# Extra image configuration defaults
#
# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated
# images. Some of these options are added to certain image types automatically. The
# variable can contain the following options:
# "dbg-pkgs" - add -dbg packages for all installed packages
# (adds symbol information for debugging/profiling)
# "src-pkgs" - add -src packages for all installed packages
# (adds source code for debugging)
# "dev-pkgs" - add -dev packages for all installed packages
# (useful if you want to develop against libs in the image)
# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages
# (useful if you want to run the package test suites)
# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.)
# "tools-debug" - add debugging tools (gdb, strace)
# "eclipse-debug" - add Eclipse remote debugging support
# "tools-profile" - add profiling tools (oprofile, lttng, valgrind)
# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.)
# "debug-tweaks" - make an image suitable for development
# e.g. ssh root access has a blank password
# There are other application targets that can be used here too, see
# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details.
# We default to enabling the debugging tweaks.
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
#
# Additional image features
#
# The following is a list of additional classes to use when building images which
# enable extra features. Some available options which can be included in this variable
# are:
# - 'buildstats' collect build statistics
USER_CLASSES ?= "buildstats"
#
# Runtime testing of images
#
# The build system can test booting virtual machine images under qemu (an emulator)
# after any root filesystems are created and run tests against those images. It can also
# run tests against any SDK that are built. To enable this uncomment these lines.
# See classes/test{image,sdk}.bbclass for further details.
#IMAGE_CLASSES += "testimage testsdk"
#TESTIMAGE_AUTO_qemuall = "1"
#
# Interactive shell configuration
#
# Under certain circumstances the system may need input from you and to do this it
# can launch an interactive shell. It needs to do this since the build is
# multithreaded and needs to be able to handle the case where more than one parallel
# process may require the user's attention. The default is iterate over the available
# terminal types to find one that works.
#
# Examples of the occasions this may happen are when resolving patches which cannot
# be applied, to use the devshell or the kernel menuconfig
#
# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none
# Note: currently, Konsole support only works for KDE 3.x due to the way
# newer Konsole versions behave
#OE_TERMINAL = "auto"
# By default disable interactive patch resolution (tasks will just fail instead):
PATCHRESOLVE = "noop"
#
# Disk Space Monitoring during the build
#
# Monitor the disk space during the build. If there is less that 1GB of space or less
# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully
# shutdown the build. If there is less than 100MB or 1K inodes, perform a hard abort
# of the build. The reason for this is that running completely out of space can corrupt
# files and damages the build in ways which may not be easily recoverable.
# It's necessary to monitor /tmp, if there is no space left the build will fail
# with very exotic errors.
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"
#
# Shared-state files from other locations
#
# As mentioned above, shared state files are prebuilt cache data objects which can be
# used to accelerate build time. This variable can be used to configure the system
# to search other mirror locations for these objects before it builds the data itself.
#
# This can be a filesystem directory, or a remote url such as http or ftp. These
# would contain the sstate-cache results from previous builds (possibly from other
# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the
# cache locations to check for the shared objects.
# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH
# at the end as shown in the examples below. This will be substituted with the
# correct path within the directory structure.
#SSTATE_MIRRORS ?= "\
#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
#file://.* file:///some/local/dir/sstate/PATH"
#
# Yocto Project SState Mirror
#
# The Yocto Project has prebuilt artefacts available for its releases, you can enable
# use of these by uncommenting the following line. This will mean the build uses
# the network to check for artefacts at the start of builds, which does slow it down
# equally, it will also speed up the builds by not having to build things if they are
# present in the cache. It assumes you can download something faster than you can build it
# which will depend on your network.
#
#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH"
#
# Qemu configuration
#
# By default native qemu will build with a builtin VNC server where graphical output can be
# seen. The line below enables the SDL UI frontend too.
PACKAGECONFIG:append:pn-qemu-system-native = " sdl"
# By default libsdl2-native will be built, if you want to use your host's libSDL instead of
# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below.
#ASSUME_PROVIDED += "libsdl2-native"
# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds
# a handy set of menus for controlling the emulator.
#PACKAGECONFIG:append:pn-qemu-system-native = " gtk+"
#
# Hash Equivalence
#
# Enable support for automatically running a local hash equivalence server and
# instruct bitbake to use a hash equivalence aware signature generator. Hash
# equivalence improves reuse of sstate by detecting when a given sstate
# artifact can be reused as equivalent, even if the current task hash doesn't
# match the one that generated the artifact.
#
# A shared hash equivalent server can be set with "<HOSTNAME>:<PORT>" format
#
#BB_HASHSERVE = "auto"
#BB_SIGNATURE_HANDLER = "OEEquivHash"
#
# Memory Resident Bitbake
#
# Bitbake's server component can stay in memory after the UI for the current command
# has completed. This means subsequent commands can run faster since there is no need
# for bitbake to reload cache files and so on. Number is in seconds, after which the
# server will shut down.
#
#BB_SERVER_TIMEOUT = "60"
# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to
# track the version of this file when it was generated. This can safely be ignored if
# this doesn't mean anything to you.
CONF_VERSION = "2"
# Set the root password to '0penBmc'
# Defaults from meta-phosphor/conf/distro/include/phosphor-defaults.inc
# Add default administrative account (login: admin, password: admin)
DEFAULT_ADMIN_PASSWORD = "'\$6\$Fze0kFe8\$YjEc0mvYcwZvjBtnVWQ4Os4gFMDj.ogBkg2jTSjpOgFQpT33hDitAUheGGJcSZ0PkzRuzOq/xhpJ5bmrFg46R.'"
EXTRA_USERS_PARAMS:append:pn-obmc-phosphor-image = "\
useradd -p ${DEFAULT_ADMIN_PASSWORD} -g users -G priv-admin,ipmi -N admin; \
"
@@ -0,0 +1,210 @@
From 1c5b450a068583f2407767451ef636d0661071da Mon Sep 17 00:00:00 2001
From: Alexander Filippov <a.filippov@yadro.com>
Date: Tue, 7 Apr 2020 16:45:41 +0300
Subject: [PATCH] Add system reset status support
This is backport of patch file from intel-bmc/openbmc repository.
https://github.com/Intel-BMC/openbmc/blob/intel/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0020-Add-system-reset-status-support.patch
Will display the reset reasons in u-boot,
and save the reset reasons into kernel command line,
for applications to query.
Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
---
arch/arm/include/asm/arch-aspeed/ast_scu.h | 2 +-
arch/arm/include/asm/arch-aspeed/platform.h | 2 +
arch/arm/mach-aspeed/Makefile | 1 +
arch/arm/mach-aspeed/ast-late-init.c | 114 ++++++++++++++++++++
arch/arm/mach-aspeed/ast-scu.c | 6 +-
5 files changed, 123 insertions(+), 2 deletions(-)
create mode 100644 arch/arm/mach-aspeed/ast-late-init.c
diff --git a/arch/arm/include/asm/arch-aspeed/ast_scu.h b/arch/arm/include/asm/arch-aspeed/ast_scu.h
index dcbc6730d4..b428f386d6 100644
--- a/arch/arm/include/asm/arch-aspeed/ast_scu.h
+++ b/arch/arm/include/asm/arch-aspeed/ast_scu.h
@@ -29,7 +29,7 @@
#define __AST_SCU_H
extern void ast_scu_show_system_info (void);
-extern void ast_scu_sys_rest_info(void);
+extern u32 ast_scu_sys_rest_info(void);
extern void ast_scu_security_info(void);
extern u32 ast_scu_revision_id(void);
extern u32 ast_scu_get_vga_memsize(void);
diff --git a/arch/arm/include/asm/arch-aspeed/platform.h b/arch/arm/include/asm/arch-aspeed/platform.h
index 1c02914fcb..b9207c492f 100644
--- a/arch/arm/include/asm/arch-aspeed/platform.h
+++ b/arch/arm/include/asm/arch-aspeed/platform.h
@@ -31,4 +31,6 @@
#err "No define for platform.h"
#endif
+#define CONFIG_BOARD_LATE_INIT 1 /* Call board_late_init */
+
#endif
diff --git a/arch/arm/mach-aspeed/Makefile b/arch/arm/mach-aspeed/Makefile
index 7d8930beb9..4af2a7c96a 100644
--- a/arch/arm/mach-aspeed/Makefile
+++ b/arch/arm/mach-aspeed/Makefile
@@ -15,3 +15,4 @@ obj-y += timer.o reset.o cpuinfo.o ast-scu.o ast-ahbc.o ast-sdmc.o
obj-$(CONFIG_AST_SPI_NOR) += flash.o
obj-$(CONFIG_ARCH_AST2500) += platform_g5.o
obj-$(CONFIG_ARCH_AST2400) += platform_g4.o
+obj-$(CONFIG_BOARD_LATE_INIT) += ast-late-init.o
diff --git a/arch/arm/mach-aspeed/ast-late-init.c b/arch/arm/mach-aspeed/ast-late-init.c
new file mode 100644
index 0000000000..5646c0e882
--- /dev/null
+++ b/arch/arm/mach-aspeed/ast-late-init.c
@@ -0,0 +1,114 @@
+/*
+ * SPDX-License-Identifier: Apache-2.0
+ * Copyright (C) 2020 YADRO.
+ */
+
+#include <common.h>
+
+#include <asm/arch/ast_scu.h>
+#include <asm/arch/regs-scu.h>
+#include <malloc.h>
+
+static void update_bootargs_cmd(const char *key, const char *value)
+{
+ int buf_len;
+ char *buf;
+ char *cmdline;
+ char *end = NULL;
+
+ if (!key || (key[0] == '\0'))
+ {
+ printf("%s: Empty key not allowed\n", __func__);
+ return;
+ }
+
+ cmdline = getenv("bootargs");
+
+ /* Allocate space for maximum possible new command line */
+ buf_len = (cmdline ? strlen(cmdline) : 0)
+ + 1 /* spacebar as delimiter */
+ + strlen(key)
+ + (value ? 1 /* equal sign */ + strlen(value) : 0)
+ + 1 /* terminating null */;
+
+ buf = calloc(buf_len, sizeof(char));
+ if (!buf)
+ {
+ printf("%s: out of memory\n", __func__);
+ return;
+ }
+
+ if (cmdline)
+ {
+ char *start = strstr(cmdline, key);
+
+ /* Check for full word match. Match should be start of cmdline
+ * or there should be space before match */
+ if (start && ((start == cmdline) || (*(start - 1) == ' ')))
+ {
+ strncat(buf, cmdline, (start - cmdline));
+
+ /* Find the end of the keyword[=value] pair,
+ * including a single training space character, if any.
+ * Skip the found substring, mark the tail of cmdline.
+ */
+ end = strchr(start, ' ');
+ if (end)
+ {
+ end++;
+ }
+ }
+ else
+ {
+ strcat(buf, cmdline);
+ strcat(buf, " ");
+ }
+ }
+
+ strcat(buf, key);
+ if (value)
+ {
+ strcat(buf, "=");
+ strcat(buf, value);
+ }
+
+ if (end)
+ {
+ strcat(buf, " ");
+ strcat(buf, end);
+ }
+
+ setenv("bootargs", buf);
+ free(buf);
+}
+
+static void set_reset_reason(void)
+{
+ u32 reset_reason = ast_scu_sys_rest_info();
+
+ if (reset_reason & SCU_SYS_EXT_RESET_FLAG)
+ {
+ update_bootargs_cmd("resetreason", "external");
+ }
+ else if (reset_reason & SCU_SYS_WDT_RESET_FLAG)
+ {
+ update_bootargs_cmd("resetreason", "watchdog");
+ }
+ else if (reset_reason & SCU_SYS_PWR_RESET_FLAG)
+ {
+ update_bootargs_cmd("resetreason", "power");
+ }
+ else
+ {
+ char value[32];
+ snprintf(value, sizeof(value) - 1, "0x%x", reset_reason);
+ update_bootargs_cmd("resetreason", value);
+ }
+}
+
+int board_late_init(void)
+{
+ set_reset_reason();
+
+ return 0;
+}
diff --git a/arch/arm/mach-aspeed/ast-scu.c b/arch/arm/mach-aspeed/ast-scu.c
index 12de9b8036..5afd3793e3 100644
--- a/arch/arm/mach-aspeed/ast-scu.c
+++ b/arch/arm/mach-aspeed/ast-scu.c
@@ -482,22 +482,26 @@ void ast_scu_security_info(void)
}
}
-void ast_scu_sys_rest_info(void)
+u32 ast_scu_sys_rest_info(void)
{
u32 rest = ast_scu_read(AST_SCU_SYS_CTRL);
if (rest & SCU_SYS_EXT_RESET_FLAG) {
printf("RST : External\n");
ast_scu_write(SCU_SYS_EXT_RESET_FLAG, AST_SCU_SYS_CTRL);
+ rest = SCU_SYS_EXT_RESET_FLAG;
} else if (rest & SCU_SYS_WDT_RESET_FLAG) {
printf("RST : Watchdog\n");
ast_scu_write(SCU_SYS_WDT_RESET_FLAG, AST_SCU_SYS_CTRL);
+ rest = SCU_SYS_WDT_RESET_FLAG;
} else if (rest & SCU_SYS_PWR_RESET_FLAG) {
printf("RST : Power On\n");
ast_scu_write(SCU_SYS_PWR_RESET_FLAG, AST_SCU_SYS_CTRL);
+ rest = SCU_SYS_PWR_RESET_FLAG;
} else {
printf("RST : CLK en\n");
}
+ return rest;
}
u32 ast_scu_get_vga_memsize(void)
--
2.25.4
@@ -0,0 +1,27 @@
From efc627f4a288ea2e7969407f50fc403bb0264df1 Mon Sep 17 00:00:00 2001
From: Alexander Filippov <a.filippov@yadro.com>
Date: Wed, 23 Oct 2019 15:51:25 +0300
Subject: [PATCH] config/ast-common: set fieldmode to true
Force enables field mode. Our system always in production.
Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
---
include/configs/ast-common.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/configs/ast-common.h b/include/configs/ast-common.h
index a0243083bd..6285fa4037 100644
--- a/include/configs/ast-common.h
+++ b/include/configs/ast-common.h
@@ -117,6 +117,7 @@
#define ASPEED_ENV_SETTINGS \
"verify=yes\0" \
"spi_dma=yes\0" \
+ "fieldmode=true\0" \
""
#endif /* __AST_COMMON_CONFIG_H */
--
2.21.0
@@ -0,0 +1,512 @@
From 9bb68d8820480519e8b331f7a8b866b8718ad7fd Mon Sep 17 00:00:00 2001
From: Alexander Filippov <a.filippov@yadro.com>
Date: Tue, 19 May 2020 18:55:41 +0300
Subject: [PATCH] aspeed: add gpio support
This is an initial support for the parallel GPIO pins directly connected
to the AHB on the Aspeed 2400/2500.
This brings the functions and a shell command to manipulate the GPIO
state. The GPIO value reading and writing work in non interrupt mode
only.
Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
---
arch/arm/include/asm/arch-aspeed/gpio.h | 65 ++++
arch/arm/include/asm/arch-aspeed/platform.h | 1 +
drivers/gpio/Makefile | 2 +
drivers/gpio/aspeed_gpio.c | 386 ++++++++++++++++++++
4 files changed, 454 insertions(+)
create mode 100644 arch/arm/include/asm/arch-aspeed/gpio.h
create mode 100644 drivers/gpio/aspeed_gpio.c
diff --git a/arch/arm/include/asm/arch-aspeed/gpio.h b/arch/arm/include/asm/arch-aspeed/gpio.h
new file mode 100644
index 0000000000..c63987e917
--- /dev/null
+++ b/arch/arm/include/asm/arch-aspeed/gpio.h
@@ -0,0 +1,65 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0+
+ * Copyright (C) 2020 YADRO.
+ */
+#ifndef _ASPEED_GPIO_H
+#define _ASPEED_GPIO_H
+
+#define ASPEED_GPIO_PORT_A 0
+#define ASPEED_GPIO_PORT_B 1
+#define ASPEED_GPIO_PORT_C 2
+#define ASPEED_GPIO_PORT_D 3
+#define ASPEED_GPIO_PORT_E 4
+#define ASPEED_GPIO_PORT_F 5
+#define ASPEED_GPIO_PORT_G 6
+#define ASPEED_GPIO_PORT_H 7
+#define ASPEED_GPIO_PORT_I 8
+#define ASPEED_GPIO_PORT_J 9
+#define ASPEED_GPIO_PORT_K 10
+#define ASPEED_GPIO_PORT_L 11
+#define ASPEED_GPIO_PORT_M 12
+#define ASPEED_GPIO_PORT_N 13
+#define ASPEED_GPIO_PORT_O 14
+#define ASPEED_GPIO_PORT_P 15
+#define ASPEED_GPIO_PORT_Q 16
+#define ASPEED_GPIO_PORT_R 17
+#define ASPEED_GPIO_PORT_S 18
+#define ASPEED_GPIO_PORT_T 19
+#define ASPEED_GPIO_PORT_U 20
+#define ASPEED_GPIO_PORT_V 21
+#define ASPEED_GPIO_PORT_W 22
+#define ASPEED_GPIO_PORT_X 23
+#define ASPEED_GPIO_PORT_Y 24
+#define ASPEED_GPIO_PORT_Z 25
+#define ASPEED_GPIO_PORT_AA 26
+#define ASPEED_GPIO_PORT_AB 27
+#define ASPEED_GPIO_PORT_AC 28
+
+#define ASPEED_GPIO_PORT_SHIFT 3
+#define ASPEED_GPIO_PIN_MASK 0x7
+#define ASPEED_GPIO(port, pin) \
+ ((ASPEED_GPIO_PORT_##port << ASPEED_GPIO_PORT_SHIFT) | \
+ (pin & ASPEED_GPIO_PIN_MASK))
+
+/* Direction values */
+#define ASPEED_GPIO_INPUT 0
+#define ASPEED_GPIO_OUTPUT 1
+
+/* Trigger values */
+#define ASPEED_GPIO_FALLING_EDGE 0
+#define ASPEED_GPIO_RISING_EDGE 1
+#define ASPEED_GPIO_LOW_LEVEL 2
+#define ASPEED_GPIO_HIGH_LEVEL 3
+#define ASPEED_GPIO_DUAL_EDGE 4
+
+/* Debounce values */
+#define ASPEED_GPIO_DEBOUNCE_NONE 0
+#define ASPEED_GPIO_DEBOUNCE_1 1
+#define ASPEED_GPIO_DEBOUNCE_2 2
+#define ASPEED_GPIO_DEBOUNCE_3 3
+
+#define gpio_status() gpio_info()
+
+extern void gpio_info(void);
+
+#endif /* #ifndef _ASPEED_GPIO_H */
diff --git a/arch/arm/include/asm/arch-aspeed/platform.h b/arch/arm/include/asm/arch-aspeed/platform.h
index b9207c492f..0a05a7a7a0 100644
--- a/arch/arm/include/asm/arch-aspeed/platform.h
+++ b/arch/arm/include/asm/arch-aspeed/platform.h
@@ -32,5 +32,6 @@
#endif
#define CONFIG_BOARD_LATE_INIT 1 /* Call board_late_init */
+#define CONFIG_CMD_GPIO 1 /* Enable gpio command in shell */
#endif
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index 792d19186a..5f043e07ce 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -14,6 +14,8 @@ obj-$(CONFIG_DM_GPIO) += gpio-uclass.o
obj-$(CONFIG_DM_PCA953X) += pca953x_gpio.o
obj-$(CONFIG_DM_74X164) += 74x164_gpio.o
+obj-$(CONFIG_ARCH_AST2400) += aspeed_gpio.o
+obj-$(CONFIG_ARCH_AST2500) += aspeed_gpio.o
obj-$(CONFIG_AT91_GPIO) += at91_gpio.o
obj-$(CONFIG_ATMEL_PIO4) += atmel_pio4.o
obj-$(CONFIG_INTEL_ICH6_GPIO) += intel_ich6_gpio.o
diff --git a/drivers/gpio/aspeed_gpio.c b/drivers/gpio/aspeed_gpio.c
new file mode 100644
index 0000000000..dc07f5a520
--- /dev/null
+++ b/drivers/gpio/aspeed_gpio.c
@@ -0,0 +1,386 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0+
+ * Copyright (C) 2020 YADRO.
+ */
+
+#include <common.h>
+
+#include <asm/arch/gpio.h>
+#include <asm/arch/platform.h>
+#include <asm/io.h>
+#include <linux/ctype.h>
+
+typedef struct _ast_gpio_regs
+{
+ uint32_t base; /* data and direction registers */
+ uint32_t intcfg; /* interrupt config */
+ uint32_t debounce; /* debounce config */
+ uint32_t cmdsrc; /* command source config */
+ uint32_t data; /* data read register */
+} ast_gpio_regs_t;
+
+static ast_gpio_regs_t ast_gpio_regs[] = {
+ /* A/B/C/D */
+ {AST_GPIO_BASE + 0x0000, AST_GPIO_BASE + 0x0008, AST_GPIO_BASE + 0x0040,
+ AST_GPIO_BASE + 0x0060, AST_GPIO_BASE + 0x00C0},
+ /* E/F/G/H */
+ {AST_GPIO_BASE + 0x0020, AST_GPIO_BASE + 0x0028, AST_GPIO_BASE + 0x0048,
+ AST_GPIO_BASE + 0x0068, AST_GPIO_BASE + 0x00C4},
+ /* I/J/K/L */
+ {AST_GPIO_BASE + 0x0070, AST_GPIO_BASE + 0x0098, AST_GPIO_BASE + 0x00B0,
+ AST_GPIO_BASE + 0x0090, AST_GPIO_BASE + 0x00C8},
+ /* M/N/O/P */
+ {AST_GPIO_BASE + 0x0078, AST_GPIO_BASE + 0x00E8, AST_GPIO_BASE + 0x0100,
+ AST_GPIO_BASE + 0x00E0, AST_GPIO_BASE + 0x00CC},
+ /* Q/R/S/T */
+ {AST_GPIO_BASE + 0x0080, AST_GPIO_BASE + 0x0118, AST_GPIO_BASE + 0x0130,
+ AST_GPIO_BASE + 0x0110, AST_GPIO_BASE + 0x00D0},
+ /* U/V/W/X */
+ {AST_GPIO_BASE + 0x0088, AST_GPIO_BASE + 0x0148, AST_GPIO_BASE + 0x0160,
+ AST_GPIO_BASE + 0x0140, AST_GPIO_BASE + 0x00D4},
+ /* Y/Z/AA/AB */
+ {AST_GPIO_BASE + 0x01E0, AST_GPIO_BASE + 0x0178, AST_GPIO_BASE + 0x0190,
+ AST_GPIO_BASE + 0x0170, AST_GPIO_BASE + 0x00D8},
+ /* AC */
+ {AST_GPIO_BASE + 0x01E8, AST_GPIO_BASE + 0x01A8, AST_GPIO_BASE + 0x01C0,
+ AST_GPIO_BASE + 0x01A0, AST_GPIO_BASE + 0x00DC},
+};
+
+#define AST_GPIO_PINS_PER_PORT 8
+#define AST_GPIO_PORTS_PER_REGISTER 4
+
+#define AST_GPIO_PORT(gpio) (gpio >> ASPEED_GPIO_PORT_SHIFT)
+#define AST_GPIO_PIN(gpio) (gpio & ASPEED_GPIO_PIN_MASK)
+#define AST_GPIO_SHIFT(gpio) \
+ ((AST_GPIO_PORT(gpio) % AST_GPIO_PORTS_PER_REGISTER) * \
+ AST_GPIO_PINS_PER_PORT + \
+ AST_GPIO_PIN(gpio))
+
+#define AST_GPIO_REG_INDEX(gpio) \
+ (AST_GPIO_PORT(gpio) / AST_GPIO_PORTS_PER_REGISTER)
+
+/**
+ * @return Pointer to corresponding item from ast_gpio_regs table.
+ */
+#define AST_GPIO_REGS(gpio) \
+ ((AST_GPIO_REG_INDEX(gpio) < ARRAY_SIZE(ast_gpio_regs)) \
+ ? (ast_gpio_regs + AST_GPIO_REG_INDEX(gpio)) \
+ : NULL)
+
+/**
+ * @brief Set a corresponding bit in specified register.
+ *
+ * @param val - Required bit value
+ * @param base - Register address
+ * @param shift - Bit index.
+ */
+#define AST_GPIO_WRITE(val, base, shift) \
+ writel(((val) ? readl(base) | (1 << (shift)) \
+ : readl(base) & ~(1 << (shift))), \
+ base)
+
+/**
+ * @brief Get value of corresponging bit from specified register.
+ *
+ * @param base - Register address
+ * @param shift - Bit index
+ *
+ * @return Bit value
+ */
+#define AST_GPIO_READ(base, shift) ((readl(base) >> (shift)) & 1)
+
+#define IS_VALID_GPIO(gpio) \
+ ((gpio) >= ASPEED_GPIO(A, 0) && (gpio) <= ASPEED_GPIO(AC, 7))
+
+#define AST_GPIO_DIRECTION 0x04
+#define AST_GPIO_INT_SENS0 0x04
+#define AST_GPIO_INT_SENS1 0x08
+#define AST_GPIO_INT_SENS2 0x0C
+#define AST_GPIO_INT_STATUS 0x10
+#define AST_GPIO_DEBOUNCE0 0x00
+#define AST_GPIO_DEBOUNCE1 0x04
+#define AST_GPIO_CMD_SRC0 0x00
+#define AST_GPIO_CMD_SRC1 0x04
+
+/**
+ * @brief Set a GPIO direction
+ *
+ * @param gpio GPIO line
+ * @param direction GPIO direction (0 for input or 1 for output)
+ *
+ * @return 0 if ok, -1 on error
+ */
+static int ast_gpio_set_direction(unsigned gpio, unsigned direction)
+{
+ ast_gpio_regs_t *regs = AST_GPIO_REGS(gpio);
+ if (!regs)
+ {
+ printf("%s: Invalid GPIO!\n", __func__);
+ return -1;
+ }
+
+ AST_GPIO_WRITE(direction, regs->base + AST_GPIO_DIRECTION,
+ AST_GPIO_SHIFT(gpio));
+ return 0;
+}
+
+/**
+ * The 6 following functions are generic u-boot gpio implementation.
+ * They are declared in `include/asm-generic/gpio.h`
+ */
+
+int gpio_request(unsigned gpio, const char *label)
+{
+ return (IS_VALID_GPIO(gpio) ? 0 : -1);
+}
+
+int gpio_free(unsigned gpio)
+{
+ return (IS_VALID_GPIO(gpio) ? 0 : -1);
+}
+
+int gpio_get_value(unsigned gpio)
+{
+ ast_gpio_regs_t *regs = AST_GPIO_REGS(gpio);
+ if (!regs)
+ {
+ printf("%s: Invalid GPIO!\n", __func__);
+ return -1;
+ }
+
+ return AST_GPIO_READ(regs->base, AST_GPIO_SHIFT(gpio));
+}
+
+int gpio_set_value(unsigned gpio, int value)
+{
+ ast_gpio_regs_t *regs = AST_GPIO_REGS(gpio);
+ if (!regs)
+ {
+ printf("%s: Invalid GPIO!\n", __func__);
+ return -1;
+ }
+
+ AST_GPIO_WRITE(value, regs->base, AST_GPIO_SHIFT(gpio));
+ return 0;
+}
+
+int gpio_direction_input(unsigned gpio)
+{
+ return ast_gpio_set_direction(gpio, ASPEED_GPIO_INPUT);
+}
+
+int gpio_direction_output(unsigned gpio, int value)
+{
+ int rc = ast_gpio_set_direction(gpio, ASPEED_GPIO_OUTPUT);
+ return (rc == 0 ? gpio_set_value(gpio, value) : rc);
+}
+
+/**
+ * @brief Convert a string to GPIO line. Used by `do_gpio()` from `cmd/gpio.c`
+ *
+ * @param str a GPIO name or line number
+ *
+ * @return GPIO line if ok, -1 on error
+ */
+int name_to_gpio(const char *str)
+{
+ int gpio = -1;
+
+ if (str)
+ {
+ if (isalpha(*str))
+ {
+ gpio = (toupper(*str) - 'A') << ASPEED_GPIO_PORT_SHIFT;
+
+ if (toupper(*str) == 'A' && toupper(*(str + 1)) >= 'A' &&
+ toupper(*(str + 1)) <= 'C')
+ {
+ str++;
+ gpio = (ASPEED_GPIO_PORT_AA + toupper(*str) - 'A')
+ << ASPEED_GPIO_PORT_SHIFT;
+ }
+
+ str++;
+ if (*str >= '0' && *str <= '7' && !*(str + 1))
+ {
+ gpio += *str - '0';
+ }
+ else
+ {
+ gpio = -1;
+ }
+ }
+ else if (isdigit(*str))
+ {
+ gpio = simple_strtoul(str, NULL, 0);
+ }
+ }
+
+ return gpio;
+}
+
+/**
+ * @return A GPIO direction in human readable format.
+ */
+static const char *ast_gpio_direction(unsigned gpio)
+{
+ ast_gpio_regs_t *regs = AST_GPIO_REGS(gpio);
+ if (regs)
+ {
+ int direction = AST_GPIO_READ(regs->base + AST_GPIO_DIRECTION,
+ AST_GPIO_SHIFT(gpio));
+ switch (direction)
+ {
+ case ASPEED_GPIO_INPUT:
+ return "input";
+ case ASPEED_GPIO_OUTPUT:
+ return "output";
+ default:
+ break;
+ }
+ }
+ return "error";
+}
+
+/**
+ * @return An interrupt trigger settings in human readable format.
+ */
+static const char *ast_gpio_trigger(unsigned gpio)
+{
+ ast_gpio_regs_t *regs = AST_GPIO_REGS(gpio);
+ if (regs)
+ {
+ unsigned shift = AST_GPIO_SHIFT(gpio);
+ unsigned trigger =
+ (AST_GPIO_READ(regs->intcfg + AST_GPIO_INT_SENS0, shift) << 0) |
+ (AST_GPIO_READ(regs->intcfg + AST_GPIO_INT_SENS1, shift) << 1) |
+ (AST_GPIO_READ(regs->intcfg + AST_GPIO_INT_SENS2, shift) << 2);
+
+ switch (trigger)
+ {
+ case ASPEED_GPIO_FALLING_EDGE:
+ return "fall";
+ case ASPEED_GPIO_RISING_EDGE:
+ return "rise";
+ case ASPEED_GPIO_LOW_LEVEL:
+ return "low ";
+ case ASPEED_GPIO_HIGH_LEVEL:
+ return "high";
+ default:
+ return "both";
+ }
+ }
+ return "error";
+}
+
+/**
+ * @return An interrupt status in human readable format.
+ */
+static const char *ast_gpio_int_status(unsigned gpio)
+{
+ ast_gpio_regs_t *regs = AST_GPIO_REGS(gpio);
+ if (regs)
+ {
+ unsigned shift = AST_GPIO_SHIFT(gpio);
+ if (AST_GPIO_READ(regs->intcfg, shift))
+ {
+ return AST_GPIO_READ(regs->intcfg + AST_GPIO_INT_STATUS, shift)
+ ? "pending"
+ : "cleaned";
+ }
+ return "disabled";
+ }
+
+ return "error";
+}
+
+/**
+ * @return A debounce value in human readable format.
+ */
+static const char *ast_gpio_debounce(unsigned gpio)
+{
+ ast_gpio_regs_t *regs = AST_GPIO_REGS(gpio);
+ if (regs)
+ {
+ unsigned shift = AST_GPIO_SHIFT(gpio);
+ unsigned debounce =
+ (AST_GPIO_READ(regs->debounce + AST_GPIO_DEBOUNCE0, shift) << 0) |
+ (AST_GPIO_READ(regs->debounce + AST_GPIO_DEBOUNCE1, shift) << 1);
+ switch (debounce)
+ {
+ case ASPEED_GPIO_DEBOUNCE_NONE:
+ return "none";
+ case ASPEED_GPIO_DEBOUNCE_1:
+ return "timer1";
+ case ASPEED_GPIO_DEBOUNCE_2:
+ return "timer2";
+ case ASPEED_GPIO_DEBOUNCE_3:
+ return "timer3";
+ default:
+ break;
+ }
+ }
+
+ return "error";
+}
+
+/**
+ * @return A command source value in human readable format.
+ */
+static const char *ast_gpio_command_source(unsigned gpio)
+{
+ ast_gpio_regs_t *regs = AST_GPIO_REGS(gpio);
+ if (regs)
+ {
+ /* Used one bit per gpio port */
+ unsigned shift = AST_GPIO_SHIFT(gpio) - AST_GPIO_PIN(gpio);
+ unsigned cmdsrc =
+ (AST_GPIO_READ(regs->cmdsrc + AST_GPIO_CMD_SRC0, shift) << 0) |
+ (AST_GPIO_READ(regs->cmdsrc + AST_GPIO_CMD_SRC1, shift) << 1);
+
+ switch (cmdsrc)
+ {
+ /* The single place where these values are used is here. */
+ case 0x0:
+ return "ARM";
+ case 0x1:
+ return "LPC";
+ case 0x2:
+ return "CoCPU";
+ default:
+ return "Unknown";
+ }
+ }
+
+ return "error";
+}
+
+/**
+ * @brief Show all GPIO pins statuses. Used by `do_gpio()` in `cmd/gpio.c`
+ */
+void gpio_info(void)
+{
+ unsigned first = ASPEED_GPIO(A, 0);
+ unsigned last = ASPEED_GPIO(AC, 7);
+ for (unsigned gpio = first; gpio <= last; gpio++)
+ {
+ unsigned port = AST_GPIO_PORT(gpio);
+ unsigned pin = AST_GPIO_PIN(gpio);
+ unsigned shift = AST_GPIO_SHIFT(gpio);
+ ast_gpio_regs_t *regs = AST_GPIO_REGS(gpio);
+ if (!regs)
+ {
+ printf("gpio %u is invalid!\n", gpio);
+ continue;
+ }
+
+ printf("gpio %c%c%c line %3d: %s, int: %s, %s, deb: %s, src: %s, "
+ "val: %d/%d\n",
+ (port >= ASPEED_GPIO_PORT_AA ? 'A' : ' '),
+ ('A' + port % ASPEED_GPIO_PORT_AA), ('0' + pin), gpio,
+ ast_gpio_direction(gpio), ast_gpio_trigger(gpio),
+ ast_gpio_int_status(gpio), ast_gpio_debounce(gpio),
+ ast_gpio_command_source(gpio), gpio_get_value(gpio),
+ AST_GPIO_READ(regs->data, shift));
+ }
+}
--
2.25.4
@@ -0,0 +1,61 @@
From 8098310be5887bd5e80830f105b63ed59dc10421 Mon Sep 17 00:00:00 2001
From: Alexander Filippov <a.filippov@yadro.com>
Date: Fri, 22 May 2020 11:45:31 +0300
Subject: [PATCH] aspeed: add bmc position support
There are two Nicoles in one chassis in the Tatlin hardware.
The position is encoded by a pin, read by an MCU, and then translated
to the BMC via GPIO pin GPIOE1.
This reads the GPIO pin state and put is as a bootargs item.
Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
---
arch/arm/mach-aspeed/ast-late-init.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/arch/arm/mach-aspeed/ast-late-init.c b/arch/arm/mach-aspeed/ast-late-init.c
index 5646c0e882..7d36dc0d8a 100644
--- a/arch/arm/mach-aspeed/ast-late-init.c
+++ b/arch/arm/mach-aspeed/ast-late-init.c
@@ -7,6 +7,7 @@
#include <asm/arch/ast_scu.h>
#include <asm/arch/regs-scu.h>
+#include <asm/gpio.h>
#include <malloc.h>
static void update_bootargs_cmd(const char *key, const char *value)
@@ -106,9 +107,29 @@ static void set_reset_reason(void)
}
}
+static void set_bmc_position(void)
+{
+ unsigned gpio = ASPEED_GPIO(E, 1);
+
+ /* Init GPIO */
+ if (gpio_request(gpio, "bmcposition") == 0 &&
+ gpio_direction_input(gpio) == 0)
+ {
+ int position = gpio_get_value(gpio);
+ if (position >= 0)
+ {
+ printf("BMC Position: %d\n", position);
+ update_bootargs_cmd("bmcposition", position ? "1" : "0");
+ }
+ }
+
+ gpio_free(gpio);
+}
+
int board_late_init(void)
{
set_reset_reason();
+ set_bmc_position();
return 0;
}
--
2.25.4
@@ -0,0 +1,8 @@
FILESEXTRAPATHS:append := "${THISDIR}/files:"
SRC_URI:append = " \
file://0001-Add-system-reset-status-support.patch \
file://0002-config-ast-common-set-fieldmode-to-true.patch \
file://0003-aspeed-add-gpio-support.patch \
file://0004-aspeed-add-bmc-position-support.patch \
"
@@ -0,0 +1 @@
u-boot-aspeed_%.bbappend
@@ -0,0 +1,11 @@
[Match]
Name=eth0
KernelCommandLine=bmcposition=0
[Network]
VLAN=eth0.4004
DHCP=true
LinkLocalAddressing=yes
IPv6AcceptRA=false
Address=10.9.0.1/24
[DHCP]
ClientIdentifier=mac
@@ -0,0 +1,11 @@
[Match]
Name=eth0
KernelCommandLine=bmcposition=1
[Network]
VLAN=eth0.4004
DHCP=true
LinkLocalAddressing=yes
IPv6AcceptRA=false
Address=10.9.0.2/24
[DHCP]
ClientIdentifier=mac
@@ -0,0 +1,8 @@
[Match]
Name=eth0.4004
KernelCommandLine=bmcposition=0
[Network]
LinkLocalAddressing=yes
IPv6AcceptRA=true
DHCP=no
Address=fd59:4144:524f:5441:544c:494e:3:1/122
@@ -0,0 +1,8 @@
[Match]
Name=eth0.4004
KernelCommandLine=bmcposition=1
[Network]
LinkLocalAddressing=yes
IPv6AcceptRA=true
DHCP=no
Address=fd59:4144:524f:5441:544c:494e:3:2/122
@@ -0,0 +1,5 @@
[NetDev]
Name=eth0.4004
Kind=vlan
[VLAN]
Id=4004
@@ -0,0 +1,27 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI:append = " \
file://00-bmc-eth0.4004.0.network \
file://00-bmc-eth0.4004.1.network \
file://00-bmc-eth0.0.network \
file://00-bmc-eth0.1.network \
file://eth0.4004.netdev \
"
do_install:append() {
install -m 0644 \
${WORKDIR}/00-bmc-eth0.4004.0.network \
${WORKDIR}/00-bmc-eth0.4004.1.network \
${WORKDIR}/00-bmc-eth0.0.network \
${WORKDIR}/00-bmc-eth0.1.network \
${WORKDIR}/eth0.4004.netdev \
-D -t ${D}${sysconfdir}/systemd/network
}
FILES:${PN}:append = " \
${sysconfdir}/systemd/network/00-bmc-eth0.4004.0.network \
${sysconfdir}/systemd/network/00-bmc-eth0.4004.1.network \
${sysconfdir}/systemd/network/00-bmc-eth0.0.network \
${sysconfdir}/systemd/network/00-bmc-eth0.1.network \
${sysconfdir}/systemd/network/eth0.4004.netdev \
"
@@ -0,0 +1,131 @@
From b19111bb23044c9312d13e64dd1df2a9565f6b38 Mon Sep 17 00:00:00 2001
From: Artem Senichev <a.senichev@yadro.com>
Date: Wed, 12 Feb 2020 14:05:15 +0300
Subject: [PATCH] Add NCSI channel selector
NCSI channel number is selected depending on GPIO state of a pin
described in the device tree (gpio/nsci_cfg node).
Currently, this pin is controlled via MCU, and its state represents
Nicole's physical position inside a fabric.
Channel selector scheme:
* GPIO pin value is 0: channel 0;
* GPIO pin value is 1: channel 1;
* invalid configuration or error: channel 0.
After changing pin's state it is necessary to reboot the BMC to apply
new channel number.
Signed-off-by: Artem Senichev <a.senichev@yadro.com>
---
net/ncsi/ncsi-rsp.c | 80 ++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 79 insertions(+), 1 deletion(-)
diff --git a/net/ncsi/ncsi-rsp.c b/net/ncsi/ncsi-rsp.c
index d876bd55f356..d211a7e64b14 100644
--- a/net/ncsi/ncsi-rsp.c
+++ b/net/ncsi/ncsi-rsp.c
@@ -9,6 +9,9 @@
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
+#include <linux/of.h>
+#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <net/ncsi.h>
#include <net/net_namespace.h>
@@ -19,6 +22,81 @@
#include "ncsi-pkt.h"
#include "ncsi-netlink.h"
+/* NSCI channel number, used as default in case of errors. */
+#define NCSI_DEFAULT_CHANNEL 0
+
+/* Predicate for gpiochip_find() call. */
+static int device_match(struct gpio_chip* chip, void* data)
+{
+ const struct device_node *node = data;
+ return chip->of_node == node;
+}
+
+/**
+ * ncsi_select_channel() - Get channel number for NCSI.
+ * @dev: Network device.
+ *
+ * NCSI channel number is selected depending on GPIO state of a pin
+ * described in the device tree (gpio/nsci_cfg node).
+ *
+ * Return: channel number.
+ */
+static int ncsi_select_channel(const struct net_device* dev)
+{
+ static int channel_id = -1;
+ struct device_node* node = NULL;
+
+ while (channel_id < 0) {
+ struct gpio_chip* chip;
+ const struct gpio_desc* desc;
+ u32 pin;
+ int rc;
+
+ /* Read NCSI configuration node from device tree */
+ node = of_find_node_by_name(NULL, "ncsi_cfg");
+ if (!node) {
+ netdev_err(dev, "NCSI: Configuration node not found\n");
+ break;
+ }
+
+ /* Read GPIO pin configuration */
+ rc = of_property_read_u32_index(node, "gpios", 0, &pin);
+ if (rc) {
+ netdev_err(dev, "NCSI: GPIO configuration not found\n");
+ break;
+ }
+
+ /* Find GPIO chip */
+ chip = gpiochip_find(node->parent, device_match);
+ if (!chip) {
+ netdev_err(dev, "NCSI: GPIO chip not found\n");
+ break;
+ }
+
+ /* Read GPIO state */
+ desc = gpio_to_desc(chip->base + pin);
+ if (!desc) {
+ netdev_err(dev, "NCSI: Cannot get GPIO descriptor\n");
+ break;
+ }
+ channel_id = gpiod_get_value(desc);
+ if (channel_id < 0) {
+ netdev_err(dev, "NCSI: GPIO read error %d\n", channel_id);
+ }
+ break;
+ }
+
+ if (node) {
+ of_node_put(node);
+ }
+ if (channel_id < 0) {
+ channel_id = NCSI_DEFAULT_CHANNEL;
+ }
+ netdev_info(dev, "NCSI: Set channel %d\n", channel_id);
+
+ return channel_id;
+}
+
static int ncsi_validate_rsp_pkt(struct ncsi_request *nr,
unsigned short payload)
{
@@ -87,7 +165,7 @@ static int ncsi_rsp_handler_cis(struct ncsi_request *nr)
if (ndp->flags & NCSI_DEV_PROBED)
return -ENXIO;
- id = NCSI_CHANNEL_INDEX(rsp->rsp.common.channel);
+ id = ncsi_select_channel(ndp->ndev.dev);
nc = ncsi_add_channel(np, id);
}
--
2.25.0
@@ -0,0 +1,4 @@
FILESEXTRAPATHS:prepend:nicole := "${THISDIR}/${PN}:"
SRC_URI += "file://nicole.cfg \
file://0001-Add-NCSI-channel-selector.patch \
"
@@ -0,0 +1,25 @@
SUMMARY = "Nicole AVSBus control"
PR = "r1"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
inherit obmc-phosphor-systemd
RDEPENDS:${PN} += "i2c-tools"
S = "${WORKDIR}"
SRC_URI += "file://avsbus-control.sh"
do_install() {
install -d ${D}${bindir}
install -m 0755 ${WORKDIR}/avsbus-control.sh \
${D}${bindir}/avsbus-control.sh
}
TMPL= "avsbus-control@.service"
INSTFMT= "avsbus-control@{0}.service"
TGTFMT = "obmc-chassis-poweron@{0}.target"
FMT = "../${TMPL}:${TGTFMT}.requires/${INSTFMT}"
SYSTEMD_SERVICE:${PN} += "${TMPL}"
SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}"
@@ -0,0 +1,31 @@
#!/bin/sh -eu
override_avs_settings()
{
BUS=$1
i2cset -y "${BUS}" 0x44 0x00 0x00 b # VCS
i2cset -y "${BUS}" 0x44 0x24 0x044C w # VOUT_MAX 1100mV
i2cset -y "${BUS}" 0x44 0x40 0x0456 w # VOUT_OV_FAULT_LIMIT 1110mV
i2cset -y "${BUS}" 0x44 0x25 0x0438 w # VOUT_MARGING_HIGH 1080mV
i2cset -y "${BUS}" 0x44 0x26 0x03D4 w # VOUT_MARGING_LOW 980mV
i2cset -y "${BUS}" 0x44 0x44 0x024E w # VOUT_UV_FAULT_LIMIT 590mV
i2cset -y "${BUS}" 0x44 0x2B 0x0258 w # VOUT_MIN 600mV
i2cset -y "${BUS}" 0x44 0x00 0x01 b # VDD
i2cset -y "${BUS}" 0x44 0x24 0x044C w # VOUT_MAX 1100mV
i2cset -y "${BUS}" 0x44 0x40 0x0456 w # VOUT_OV_FAULT_LIMIT 1110mV
i2cset -y "${BUS}" 0x44 0x25 0x041A w # VOUT_MARGING_HIGH 1050mV
i2cset -y "${BUS}" 0x44 0x26 0x03B6 w # VOUT_MARGING_LOW 950mV
i2cset -y "${BUS}" 0x44 0x44 0x024E w # VOUT_UV_FAULT_LIMIT 590mV
i2cset -y "${BUS}" 0x44 0x2B 0x0258 w # VOUT_MIN 600mV
i2cset -y "${BUS}" 0x44 0x00 0xFF b # All pages (VCS & VDD)
i2cset -y "${BUS}" 0x44 0x01 0xB0 b # Enable
i2cset -y "${BUS}" 0x46 0x00 0x01 b # VDN
i2cset -y "${BUS}" 0x46 0x01 0xB0 b # Enable
}
override_avs_settings 4
override_avs_settings 5
@@ -0,0 +1,20 @@
[Unit]
Description=Enable the AVS bus on VRMs
Wants=obmc-host-start-pre@%i.target
Before=obmc-host-start-pre@%i.target
Wants=obmc-power-on@%i.target
After=obmc-power-on@%i.target
Wants=fsi-scan@%i.service
After=fsi-scan@%i.service
Conflicts=obmc-chassis-poweroff@%i.target
ConditionPathExists=!/run/openbmc/chassis@%i-on
[Service]
ExecStart=/usr/bin/avsbus-control.sh
SyslogIdentifier=avsbus-control.sh
Type=oneshot
RemainAfterExit=yes
[Install]
WantedBy=obmc-chassis-poweron@%i.target
@@ -0,0 +1,10 @@
RDEPENDS:${PN}:append = " \
obmc-yadro-backup \
obmc-yadro-lsinventory \
op-proc-control \
openpower-esel-parser \
phosphor-debug-collector \
phosphor-led-manager \
phosphor-objmgr \
phosphor-state-manager \
"
@@ -0,0 +1,35 @@
SUMMARY = "YAML configuration for Nicole"
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://nicole-ipmi-fru.yaml \
file://nicole-ipmi-fru-properties.yaml \
file://nicole-ipmi-inventory-sensors.yaml \
file://nicole-ipmi-sensors.yaml \
"
S = "${WORKDIR}"
do_install() {
install -m 0644 -D nicole-ipmi-fru-properties.yaml \
${D}${datadir}/${BPN}/ipmi-extra-properties.yaml
install -m 0644 -D nicole-ipmi-fru.yaml \
${D}${datadir}/${BPN}/ipmi-fru-read.yaml
install -m 0644 -D nicole-ipmi-inventory-sensors.yaml \
${D}${datadir}/${BPN}/ipmi-inventory-sensors.yaml
install -m 0644 -D nicole-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-inventory-sensors.yaml \
${datadir}/${BPN}/ipmi-sensors.yaml \
"
ALLOW_EMPTY:${PN} = "1"
@@ -0,0 +1,47 @@
/system: &DEFAULTS
xyz.openbmc_project.Inventory.Decorator.Cacheable:
Cached: 'true'
xyz.openbmc_project.Inventory.Decorator.Replaceable:
FieldReplaceable: 'true'
xyz.openbmc_project.Inventory.Item:
Present: 'true'
/system/chassis/motherboard:
<<: *DEFAULTS
/system/chassis/motherboard/cpu0:
<<: *DEFAULTS
/system/chassis/motherboard/cpu1:
<<: *DEFAULTS
/system/chassis/motherboard/dimm0:
<<: *DEFAULTS
/system/chassis/motherboard/dimm1:
<<: *DEFAULTS
/system/chassis/motherboard/dimm2:
<<: *DEFAULTS
/system/chassis/motherboard/dimm3:
<<: *DEFAULTS
/system/chassis/motherboard/dimm4:
<<: *DEFAULTS
/system/chassis/motherboard/dimm5:
<<: *DEFAULTS
/system/chassis/motherboard/dimm6:
<<: *DEFAULTS
/system/chassis/motherboard/dimm7:
<<: *DEFAULTS
/system/chassis/motherboard/dimm8:
<<: *DEFAULTS
/system/chassis/motherboard/dimm9:
<<: *DEFAULTS
/system/chassis/motherboard/dimm10:
<<: *DEFAULTS
/system/chassis/motherboard/dimm11:
<<: *DEFAULTS
/system/chassis/motherboard/dimm12:
<<: *DEFAULTS
/system/chassis/motherboard/dimm13:
<<: *DEFAULTS
/system/chassis/motherboard/dimm14:
<<: *DEFAULTS
/system/chassis/motherboard/dimm15:
<<: *DEFAULTS
/system/chassis/motherboard/opfw:
<<: *DEFAULTS
@@ -0,0 +1,165 @@
1:
/system/chassis/motherboard/cpu0: &CPU_DEFAULTS
entityID: 3
entityInstance: 1
interfaces:
xyz.openbmc_project.Inventory.Decorator.Asset:
BuildDate:
IPMIFruProperty: Mfg Date
IPMIFruSection: Board
Manufacturer:
IPMIFruProperty: Manufacturer
IPMIFruSection: Board
PartNumber:
IPMIFruProperty: Part Number
IPMIFruSection: Board
SerialNumber:
IPMIFruProperty: Serial Number
IPMIFruSection: Board
xyz.openbmc_project.Inventory.Decorator.Revision:
Version:
IPMIFruProperty: Custom Field 2
IPMIFruSection: Board
IPMIFruValueDelimiter: 58
xyz.openbmc_project.Inventory.Item:
PrettyName:
IPMIFruProperty: Name
IPMIFruSection: Board
2:
/system/chassis/motherboard/cpu1:
<<: *CPU_DEFAULTS
entityInstance: 2
3:
/system:
entityID: 7
entityInstance: 1
interfaces:
xyz.openbmc_project.Inventory.Decorator.Asset:
Model:
IPMIFruProperty: Part Number
IPMIFruSection: Chassis
SerialNumber:
IPMIFruProperty: Serial Number
IPMIFruSection: Chassis
/system/chassis/motherboard:
entityID: 7
entityInstance: 1
interfaces:
xyz.openbmc_project.Inventory.Decorator.Asset:
BuildDate:
IPMIFruProperty: Mfg Date
IPMIFruSection: Board
Manufacturer:
IPMIFruProperty: Manufacturer
IPMIFruSection: Board
PartNumber:
IPMIFruProperty: Part Number
IPMIFruSection: Board
SerialNumber:
IPMIFruProperty: Serial Number
IPMIFruSection: Board
xyz.openbmc_project.Inventory.Item:
PrettyName:
IPMIFruProperty: Name
IPMIFruSection: Board
4:
/system/chassis/motherboard/dimm0: &DIMM_DEFAULTS
entityID: 32
entityInstance: 1
interfaces:
xyz.openbmc_project.Inventory.Decorator.Asset:
BuildDate:
IPMIFruProperty: Mfg Date
IPMIFruSection: Product
Manufacturer:
IPMIFruProperty: Manufacturer
IPMIFruSection: Product
Model:
IPMIFruProperty: Model Number
IPMIFruSection: Product
PartNumber:
IPMIFruProperty: Part Number
IPMIFruSection: Product
SerialNumber:
IPMIFruProperty: Serial Number
IPMIFruSection: Product
xyz.openbmc_project.Inventory.Decorator.Revision:
Version:
IPMIFruProperty: Version
xyz.openbmc_project.Inventory.Item:
PrettyName:
IPMIFruProperty: Name
IPMIFruSection: Product
5:
/system/chassis/motherboard/dimm1:
<<: *DIMM_DEFAULTS
entityInstance: 2
6:
/system/chassis/motherboard/dimm2:
<<: *DIMM_DEFAULTS
entityInstance: 3
7:
/system/chassis/motherboard/dimm3:
<<: *DIMM_DEFAULTS
entityInstance: 4
8:
/system/chassis/motherboard/dimm4:
<<: *DIMM_DEFAULTS
entityInstance: 5
9:
/system/chassis/motherboard/dimm5:
<<: *DIMM_DEFAULTS
entityInstance: 6
10:
/system/chassis/motherboard/dimm6:
<<: *DIMM_DEFAULTS
entityInstance: 7
11:
/system/chassis/motherboard/dimm7:
<<: *DIMM_DEFAULTS
entityInstance: 8
12:
/system/chassis/motherboard/dimm8:
<<: *DIMM_DEFAULTS
entityInstance: 9
13:
/system/chassis/motherboard/dimm9:
<<: *DIMM_DEFAULTS
entityInstance: 10
14:
/system/chassis/motherboard/dimm10:
<<: *DIMM_DEFAULTS
entityInstance: 11
15:
/system/chassis/motherboard/dimm11:
<<: *DIMM_DEFAULTS
entityInstance: 12
16:
/system/chassis/motherboard/dimm12:
<<: *DIMM_DEFAULTS
entityInstance: 13
17:
/system/chassis/motherboard/dimm13:
<<: *DIMM_DEFAULTS
entityInstance: 14
18:
/system/chassis/motherboard/dimm14:
<<: *DIMM_DEFAULTS
entityInstance: 15
19:
/system/chassis/motherboard/dimm15:
<<: *DIMM_DEFAULTS
entityInstance: 16
28:
/system/chassis/motherboard/opfw:
entityID: 34
entityInstance: 0
interfaces:
xyz.openbmc_project.Inventory.Item:
PrettyName:
IPMIFruProperty: Name
IPMIFruSection: Product
xyz.openbmc_project.Inventory.Decorator.Revision:
Version:
IPMIFruProperty: Version
IPMIFruSection: Product
@@ -0,0 +1,340 @@
/xyz/openbmc_project/inventory/system:
eventReadingType: 111
offset: 2
sensorID: 144
sensorType: 18
/xyz/openbmc_project/inventory/system/chassis/motherboard:
eventReadingType: 3
offset: 0
sensorID: 140
sensorType: 199
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0:
eventReadingType: 111
offset: 8
sensorID: 8
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core0:
eventReadingType: 111
offset: 8
sensorID: 43
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core1:
eventReadingType: 111
offset: 8
sensorID: 44
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core10:
eventReadingType: 111
offset: 8
sensorID: 53
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core11:
eventReadingType: 111
offset: 8
sensorID: 54
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core12:
eventReadingType: 111
offset: 8
sensorID: 55
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core13:
eventReadingType: 111
offset: 8
sensorID: 56
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core14:
eventReadingType: 111
offset: 8
sensorID: 57
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core15:
eventReadingType: 111
offset: 8
sensorID: 58
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core16:
eventReadingType: 111
offset: 8
sensorID: 59
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core17:
eventReadingType: 111
offset: 8
sensorID: 60
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core18:
eventReadingType: 111
offset: 8
sensorID: 61
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core19:
eventReadingType: 111
offset: 8
sensorID: 62
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core2:
eventReadingType: 111
offset: 8
sensorID: 45
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core20:
eventReadingType: 111
offset: 8
sensorID: 63
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core21:
eventReadingType: 111
offset: 8
sensorID: 64
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core22:
eventReadingType: 111
offset: 8
sensorID: 65
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core23:
eventReadingType: 111
offset: 8
sensorID: 66
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core3:
eventReadingType: 111
offset: 8
sensorID: 46
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core4:
eventReadingType: 111
offset: 8
sensorID: 47
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core5:
eventReadingType: 111
offset: 8
sensorID: 48
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core6:
eventReadingType: 111
offset: 8
sensorID: 49
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core7:
eventReadingType: 111
offset: 8
sensorID: 50
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core8:
eventReadingType: 111
offset: 8
sensorID: 51
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core9:
eventReadingType: 111
offset: 8
sensorID: 52
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1:
eventReadingType: 111
offset: 8
sensorID: 9
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core0:
eventReadingType: 111
offset: 8
sensorID: 67
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core1:
eventReadingType: 111
offset: 8
sensorID: 68
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core10:
eventReadingType: 111
offset: 8
sensorID: 77
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core11:
eventReadingType: 111
offset: 8
sensorID: 78
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core12:
eventReadingType: 111
offset: 8
sensorID: 79
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core13:
eventReadingType: 111
offset: 8
sensorID: 80
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core14:
eventReadingType: 111
offset: 8
sensorID: 81
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core15:
eventReadingType: 111
offset: 8
sensorID: 82
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core16:
eventReadingType: 111
offset: 8
sensorID: 83
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core17:
eventReadingType: 111
offset: 8
sensorID: 84
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core18:
eventReadingType: 111
offset: 8
sensorID: 85
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core19:
eventReadingType: 111
offset: 8
sensorID: 86
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core2:
eventReadingType: 111
offset: 8
sensorID: 69
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core20:
eventReadingType: 111
offset: 8
sensorID: 87
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core21:
eventReadingType: 111
offset: 8
sensorID: 88
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core22:
eventReadingType: 111
offset: 8
sensorID: 89
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core23:
eventReadingType: 111
offset: 8
sensorID: 90
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core3:
eventReadingType: 111
offset: 8
sensorID: 70
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core4:
eventReadingType: 111
offset: 8
sensorID: 71
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core5:
eventReadingType: 111
offset: 8
sensorID: 72
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core6:
eventReadingType: 111
offset: 8
sensorID: 73
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core7:
eventReadingType: 111
offset: 8
sensorID: 74
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core8:
eventReadingType: 111
offset: 8
sensorID: 75
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core9:
eventReadingType: 111
offset: 8
sensorID: 76
sensorType: 7
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm0:
eventReadingType: 111
offset: 4
sensorID: 11
sensorType: 12
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm1:
eventReadingType: 111
offset: 4
sensorID: 12
sensorType: 12
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm10:
eventReadingType: 111
offset: 4
sensorID: 21
sensorType: 12
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm11:
eventReadingType: 111
offset: 4
sensorID: 22
sensorType: 12
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm12:
eventReadingType: 111
offset: 4
sensorID: 23
sensorType: 12
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm13:
eventReadingType: 111
offset: 4
sensorID: 24
sensorType: 12
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm14:
eventReadingType: 111
offset: 4
sensorID: 25
sensorType: 12
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm15:
eventReadingType: 111
offset: 4
sensorID: 26
sensorType: 12
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm2:
eventReadingType: 111
offset: 4
sensorID: 13
sensorType: 12
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm3:
eventReadingType: 111
offset: 4
sensorID: 14
sensorType: 12
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm4:
eventReadingType: 111
offset: 4
sensorID: 15
sensorType: 12
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm5:
eventReadingType: 111
offset: 4
sensorID: 16
sensorType: 12
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm6:
eventReadingType: 111
offset: 4
sensorID: 17
sensorType: 12
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm7:
eventReadingType: 111
offset: 4
sensorID: 18
sensorType: 12
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm8:
eventReadingType: 111
offset: 4
sensorID: 19
sensorType: 12
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm9:
eventReadingType: 111
offset: 4
sensorID: 20
sensorType: 12
@@ -0,0 +1,762 @@
2:
entityID: 34
entityInstance: 1
interfaces:
xyz.openbmc_project.State.Boot.Progress:
BootProgress:
Offsets:
0:
set: xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified
type: string
1:
set: xyz.openbmc_project.State.Boot.Progress.ProgressStages.MemoryInit
type: string
3:
set: xyz.openbmc_project.State.Boot.Progress.ProgressStages.SecondaryProcInit
type: string
7:
set: xyz.openbmc_project.State.Boot.Progress.ProgressStages.PCIInit
type: string
19:
set: xyz.openbmc_project.State.Boot.Progress.ProgressStages.OSStart
type: string
20:
set: xyz.openbmc_project.State.Boot.Progress.ProgressStages.MotherboardInit
type: string
mutability: Mutability::Write|Mutability::Read
path: /xyz/openbmc_project/state/host0
readingType: eventdata2
sensorNamePattern: nameProperty
sensorReadingType: 111
sensorType: 15
serviceInterface: org.freedesktop.DBus.Properties
3: &OCC_DEFAULTS
entityID: 210
entityInstance: 1
interfaces:
org.open_power.OCC.Status:
OccActive:
Offsets:
0:
assert: false
deassert: true
type: bool
1:
assert: true
deassert: false
type: bool
mutability: Mutability::Write|Mutability::Read
path: /org/open_power/control/occ0
readingType: assertion
sensorNamePattern: nameLeaf
sensorReadingType: 9
sensorType: 7
serviceInterface: org.freedesktop.DBus.Properties
4:
<<: *OCC_DEFAULTS
entityInstance: 2
path: /org/open_power/control/occ1
8: &CPU_DEFAULTS
entityID: 3
entityInstance: 1
interfaces:
xyz.openbmc_project.Inventory.Item:
Present:
Offsets:
7:
assert: true
deassert: false
type: bool
xyz.openbmc_project.State.Decorator.OperationalStatus:
Functional:
Offsets:
8:
assert: false
deassert: true
type: bool
Prereqs:
7:
assert: true
deassert: false
type: bool
mutability: Mutability::Write|Mutability::Read
path: /system/chassis/motherboard/cpu0
readingType: assertion
sensorNamePattern: nameLeaf
sensorReadingType: 111
sensorType: 7
serviceInterface: xyz.openbmc_project.Inventory.Manager
9:
<<: *CPU_DEFAULTS
entityInstance: 2
path: /system/chassis/motherboard/cpu1
11: &DIMM_FUNC_DEFAULTS
entityID: 32
entityInstance: 1
interfaces:
xyz.openbmc_project.Inventory.Item:
Present:
Offsets:
6:
assert: true
deassert: false
type: bool
xyz.openbmc_project.State.Decorator.OperationalStatus:
Functional:
Offsets:
4:
assert: false
deassert: true
type: bool
Prereqs:
6:
assert: true
deassert: false
type: bool
mutability: Mutability::Write|Mutability::Read
path: /system/chassis/motherboard/dimm0
readingType: assertion
sensorNamePattern: nameLeaf
sensorReadingType: 111
sensorType: 12
serviceInterface: xyz.openbmc_project.Inventory.Manager
12:
<<: *DIMM_FUNC_DEFAULTS
entityInstance: 2
path: /system/chassis/motherboard/dimm1
13:
<<: *DIMM_FUNC_DEFAULTS
entityInstance: 3
path: /system/chassis/motherboard/dimm2
14:
<<: *DIMM_FUNC_DEFAULTS
entityInstance: 4
path: /system/chassis/motherboard/dimm3
15:
<<: *DIMM_FUNC_DEFAULTS
entityInstance: 5
path: /system/chassis/motherboard/dimm4
16:
<<: *DIMM_FUNC_DEFAULTS
entityInstance: 6
path: /system/chassis/motherboard/dimm5
17:
<<: *DIMM_FUNC_DEFAULTS
entityInstance: 7
path: /system/chassis/motherboard/dimm6
18:
<<: *DIMM_FUNC_DEFAULTS
entityInstance: 8
path: /system/chassis/motherboard/dimm7
19:
<<: *DIMM_FUNC_DEFAULTS
entityInstance: 9
path: /system/chassis/motherboard/dimm8
20:
<<: *DIMM_FUNC_DEFAULTS
entityInstance: 10
path: /system/chassis/motherboard/dimm9
21:
<<: *DIMM_FUNC_DEFAULTS
entityInstance: 11
path: /system/chassis/motherboard/dimm10
22:
<<: *DIMM_FUNC_DEFAULTS
entityInstance: 12
path: /system/chassis/motherboard/dimm11
23:
<<: *DIMM_FUNC_DEFAULTS
entityInstance: 13
path: /system/chassis/motherboard/dimm12
24:
<<: *DIMM_FUNC_DEFAULTS
entityInstance: 14
path: /system/chassis/motherboard/dimm13
25:
<<: *DIMM_FUNC_DEFAULTS
entityInstance: 15
path: /system/chassis/motherboard/dimm14
26:
<<: *DIMM_FUNC_DEFAULTS
entityInstance: 16
path: /system/chassis/motherboard/dimm15
27: &DIMM_TEMP_DEFAULTS
bExp: 0
entityID: 32
entityInstance: 17
interfaces:
xyz.openbmc_project.Sensor.Value:
Value:
Offsets:
255:
type: double
multiplierM: 5
mutability: Mutability::Write|Mutability::Read
offsetB: 0
path: /xyz/openbmc_project/sensors/temperature/dimm0_temp
rExp: -1
readingType: readingData
scale: 0
sensorNamePattern: nameLeaf
sensorReadingType: 1
sensorType: 1
serviceInterface: org.freedesktop.DBus.Properties
unit: xyz.openbmc_project.Sensor.Value.Unit.DegreesC
28:
<<: *DIMM_TEMP_DEFAULTS
entityInstance: 18
path: /xyz/openbmc_project/sensors/temperature/dimm1_temp
29:
<<: *DIMM_TEMP_DEFAULTS
entityInstance: 25
path: /xyz/openbmc_project/sensors/temperature/dimm2_temp
30:
<<: *DIMM_TEMP_DEFAULTS
entityInstance: 26
path: /xyz/openbmc_project/sensors/temperature/dimm3_temp
31:
<<: *DIMM_TEMP_DEFAULTS
entityInstance: 27
path: /xyz/openbmc_project/sensors/temperature/dimm4_temp
32:
<<: *DIMM_TEMP_DEFAULTS
entityInstance: 28
path: /xyz/openbmc_project/sensors/temperature/dimm5_temp
33:
<<: *DIMM_TEMP_DEFAULTS
entityInstance: 29
path: /xyz/openbmc_project/sensors/temperature/dimm6_temp
34:
<<: *DIMM_TEMP_DEFAULTS
entityInstance: 30
path: /xyz/openbmc_project/sensors/temperature/dimm7_temp
35:
<<: *DIMM_TEMP_DEFAULTS
entityInstance: 31
path: /xyz/openbmc_project/sensors/temperature/dimm8_temp
36:
<<: *DIMM_TEMP_DEFAULTS
entityInstance: 32
path: /xyz/openbmc_project/sensors/temperature/dimm9_temp
37:
<<: *DIMM_TEMP_DEFAULTS
entityInstance: 19
path: /xyz/openbmc_project/sensors/temperature/dimm10_temp
38:
<<: *DIMM_TEMP_DEFAULTS
entityInstance: 20
path: /xyz/openbmc_project/sensors/temperature/dimm11_temp
39:
<<: *DIMM_TEMP_DEFAULTS
entityInstance: 21
path: /xyz/openbmc_project/sensors/temperature/dimm12_temp
40:
<<: *DIMM_TEMP_DEFAULTS
entityInstance: 22
path: /xyz/openbmc_project/sensors/temperature/dimm13_temp
41:
<<: *DIMM_TEMP_DEFAULTS
entityInstance: 23
path: /xyz/openbmc_project/sensors/temperature/dimm14_temp
42:
<<: *DIMM_TEMP_DEFAULTS
entityInstance: 24
path: /xyz/openbmc_project/sensors/temperature/dimm15_temp
43: &CORE_FUNC_DEFAULTS
entityID: 208
entityInstance: 1
interfaces:
xyz.openbmc_project.Inventory.Item:
Present:
Offsets:
7:
assert: true
deassert: false
skipOn: deassert
type: bool
xyz.openbmc_project.State.Decorator.OperationalStatus:
Functional:
Offsets:
8:
assert: false
deassert: true
type: bool
Prereqs:
7:
assert: true
deassert: false
type: bool
mutability: Mutability::Write|Mutability::Read
path: /system/chassis/motherboard/cpu0/core0
readingType: assertion
sensorNamePattern: nameParentLeaf
sensorReadingType: 111
sensorType: 7
serviceInterface: xyz.openbmc_project.Inventory.Manager
44:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 2
path: /system/chassis/motherboard/cpu0/core1
45:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 3
path: /system/chassis/motherboard/cpu0/core2
46:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 4
path: /system/chassis/motherboard/cpu0/core3
47:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 5
path: /system/chassis/motherboard/cpu0/core4
48:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 6
path: /system/chassis/motherboard/cpu0/core5
49:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 7
path: /system/chassis/motherboard/cpu0/core6
50:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 8
path: /system/chassis/motherboard/cpu0/core7
51:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 9
path: /system/chassis/motherboard/cpu0/core8
52:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 10
path: /system/chassis/motherboard/cpu0/core9
53:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 11
path: /system/chassis/motherboard/cpu0/core10
54:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 12
path: /system/chassis/motherboard/cpu0/core11
55:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 13
path: /system/chassis/motherboard/cpu0/core12
56:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 14
path: /system/chassis/motherboard/cpu0/core13
57:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 15
path: /system/chassis/motherboard/cpu0/core14
58:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 16
path: /system/chassis/motherboard/cpu0/core15
59:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 17
path: /system/chassis/motherboard/cpu0/core16
60:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 18
path: /system/chassis/motherboard/cpu0/core17
61:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 19
path: /system/chassis/motherboard/cpu0/core18
62:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 20
path: /system/chassis/motherboard/cpu0/core19
63:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 21
path: /system/chassis/motherboard/cpu0/core20
64:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 22
path: /system/chassis/motherboard/cpu0/core21
65:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 23
path: /system/chassis/motherboard/cpu0/core22
66:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 24
path: /system/chassis/motherboard/cpu0/core23
67:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 25
path: /system/chassis/motherboard/cpu1/core0
68:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 26
path: /system/chassis/motherboard/cpu1/core1
69:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 27
path: /system/chassis/motherboard/cpu1/core2
70:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 28
path: /system/chassis/motherboard/cpu1/core3
71:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 29
path: /system/chassis/motherboard/cpu1/core4
72:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 30
path: /system/chassis/motherboard/cpu1/core5
73:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 31
path: /system/chassis/motherboard/cpu1/core6
74:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 32
path: /system/chassis/motherboard/cpu1/core7
75:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 33
path: /system/chassis/motherboard/cpu1/core8
76:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 34
path: /system/chassis/motherboard/cpu1/core9
77:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 35
path: /system/chassis/motherboard/cpu1/core10
78:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 36
path: /system/chassis/motherboard/cpu1/core11
79:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 37
path: /system/chassis/motherboard/cpu1/core12
80:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 38
path: /system/chassis/motherboard/cpu1/core13
81:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 39
path: /system/chassis/motherboard/cpu1/core14
82:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 40
path: /system/chassis/motherboard/cpu1/core15
83:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 41
path: /system/chassis/motherboard/cpu1/core16
84:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 42
path: /system/chassis/motherboard/cpu1/core17
85:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 43
path: /system/chassis/motherboard/cpu1/core18
86:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 44
path: /system/chassis/motherboard/cpu1/core19
87:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 45
path: /system/chassis/motherboard/cpu1/core20
88:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 46
path: /system/chassis/motherboard/cpu1/core21
89:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 47
path: /system/chassis/motherboard/cpu1/core22
90:
<<: *CORE_FUNC_DEFAULTS
entityInstance: 48
path: /system/chassis/motherboard/cpu1/core23
91: &CORE_TEMP_DEFAULTS
bExp: 0
entityID: 208
entityInstance: 49
interfaces:
xyz.openbmc_project.Sensor.Value:
Value:
Offsets:
255:
type: double
multiplierM: 5
mutability: Mutability::Write|Mutability::Read
offsetB: 0
path: /xyz/openbmc_project/sensors/temperature/p0_core0_temp
rExp: -1
readingType: readingData
scale: 0
sensorNamePattern: nameLeaf
sensorReadingType: 1
sensorType: 1
serviceInterface: org.freedesktop.DBus.Properties
unit: xyz.openbmc_project.Sensor.Value.Unit.DegreesC
92:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 50
path: /xyz/openbmc_project/sensors/temperature/p0_core1_temp
93:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 51
path: /xyz/openbmc_project/sensors/temperature/p0_core2_temp
94:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 52
path: /xyz/openbmc_project/sensors/temperature/p0_core3_temp
95:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 53
path: /xyz/openbmc_project/sensors/temperature/p0_core4_temp
96:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 54
path: /xyz/openbmc_project/sensors/temperature/p0_core5_temp
97:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 55
path: /xyz/openbmc_project/sensors/temperature/p0_core6_temp
98:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 56
path: /xyz/openbmc_project/sensors/temperature/p0_core7_temp
99:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 57
path: /xyz/openbmc_project/sensors/temperature/p0_core8_temp
100:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 58
path: /xyz/openbmc_project/sensors/temperature/p0_core9_temp
101:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 59
path: /xyz/openbmc_project/sensors/temperature/p0_core10_temp
102:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 60
path: /xyz/openbmc_project/sensors/temperature/p0_core11_temp
103:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 61
path: /xyz/openbmc_project/sensors/temperature/p0_core12_temp
104:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 62
path: /xyz/openbmc_project/sensors/temperature/p0_core13_temp
105:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 63
path: /xyz/openbmc_project/sensors/temperature/p0_core14_temp
106:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 64
path: /xyz/openbmc_project/sensors/temperature/p0_core15_temp
107:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 65
path: /xyz/openbmc_project/sensors/temperature/p0_core16_temp
108:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 66
path: /xyz/openbmc_project/sensors/temperature/p0_core17_temp
109:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 67
path: /xyz/openbmc_project/sensors/temperature/p0_core18_temp
110:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 68
path: /xyz/openbmc_project/sensors/temperature/p0_core19_temp
111:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 69
path: /xyz/openbmc_project/sensors/temperature/p0_core20_temp
112:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 70
path: /xyz/openbmc_project/sensors/temperature/p0_core21_temp
113:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 71
path: /xyz/openbmc_project/sensors/temperature/p0_core22_temp
114:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 72
path: /xyz/openbmc_project/sensors/temperature/p0_core23_temp
115:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 73
path: /xyz/openbmc_project/sensors/temperature/p1_core0_temp
116:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 74
path: /xyz/openbmc_project/sensors/temperature/p1_core1_temp
117:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 75
path: /xyz/openbmc_project/sensors/temperature/p1_core2_temp
118:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 76
path: /xyz/openbmc_project/sensors/temperature/p1_core3_temp
119:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 77
path: /xyz/openbmc_project/sensors/temperature/p1_core4_temp
120:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 78
path: /xyz/openbmc_project/sensors/temperature/p1_core5_temp
121:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 79
path: /xyz/openbmc_project/sensors/temperature/p1_core6_temp
122:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 80
path: /xyz/openbmc_project/sensors/temperature/p1_core7_temp
123:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 81
path: /xyz/openbmc_project/sensors/temperature/p1_core8_temp
124:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 82
path: /xyz/openbmc_project/sensors/temperature/p1_core9_temp
125:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 83
path: /xyz/openbmc_project/sensors/temperature/p1_core10_temp
126:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 84
path: /xyz/openbmc_project/sensors/temperature/p1_core11_temp
127:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 85
path: /xyz/openbmc_project/sensors/temperature/p1_core12_temp
128:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 86
path: /xyz/openbmc_project/sensors/temperature/p1_core13_temp
129:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 87
path: /xyz/openbmc_project/sensors/temperature/p1_core14_temp
130:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 88
path: /xyz/openbmc_project/sensors/temperature/p1_core15_temp
131:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 89
path: /xyz/openbmc_project/sensors/temperature/p1_core16_temp
132:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 90
path: /xyz/openbmc_project/sensors/temperature/p1_core17_temp
133:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 91
path: /xyz/openbmc_project/sensors/temperature/p1_core18_temp
134:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 92
path: /xyz/openbmc_project/sensors/temperature/p1_core19_temp
135:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 93
path: /xyz/openbmc_project/sensors/temperature/p1_core20_temp
136:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 94
path: /xyz/openbmc_project/sensors/temperature/p1_core21_temp
137:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 95
path: /xyz/openbmc_project/sensors/temperature/p1_core22_temp
138:
<<: *CORE_TEMP_DEFAULTS
entityInstance: 96
path: /xyz/openbmc_project/sensors/temperature/p1_core23_temp
139:
entityID: 34
entityInstance: 2
interfaces:
xyz.openbmc_project.Control.Boot.RebootAttempts:
AttemptsLeft:
Offsets:
255:
type: uint32_t
mutability: Mutability::Write|Mutability::Read
path: /xyz/openbmc_project/state/host0
readingType: readingAssertion
sensorNamePattern: nameProperty
sensorReadingType: 111
sensorType: 195
serviceInterface: org.freedesktop.DBus.Properties
145:
entityID: 35
entityInstance: 1
interfaces:
xyz.openbmc_project.State.OperatingSystem.Status:
OperatingSystemState:
Offsets:
1:
assert: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.CBoot
type: string
2:
assert: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.PXEBoot
type: string
3:
assert: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.DiagBoot
type: string
4:
assert: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.CDROMBoot
type: string
5:
assert: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.ROMBoot
type: string
6:
assert: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.BootComplete
type: string
mutability: Mutability::Write|Mutability::Read
path: /xyz/openbmc_project/state/host0
readingType: assertion
sensorNamePattern: nameProperty
sensorReadingType: 111
sensorType: 31
serviceInterface: org.freedesktop.DBus.Properties
254:
sensorType: 2
path: /xyz/openbmc_project/sensors/voltage/vbat
sensorReadingType: 1
# This gives the measurement 1.800..3.585 volts with a step 0.007
multiplierM: 7
offsetB: 18
bExp: 2
rExp: -3
scale: 0
unit: xyz.openbmc_project.Sensor.Value.Unit.Volts
mutability: Mutability::Read
readingType: readingData
serviceInterface: org.freedesktop.DBus.Properties
interfaces:
xyz.openbmc_project.Sensor.Value:
Value:
Offsets:
255:
type: double
@@ -0,0 +1,4 @@
lpc-address = 0x3f8
sirq = 4
local-tty = ttyS0
local-tty-baud = 115200
@@ -0,0 +1 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
@@ -0,0 +1 @@
PACKAGECONFIG:append = " verify_pnor_signature"
@@ -0,0 +1 @@
PACKAGECONFIG:append = " verify_signature"
@@ -0,0 +1,60 @@
From 53241d7be35fba23079504468090d770d4116831 Mon Sep 17 00:00:00 2001
From: Artem Senichev <a.senichev@yadro.com>
Date: Tue, 28 Jul 2020 17:38:17 +0300
Subject: [PATCH] Stop and send SRESET for one thread only
Fixes bugs preventing the host from creating a crash dump.
Stopping all threads leads to errors in skiboot:
[ 163.237293219,3] Could not stop thread 0:0:1: Thread is quiesced already.
If the kernel has xmon support, exiting the debugger causes the kernel
to hang:
[ 235.694220] watchdog: CPU 97 TB:187362511366, last heartbeat TB:159120095297 (55160ms ago)
[ 235.694276] watchdog: CPU 101 Hard LOCKUP
Sending SRESET to all threads causes kernel panic:
[ 50.495727] Kernel panic - not syncing: Unrecoverable nested System Reset
Signed-off-by: Artem Senichev <a.senichev@yadro.com>
---
nmi_interface.cpp | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/nmi_interface.cpp b/nmi_interface.cpp
index fcce451..d022d7e 100644
--- a/nmi_interface.cpp
+++ b/nmi_interface.cpp
@@ -38,7 +38,7 @@ void NMI::nMI()
using InternalFailure =
sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
- struct pdbg_target* target;
+ struct pdbg_target* target = nullptr;
pdbg_for_each_class_target("thread", target)
{
@@ -51,11 +51,19 @@ void NMI::nMI()
report<InternalFailure>();
return;
}
+ break;
}
- if (thread_sreset_all() < 0)
+ if (!target)
{
- log<level::ERR>("Failed to sreset all threads");
+ log<level::ERR>("Thread not found");
+ report<InternalFailure>();
+ return;
+ }
+
+ if (thread_sreset(target) < 0)
+ {
+ log<level::ERR>("Failed to sreset thread");
report<InternalFailure>();
}
}
--
2.27.0
@@ -0,0 +1,2 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://0001-Stop-and-send-SRESET-for-one-thread-only.patch"
@@ -0,0 +1 @@
RDEPENDS:${PN}:append = " avsbus-control"
@@ -0,0 +1,7 @@
OBMC_IMAGE_EXTRA_INSTALL:append = " \
first-boot-set-hostname \
mboxd \
obmc-yadro-cli \
openpower-fru-vpd \
"
IMAGE_FEATURES:remove:nicole = "obmc-user-mgmt-ldap"
@@ -0,0 +1,3 @@
EXTRA_OECMAKE:append = " \
-DBMCWEB_ENABLE_MUTUAL_TLS_AUTHENTICATION=OFF \
"
@@ -0,0 +1,5 @@
DEPENDS:append = " nicole-yaml-config"
EXTRA_OECONF = " \
INVSENSOR_YAML_GEN=${STAGING_DIR_HOST}${datadir}/nicole-yaml-config/ipmi-inventory-sensors.yaml \
"
@@ -0,0 +1,21 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
inherit systemd
RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_base-utils}"
SYSTEMD_SERVICE:${PN} = "${BPN}.service"
SRC_URI:append = " \
file://${BPN}-set-device-id.sh \
file://${BPN}.service \
"
S = "${WORKDIR}"
do_install:append() {
install -d ${D}${bindir} ${D}${systemd_system_unitdir}
install ${BPN}-set-device-id.sh ${D}${bindir}/
install -m 0644 ${BPN}.service ${D}${systemd_system_unitdir}/
}
FILES:${PN}:append = " \
${bindir}/${BPN}-set-device-id.sh \
"
@@ -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" : "RESERVED",
"is_valid" : false,
"active_sessions" : 0,
"channel_info" : {
"medium_type" : "lan-802.3",
"protocol_type" : "ipmb-1.0",
"session_supported" : "multi-session",
"is_ipmi" : true
}
},
"3" : {
"name" : "RESERVED",
"is_valid" : false,
"active_sessions" : 0,
"channel_info" : {
"medium_type" : "reserved",
"protocol_type" : "na",
"session_supported" : "session-less",
"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" : "RESERVED",
"is_valid" : false,
"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" : true,
"active_sessions" : 0,
"channel_info" : {
"medium_type" : "ipmb",
"protocol_type" : "ipmb-1.0",
"session_supported" : "session-less",
"is_ipmi" : true
}
},
"15" : {
"name" : "SMS",
"is_valid" : true,
"active_sessions" : 0,
"channel_info" : {
"medium_type" : "system-interface",
"protocol_type" : "kcs",
"session_supported" : "session-less",
"is_ipmi" : true
}
}
}
@@ -0,0 +1,7 @@
{
"id": 0,
"revision": 1,
"addn_dev_support": 0,
"manuf_id": 49769,
"prod_id": 11
}
@@ -0,0 +1,5 @@
#!/bin/sh -eu
BMCPOS=$(awk -v RS=" " '/^bmcposition=/{print substr($0,13)}' /proc/cmdline)
sed -r "s/\"id\"\s*:\s*[0-9]+\s*,/\"id\": ${BMCPOS:-0},/" -i \
/usr/share/ipmi-providers/dev_id.json
@@ -0,0 +1,12 @@
[Unit]
Description=Set DeviceID for ipmi-host
Before=phosphor-ipmi-host.service
[Service]
Type=oneshot
TimeoutSec=0
RemainAfterExit=yes
ExecStart=/usr/bin/env phosphor-ipmi-config-set-device-id.sh
[Install]
RequiredBy=phosphor-ipmi-host.service
@@ -0,0 +1,4 @@
DEPENDS:append = " nicole-yaml-config"
IPMI_FRU_YAML="${STAGING_DIR_HOST}${datadir}/nicole-yaml-config/ipmi-fru-read.yaml"
IPMI_FRU_PROP_YAML="${STAGING_DIR_HOST}${datadir}/nicole-yaml-config/ipmi-extra-properties.yaml"
@@ -0,0 +1,7 @@
DEPENDS:append = " nicole-yaml-config"
EXTRA_OEMESON = " \
-Dsensor-yaml-gen=${STAGING_DIR_HOST}${datadir}/nicole-yaml-config/ipmi-sensors.yaml \
-Dinvsensor-yaml-gen=${STAGING_DIR_HOST}${datadir}/nicole-yaml-config/ipmi-inventory-sensors.yaml \
-Dfru-yaml-gen=${STAGING_DIR_HOST}${datadir}/nicole-yaml-config/ipmi-fru-read.yaml \
"
@@ -0,0 +1,18 @@
SUMMARY = "Phosphor LED Group Management for Nicole"
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"
S = "${WORKDIR}"
do_install() {
SRC=${S}
DEST=${D}${datadir}/phosphor-led-manager
install -D ${SRC}/led.yaml ${DEST}/led.yaml
}
@@ -0,0 +1,120 @@
#
# If the LED has a label in DTS like:
# label = "device:color:function";
# the D-Bus name looks like:
# device_function_color
#
bmc_booted:
platform_power_green:
Action: 'Blink'
Priority: 'On'
power_on:
platform_power_green:
Action: 'On'
Priority: 'On'
enclosure_identify:
platform_indicator_blue:
Action: 'Blink'
Priority: 'Blink'
enclosure_fault: &SYS_FAULT
platform_fault_red:
Action: 'Blink'
Priority: 'Blink'
enclosure_warning: &FRU_FAULT
platform_alarm_yellow:
Action: 'Blink'
Priority: 'Blink'
bmc_fault:
<<: *SYS_FAULT
motherboard_fault:
<<: *SYS_FAULT
system_fault:
<<: *SYS_FAULT
cpu0_fault:
<<: *FRU_FAULT
cpu1_fault:
<<: *FRU_FAULT
core0_fault:
<<: *FRU_FAULT
core1_fault:
<<: *FRU_FAULT
core2_fault:
<<: *FRU_FAULT
core3_fault:
<<: *FRU_FAULT
core4_fault:
<<: *FRU_FAULT
core5_fault:
<<: *FRU_FAULT
core6_fault:
<<: *FRU_FAULT
core7_fault:
<<: *FRU_FAULT
core8_fault:
<<: *FRU_FAULT
core9_fault:
<<: *FRU_FAULT
core10_fault:
<<: *FRU_FAULT
core11_fault:
<<: *FRU_FAULT
core12_fault:
<<: *FRU_FAULT
core13_fault:
<<: *FRU_FAULT
core14_fault:
<<: *FRU_FAULT
core15_fault:
<<: *FRU_FAULT
core16_fault:
<<: *FRU_FAULT
core17_fault:
<<: *FRU_FAULT
core18_fault:
<<: *FRU_FAULT
core19_fault:
<<: *FRU_FAULT
core20_fault:
<<: *FRU_FAULT
core21_fault:
<<: *FRU_FAULT
core22_fault:
<<: *FRU_FAULT
core23_fault:
<<: *FRU_FAULT
dimm0_fault:
<<: *FRU_FAULT
dimm1_fault:
<<: *FRU_FAULT
dimm2_fault:
<<: *FRU_FAULT
dimm3_fault:
<<: *FRU_FAULT
dimm4_fault:
<<: *FRU_FAULT
dimm5_fault:
<<: *FRU_FAULT
dimm6_fault:
<<: *FRU_FAULT
dimm7_fault:
<<: *FRU_FAULT
dimm8_fault:
<<: *FRU_FAULT
dimm9_fault:
<<: *FRU_FAULT
dimm10_fault:
<<: *FRU_FAULT
dimm11_fault:
<<: *FRU_FAULT
dimm12_fault:
<<: *FRU_FAULT
dimm13_fault:
<<: *FRU_FAULT
dimm14_fault:
<<: *FRU_FAULT
dimm15_fault:
<<: *FRU_FAULT
@@ -0,0 +1,23 @@
SUMMARY = "OpenPOWER eSEL parser"
DESCRIPTION = "Shared library and console utility for parsing eSEL."
HOMEPAGE = "https://github.com/YADRO-KNS/openpower-esel-parser"
PR = "r1"
PV = "1.0+git${SRCPV}"
inherit autotools
inherit pkgconfig
inherit perlnative
# License info
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
# Dependencies
DEPENDS += "autoconf-archive-native \
libxml-libxml-perl-native \
libxml-simple-perl-native"
# Source code repository
S = "${WORKDIR}/git"
SRC_URI = "gitsm://github.com/YADRO-KNS/openpower-esel-parser;branch=master;protocol=https"
SRCREV = "5bf636b0b8bd0d09928b1879aa480c60e4452e80"
@@ -0,0 +1 @@
MBOXD_FLASH_SIZE = "64M"
@@ -0,0 +1,3 @@
{
"eth0":"ethernet"
}
@@ -0,0 +1,10 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
PACKAGECONFIG:append = " sync-mac"
SRC_URI:append = " file://config.json "
FILES:${PN} += "${datadir}/network/*.json"
do_install:append() {
install -d ${D}${datadir}/network/
install -m 0644 ${WORKDIR}/config.json ${D}${datadir}/network/
}
@@ -0,0 +1,6 @@
- Instance: 0
SensorID: 0x03
SensorName: occ0
- Instance: 1
SensorID: 0x04
SensorName: occ1
@@ -0,0 +1,18 @@
SUMMARY = "Nicole OCC Control sensor IDs"
PR = "r1"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
inherit openpower-occ-control
inherit native
PROVIDES += "virtual/openpower-occ-control-config-native"
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI += "file://occ_sensor.yaml"
S = "${WORKDIR}"
do_install() {
install -d ${YAML_DEST}/
install ${S}/occ_sensor.yaml ${YAML_DEST}/
}
@@ -0,0 +1,7 @@
RDEPENDS:${PN}-inventory:append = " openpower-occ-control"
RDEPENDS:${PN}-extras:append = " \
phosphor-hostlogger \
"
RDEPENDS:${PN}-software:append = " \
obmc-yadro-fwupdate \
"
@@ -0,0 +1,228 @@
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"
LABEL_temp91 = "p0_core0_temp"
WARNHI_temp91 = "78000"
WARNLO_temp91 = "0"
CRITHI_temp91 = "83000"
CRITLO_temp91 = "0"
LABEL_temp92 = "p0_core1_temp"
WARNHI_temp92 = "78000"
WARNLO_temp92 = "0"
CRITHI_temp92 = "83000"
CRITLO_temp92 = "0"
LABEL_temp93 = "p0_core2_temp"
WARNHI_temp93 = "78000"
WARNLO_temp93 = "0"
CRITHI_temp93 = "83000"
CRITLO_temp93 = "0"
LABEL_temp94 = "p0_core3_temp"
WARNHI_temp94 = "78000"
WARNLO_temp94 = "0"
CRITHI_temp94 = "83000"
CRITLO_temp94 = "0"
LABEL_temp95 = "p0_core4_temp"
WARNHI_temp95 = "78000"
WARNLO_temp95 = "0"
CRITHI_temp95 = "83000"
CRITLO_temp95 = "0"
LABEL_temp96 = "p0_core5_temp"
WARNHI_temp96 = "78000"
WARNLO_temp96 = "0"
CRITHI_temp96 = "83000"
CRITLO_temp96 = "0"
LABEL_temp97 = "p0_core6_temp"
WARNHI_temp97 = "78000"
WARNLO_temp97 = "0"
CRITHI_temp97 = "83000"
CRITLO_temp97 = "0"
LABEL_temp98 = "p0_core7_temp"
WARNHI_temp98 = "78000"
WARNLO_temp98 = "0"
CRITHI_temp98 = "83000"
CRITLO_temp98 = "0"
LABEL_temp99 = "p0_core8_temp"
WARNHI_temp99 = "78000"
WARNLO_temp99 = "0"
CRITHI_temp99 = "83000"
CRITLO_temp99 = "0"
LABEL_temp100 = "p0_core9_temp"
WARNHI_temp100 = "78000"
WARNLO_temp100 = "0"
CRITHI_temp100 = "83000"
CRITLO_temp100 = "0"
LABEL_temp101 = "p0_core10_temp"
WARNHI_temp101 = "78000"
WARNLO_temp101 = "0"
CRITHI_temp101 = "83000"
CRITLO_temp101 = "0"
LABEL_temp102 = "p0_core11_temp"
WARNHI_temp102 = "78000"
WARNLO_temp102 = "0"
CRITHI_temp102 = "83000"
CRITLO_temp102 = "0"
LABEL_temp103 = "p0_core12_temp"
WARNHI_temp103 = "78000"
WARNLO_temp103 = "0"
CRITHI_temp103 = "83000"
CRITLO_temp103 = "0"
LABEL_temp104 = "p0_core13_temp"
WARNHI_temp104 = "78000"
WARNLO_temp104 = "0"
CRITHI_temp104 = "83000"
CRITLO_temp104 = "0"
LABEL_temp105 = "p0_core14_temp"
WARNHI_temp105 = "78000"
WARNLO_temp105 = "0"
CRITHI_temp105 = "83000"
CRITLO_temp105 = "0"
LABEL_temp106 = "p0_core15_temp"
WARNHI_temp106 = "78000"
WARNLO_temp106 = "0"
CRITHI_temp106 = "83000"
CRITLO_temp106 = "0"
LABEL_temp107 = "p0_core16_temp"
WARNHI_temp107 = "78000"
WARNLO_temp107 = "0"
CRITHI_temp107 = "83000"
CRITLO_temp107 = "0"
LABEL_temp108 = "p0_core17_temp"
WARNHI_temp108 = "78000"
WARNLO_temp108 = "0"
CRITHI_temp108 = "83000"
CRITLO_temp108 = "0"
LABEL_temp109 = "p0_core18_temp"
WARNHI_temp109 = "78000"
WARNLO_temp109 = "0"
CRITHI_temp109 = "83000"
CRITLO_temp109 = "0"
LABEL_temp110 = "p0_core19_temp"
WARNHI_temp110 = "78000"
WARNLO_temp110 = "0"
CRITHI_temp110 = "83000"
CRITLO_temp110 = "0"
LABEL_temp111 = "p0_core20_temp"
WARNHI_temp111 = "78000"
WARNLO_temp111 = "0"
CRITHI_temp111 = "83000"
CRITLO_temp111 = "0"
LABEL_temp112 = "p0_core21_temp"
WARNHI_temp112 = "78000"
WARNLO_temp112 = "0"
CRITHI_temp112 = "83000"
CRITLO_temp112 = "0"
LABEL_temp113 = "p0_core22_temp"
WARNHI_temp113 = "78000"
WARNLO_temp113 = "0"
CRITHI_temp113 = "83000"
CRITLO_temp113 = "0"
LABEL_temp114 = "p0_core23_temp"
WARNHI_temp114 = "78000"
WARNLO_temp114 = "0"
CRITHI_temp114 = "83000"
CRITLO_temp114 = "0"
LABEL_temp27 = "dimm0_temp"
WARNHI_temp27 = "78000"
WARNLO_temp27 = "0"
CRITHI_temp27 = "83000"
CRITLO_temp27 = "0"
LABEL_temp28 = "dimm1_temp"
WARNHI_temp28 = "78000"
WARNLO_temp28 = "0"
CRITHI_temp28 = "83000"
CRITLO_temp28 = "0"
LABEL_temp29 = "dimm2_temp"
WARNHI_temp29 = "78000"
WARNLO_temp29 = "0"
CRITHI_temp29 = "83000"
CRITLO_temp29 = "0"
LABEL_temp30 = "dimm3_temp"
WARNHI_temp30 = "78000"
WARNLO_temp30 = "0"
CRITHI_temp30 = "83000"
CRITLO_temp30 = "0"
LABEL_temp31 = "dimm4_temp"
WARNHI_temp31 = "78000"
WARNLO_temp31 = "0"
CRITHI_temp31 = "83000"
CRITLO_temp31 = "0"
LABEL_temp32 = "dimm5_temp"
WARNHI_temp32 = "78000"
WARNLO_temp32 = "0"
CRITHI_temp32 = "83000"
CRITLO_temp32 = "0"
LABEL_temp33 = "dimm6_temp"
WARNHI_temp33 = "78000"
WARNLO_temp33 = "0"
CRITHI_temp33 = "83000"
CRITLO_temp33 = "0"
LABEL_temp34 = "dimm7_temp"
WARNHI_temp34 = "78000"
WARNLO_temp34 = "0"
CRITHI_temp34 = "83000"
CRITLO_temp34 = "0"
LABEL_power2 = "p0_power"
LABEL_power3 = "p0_vdd_power"
LABEL_power4 = "p0_vdn_power"
@@ -0,0 +1,228 @@
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"
LABEL_temp115 = "p1_core0_temp"
WARNHI_temp115 = "78000"
WARNLO_temp115 = "0"
CRITHI_temp115 = "83000"
CRITLO_temp115 = "0"
LABEL_temp116 = "p1_core1_temp"
WARNHI_temp116 = "78000"
WARNLO_temp116 = "0"
CRITHI_temp116 = "83000"
CRITLO_temp116 = "0"
LABEL_temp117 = "p1_core2_temp"
WARNHI_temp117 = "78000"
WARNLO_temp117 = "0"
CRITHI_temp117 = "83000"
CRITLO_temp117 = "0"
LABEL_temp118 = "p1_core3_temp"
WARNHI_temp118 = "78000"
WARNLO_temp118 = "0"
CRITHI_temp118 = "83000"
CRITLO_temp118 = "0"
LABEL_temp119 = "p1_core4_temp"
WARNHI_temp119 = "78000"
WARNLO_temp119 = "0"
CRITHI_temp119 = "83000"
CRITLO_temp119 = "0"
LABEL_temp120 = "p1_core5_temp"
WARNHI_temp120 = "78000"
WARNLO_temp120 = "0"
CRITHI_temp120 = "83000"
CRITLO_temp120 = "0"
LABEL_temp121 = "p1_core6_temp"
WARNHI_temp121 = "78000"
WARNLO_temp121 = "0"
CRITHI_temp121 = "83000"
CRITLO_temp121 = "0"
LABEL_temp122 = "p1_core7_temp"
WARNHI_temp122 = "78000"
WARNLO_temp122 = "0"
CRITHI_temp122 = "83000"
CRITLO_temp122 = "0"
LABEL_temp123 = "p1_core8_temp"
WARNHI_temp123 = "78000"
WARNLO_temp123 = "0"
CRITHI_temp123 = "83000"
CRITLO_temp123 = "0"
LABEL_temp124 = "p1_core9_temp"
WARNHI_temp124 = "78000"
WARNLO_temp124 = "0"
CRITHI_temp124 = "83000"
CRITLO_temp124 = "0"
LABEL_temp125 = "p1_core10_temp"
WARNHI_temp125 = "78000"
WARNLO_temp125 = "0"
CRITHI_temp125 = "83000"
CRITLO_temp125 = "0"
LABEL_temp126 = "p1_core11_temp"
WARNHI_temp126 = "78000"
WARNLO_temp126 = "0"
CRITHI_temp126 = "83000"
CRITLO_temp126 = "0"
LABEL_temp127 = "p1_core12_temp"
WARNHI_temp127 = "78000"
WARNLO_temp127 = "0"
CRITHI_temp127 = "83000"
CRITLO_temp127 = "0"
LABEL_temp128 = "p1_core13_temp"
WARNHI_temp128 = "78000"
WARNLO_temp128 = "0"
CRITHI_temp128 = "83000"
CRITLO_temp128 = "0"
LABEL_temp129 = "p1_core14_temp"
WARNHI_temp129 = "78000"
WARNLO_temp129 = "0"
CRITHI_temp129 = "83000"
CRITLO_temp129 = "0"
LABEL_temp130 = "p1_core15_temp"
WARNHI_temp130 = "78000"
WARNLO_temp130 = "0"
CRITHI_temp130 = "83000"
CRITLO_temp130 = "0"
LABEL_temp131 = "p1_core16_temp"
WARNHI_temp131 = "78000"
WARNLO_temp131 = "0"
CRITHI_temp131 = "83000"
CRITLO_temp131 = "0"
LABEL_temp132 = "p1_core17_temp"
WARNHI_temp132 = "78000"
WARNLO_temp132 = "0"
CRITHI_temp132 = "83000"
CRITLO_temp132 = "0"
LABEL_temp133 = "p1_core18_temp"
WARNHI_temp133 = "78000"
WARNLO_temp133 = "0"
CRITHI_temp133 = "83000"
CRITLO_temp133 = "0"
LABEL_temp134 = "p1_core19_temp"
WARNHI_temp134 = "78000"
WARNLO_temp134 = "0"
CRITHI_temp134 = "83000"
CRITLO_temp134 = "0"
LABEL_temp135 = "p1_core20_temp"
WARNHI_temp135 = "78000"
WARNLO_temp135 = "0"
CRITHI_temp135 = "83000"
CRITLO_temp135 = "0"
LABEL_temp136 = "p1_core21_temp"
WARNHI_temp136 = "78000"
WARNLO_temp136 = "0"
CRITHI_temp136 = "83000"
CRITLO_temp136 = "0"
LABEL_temp137 = "p1_core22_temp"
WARNHI_temp137 = "78000"
WARNLO_temp137 = "0"
CRITHI_temp137 = "83000"
CRITLO_temp137 = "0"
LABEL_temp138 = "p1_core23_temp"
WARNHI_temp138 = "78000"
WARNLO_temp138 = "0"
CRITHI_temp138 = "83000"
CRITLO_temp138 = "0"
LABEL_temp35 = "dimm8_temp"
WARNHI_temp35 = "78000"
WARNLO_temp35 = "0"
CRITHI_temp35 = "83000"
CRITLO_temp35 = "0"
LABEL_temp36 = "dimm9_temp"
WARNHI_temp36 = "78000"
WARNLO_temp36 = "0"
CRITHI_temp36 = "83000"
CRITLO_temp36 = "0"
LABEL_temp37 = "dimm10_temp"
WARNHI_temp37 = "78000"
WARNLO_temp37 = "0"
CRITHI_temp37 = "83000"
CRITLO_temp37 = "0"
LABEL_temp38 = "dimm11_temp"
WARNHI_temp38 = "78000"
WARNLO_temp38 = "0"
CRITHI_temp38 = "83000"
CRITLO_temp38 = "0"
LABEL_temp39 = "dimm12_temp"
WARNHI_temp39 = "78000"
WARNLO_temp39 = "0"
CRITHI_temp39 = "83000"
CRITLO_temp39 = "0"
LABEL_temp40 = "dimm13_temp"
WARNHI_temp40 = "78000"
WARNLO_temp40 = "0"
CRITHI_temp40 = "83000"
CRITLO_temp40 = "0"
LABEL_temp41 = "dimm14_temp"
WARNHI_temp41 = "78000"
WARNLO_temp41 = "0"
CRITHI_temp41 = "83000"
CRITLO_temp41 = "0"
LABEL_temp42 = "dimm15_temp"
WARNHI_temp42 = "78000"
WARNLO_temp42 = "0"
CRITHI_temp42 = "83000"
CRITLO_temp42 = "0"
LABEL_power2 = "p1_power"
LABEL_power3 = "p1_vdd_power"
LABEL_power4 = "p1_vdn_power"
@@ -0,0 +1,13 @@
LABEL_in1=vbat
CRITLO_in1 = "2000"
WARNLO_in1 = "2500"
WARNHI_in1 = "3400"
CRITHI_in1 = "3500"
GAIN_in1=2.25
# GPIOP2 needs to be pulled high for battery voltage reading
GPIOCHIP_in1=0
GPIO_in1=122
# Read it every day so it does not impact battery life
INTERVAL=86400000000
@@ -0,0 +1,17 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
EXTRA_OEMESON:append = " -Dnegative-errno-on-fail=true"
ITEMS = "iio-hwmon-battery.conf"
OCCS = " \
00--00--00--06/sbefifo1-dev0/occ-hwmon.1 \
00--00--00--0a/fsi-master/fsi1/slave@01--00/01--01--00--06/sbefifo2-dev0/occ-hwmon.2 \
"
OCCSFMT = "devices/platform/gpio-fsi/fsi-master/fsi0/slave@00--00/{0}.conf"
OCCITEMS = "${@compose_list(d, 'OCCSFMT', 'OCCS')}"
ENVS = "obmc/hwmon/{0}"
SYSTEMD_ENVIRONMENT_FILE:${PN}:append = " ${@compose_list(d, 'ENVS', 'ITEMS')}"
SYSTEMD_ENVIRONMENT_FILE:${PN}:append = " ${@compose_list(d, 'ENVS', 'OCCITEMS')}"
@@ -0,0 +1,37 @@
---
/xyz/openbmc_project/control/host0/boot/mailbox:
- Interface: xyz.openbmc_project.Control.Boot.Mailbox
Properties:
Supported:
Default: 'true'
IANAEnterpriseNumber:
# This is IBM's IANA Enterprise number expected by petitboot
Default: 2
Data:
# The mailbox must be no smaller that 5 blocks. That is 80 bytes.
# This array does NOT include the 3-byte IANA enterprise number.
# So the minimum is 77 bytes. 512 bytes look enough to accomodate
# all boot settings, yet not too big to waste space.
# 512 - 3 = 509
Default: >
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0}
@@ -0,0 +1,5 @@
/xyz/openbmc_project/time/sync_method:
- Interface: xyz.openbmc_project.Time.Synchronization
Properties:
TimeSyncMethod:
Default: Synchronization::Method::Manual
@@ -0,0 +1,5 @@
FILESEXTRAPATHS:prepend:nicole := "${THISDIR}/${PN}:"
SRC_URI:append:nicole = " \
file://bootmailbox.override.yml \
file://time-sync-method.override.yml \
"
@@ -0,0 +1,47 @@
{
"gpio_configs": {
"power_config": {
"power_good_in": "SYS_PWROK_BUFF",
"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": "CHECKSTOP",
"pin": "J2",
"direction": "falling"
},
{
"name": "POWER_BUTTON",
"pin": "O2",
"direction": "both"
},
{
"name": "ID_BTN",
"pin": "Q7",
"direction": "out"
}
]
}
@@ -0,0 +1 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
@@ -0,0 +1,2 @@
[Unit]
ConditionKernelCommandLine=resetreason=power
@@ -0,0 +1,5 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
DEPS_CFG = "resetreason.conf"
DEPS_TGT = "phosphor-discover-system-state@.service"
SYSTEMD_OVERRIDE:${PN}-discover:append = "${DEPS_CFG}:${DEPS_TGT}.d/${DEPS_CFG}"
@@ -0,0 +1,19 @@
SUMMARY = "Nicole Inventory config for openpower-vpd-parser"
PR = "r1"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
inherit openpower-fru-vpd
inherit native
SRC_URI += "file://inventory"
PROVIDES += "virtual/openpower-fru-inventory"
S = "${WORKDIR}"
do_install() {
DEST=${D}${inventory_datadir_native}
install -d ${DEST}
install inventory ${DEST}
}
@@ -0,0 +1,3 @@
FRUS=BMC,ETHERNET
PATHS=/system/chassis/bmc,/system/chassis/ethernet
EEPROM=/sys/bus/i2c/devices/0-0050/eeprom
@@ -0,0 +1,19 @@
SUMMARY = "FRU properties config for openpower-vpd-parser"
PR = "r1"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
inherit openpower-fru-vpd
inherit native
SRC_URI += "file://properties.yaml"
PROVIDES += "virtual/openpower-fru-properties"
S = "${WORKDIR}"
do_install() {
DEST=${D}${properties_datadir}
install -d ${DEST}
install properties.yaml ${DEST}/out.yaml
}
@@ -0,0 +1,7 @@
/system/chassis/bmc:
xyz.openbmc_project.Inventory.Item:
Present: 'true'
/system/chassis/ethernet:
xyz.openbmc_project.Inventory.Item:
Present: 'true'
@@ -0,0 +1,19 @@
SUMMARY = "Nicole VPD layout for openpower-fru-vpd"
PR = "r1"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
inherit openpower-fru-vpd
inherit native
SRC_URI += "file://layout.yaml"
PROVIDES += "virtual/openpower-fru-vpd-layout"
S = "${WORKDIR}"
do_install() {
DEST=${D}${vpdlayout_datadir}
install -d ${DEST}
install layout.yaml ${DEST}
}
@@ -0,0 +1,14 @@
BMC:
xyz.openbmc_project.Inventory.Decorator.Asset:
OPFR,VP: PartNumber
OPFR,VS: SerialNumber
OPFR,VN: Manufacturer
OPFR,MB: BuildDate
OPFR,DR: Model
xyz.openbmc_project.Inventory.Item:
VINI,DR: PrettyName
xyz.openbmc_project.Inventory.Item.Bmc:
ETHERNET:
xyz.openbmc_project.Inventory.Item.NetworkInterface:
OPFR,B1: MACAddress
xyz.openbmc_project.Inventory.Item.Ethernet:

After

Width:  |  Height:  |  Size: 450 B

+2
View File
@@ -0,0 +1,2 @@
recipes-kernel - The kernel and generic applications/libraries with strong kernel dependencies
recipes-phosphor - Phosphor OpenBMC applications and configuration