diff options
Diffstat (limited to 'meta-yadro')
29 files changed, 734 insertions, 97 deletions
diff --git a/meta-yadro/meta-nicole/conf/bblayers.conf.sample b/meta-yadro/meta-nicole/conf/bblayers.conf.sample new file mode 100644 index 000000000..62622c8cb --- /dev/null +++ b/meta-yadro/meta-nicole/conf/bblayers.conf.sample @@ -0,0 +1,31 @@ +# 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 \ + " +BBLAYERS_NON_REMOVABLE ?= " \ + ##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 \ + " diff --git a/meta-yadro/meta-nicole/conf/conf-notes.txt b/meta-yadro/meta-nicole/conf/conf-notes.txt new file mode 100644 index 000000000..9b3c01a55 --- /dev/null +++ b/meta-yadro/meta-nicole/conf/conf-notes.txt @@ -0,0 +1,2 @@ +Common targets are: + obmc-phosphor-image diff --git a/meta-yadro/meta-nicole/conf/layer.conf b/meta-yadro/meta-nicole/conf/layer.conf new file mode 100644 index 000000000..85d0963da --- /dev/null +++ b/meta-yadro/meta-nicole/conf/layer.conf @@ -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 = "thud warrior" diff --git a/meta-yadro/meta-nicole/conf/local.conf.sample b/meta-yadro/meta-nicole/conf/local.conf.sample new file mode 100644 index 000000000..ba1d82e13 --- /dev/null +++ b/meta-yadro/meta-nicole/conf/local.conf.sample @@ -0,0 +1,216 @@ +# +# 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. +# +# 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 rpm: +PACKAGE_CLASSES ?= "package_rpm" + +# +# SDK/ADT target architecture +# +# This variable specifies the architecture to build SDK/ADT 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 and x86_64 +#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) +# "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, exmap, 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 +# - 'image-mklibs' to reduce shared library files size for an image +# - 'image-prelink' in order to prelink the filesystem image +# - 'image-swab' to perform host system intrusion detection +# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink +# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +USER_CLASSES ?= "buildstats image-mklibs image-prelink" + +# +# 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. To +# enable this uncomment this line. See classes/testimage(-auto).bbclass for +# further details. +#TEST_IMAGE = "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 that 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 \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + +# +# Shared-state files from other locations +# +# As mentioned above, shared state files are prebuilt cache data objects which can +# 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" + + +# +# Qemu configuration +# +# By default qemu will build with a builtin VNC server where graphical output can be +# seen. The two lines below enable the SDL backend too. This assumes there is a +# libsdl library available on your build system. +#PACKAGECONFIG_append_pn-qemu-native = " sdl" +#PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" +#ASSUME_PROVIDED += "libsdl-native" + + +# 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 = "1" diff --git a/meta-yadro/meta-nicole/conf/machine/nicole.conf b/meta-yadro/meta-nicole/conf/machine/nicole.conf new file mode 100644 index 000000000..488e6af11 --- /dev/null +++ b/meta-yadro/meta-nicole/conf/machine/nicole.conf @@ -0,0 +1,13 @@ +KMACHINE = "aspeed" +KERNEL_DEVICETREE = "${KMACHINE}-bmc-opp-${MACHINE}.dtb" + +UBOOT_MACHINE = "ast_g5_ncsi_config" + +PREFERRED_PROVIDER_virtual/p9-vcs-workaround = '' + +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 obmc-leds" diff --git a/meta-yadro/meta-nicole/recipes-kernel/linux/linux-aspeed/arch/arm/boot/dts/aspeed-bmc-opp-nicole.dts b/meta-yadro/meta-nicole/recipes-kernel/linux/linux-aspeed/arch/arm/boot/dts/aspeed-bmc-opp-nicole.dts new file mode 100644 index 000000000..533052294 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-kernel/linux/linux-aspeed/arch/arm/boot/dts/aspeed-bmc-opp-nicole.dts @@ -0,0 +1,249 @@ +// SPDX-License-Identifier: GPL-2.0+ +// Copyright 2019 YADRO +/dts-v1/; +#include "aspeed-g5.dtsi" +#include <dt-bindings/gpio/aspeed-gpio.h> + +/ { + model = "Nicole BMC"; + compatible = "yadro,nicole-bmc", "aspeed,ast2500"; + + chosen { + stdout-path = &uart5; + bootargs = "console=ttyS4,115200 earlyprintk"; + }; + + memory@80000000 { + reg = <0x80000000 0x20000000>; + }; + + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + vga_memory: framebuffer@9f000000 { + no-map; + reg = <0x9f000000 0x01000000>; /* 16M */ + }; + + flash_memory: region@98000000 { + no-map; + reg = <0x98000000 0x04000000>; /* 64M */ + }; + + coldfire_memory: codefire_memory@9ef00000 { + reg = <0x9ef00000 0x00100000>; + no-map; + }; + + gfx_memory: framebuffer { + size = <0x01000000>; + alignment = <0x01000000>; + compatible = "shared-dma-pool"; + reusable; + }; + + video_engine_memory: jpegbuffer { + size = <0x02000000>; /* 32M */ + alignment = <0x01000000>; + compatible = "shared-dma-pool"; + reusable; + }; + }; + + leds { + compatible = "gpio-leds"; + }; + + fsi: gpio-fsi { + compatible = "aspeed,ast2500-cf-fsi-master", "fsi-master"; + #address-cells = <2>; + #size-cells = <0>; + no-gpio-delays; + + memory-region = <&coldfire_memory>; + aspeed,sram = <&sram>; + aspeed,cvic = <&cvic>; + + clock-gpios = <&gpio ASPEED_GPIO(AA, 0) GPIO_ACTIVE_HIGH>; + data-gpios = <&gpio ASPEED_GPIO(AA, 2) GPIO_ACTIVE_HIGH>; + mux-gpios = <&gpio ASPEED_GPIO(A, 6) GPIO_ACTIVE_HIGH>; + enable-gpios = <&gpio ASPEED_GPIO(D, 0) GPIO_ACTIVE_HIGH>; + trans-gpios = <&gpio ASPEED_GPIO(P, 1) GPIO_ACTIVE_HIGH>; + }; + + gpio-keys { + compatible = "gpio-keys"; + + checkstop { + label = "checkstop"; + gpios = <&gpio ASPEED_GPIO(J, 2) GPIO_ACTIVE_LOW>; + linux,code = <ASPEED_GPIO(J, 2)>; + }; + }; +}; + +&fmc { + status = "okay"; + flash@0 { + status = "okay"; + m25p,fast-read; + label = "bmc"; + spi-max-frequency = <50000000>; +#include "openbmc-flash-layout.dtsi" + }; +}; + +&spi1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_spi1_default>; + + flash@0 { + status = "okay"; + m25p,fast-read; + label = "pnor"; + spi-max-frequency = <100000000>; + }; +}; + +&lpc_ctrl { + status = "okay"; + memory-region = <&flash_memory>; + flash = <&spi1>; +}; + +&uart1 { + /* Rear RS-232 connector */ + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_txd1_default + &pinctrl_rxd1_default + &pinctrl_nrts1_default + &pinctrl_ndtr1_default + &pinctrl_ndsr1_default + &pinctrl_ncts1_default + &pinctrl_ndcd1_default + &pinctrl_nri1_default>; +}; + +&uart5 { + status = "okay"; +}; + +&mac0 { + status = "okay"; + + use-ncsi; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_rmii1_default>; +}; + +&i2c1 { + status = "okay"; +}; + +&i2c2 { + status = "okay"; +}; + +&i2c3 { + status = "okay"; +}; + +&i2c4 { + status = "okay"; +}; + +&i2c5 { + status = "okay"; +}; + +&i2c6 { + status = "okay"; + + rtc@32 { + compatible = "epson,rx8900"; + reg = <0x32>; + }; +}; + +&i2c7 { + status = "okay"; +}; + +&i2c8 { + status = "okay"; +}; + +&i2c9 { + status = "okay"; +}; + +&i2c10 { + status = "okay"; +}; + +&i2c11 { + status = "okay"; +}; + +&i2c12 { + status = "okay"; +}; + +&gpio { + nic_func_mode0 { + gpio-hog; + gpios = <ASPEED_GPIO(D, 3) GPIO_ACTIVE_HIGH>; + output-low; + line-name = "nic_func_mode0"; + }; + nic_func_mode1 { + gpio-hog; + gpios = <ASPEED_GPIO(D, 4) GPIO_ACTIVE_HIGH>; + output-low; + line-name = "nic_func_mode1"; + }; + seq_cont { + gpio-hog; + gpios = <ASPEED_GPIO(S, 7) GPIO_ACTIVE_HIGH>; + output-low; + line-name = "seq_cont"; + }; +}; + +&vuart { + status = "okay"; +}; + +&gfx { + status = "okay"; + memory-region = <&gfx_memory>; +}; + +&pinctrl { + aspeed,external-nodes = <&gfx &lhc>; +}; + +&ibt { + status = "okay"; +}; + +&vhub { + status = "okay"; +}; + +&adc { + status = "okay"; +}; + +&video { + status = "okay"; + memory-region = <&video_engine_memory>; +}; + +#include "ibm-power9-dual.dtsi" diff --git a/meta-yadro/meta-nicole/recipes-kernel/linux/linux-aspeed/nicole.cfg b/meta-yadro/meta-nicole/recipes-kernel/linux/linux-aspeed/nicole.cfg new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-kernel/linux/linux-aspeed/nicole.cfg diff --git a/meta-yadro/meta-nicole/recipes-kernel/linux/linux-aspeed_%.bbappend b/meta-yadro/meta-nicole/recipes-kernel/linux/linux-aspeed_%.bbappend new file mode 100644 index 000000000..bd3e47596 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-kernel/linux/linux-aspeed_%.bbappend @@ -0,0 +1,12 @@ +FILESEXTRAPATHS_prepend_nicole := "${THISDIR}/${PN}:" +SRC_URI += "file://nicole.cfg \ + file://arch \ +" + +# Merge source tree by original project with our layer of additional files +do_add_vesnin_files () { + cp -r "${WORKDIR}/arch" \ + "${STAGING_KERNEL_DIR}" +} +addtask do_add_vesnin_files after do_kernel_checkout before do_patch + diff --git a/meta-yadro/meta-nicole/recipes-phosphor/chassis/avsbus-control.bb b/meta-yadro/meta-nicole/recipes-phosphor/chassis/avsbus-control.bb new file mode 100644 index 000000000..854795be3 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/chassis/avsbus-control.bb @@ -0,0 +1,25 @@ +SUMMARY = "Nicole AVSBus control" +PR = "r1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${YADROBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" + +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')}" diff --git a/meta-yadro/meta-nicole/recipes-phosphor/chassis/avsbus-control/avsbus-control.sh b/meta-yadro/meta-nicole/recipes-phosphor/chassis/avsbus-control/avsbus-control.sh new file mode 100755 index 000000000..0330b221f --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/chassis/avsbus-control/avsbus-control.sh @@ -0,0 +1,31 @@ +#!/bin/sh -eu + +function 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 diff --git a/meta-yadro/meta-nicole/recipes-phosphor/chassis/avsbus-control/avsbus-control@.service b/meta-yadro/meta-nicole/recipes-phosphor/chassis/avsbus-control/avsbus-control@.service new file mode 100644 index 000000000..247c506b7 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/chassis/avsbus-control/avsbus-control@.service @@ -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 + diff --git a/meta-yadro/meta-nicole/recipes-phosphor/console/obmc-console/obmc-console.conf b/meta-yadro/meta-nicole/recipes-phosphor/console/obmc-console/obmc-console.conf new file mode 100644 index 000000000..a5ba3f328 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/console/obmc-console/obmc-console.conf @@ -0,0 +1,4 @@ +lpc-address = 0x3f8 +sirq = 4 +local-tty = ttyS0 +local-tty-baud = 115200 diff --git a/meta-yadro/meta-nicole/recipes-phosphor/console/obmc-console_%.bbappend b/meta-yadro/meta-nicole/recipes-phosphor/console/obmc-console_%.bbappend new file mode 100644 index 000000000..72d991c7e --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/console/obmc-console_%.bbappend @@ -0,0 +1 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" diff --git a/meta-yadro/meta-nicole/recipes-phosphor/host/p9-host-start.bbappend b/meta-yadro/meta-nicole/recipes-phosphor/host/p9-host-start.bbappend new file mode 100644 index 000000000..83ef5455a --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/host/p9-host-start.bbappend @@ -0,0 +1,2 @@ +RDEPENDS_${PN}_append = " avsbus-control" +RDEPENDS_${PN}_remove = " p9-vcs-workaround" diff --git a/meta-yadro/meta-nicole/recipes-phosphor/images/obmc-phosphor-image.bbappend b/meta-yadro/meta-nicole/recipes-phosphor/images/obmc-phosphor-image.bbappend new file mode 100644 index 000000000..aa57bbfe6 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/images/obmc-phosphor-image.bbappend @@ -0,0 +1 @@ +OBMC_IMAGE_EXTRA_INSTALL_append = " mboxd" diff --git a/meta-yadro/meta-nicole/recipes-phosphor/mboxd/mboxd_%.bbappend b/meta-yadro/meta-nicole/recipes-phosphor/mboxd/mboxd_%.bbappend new file mode 100644 index 000000000..8b6248a46 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/mboxd/mboxd_%.bbappend @@ -0,0 +1 @@ +MBOXD_FLASH_SIZE = "64M" diff --git a/meta-yadro/meta-nicole/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json b/meta-yadro/meta-nicole/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json new file mode 100644 index 000000000..146b9af46 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json @@ -0,0 +1,72 @@ +{ + "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": "BMC_WD_CLEAR_PULSE_N", + "pin": "N5", + "direction": "falling" + }, + { + "name": "CHECKSTOP", + "pin": "J2", + "direction": "falling" + }, + { + "name": "BMC_CP0_RESET_N", + "pin": "A1", + "direction": "out" + }, + { + "name": "BMC_CP0_PERST_ENABLE_R", + "pin": "A3", + "direction": "out" + }, + { + "name": "BMC_THROTTLE", + "pin": "J3", + "direction": "out" + }, + { + "name": "IDBTN", + "pin": "Q7", + "direction": "out" + }, + { + "name": "POWER_BUTTON", + "pin": "I3", + "direction": "both" + }, + { + "name": "RESET_BUTTON", + "pin": "J1", + "direction": "both" + } + ] +} diff --git a/meta-yadro/meta-nicole/recipes-phosphor/skeleton/obmc-libobmc-intf_%.bbappend b/meta-yadro/meta-nicole/recipes-phosphor/skeleton/obmc-libobmc-intf_%.bbappend new file mode 100644 index 000000000..72d991c7e --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/skeleton/obmc-libobmc-intf_%.bbappend @@ -0,0 +1 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" diff --git a/meta-yadro/meta-nicole/recipes.txt b/meta-yadro/meta-nicole/recipes.txt new file mode 100644 index 000000000..3ec3f4a42 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes.txt @@ -0,0 +1,2 @@ +recipes-kernel - The kernel and generic applications/libraries with strong kernel dependencies +recipes-phosphor - Phosphor OpenBMC applications and configuration diff --git a/meta-yadro/meta-vesnin/conf/machine/vesnin.conf b/meta-yadro/meta-vesnin/conf/machine/vesnin.conf index fc448de86..6ba66faa4 100644 --- a/meta-yadro/meta-vesnin/conf/machine/vesnin.conf +++ b/meta-yadro/meta-vesnin/conf/machine/vesnin.conf @@ -14,8 +14,6 @@ FLASH_SIZE = "32768" SERIAL_CONSOLES = "115200;ttyS2 115200;ttyS4" -PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-inventory = "vesnin-ipmi-inventory-map-native" -PREFERRED_PROVIDER_virtual/phosphor-ipmi-fru-read-inventory = "vesnin-ipmi-inventory-map-read-native" PREFERRED_PROVIDER_virtual/phosphor-led-manager-config-native = "vesnin-led-manager-config-native" PREFERRED_PROVIDER_virtual/openpower-fru-properties = "vesnin-openpower-fru-properties-native" PREFERRED_PROVIDER_virtual/openpower-fru-vpd-layout = "vesnin-openpower-fru-vpd-layout-native" diff --git a/meta-yadro/meta-vesnin/recipes-kernel/linux/linux-aspeed/0001-vesnin-dts-add-mbox-and-lpc_host.patch b/meta-yadro/meta-vesnin/recipes-kernel/linux/linux-aspeed/0001-vesnin-dts-add-mbox-and-lpc_host.patch deleted file mode 100644 index ba03640d6..000000000 --- a/meta-yadro/meta-vesnin/recipes-kernel/linux/linux-aspeed/0001-vesnin-dts-add-mbox-and-lpc_host.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 229cd43c240a8395ac6ed684a5eee7a0586f9724 Mon Sep 17 00:00:00 2001 -From: Alexander Filippov <a.filippov@yadro.com> -Date: Tue, 4 Jun 2019 14:12:00 +0300 -Subject: [PATCH] vesnin: dts: add mbox and lpc_host - -These nodes were removed from our DTS by the ask of Andrew Jeffery as -its are not upstreamed yet. But its are still required to start the -host. - -Signed-off-by: Alexander Filippov <a.filippov@yadro.com> ---- - arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dts | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dts b/arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dts -index 0b9e29c3212e..20f07f5bb4f4 100644 ---- a/arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dts -+++ b/arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dts -@@ -120,6 +120,16 @@ - status = "okay"; - }; - -+&lpc_host { -+ sio_regs: regs { -+ compatible = "aspeed,bmc-misc"; -+ }; -+}; -+ -+&mbox { -+ status = "okay"; -+}; -+ - &uart3 { - status = "okay"; - pinctrl-names = "default"; --- -2.20.1 - diff --git a/meta-yadro/meta-vesnin/recipes-kernel/linux/linux-aspeed/0002-vesnin-remap-aspeed-uart.patch b/meta-yadro/meta-vesnin/recipes-kernel/linux/linux-aspeed/0002-vesnin-remap-aspeed-uart.patch index fb286691d..a745a18a7 100644 --- a/meta-yadro/meta-vesnin/recipes-kernel/linux/linux-aspeed/0002-vesnin-remap-aspeed-uart.patch +++ b/meta-yadro/meta-vesnin/recipes-kernel/linux/linux-aspeed/0002-vesnin-remap-aspeed-uart.patch @@ -1,4 +1,4 @@ -From 85027d94696464269ae77702ead788a14fc8305f Mon Sep 17 00:00:00 2001 +From c10401d8c349610ea9cd29d28f87dd630c907aeb Mon Sep 17 00:00:00 2001 From: Alexander Filippov <a.filippov@yadro.com> Date: Wed, 28 Mar 2018 17:46:28 +0300 Subject: [PATCH] vesnin: remap aspeed-uart @@ -7,14 +7,14 @@ Remaps UART2 <-> UART3 Signed-off-by: Alexander Filippov <a.filippov@yadro.com> --- - drivers/misc/aspeed-lpc-ctrl.c | 8 ++++++++ + drivers/soc/aspeed/aspeed-lpc-ctrl.c | 8 ++++++++ 1 file changed, 8 insertions(+) -diff --git a/drivers/misc/aspeed-lpc-ctrl.c b/drivers/misc/aspeed-lpc-ctrl.c -index 332210e06e98..ce5138474130 100644 ---- a/drivers/misc/aspeed-lpc-ctrl.c -+++ b/drivers/misc/aspeed-lpc-ctrl.c -@@ -27,6 +27,7 @@ +diff --git a/drivers/soc/aspeed/aspeed-lpc-ctrl.c b/drivers/soc/aspeed/aspeed-lpc-ctrl.c +index 01ed21e8bfee..cbdca53a8805 100644 +--- a/drivers/soc/aspeed/aspeed-lpc-ctrl.c ++++ b/drivers/soc/aspeed/aspeed-lpc-ctrl.c +@@ -23,6 +23,7 @@ #define HICR7 0x8 #define HICR8 0xc @@ -22,7 +22,7 @@ index 332210e06e98..ce5138474130 100644 struct aspeed_lpc_ctrl { struct miscdevice miscdev; -@@ -274,6 +275,13 @@ static int aspeed_lpc_ctrl_probe(struct platform_device *pdev) +@@ -271,6 +272,13 @@ static int aspeed_lpc_ctrl_probe(struct platform_device *pdev) goto err; } diff --git a/meta-yadro/meta-vesnin/recipes-kernel/linux/linux-aspeed_%.bbappend b/meta-yadro/meta-vesnin/recipes-kernel/linux/linux-aspeed_%.bbappend index 5a8925301..5680c6938 100644 --- a/meta-yadro/meta-vesnin/recipes-kernel/linux/linux-aspeed_%.bbappend +++ b/meta-yadro/meta-vesnin/recipes-kernel/linux/linux-aspeed_%.bbappend @@ -1,6 +1,5 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" SRC_URI_append_vesnin = "\ file://vesnin.cfg \ - file://0001-vesnin-dts-add-mbox-and-lpc_host.patch \ file://0002-vesnin-remap-aspeed-uart.patch \ " diff --git a/meta-yadro/meta-vesnin/recipes-phosphor/configuration/vesnin-yaml-config.bb b/meta-yadro/meta-vesnin/recipes-phosphor/configuration/vesnin-yaml-config.bb new file mode 100644 index 000000000..dc786e562 --- /dev/null +++ b/meta-yadro/meta-vesnin/recipes-phosphor/configuration/vesnin-yaml-config.bb @@ -0,0 +1,23 @@ +SUMMARY = "YAML configuration for Vesnin" +PR = "r1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${YADROBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" + +inherit allarch + +SRC_URI = " \ + file://vesnin-ipmi-fru.yaml \ + " + +S = "${WORKDIR}" + +do_install() { + install -m 0644 -D vesnin-ipmi-fru.yaml \ + ${D}${datadir}/${BPN}/ipmi-fru-read.yaml +} + +FILES_${PN}-dev = " \ + ${datadir}/${BPN}/ipmi-fru-read.yaml \ + " + +ALLOW_EMPTY_${PN} = "1" diff --git a/meta-yadro/meta-vesnin/recipes-phosphor/ipmi/vesnin-ipmi-inventory-map/config.yaml b/meta-yadro/meta-vesnin/recipes-phosphor/configuration/vesnin-yaml-config/vesnin-ipmi-fru.yaml index 26c7831b9..26c7831b9 100644 --- a/meta-yadro/meta-vesnin/recipes-phosphor/ipmi/vesnin-ipmi-inventory-map/config.yaml +++ b/meta-yadro/meta-vesnin/recipes-phosphor/configuration/vesnin-yaml-config/vesnin-ipmi-fru.yaml diff --git a/meta-yadro/meta-vesnin/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend b/meta-yadro/meta-vesnin/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend new file mode 100644 index 000000000..3ee4501d7 --- /dev/null +++ b/meta-yadro/meta-vesnin/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend @@ -0,0 +1,5 @@ +DEPENDS_append_vesnin = " vesnin-yaml-config" + +EXTRA_OECONF_vesnin = " \ + YAML_GEN=${STAGING_DIR_HOST}${datadir}/vesnin-yaml-config/ipmi-fru-read.yaml \ + " diff --git a/meta-yadro/meta-vesnin/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-yadro/meta-vesnin/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend new file mode 100644 index 000000000..cf846c7fa --- /dev/null +++ b/meta-yadro/meta-vesnin/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend @@ -0,0 +1,5 @@ +DEPENDS_append_vesnin = " vesnin-yaml-config" + +EXTRA_OECONF_vesnin = " \ + FRU_YAML_GEN=${STAGING_DIR_HOST}${datadir}/vesnin-yaml-config/ipmi-fru-read.yaml \ + " diff --git a/meta-yadro/meta-vesnin/recipes-phosphor/ipmi/vesnin-ipmi-inventory-map-native.bb b/meta-yadro/meta-vesnin/recipes-phosphor/ipmi/vesnin-ipmi-inventory-map-native.bb deleted file mode 100644 index efea9368a..000000000 --- a/meta-yadro/meta-vesnin/recipes-phosphor/ipmi/vesnin-ipmi-inventory-map-native.bb +++ /dev/null @@ -1,23 +0,0 @@ -SUMMARY = "Vesnin IPMI to DBus Inventory mapping." -PR = "r1" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://${YADROBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" - -inherit native -inherit phosphor-ipmi-fru - -SRC_URI += "file://config.yaml" - -PROVIDES += "virtual/phosphor-ipmi-fru-inventory" - -S = "${WORKDIR}" - -do_install() { - # TODO: install this to inventory_datadir - # after ipmi-fru-parser untangles the host - # firmware config from the machine inventory. - DEST=${D}${config_datadir} - - install -d ${DEST} - install config.yaml ${DEST} -} diff --git a/meta-yadro/meta-vesnin/recipes-phosphor/ipmi/vesnin-ipmi-inventory-map-read-native.bb b/meta-yadro/meta-vesnin/recipes-phosphor/ipmi/vesnin-ipmi-inventory-map-read-native.bb deleted file mode 100644 index e4d3bd509..000000000 --- a/meta-yadro/meta-vesnin/recipes-phosphor/ipmi/vesnin-ipmi-inventory-map-read-native.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "Vesnin IPMI to DBus Inventory mapping." -PR = "r1" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://${YADROBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" - -inherit native -inherit phosphor-ipmi-host - -FILESEXTRAPATHS_prepend := "${THISDIR}/vesnin-ipmi-inventory-map:" - -SRC_URI += "file://config.yaml" - -PROVIDES += "virtual/phosphor-ipmi-fru-read-inventory" - -S = "${WORKDIR}" - -do_install() { - # TODO: install this to inventory_datadir - # after ipmi-fru-parser untangles the host - # firmware config from the machine inventory. - DEST=${D}${config_datadir} - - install -d ${DEST} - install config.yaml ${DEST} -} |