diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2021-03-26 01:45:09 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2021-03-27 01:41:36 +0300 |
commit | 12bef3e1bf292dec5ac15af9fb41e86f7bcfb0cb (patch) | |
tree | 608a905372f3f545d2686e29512ae3f5f5b4a78c /meta-openbmc-mods/meta-common/recipes-intel | |
parent | 0a1ece0568a37de9f17fd6e0bcdfd2cad2c6503f (diff) | |
download | openbmc-12bef3e1bf292dec5ac15af9fb41e86f7bcfb0cb.tar.xz |
Update to internal 0.43
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-intel')
5 files changed, 79 insertions, 1 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/configure-usb-c/configure-usb-c.bb b/meta-openbmc-mods/meta-common/recipes-intel/configure-usb-c/configure-usb-c.bb new file mode 100644 index 000000000..66481543b --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/configure-usb-c/configure-usb-c.bb @@ -0,0 +1,25 @@ +SUMMARY = "Configure USB Type C controller" +DESCRIPTION = "Configure USB Type C CC controller which requires basic initialization on every G3 to S5 cycle" + +S = "${WORKDIR}" +SRC_URI = " \ + file://configure-usb-c.sh \ + file://configure-usb-c.service \ + " + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" +RDEPENDS_${PN} += "bash" + +inherit systemd + +FILES_${PN} += "${systemd_system_unitdir}/configure-usb-c.service" + +do_install_append() { + install -d ${D}${bindir} + install -m 0755 ${S}/configure-usb-c.sh ${D}/${bindir}/configure-usb-c.sh + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${S}/configure-usb-c.service ${D}${base_libdir}/systemd/system +} + +SYSTEMD_SERVICE_${PN} = "configure-usb-c.service" diff --git a/meta-openbmc-mods/meta-common/recipes-intel/configure-usb-c/files/configure-usb-c.service b/meta-openbmc-mods/meta-common/recipes-intel/configure-usb-c/files/configure-usb-c.service new file mode 100644 index 000000000..465ddd77f --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/configure-usb-c/files/configure-usb-c.service @@ -0,0 +1,9 @@ +[Unit] +Description=Configure USB Type C controller + +[Service] +ExecStart=/usr/bin/configure-usb-c.sh +Type=oneshot + +[Install] +WantedBy=basic.target diff --git a/meta-openbmc-mods/meta-common/recipes-intel/configure-usb-c/files/configure-usb-c.sh b/meta-openbmc-mods/meta-common/recipes-intel/configure-usb-c/files/configure-usb-c.sh new file mode 100644 index 000000000..c7cc4a231 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-intel/configure-usb-c/files/configure-usb-c.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +I2C_BUS=7 +CHIP_ADDR=0x47 + +read_id() { + local idx=0 + local result=0 + local value=0 + for ((idx=0; idx<6; idx++)) + do + typeset -i value=$(gpioget $(gpiofind "FM_BMC_BOARD_SKU_ID${idx}_N")) + value=$((value << idx)) + result=$((result | value)) + done + echo $result +} + +BOARD_ID=$(read_id) +if grep -q 'CPU part\s*: 0xc07' /proc/cpuinfo; then # AST2600 + if [[ $BOARD_ID == 62 || $BOARD_ID == 61 ]]; then + # Write 0x01 data into General Control Register (offset 0x0A) + # Write 0x21 data into General Control Register (offset 0x0A) + # Write 0x80 data into Connection Status Register (offset 0x08) + # Write 0x20 data into General Control Register (offset 0x0A) + i2cset -y $I2C_BUS $CHIP_ADDR 0x0a 0x01; i2cset -y $I2C_BUS $CHIP_ADDR 0x0a 0x21; i2cset -y $I2C_BUS $CHIP_ADDR 0x08 0x80; i2cset -y $I2C_BUS $CHIP_ADDR 0x0a 0x20 + echo "Configured USB Type C controller" + fi +fi diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_image.py b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_image.py index c077e5318..baa174349 100755 --- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_image.py +++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_image.py @@ -1,4 +1,19 @@ #!/usr/bin/env python3 + +# Copyright (c) 2020 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # coding: utf-8 # our image is contained as parts, including the hash # then it gets zipped up and signed again diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/pfr-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/pfr-manager_%.bbappend index 9a8fa44c0..6b769b941 100644 --- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/pfr-manager_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/pfr-manager_%.bbappend @@ -1,5 +1,5 @@ # Enable downstream autobump SRC_URI = "git://github.com/openbmc/pfr-manager" -SRCREV = "f88197083c3372cfb9167347b3cf9cc26d488a4d" +SRCREV = "00acaffb3840d019bf0853d1ee93fdde947f47d2" DEPENDS += " libgpiod \ " |