summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods
diff options
context:
space:
mode:
authorJason M. Bills <jason.m.bills@linux.intel.com>2019-12-06 00:29:56 +0300
committerJason M. Bills <jason.m.bills@linux.intel.com>2019-12-07 00:29:02 +0300
commit243c130a919c7037b5edd3a8097317340796ce85 (patch)
treeaeb0bc9b3b1f7dc804106a605f0177f8ee0e7dc5 /meta-openbmc-mods
parentccd6cab15aedd223a42dfdb110ab2d71d8a87141 (diff)
downloadopenbmc-243c130a919c7037b5edd3a8097317340796ce85.tar.xz
Update to internal 2019-12-05
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Diffstat (limited to 'meta-openbmc-mods')
-rw-r--r--meta-openbmc-mods/conf/layer.conf2
-rw-r--r--meta-openbmc-mods/conf/machine/include/intel.inc6
-rw-r--r--meta-openbmc-mods/meta-ast2500/conf/layer.conf3
-rw-r--r--meta-openbmc-mods/meta-ast2500/conf/machine/include/obmc-bsp-si-common.inc6
-rw-r--r--meta-openbmc-mods/meta-ast2500/recipes-kernel/linux/linux-aspeed_%.bbappend3
-rw-r--r--meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/CYP-baseboard.json3
-rw-r--r--meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/CooperCity.json3
-rw-r--r--meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/J85894-HSBP.json12
-rw-r--r--meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/TNP-baseboard.json3
-rw-r--r--meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/WC-Baseboard.json3
-rw-r--r--meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/WP-Baseboard.json3
-rw-r--r--meta-openbmc-mods/meta-ast2600/conf/layer.conf21
-rw-r--r--meta-openbmc-mods/meta-ast2600/conf/machine/include/intel-ast2600.inc19
-rw-r--r--meta-openbmc-mods/meta-ast2600/conf/machine/include/obmc-bsp-si-common.inc40
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed/intel-ast2600.cfg18
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed_%.bbappend8
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-phosphor/configuration/entity-manager/AC-Baseboard.json2052
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-phosphor/configuration/entity-manager/FCXXPDBASSMBL_PDB.json91
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-phosphor/configuration/entity-manager/MIDPLANE-2U2X12SWITCH.json53
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-phosphor/configuration/entity-manager/OPB2RH-Chassis.json49
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-phosphor/configuration/entity-manager_%.bbappend12
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-phosphor/console/obmc-console/obmc-console.conf3
-rwxr-xr-xmeta-openbmc-mods/meta-ast2600/recipes-phosphor/console/obmc-console/sol-option-check.sh25
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-phosphor/console/obmc-console_%.bbappend8
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes.txt2
-rw-r--r--meta-openbmc-mods/meta-common/classes/image_types_intel_pfr.bbclass4
-rw-r--r--meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-common.bbclass3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch1301
-rw-r--r--meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0027-CPLD-u-boot-commands-support-for-PFR.patch13
-rw-r--r--meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0032-PFR-FW-update-and-checkpoint-support-in-u-boot.patch10
-rw-r--r--meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0102-Add-espi-polling-check.patch141
-rw-r--r--meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/intel.cfg11
-rw-r--r--meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend10
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb9
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/dropbear/dropbear_%.bbappend5
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh55
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_git.bb6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/peci-pcie/peci-pcie_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/safec/safec_3.4.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/security-registers-check/security-registers-check.bb26
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/security-registers-check/security-registers-check/security-registers-check.service10
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/security-registers-check/security-registers-check/security-registers-check.sh42
-rw-r--r--meta-openbmc-mods/meta-common/recipes-devtools/mtd-util/mtd-util.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-extended/pam/pam-ipmi_%.bbappend4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend8
-rw-r--r--meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control.bb24
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/hsbp/hsbp-manager_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-pfr-manager_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-intel-apps.bb3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/psu-manager/psu-manager.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2500-platforms.patch32
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2600-platforms.patch519
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-base-aspeed-g6-dtsi-fixups.patch245
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0002-Add-Aspeed-fmc-spi-driver.patch645
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0002-Enable-pass-through-on-GPIOE1-and-GPIOE3-free.patch86
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0003-Enable-GPIOE0-and-GPIOE2-pass-through-by-default.patch4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0006-Allow-monitoring-of-power-control-input-GPIOs.patch42
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0015-New-flash-map-for-intel.patch2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0016-Add-ASPEED-SGPIO-driver.patch2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0017-SGPIO-DT-and-pinctrl-fixup.patch26
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0018-Update-PECI-drivers-to-sync-with-linux-upstreaming-v.patch2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0019-Add-I2C-IPMB-support.patch2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0022-Add-AST2500-eSPI-driver.patch41
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0026-Add-support-for-new-PECI-commands.patch2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0028-Add-AST2500-JTAG-driver.patch4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0032-misc-aspeed-Add-Aspeed-UART-routing-control-driver.patch55
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0039-Add-Aspeed-PWM-driver-which-uses-FTTMR010-timer-IP.patch2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0043-char-ipmi-Add-clock-control-logic-into-Aspeed-LPC-BT.patch24
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0044-misc-Add-clock-control-logic-into-Aspeed-LPC-SNOOP-d.patch15
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0045-char-ipmi-Add-clock-control-logic-into-Aspeed-LPC-KC.patch40
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0051-Add-AST2500-JTAG-device.patch2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0053-Add-Aspeed-SoC-24xx-and-25xx-families-JTAG.patch3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0054-Documentation-jtag-Add-bindings-for-Aspeed-SoC.patch3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0060-i2c-aspeed-fix-master-pending-state-handling.patch135
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0073-Add-IO-statistics-to-USB-Mass-storage-gadget.patch2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0076-arm-ast2600-add-pwm_tacho-driver-from-aspeed.patch1107
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0078-Fix-NCSI-driver-issue-caused-by-host-shutdown.patch70
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0079-usb-gadget-aspeed-backport-aspeed-vhub-bug-fixes.patch473
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0080-i2c-aspeed-filter-garbage-interrupts-out.patch64
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0081-clk-ast2600-enable-BCLK-for-PCI-PCIe-bus-always.patch32
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0082-ARM-dts-aspeed-g6-add-USB-virtual-hub-fixup.patch53
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0083-usb-gadget-aspeed-add-ast2600-compatible-string.patch32
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0084-ARM-dts-aspeed-g6-add-GFX-node.patch35
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0085-drm-add-AST2600-GFX-support.patch105
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0086-ADC-linux-driver-for-AST2600.patch271
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/intel.cfg15
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend13
-rw-r--r--meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0001-Enhance-DHCP-beyond-just-OFF-and-IPv4-IPv6-enabled.patch657
-rw-r--r--meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network_%.bbappend3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync.bb26
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/.clang-format98
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/CMakeLists.txt40
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/cmake-format.json12
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.cpp265
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.service13
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0001-Reapply-Enhance-DHCP-beyond-just-OFF-and-IPv4-IPv6-e.patch47
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0005-Add-DBUS-interface-of-CPU-and-Memory-s-properties.patch61
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend2
-rwxr-xr-xmeta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru/checkFru.sh9
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend7
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Modify-Get-Lan-Configuration-IP-Address-Source-to-us.patch201
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0013-ipmi-add-set-bios-id-to-whitelist.patch22
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0039-ipmi-add-oem-command-get-AIC-FRU-to-whitelist.patch25
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0050-enable-6-oem-commands.patch15
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0056-add-SetInProgress-to-get-set-boot-option-cmd.patch29
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0059-Move-Set-SOL-config-parameter-to-host-ipmid.patch6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch24
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Enable-watchdog-to-save-useflag-after-host-power-off.patch65
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/host-ipmid-whitelist.conf4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend8
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0012-Do-not-stop-session-in-deactivate-payload.patch48
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/prov-mode-mgr/prov-mode-mgr_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/security-manager/security-manager_git.bb24
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/srvcfg-manager/srvcfg-manager_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/state/post-code-manager/0001-Implement-post-code-manager.patch499
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/state/post-code-manager_git.bb3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/system/callback-manager.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager/0005-Added-suport-for-multiple-user-manager-services.patch34
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/virtual-media/virtual-media.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-utilities/intel-signed-image/files/genimage-si.ini2
-rwxr-xr-xmeta-openbmc-mods/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend3
-rw-r--r--meta-openbmc-mods/meta-egs/conf/bblayers.conf.sample25
-rw-r--r--meta-openbmc-mods/meta-egs/conf/conf-notes.txt6
-rw-r--r--meta-openbmc-mods/meta-egs/conf/layer.conf14
-rw-r--r--meta-openbmc-mods/meta-egs/conf/local.conf.sample29
-rw-r--r--meta-openbmc-mods/meta-egs/conf/machine/intel-ast2600.conf1
-rw-r--r--meta-openbmc-mods/meta-wht/conf/layer.conf4
-rw-r--r--meta-openbmc-mods/meta-wht/conf/local.conf.sample4
-rw-r--r--meta-openbmc-mods/meta-wolfpass/conf/layer.conf2
-rw-r--r--meta-openbmc-mods/meta-wolfpass/conf/local.conf.sample4
152 files changed, 9692 insertions, 1061 deletions
diff --git a/meta-openbmc-mods/conf/layer.conf b/meta-openbmc-mods/conf/layer.conf
index d87e98254..d0a3e4057 100644
--- a/meta-openbmc-mods/conf/layer.conf
+++ b/meta-openbmc-mods/conf/layer.conf
@@ -10,7 +10,7 @@ BBFILE_PATTERN_intel-openbmc = "^${LAYERDIR}/"
BBFILE_PRIORITY_intel-openbmc = "5"
LAYERSERIES_COMPAT_intel-openbmc = "warrior zeus"
-IMAGE_FEATURES[validitems] += "tools-sdk tools-debug"
+IMAGE_FEATURES[validitems] += "tools-sdk tools-debug validation-unsecure"
# static userid assignments
USERADDEXTENSION = "useradd-staticids"
diff --git a/meta-openbmc-mods/conf/machine/include/intel.inc b/meta-openbmc-mods/conf/machine/include/intel.inc
index 8b3b790e9..3b463fd8d 100644
--- a/meta-openbmc-mods/conf/machine/include/intel.inc
+++ b/meta-openbmc-mods/conf/machine/include/intel.inc
@@ -11,9 +11,9 @@ OBMC_MACHINE_FEATURES += "\
VIRTUAL-RUNTIME_skeleton_workbook = "${MACHINE}-config"
VIRTUAL-RUNTIME_obmc-inventory-manager = "entity-manager"
VIRTUAL-RUNTIME_obmc-led-monitor = ""
-VIRTUAL-RUNTIME_obmc-host-state-manager = "intel-chassis-control"
-VIRTUAL-RUNTIME_obmc-chassis-state-manager = "intel-chassis-control"
-VIRTUAL-RUNTIME_obmc-discover-system-state = "intel-chassis-control"
+VIRTUAL-RUNTIME_obmc-host-state-manager = "x86-power-control"
+VIRTUAL-RUNTIME_obmc-chassis-state-manager = "x86-power-control"
+VIRTUAL-RUNTIME_obmc-discover-system-state = "x86-power-control"
VIRTUAL-RUNTIME_obmc-settings-mgmt = "settings"
PREFERRED_PROVIDER_virtual/obmc-host-ipmi-hw = "phosphor-ipmi-kcs"
diff --git a/meta-openbmc-mods/meta-ast2500/conf/layer.conf b/meta-openbmc-mods/meta-ast2500/conf/layer.conf
index da246519f..94fbeff2a 100644
--- a/meta-openbmc-mods/meta-ast2500/conf/layer.conf
+++ b/meta-openbmc-mods/meta-ast2500/conf/layer.conf
@@ -15,7 +15,6 @@ INHERIT += "extrausers"
#INHERIT += " cve-check"
EXTRA_USERS_PARAMS_append_pn-intel-platforms = " \
- usermod -p '\$1\$UGMqyqdG\$FZiylVFmRRfl9Z0Ue8G7e/' root; \
- "
+${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'debug-tweaks', "usermod -p '\$1\$UGMqyqdG\$FZiylVFmRRfl9Z0Ue8G7e/' root;", '', d)}"
hostname_pn-base-files = "intel-obmc"
diff --git a/meta-openbmc-mods/meta-ast2500/conf/machine/include/obmc-bsp-si-common.inc b/meta-openbmc-mods/meta-ast2500/conf/machine/include/obmc-bsp-si-common.inc
index 05ee122a6..3ad449118 100644
--- a/meta-openbmc-mods/meta-ast2500/conf/machine/include/obmc-bsp-si-common.inc
+++ b/meta-openbmc-mods/meta-ast2500/conf/machine/include/obmc-bsp-si-common.inc
@@ -24,8 +24,10 @@ OBMC_IMAGE_EXTRA_INSTALL_append = " u-boot-fw-utils-aspeed"
IMAGE_CLASSES += "image_types image_types_phosphor_auto qemuboot"
IMAGE_CLASSES += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'image_types_intel_pfr', '', d)}"
-INITRAMFS_CTYPE ?= "lzma"
-INITRAMFS_IMAGE = "obmc-phosphor-initramfs"
+# do not generate an initramfs; use the above squashfs-xz as an initrd instead
+INITRAMFS_FSTYPES = ""
+INITRAMFS_CTYPE = ""
+INITRAMFS_IMAGE = ""
MACHINE_FEATURES_BACKFILL_CONSIDERED = "qemu-usermode"
diff --git a/meta-openbmc-mods/meta-ast2500/recipes-kernel/linux/linux-aspeed_%.bbappend b/meta-openbmc-mods/meta-ast2500/recipes-kernel/linux/linux-aspeed_%.bbappend
index 9cb4b4eb3..5d8fa34bf 100644
--- a/meta-openbmc-mods/meta-ast2500/recipes-kernel/linux/linux-aspeed_%.bbappend
+++ b/meta-openbmc-mods/meta-ast2500/recipes-kernel/linux/linux-aspeed_%.bbappend
@@ -1,2 +1,3 @@
+COMPATIBLE_MACHINE = "intel-ast2500"
FILESEXTRAPATHS_prepend := "${THISDIR}/linux-aspeed:"
-SRC_URI += "file://intel-ast2500.cfg" \ No newline at end of file
+SRC_URI += "file://intel-ast2500.cfg"
diff --git a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/CYP-baseboard.json b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/CYP-baseboard.json
index 9a66f3f53..845c444b2 100644
--- a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/CYP-baseboard.json
+++ b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/CYP-baseboard.json
@@ -1424,5 +1424,6 @@
"Model": "$PRODUCT_PRODUCT_NAME",
"PartNumber": "$PRODUCT_PART_NUMBER",
"SerialNumber": "$PRODUCT_SERIAL_NUMBER"
- }
+ },
+ "xyz.openbmc_project.Inventory.Item.Baseboard": {}
} \ No newline at end of file
diff --git a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/CooperCity.json b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/CooperCity.json
index af7f36bd7..3cf6cab1f 100644
--- a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/CooperCity.json
+++ b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/CooperCity.json
@@ -1944,7 +1944,7 @@
"Probe": [
"xyz.openbmc_project.FruDevice({'PRODUCT_PRODUCT_NAME': 'CooperCity'})"
],
- "ProductId": 145,
+ "ProductId": 157,
"Type": "Board",
"xyz.openbmc_project.Inventory.Decorator.Asset": {
"Manufacturer": "$PRODUCT_MANUFACTURER",
@@ -1955,5 +1955,6 @@
"xyz.openbmc_project.Inventory.Decorator.AssetTag": {
"AssetTag": "$PRODUCT_ASSET_TAG"
},
+ "xyz.openbmc_project.Inventory.Item.Baseboard": {},
"xyz.openbmc_project.Inventory.Item.System": {}
} \ No newline at end of file
diff --git a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/J85894-HSBP.json b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/J85894-HSBP.json
index f86a765d2..660b4e2d7 100644
--- a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/J85894-HSBP.json
+++ b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/J85894-HSBP.json
@@ -22,7 +22,7 @@
"Pcie_Slot_3",
"Pcie_Slot_4"
],
- "Name": "HSBP Mux 1",
+ "Name": "HSBP $index Mux 1",
"Type": "PCA9545Mux"
},
{
@@ -34,7 +34,7 @@
"Pcie_Slot_7",
"Pcie_Slot_8"
],
- "Name": "HSBP Mux 2",
+ "Name": "HSBP $index Mux 2",
"Type": "PCA9545Mux"
},
{
@@ -72,7 +72,13 @@
],
"Name": "J85894 HSBP $index",
"PowerState": "On",
- "Probe": "xyz.openbmc_project.FruDevice({'BOARD_PRODUCT_NAME': 'HSBPJ85'})",
+ "Probe": [
+ "FOUND('WC Baseboard')",
+ "OR",
+ "FOUND('WP Baseboard')",
+ "AND",
+ "xyz.openbmc_project.Inventory.Item.I2CDevice({'Bus': 4, 'Address': 82})"
+ ],
"Type": "Board",
"xyz.openbmc_project.Inventory.Decorator.Asset": {
"Manufacturer": "$BOARD_MANUFACTURER",
diff --git a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/TNP-baseboard.json b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/TNP-baseboard.json
index eab8dc33e..c66cc86a2 100644
--- a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/TNP-baseboard.json
+++ b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/TNP-baseboard.json
@@ -1816,5 +1816,6 @@
"Model": "$PRODUCT_PRODUCT_NAME",
"PartNumber": "$PRODUCT_PART_NUMBER",
"SerialNumber": "$PRODUCT_SERIAL_NUMBER"
- }
+ },
+ "xyz.openbmc_project.Inventory.Item.Baseboard": {}
} \ No newline at end of file
diff --git a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/WC-Baseboard.json b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/WC-Baseboard.json
index 5cd32bbec..9c7250d9f 100644
--- a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/WC-Baseboard.json
+++ b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/WC-Baseboard.json
@@ -1903,5 +1903,6 @@
"xyz.openbmc_project.Inventory.Decorator.AssetTag": {
"AssetTag": "$PRODUCT_ASSET_TAG"
},
+ "xyz.openbmc_project.Inventory.Item.Baseboard": {},
"xyz.openbmc_project.Inventory.Item.System": {}
-}
+} \ No newline at end of file
diff --git a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/WP-Baseboard.json b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/WP-Baseboard.json
index dc049344a..6b5e1e514 100644
--- a/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/WP-Baseboard.json
+++ b/meta-openbmc-mods/meta-ast2500/recipes-phosphor/configuration/entity-manager/WP-Baseboard.json
@@ -1887,5 +1887,6 @@
"xyz.openbmc_project.Inventory.Decorator.AssetTag": {
"AssetTag": "$PRODUCT_ASSET_TAG"
},
+ "xyz.openbmc_project.Inventory.Item.Baseboard": {},
"xyz.openbmc_project.Inventory.Item.System": {}
-}
+} \ No newline at end of file
diff --git a/meta-openbmc-mods/meta-ast2600/conf/layer.conf b/meta-openbmc-mods/meta-ast2600/conf/layer.conf
new file mode 100644
index 000000000..becffd7e4
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/conf/layer.conf
@@ -0,0 +1,21 @@
+LOCALCONF_VERSION = "3"
+# 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 += "ast2600"
+BBFILE_PATTERN_ast2600 = ""
+BBFILE_PRIORITY_ast2600 = "6"
+LAYERSERIES_COMPAT_ast2600 = "warrior zeus"
+
+INHERIT += "extrausers"
+#INHERIT += " cve-check"
+
+EXTRA_USERS_PARAMS_append_pn-intel-platforms = " \
+ usermod -p '\$1\$UGMqyqdG\$FZiylVFmRRfl9Z0Ue8G7e/' root; \
+ "
+
+hostname_pn-base-files = "intel-obmc"
diff --git a/meta-openbmc-mods/meta-ast2600/conf/machine/include/intel-ast2600.inc b/meta-openbmc-mods/meta-ast2600/conf/machine/include/intel-ast2600.inc
new file mode 100644
index 000000000..28aeccfb7
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/conf/machine/include/intel-ast2600.inc
@@ -0,0 +1,19 @@
+COMPATIBLE_MACHINE_intel-ast2600 = "intel-ast2600"
+KMACHINE = "aspeed"
+KERNEL_DEVICETREE = "${KMACHINE}-bmc-${COMPATIBLE_MACHINE}.dtb"
+#KERNEL_DEVICETREE = "${KMACHINE}-ast2600-evb.dtb"
+
+require conf/machine/include/ast2600.inc
+require conf/machine/include/obmc-bsp-si-common.inc
+require conf/machine/include/intel.inc
+require conf/distro/include/phosphor-tiny.inc
+
+TARGET_FPU = "hard"
+
+PREFERRED_PROVIDER_u-boot-fw-utils ?= "u-boot-fw-utils-aspeed-sdk"
+
+UBOOT_MACHINE = "evb-ast2600_defconfig"
+
+VIRTUAL-RUNTIME_skeleton_workbook = "${MACHINE}-config"
+
+IMAGE_CLASSES += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'image_types_intel_pfr', '', d)}"
diff --git a/meta-openbmc-mods/meta-ast2600/conf/machine/include/obmc-bsp-si-common.inc b/meta-openbmc-mods/meta-ast2600/conf/machine/include/obmc-bsp-si-common.inc
new file mode 100644
index 000000000..a20f9e650
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/conf/machine/include/obmc-bsp-si-common.inc
@@ -0,0 +1,40 @@
+#@TYPE: Machine
+#@NAME: OpenBMC
+#@DESCRIPTION: Common machine configuration for OpenBMC chips
+
+MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
+EXTRA_IMAGEDEPENDS += "u-boot"
+
+IMAGE_FSTYPES += "squashfs-xz"
+IMAGE_FSTYPES += "mtd-auto"
+EXTRA_IMAGECMD_squashfs-xz_append = "-processors ${BB_NUMBER_THREADS} -b 262144 -Xdict-size 100% -Xbcj arm"
+
+KERNEL_CLASSES ?= "kernel-fitimage"
+KERNEL_IMAGETYPES ?= "fitImage"
+KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
+
+UBOOT_SUFFIX ?= "bin"
+
+MACHINEOVERRIDES =. "openbmc:"
+
+OBMC_PHOSPHOR_IMAGE_OVERLAY= "1"
+
+IMAGE_CLASSES += "image_types image_types_phosphor_auto qemuboot"
+
+# do not generate an initramfs; use the above squashfs-xz as an initrd instead
+INITRAMFS_FSTYPES = ""
+INITRAMFS_CTYPE = ""
+INITRAMFS_IMAGE = ""
+
+MACHINE_FEATURES_BACKFILL_CONSIDERED = "qemu-usermode"
+
+KERNEL_IMAGETYPES += "zImage"
+
+# runqemu
+QB_SYSTEM_NAME = "qemu-system-arm"
+QB_DEFAULT_FSTYPE = "mtd"
+QB_ROOTFS_OPT = "-drive file=@ROOTFS@,format=raw,if=mtd"
+QB_MACHINE = "-M intel-ast2600"
+QB_OPT_APPEND += " -nographic"
+QB_NETWORK_DEVICE = "-net nic,macaddr=C0:FF:EE:00:00:02,model=ftgmac100"
+QB_DEFAULT_KERNEL = "none"
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed/intel-ast2600.cfg b/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed/intel-ast2600.cfg
new file mode 100644
index 000000000..a044ce6cd
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed/intel-ast2600.cfg
@@ -0,0 +1,18 @@
+CONFIG_SENSORS_ASPEED=n
+CONFIG_SENSORS_ASPEED_G6=y
+CONFIG_SPI_ASPEED_SMC=y
+CONFIG_SPI_FMC=y
+CONFIG_I3C=y
+CONFIG_DW_I3C_MASTER=y
+CONFIG_JTAG_ASPEED=n
+CONFIG_U_SERIAL_CONSOLE=n
+CONFIG_KERNEL_LZO=y
+CONFIG_HIGHMEM=n
+CONFIG_I2C_SLAVE_MQUEUE=y
+CONFIG_PINCTRL_ASPEED_G6=y
+CONFIG_DEBUG_LL=n
+CONFIG_DEBUG_LL_UART_8250=n
+CONFIG_EARLY_PRINTK=n
+CONFIG_LOG_BUF_SHIFT=21
+CONFIG_DEBUG_PINCTRL=y
+CONFIG_SUSPEND=n
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed_%.bbappend b/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed_%.bbappend
new file mode 100644
index 000000000..ca534560b
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-kernel/linux/linux-aspeed_%.bbappend
@@ -0,0 +1,8 @@
+COMPATIBLE_MACHINE = "intel-ast2600"
+FILESEXTRAPATHS_prepend := "${THISDIR}/linux-aspeed:"
+#SRCREV="f9e04c3157234671b9d5e27bf9b7025b8b21e0d4"
+#LINUX_VERSION="5.2.11"
+
+# TODO: the base kernel dtsi fixups patch should be pushed upstream
+SRC_URI += "file://intel-ast2600.cfg \
+ "
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-phosphor/configuration/entity-manager/AC-Baseboard.json b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/configuration/entity-manager/AC-Baseboard.json
new file mode 100644
index 000000000..2f692022f
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/configuration/entity-manager/AC-Baseboard.json
@@ -0,0 +1,2052 @@
+{
+ "Exposes": [
+ {
+ "Index": 0,
+ "Name": "A_P12V_PSU_SCALED",
+ "PowerState": "On",
+ "ScaleFactor": 0.1124,
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 13.494
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 13.101
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 10.945
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 10.616
+ }
+ ],
+ "Type": "ADC"
+ },
+ {
+ "Index": 1,
+ "Name": "P12V_AUX",
+ "ScaleFactor": 0.1124,
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 13.494
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 13.101
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 10.945
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 10.616
+ }
+ ],
+ "Type": "ADC"
+ },
+ {
+ "Index": 2,
+ "Name": "P3V3",
+ "PowerState": "On",
+ "ScaleFactor": 0.4107,
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 3.647
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 3.541
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 3.066
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 2.974
+ }
+ ],
+ "Type": "ADC"
+ },
+ {
+ "Index": 3,
+ "Name": "P5V",
+ "PowerState": "On",
+ "ScaleFactor": 0.2698,
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 5.525
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 5.365
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 4.645
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 4.506
+ }
+ ],
+ "Type": "ADC"
+ },
+ {
+ "Index": 4,
+ "Name": "PVNN_PCH_AUX",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 1.081
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 1.049
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 0.807
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0.783
+ }
+ ],
+ "Type": "ADC"
+ },
+ {
+ "Index": 5,
+ "Name": "P105_PCH_AUX",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 1.139
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 1.106
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 0.995
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0.966
+ }
+ ],
+ "Type": "ADC"
+ },
+ {
+ "Index": 6,
+ "Name": "P1V8_AUX",
+ "ScaleFactor": 0.7505,
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 1.961
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 1.904
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 1.699
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 1.648
+ }
+ ],
+ "Type": "ADC"
+ },
+ {
+ "Index": 7,
+ "BridgeGPIO": [
+ {
+ "Name": "A_P3V_BAT_SCALED_EN",
+ "Polarity": "High"
+ }
+ ],
+ "Name": "P3VBAT",
+ "ScaleFactor": 0.3333,
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 3.296
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 3.263
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 2.457
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 2.138
+ }
+ ],
+ "Type": "ADC"
+ },
+ {
+ "CPURequired": 1,
+ "Index": 8,
+ "Name": "PVCCIN_CPU0",
+ "PowerState": "On",
+ "ScaleFactor": 0.7505,
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 2.151
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 2.088
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 1.418
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 1.376
+ }
+ ],
+ "Type": "ADC"
+ },
+ {
+ "CPURequired": 2,
+ "Index": 9,
+ "Name": "PVCCIN_CPU1",
+ "PowerState": "On",
+ "ScaleFactor": 0.7505,
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 2.151
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 2.088
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 1.418
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 1.376
+ }
+ ],
+ "Type": "ADC"
+ },
+ {
+ "CPURequired": 1,
+ "Index": 10,
+ "Name": "PVCCINFAON_CPU0",
+ "PowerState": "On",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 1.19
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 1.155
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 0.752
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0.729
+ }
+ ],
+ "Type": "ADC"
+ },
+ {
+ "CPURequired": 2,
+ "Index": 11,
+ "Name": "PVCCINFAON_CPU1",
+ "PowerState": "On",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 1.19
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 1.155
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 0.752
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0.729
+ }
+ ],
+ "Type": "ADC"
+ },
+ {
+ "CPURequired": 1,
+ "Index": 12,
+ "Name": "PVCCFA_EHV_FIVRA_CPU0",
+ "PowerState": "On",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 1.301
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 1.263
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 1.138
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 1.104
+ }
+ ],
+ "Type": "ADC"
+ },
+ {
+ "CPURequired": 2,
+ "Index": 13,
+ "Name": "PVCCFA_EHV_FIVRA_CPU1",
+ "PowerState": "On",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 1.301
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 1.263
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 1.138
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 1.104
+ }
+ ],
+ "Type": "ADC"
+ },
+ {
+ "CPURequired": 1,
+ "Index": 14,
+ "Name": "PVCCD_HV_CPU0",
+ "PowerState": "On",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 1.301
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 1.263
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 1.138
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 1.104
+ }
+ ],
+ "Type": "ADC"
+ },
+ {
+ "CPURequired": 2,
+ "Index": 15,
+ "Name": "PVCCD_HV_CPU1",
+ "PowerState": "On",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 1.301
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 1.263
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 1.138
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 1.104
+ }
+ ],
+ "Type": "ADC"
+ },
+ {
+ "BindConnector": "System Fan connector 1",
+ "Index": 0,
+ "Name": "Fan 1",
+ "Type": "AspeedFan"
+ },
+ {
+ "BindConnector": "System Fan connector 2",
+ "Index": 1,
+ "Name": "Fan 2",
+ "Type": "AspeedFan"
+ },
+ {
+ "BindConnector": "System Fan connector 3",
+ "Index": 2,
+ "Name": "Fan 3",
+ "Type": "AspeedFan"
+ },
+ {
+ "BindConnector": "System Fan connector 4",
+ "Index": 3,
+ "Name": "Fan 4",
+ "Type": "AspeedFan"
+ },
+ {
+ "BindConnector": "System Fan connector 5",
+ "Index": 4,
+ "Name": "Fan 5",
+ "Type": "AspeedFan"
+ },
+ {
+ "BindConnector": "System Fan connector 6",
+ "Index": 5,
+ "Name": "Fan 6",
+ "Type": "AspeedFan"
+ },
+ {
+ "BindConnector": "System Fan connector 7",
+ "Index": 6,
+ "Name": "Fan 7",
+ "Type": "AspeedFan"
+ },
+ {
+ "BindConnector": "System Fan connector 8",
+ "Index": 7,
+ "Name": "Fan 8",
+ "Type": "AspeedFan"
+ },
+ {
+ "BindConnector": "System Fan connector 9",
+ "Index": 8,
+ "Name": "Fan 9",
+ "Type": "AspeedFan"
+ },
+ {
+ "BindConnector": "System Fan connector 10",
+ "Index": 9,
+ "Name": "Fan 10",
+ "Type": "AspeedFan"
+ },
+ {
+ "C1": 92.16,
+ "C2": 107.52,
+ "MaxCFM": 17.5,
+ "Name": "System Airflow",
+ "TachMaxPercent": 100,
+ "TachMinPercent": 20,
+ "Tachs": [
+ "Fan 1",
+ "Fan 2",
+ "Fan 3",
+ "Fan 4",
+ "Fan 5",
+ "Fan 6",
+ "Fan 7",
+ "Fan 8",
+ "Fan 9",
+ "Fan 10"
+ ],
+ "Type": "CFMSensor"
+ },
+ {
+ "AllowedFailures": 1,
+ "Name": "FanRedundancy",
+ "Type": "FanRedundancy"
+ },
+ {
+ "Direction": "Input",
+ "Index": 214,
+ "Name": "SMI Input",
+ "Polarity": "High",
+ "Type": "Gpio"
+ },
+ {
+ "Direction": "Input",
+ "Index": 218,
+ "Name": "ID Button",
+ "Polarity": "Low",
+ "Type": "Gpio"
+ },
+ {
+ "Name": "System Fan connector 1",
+ "Pwm": 0,
+ "Tachs": [
+ 0
+ ],
+ "Type": "IntelFanConnector"
+ },
+ {
+ "Name": "System Fan connector 2",
+ "Pwm": 1,
+ "Tachs": [
+ 1
+ ],
+ "Type": "IntelFanConnector"
+ },
+ {
+ "Name": "System Fan connector 3",
+ "Pwm": 2,
+ "Tachs": [
+ 2
+ ],
+ "Type": "IntelFanConnector"
+ },
+ {
+ "Name": "System Fan connector 4",
+ "Pwm": 3,
+ "Tachs": [
+ 3
+ ],
+ "Type": "IntelFanConnector"
+ },
+ {
+ "Name": "System Fan connector 5",
+ "Pwm": 4,
+ "Tachs": [
+ 4
+ ],
+ "Type": "IntelFanConnector"
+ },
+ {
+ "Name": "System Fan connector 6",
+ "Pwm": 5,
+ "Tachs": [
+ 5
+ ],
+ "Type": "IntelFanConnector"
+ },
+ {
+ "Name": "System Fan connector 7",
+ "Pwm": 12,
+ "Tachs": [
+ 6
+ ],
+ "Type": "IntelFanConnector"
+ },
+ {
+ "Name": "System Fan connector 8",
+ "Pwm": 13,
+ "Tachs": [
+ 7
+ ],
+ "Type": "IntelFanConnector"
+ },
+ {
+ "Name": "System Fan connector 9",
+ "Pwm": 14,
+ "Tachs": [
+ 8
+ ],
+ "Type": "IntelFanConnector"
+ },
+ {
+ "Name": "System Fan connector 10",
+ "Pwm": 15,
+ "Tachs": [
+ 9
+ ],
+ "Type": "IntelFanConnector"
+ },
+ {
+ "Address": "0x8",
+ "Class": "METemp",
+ "Name": "SSB Temp",
+ "PowerState": "BiosPost",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 103
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 98
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 5
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ }
+ ],
+ "Type": "IpmbSensor"
+ },
+ {
+ "Address": "0xC4",
+ "Class": "MpsBridgeTemp",
+ "Name": "CPU0 VCCIN VR Temp",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 115
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 110
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 5
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ }
+ ],
+ "Type": "IpmbSensor"
+ },
+ {
+ "Address": "0xE0",
+ "Class": "PxeBridgeTemp",
+ "Name": "CPU0 PVCCFA_EHV_FIVRA VR Temp",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 115
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 110
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 5
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ }
+ ],
+ "Type": "IpmbSensor"
+ },
+ {
+ "Address": "0xF0",
+ "Class": "PxeBridgeTemp",
+ "Name": "CPU0 PVCCD VR Temp",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 115
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 110
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 5
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ }
+ ],
+ "Type": "IpmbSensor"
+ },
+ {
+ "Address": "0xC0",
+ "Class": "MpsBridgeTemp",
+ "Name": "CPU1 PVCCIN VR Temp",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 115
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 110
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 5
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ }
+ ],
+ "Type": "IpmbSensor"
+ },
+ {
+ "Address": "0xE8",
+ "Class": "PxeBridgeTemp",
+ "Name": "CPU1 PVCCFA_EHV_FIVRA VR Temp",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 115
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 110
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 5
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ }
+ ],
+ "Type": "IpmbSensor"
+ },
+ {
+ "Address": "0F4",
+ "Class": "PxeBridgeTemp",
+ "Name": "CPU1 PVCCD VR Temp",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 115
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 110
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 5
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ }
+ ],
+ "Type": "IpmbSensor"
+ },
+ {
+ "Address": "0x71",
+ "Bus": 0,
+ "ChannelNames": [
+ "M2Slot1",
+ "M2Slot2"
+ ],
+ "Name": "M2 Mux",
+ "Type": "PCA9543Mux"
+ },
+ {
+ "Address": "0x72",
+ "Bus": 0,
+ "ChannelNames": [
+ "Pcie_Slot_1",
+ "Pcie_Slot_2",
+ "",
+ "FruChannel"
+ ],
+ "Name": "Riser 1 Mux",
+ "Type": "PCA9546Mux"
+ },
+ {
+ "Address": "0x73",
+ "Bus": 0,
+ "ChannelNames": [
+ "Pcie_Slot_1",
+ "Pcie_Slot_2",
+ "",
+ "FruChannel"
+ ],
+ "Name": "Riser 2 Mux",
+ "Type": "PCA9546Mux"
+ },
+ {
+ "Address": "0x70",
+ "Bus": 2,
+ "ChannelNames": [
+ "Pcie_Slot_1",
+ "Pcie_Slot_2",
+ "Pcie_Slot_3",
+ "Pcie_Slot_4"
+ ],
+ "Name": "PCIE Mux",
+ "Type": "PCA9546Mux"
+ },
+ {
+ "Class": "fan",
+ "FFGainCoefficient": 1.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": 0.0,
+ "ILimitMax": 0.0,
+ "ILimitMin": 0.0,
+ "Inputs": [
+ "Fan 1"
+ ],
+ "Name": "Fan 1",
+ "NegativeHysteresis": 0.0,
+ "OutLimitMax": 100.0,
+ "OutLimitMin": 30.0,
+ "Outputs": [
+ "Pwm 1"
+ ],
+ "PCoefficient": 0.0,
+ "PositiveHysteresis": 0.0,
+ "SlewNeg": 0.0,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Left"
+ ]
+ },
+ {
+ "Class": "fan",
+ "FFGainCoefficient": 1.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": 0.0,
+ "ILimitMax": 0.0,
+ "ILimitMin": 0.0,
+ "Inputs": [
+ "Fan 2"
+ ],
+ "Name": "Fan 2",
+ "NegativeHysteresis": 0.0,
+ "OutLimitMax": 100.0,
+ "OutLimitMin": 30.0,
+ "Outputs": [
+ "Pwm 2"
+ ],
+ "PCoefficient": 0.0,
+ "PositiveHysteresis": 0.0,
+ "SlewNeg": 0.0,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Left"
+ ]
+ },
+ {
+ "Class": "fan",
+ "FFGainCoefficient": 1.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": 0.0,
+ "ILimitMax": 0.0,
+ "ILimitMin": 0.0,
+ "Inputs": [
+ "Fan 3"
+ ],
+ "Name": "Fan 3",
+ "NegativeHysteresis": 0.0,
+ "OutLimitMax": 100.0,
+ "OutLimitMin": 30.0,
+ "Outputs": [
+ "Pwm 3"
+ ],
+ "PCoefficient": 0.0,
+ "PositiveHysteresis": 0.0,
+ "SlewNeg": 0.0,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Left"
+ ]
+ },
+ {
+ "Class": "fan",
+ "FFGainCoefficient": 1.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": 0.0,
+ "ILimitMax": 0.0,
+ "ILimitMin": 0.0,
+ "Inputs": [
+ "Fan 4"
+ ],
+ "Name": "Fan 4",
+ "NegativeHysteresis": 0.0,
+ "OutLimitMax": 100.0,
+ "OutLimitMin": 30.0,
+ "Outputs": [
+ "Pwm 4"
+ ],
+ "PCoefficient": 0.0,
+ "PositiveHysteresis": 0.0,
+ "SlewNeg": 0.0,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Left"
+ ]
+ },
+ {
+ "Class": "fan",
+ "FFGainCoefficient": 1.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": 0.0,
+ "ILimitMax": 0.0,
+ "ILimitMin": 0.0,
+ "Inputs": [
+ "Fan 5"
+ ],
+ "Name": "Fan 5",
+ "NegativeHysteresis": 0.0,
+ "OutLimitMax": 100.0,
+ "OutLimitMin": 30.0,
+ "Outputs": [
+ "Pwm 5"
+ ],
+ "PCoefficient": 0.0,
+ "PositiveHysteresis": 0.0,
+ "SlewNeg": 0.0,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Right"
+ ]
+ },
+ {
+ "Class": "fan",
+ "FFGainCoefficient": 1.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": 0.0,
+ "ILimitMax": 0.0,
+ "ILimitMin": 0.0,
+ "Inputs": [
+ "Fan 6"
+ ],
+ "Name": "Fan 6",
+ "NegativeHysteresis": 0.0,
+ "OutLimitMax": 100.0,
+ "OutLimitMin": 30.0,
+ "Outputs": [
+ "Pwm 6"
+ ],
+ "PCoefficient": 0.0,
+ "PositiveHysteresis": 0.0,
+ "SlewNeg": 0.0,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Right"
+ ]
+ },
+ {
+ "Class": "fan",
+ "FFGainCoefficient": 1.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": 0.0,
+ "ILimitMax": 0.0,
+ "ILimitMin": 0.0,
+ "Inputs": [
+ "Fan 7"
+ ],
+ "Name": "Fan 7",
+ "NegativeHysteresis": 0.0,
+ "OutLimitMax": 100.0,
+ "OutLimitMin": 30.0,
+ "Outputs": [
+ "Pwm 12"
+ ],
+ "PCoefficient": 0.0,
+ "PositiveHysteresis": 0.0,
+ "SlewNeg": 0.0,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Right"
+ ]
+ },
+ {
+ "Class": "fan",
+ "FFGainCoefficient": 1.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": 0.0,
+ "ILimitMax": 0.0,
+ "ILimitMin": 0.0,
+ "Inputs": [
+ "Fan 8"
+ ],
+ "Name": "Fan 8",
+ "NegativeHysteresis": 0.0,
+ "OutLimitMax": 100.0,
+ "OutLimitMin": 30.0,
+ "Outputs": [
+ "Pwm 13"
+ ],
+ "PCoefficient": 0.0,
+ "PositiveHysteresis": 0.0,
+ "SlewNeg": 0.0,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Right"
+ ]
+ },
+ {
+ "Class": "fan",
+ "FFGainCoefficient": 1.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": 0.0,
+ "ILimitMax": 0.0,
+ "ILimitMin": 0.0,
+ "Inputs": [
+ "Fan 9"
+ ],
+ "Name": "Fan 9",
+ "NegativeHysteresis": 0.0,
+ "OutLimitMax": 100.0,
+ "OutLimitMin": 30.0,
+ "Outputs": [
+ "Pwm 14"
+ ],
+ "PCoefficient": 0.0,
+ "PositiveHysteresis": 0.0,
+ "SlewNeg": 0.0,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Right"
+ ]
+ },
+ {
+ "Class": "fan",
+ "FFGainCoefficient": 1.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": 0.0,
+ "ILimitMax": 0.0,
+ "ILimitMin": 0.0,
+ "Inputs": [
+ "Fan 10"
+ ],
+ "Name": "Fan 10",
+ "NegativeHysteresis": 0.0,
+ "OutLimitMax": 100.0,
+ "OutLimitMin": 30.0,
+ "Outputs": [
+ "Pwm 15"
+ ],
+ "PCoefficient": 0.0,
+ "PositiveHysteresis": 0.0,
+ "SlewNeg": 0.0,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Right"
+ ]
+ },
+ {
+ "Class": "temp",
+ "FFGainCoefficient": 0.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": -1.0,
+ "ILimitMax": 100,
+ "ILimitMin": 30,
+ "Inputs": [
+ "BMC Temp"
+ ],
+ "Name": "BMC Temp",
+ "NegativeHysteresis": 5.0,
+ "OutLimitMax": 100,
+ "OutLimitMin": 30,
+ "Outputs": [],
+ "PCoefficient": -0.15,
+ "PositiveHysteresis": 0.0,
+ "SetPoint": 80.0,
+ "SlewNeg": -1,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Left"
+ ]
+ },
+ {
+ "Class": "temp",
+ "FFGainCoefficient": 0.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": -1.0,
+ "ILimitMax": 100,
+ "ILimitMin": 30,
+ "Inputs": [
+ "CPU0 North VR Temp"
+ ],
+ "Name": "CPU0 North VR Temp",
+ "NegativeHysteresis": 5.0,
+ "OutLimitMax": 100,
+ "OutLimitMin": 30,
+ "Outputs": [],
+ "PCoefficient": -0.15,
+ "PositiveHysteresis": 0.0,
+ "SetPoint": 80.0,
+ "SlewNeg": -1,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Left"
+ ]
+ },
+ {
+ "Class": "temp",
+ "FFGainCoefficient": 0.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": -1.0,
+ "ILimitMax": 100,
+ "ILimitMin": 30,
+ "Inputs": [
+ "CPU0 South VR Temp"
+ ],
+ "Name": "CPU0 South VR Temp",
+ "NegativeHysteresis": 5.0,
+ "OutLimitMax": 100,
+ "OutLimitMin": 30,
+ "Outputs": [],
+ "PCoefficient": -0.15,
+ "PositiveHysteresis": 0.0,
+ "SetPoint": 80.0,
+ "SlewNeg": -1,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Left"
+ ]
+ },
+ {
+ "Class": "temp",
+ "FFGainCoefficient": 0.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": -1.0,
+ "ILimitMax": 100,
+ "ILimitMin": 30,
+ "Inputs": [
+ "CPU1 North VR Temp"
+ ],
+ "Name": "CPU1 North VR Temp",
+ "NegativeHysteresis": 5.0,
+ "OutLimitMax": 100,
+ "OutLimitMin": 30,
+ "Outputs": [],
+ "PCoefficient": -0.15,
+ "PositiveHysteresis": 0.0,
+ "SetPoint": 80.0,
+ "SlewNeg": -1,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Right"
+ ]
+ },
+ {
+ "Class": "temp",
+ "FFGainCoefficient": 0.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": -1.0,
+ "ILimitMax": 100,
+ "ILimitMin": 30,
+ "Inputs": [
+ "CPU1 South VR Temp"
+ ],
+ "Name": "CPU1 South VR Temp",
+ "NegativeHysteresis": 5.0,
+ "OutLimitMax": 100,
+ "OutLimitMin": 30,
+ "Outputs": [],
+ "PCoefficient": -0.15,
+ "PositiveHysteresis": 0.0,
+ "SetPoint": 80.0,
+ "SlewNeg": -1,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Right"
+ ]
+ },
+ {
+ "Class": "temp",
+ "FFGainCoefficient": 0.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": -1.0,
+ "ILimitMax": 100,
+ "ILimitMin": 30,
+ "Inputs": [
+ "DIMM [ABC]\\d+ CPU1"
+ ],
+ "Name": "CPU1 DIMM ABC",
+ "NegativeHysteresis": 5.0,
+ "OutLimitMax": 100,
+ "OutLimitMin": 30,
+ "Outputs": [],
+ "PCoefficient": -0.15,
+ "PositiveHysteresis": 0.0,
+ "SetPoint": 80.0,
+ "SlewNeg": -1,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Left",
+ "Right"
+ ]
+ },
+ {
+ "Class": "temp",
+ "FFGainCoefficient": 0.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": -1.0,
+ "ILimitMax": 100,
+ "ILimitMin": 30,
+ "Inputs": [
+ "DIMM [DEF]\\d+ CPU1"
+ ],
+ "Name": "CPU1 DIMM DEF",
+ "NegativeHysteresis": 5.0,
+ "OutLimitMax": 100,
+ "OutLimitMin": 30,
+ "Outputs": [],
+ "PCoefficient": -0.15,
+ "PositiveHysteresis": 0.0,
+ "SetPoint": 80.0,
+ "SlewNeg": -1,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Left"
+ ]
+ },
+ {
+ "Class": "temp",
+ "FFGainCoefficient": 0.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": -1.0,
+ "ILimitMax": 100,
+ "ILimitMin": 30,
+ "Inputs": [
+ "DIMM [ABC]\\d+ CPU2"
+ ],
+ "Name": "CPU2 DIMM ABC",
+ "NegativeHysteresis": 5.0,
+ "OutLimitMax": 100,
+ "OutLimitMin": 30,
+ "Outputs": [],
+ "PCoefficient": -0.15,
+ "PositiveHysteresis": 0.0,
+ "SetPoint": 80.0,
+ "SlewNeg": -1,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Right",
+ "PSU"
+ ]
+ },
+ {
+ "Class": "temp",
+ "FFGainCoefficient": 0.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": -1.0,
+ "ILimitMax": 100,
+ "ILimitMin": 30,
+ "Inputs": [
+ "DIMM [DEF]\\d+ CPU2"
+ ],
+ "Name": "CPU2 DIMM DEF",
+ "NegativeHysteresis": 5.0,
+ "OutLimitMax": 100,
+ "OutLimitMin": 30,
+ "Outputs": [],
+ "PCoefficient": -0.15,
+ "PositiveHysteresis": 0.0,
+ "SetPoint": 80.0,
+ "SlewNeg": -1,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Left",
+ "Right"
+ ]
+ },
+ {
+ "Class": "temp",
+ "FFGainCoefficient": 0.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": -1.0,
+ "ILimitMax": 100,
+ "ILimitMin": 30,
+ "Inputs": [
+ "DTS CPU1"
+ ],
+ "Name": "DTS CPU1",
+ "NegativeHysteresis": 5.0,
+ "OutLimitMax": 100,
+ "OutLimitMin": 30,
+ "Outputs": [],
+ "PCoefficient": -0.15,
+ "PositiveHysteresis": 0.0,
+ "SetPoint": 80.0,
+ "SlewNeg": -1,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Left"
+ ]
+ },
+ {
+ "Class": "temp",
+ "FFGainCoefficient": 0.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": -1.0,
+ "ILimitMax": 100,
+ "ILimitMin": 30,
+ "Inputs": [
+ "DTS CPU2"
+ ],
+ "Name": "DTS CPU2",
+ "NegativeHysteresis": 5.0,
+ "OutLimitMax": 100,
+ "OutLimitMin": 30,
+ "Outputs": [],
+ "PCoefficient": -0.15,
+ "PositiveHysteresis": 0.0,
+ "SetPoint": 80.0,
+ "SlewNeg": -1,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Right",
+ "PSU"
+ ]
+ },
+ {
+ "Class": "temp",
+ "FFGainCoefficient": 0.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": -1.0,
+ "ILimitMax": 100,
+ "ILimitMin": 30,
+ "Inputs": [
+ "Left Rear Temp"
+ ],
+ "Name": "Left Rear Temp",
+ "NegativeHysteresis": 5.0,
+ "OutLimitMax": 100,
+ "OutLimitMin": 30,
+ "Outputs": [],
+ "PCoefficient": -0.15,
+ "PositiveHysteresis": 0.0,
+ "SetPoint": 60.0,
+ "SlewNeg": -1,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Left",
+ "Right"
+ ]
+ },
+ {
+ "Class": "temp",
+ "FFGainCoefficient": 0.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": -1.0,
+ "ILimitMax": 100,
+ "ILimitMin": 30,
+ "Inputs": [
+ "Right Rear Board"
+ ],
+ "Name": "Right Rear Board",
+ "NegativeHysteresis": 5.0,
+ "OutLimitMax": 100,
+ "OutLimitMin": 30,
+ "Outputs": [],
+ "PCoefficient": -0.15,
+ "PositiveHysteresis": 0.0,
+ "SetPoint": 60.0,
+ "SlewNeg": -1,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Left"
+ ]
+ },
+ {
+ "Class": "temp",
+ "FFGainCoefficient": 0.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": -1.0,
+ "ILimitMax": 100,
+ "ILimitMin": 30,
+ "Inputs": [
+ "SSB Temp"
+ ],
+ "Name": "SSB Temp",
+ "NegativeHysteresis": 5.0,
+ "OutLimitMax": 100,
+ "OutLimitMin": 30,
+ "Outputs": [],
+ "PCoefficient": -0.15,
+ "PositiveHysteresis": 0.0,
+ "SetPoint": 75.0,
+ "SlewNeg": -1,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Left",
+ "Right"
+ ]
+ },
+ {
+ "Class": "temp",
+ "FFGainCoefficient": 0.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": -1.0,
+ "ILimitMax": 100,
+ "ILimitMin": 30,
+ "Inputs": [
+ "CPU1 VR Mem ABCD Temp",
+ "CPU1 VR Mem ABCD Temp",
+ "CPU1 VR P1V8"
+ ],
+ "Name": "CPU 1 VR Temp",
+ "NegativeHysteresis": 5.0,
+ "OutLimitMax": 100,
+ "OutLimitMin": 30,
+ "Outputs": [],
+ "PCoefficient": -0.15,
+ "PositiveHysteresis": 0.0,
+ "SetPoint": 85.0,
+ "SlewNeg": -1,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Left"
+ ]
+ },
+ {
+ "Class": "temp",
+ "FFGainCoefficient": 0.0,
+ "FFOffCoefficient": 0.0,
+ "ICoefficient": -1.0,
+ "ILimitMax": 100,
+ "ILimitMin": 30,
+ "Inputs": [
+ "CPU2 VR Mem ABCD Temp",
+ "CPU2 VR Mem ABCD Temp",
+ "CPU2 VR P1V8"
+ ],
+ "Name": "CPU 2 VR Temp",
+ "NegativeHysteresis": 5.0,
+ "OutLimitMax": 100,
+ "OutLimitMin": 30,
+ "Outputs": [],
+ "PCoefficient": -0.15,
+ "PositiveHysteresis": 0.0,
+ "SetPoint": 85.0,
+ "SlewNeg": -1,
+ "SlewPos": 0.0,
+ "Type": "Pid",
+ "Zones": [
+ "Right",
+ "PSU"
+ ]
+ },
+ {
+ "FailSafePercent": 100,
+ "MinThermalOutput": 30,
+ "Name": "Left",
+ "Type": "Pid.Zone"
+ },
+ {
+ "FailSafePercent": 100,
+ "MinThermalOutput": 30,
+ "Name": "Right",
+ "Type": "Pid.Zone"
+ },
+ {
+ "FailSafePercent": 100,
+ "MinThermalOutput": 30,
+ "Name": "PSU",
+ "Type": "Pid.Zone"
+ },
+ {
+ "Class": "Ceiling",
+ "Inputs": [
+ "Front Panel Temp"
+ ],
+ "Name": "Front Panel UCC",
+ "NegativeHysteresis": 2,
+ "Output": [
+ 70.0,
+ 80.0
+ ],
+ "PositiveHysteresis": 0,
+ "Profiles": [
+ "Acoustic"
+ ],
+ "Reading": [
+ 22.0,
+ 32.0
+ ],
+ "Type": "Stepwise",
+ "Zones": [
+ "Left",
+ "Right"
+ ]
+ },
+ {
+ "Class": "Floor",
+ "Inputs": [
+ "Front Panel Temp"
+ ],
+ "Name": "Front Panel LCC",
+ "NegativeHysteresis": 2,
+ "Output": [
+ 50.0,
+ 60.0
+ ],
+ "PositiveHysteresis": 0,
+ "Reading": [
+ 20.0,
+ 30.0
+ ],
+ "Type": "Stepwise",
+ "Zones": [
+ "Left",
+ "Right"
+ ]
+ },
+ {
+ "Address": "0x4B",
+ "Bus": 6,
+ "Name": "BMC Temp",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 115
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 110
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 5
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ }
+ ],
+ "Type": "TMP75"
+ },
+ {
+ "Address": "0x4C",
+ "Bus": 6,
+ "Name": "CPU0 North VR Temp",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 115
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 110
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 5
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ }
+ ],
+ "Type": "TMP75"
+ },
+ {
+ "Address": "0x4D",
+ "Bus": 6,
+ "Name": "CPU0 South VR Temp",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 115
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 110
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 5
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ }
+ ],
+ "Type": "TMP75"
+ },
+ {
+ "Address": "0x4E",
+ "Bus": 6,
+ "Name": "CPU1 North VR Temp",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 115
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 110
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 5
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ }
+ ],
+ "Type": "TMP75"
+ },
+ {
+ "Address": "0x4F",
+ "Bus": 6,
+ "Name": "CPU1 South VR Temp",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 115
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 110
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 5
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ }
+ ],
+ "Type": "TMP75"
+ },
+ {
+ "Address": "0x49",
+ "Bus": 6,
+ "Name": "Right Rear Board Temp",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 115
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 110
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 5
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ }
+ ],
+ "Type": "TMP75"
+ },
+ {
+ "Address": "0x48",
+ "Bus": 6,
+ "Name": "Left Rear Board Temp",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 115
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 110
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 5
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ }
+ ],
+ "Type": "TMP75"
+ },
+ {
+ "Address": "0x48",
+ "Bus": 0,
+ "Name": "PCH M.2 Temp",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 115
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 110
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 5
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ }
+ ],
+ "Type": "TMP75"
+ },
+ {
+ "Address": "0x4a",
+ "Bus": 6,
+ "Name": "Inlet BRD Temp",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 115
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 110
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 5
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ }
+ ],
+ "Type": "TMP75"
+ },
+ {
+ "Address": "0x30",
+ "Bus": 0,
+ "CpuID": 1,
+ "Name": "CPU 1",
+ "PresenceGpio": [
+ {
+ "Name": "CPU1_PRESENCE",
+ "Polarity": "Low"
+ }
+ ],
+ "Type": "XeonCPU",
+ "UseWA": 1
+ },
+ {
+ "Address": "0x31",
+ "Bus": 0,
+ "CpuID": 2,
+ "Name": "CPU 2",
+ "PresenceGpio": [
+ {
+ "Name": "CPU2_PRESENCE",
+ "Polarity": "Low"
+ }
+ ],
+ "Type": "XeonCPU",
+ "UseWA": 1
+ }
+ ],
+ "Name": "AC Baseboard",
+ "Probe": [
+ "xyz.openbmc_project.FruDevice({'PRODUCT_PRODUCT_NAME': 'ArcherCity'})"
+ ],
+ "ProductId": 154,
+ "Type": "Board",
+ "xyz.openbmc_project.Inventory.Decorator.Asset": {
+ "Manufacturer": "$PRODUCT_MANUFACTURER",
+ "Model": "$PRODUCT_PRODUCT_NAME",
+ "PartNumber": "$PRODUCT_PART_NUMBER",
+ "SerialNumber": "$PRODUCT_SERIAL_NUMBER"
+ },
+ "xyz.openbmc_project.Inventory.Decorator.AssetTag": {
+ "AssetTag": "$PRODUCT_ASSET_TAG"
+ },
+ "xyz.openbmc_project.Inventory.Item.System": {}
+}
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-phosphor/configuration/entity-manager/FCXXPDBASSMBL_PDB.json b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/configuration/entity-manager/FCXXPDBASSMBL_PDB.json
new file mode 100644
index 000000000..c3615a522
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/configuration/entity-manager/FCXXPDBASSMBL_PDB.json
@@ -0,0 +1,91 @@
+[
+ {
+ "Exposes": [
+ {
+ "Address": "$address",
+ "Bus": "$bus",
+ "Name": "FCXXPDBASSMBL Fru",
+ "Type": "24C01"
+ },
+ {
+ "Address": "0x18",
+ "Bus": "$bus",
+ "Name": "Multi Node Presence Detector",
+ "Type": "MultiNodePresence"
+ },
+ {
+ "Address": "0x48",
+ "Bus": "$bus",
+ "Name": "PDB $index Temp1",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 80
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 75
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 5
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ }
+ ],
+ "Type": "TMP75"
+ },
+ {
+ "Address": "0x49",
+ "Bus": "$bus",
+ "Name": "PDB $index Temp2",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 80
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 75
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 5
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ }
+ ],
+ "Type": "TMP75"
+ }
+ ],
+ "Name": "FCXXPDBASSMBL PDB $index",
+ "Probe": "xyz.openbmc_project.FruDevice({'BOARD_PRODUCT_NAME': 'FCXXPDBASSMBL'})",
+ "Type": "Board",
+ "xyz.openbmc_project.Inventory.Decorator.Asset": {
+ "Manufacturer": "$BOARD_MANUFACTURER",
+ "Model": "$BOARD_PRODUCT_NAME",
+ "PartNumber": "$BOARD_PART_NUMBER",
+ "SerialNumber": "$BOARD_SERIAL_NUMBER"
+ }
+ }
+]
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-phosphor/configuration/entity-manager/MIDPLANE-2U2X12SWITCH.json b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/configuration/entity-manager/MIDPLANE-2U2X12SWITCH.json
new file mode 100644
index 000000000..e55356aba
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/configuration/entity-manager/MIDPLANE-2U2X12SWITCH.json
@@ -0,0 +1,53 @@
+[
+ {
+ "Exposes": [
+ {
+ "Address": "$address",
+ "Bus": "$bus",
+ "Name": "Midplane $ADDRESS % 4 + 1 Fru",
+ "Type": "EEPROM"
+ },
+ {
+ "Address": "$ADDRESS % 4 + 0x4E",
+ "Bus": "$bus",
+ "Name": "Midplane $ADDRESS % 4 + 1 Temp",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 80
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 75
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 5
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ }
+ ],
+ "Type": "TMP75"
+ }
+ ],
+ "Name": "Midplane $ADDRESS % 4",
+ "Probe": "xyz.openbmc_project.FruDevice({'BOARD_PRODUCT_NAME': 'F2U2X12SWITCH'})",
+ "Type": "Board",
+ "xyz.openbmc_project.Inventory.Decorator.Asset": {
+ "Manufacturer": "$BOARD_MANUFACTURER",
+ "Model": "$BOARD_PRODUCT_NAME",
+ "PartNumber": "$BOARD_PART_NUMBER",
+ "SerialNumber": "$BOARD_SERIAL_NUMBER"
+ }
+ }
+]
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-phosphor/configuration/entity-manager/OPB2RH-Chassis.json b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/configuration/entity-manager/OPB2RH-Chassis.json
new file mode 100644
index 000000000..a81329787
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/configuration/entity-manager/OPB2RH-Chassis.json
@@ -0,0 +1,49 @@
+{
+ "Exposes": [
+ {
+ "Address": "0x56",
+ "Bus": 9,
+ "Class": "MCUTemp",
+ "Name": "PDB MCU Temp",
+ "Reg": "0x22",
+ "Thresholds": [
+ {
+ "Direction": "greater than",
+ "Name": "upper critical",
+ "Severity": 1,
+ "Value": 115
+ },
+ {
+ "Direction": "greater than",
+ "Name": "upper non critical",
+ "Severity": 0,
+ "Value": 110
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower non critical",
+ "Severity": 0,
+ "Value": 5
+ },
+ {
+ "Direction": "less than",
+ "Name": "lower critical",
+ "Severity": 1,
+ "Value": 0
+ }
+ ],
+ "Type": "MCUTempSensor"
+ }
+ ],
+ "Name": "OPB2RH Chassis",
+ "Probe": [
+ "xyz.openbmc_project.FruDevice({'BOARD_PRODUCT_NAME': 'FCXXPDBASSMBL'})"
+ ],
+ "Type": "Chassis",
+ "xyz.openbmc_project.Inventory.Decorator.Asset": {
+ "Manufacturer": "Intel Corporation",
+ "Model": "OPB2RH",
+ "PartNumber": "R1234",
+ "SerialNumber": "12345"
+ }
+}
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-phosphor/configuration/entity-manager_%.bbappend b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/configuration/entity-manager_%.bbappend
new file mode 100644
index 000000000..26b41212a
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/configuration/entity-manager_%.bbappend
@@ -0,0 +1,12 @@
+FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
+SRC_URI_append = " file://AC-Baseboard.json \
+ file://FCXXPDBASSMBL_PDB.json \
+ file://OPB2RH-Chassis.json \
+ file://MIDPLANE-2U2X12SWITCH.json"
+
+RDEPENDS_${PN} += " default-fru"
+
+do_install_append(){
+ install -d ${D}/usr/share/entity-manager/configurations
+ install -m 0444 ${WORKDIR}/*.json ${D}/usr/share/entity-manager/configurations
+}
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-phosphor/console/obmc-console/obmc-console.conf b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/console/obmc-console/obmc-console.conf
new file mode 100644
index 000000000..748a26544
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/console/obmc-console/obmc-console.conf
@@ -0,0 +1,3 @@
+baud = 115200
+local-tty = ttyS2
+local-tty-baud = 115200
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-phosphor/console/obmc-console/sol-option-check.sh b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/console/obmc-console/sol-option-check.sh
new file mode 100755
index 000000000..ef32fcb9a
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/console/obmc-console/sol-option-check.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# Copyright 2017 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.
+#
+#
+
+if [ $(grep 192000000 /sys/class/tty/ttyS0/uartclk | wc -l) != 0 ]; then
+ echo "hs-uart"
+ sed -i -e 's/115200/921600/g' /etc/obmc-console.conf
+else
+ echo "normal uart"
+ sed -i -e 's/921600/115200/g' /etc/obmc-console.conf
+fi
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-phosphor/console/obmc-console_%.bbappend b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/console/obmc-console_%.bbappend
new file mode 100644
index 000000000..dee302fd7
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/console/obmc-console_%.bbappend
@@ -0,0 +1,8 @@
+FILESEXTRAPATHS_prepend_intel-ast2600 := "${THISDIR}/${PN}:"
+OBMC_CONSOLE_HOST_TTY = "ttyS2"
+SRC_URI += "file://sol-option-check.sh"
+
+do_install_append() {
+ install -d ${D}${bindir}
+ install -m 0755 ${WORKDIR}/sol-option-check.sh ${D}${bindir}
+}
diff --git a/meta-openbmc-mods/meta-ast2600/recipes.txt b/meta-openbmc-mods/meta-ast2600/recipes.txt
new file mode 100644
index 000000000..3ec3f4a42
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/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-openbmc-mods/meta-common/classes/image_types_intel_pfr.bbclass b/meta-openbmc-mods/meta-common/classes/image_types_intel_pfr.bbclass
index 2e36e4d5c..e15812562 100644
--- a/meta-openbmc-mods/meta-common/classes/image_types_intel_pfr.bbclass
+++ b/meta-openbmc-mods/meta-common/classes/image_types_intel_pfr.bbclass
@@ -46,7 +46,7 @@ do_image_pfr () {
${PFR_SCRIPT_DIR}/pfr_image.py ${PFR_CFG_DIR}/pfr_manifest.json ${DEPLOY_DIR_IMAGE}/image-mtd ${build_version} ${build_number} ${build_hash}
# sign the PFM region
- ${PFR_SCRIPT_DIR}/blocksign -c ${PFR_CFG_DIR}/pfm_config.xml -o ${PFR_IMAGES_DIR}/pfm_signed.bin ${PFR_IMAGES_DIR}/pfm.bin
+ ${PFR_SCRIPT_DIR}/blocksign -c ${PFR_CFG_DIR}/pfm_config.xml -o ${PFR_IMAGES_DIR}/pfm_signed.bin ${PFR_IMAGES_DIR}/pfm.bin -v
# Add the signed PFM to rom image
dd bs=1k conv=notrunc seek=${PFM_OFFSET_PAGE} if=${PFR_IMAGES_DIR}/pfm_signed.bin of=${PFR_IMAGES_DIR}/image-mtd-pfr
@@ -59,7 +59,7 @@ do_image_pfr () {
dd if=${PFR_IMAGES_DIR}/bmc_compressed.bin bs=1k >> ${PFR_IMAGES_DIR}/bmc_unsigned_cap.bin
# Sign the BMC update capsule
- ${PFR_SCRIPT_DIR}/blocksign -c ${PFR_CFG_DIR}/bmc_config.xml -o ${PFR_IMAGES_DIR}/bmc_signed_cap.bin ${PFR_IMAGES_DIR}/bmc_unsigned_cap.bin
+ ${PFR_SCRIPT_DIR}/blocksign -c ${PFR_CFG_DIR}/bmc_config.xml -o ${PFR_IMAGES_DIR}/bmc_signed_cap.bin ${PFR_IMAGES_DIR}/bmc_unsigned_cap.bin -v
# Add the signed bmc update capsule to full rom image @ 0x2a00000
dd bs=1k conv=notrunc seek=${RC_IMAGE_PAGE} if=${PFR_IMAGES_DIR}/bmc_signed_cap.bin of=${PFR_IMAGES_DIR}/image-mtd-pfr
diff --git a/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-common.bbclass b/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-common.bbclass
index 8775c8145..50c2cc278 100644
--- a/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-common.bbclass
+++ b/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-common.bbclass
@@ -38,6 +38,9 @@ IMAGE_INSTALL_append = " \
psu-manager \
kernel-panic-check \
id-led-off \
+ hsbp-manager \
+ security-registers-check \
+ pch-time-sync \
"
IMAGE_INSTALL_append = "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'intel-pfr-manager', '', d)}"
diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch
new file mode 100644
index 000000000..e76c61a15
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch
@@ -0,0 +1,1301 @@
+From e02a837d388a45e4fb12c7d44eb0a1dc62140d29 Mon Sep 17 00:00:00 2001
+From: Vernon Mauery <vernon.mauery@intel.com>
+Date: Thu, 24 Oct 2019 14:06:33 -0700
+Subject: [PATCH] Add ast2600-intel as a new board
+
+Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
+Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+---
+ arch/arm/dts/Makefile | 3 +
+ arch/arm/dts/ast2600-intel.dts | 170 +++++++++++
+ arch/arm/lib/interrupts.c | 5 +
+ arch/arm/mach-aspeed/ast2600/Kconfig | 9 +
+ arch/arm/mach-aspeed/ast2600/aspeed_scu_info.c | 1 +
+ board/aspeed/ast2600_intel/Kconfig | 13 +
+ board/aspeed/ast2600_intel/Makefile | 4 +
+ board/aspeed/ast2600_intel/ast-espi.c | 232 ++++++++++++++
+ board/aspeed/ast2600_intel/ast-irq.c | 399 +++++++++++++++++++++++++
+ board/aspeed/ast2600_intel/ast-irq.h | 8 +
+ board/aspeed/ast2600_intel/ast-timer.c | 59 ++++
+ board/aspeed/ast2600_intel/intel.c | 171 +++++++++++
+ cmd/Kconfig | 2 +-
+ common/autoboot.c | 10 +
+ common/board_r.c | 8 +-
+ include/configs/evb_ast2600.h | 2 +-
+ 16 files changed, 1090 insertions(+), 6 deletions(-)
+ create mode 100644 arch/arm/dts/ast2600-intel.dts
+ create mode 100644 board/aspeed/ast2600_intel/Kconfig
+ create mode 100644 board/aspeed/ast2600_intel/Makefile
+ create mode 100644 board/aspeed/ast2600_intel/ast-espi.c
+ create mode 100644 board/aspeed/ast2600_intel/ast-irq.c
+ create mode 100644 board/aspeed/ast2600_intel/ast-irq.h
+ create mode 100644 board/aspeed/ast2600_intel/ast-timer.c
+ create mode 100644 board/aspeed/ast2600_intel/intel.c
+
+diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
+index d1d4dca340f8..38fe8113469e 100644
+--- a/arch/arm/dts/Makefile
++++ b/arch/arm/dts/Makefile
+@@ -680,6 +680,9 @@ dtb-$(CONFIG_TARGET_EVB_AST2500) += \
+ dtb-$(CONFIG_TARGET_EVB_AST2600) += \
+ ast2600-evb.dtb
+
++dtb-$(CONFIG_TARGET_AST2600_INTEL) += \
++ ast2600-intel.dtb
++
+ dtb-$(CONFIG_TARGET_FPGA_AST2600) += \
+ ast2600-fpga.dtb
+
+diff --git a/arch/arm/dts/ast2600-intel.dts b/arch/arm/dts/ast2600-intel.dts
+new file mode 100644
+index 000000000000..0d362ac7c150
+--- /dev/null
++++ b/arch/arm/dts/ast2600-intel.dts
+@@ -0,0 +1,170 @@
++/dts-v1/;
++
++#include "ast2600-u-boot.dtsi"
++
++/ {
++ memory {
++ device_type = "memory";
++ reg = <0x80000000 0x40000000>;
++ };
++
++ chosen {
++ stdout-path = &uart5;
++ };
++
++ aliases {
++ spi0 = &fmc;
++ ethernet1 = &mac1;
++ };
++
++ cpus {
++ cpu@0 {
++ clock-frequency = <800000000>;
++ };
++ cpu@1 {
++ clock-frequency = <800000000>;
++ };
++ };
++
++ system-leds {
++ compatible = "gpio-leds";
++ green-led {
++ label = "green";
++ gpios = <&gpio0 50 GPIO_ACTIVE_LOW>;
++ default-state = "blink";
++ };
++ amber-led {
++ label = "amber";
++ gpios = <&gpio0 51 GPIO_ACTIVE_LOW>;
++ default-state = "off";
++ };
++ id-led {
++ label = "id";
++ gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
++ default-state = "blink";
++ };
++ hb-led {
++ label = "hb";
++ gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
++ linux,default-trigger = "heartbeat";
++ };
++ };
++};
++
++&gpio0 {
++ status = "okay";
++};
++
++&uart1 {
++ status = "okay";
++};
++
++&uart2 {
++ status = "okay";
++};
++
++&uart5 {
++ u-boot,dm-pre-reloc;
++ status = "okay";
++};
++
++&sdrammc {
++ clock-frequency = <400000000>;
++};
++
++&wdt1 {
++ u-boot,dm-pre-reloc;
++ status = "okay";
++};
++
++&wdt2 {
++ u-boot,dm-pre-reloc;
++ status = "okay";
++};
++
++&wdt3 {
++ u-boot,dm-pre-reloc;
++ status = "okay";
++};
++
++&mdio {
++ status = "okay";
++};
++
++&mac1 {
++ status = "okay";
++
++ phy-mode = "rgmii";
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_mac2link_default &pinctrl_mdio2_default>;
++};
++
++&fmc {
++ status = "okay";
++#if 0
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_fmcquad_default>;
++#endif
++ flash@0 {
++ compatible = "spi-flash", "sst,w25q256";
++ status = "okay";
++ spi-max-frequency = <40000000>;
++ spi-tx-bus-width = <2>;
++ spi-rx-bus-width = <2>;
++ };
++};
++
++&emmc_slot0 {
++ status = "okay";
++ bus-width = <4>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_emmc_default>;
++};
++
++&i2c4 {
++ status = "okay";
++
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_i2c5_default>;
++};
++
++&i2c5 {
++ status = "okay";
++
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_i2c6_default>;
++};
++
++&i2c6 {
++ status = "okay";
++
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_i2c7_default>;
++};
++
++&i2c7 {
++ status = "okay";
++
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_i2c8_default>;
++};
++
++&i2c8 {
++ status = "okay";
++
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_i2c9_default>;
++};
++
++#if 0
++&pcie_bridge0 {
++ status = "okay";
++};
++#else
++&pcie_bridge1 {
++ status = "okay";
++};
++#endif
++&h2x {
++ status = "okay";
++};
+diff --git a/arch/arm/lib/interrupts.c b/arch/arm/lib/interrupts.c
+index ee775ce5d264..8c985532afb4 100644
+--- a/arch/arm/lib/interrupts.c
++++ b/arch/arm/lib/interrupts.c
+@@ -25,6 +25,7 @@
+
+ DECLARE_GLOBAL_DATA_PTR;
+
++int interrupt_init (void) __attribute__((weak));
+ int interrupt_init (void)
+ {
+ /*
+@@ -35,10 +36,13 @@ int interrupt_init (void)
+ return 0;
+ }
+
++void enable_interrupts (void) __attribute__((weak));
+ void enable_interrupts (void)
+ {
+ return;
+ }
++
++int disable_interrupts (void) __attribute__((weak));
+ int disable_interrupts (void)
+ {
+ return 0;
+@@ -189,6 +193,7 @@ void do_fiq (struct pt_regs *pt_regs)
+ bad_mode ();
+ }
+
++void do_irq (struct pt_regs *pt_regs) __attribute__((weak));
+ void do_irq (struct pt_regs *pt_regs)
+ {
+ efi_restore_gd();
+diff --git a/arch/arm/mach-aspeed/ast2600/Kconfig b/arch/arm/mach-aspeed/ast2600/Kconfig
+index 3c208ff3da67..a2a2fe0e24a8 100644
+--- a/arch/arm/mach-aspeed/ast2600/Kconfig
++++ b/arch/arm/mach-aspeed/ast2600/Kconfig
+@@ -24,9 +24,18 @@ config TARGET_FPGA_AST2600
+ FPGA-AST2600 is Aspeed FPGA board for AST2600 chip.
+ This is mainly for internal development. Note that
+ most implementation is co-code with EVB-AST2600.
++
++config TARGET_AST2600_INTEL
++ bool "AST2600-INTEL"
++ depends on ASPEED_AST2600
++ help
++ AST2600-INTEL is an Intel server board with the AST2600
++ as the BMC.
++
+ endchoice
+
+ source "board/aspeed/evb_ast2600/Kconfig"
+ source "board/aspeed/fpga_ast2600/Kconfig"
++source "board/aspeed/ast2600_intel/Kconfig"
+
+ endif
+diff --git a/arch/arm/mach-aspeed/ast2600/aspeed_scu_info.c b/arch/arm/mach-aspeed/ast2600/aspeed_scu_info.c
+index c31e8a3614b0..84ca9f68aee7 100644
+--- a/arch/arm/mach-aspeed/ast2600/aspeed_scu_info.c
++++ b/arch/arm/mach-aspeed/ast2600/aspeed_scu_info.c
+@@ -88,6 +88,7 @@ extern void
+ aspeed_sys_reset_info(void)
+ {
+ u32 rest = readl(ASPEED_SYS_RESET_CTRL);
++ printf("RST: %08x\n", rest);
+
+ if (rest & SYS_PWR_RESET_FLAG) {
+ printf("RST : Power On \n");
+diff --git a/board/aspeed/ast2600_intel/Kconfig b/board/aspeed/ast2600_intel/Kconfig
+new file mode 100644
+index 000000000000..b841dab60c76
+--- /dev/null
++++ b/board/aspeed/ast2600_intel/Kconfig
+@@ -0,0 +1,13 @@
++if TARGET_AST2600_INTEL
++
++config SYS_BOARD
++ default "ast2600_intel"
++
++config SYS_VENDOR
++ default "aspeed"
++
++config SYS_CONFIG_NAME
++ string "board configuration name"
++ default "ast2600_intel"
++
++endif
+diff --git a/board/aspeed/ast2600_intel/Makefile b/board/aspeed/ast2600_intel/Makefile
+new file mode 100644
+index 000000000000..37d2f0064f38
+--- /dev/null
++++ b/board/aspeed/ast2600_intel/Makefile
+@@ -0,0 +1,4 @@
++obj-y += intel.o
++obj-y += ast-espi.o
++obj-y += ast-irq.o
++obj-y += ast-timer.o
+diff --git a/board/aspeed/ast2600_intel/ast-espi.c b/board/aspeed/ast2600_intel/ast-espi.c
+new file mode 100644
+index 000000000000..2778d7b67d54
+--- /dev/null
++++ b/board/aspeed/ast2600_intel/ast-espi.c
+@@ -0,0 +1,232 @@
++/*
++ * Copyright 2018 Intel Corporation
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version
++ * 2 of the License, or (at your option) any later version.
++ */
++
++#include <common.h>
++#include <asm/io.h>
++
++#define AST_LPC_BASE 0x1e6e9000
++#define AST_ESPI_BASE 0x1e6ee000
++#define AST_SCU_BASE 0x1e6e2000
++#define AST_SCU_HW_STRAP1 0x510
++#define SCU_HW_STRAP_ESPI_ENABLED 0x40
++
++#define DEBUG_ESPI_ENABLED 1
++#ifdef DEBUG_ESPI_ENABLED
++#define DBG_ESPI debug
++#else
++#define DBG_ESPI(...)
++#endif
++/* eSPI controller registers */
++#define ESPI000 0x000 /* Engine Control. */
++#define ESPI004 0x004 /* Engine Status. */
++#define ESPI008 0x008 /* Interrupt Status. */
++#define ESPI00C 0x00C /* Interrupt Enable. */
++#define ESPI010 0x010 /* DMA Addr of Peripheral Channel Posted Rx pkt */
++#define ESPI014 0x014 /* Control of Peripheral Channel Posted Rx pkt. */
++#define ESPI018 0x018 /* Data port of Peripheral Channel Posted Rx pkt. */
++#define ESPI020 0x020 /* DMA Addr of Peripheral Channel Posted Tx pkt. */
++#define ESPI024 0x024 /* Control of Peripheral Channel Posted Tx pkt. */
++#define ESPI028 0x028 /* Data port of Peripheral Channel Posted Tx pkt. */
++#define ESPI030 0x030 /* DMA Addr of Peripheral Channel Non-Posted Tx pkt. */
++#define ESPI034 0x034 /* Control of Peripheral Channel Non-Posted Tx pkt. */
++#define ESPI038 0x038 /* Data port of Peripheral Channel Non-Posted Tx pkt. */
++#define ESPI040 0x040 /* DMA Addr of OOB Channel Rx pkt. */
++#define ESPI044 0x044 /* Control of OOB Channel Rx pkt. */
++#define ESPI048 0x048 /* Data port of OOB Channel Rx pkt. */
++#define ESPI050 0x050 /* DMA Addr of OOB Channel Tx pkt. */
++#define ESPI054 0x054 /* Control of OOB Channel Tx pkt. */
++#define ESPI058 0x058 /* Data port of OOB Channel Tx pkt. */
++#define ESPI060 0x060 /* DMA Addr of Flash Channel Rx pkt. */
++#define ESPI064 0x064 /* Control of Flash Channel Rx pkt. */
++#define ESPI068 0x068 /* Data port of Flash Channel Rx pkt. */
++#define ESPI070 0x070 /* DMA Addr of Flash Channel Tx pkt. */
++#define ESPI074 0x074 /* Control of Flash Channel Tx pkt. */
++#define ESPI078 0x078 /* Data port of Flash Channel Tx pkt. */
++#define ESPI084 0x084 /* Mapping Src Addr of Peripheral Channel Rx pkt. */
++#define ESPI088 0x088 /* Mapping Tgt Addr of Peripheral Channel Rx pkt. */
++#define ESPI08C 0x08C /* Mapping Addr Mask of Peripheral Channel Rx pkt. */
++#define ESPI090 0x090 /* Mapping Target Addr and Mask of Flash Channel. */
++#define ESPI094 0x094 /* Interrupt enable of System Event from Master. */
++#define ESPI098 0x098 /* System Event from and to Master. */
++#define ESPI09C 0x09C /* GPIO through Virtual Wire Channel. */
++#define ESPI0A0 0x0A0 /* General Capabilities and Configurations. */
++#define ESPI0A4 0x0A4 /* Channel 0 Capabilities and Configurations. */
++#define ESPI0A8 0x0A8 /* Channel 1 Capabilities and Configurations. */
++#define ESPI0AC 0x0AC /* Channel 2 Capabilities and Configurations. */
++#define ESPI0B0 0x0B0 /* Channel 3 Capabilities and Configurations. */
++#define ESPI0B4 0x0B4 /* GPIO Direction of Virtual Wire Channel. */
++#define ESPI0B8 0x0B8 /* GPIO Selection of Virtual Wire Channel. */
++#define ESPI0BC 0x0BC /* GPIO Reset Selection of Virtual Wire Channel. */
++#define ESPI100 0x100 /* Interrupt enable of System Event 1 from Master. */
++#define ESPI104 0x104 /* System Event 1 from and to Master. */
++#define ESPI110 0x110 /* Interrupt type 0 of System Event from Master. */
++#define ESPI114 0x114 /* Interrupt type 1 of System Event from Master. */
++#define ESPI118 0x118 /* Interrupt type 2 of System Event from Master. */
++#define ESPI11C 0x11C /* Interrupt status of System Event from Master. */
++#define ESPI120 0x120 /* Interrupt type 0 of System Event 1 from Master. */
++#define ESPI124 0x124 /* Interrupt type 1 of System Event 1 from Master. */
++#define ESPI128 0x128 /* Interrupt type 2 of System Event 1 from Master. */
++#define ESPI12C 0x12C /* Interrupt status of System Event 1 from Master. */
++#define ESPICFG004 0x004 /* Device Identification. */
++#define ESPICFG008 0x008 /* General Capabilities and Configurations. */
++#define ESPICFG010 0x010 /* Channel 0 Capabilities and Configurations. */
++#define ESPICFG020 0x020 /* Channel 1 Capabilities and Configurations. */
++#define ESPICFG030 0x030 /* Channel 2 Capabilities and Configurations. */
++#define ESPICFG040 0x040 /* Channel 3 Capabilities and Configurations. */
++#define ESPICFG044 0x044 /* Channel 3 Capabilities and Configurations 2. */
++#define ESPICFG800 0x800 /* GPIO Direction of Virtual Wire Channel. */
++#define ESPICFG804 0x804 /* GPIO Selection of Virtual Wire Channel. */
++#define ESPICFG808 0x808 /* GPIO Reset Selection of Virtual Wire Channel. */
++#define ESPICFG810 0x810 /* Mapping Src Addr of Peripheral Channel Rx pkt */
++#define ESPICFG814 0x814 /* Mapping Tgt Addr of Peripheral Channel Rx pkt */
++#define ESPICFG818 0x818 /* Mapping Addr Mask of Peripheral Channel Rx pkt */
++
++/* ESPI000 bits */
++#define AST_ESPI_OOB_CHRDY (1 << 4)
++#define AST_ESPI_FLASH_SW_CHRDY (0x1 << 7)
++#define AST_ESPI_FLASH_SW_READ (0x1 << 10)
++
++/* ESPI00C bits (Interrupt Enable) */
++#define AST_ESPI_IEN_SYS_EV (1 << 8)
++#define AST_ESPI_IEN_GPIO_EV (1 << 9)
++
++/* ESPI008 bits ISR */
++#define AST_ESPI_VW_SYS_EVT (1 << 8)
++#define AST_ESPI_VW_SYS_EV1 (1 << 22)
++
++/* ESPI098 and ESPI11C bits */
++#define AST_ESPI_OOB_RST_WARN (1 << 6)
++#define AST_ESPI_HOST_RST_WARN (1 << 8)
++#define AST_ESPI_OOB_RST_ACK (1 << 16)
++#define AST_ESPI_SL_BT_DONE (1 << 20)
++#define AST_ESPI_SL_BT_STATUS (1 << 23)
++#define AST_ESPI_HOST_RST_ACK (1 << 27)
++
++/* ESPI104 bits */
++#define AST_ESPI_SUS_WARN (1 << 0)
++#define AST_ESPI_SUS_ACK (1 << 20)
++
++/* LPC chip ID */
++#define SCR0SIO 0x170
++#define IRQ_SRC_ESPI 74 /* IRQ 74 */
++
++static int espi_irq_handler(struct pt_regs *regs)
++{
++ uint32_t irq_status = readl(AST_ESPI_BASE + ESPI008);
++
++ DBG_ESPI("ISR irq_status : 0x%08X\n", irq_status);
++
++ if (irq_status & AST_ESPI_VW_SYS_EVT) {
++ uint32_t sys_status = readl(AST_ESPI_BASE + ESPI11C);
++ uint32_t sys_event = readl(AST_ESPI_BASE + ESPI098);
++
++ DBG_ESPI("sys_status : 0x%08X\n", sys_status);
++ if (sys_status & AST_ESPI_HOST_RST_WARN) {
++ DBG_ESPI("HOST_RST_WARN ev: %08X\n", sys_event);
++ if (sys_event & AST_ESPI_HOST_RST_WARN) {
++ uint32_t v = readl(AST_ESPI_BASE + ESPI098)
++ | AST_ESPI_HOST_RST_ACK;
++ writel(v, AST_ESPI_BASE + ESPI098);
++ }
++ }
++ if (sys_status & AST_ESPI_OOB_RST_WARN) {
++ DBG_ESPI("OOB_RST_WARN ev: %08X\n", sys_event);
++ if (sys_event & AST_ESPI_OOB_RST_WARN) {
++ uint32_t v = readl(AST_ESPI_BASE + ESPI098)
++ | AST_ESPI_OOB_RST_ACK;
++ writel(v, AST_ESPI_BASE + ESPI098);
++ }
++ }
++ writel(sys_status, AST_ESPI_BASE + ESPI11C); // clear status
++ }
++
++ if (irq_status & AST_ESPI_VW_SYS_EV1) {
++ uint32_t sys1_status = readl(AST_ESPI_BASE + ESPI12C);
++ uint32_t sys1_event = readl(AST_ESPI_BASE + ESPI104);
++
++ DBG_ESPI("sys1_status : 0x%08X\n", sys1_status);
++ if (sys1_status & AST_ESPI_SUS_WARN) {
++ DBG_ESPI("SUS WARN ev: %08X\n", sys1_event);
++ if (sys1_event & AST_ESPI_SUS_WARN) {
++ uint32_t v = readl(AST_ESPI_BASE + ESPI104)
++ | AST_ESPI_SUS_ACK;
++ writel(v, AST_ESPI_BASE + ESPI104);
++ }
++ }
++ writel(sys1_status, AST_ESPI_BASE + ESPI12C); // clear status
++ }
++ writel(irq_status, AST_ESPI_BASE + ESPI008); // clear irq_status
++ return 0;
++}
++
++static void espi_handshake_ack(void)
++{
++ // IRQ only serviced if strapped, so no strap check
++ if (!(readl(AST_ESPI_BASE + ESPI098) & AST_ESPI_SL_BT_STATUS)) {
++ DBG_ESPI("Setting espi slave boot done\n");
++ uint32_t v = readl(AST_ESPI_BASE + ESPI098)
++ | AST_ESPI_SL_BT_STATUS | AST_ESPI_SL_BT_DONE;
++ writel(v, AST_ESPI_BASE + ESPI098);
++ }
++
++ if (readl(AST_ESPI_BASE + ESPI104) & AST_ESPI_SUS_WARN) {
++ DBG_ESPI("Boot SUS WARN set %08x\n",
++ readl(AST_ESPI_BASE + ESPI104));
++ uint32_t v = readl(AST_ESPI_BASE + ESPI104) | AST_ESPI_SUS_ACK;
++ writel(v, AST_ESPI_BASE + ESPI104);
++ }
++}
++
++void espi_init(void)
++{
++ if (1 || !readl(AST_SCU_BASE + AST_SCU_HW_STRAP1)
++ & SCU_HW_STRAP_ESPI_ENABLED) {
++ uint32_t v;
++
++ /* Block flash access from Host */
++ v = readl(AST_ESPI_BASE + ESPI000) & ~AST_ESPI_FLASH_SW_CHRDY;
++ v |= AST_ESPI_FLASH_SW_READ | AST_ESPI_OOB_CHRDY;
++ writel(v, AST_ESPI_BASE + ESPI000);
++
++ /* Set SIO register 0x28 to 0xa8 as a faked ASPEED ChipID for
++ * BIOS using in eSPI mode */
++ v = readl(AST_LPC_BASE + SCR0SIO) & ~0x000000ff;
++ writel(v, AST_LPC_BASE + SCR0SIO);
++ v = readl(AST_LPC_BASE + SCR0SIO) | 0xa8;
++ writel(v, AST_LPC_BASE + SCR0SIO);
++
++ v = readl(AST_ESPI_BASE + ESPI000) | AST_ESPI_OOB_CHRDY;
++ writel(v, AST_ESPI_BASE + ESPI000);
++
++ writel(0, AST_ESPI_BASE + ESPI110);
++ writel(0, AST_ESPI_BASE + ESPI114);
++ writel(AST_ESPI_HOST_RST_WARN | AST_ESPI_OOB_RST_WARN,
++ AST_ESPI_BASE + ESPI118);
++ writel(AST_ESPI_HOST_RST_WARN | AST_ESPI_OOB_RST_WARN,
++ AST_ESPI_BASE + ESPI094);
++
++ writel(AST_ESPI_SUS_WARN,
++ AST_ESPI_BASE + ESPI120); // int type 0 susp warn
++ writel(0, AST_ESPI_BASE + ESPI124);
++ writel(0, AST_ESPI_BASE + ESPI128);
++ writel(AST_ESPI_SUS_WARN,
++ AST_ESPI_BASE
++ + ESPI100); // Enable sysev1 ints for susp warn
++
++ writel(AST_ESPI_IEN_SYS_EV,
++ AST_ESPI_BASE + ESPI00C); // Enable only sys events
++
++ espi_handshake_ack();
++
++ irq_install_handler(IRQ_SRC_ESPI, espi_irq_handler, NULL);
++
++ } else {
++ DBG_ESPI("No espi strap\n");
++ }
++}
+diff --git a/board/aspeed/ast2600_intel/ast-irq.c b/board/aspeed/ast2600_intel/ast-irq.c
+new file mode 100644
+index 000000000000..f817f8cd7c81
+--- /dev/null
++++ b/board/aspeed/ast2600_intel/ast-irq.c
+@@ -0,0 +1,399 @@
++/*
++ * Copyright 2018 Intel Corporation
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version
++ * 2 of the License, or (at your option) any later version.
++ */
++
++#include <common.h>
++#include <netdev.h>
++#include <asm/io.h>
++
++DECLARE_GLOBAL_DATA_PTR;
++
++#define GIC_DISTRIBUTOR_OFFSET 0x1000
++#define GIC_CPU_OFFSET 0x2000
++#define GIC_INTERFACE_OFFSET 0x4000
++#define GIC_VIRT_OFFSET 0x6000
++
++#define VIC_STATUS_L 0x80
++#define VIC_STATUS_H 0x84
++#define VIC_IRQ_SELECTION_L 0x98
++#define VIC_IRQ_SELECTION_H 0x9C
++#define VIC_ENABLE_L 0xA0
++#define VIC_ENABLE_H 0xA4
++#define VIC_ENABLE_CLEAR_L 0xA8
++#define VIC_ENABLE_CLEAR_H 0xAC
++#define VIC_INTERRUPT_CLEAR_L 0xD8
++#define VIC_INTERRUPT_CLEAR_H 0xDC
++
++#define VIC_CLEAR_ALL (~0)
++
++/* GIC_DISTRIBUTOR_OFFSET register offsets */
++#define GICD_CTLR 0x000
++#define GICD_TYPER 0x004
++#define GICD_IIDR 0x008
++#define GICD_IGROUPRn 0x080
++#define GICD_ISENABLERn 0x100
++#define GICD_ICENABLERn 0x180
++#define GICD_ISPENDRn 0x200
++#define GICD_ICPENDRn 0x280
++#define GICD_ISACTIVERn 0x300
++#define GICD_ICACTIVERn 0x380
++#define GICD_IPRIORITYRn 0x400
++#define GICD_ITARGETSRn 0x800
++#define GICD_ICFGRn 0xc00
++#define GICD_PPISR 0xd00
++#define GICD_SPISRn 0xd04
++#define GICD_SGIR 0xf00
++#define GICD_CPENDINGIRn 0xf10
++#define GICD_SPENDINGIRn 0xf10
++#define GICD_PIDR4 0xfd0
++#define GICD_PIDR5 0xfd4
++#define GICD_PIDR6 0xfd8
++#define GICD_PIDR7 0xfdc
++#define GICD_PIDR0 0xfe0
++#define GICD_PIDR1 0xfe4
++#define GICD_PIDR2 0xfe8
++#define GICD_PIDR3 0xfec
++#define GICD_CIDR0 0xff0
++#define GICD_CIDR1 0xff4
++#define GICD_CIDR2 0xff8
++#define GICD_CIDR3 0xffc
++
++#define GIC_DISTRIBUTOR_IMPLEMENTER_MAGIC 0x0100143b
++
++/* GIC_CPU_OFFSET register offsets */
++#define GICC_CTLR 0x0000
++#define GICC_PMRn 0x0004
++#define GICC_BPR 0x0008
++#define GICC_IAR 0x000c
++#define GICC_EOIR 0x0010
++#define GICC_RPR 0x0014
++#define GICC_HPPIR 0x0018
++#define GICC_ABPR 0x001c
++#define GICC_AIAR 0x0020
++#define GICC_AEOIR 0x0024
++#define GICC_AHPPIR 0x0028
++#define GICC_APR0 0x00d0
++#define GICC_NSAPR0 0x00e0
++#define GICC_IIDR 0x00fc
++#define GICC_DIR 0x1000
++
++#define GIC_CPU_IMPLEMENTER_MAGIC 0x0102143b
++
++/* GIC_INTERFACE_OFFSET register offsets */
++#define GICH_HCR 0x000
++#define GICH_VTR 0x004
++#define GICH_VMCR 0x008
++#define GICH_MISR 0x010
++#define GICH_EISR0 0x020
++#define GICH_ELSR0 0x020
++#define GICH_APR0 0x0f0
++#define GICH_LR0 0x100
++#define GICH_LR1 0x104
++#define GICH_LR2 0x108
++#define GICH_LR3 0x10c
++
++/* GIC_VIRT_OFFSET register offsets */
++#define GICV_CTLR 0x0000
++#define GICV_PMR 0x0004
++#define GICV_BPR 0x0008
++#define GICV_IAR 0x000c
++#define GICV_EOIR 0x0010
++#define GICV_RPR 0x0014
++#define GICV_HPPIR 0x0018
++#define GICV_ABPR 0x001c
++#define GICV_AIAR 0x0020
++#define GICV_AEOIR 0x0024
++#define GICV_AHPPIR 0x0028
++#define GICV_APR0 0x00d0
++#define GICV_NSAPR0 0x00e0
++#define GICV_IIDR 0x00fc
++#define GICV_DIR 0x1000
++
++#define GIC_VIRT_CPU_IMPLEMENTER_MAGIC 0x0102143b
++
++#define GICD_CTLR_ENABLE 0x03
++
++#define GICD_INT_DEF_PRI 0xa0
++#define GICD_INT_DEF_PRI_X4 (\
++ (GICD_INT_DEF_PRI << 24) |\
++ (GICD_INT_DEF_PRI << 16) |\
++ (GICD_INT_DEF_PRI << 8) |\
++ GICD_INT_DEF_PRI)
++
++#define GICD_INT_ACTLOW_LVLTRIG 0
++#define GICD_INT_EN_CLR_X32 0xffffffff
++#define GICD_INT_EN_CLR_PPI 0xffff0000
++#define GICD_INT_EN_SET_SGI 0x0000ffff
++
++#define gicd_readl(OFFSET) readl(gbase + GIC_DISTRIBUTOR_OFFSET + (OFFSET))
++#define gicd_writel(VALUE, OFFSET) \
++ writel((VALUE), gbase + GIC_DISTRIBUTOR_OFFSET + (OFFSET))
++#define gicc_readl(OFFSET) readl(gbase + GIC_CPU_OFFSET + (OFFSET))
++#define gich_readl(OFFSET) readl(gbase + GIC_INTERFACE_OFFSET + (OFFSET))
++#define gicv_readl(OFFSET) readl(gbase + GIC_VIRT_OFFSET + (OFFSET))
++
++static size_t max_irq = 0;
++
++#define ITLINES_MASK 0x1f
++#define ITLINES_SHIFT 5
++
++#define GIC_MAX_IRQ 1020
++static interrupt_handler_t *handlers[GIC_MAX_IRQ] = {NULL};
++static unsigned long irq_total = 0;
++static unsigned long irq_counts[GIC_MAX_IRQ] = {0};
++static uint32_t gbase = 0;
++
++/* TODO: This, hard-coded, or from dts? */
++static inline uint32_t gic_base(void)
++{
++ uint32_t base;
++ /* read the base address of the private peripheral space */
++ __asm__ __volatile__("mrc p15, 4, %r0, c15, c0, 0\n\t" : "=r"(base) : );
++ return base;
++}
++
++static void enable_gic(void)
++{
++ uint32_t gicd_ctlr;
++
++ /* add GIC offset ref table 1-3 for interrupt distributor address */
++ gicd_ctlr = gicd_readl(GICD_CTLR);
++ gicd_writel(gicd_ctlr | GICD_CTLR_ENABLE, GICD_CTLR);
++}
++
++static void disable_gic(void)
++{
++ uint32_t gicd_ctlr;
++
++ /* add GIC offset ref table 1-3 for interrupt distributor address */
++ gicd_ctlr = gicd_readl(GICD_CTLR);
++ gicd_writel(gicd_ctlr & ~GICD_CTLR_ENABLE, GICD_CTLR);
++}
++
++static void enable_irq_id(unsigned int id)
++{
++ uint32_t grp = id >> ITLINES_SHIFT;
++ uint32_t grp_bit = 1 << (id & ITLINES_MASK);
++ gicd_writel(grp_bit, GICD_ISENABLERn + grp * sizeof(uint32_t));
++}
++
++static void disable_irq_id(unsigned int id)
++{
++ uint32_t grp = id >> ITLINES_SHIFT;
++ uint32_t grp_bit = 1 << (id & ITLINES_MASK);
++ gicd_writel(grp_bit, GICD_ICENABLERn + grp * sizeof(uint32_t));
++}
++
++static int gic_probe(void)
++{
++ int i;
++ gbase = gic_base();
++ enable_gic();
++
++ if (gicd_readl(GICD_IIDR) != GIC_DISTRIBUTOR_IMPLEMENTER_MAGIC &&
++ gicc_readl(GICC_IIDR) != GIC_CPU_IMPLEMENTER_MAGIC &&
++ gicv_readl(GICV_IIDR) != GIC_VIRT_CPU_IMPLEMENTER_MAGIC)
++ {
++ return 0;
++ }
++ /* GIC supports up to 1020 lines */
++ max_irq = ((gicd_readl(GICD_TYPER) & ITLINES_MASK) + 1) << ITLINES_SHIFT;
++ if (max_irq > GIC_MAX_IRQ)
++ max_irq = GIC_MAX_IRQ;
++ /* set all lines to be level triggered N-N */
++ for (i = 32; i < max_irq; i += 16)
++ gicd_writel(0, GICD_ICFGRn + i / 4);
++
++ /* Set priority on all interrupts. */
++ for (i = 0; i < max_irq; i += 4)
++ gicd_writel(GICD_INT_DEF_PRI_X4, GICD_IPRIORITYRn + i);
++
++ /* Deactivate and disable all SPIs. */
++ for (i = 32; i < max_irq; i += 32) {
++ gicd_writel(GICD_INT_EN_CLR_X32, GICD_ICACTIVERn + i / 8);
++ gicd_writel(GICD_INT_EN_CLR_X32, GICD_ICENABLERn + i / 8);
++ }
++ gicd_writel(GICD_INT_EN_CLR_X32, GICD_ICACTIVERn);
++ gicd_writel(GICD_INT_EN_CLR_PPI, GICD_ICENABLERn);
++ gicd_writel(GICD_INT_EN_SET_SGI, GICD_ISENABLERn);
++
++ return 0;
++}
++
++void irq_free_handler (int irq);
++static void gic_shutdown(void)
++{
++ int i;
++ for (i = 0; i < max_irq; i++)
++ {
++ irq_free_handler(i);
++ }
++ disable_gic();
++}
++
++int arch_interrupt_init_early(void)
++{
++ return 0;
++}
++
++int arch_interrupt_init(void)
++{
++ int i;
++ for (i = 0; i < GIC_MAX_IRQ; i++)
++ {
++ handlers[i] = NULL;
++ irq_counts[i] = 0;
++ }
++ return gic_probe();
++}
++
++int arch_interrupt_fini(void)
++{
++ gic_shutdown();
++ return 0;
++}
++
++int interrupt_init (void)
++{
++ /*
++ * setup up stacks if necessary
++ */
++ IRQ_STACK_START_IN = gd->irq_sp + 8;
++
++ printf("%s()\n", __FUNCTION__);
++ return arch_interrupt_init();
++
++ return 0;
++}
++
++int global_interrupts_enabled (void)
++{
++ unsigned long cpsr;
++ __asm__ __volatile__("mrs %0, cpsr\n"
++ : "=r" (cpsr)
++ :
++ : "memory");
++
++ return (cpsr & 0x80) == 0;
++}
++
++void enable_interrupts (void)
++{
++ unsigned long cpsr;
++ __asm__ __volatile__("mrs %0, cpsr\n"
++ "bic %0, %0, #0x80\n"
++ "msr cpsr_c, %0"
++ : "=r" (cpsr)
++ :
++ : "memory");
++
++ return;
++}
++
++int disable_interrupts (void)
++{
++ unsigned long cpsr, temp;
++ __asm__ __volatile__("mrs %0, cpsr\n"
++ "orr %1, %0, #0xc0\n"
++ "msr cpsr_c, %1"
++ : "=r" (cpsr), "=r" (temp)
++ :
++ : "memory");
++ return (cpsr & 0x80) == 0;
++}
++
++void irq_install_handler(int irq, interrupt_handler_t *handler, void *ctx)
++{
++ if (irq > max_irq) {
++ printf("irq %d out of range\n", irq);
++ return;
++ }
++ if (handlers[irq]) {
++ printf("irq %d already in use (%p)\n", irq, handlers[irq]);
++ return;
++ }
++ printf("registering handler for irq %d\n", irq);
++ handlers[irq] = handler;
++ enable_irq_id(irq);
++}
++
++void irq_free_handler (int irq)
++{
++ if (irq >= max_irq) {
++ printf("irq %d out of range\n", irq);
++ return;
++ }
++ if (handlers[irq]) {
++ handlers[irq] = NULL;
++ disable_irq_id(irq);
++ }
++}
++
++int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
++{
++ int i;
++ int enabled = global_interrupts_enabled();
++ printf("GIC base = 0x%x\n", gbase);
++ printf("interrupts %sabled\n", (enabled ? "en" : "dis"));
++ uint32_t grp_en = 0;
++ for (i = 0; i < max_irq; i++) {
++ if ((i & ITLINES_MASK) == 0)
++ grp_en = gicd_readl(GICD_ISENABLERn +
++ (i >> ITLINES_SHIFT) * sizeof(uint32_t));
++ int irq_enabled = grp_en & (1 << (i & ITLINES_MASK));
++ if (!irq_enabled)
++ continue;
++ printf("% 2i (% 3s): %lu\n", i,
++ (irq_enabled ? "on" : "off"), irq_counts[i]);
++ }
++ printf("total: %lu\n", irq_total);
++ return 0;
++}
++
++void do_irq(struct pt_regs *pt_regs)
++{
++ int i;
++ if (!gbase) {
++ static int printed_msg = 0;
++ if (!printed_msg)
++ {
++ printed_msg = 1;
++ printf("interrupt before configured!\n");
++ }
++ return;
++ }
++ irq_total++;
++ uint32_t grp_pend = 0;
++ for (i = 0; i < max_irq; i++) {
++ /* limit reads of the pending register to once in 32 */
++ if ((i & ITLINES_MASK) == 0)
++ grp_pend = gicd_readl(GICD_ISPENDRn +
++ (i >> ITLINES_SHIFT) * sizeof(uint32_t));
++ uint32_t pending = grp_pend & (1 << (i & ITLINES_MASK));
++ if (pending) {
++ irq_counts[i]++;
++ /* mask via GICD_ICENABLERn */
++ gicd_writel(pending, GICD_ICENABLERn +
++ (i >> ITLINES_SHIFT) * sizeof(uint32_t));
++ if (handlers[i]) {
++ handlers[i](pt_regs);
++ /* unmask via GICD_ISENABLERn */
++ gicd_writel(pending, GICD_ISENABLERn +
++ (i >> ITLINES_SHIFT) * sizeof(uint32_t));
++ /* clear pending via GICD_ICPENDRn */
++ gicd_writel(pending, GICD_ICPENDRn +
++ (i >> ITLINES_SHIFT) * sizeof(uint32_t));
++ } else {
++ printf("unexpected interrupt %i; masking\n", i);
++ /* clear pending via GICD_ICPENDRn */
++ gicd_writel(pending, GICD_ISPENDRn +
++ (i >> ITLINES_SHIFT) * sizeof(uint32_t));
++ }
++ }
++ }
++}
+diff --git a/board/aspeed/ast2600_intel/ast-irq.h b/board/aspeed/ast2600_intel/ast-irq.h
+new file mode 100644
+index 000000000000..9957f2baa7ff
+--- /dev/null
++++ b/board/aspeed/ast2600_intel/ast-irq.h
+@@ -0,0 +1,8 @@
++#ifndef _AST_IRQ_H_
++#define _AST_IRQ_H_
++
++int request_irq(int irq, interrupt_handler_t *handler);
++int release_irq(int irq);
++int arch_interrupt_init_early(void);
++
++#endif
+diff --git a/board/aspeed/ast2600_intel/ast-timer.c b/board/aspeed/ast2600_intel/ast-timer.c
+new file mode 100644
+index 000000000000..cf8c69aba5d3
+--- /dev/null
++++ b/board/aspeed/ast2600_intel/ast-timer.c
+@@ -0,0 +1,59 @@
++/*
++ * Copyright 2019 Intel Corporation
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version
++ * 2 of the License, or (at your option) any later version.
++ */
++
++#include <common.h>
++#include <asm/io.h>
++
++static const int timer_irqs[] = {48, 49, 50, 51, 52, 53, 54, 55};
++#define AST_TIMER_BASE 0x1e782000
++/* offsets from AST_TIMER_BASE for each timer */
++static const uint32_t timer_bases[] = {0, 0x10, 0x20, 0x40,
++ 0x50, 0x60, 0x70, 0x80};
++#define TIMER_1MHZ_CLK_COUNT 1000000u
++#define TIMER_ENABLE 1
++#define TIMER_1MHZ_CLK_SEL 2
++#define TIMER_ENABLE_IRQ 4
++#define TIMER_RESET_BY_WDT 8
++#define TIMER_CONTROL 0x30
++#define TIMER_RELOAD 0x04
++#define TIMER_CONTROL_CLEAR 0x3c
++
++void timer_disable(int n)
++{
++ if (n < 0 || n > 7) {
++ return;
++ }
++ uint32_t tctrl = 0xf << (n * 4);
++ writel(tctrl, AST_TIMER_BASE + TIMER_CONTROL_CLEAR);
++}
++
++void timer_enable(int n, uint32_t freq, interrupt_handler_t *handler)
++{
++ if (n < 0 || n > 7) {
++ return;
++ }
++ if (!freq)
++ return;
++
++ timer_disable(n);
++
++ uint32_t v = TIMER_1MHZ_CLK_COUNT / freq;
++ writel(v, AST_TIMER_BASE + timer_bases[n] + TIMER_RELOAD);
++
++ uint32_t tctrl = (
++ TIMER_ENABLE |
++ TIMER_1MHZ_CLK_SEL |
++ TIMER_RESET_BY_WDT) << (n * 4);
++
++ if (handler) {
++ irq_install_handler(timer_irqs[n], handler, NULL);
++ tctrl |= (TIMER_ENABLE_IRQ << (n * 4));
++ }
++ writel(tctrl, AST_TIMER_BASE + TIMER_CONTROL);
++}
+diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c
+new file mode 100644
+index 000000000000..100eb1ec5d21
+--- /dev/null
++++ b/board/aspeed/ast2600_intel/intel.c
+@@ -0,0 +1,171 @@
++/* Intel customizations of Das U-Boot */
++#include <common.h>
++#include <asm/gpio.h>
++#include <asm/io.h>
++
++/* use GPIOC0 on intel boards */
++#define FFUJ_GPIO "gpio@1e78000016"
++
++int read_ffuj(void)
++{
++ struct gpio_desc desc;
++ int ret;
++
++ ret = dm_gpio_lookup_name(FFUJ_GPIO, &desc);
++ if (ret)
++ return ret;
++ ret = dm_gpio_request(&desc, "ffuj");
++ if (ret)
++ return ret;
++ ret = dm_gpio_set_dir_flags(&desc, GPIOD_ACTIVE_LOW);
++ if (ret)
++ return ret;
++ ret = dm_gpio_get_value(&desc);
++ dm_gpio_free(desc.dev, &desc);
++ return ret;
++}
++
++/* gpio_abort is a weak symbol in common/autoboot.c */
++int gpio_abort(void)
++{
++ int value;
++ /* check ffuj to abort the autoboot */
++ value = read_ffuj();
++ printf("FFUJ: %d\n", value);
++ return value <= 0 ? 0 : 1;
++}
++
++int misc_init_r(void)
++{
++ /* This is called near the end of the _r init sequence */
++
++ return 0;
++}
++
++static void gpio_passthru_init(void)
++{
++ /* FIXME: do this without the hard-coded SCU values */
++ /* enable passthru gpio (for now) */
++ writel(0x0f000000, 0x1e6e24bc);
++ writel(0xc0000060, 0x1e6e2418);
++}
++
++#define AST_LPC_BASE 0x1e789000
++#define LPC_SNOOP_ADDR 0x80
++#define HICR5 0x080 /* Host Interface Control Register 5 */
++#define HICR6 0x084 /* Host Interface Control Register 6 */
++#define SNPWADR 0x090 /* LPC Snoop Address Register */
++#define HICRB 0x100 /* Host Interface Control Register B */
++
++/* HICR5 Bits */
++#define HICR5_EN_SIOGIO (1 << 31) /* Enable SIOGIO */
++#define HICR5_EN80HGIO (1 << 30) /* Enable 80hGIO */
++#define HICR5_SEL80HGIO (0x1f << 24) /* Select 80hGIO */
++#define SET_SEL80HGIO(x) ((x & 0x1f) << 24) /* Select 80hGIO Offset */
++#define HICR5_UNKVAL_MASK 0x1FFF0000 /* Bits with unknown values on reset */
++#define HICR5_ENINT_SNP0W (1 << 1) /* Enable Snooping address 0 */
++#define HICR5_EN_SNP0W (1 << 0) /* Enable Snooping address 0 */
++
++/* HRCR6 Bits */
++#define HICR6_STR_SNP0W (1 << 0) /* Interrupt Status Snoop address 0 */
++#define HICR6_STR_SNP1W (1 << 1) /* Interrupt Status Snoop address 1 */
++
++/* HICRB Bits */
++#define HICRB_EN80HSGIO (1 << 13) /* Enable 80hSGIO */
++
++static void port80h_snoop_init(void)
++{
++ uint32_t value;
++ /* enable port80h snoop and sgpio */
++ /* set lpc snoop #0 to port 0x80 */
++ value = readl(AST_LPC_BASE + SNPWADR) & 0xffff0000;
++ writel(value | LPC_SNOOP_ADDR, AST_LPC_BASE + SNPWADR);
++
++ /* clear interrupt status */
++ value = readl(AST_LPC_BASE + HICR6);
++ value |= HICR6_STR_SNP0W | HICR6_STR_SNP1W;
++ writel(value, AST_LPC_BASE + HICR6);
++
++ /* enable lpc snoop #0 and SIOGIO */
++ value = readl(AST_LPC_BASE + HICR5) & ~(HICR5_UNKVAL_MASK);
++ value |= HICR5_EN_SIOGIO | HICR5_EN_SNP0W;
++ writel(value, AST_LPC_BASE + HICR5);
++
++ /* enable port80h snoop on SGPIO */
++ value = readl(AST_LPC_BASE + HICRB) | HICRB_EN80HSGIO;
++ writel(value, AST_LPC_BASE + HICRB);
++}
++
++#define AST_GPIO_BASE 0x1e780000
++#define SGPIO_CLK_DIV(N) ((N) << 16)
++#define SGPIO_BYTES(N) ((N) << 6)
++#define SGPIO_ENABLE 1
++#define GPIO254 0x554
++
++static void sgpio_init(void)
++{
++ uint32_t value;
++ /* set the gpio clock to pclk/(2*(5+1)) or ~2 MHz */
++ value = SGPIO_CLK_DIV(256) | SGPIO_BYTES(10) | SGPIO_ENABLE;
++ writel(value, AST_GPIO_BASE + GPIO254);
++}
++
++void espi_init(void);
++int arch_interrupt_init_early(void);
++
++static void timer_handler(void *regs)
++{
++ printf("+");
++}
++
++void timer_enable(int n, uint32_t freq, interrupt_handler_t *handler);
++int board_early_init_f(void)
++{
++ /* This is called before relocation; beware! */
++ /* initialize running timer? timer_init is next in the list but
++ * I am not sure if it actually does anything... */
++ arch_interrupt_init_early();
++
++ gpio_passthru_init();
++
++ port80h_snoop_init();
++
++ sgpio_init();
++
++ /* TODO: is it too late to enforce HW security registers? */
++ return 0;
++}
++
++int board_early_init_r(void)
++{
++ printf("board_early_init_r\n");
++ timer_enable(0, 1, timer_handler);
++
++ espi_init();
++
++ return 0;
++}
++
++/* aspeed/board.c defines these functions
++int arch_early_init_r(void)
++{
++ return 0;
++}
++*/
++
++/*
++void board_init(void)
++{
++}
++*/
++
++#ifdef CONFIG_WATCHDOG
++/* watchdog stuff */
++void watchdog_init(void)
++{
++}
++
++void watchdog_reset(void)
++{
++}
++#endif
+diff --git a/cmd/Kconfig b/cmd/Kconfig
+index 92736f2d6612..f64a2595da65 100644
+--- a/cmd/Kconfig
++++ b/cmd/Kconfig
+@@ -1862,7 +1862,7 @@ config CMD_DIAG
+
+ config CMD_IRQ
+ bool "irq - Show information about interrupts"
+- depends on !ARM && !MIPS && !SH
++ depends on !MIPS && !SH
+ help
+ This enables two commands:
+
+diff --git a/common/autoboot.c b/common/autoboot.c
+index 94133eaeda78..5e69000b848b 100644
+--- a/common/autoboot.c
++++ b/common/autoboot.c
+@@ -255,10 +255,20 @@ static int __abortboot(int bootdelay)
+ }
+ # endif /* CONFIG_AUTOBOOT_KEYED */
+
++int gpio_abort(void) __attribute__((weak));
++int gpio_abort(void)
++{
++ return 0;
++}
++
+ static int abortboot(int bootdelay)
+ {
+ int abort = 0;
+
++ abort = gpio_abort();
++ if (abort)
++ return abort;
++
+ if (bootdelay >= 0)
+ abort = __abortboot(bootdelay);
+
+diff --git a/common/board_r.c b/common/board_r.c
+index 472987d5d52f..a7f5371bac71 100644
+--- a/common/board_r.c
++++ b/common/board_r.c
+@@ -673,6 +673,10 @@ static init_fnc_t init_sequence_r[] = {
+ #if defined(CONFIG_ARM) || defined(CONFIG_NDS32) || defined(CONFIG_RISCV) || \
+ defined(CONFIG_SANDBOX)
+ board_init, /* Setup chipselects */
++ interrupt_init,
++#ifdef CONFIG_ARM
++ initr_enable_interrupts,
++#endif
+ #endif
+ /*
+ * TODO: printing of the clock inforamtion of the board is now
+@@ -771,10 +775,6 @@ static init_fnc_t init_sequence_r[] = {
+ #ifdef CONFIG_CMD_KGDB
+ initr_kgdb,
+ #endif
+- interrupt_init,
+-#ifdef CONFIG_ARM
+- initr_enable_interrupts,
+-#endif
+ #if defined(CONFIG_MICROBLAZE) || defined(CONFIG_M68K)
+ timer_init, /* initialize timer */
+ #endif
+diff --git a/include/configs/evb_ast2600.h b/include/configs/evb_ast2600.h
+index 3a12f2f0d43c..91a42f2522e2 100644
+--- a/include/configs/evb_ast2600.h
++++ b/include/configs/evb_ast2600.h
+@@ -18,7 +18,7 @@
+
+ /* Environment */
+ #define CONFIG_ENV_SIZE 0x10000
+-#define CONFIG_ENV_OFFSET 0x60000
++#define CONFIG_ENV_OFFSET 0x2400000
+ #define CONFIG_ENV_SECT_SIZE (4 << 10)
+
+ #endif /* __CONFIG_H */
+--
+2.7.4
+
diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0027-CPLD-u-boot-commands-support-for-PFR.patch b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0027-CPLD-u-boot-commands-support-for-PFR.patch
index b5f7ccf07..ac458dd6c 100644
--- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0027-CPLD-u-boot-commands-support-for-PFR.patch
+++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0027-CPLD-u-boot-commands-support-for-PFR.patch
@@ -1,4 +1,4 @@
-From cdb62eb60de0b99276ff755b896fc51c8ed2606d Mon Sep 17 00:00:00 2001
+From 0083904a79527cef9ca99e516ed015b56a6b95c7 Mon Sep 17 00:00:00 2001
From: AppaRao Puli <apparao.puli@linux.intel.com>
Date: Tue, 7 May 2019 11:26:35 +0530
Subject: [PATCH] CPLD u-boot commands support for PFR
@@ -28,14 +28,15 @@ ast#
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
+Signed-off-by: Vikram Bodireddy <vikram.bodireddy@intel.com>
---
cmd/Makefile | 1 +
- cmd/cpld.c | 244 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ cmd/cpld.c | 244 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 245 insertions(+)
create mode 100644 cmd/cpld.c
diff --git a/cmd/Makefile b/cmd/Makefile
-index a1731be..c8ac0af 100644
+index a1731be701..c8ac0af55c 100644
--- a/cmd/Makefile
+++ b/cmd/Makefile
@@ -66,6 +66,7 @@ obj-$(CONFIG_CMD_FUSE) += fuse.o
@@ -48,7 +49,7 @@ index a1731be..c8ac0af 100644
obj-$(CONFIG_CMD_IDE) += ide.o
diff --git a/cmd/cpld.c b/cmd/cpld.c
new file mode 100644
-index 0000000..06b2e98
+index 0000000000..1b225d20dc
--- /dev/null
+++ b/cmd/cpld.c
@@ -0,0 +1,244 @@
@@ -67,7 +68,7 @@ index 0000000..06b2e98
+#include <linux/compiler.h>
+
+#define PFR_CPLD_I2C_BUSNO 4
-+#define PFR_CPLD_SLAVE_ADDR 0xE0
++#define PFR_CPLD_SLAVE_ADDR 0x70
+
+#define CPLD_READ_TIMEOUT_ATTEMPTS 5
+
@@ -297,5 +298,5 @@ index 0000000..06b2e98
+
+U_BOOT_CMD(cpld, 4, 1, do_cpld, "PFR CPLD information", cpld_help_text);
--
-2.7.4
+2.17.1
diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0032-PFR-FW-update-and-checkpoint-support-in-u-boot.patch b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0032-PFR-FW-update-and-checkpoint-support-in-u-boot.patch
index 575d0ceae..392acb9ad 100644
--- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0032-PFR-FW-update-and-checkpoint-support-in-u-boot.patch
+++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0032-PFR-FW-update-and-checkpoint-support-in-u-boot.patch
@@ -1,7 +1,7 @@
-From fa89d568a5ad08fdf936a4ac0b2445ba4df5e948 Mon Sep 17 00:00:00 2001
+From bd0d8af493387ab1602a0a40b4a548981c1e4d00 Mon Sep 17 00:00:00 2001
From: AppaRao Puli <apparao.puli@linux.intel.com>
Date: Wed, 24 Jul 2019 20:11:30 +0530
-Subject: [PATCH 1/1] PFR FW update and checkpoint support in u-boot
+Subject: [PATCH] PFR FW update and checkpoint support in u-boot
1) Added firmware update ipmi commands support
for PFR images. This enables PFR based firmware
@@ -45,7 +45,7 @@ index 0b2d936c23..9021d7fc08 100644
obj-y += fw-update.o
+obj-y += pfr-mgr.o
diff --git a/board/aspeed/ast-g5/ast-g5-intel.c b/board/aspeed/ast-g5/ast-g5-intel.c
-index 5f1bc625ff..8c3c9948a7 100644
+index dde5adbc70..6ef3ca9f73 100644
--- a/board/aspeed/ast-g5/ast-g5-intel.c
+++ b/board/aspeed/ast-g5/ast-g5-intel.c
@@ -16,6 +16,7 @@
@@ -448,7 +448,7 @@ index 0000000000..77131688e7
+
diff --git a/board/aspeed/ast-g5/pfr-mgr.h b/board/aspeed/ast-g5/pfr-mgr.h
new file mode 100644
-index 0000000000..6cf8c6d5b9
+index 0000000000..5c5b98bbe0
--- /dev/null
+++ b/board/aspeed/ast-g5/pfr-mgr.h
@@ -0,0 +1,73 @@
@@ -459,7 +459,7 @@ index 0000000000..6cf8c6d5b9
+
+/* CPLD I2C device defines */
+#define PFR_CPLD_I2C_BUSNO 4
-+#define PFR_CPLD_SLAVE_ADDR 0xE0
++#define PFR_CPLD_SLAVE_ADDR 0x70
+
+/* CPLD registers */
+#define PFR_CPLD_BOOT_CHECKPOINT_REG 0x0F
diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0102-Add-espi-polling-check.patch b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0102-Add-espi-polling-check.patch
new file mode 100644
index 000000000..683178054
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0102-Add-espi-polling-check.patch
@@ -0,0 +1,141 @@
+From ea6dad13d4d4b8c7a39829f75425290447e0f148 Mon Sep 17 00:00:00 2001
+From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+Date: Tue, 12 Nov 2019 16:46:01 -0800
+Subject: [PATCH] Add espi polling check
+
+Since interrupt in u-boot isn't working so this commit adds espi
+polling check into cli as a WA to handle host espi events.
+
+This is a temporary WA.
+
+Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+---
+ board/aspeed/ast2600_intel/ast-espi.c | 24 ++++++++++++++++++------
+ common/console.c | 3 +++
+ 2 files changed, 21 insertions(+), 6 deletions(-)
+
+diff --git a/board/aspeed/ast2600_intel/ast-espi.c b/board/aspeed/ast2600_intel/ast-espi.c
+index 2778d7b67d54..c88098efcdb5 100644
+--- a/board/aspeed/ast2600_intel/ast-espi.c
++++ b/board/aspeed/ast2600_intel/ast-espi.c
+@@ -18,7 +18,7 @@
+
+ #define DEBUG_ESPI_ENABLED 1
+ #ifdef DEBUG_ESPI_ENABLED
+-#define DBG_ESPI debug
++#define DBG_ESPI printf
+ #else
+ #define DBG_ESPI(...)
+ #endif
+@@ -116,11 +116,13 @@
+ #define SCR0SIO 0x170
+ #define IRQ_SRC_ESPI 74 /* IRQ 74 */
+
+-static int espi_irq_handler(struct pt_regs *regs)
++int espi_irq_handler(struct pt_regs *regs)
+ {
+ uint32_t irq_status = readl(AST_ESPI_BASE + ESPI008);
+
++#if 0
+ DBG_ESPI("ISR irq_status : 0x%08X\n", irq_status);
++#endif
+
+ if (irq_status & AST_ESPI_VW_SYS_EVT) {
+ uint32_t sys_status = readl(AST_ESPI_BASE + ESPI11C);
+@@ -128,19 +130,21 @@ static int espi_irq_handler(struct pt_regs *regs)
+
+ DBG_ESPI("sys_status : 0x%08X\n", sys_status);
+ if (sys_status & AST_ESPI_HOST_RST_WARN) {
+- DBG_ESPI("HOST_RST_WARN ev: %08X\n", sys_event);
++ DBG_ESPI("HOST_RST_WARN evt: 0x%08X\n", sys_event);
+ if (sys_event & AST_ESPI_HOST_RST_WARN) {
+ uint32_t v = readl(AST_ESPI_BASE + ESPI098)
+ | AST_ESPI_HOST_RST_ACK;
+ writel(v, AST_ESPI_BASE + ESPI098);
++ DBG_ESPI("HOST_RST_WARN sent ack\n");
+ }
+ }
+ if (sys_status & AST_ESPI_OOB_RST_WARN) {
+- DBG_ESPI("OOB_RST_WARN ev: %08X\n", sys_event);
++ DBG_ESPI("OOB_RST_WARN evt: 0x%08X\n", sys_event);
+ if (sys_event & AST_ESPI_OOB_RST_WARN) {
+ uint32_t v = readl(AST_ESPI_BASE + ESPI098)
+ | AST_ESPI_OOB_RST_ACK;
+ writel(v, AST_ESPI_BASE + ESPI098);
++ DBG_ESPI("OOB_RST_WARN sent ack\n");
+ }
+ }
+ writel(sys_status, AST_ESPI_BASE + ESPI11C); // clear status
+@@ -152,16 +156,19 @@ static int espi_irq_handler(struct pt_regs *regs)
+
+ DBG_ESPI("sys1_status : 0x%08X\n", sys1_status);
+ if (sys1_status & AST_ESPI_SUS_WARN) {
+- DBG_ESPI("SUS WARN ev: %08X\n", sys1_event);
++ DBG_ESPI("SUS WARN evt: 0x%08X\n", sys1_event);
+ if (sys1_event & AST_ESPI_SUS_WARN) {
+ uint32_t v = readl(AST_ESPI_BASE + ESPI104)
+ | AST_ESPI_SUS_ACK;
+ writel(v, AST_ESPI_BASE + ESPI104);
++ DBG_ESPI("SUS_WARN sent ack\n");
+ }
+ }
+ writel(sys1_status, AST_ESPI_BASE + ESPI12C); // clear status
+ }
++
+ writel(irq_status, AST_ESPI_BASE + ESPI008); // clear irq_status
++
+ return 0;
+ }
+
+@@ -176,7 +183,7 @@ static void espi_handshake_ack(void)
+ }
+
+ if (readl(AST_ESPI_BASE + ESPI104) & AST_ESPI_SUS_WARN) {
+- DBG_ESPI("Boot SUS WARN set %08x\n",
++ DBG_ESPI("Boot SUS WARN set 0x%08x\n",
+ readl(AST_ESPI_BASE + ESPI104));
+ uint32_t v = readl(AST_ESPI_BASE + ESPI104) | AST_ESPI_SUS_ACK;
+ writel(v, AST_ESPI_BASE + ESPI104);
+@@ -189,6 +196,8 @@ void espi_init(void)
+ & SCU_HW_STRAP_ESPI_ENABLED) {
+ uint32_t v;
+
++ DBG_ESPI("espi init\n");
++
+ /* Block flash access from Host */
+ v = readl(AST_ESPI_BASE + ESPI000) & ~AST_ESPI_FLASH_SW_CHRDY;
+ v |= AST_ESPI_FLASH_SW_READ | AST_ESPI_OOB_CHRDY;
+@@ -226,6 +235,9 @@ void espi_init(void)
+
+ irq_install_handler(IRQ_SRC_ESPI, espi_irq_handler, NULL);
+
++#if 1
++ espi_irq_handler(NULL);
++#endif
+ } else {
+ DBG_ESPI("No espi strap\n");
+ }
+diff --git a/common/console.c b/common/console.c
+index 0b0dd76256c7..90cdf7701c9d 100644
+--- a/common/console.c
++++ b/common/console.c
+@@ -308,6 +308,8 @@ int serial_printf(const char *fmt, ...)
+ return i;
+ }
+
++extern int espi_irq_handler(struct pt_regs *regs);
++
+ int fgetc(int file)
+ {
+ if (file < MAX_FILES) {
+@@ -315,6 +317,7 @@ int fgetc(int file)
+ * Effectively poll for input wherever it may be available.
+ */
+ for (;;) {
++ espi_irq_handler(NULL);
+ WATCHDOG_RESET();
+ #if CONFIG_IS_ENABLED(CONSOLE_MUX)
+ /*
+--
+2.7.4
+
diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/intel.cfg b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/intel.cfg
new file mode 100644
index 000000000..8e247744a
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/intel.cfg
@@ -0,0 +1,11 @@
+CONFIG_MISC_INIT_R=y
+CONFIG_LED=y
+CONFIG_LED_BLINK=y
+CONFIG_LED_GPIO=y
+CONFIG_CMD_LED=y
+CONFIG_TARGET_AST2600_INTEL=y
+CONFIG_BOARD_EARLY_INIT_F=y
+CONFIG_BOARD_EARLY_INIT_R=y
+CONFIG_DEFAULT_DEVICE_TREE="ast2600-intel"
+CONFIG_SYS_ARCH_TIMER=y
+CONFIG_CMD_IRQ=y
diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend
new file mode 100644
index 000000000..13b7d45e5
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend
@@ -0,0 +1,10 @@
+FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files:"
+
+# the meta-phosphor layer adds this patch, which conflicts
+# with the intel layout for environment
+
+SRC_URI_append_intel-ast2600 = " \
+ file://intel.cfg \
+ file://0001-Add-ast2600-intel-as-a-new-board.patch \
+ file://0102-Add-espi-polling-check.patch \
+ "
diff --git a/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb
index 23288a3c2..b57ae1ca5 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb
@@ -13,7 +13,14 @@ DEPENDS = "sdbusplus openssl libpam libgpiod"
do_configure[depends] += "virtual/kernel:do_shared_workdir"
SRC_URI = "git://git@github.com/Intel-BMC/asd;protocol=ssh"
-SRCREV = "0d25836d8c63372890fbb7f40c54de6166a0a76f"
+SRCREV = "1.4.2"
+
+inherit useradd
+
+USERADD_PACKAGES = "${PN}"
+
+# add a special user asdbg
+USERADD_PARAM_${PN} = "-u 999 asdbg"
S = "${WORKDIR}/git"
diff --git a/meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb b/meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb
index 32bb0a8b9..21ae0bff7 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb
@@ -13,7 +13,7 @@ LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://LICENSE;md5=26bb6d0733830e7bab774914a8f8f20a"
SRC_URI = "git://git@github.com/Intel-BMC/crashdump;protocol=ssh"
-SRCREV = "042f17fafee9fd68a885a3e503113ffad6209625"
+SRCREV = "0.4"
S = "${WORKDIR}/git"
diff --git a/meta-openbmc-mods/meta-common/recipes-core/dropbear/dropbear_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/dropbear/dropbear_%.bbappend
new file mode 100644
index 000000000..307400322
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-core/dropbear/dropbear_%.bbappend
@@ -0,0 +1,5 @@
+do_install_append() {
+ # Remove dropbear service, if debug-tweaks is disabled
+ ${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'debug-tweaks', '', 'rm ${D}/${systemd_unitdir}/system/dropbear@.service', d)}
+}
+
diff --git a/meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh b/meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh
index 889a73c06..ca5da9598 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh
+++ b/meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh
@@ -13,6 +13,36 @@ usage() {
exit 1
}
+logevent_update_started() {
+echo
+cat <<EOF | logger-systemd --journald
+REDFISH_MESSAGE_ID=OpenBMC.0.1.FirmwareUpdateStarted
+PRIORITY=2
+MESSAGE=$1 firmware update to version $2 started.
+REDFISH_MESSAGE_ARGS=$1,$2
+EOF
+}
+
+logevent_update_completed() {
+echo
+cat <<EOF | logger-systemd --journald
+REDFISH_MESSAGE_ID=OpenBMC.0.1.FirmwareUpdateCompleted
+PRIORITY=2
+MESSAGE=$1 firmware update to version $2 completed.
+REDFISH_MESSAGE_ARGS=$1,$2
+EOF
+}
+
+logevent_update_failed() {
+echo
+cat <<EOF | logger-systemd --journald
+REDFISH_MESSAGE_ID=OpenBMC.0.1.FirmwareUpdateFailed
+PRIORITY=4
+MESSAGE=$1 firmware update to version $2 failed.
+REDFISH_MESSAGE_ARGS=$1,$2
+EOF
+}
+
if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then usage; fi
if [ $# -eq 0 ]; then
# set DEFURI in $HOME/.fwupd.defaults
@@ -138,17 +168,28 @@ rm -f $LOCAL_PATH
echo "Setting update intent in PFR CPLD"
sleep 5 # delay for sync and to get the above echo messages
# write to PFRCPLD about BMC update intent.
-i2cset -y 4 0x70 0x13 $upd_intent_val
+i2cset -y 4 0x38 0x13 $upd_intent_val
else # Non-PFR image update section
+version="unknown"
+component="BMC"
+manifest_file=$(dirname "${REMOTE_PATH}")"/MANIFEST"
+if [ -e $manifest_file ]; then
+ version=`awk -F= -v key="version" '$1==key {print $2}' $manifest_file`
+fi
+
+logevent_update_started $component $version
+
# do a quick sanity check on the image
if [ $(stat -c "%s" "$LOCAL_PATH") -lt 10000000 ]; then
echo "Update file "$LOCAL_PATH" seems to be too small"
+ logevent_update_failed $component $version
exit 1
fi
dtc -I dtb -O dtb "$LOCAL_PATH" > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Update file $LOCAL_PATH doesn't seem to be in the proper format"
+ logevent_update_failed $component $version
exit 1
fi
@@ -163,10 +204,22 @@ case "$BOOTADDR" in
esac
echo "Updating $(basename $TGT) (use bootm $BOOTADDR)"
flash_erase $TGT 0 0
+if [ $? -ne 0 ]; then
+ echo "Erasing the flash failed"
+ logevent_update_failed $component $version
+ exit 1
+fi
echo "Writing $(stat -c "%s" "$LOCAL_PATH") bytes"
cat "$LOCAL_PATH" > "$TGT"
+if [ $? -ne 0 ]; then
+ echo "Writing to flash failed"
+ logevent_update_failed $component $version
+ exit 1
+fi
fw_setenv "bootcmd" "bootm ${BOOTADDR}"
+logevent_update_completed $component $version
+
# reboot
reboot
fi
diff --git a/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_git.bb b/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_git.bb
index 65e6a1778..5aab3db34 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_git.bb
@@ -2,14 +2,14 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
inherit cmake systemd
-SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
+SRC_URI = "git://git@github.com/Intel-BMC/host-error-monitor.git;protocol=ssh"
DEPENDS = "boost sdbusplus libgpiod libpeci"
PV = "0.1+git${SRCPV}"
-SRCREV = "4aec5d06d6adbaf53dbe7f18ea9f803eb2198b86"
+SRCREV = "ba7c4e08b423dc71bb8dcb963942cba860cdf7d4"
-S = "${WORKDIR}/git/host_error_monitor"
+S = "${WORKDIR}/git"
SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.HostErrorMonitor.service"
diff --git a/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb
index a678fe72f..560efc72c 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb
@@ -2,7 +2,7 @@ SUMMARY = "libmctp"
DESCRIPTION = "Implementation of MCTP (DTMF DSP0236)"
SRC_URI = "git://github.com/openbmc/libmctp.git"
-SRCREV = "195a7c5e212f7fb50c850880519073ec99133607"
+SRCREV = "8081beba756d371cba40dee86b37bbc654020b17"
PV = "0.1+git${SRCPV}"
diff --git a/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend
index 32a6dcf45..baab0e9eb 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend
@@ -1,3 +1,4 @@
EXTRA_OECMAKE += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', '-DINTEL_PFR_ENABLED=ON', '', d)}"
+EXTRA_OECMAKE += "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'validation-unsecure', '-DBMC_VALIDATION_UNSECURE_FEATURE=ON', '', d)}"
SRC_URI = "git://github.com/openbmc/intel-ipmi-oem.git"
-SRCREV = "262276f4964191d780aeab3a821de54b01c0a8ff"
+SRCREV = "09a8314bb754dccd4af2ef8d2d9e6e43f6da74ec"
diff --git a/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_git.bb b/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_git.bb
index f515501e8..8b97f95e8 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_git.bb
@@ -5,7 +5,7 @@ inherit cmake
SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
PV = "0.1+git${SRCPV}"
-SRCREV = "4aec5d06d6adbaf53dbe7f18ea9f803eb2198b86"
+SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
S = "${WORKDIR}/git/libpeci"
diff --git a/meta-openbmc-mods/meta-common/recipes-core/peci-pcie/peci-pcie_git.bb b/meta-openbmc-mods/meta-common/recipes-core/peci-pcie/peci-pcie_git.bb
index 10b34354c..2b77a193c 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/peci-pcie/peci-pcie_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-core/peci-pcie/peci-pcie_git.bb
@@ -10,7 +10,7 @@ SRC_URI = "git://git@github.com/Intel-BMC/at-scale-debug;protocol=ssh"
DEPENDS = "boost sdbusplus libpeci"
PV = "0.1+git${SRCPV}"
-SRCREV = "20016caebaac78c3290462ffa8df10c2efd61261"
+SRCREV = "98c33cdb7d704a387edee4ac8f0ef98ea771b222"
S = "${WORKDIR}/git/peci_pcie"
diff --git a/meta-openbmc-mods/meta-common/recipes-core/safec/safec_3.4.bb b/meta-openbmc-mods/meta-common/recipes-core/safec/safec_3.4.bb
index 646d9612f..a09c8ac2d 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/safec/safec_3.4.bb
+++ b/meta-openbmc-mods/meta-common/recipes-core/safec/safec_3.4.bb
@@ -7,7 +7,7 @@ SECTION = "lib"
inherit autotools pkgconfig
S = "${WORKDIR}/git"
-SRCREV = "5d92be815bf35137eb31fb653e435321a511311c"
+SRCREV = "60786283fd61cd621a5d1df00e083a1c1e3cf52a"
SRC_URI = "git://github.com/rurban/safeclib.git"
COMPATIBLE_HOST = '(x86_64|i.86|powerpc|powerpc64|arm|aarch64).*-linux'
diff --git a/meta-openbmc-mods/meta-common/recipes-core/security-registers-check/security-registers-check.bb b/meta-openbmc-mods/meta-common/recipes-core/security-registers-check/security-registers-check.bb
new file mode 100644
index 000000000..29f8e4986
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-core/security-registers-check/security-registers-check.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Security registers check"
+DESCRIPTION = "script tool to check if registers value are security \
+ log the security event to systemd journal, and also log to redfish \
+ "
+
+S = "${WORKDIR}"
+SRC_URI = "file://security-registers-check.sh \
+ file://security-registers-check.service \
+"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
+RDEPENDS_${PN} += "bash logger-systemd"
+
+inherit systemd
+
+FILES_${PN} += "${systemd_system_unitdir}/security-registers-check.service"
+
+do_install() {
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0777 ${WORKDIR}/security-registers-check.service ${D}${systemd_system_unitdir}
+ install -d ${D}${bindir}
+ install -m 0777 ${S}/security-registers-check.sh ${D}/${bindir}/security-registers-check.sh
+}
+
+SYSTEMD_SERVICE_${PN} += " security-registers-check.service" \ No newline at end of file
diff --git a/meta-openbmc-mods/meta-common/recipes-core/security-registers-check/security-registers-check/security-registers-check.service b/meta-openbmc-mods/meta-common/recipes-core/security-registers-check/security-registers-check/security-registers-check.service
new file mode 100644
index 000000000..b824dbe3e
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-core/security-registers-check/security-registers-check/security-registers-check.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Check for security registers
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/security-registers-check.sh
+Nice=5
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-openbmc-mods/meta-common/recipes-core/security-registers-check/security-registers-check/security-registers-check.sh b/meta-openbmc-mods/meta-common/recipes-core/security-registers-check/security-registers-check/security-registers-check.sh
new file mode 100644
index 000000000..211120c78
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-core/security-registers-check/security-registers-check/security-registers-check.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+value=`cat /sys/devices/platform/ahb/ahb:apb/1e6e2000.syscon/1e6e2000.syscon:misc_control/uart_port_debug`
+if [ $value == 0 ]
+ then
+ # log the detailed last security registers check messages
+ logger -t security-registers-check "Uart port debug is enabled! Log as following:"
+ echo "Uart port debug is enabled." | logger
+ # Also log it to redfish
+ cat <<EOF | logger-systemd --journald
+REDFISH_MESSAGE_ID=OpenBMC.0.1.SecurityUartPortDebugEnabled
+PRIORITY=4
+MESSAGE=BMC Uart port debug is enabled
+EOF
+fi
+
+value=`cat /sys/devices/platform/ahb/ahb:apb/1e6e2000.syscon/1e6e2000.syscon:misc_control/p2a-bridge`
+if [ $value == 1 ]
+ then
+ # log the detailed last security registers check messages
+ logger -t security-registers-check "P2A(PCIe to AHB) bridge is enabled! Log as following:"
+ echo "P2A(PCIe to AHB) bridge is enabled." | logger
+ # Also log it to redfish
+ cat <<EOF | logger-systemd --journald
+REDFISH_MESSAGE_ID=OpenBMC.0.1.SecurityP2aBridgeEnabled
+PRIORITY=4
+MESSAGE=BMC P2A(PCIe to AHB) bridge is enabled
+EOF
+fi
+
+value=`cat /sys/devices/platform/ahb/ahb:apb/1e6e2000.syscon/1e6e2000.syscon:misc_control/boot-2nd-flash`
+if [ $value == 1 ]
+ then
+ # log the detailed last security registers check messages
+ logger -t security-registers-check "BMC 2nd boot flash is enabled! Log as following:"
+ echo "BMC 2nd boot flash is enabled." | logger
+ # Also log it to redfish
+ cat <<EOF | logger-systemd --journald
+REDFISH_MESSAGE_ID=OpenBMC.0.1.SecurityBoot2ndFlashEnabled
+PRIORITY=4
+MESSAGE=BMC 2nd boot flash is enabled
+EOF
+fi
diff --git a/meta-openbmc-mods/meta-common/recipes-devtools/mtd-util/mtd-util.bb b/meta-openbmc-mods/meta-common/recipes-devtools/mtd-util/mtd-util.bb
index 46a185cdf..c6b1571ba 100644
--- a/meta-openbmc-mods/meta-common/recipes-devtools/mtd-util/mtd-util.bb
+++ b/meta-openbmc-mods/meta-common/recipes-devtools/mtd-util/mtd-util.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b77c43ae4eaf67bd73fb6452b2f113a3"
SRC_URI = "git://git@github.com/Intel-BMC/mtd-util;protocol=ssh"
PV = "1.0+git${SRCPV}"
-SRCREV = "0414bd37ba324867c5c89fc91ab80714309f4c80"
+SRCREV = "679c6bddaa1fc4fdd473eb84d4e9f97f78ab0f12"
S = "${WORKDIR}/git"
diff --git a/meta-openbmc-mods/meta-common/recipes-extended/pam/pam-ipmi_%.bbappend b/meta-openbmc-mods/meta-common/recipes-extended/pam/pam-ipmi_%.bbappend
new file mode 100644
index 000000000..55fb00a77
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-extended/pam/pam-ipmi_%.bbappend
@@ -0,0 +1,4 @@
+do_install_append () {
+# Remove ipmi_pass from image, if debug-tweaks is not enabled
+ ${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'debug-tweaks', '', 'rm ${D}/${sysconfdir}/ipmi_pass', d)}
+}
diff --git a/meta-openbmc-mods/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend b/meta-openbmc-mods/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend
index 15e557c79..7e282804e 100644
--- a/meta-openbmc-mods/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend
@@ -1,13 +1,5 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-# Pin to rsyslog v8.1904.0 for now
-# v8.1903.0 has a couple issues with the imjournal module:
-# 1. Enabling the "WorkAroundJournalBug" option causes rsyslogd to fail to start
-# 2. Logging data especially while rotating the journal causes a double free error
-PV = "8.1904.0"
-SRC_URI[md5sum] = "b9398b5aa68a829bf2c18a87490d30c0"
-SRC_URI[sha256sum] = "7098b459dfc3f8bfc35d5b114c56e7945614ba76efa4e513b1db9c38b0ff9c3d"
-
SRC_URI += "file://rsyslog.conf \
file://rsyslog.logrotate \
file://rotate-event-logs.service \
diff --git a/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend b/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend
index ac49a24c8..3ad9e2c0b 100644
--- a/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend
@@ -2,4 +2,4 @@ FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
# Use the latest to support obmc-ikvm properly
#SRC_URI = "git://github.com/LibVNC/libvncserver"
-SRCREV = "e430d012dd9d02ebb4c2b1586b600f4f27a769b0"
+SRCREV = "a9f95d843a331c019f07fd59bf84c0aca4f98220"
diff --git a/meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm_%.bbappend b/meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm_%.bbappend
index 2118baa8a..8de421d18 100644
--- a/meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-graphics/obmc-ikvm/obmc-ikvm_%.bbappend
@@ -1,7 +1,7 @@
FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
#SRC_URI = "git://github.com/openbmc/obmc-ikvm"
-SRCREV = "7cf1f1d43ef9b4c312bfb2c7c61514ca93a53ee6"
+SRCREV = "861337e8ec92767c4c88237ec5db494a2a67fa8d"
SRC_URI += " \
file://0003-Fix-keyboard-and-mouse-input-events-dropping-issue.patch \
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control.bb b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control.bb
deleted file mode 100644
index 193ad8ba0..000000000
--- a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "Chassis Power Control service for Intel based platform"
-DESCRIPTION = "Chassis Power Control service for Intel based platfrom"
-
-SRC_URI = "git://git@github.com/Intel-BMC/intel-chassis-control.git;protocol=ssh"
-SRCREV = "0d766e3ea2af610ca63c8c828cb284da0e706b19"
-
-S = "${WORKDIR}/git/services/chassis/"
-
-PV = "1.0+git${SRCPV}"
-
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
-
-inherit cmake systemd
-
-SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.Chassis.Control.Power.service"
-
-DEPENDS += " \
- boost \
- i2c-tools \
- libgpiod \
- sdbusplus \
- phosphor-logging \
- "
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/hsbp/hsbp-manager_git.bb b/meta-openbmc-mods/meta-common/recipes-intel/hsbp/hsbp-manager_git.bb
index 804ad33f2..1aa6763b2 100644
--- a/meta-openbmc-mods/meta-common/recipes-intel/hsbp/hsbp-manager_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-intel/hsbp/hsbp-manager_git.bb
@@ -2,7 +2,7 @@ SUMMARY = "HSBP Manager"
DESCRIPTION = "HSBP Manager monitors HSBPs through SMBUS"
SRC_URI = "git://github.com/openbmc/s2600wf-misc.git"
-SRCREV = "8675a91ba6951cb9338a138cab73a7b792158804"
+SRCREV = "d0d36f10b1269dc863128ead80cf6eb1a9b1254b"
PV = "0.1+git${SRCPV}"
LICENSE = "Apache-2.0"
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-pfr-manager_git.bb b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-pfr-manager_git.bb
index 9f3e7d21d..b32c4e939 100644
--- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-pfr-manager_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-pfr-manager_git.bb
@@ -9,7 +9,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "4aec5d06d6adbaf53dbe7f18ea9f803eb2198b86"
+SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
inherit cmake systemd
SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.PFR.Manager.service"
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-intel-apps.bb b/meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-intel-apps.bb
index 06cc3b972..4d91ac673 100644
--- a/meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-intel-apps.bb
+++ b/meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-intel-apps.bb
@@ -26,8 +26,7 @@ RPROVIDES_${PN}-system += "virtual-obmc-system-mgmt"
SUMMARY_${PN}-chassis = "Intel Chassis"
RDEPENDS_${PN}-chassis = " \
- intel-chassis-control \
- obmc-host-failure-reboots \
+ x86-power-control \
"
SUMMARY_${PN}-fans = "Intel Fans"
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/psu-manager/psu-manager.bb b/meta-openbmc-mods/meta-common/recipes-intel/psu-manager/psu-manager.bb
index ca8358eaf..1d1ea536c 100644
--- a/meta-openbmc-mods/meta-common/recipes-intel/psu-manager/psu-manager.bb
+++ b/meta-openbmc-mods/meta-common/recipes-intel/psu-manager/psu-manager.bb
@@ -2,7 +2,7 @@ SUMMARY = "Power supply manager for Intel based platform"
DESCRIPTION = "Power supply manager which include PSU Cold Redundancy service"
SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "4aec5d06d6adbaf53dbe7f18ea9f803eb2198b86"
+SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
S = "${WORKDIR}/git/psu-manager/"
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb
index e2466545d..9e1353208 100644
--- a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb
+++ b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb
@@ -2,7 +2,7 @@ SUMMARY = "SMBIOS MDR version 1 service for Intel based platform"
DESCRIPTION = "SMBIOS MDR version 1 service for Intel based platfrom"
SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "4aec5d06d6adbaf53dbe7f18ea9f803eb2198b86"
+SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
S = "${WORKDIR}/git/services/smbios/"
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb
index e89d53ed8..f15a48214 100644
--- a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb
+++ b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb
@@ -2,7 +2,7 @@ SUMMARY = "SMBIOS MDR version 2 service for Intel based platform"
DESCRIPTION = "SMBIOS MDR version 2 service for Intel based platfrom"
SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "4aec5d06d6adbaf53dbe7f18ea9f803eb2198b86"
+SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
S = "${WORKDIR}/git/services/smbios-mdrv2/"
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2500-platforms.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2500-platforms.patch
index 5400f7bde..a172e8fb2 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2500-platforms.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2500-platforms.patch
@@ -1,4 +1,4 @@
-From e34e3f667607700dfe0a670bd0e49f98be0d2586 Mon Sep 17 00:00:00 2001
+From 9c7935cd0d6d888e86c33958a7dada2f5afcb543 Mon Sep 17 00:00:00 2001
From: Yuan Li <yuan.li@linux.intel.com>
Date: Tue, 19 Sep 2017 15:55:39 +0800
Subject: [PATCH] arm: dts: add DTS for Intel ast2500 platforms
@@ -14,16 +14,16 @@ Signed-off-by: Zhu, Yunge <yunge.zhu@linux.intel.com>
Signed-off-by: Qiang XU <qiang.xu@linux.intel.com>
Signed-off-by: Chen Yugang <yugang.chen@linux.intel.com>
---
- arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts | 454 ++++++++++++++++++++++++++
- 1 file changed, 454 insertions(+)
+ arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts | 470 +++++++++++++++++++++++++
+ 1 file changed, 470 insertions(+)
create mode 100644 arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts
diff --git a/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts b/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts
new file mode 100644
-index 0000000..b3e8d80
+index 0000000..4f3ef45
--- /dev/null
+++ b/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts
-@@ -0,0 +1,454 @@
+@@ -0,0 +1,470 @@
+/dts-v1/;
+
+#include "aspeed-g5.dtsi"
@@ -31,8 +31,8 @@ index 0000000..b3e8d80
+#include <dt-bindings/i2c/i2c.h>
+
+/ {
-+ model = "Purley BMC";
-+ compatible = "intel,purley-bmc", "aspeed,ast2500";
++ model = "Intel AST2500 BMC";
++ compatible = "intel,ast2500-bmc", "aspeed,ast2500";
+
+ aliases {
+ serial4 = &uart5;
@@ -151,6 +151,18 @@ index 0000000..b3e8d80
+ bit-shift = <10>;
+ read-only;
+ };
++ p2a-bridge {
++ offset = <0x180>;
++ bit-mask = <0x1>;
++ bit-shift = <1>;
++ read-only;
++ };
++ boot-2nd-flash {
++ offset = <0x70>;
++ bit-mask = <0x1>;
++ bit-shift = <17>;
++ read-only;
++ };
+ };
+};
+
@@ -179,7 +191,7 @@ index 0000000..b3e8d80
+ /*P0-P7*/ "","","","","","","","",
+ /*Q0-Q7*/ "","","","","","","","PWR_DEBUG_N",
+ /*R0-R7*/ "","XDP_PRST_N","","","","","","",
-+ /*S0-S7*/ "","SYSPWROK","RSMRST_N","","","","","",
++ /*S0-S7*/ "REMOTE_DEBUG_ENABLE","SYSPWROK","RSMRST_N","","","","","",
+ /*T0-T7*/ "","","","","","","","",
+ /*U0-U7*/ "","","","","","","","",
+ /*V0-V7*/ "","","","","","","","",
@@ -245,6 +257,10 @@ index 0000000..b3e8d80
+ status = "okay";
+};
+
++&uart_routing {
++ status = "okay";
++};
++
+/**
+ * SAFS through SPI1 is available only on Wilson Point.
+ * These pins are used as fan presence checking gpios in WFP
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2600-platforms.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2600-platforms.patch
new file mode 100644
index 000000000..1ebb67a27
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2600-platforms.patch
@@ -0,0 +1,519 @@
+From 3550c57e80ee30113060efa44d41c08fb29fdd25 Mon Sep 17 00:00:00 2001
+From: Vernon Mauery <vernon.mauery@linux.intel.com>
+Date: Tue, 19 Sep 2017 15:55:39 +0800
+Subject: [PATCH] arm: dts: add DTS for Intel ast2600 platforms
+
+Add the DTS file for Intel ast2600-based systems.
+
+Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
+Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
+Signed-off-by: Chen Yugang <yugang.chen@linux.intel.com>
+---
+ arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts | 495 +++++++++++++++++++++++++
+ 1 file changed, 495 insertions(+)
+ create mode 100644 arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts
+
+diff --git a/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts b/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts
+new file mode 100644
+index 0000000..a1ea85a
+--- /dev/null
++++ b/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts
+@@ -0,0 +1,495 @@
++// SPDX-License-Identifier: GPL-2.0+
++/dts-v1/;
++
++#include "aspeed-g6.dtsi"
++#include <dt-bindings/gpio/aspeed-gpio.h>
++#include <dt-bindings/i2c/i2c.h>
++
++/ {
++ model = "AST2600 EVB";
++ compatible = "aspeed,ast2600";
++
++ chosen {
++ stdout-path = &uart5;
++ bootargs = "console=tty0 console=ttyS4,115200n8 root=/dev/ram rw init=/linuxrc";
++ };
++
++ memory@80000000 {
++ device_type = "memory";
++ reg = <0x80000000 0x40000000>;
++ };
++
++ reserved-memory {
++ #address-cells = <1>;
++ #size-cells = <1>;
++ ranges;
++
++ gfx_memory: framebuffer {
++ size = <0x01000000>;
++ alignment = <0x01000000>;
++ compatible = "shared-dma-pool";
++ reusable;
++ };
++ };
++
++ reserved-memory {
++ #address-cells = <1>;
++ #size-cells = <1>;
++ ranges;
++ video_memory: video {
++ size = <0x04000000>;
++ alignment = <0x01000000>;
++ compatible = "shared-dma-pool";
++ no-map;
++ };
++ };
++
++ iio-hwmon {
++ compatible = "iio-hwmon";
++ io-channels = <&adc0 0>, <&adc0 1>, <&adc0 2>, <&adc0 3>,
++ <&adc0 4>, <&adc0 5>, <&adc0 6>, <&adc0 7>,
++ <&adc1 8>, <&adc1 9>, <&adc1 10>, <&adc1 11>,
++ <&adc1 12>, <&adc1 13>, <&adc1 14>, <&adc1 15>;
++ };
++
++ leds {
++ compatible = "gpio-leds";
++
++ identify {
++ default-state = "off";
++ gpios = <&gpio1 ASPEED_GPIO(B, 7) GPIO_ACTIVE_LOW>;
++ };
++
++ status_amber {
++ default-state = "off";
++ gpios = <&gpio1 ASPEED_GPIO(G, 3) GPIO_ACTIVE_LOW>;
++ };
++
++ status_green {
++ default-state = "keep";
++ gpios = <&gpio1 ASPEED_GPIO(G, 2) GPIO_ACTIVE_LOW>;
++ };
++ };
++/*
++ beeper {
++ compatible = "pwm-beeper";
++ pwms = <&timer 7 1000000 0>;
++ }; */
++};
++
++&fmc {
++ status = "okay";
++ flash: m25p80@0 {
++ compatible = "m25p80", "jedec,spi-nor";
++ reg = <0x0>;
++ #address-cells = <1>;
++ #size-cells = <1>;
++ spi-max-frequency = <10000000>;
++ m25p,fast-read;
++#include "openbmc-flash-layout-intel-64MB.dtsi"
++ };
++};
++
++&espi {
++ status = "okay";
++};
++
++&peci0 {
++ status = "okay";
++ gpios = <&gpio0 ASPEED_GPIO(F, 6) 0>;
++};
++
++&syscon {
++ uart-clock-high-speed;
++ status = "okay";
++};
++
++#if 0
++ GPIO Alias: (runtime alias -> schematic name)
++ ID_BUTTON -> FP_ID_BTN_N
++ CPU_CATERR -> FM_PLT_BMC_THERMTRIP_N
++ PCH_BMC_THERMTRIP -> FM_PLT_BMC_THERMTRIP_N
++ RESET_BUTTON -> FP_BMC_RST_BTN_N
++ RESET_OUT -> RST_BMC_RSTBTN_OUT_R_N
++ POWER_BUTTON -> FP_BMC_PWR_BTN_R_N
++ POWER_OUT -> FM_BMC_PWR_BTN_N
++ PREQ_N -> DBP_ASD_BMC_PREQ_R_N
++ POST_COMPLETE -> FM_BIOS_POST_CMPLT_BMC_N
++ CPU_ERR0 -> FM_CPU_ERR0_LVT3_N
++ CPU_ERR1 -> FM_CPU_ERR1_LVT3_N
++ CPU_ERR2 -> FM_CPU_ERR2_LVT3_N
++ DEBUG_EN_N -> FM_JTAG_TCK_MUX_SEL_R
++ NMI_OUT -> IRQ_BMC_CPU_NMI_R
++ PLTRST_N -> RST_PLTRST_BMC_N
++ PRDY_N -> DBP_ASD_BMC_PRDY_R_N
++ PWR_DEBUG_N ->
++ XDP_PRST_N ->
++ SYSPWROK ->
++ RSMRST_N ->
++ SIO_S3 -> FM_SLPS3_R_N
++ SIO_S5 -> FM_SLPS4_R_N
++ SIO_ONCONTROL -> FM_BMC_ONCTL_R_N
++ SIO_POWER_GOOD -> PWRGD_CPU0_LVC3_R
++ PS_PWROK -> PWRGD_BMC_PS_PWROK_R
++ P3VBAT_BRIDGE_EN ->
++ TCK_MUX_SEL ->
++ SMI -> IRQ_SMI_ACTIVE_BMC_N
++ NMI_BUTTON -> FP_NMI_BTN_N
++#endif
++&gpio0 {
++ status = "okay";
++ /* Enable GPIOP0 and GPIOP2 pass-through by default */
++ /* pinctrl-names = "pass-through";
++ pinctrl-0 = <&pinctrl_thru0_default
++ &pinctrl_thru1_default>; */
++ gpio-line-names =
++ /*A0-A7*/ "","","","","SMB_CPU_PIROM_SCL","SMB_CPU_PIROM_SDA","SMB_IPMB_STBY_LVC3_R_SCL","SMB_IPMB_STBY_LVC3_R_SDA",
++ /*B0-B7*/ "FM_1200VA_OC","NMI_OUT","IRQ_SMB3_M2_ALERT_N","","RGMII_BMC_RMM4_LVC3_R_MDC","RGMII_BMC_RMM4_LVC3_R_MDIO","FM_BMC_BMCINIT_R","FP_ID_LED_N",
++ /*C0-C7*/ "FM_FORCE_BMC_UPDATE_N","RST_RGMII_PHYRST_N","FM_TPM_EN_PULSE","FM_BMC_CRASHLOG_TRIG_N","IRQ_BMC_PCH_NMI_R","FM_CPU1_DISABLE_COD_N","","",
++ /*D0-D7*/ "CPU_ERR0","CPU_ERR1","CPU_ERR2","PRDY_N","FM_SPD_SWITCH_CTRL_N","","","",
++ /*E0-E7*/ "FM_SKT1_FAULT_LED","FM_SKT0_FAULT_LED","CLK_50M_CKMNG_BMCB","FM_BMC_BOARD_REV_ID2_N","","","","",
++ /*F0-F7*/ "FM_BMC_BOARD_SKU_ID0_N","FM_BMC_BOARD_SKU_ID1_N","FM_BMC_BOARD_SKU_ID2_N","FM_BMC_BOARD_SKU_ID3_N","FM_BMC_BOARD_SKU_ID4_N","FM_BMC_BOARD_SKU_ID5_N","ID_BUTTON","PS_PWROK",
++ /*G0-G7*/ "FM_SMB_BMC_NVME_LVC3_ALERT_N","RST_BMC_I2C_M2_R_N","FP_LED_STATUS_GREEN_N","FP_LED_STATUS_AMBER_N","FM_BMC_BOARD_REV_ID0_N","FM_BMC_BOARD_REV_ID1_N","FM_BMC_CPU_FBRK_OUT_R_N","DBP_PRESENT_IN_R2_N",
++ /*H0-H7*/ "SGPIO_BMC_CLK_R","SGPIO_BMC_LD_R","SGPIO_BMC_DOUT_R","SGPIO_BMC_DIN","PLTRST_N","CPU_CATERR","PCH_BMC_THERMTRIP","",
++ /*I0-I7*/ "JTAG_ASD_NTRST_R_N","JTAG_ASD_TDI_R","JTAG_ASD_TCK_R","JTAG_ASD_TMS_R","JTAG_ASD_TDO","FM_BMC_PWRBTN_OUT_R_N","FM_BMC_PWR_BTN_N","",
++ /*J0-J7*/ "SMB_CHASSENSOR_STBY_LVC3_SCL","SMB_CHASSENSOR_STBY_LVC3_SDA","","","","","","",
++ /*K0-K7*/ "SMB_HSBP_STBY_LVC3_R_SCL","SMB_HSBP_STBY_LVC3_R_SDA","SMB_SMLINK0_STBY_LVC3_R2_SCL","SMB_SMLINK0_STBY_LVC3_R2_SDA","SMB_TEMPSENSOR_STBY_LVC3_R_SCL","SMB_TEMPSENSOR_STBY_LVC3_R_SDA","SMB_PMBUS_SML1_STBY_LVC3_R_SCL","SMB_PMBUS_SML1_STBY_LVC3_R_SDA",
++ /*L0-L7*/ "SMB_PCIE_STBY_LVC3_R_SCL","SMB_PCIE_STBY_LVC3_R_SDA","SMB_HOST_STBY_BMC_LVC3_R_SCL","SMB_HOST_STBY_BMC_LVC3_R_SDA","PREQ_N","DEBUG_EN_N","V_BMC_GFX_HSYNC_R","V_BMC_GFX_VSYNC_R",
++ /*M0-M7*/ "SPA_CTS_N","SPA_DCD_N","SPA_DSR_N","PU_SPA_RI_N","SPA_DTR_N","SPA_RTS_N","SPA_SOUT","SPA_SIN",
++ /*N0-N7*/ "SPB_CTS_N","SPB_DCD_N","SPB_DSR_N","PU_SPB_RI_N","SPB_DTR_N","SPB_RTS_N","SPB_SOUT","SPB_SIN",
++ /*O0-O7*/ "FAN_BMC_PWM0","FAN_BMC_PWM1","FAN_BMC_PWM2","FAN_BMC_PWM3","FAN_BMC_PWM4","FAN_BMC_PWM5","NMI_BUTTON","SPEAKER_BMC_R",
++ /*P0-P7*/ "RESET_BUTTON","RESET_OUT","POWER_BUTTON","POWER_OUT","FAN_BMC_PWM6","FAN_BMC_PWM7","FAN_BMC_PWM8","FAN_BMC_PWM9",
++ /*Q0-Q7*/ "FAN_BMC_TACH0","FAN_BMC_TACH1","FAN_BMC_TACH2","FAN_BMC_TACH3","FAN_BMC_TACH4","FAN_BMC_TACH5","FAN_BMC_TACH6","FAN_BMC_TACH7",
++ /*R0-R7*/ "FAN_BMC_TACH8","FAN_BMC_TACH9","","","","","","",
++ /*S0-S7*/ "RST_BMC_PCIE_MUX_N","FM_BMC_EUP_LOT6_N","","","","A_P3V_BAT_SCALED_EN","REMOTE_DEBUG_ENABLE","FM_PCHHOT_N",
++ /*T0-T7*/ "A_P12V_PSU_SCALED","A_P12V_AUX_SCALED","A_P3V3_SCALED","A_P5V_SCALED","A_PVNN_PCH_AUX_SENSOR","A_P1V05_PCH_AUX_SENSOR","A_P1V8_AUX_SENSOR","A_P3V_BAT_SCALED",
++ /*U0-U7*/ "A_PVCCIN_CPU0_SENSOR","A_PVCCIN_CPU1_SENSOR","A_PVCCINFAON_CPU0_SENSOR","A_PVCCINFAON_CPU1_SENSOR","A_PVCCFA_EHV_FIVRA_CPU0_SENSOR","A_PVCCFA_EHV_FIVRA_CPU1_SENSOR","A_PVCCD_HV_CPU0_SENSOR","A_PVCCD_HV_CPU1_SENSOR",
++ /*V0-V7*/ "SIO_S3","SIO_S5","TP_BMC_SIO_PWREQ_N","SIO_ONCONTROL","SIO_POWER_GOOD","LED_BMC_HB_LED_N","FM_BMC_SUSACK_N","",
++ /*W0-W7*/ "LPC_LAD0_ESPI_R_IO0","LPC_LAD1_ESPI_R_IO1","LPC_LAD2_ESPI_R_IO2","LPC_LAD3_ESPI_R_IO3","CLK_24M_66M_LPC0_ESPI_BMC","LPC_LFRAME_N_ESPI_CS0_BMC_N","IRQ_LPC_SERIRQ_ESPI_ALERT_N","RST_LPC_LRST_ESPI_RST_BMC_R_N",
++ /*X0-X7*/ "","SMI","POST_COMPLETE","","","","","",
++ /*Y0-Y7*/ "","IRQ_SML0_ALERT_BMC_R2_N","","IRQ_SML1_PMBUS_BMC_ALERT_N","SPI_BMC_BOOT_R_IO2","SPI_BMC_BOOT_R_IO3","PU_SPI_BMC_BOOT_ABR","PU_SPI_BMC_BOOT_WP_N",
++ /*Z0-Z7*/ "PWRGD_P3V3_RISER1","PWRGD_P3V3_RISER2","","HW_STRAP_5","HW_STRAP_6","HW_STRAP_7","HW_STRAP_2","HW_STRAP_3";
++};
++
++&gpio1 {
++ status = "disabled";
++ gpio-line-names = /* GPIO18 A-E */
++ /*A0-A7*/ "","","RST_EMMC_BMC_R_N","FM_SYS_FAN6_PRSNT_D_N","FM_SYS_FAN0_PRSNT_D_N","FM_SYS_FAN1_PRSNT_D_N","FM_SYS_FAN2_PRSNT_D_N","FM_SYS_FAN3_PRSNT_D_N",
++ /*B0-B7*/ "FM_SYS_FAN4_PRSNT_D_N","FM_SYS_FAN5_PRSNT_D_N","","FM_SYS_FAN7_PRSNT_D_N","RGMII_BMC_RMM4_TX_R_CLK","RGMII_BMC_RMM4_TX_R_CTRL","RGMII_BMC_RMM4_R_TXD0","RGMII_BMC_RMM4_R_TXD1",
++ /*C0-C7*/ "RGMII_BMC_RMM4_R_TXD2","RGMII_BMC_RMM4_R_TXD3","RGMII_BMC_RMM4_RX_CLK","RGMII_BMC_RMM4_RX_CTRL","RGMII_BMC_RMM4_RXD0","RGMII_BMC_RMM4_RXD1","RGMII_BMC_RMM4_RXD2","RGMII_BMC_RMM4_RXD3",
++ /*D0-D7*/ "EMMC_BMC_R_CLK","EMMC_BMC_R_CMD","EMMC_BMC_R_DATA0","EMMC_BMC_R_DATA1","EMMC_BMC_R_DATA2","EMMC_BMC_R_DATA3","EMMC_BMC_CD_N","EMMC_BMC_WP_N",
++ /*E0-E3*/ "EMMC_BMC_R_DATA4","EMMC_BMC_R_DATA5","EMMC_BMC_R_DATA6","EMMC_BMC_R_DATA7";
++};
++
++&sgpio {
++ status = "okay";
++ gpio-line-names =
++ /* SGPIO output lines */
++ /*OA0-OA7*/ "","","","","","","","",
++ /*OB0-OB7*/ "LED_CPU1_CH1_DIMM1_FAULT","LED_CPU1_CH1_DIMM2_FAULT","LED_CPU1_CH2_DIMM1_FAULT","LED_CPU1_CH2_DIMM2_FAULT","LED_CPU1_CH3_DIMM1_FAULT","LED_CPU1_CH3_DIMM2_FAULT","LED_CPU1_CH4_DIMM1_FAULT","LED_CPU1_CH4_DIMM2_FAULT",
++ /*OC0-OC7*/ "LED_CPU1_CH5_DIMM1_FAULT","LED_CPU1_CH5_DIMM2_FAULT","LED_CPU1_CH6_DIMM1_FAULT","LED_CPU1_CH6_DIMM2_FAULT","LED_FAN1_FAULT","LED_FAN2_FAULT","LED_FAN3_FAULT","LED_FAN4_FAULT",
++ /*OD0-OD7*/ "LED_FAN5_FAULT","LED_FAN6_FAULT","LED_FAN7_FAULT","LED_FAN8_FAULT","LED_CPU2_CH1_DIMM1_FAULT","LED_CPU1_CH1_DIMM2_FAULT","LED_CPU2_CH2_DIMM1_FAULT","LED_CPU2_CH2_DIMM2_FAULT",
++ /*OE0-OE7*/ "LED_CPU2_CH3_DIMM1_FAULT","LED_CPU2_CH3_DIMM2_FAULT","LED_CPU2_CH4_DIMM1_FAULT","LED_CPU2_CH4_DIMM2_FAULT","LED_CPU2_CH5_DIMM1_FAULT","LED_CPU2_CH5_DIMM2_FAULT","LED_CPU2_CH6_DIMM1_FAULT","LED_CPU2_CH6_DIMM2_FAULT",
++ /*OF0-OF7*/ "LED_CPU3_CH1_DIMM1_FAULT","LED_CPU3_CH1_DIMM2_FAULT","LED_CPU3_CH2_DIMM1_FAULT","LED_CPU3_CH2_DIMM2_FAULT","LED_CPU3_CH3_DIMM1_FAULT","LED_CPU3_CH3_DIMM2_FAULT","LED_CPU3_CH4_DIMM1_FAULT","LED_CPU3_CH4_DIMM2_FAULT",
++ /*OG0-OG7*/ "LED_CPU3_CH5_DIMM1_FAULT","LED_CPU3_CH5_DIMM2_FAULT","LED_CPU3_CH6_DIMM1_FAULT","LED_CPU3_CH6_DIMM2_FAULT","LED_CPU4_CH1_DIMM1_FAULT","LED_CPU4_CH1_DIMM2_FAULT","LED_CPU4_CH2_DIMM1_FAULT","LED_CPU4_CH2_DIMM2_FAULT",
++ /*OH0-OH7*/ "LED_CPU4_CH3_DIMM1_FAULT","LED_CPU4_CH3_DIMM2_FAULT","LED_CPU4_CH4_DIMM1_FAULT","LED_CPU4_CH4_DIMM2_FAULT","LED_CPU4_CH5_DIMM1_FAULT","LED_CPU4_CH5_DIMM2_FAULT","LED_CPU4_CH6_DIMM1_FAULT","LED_CPU4_CH6_DIMM2_FAULT",
++ /*OI0-OI7*/ "","","","","","","","",
++ /*OJ0-OJ7*/ "","","","","","","","",
++ /*DUMMY*/ "","","","","","","","",
++ /*DUMMY*/ "","","","","","","","",
++
++ /* SGPIO input lines */
++ /* Some lines have been renamed from the net names:
++ CPU1_PRESENCE -> FM_CPU0_SKTOCC_LVT3_N
++ CPU1_THERMTRIP -> H_CPU0_THERMTRIP_LVC1_N
++ CPU1_VRHOT -> IRQ_CPU0_VRHOT_N
++ CPU1_FIVR_FAULT -> H_CPU0_MON_FAIL_PLD_LVC1_N
++ CPU1_MEM_ABCD_VRHOT -> ??
++ CPU1_MEM_EFGH_VRHOT -> ??
++ CPU2_PRESENCE -> FM_CPU1_SKTOCC_LVT3_N
++ CPU2_THERMTRIP -> H_CPU1_THERMTRIP_LVC1_N
++ CPU2_VRHOT -> IRQ_CPU1_VRHOT_N
++ CPU2_FIVR_FAULT -> H_CPU1_MON_FAIL_PLD_LVC1_N
++ CPU2_MEM_ABCD_VRHOT -> ??
++ CPU2_MEM_EFGH_VRHOT -> ??
++
++ /*IA0-IA7*/ "CPU1_PRESENCE","CPU1_THERMTRIP","CPU1_VRHOT","CPU1_FIVR_FAULT","IRQ_CPU0_MEM_VRHOT_N","H_CPU0_MEMHOT_OUT_LVC1_N","FM_CPU0_PROC_ID0","FM_CPU0_PROC_ID1",
++ /*IB0-IB7*/ "WCPU_MISMATCH","IRQ_PSYS_CRIT_N","CPU2_PRESENCE","CPU2_THERMTRIP","CPU2_VRHOT","CPU2_FIVR_FAULT","IRQ_CPU1_MEM_VRHOT_N","H_CPU1_MEMHOT_OUT_LVC1_N",
++ /*IC0-IC7*/ "FM_CPU1_PROC_ID0","FM_CPU1_PROC_ID1","","","","","","",
++ /*ID0-ID7*/ "","","","","","","","",
++ /*IE0-IE7*/ "","","","","","","","",
++ /*IF0-IF7*/ "FPGA_REV_TEST_0","FPGA_REV_TEST_1","FPGA_REV_TEST_2","FPGA_REV_TEST_3","FPGA_REV_TEST_4","FPGA_REV_TEST_5","FPGA_REV_TEST_6","FPGA_REV_TEST_7",
++ /*IG0-IG7*/ "FPGA_REV_0","FPGA_REV_1","FPGA_REV_2","FPGA_REV_3","FPGA_REV_4","FPGA_REV_5","FPGA_REV_6","FPGA_REV_7",
++ /*IH0-IH7*/ "","WMEMX_PWR_FLT","WCPUX_MEM_PWR_FLT","PWRGD_P3V3_FF","WPSU_PWR_FLT","","","WPCH_PWR_FLT",
++ /*II0-II7*/ "FM_CPU0_PKGID0","FM_CPU0_PKGID1","FM_CPU0_PKGID2","H_CPU0_MEMTRIP_LVC1_N","FM_CPU1_PKGID0","FM_CPU1_PKGID1","FM_CPU1_PKGID2","H_CPU1_MEMTRIP_LVC1_N",
++ /*IJ0-IJ7*/ "","","","","","","","";
++};
++
++&kcs3 {
++ kcs_addr = <0xCA2>;
++ status = "okay";
++};
++
++&kcs4 {
++ kcs_addr = <0xCA4>;
++ status = "okay";
++};
++
++&lpc_sio {
++ status = "okay";
++};
++
++&lpc_snoop {
++ snoop-ports = <0x80>;
++ status = "okay";
++};
++
++&mbox {
++ status = "okay";
++};
++
++&mdio1 {
++ status = "okay";
++
++ ethphy1: ethernet-phy@0 {
++ compatible = "ethernet-phy-ieee802.3-c22";
++ reg = <0>;
++ };
++};
++
++&mac1 {
++ status = "okay";
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_rgmii2_default>;
++ clocks = <&syscon ASPEED_CLK_GATE_MAC2CLK>,
++ <&syscon ASPEED_CLK_GATE_MAC2RCLK>;
++ clock-names = "MACCLK", "RCLK";
++ phy-mode = "rgmii";
++ phy-handle = <&ethphy1>;
++};
++
++&mdio2 {
++ status = "okay";
++
++ ethphy2: ethernet-phy@1 {
++ compatible = "ethernet-phy-ieee802.3-c22";
++ reg = <0>;
++ };
++};
++
++&adc0 {
++ status = "okay";
++};
++
++&adc1 {
++ status = "okay";
++};
++
++&uart1 {
++ status = "okay";
++ // Workaround for A0
++ compatible = "snps,dw-apb-uart";
++ 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>;
++};
++
++&uart2 {
++ status = "okay";
++ // Workaround for A0
++ compatible = "snps,dw-apb-uart";
++ pinctrl-0 = <&pinctrl_txd2_default
++ &pinctrl_rxd2_default
++ &pinctrl_nrts2_default
++ &pinctrl_ndtr2_default
++ &pinctrl_ndsr2_default
++ &pinctrl_ncts2_default
++ &pinctrl_ndcd2_default
++ &pinctrl_nri2_default>;
++};
++
++&uart3 {
++ status = "okay";
++ // Workaround for A0
++ compatible = "snps,dw-apb-uart";
++ pinctrl-0 = <>;
++};
++
++&uart4 {
++ status = "okay";
++ // Workaround for A0
++ compatible = "snps,dw-apb-uart";
++ pinctrl-0 = <>;
++};
++
++&uart5 {
++ status = "okay";
++ // Workaround for A0
++ compatible = "snps,dw-apb-uart";
++};
++
++&uart_routing {
++ status = "okay";
++};
++
++&emmc_controller{
++ status = "okay";
++};
++
++&emmc {
++ non-removable;
++ bus-width = <4>;
++ max-frequency = <52000000>;
++};
++
++&i2c0 {
++ /* SMB_CHASSENSOR_STBY_LVC3 */
++ multi-master;
++ status = "okay";
++};
++
++&i2c4 {
++ /* SMB_HSBP_STBY_LVC3_R */
++ multi-master;
++ status = "okay";
++
++ hsbp0@10 {
++ compatible = "slave-mqueue";
++ reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
++ };
++};
++
++&i2c5 {
++ /* SMB_SMLINK0_STBY_LVC3_R2 */
++ bus-frequency = <1000000>;
++ multi-master;
++ status = "okay";
++
++ smlink0@10 {
++ compatible = "slave-mqueue";
++ reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
++ };
++};
++
++&i2c6 {
++ /* SMB_TEMPSENSOR_STBY_LVC3_R */
++ multi-master;
++ status = "okay";
++};
++
++&i2c7 {
++ /* SMB_PMBUS_SML1_STBY_LVC3_R */
++ multi-master;
++ #retries = <3>;
++
++ status = "okay";
++};
++
++&i2c8 {
++ /* SMB_PCIE_STBY_LVC3_R */
++ multi-master;
++ status = "okay";
++};
++
++&i2c9 {
++ /* SMB_HOST_STBY_BMC_LVC3_R */
++ multi-master;
++ status = "okay";
++};
++
++&i2c12 {
++ /* SMB_CPU_PIROM */
++ multi-master;
++ status = "okay";
++};
++
++&i2c13 {
++ /* SMB_IPMB_STBY_LVC3_R */
++ multi-master;
++ status = "okay";
++};
++
++&i3c0 {
++ /* I3C_SPD_DDRABCD_CPU0_BMC ; FIXME: i3c driver hangs kernel on probe...*/
++ status = "disabled";
++};
++
++&i3c1 {
++ /* I3C_SPD_DDREFGH_CPU0_BMC */
++ status = "disabled";
++};
++
++&i3c2 {
++ /* I3C_SPD_DDRABCD_CPU1_BMC */
++ status = "disabled";
++};
++
++&i3c3 {
++ /* I3C_SPD_DDREFGH_CPU1_BMC */
++ status = "disabled";
++};
++
++&gfx {
++ status = "okay";
++ memory-region = <&gfx_memory>;
++};
++
++&pwm_tacho {
++ status = "disabled"; /* FIXME: disabled because of bug in driver */
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_pwm1_default
++ &pinctrl_pwm2_default &pinctrl_pwm3_default
++ &pinctrl_pwm4_default &pinctrl_pwm5_default
++ &pinctrl_pwm12g1_default &pinctrl_pwm13g1_default
++ &pinctrl_pwm14g1_default &pinctrl_pwm15g1_default>;
++
++ fan@0 {
++ reg = <0x00>;
++ aspeed,fan-tach-ch = /bits/ 8 <0x00 0x01>;
++ };
++ fan@1 {
++ reg = <0x01>;
++ aspeed,fan-tach-ch = /bits/ 8 <0x02 0x03>;
++ };
++ fan@2 {
++ reg = <0x02>;
++ aspeed,fan-tach-ch = /bits/ 8 <0x04 0x05>;
++ };
++ fan@3 {
++ reg = <0x03>;
++ aspeed,fan-tach-ch = /bits/ 8 <0x06 0x07>;
++ };
++ fan@4 {
++ reg = <0x04>;
++ aspeed,fan-tach-ch = /bits/ 8 <0x08 0x09>;
++ };
++ fan@5 {
++ reg = <0x05>;
++ aspeed,fan-tach-ch = /bits/ 8 <0x0A 0x0B>;
++ };
++ fan@6 {
++ reg = <0x06>;
++ aspeed,fan-tach-ch = /bits/ 8 <0x18 0x19>;
++ };
++ fan@7 {
++ reg = <0x07>;
++ aspeed,fan-tach-ch = /bits/ 8 <0x1A 0x1B>;
++ };
++ fan@8 {
++ reg = <0x08>;
++ aspeed,fan-tach-ch = /bits/ 8 <0x1C 0x1D>;
++ };
++ fan@9 {
++ reg = <0x09>;
++ aspeed,fan-tach-ch = /bits/ 8 <0x1E 0x1F>;
++ };
++};
++
++&vhub {
++ status = "okay";
++};
+--
+2.7.4
+
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-base-aspeed-g6-dtsi-fixups.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-base-aspeed-g6-dtsi-fixups.patch
new file mode 100644
index 000000000..4fc3d8582
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-base-aspeed-g6-dtsi-fixups.patch
@@ -0,0 +1,245 @@
+From 58d4715d6ac08a20f68044875fdc3afaf75ee2a1 Mon Sep 17 00:00:00 2001
+From: Vernon Mauery <vernon.mauery@linux.intel.com>
+Date: Thu, 12 Sep 2019 15:55:39 +0800
+Subject: [PATCH] arm: dts: base aspeed g6 dtsi fixups
+
+Additions to the base g6 dtsi file for Aspeed ast2600 systems.
+This mostly includes entries for the drivers that are not upstream.
+
+Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
+---
+ arch/arm/boot/dts/aspeed-g6.dtsi | 207 +++++++++++++++++++++-
+ include/dt-bindings/clock/ast2600-clock.h | 8 +
+ 2 files changed, 213 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi
+index 8ac435b3dbde..5de3af52830d 100644
+--- a/arch/arm/boot/dts/aspeed-g6.dtsi
++++ b/arch/arm/boot/dts/aspeed-g6.dtsi
+@@ -28,6 +28,13 @@
+ i2c13 = &i2c13;
+ i2c14 = &i2c14;
+ i2c15 = &i2c15;
++ i3c0 = &i3c0;
++ i3c1 = &i3c1;
++ i3c2 = &i3c2;
++ i3c3 = &i3c3;
++ i3c4 = &i3c4;
++ i3c5 = &i3c5;
++ peci0 = &peci0;
+ serial0 = &uart1;
+ serial1 = &uart2;
+ serial2 = &uart3;
+@@ -273,11 +284,21 @@
+ quality = <100>;
+ };
+
++ adc: adc@1e6e9000 {
++ compatible = "aspeed,ast2500-adc";
++ reg = <0x1e6e9000 0x100>;
++ clocks = <&syscon ASPEED_CLK_APB2>;
++ interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
++ resets = <&syscon ASPEED_RESET_ADC>;
++ #io-channel-cells = <1>;
++ status = "disabled";
++ };
++
+ gpio0: gpio@1e780000 {
+ #gpio-cells = <2>;
+ gpio-controller;
+ compatible = "aspeed,ast2600-gpio";
+- reg = <0x1e780000 0x800>;
++ reg = <0x1e780000 0x200>;
+ interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
+ gpio-ranges = <&pinctrl 0 0 208>;
+ ngpios = <208>;
+@@ -290,7 +311,7 @@
+ #gpio-cells = <2>;
+ gpio-controller;
+ compatible = "aspeed,ast2600-gpio";
+- reg = <0x1e780800 0x800>;
++ reg = <0x1e780800 0x200>;
+ interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
+ gpio-ranges = <&pinctrl 0 208 36>;
+ ngpios = <36>;
+@@ -338,6 +407,20 @@
+ status = "disabled";
+ };
+
++ peci: bus@1e78b000 {
++ compatible = "simple-bus";
++ #address-cells = <1>;
++ #size-cells = <1>;
++ ranges = <0x0 0x1e78b000 0x60>;
++ };
++
++ i3c: bus@1e7a0000 {
++ compatible = "simple-bus";
++ #address-cells = <1>;
++ #size-cells = <1>;
++ ranges = <0 0x1e7a0000 0x8000>;
++ };
++
+ lpc: lpc@1e789000 {
+ compatible = "aspeed,ast2600-lpc", "simple-mfd";
+ reg = <0x1e789000 0x1000>;
+@@ -426,6 +509,20 @@
+ sio_regs: regs {
+ compatible = "aspeed,bmc-misc";
+ };
++
++ lpc_sio: lpc-sio@100 {
++ compatible = "aspeed,ast2500-lpc-sio";
++ reg = <0x100 0x20>;
++ clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
++ status = "disabled";
++ };
++
++ mbox: mbox@180 {
++ compatible = "aspeed,ast2600-mbox";
++ reg = <0x180 0x5c>;
++ interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
++ #mbox-cells = <1>;
++ };
+ };
+ };
+
+@@ -529,6 +626,24 @@
+
+ #include "aspeed-g6-pinctrl.dtsi"
+
++&peci {
++ peci0: peci-bus@0 {
++ compatible = "aspeed,ast2500-peci";
++ reg = <0x0 0x100>;
++ #address-cells = <1>;
++ #size-cells = <0>;
++ interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
++ clocks = <&syscon ASPEED_CLK_GATE_REF0CLK>, <&syscon ASPEED_CLK_AHB>;
++ resets = <&syscon ASPEED_RESET_PECI>;
++ clock-frequency = <24000000>;
++ msg-timing = <1>;
++ addr-timing = <1>;
++ rd-sampling-point = <8>;
++ cmd-timeout-ms = <1000>;
++ status = "disabled";
++ };
++};
++
+ &i2c {
+ i2c0: i2c-bus@40 {
+ #address-cells = <1>;
+@@ -770,3 +885,91 @@
+ status = "disabled";
+ };
+ };
++
++&i3c {
++ i3c0: i3c0@2000 {
++ #address-cells = <1>;
++ #size-cells = <0>;
++ #interrupt-cells = <1>;
++ reg = <0x2000 0x1000>;
++ compatible = "snps,dw-i3c-master-1.00a";
++ clocks = <&syscon ASPEED_CLK_APB2>;
++ resets = <&syscon ASPEED_RESET_I3C0>;
++ bus-frequency = <100000>;
++ interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
++ status = "disabled";
++ };
++
++ i3c1: i3c1@3000 {
++ #address-cells = <1>;
++ #size-cells = <0>;
++ #interrupt-cells = <1>;
++ reg = <0x3000 0x1000>;
++ compatible = "snps,dw-i3c-master-1.00a";
++ clocks = <&syscon ASPEED_CLK_APB2>;
++ resets = <&syscon ASPEED_RESET_I3C1>;
++ bus-frequency = <100000>;
++ interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
++ status = "disabled";
++ };
++
++ i3c2: i3c2@4000 {
++ #address-cells = <1>;
++ #size-cells = <0>;
++ #interrupt-cells = <1>;
++ reg = <0x4000 0x1000>;
++ compatible = "snps,dw-i3c-master-1.00a";
++ clocks = <&syscon ASPEED_CLK_APB2>;
++ resets = <&syscon ASPEED_RESET_I3C2>;
++ bus-frequency = <100000>;
++ interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_i3c3_default>;
++ status = "disabled";
++ };
++
++ i3c3: i3c3@5000 {
++ #address-cells = <1>;
++ #size-cells = <0>;
++ #interrupt-cells = <1>;
++ reg = <0x5000 0x1000>;
++ compatible = "snps,dw-i3c-master-1.00a";
++ clocks = <&syscon ASPEED_CLK_APB2>;
++ resets = <&syscon ASPEED_RESET_I3C3>;
++ bus-frequency = <100000>;
++ interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_i3c4_default>;
++ status = "disabled";
++ };
++
++ i3c4: i3c4@6000 {
++ #address-cells = <1>;
++ #size-cells = <0>;
++ #interrupt-cells = <1>;
++ reg = <0x6000 0x1000>;
++ compatible = "snps,dw-i3c-master-1.00a";
++ clocks = <&syscon ASPEED_CLK_APB2>;
++ resets = <&syscon ASPEED_RESET_I3C4>;
++ bus-frequency = <100000>;
++ interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_i3c5_default>;
++ status = "disabled";
++ };
++
++ i3c5: i3c5@7000 {
++ #address-cells = <1>;
++ #size-cells = <0>;
++ #interrupt-cells = <1>;
++ reg = <0x7000 0x1000>;
++ compatible = "snps,dw-i3c-master-1.00a";
++ clocks = <&syscon ASPEED_CLK_APB2>;
++ resets = <&syscon ASPEED_RESET_I3C5>;
++ bus-frequency = <100000>;
++ interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_i3c6_default>;
++ status = "disabled";
++ };
++};
+diff --git a/include/dt-bindings/clock/ast2600-clock.h b/include/dt-bindings/clock/ast2600-clock.h
+index ac567fc84a87..94350356cfb1 100644
+--- a/include/dt-bindings/clock/ast2600-clock.h
++++ b/include/dt-bindings/clock/ast2600-clock.h
+@@ -92,6 +92,14 @@
+ /* Only list resets here that are not part of a gate */
+ #define ASPEED_RESET_ADC 55
+ #define ASPEED_RESET_JTAG_MASTER2 54
++#define ASPEED_RESET_I3C7 47
++#define ASPEED_RESET_I3C6 46
++#define ASPEED_RESET_I3C5 45
++#define ASPEED_RESET_I3C4 44
++#define ASPEED_RESET_I3C3 43
++#define ASPEED_RESET_I3C2 42
++#define ASPEED_RESET_I3C1 41
++#define ASPEED_RESET_I3C0 40
+ #define ASPEED_RESET_I3C_DMA 39
+ #define ASPEED_RESET_PWM 37
+ #define ASPEED_RESET_PECI 36
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0002-Add-Aspeed-fmc-spi-driver.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0002-Add-Aspeed-fmc-spi-driver.patch
new file mode 100644
index 000000000..08e350c15
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0002-Add-Aspeed-fmc-spi-driver.patch
@@ -0,0 +1,645 @@
+From 1365492683b47f63d470d0666fee258a5c7ca3c3 Mon Sep 17 00:00:00 2001
+From: Vernon Mauery <vernon.mauery@intel.com>
+Date: Thu, 12 Sep 2019 15:26:08 -0700
+Subject: [PATCH 04/52] Add Aspeed fmc-spi driver
+
+Add the Aspeed fmc-spi driver from the Apeed SDK v5.02
+
+Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
+---
+ arch/arm/boot/dts/aspeed-g6.dtsi | 43 ++-
+ drivers/spi/Kconfig | 6 +
+ drivers/spi/Makefile | 1 +
+ drivers/spi/fmc_spi.c | 530 +++++++++++++++++++++++++++++++
+ 4 files changed, 579 insertions(+), 1 deletion(-)
+ create mode 100644 drivers/spi/fmc_spi.c
+
+diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi
+index 42f644ac8111..1aab48fbf49e 100644
+--- a/arch/arm/boot/dts/aspeed-g6.dtsi
++++ b/arch/arm/boot/dts/aspeed-g6.dtsi
+@@ -90,7 +90,7 @@
+ <0x40464000 0x2000>,
+ <0x40466000 0x2000>;
+ };
+-
++#if 1
+ fmc: spi@1e620000 {
+ reg = < 0x1e620000 0xc4
+ 0x20000000 0x10000000 >;
+@@ -169,6 +169,47 @@
+ status = "disabled";
+ };
+ };
++#else
++ spi0: spi@1e620000 {
++ /* reg : cs0 : cs1 : cs2 */
++ reg = <0x1e620000 0x100
++ 0x20000000 0x40
++ 0x28000000 0x40>;
++ #address-cells = <1>;
++ #size-cells = <0>;
++ compatible = "aspeed,fmc-spi";
++ clocks = <&syscon ASPEED_CLK_AHB>;
++ status = "disable";
++ number_of_chip_select = /bits/ 16 <2>;
++ interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
++ };
++
++ spi1: spi1@1e630000 {
++ /* reg : cs0 : cs1 */
++ reg = <0x1e630000 0x100
++ 0x30000000 0x20
++ 0x32000000 0x20>;
++ #address-cells = <1>;
++ #size-cells = <0>;
++ compatible = "aspeed,fmc-spi";
++ clocks = <&syscon ASPEED_CLK_AHB>;
++ status = "disable";
++ number_of_chip_select = /bits/ 16 <2>;
++ };
++
++ spi2: spi2@1e631000 {
++ /* reg : cs0 : cs1 */
++ reg = <0x1e631000 0x100
++ 0x38000000 0x20
++ 0x3A000000 0x20>;
++ #address-cells = <1>;
++ #size-cells = <0>;
++ compatible = "aspeed,fmc-spi";
++ clocks = <&syscon ASPEED_CLK_AHB>;
++ status = "disable";
++ number_of_chip_select = /bits/ 16 <2>;
++ };
++#endif
+
+ mdio0: mdio@1e650000 {
+ compatible = "aspeed,ast2600-mdio";
+diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
+index 6ee514fd0920..9f32c31ffa3c 100644
+--- a/drivers/spi/Kconfig
++++ b/drivers/spi/Kconfig
+@@ -57,6 +57,12 @@ config SPI_MEM
+
+ comment "SPI Master Controller Drivers"
+
++config SPI_FMC
++ tristate "Aspeed FMC SPI Controller"
++ depends on ARCH_ASPEED
++ help
++ This selects a driver for the AST FMC SPI Controller
++
+ config SPI_ALTERA
+ tristate "Altera SPI Controller"
+ help
+diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
+index adbebee93a75..224b9b71e29c 100644
+--- a/drivers/spi/Makefile
++++ b/drivers/spi/Makefile
+@@ -13,6 +13,7 @@ obj-$(CONFIG_SPI_SPIDEV) += spidev.o
+ obj-$(CONFIG_SPI_LOOPBACK_TEST) += spi-loopback-test.o
+
+ # SPI master controller drivers (bus)
++obj-$(CONFIG_SPI_FMC) += fmc_spi.o
+ obj-$(CONFIG_SPI_ALTERA) += spi-altera.o
+ obj-$(CONFIG_SPI_ARMADA_3700) += spi-armada-3700.o
+ obj-$(CONFIG_SPI_ATMEL) += spi-atmel.o
+diff --git a/drivers/spi/fmc_spi.c b/drivers/spi/fmc_spi.c
+new file mode 100644
+index 000000000000..f21f7a00496e
+--- /dev/null
++++ b/drivers/spi/fmc_spi.c
+@@ -0,0 +1,530 @@
++/*
++ * fmc_spi.c - FMC SPI driver for the Aspeed SoC
++ *
++ * Copyright (C) ASPEED Technology Inc.
++ * Ryan Chen <ryan_chen@aspeedtech.com>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version
++ * 2 of the License, or (at your option) any later version.
++ *
++ */
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/clk.h>
++#include <linux/sched.h>
++#include <linux/kernel.h>
++#include <linux/delay.h>
++#include <linux/interrupt.h>
++#include <linux/ioport.h>
++#include <linux/platform_device.h>
++#include <linux/err.h>
++#include <linux/errno.h>
++#include <linux/wait.h>
++#include <linux/delay.h>
++#include <linux/spi/spi.h>
++#include <linux/spi/flash.h>
++
++#include <linux/of_address.h>
++#include <linux/of_irq.h>
++#include <linux/of_platform.h>
++
++/******************************************************************************/
++/* AST_SPI_CONFIG 0x00 : SPI00 CE Type Setting Register */
++#define AST_G5_SPI_CONF_CE1_WEN (0x1 << 17)
++#define AST_G5_SPI_CONF_CE0_WEN (0x1 << 16)
++
++#define SPI_CONF_CE0_WEN (0x1)
++
++/* Register offsets */
++#define FMC_SPI_CONFIG 0x00
++#define FMC_SPI_CTRL 0x04
++#define FMC_SPI_DMA_STS 0x08
++
++#define FMC_SPI_CE0_CTRL 0x10
++#define FMC_SPI_CE1_CTRL 0x14
++
++#define AST_SPI_DMA_CTRL 0x80
++#define AST_SPI_DMA_FLASH_BASE 0x84
++#define AST_SPI_DMA_DRAM_BASE 0x88
++#define AST_SPI_DMA_LENGTH 0x8c
++
++/* AST_FMC_CONFIG 0x00 : FMC00 CE Type Setting Register */
++#define FMC_CONF_LAGACY_DIS (0x1 << 31)
++#define FMC_CONF_CE1_WEN (0x1 << 17)
++#define FMC_CONF_CE0_WEN (0x1 << 16)
++#define FMC_CONF_CE1_SPI (0x2 << 2)
++#define FMC_CONF_CE0_SPI (0x2)
++
++/* FMC_SPI_CTRL : 0x04 : FMC04 CE Control Register */
++#define FMC_CTRL_CE1_4BYTE_MODE (0x1 << 1)
++#define FMC_CTRL_CE0_4BYTE_MODE (0x1)
++
++/* FMC_SPI_DMA_STS : 0x08 : FMC08 Interrupt Control and Status Register */
++#define FMC_STS_DMA_READY 0x0800
++#define FMC_STS_DMA_CLEAR 0x0800
++
++/* FMC_CE0_CTRL for SPI 0x10, 0x14, 0x18, 0x1c, 0x20 */
++#define SPI_IO_MODE_MASK (3 << 28)
++#define SPI_SINGLE_BIT (0 << 28)
++#define SPI_DUAL_MODE (0x2 << 28)
++#define SPI_DUAL_IO_MODE (0x3 << 28)
++#define SPI_QUAD_MODE (0x4 << 28)
++#define SPI_QUAD_IO_MODE (0x5 << 28)
++
++#define SPI_CE_WIDTH(x) (x << 24)
++#define SPI_CMD_DATA_MASK (0xff << 16)
++#define SPI_CMD_DATA(x) (x << 16)
++#define SPI_DUMMY_CMD (1 << 15)
++#define SPI_DUMMY_HIGH (1 << 14)
++//#define SPI_CLK_DIV (1 << 13) ?? TODO ask....
++//#define SPI_ADDR_CYCLE (1 << 13) ?? TODO ask....
++#define SPI_CMD_MERGE_DIS (1 << 12)
++#define SPI_CLK_DIV(x) (x << 8)
++#define SPI_CLK_DIV_MASK (0xf << 8)
++
++#define SPI_DUMMY_LOW_MASK (0x3 << 6)
++#define SPI_DUMMY_LOW(x) ((x) << 6)
++#define SPI_LSB_FIRST_CTRL (1 << 5)
++#define SPI_CPOL_1 (1 << 4)
++#define SPI_DUAL_DATA (1 << 3)
++#define SPI_CE_INACTIVE (1 << 2)
++#define SPI_CMD_MODE_MASK (0x3)
++#define SPI_CMD_NORMAL_READ_MODE 0
++#define SPI_CMD_READ_CMD_MODE 1
++#define SPI_CMD_WRITE_CMD_MODE 2
++#define SPI_CMD_USER_MODE 3
++
++/* AST_SPI_DMA_CTRL 0x80 */
++#define FMC_DMA_ENABLE (0x1)
++
++/******************************************************************************/
++struct fmc_spi_host {
++ void __iomem *base;
++ void __iomem *ctrl_reg;
++ u32 buff[5];
++ struct spi_master *master;
++ struct spi_device *spi_dev;
++ struct device *dev;
++ u32 ahb_clk;
++ spinlock_t lock;
++};
++
++static u32 ast_spi_calculate_divisor(struct fmc_spi_host *host,
++ u32 max_speed_hz)
++{
++ // [0] ->15 : HCLK , HCLK/16
++ u8 SPI_DIV[16] = {
++ 16, 7, 14, 6, 13, 5, 12, 4, 11, 3, 10, 2, 9, 1, 8, 0
++ };
++ u32 i, spi_cdvr = 0;
++
++ for (i = 1; i < 17; i++) {
++ if (max_speed_hz >= (host->ahb_clk / i)) {
++ spi_cdvr = SPI_DIV[i - 1];
++ break;
++ }
++ }
++
++ // printk("hclk is %d, divisor is %d, target :%d , cal speed %d\n", host->ahb_clk, spi_cdvr, spi->max_speed_hz, hclk/i);
++ return spi_cdvr;
++}
++
++/* the spi->mode bits understood by this driver: */
++#define MODEBITS (SPI_CPOL | SPI_CPHA | SPI_CS_HIGH)
++
++static int fmc_spi_setup(struct spi_device *spi)
++{
++ struct fmc_spi_host *host =
++ (struct fmc_spi_host *)spi_master_get_devdata(spi->master);
++ unsigned int bits = spi->bits_per_word;
++ u32 fmc_config = 0;
++ u32 spi_ctrl = 0;
++ u32 divisor;
++
++ // dev_dbg(host->dev, "fmc_spi_setup() cs: %d, spi->mode %d \n", spi->chip_select, spi->mode);
++ // printk("fmc_spi_setup() cs: %d, spi->mode %d spi->max_speed_hz %d , spi->bits_per_word %d \n", spi->chip_select, spi->mode, spi->max_speed_hz, spi->bits_per_word);
++
++ switch (spi->chip_select) {
++ case 0:
++ fmc_config |= FMC_CONF_CE0_WEN | FMC_CONF_CE0_SPI;
++ host->ctrl_reg = host->base + FMC_SPI_CE0_CTRL;
++ break;
++ case 1:
++ fmc_config |= FMC_CONF_CE1_WEN | FMC_CONF_CE1_SPI;
++ host->ctrl_reg = host->base + FMC_SPI_CE0_CTRL;
++ break;
++ default:
++ dev_dbg(&spi->dev,
++ "setup: invalid chipselect %u (%u defined)\n",
++ spi->chip_select, spi->master->num_chipselect);
++ return -EINVAL;
++ break;
++ }
++ writel(fmc_config, host->base);
++
++ if (bits == 0)
++ bits = 8;
++
++ if (bits < 8 || bits > 16) {
++ dev_dbg(&spi->dev,
++ "setup: invalid bits_per_word %u (8 to 16)\n", bits);
++ return -EINVAL;
++ }
++
++ if (spi->mode & ~MODEBITS) {
++ dev_dbg(&spi->dev, "setup: unsupported mode bits %x\n",
++ spi->mode & ~MODEBITS);
++ return -EINVAL;
++ }
++
++ /* see notes above re chipselect */
++ if ((spi->chip_select == 0) && (spi->mode & SPI_CS_HIGH)) {
++ dev_dbg(&spi->dev, "setup: can't be active-high\n");
++ return -EINVAL;
++ }
++
++ /*
++ * Pre-new_1 chips start out at half the peripheral
++ * bus speed.
++ */
++
++ if (spi->max_speed_hz) {
++ /* Set the SPI slaves select and characteristic control register */
++ divisor = ast_spi_calculate_divisor(host, spi->max_speed_hz);
++ } else {
++ /* speed zero means "as slow as possible" */
++ divisor = 15;
++ }
++
++ spi_ctrl &= ~SPI_CLK_DIV_MASK;
++ // printk("set div %x \n",divisor);
++ //TODO MASK first
++ spi_ctrl |= SPI_CLK_DIV(divisor);
++
++ /* only support mode 0 (CPOL=0, CPHA=0) and cannot support mode 1 ~ mode 3 */
++
++#if 0
++ if (SPI_CPHA & spi->mode)
++ cpha = SPI_CPHA_1;
++ else
++ cpha = SPI_CPHA_0;
++#endif
++
++ // if (SPI_CPOL & spi->mode)
++ // spi_ctrl |= SPI_CPOL_1;
++ // else
++ // spi_ctrl &= ~SPI_CPOL_1;
++
++ //ISSUE : ast spi ctrl couldn't use mode 3, so fix mode 0
++ spi_ctrl &= ~SPI_CPOL_1;
++
++ if (SPI_LSB_FIRST & spi->mode)
++ spi_ctrl |= SPI_LSB_FIRST_CTRL;
++ else
++ spi_ctrl &= ~SPI_LSB_FIRST_CTRL;
++
++ /* Configure SPI controller */
++ writel(spi_ctrl, host->ctrl_reg);
++
++ // printk("ctrl %x, ", spi_ctrl);
++ return 0;
++}
++
++static int fmc_spi_transfer(struct spi_device *spi, struct spi_message *msg)
++{
++ struct fmc_spi_host *host =
++ (struct fmc_spi_host *)spi_master_get_devdata(spi->master);
++ struct spi_transfer *xfer;
++ const u8 *tx_buf;
++ u8 *rx_buf;
++ unsigned long flags;
++
++ int i = 0, j = 0;
++
++ // dev_dbg(host->dev, "xfer %s \n", dev_name(&spi->dev));
++ // printk("xfer spi->chip_select %d \n", spi->chip_select);
++
++ host->spi_dev = spi;
++ spin_lock_irqsave(&host->lock, flags);
++
++ writel(readl(host->ctrl_reg) | SPI_CMD_USER_MODE, host->ctrl_reg);
++ msg->actual_length = 0;
++ msg->status = 0;
++
++ list_for_each_entry (xfer, &msg->transfers, transfer_list) {
++ dev_dbg(host->dev,
++ "xfer[%d] %p: width %d, len %u, tx %p/%08x, rx %p/%08x\n",
++ j, xfer, xfer->bits_per_word, xfer->len, xfer->tx_buf,
++ xfer->tx_dma, xfer->rx_buf, xfer->rx_dma);
++
++ tx_buf = xfer->tx_buf;
++ rx_buf = xfer->rx_buf;
++
++ if (tx_buf != 0) {
++#if 0
++ printk("tx : ");
++ if(xfer->len > 10) {
++ for(i=0;i<10;i++)
++ printk("%x ",tx_buf[i]);
++ } else {
++ for(i=0;i<xfer->len;i++)
++ printk("%x ",tx_buf[i]);
++ }
++ printk("\n");
++#endif
++ for (i = 0; i < xfer->len; i++) {
++ writeb(tx_buf[i],
++ (void *)host->buff
++ [host->spi_dev->chip_select]);
++ }
++ }
++ //Issue need clarify
++ udelay(1);
++ if (rx_buf != 0) {
++ for (i = 0; i < xfer->len; i++) {
++ rx_buf[i] = readb(
++ (void *)host->buff
++ [host->spi_dev->chip_select]);
++ }
++#if 0
++ printk("rx : ");
++ if(xfer->len > 10) {
++ for(i=0;i<10;i++)
++ printk(" %x",rx_buf[i]);
++ } else {
++ for(i=0;i<xfer->len;i++)
++ printk(" %x",rx_buf[i]);
++ }
++ printk("\n");
++#endif
++ }
++ dev_dbg(host->dev, "old msg->actual_length %d , +len %d \n",
++ msg->actual_length, xfer->len);
++ msg->actual_length += xfer->len;
++ dev_dbg(host->dev, "new msg->actual_length %d \n",
++ msg->actual_length);
++ // j++;
++ }
++
++ // writel( SPI_CE_INACTIVE | readl(host->spi_data->ctrl_reg),host->spi_data->ctrl_reg);
++ writel(readl(host->ctrl_reg) & ~SPI_CMD_USER_MODE, host->ctrl_reg);
++ msg->status = 0;
++
++ msg->complete(msg->context);
++
++ // spin_unlock(&host->lock);
++ spin_unlock_irqrestore(&host->lock, flags);
++
++ return 0;
++}
++
++static void fmc_spi_cleanup(struct spi_device *spi)
++{
++ struct fmc_spi_host *host = spi_master_get_devdata(spi->master);
++ unsigned long flags;
++ dev_dbg(host->dev, "fmc_spi_cleanup() \n");
++
++ spin_lock_irqsave(&host->lock, flags);
++ // if (host->stay == spi) {
++ // host->stay = NULL;
++ // cs_deactivate(host, spi);
++ // }
++ spin_unlock_irqrestore(&host->lock, flags);
++}
++
++#if 0
++static int fmc_spi_flash_read(struct spi_device *spi,
++ struct spi_flash_read_message *msg)
++{
++// struct fmc_spi_host *host = spi_master_get_devdata(spi->master);
++ int ret = 0;
++
++// printk("read msg->from %x, msg->len %x , msg->buf %x , msg->addr_width %d , msg->dummy_bytes %x , msg->read_opcode %x \n", msg->from, msg->len, msg->buf, msg->addr_width, msg->dummy_bytes, msg->read_opcode);
++
++// memcpy_fromio(msg->buf, b53spi->mmio_base + msg->from, msg->len);
++ msg->retlen = msg->len;
++
++ return ret;
++}
++#endif
++
++static int fmc_spi_probe(struct platform_device *pdev)
++{
++ struct resource *res;
++ struct fmc_spi_host *host;
++ struct spi_master *master;
++ struct clk *clk;
++ int cs_num = 0;
++ int err = 0;
++
++ dev_dbg(&pdev->dev, "fmc_spi_probe() \n");
++
++ master = spi_alloc_master(&pdev->dev, sizeof(struct fmc_spi_host));
++ if (NULL == master) {
++ dev_err(&pdev->dev, "No memory for spi_master\n");
++ err = -ENOMEM;
++ goto err_nomem;
++ }
++
++ /* the spi->mode bits understood by this driver: */
++ master->mode_bits =
++ SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_RX_DUAL | SPI_TX_DUAL;
++ master->bits_per_word_mask = SPI_BPW_MASK(8);
++
++ master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_RX_DUAL;
++ // master->bits_per_word_mask = SPI_BPW_RANGE_MASK(8, 16);
++ master->dev.of_node = pdev->dev.of_node;
++ master->bus_num = pdev->id;
++ // master->num_chipselect = master->dev.of_node ? 0 : 4;
++ platform_set_drvdata(pdev, master);
++
++ host = spi_master_get_devdata(master);
++ memset(host, 0, sizeof(struct fmc_spi_host));
++
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ if (!res) {
++ dev_err(&pdev->dev, "cannot get IORESOURCE_MEM 0\n");
++ err = -ENXIO;
++ goto err_no_io_res;
++ }
++
++ host->base = devm_ioremap_resource(&pdev->dev, res);
++ if (!host->base) {
++ dev_err(&pdev->dev, "cannot remap register\n");
++ err = -EIO;
++ goto err_no_io_res;
++ }
++
++ clk = devm_clk_get(&pdev->dev, NULL);
++ if (IS_ERR(clk)) {
++ dev_err(&pdev->dev, "no clock defined\n");
++ return -ENODEV;
++ }
++ host->ahb_clk = clk_get_rate(clk);
++
++ dev_dbg(&pdev->dev, "remap phy %x, virt %x \n", (u32)res->start,
++ (u32)host->base);
++
++ host->master = spi_master_get(master);
++
++ if (of_property_read_u16(pdev->dev.of_node, "number_of_chip_select",
++ &host->master->num_chipselect))
++ goto err_register;
++
++ for (cs_num = 0; cs_num < host->master->num_chipselect; cs_num++) {
++ res = platform_get_resource(pdev, IORESOURCE_MEM, cs_num + 1);
++ if (!res) {
++ dev_err(&pdev->dev, "cannot get IORESOURCE_IO 0\n");
++ return -ENXIO;
++ }
++
++ host->buff[cs_num] =
++ (u32)devm_ioremap_resource(&pdev->dev, res);
++ if (!host->buff[cs_num]) {
++ dev_err(&pdev->dev, "cannot remap buffer \n");
++ err = -EIO;
++ goto err_no_io_res;
++ }
++
++ dev_dbg(&pdev->dev, "remap io phy %x, virt %x \n",
++ (u32)res->start, (u32)host->buff[cs_num]);
++ }
++
++ host->master->bus_num = pdev->id;
++ host->dev = &pdev->dev;
++
++ /* Setup the state for bitbang driver */
++ host->master->setup = fmc_spi_setup;
++ host->master->transfer = fmc_spi_transfer;
++ host->master->cleanup = fmc_spi_cleanup;
++ // host->master->spi_flash_read = fmc_spi_flash_read;
++
++ platform_set_drvdata(pdev, host);
++
++ /* Register our spi controller */
++ err = devm_spi_register_master(&pdev->dev, host->master);
++ if (err) {
++ dev_err(&pdev->dev, "failed to register SPI master\n");
++ goto err_register;
++ }
++
++ dev_dbg(&pdev->dev, "fmc_spi : driver load \n");
++
++ return 0;
++
++err_register:
++ spi_master_put(host->master);
++ iounmap(host->base);
++ for (cs_num = 0; cs_num < host->master->num_chipselect; cs_num++) {
++ iounmap((void *)host->buff[cs_num]);
++ }
++
++err_no_io_res:
++ kfree(master);
++ kfree(host);
++
++err_nomem:
++ return err;
++}
++
++static int fmc_spi_remove(struct platform_device *pdev)
++{
++ struct resource *res0;
++ struct fmc_spi_host *host = platform_get_drvdata(pdev);
++
++ dev_dbg(host->dev, "fmc_spi_remove()\n");
++
++ if (!host)
++ return -1;
++
++ res0 = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ release_mem_region(res0->start, res0->end - res0->start + 1);
++ iounmap(host->base);
++ iounmap(host->buff);
++
++ platform_set_drvdata(pdev, NULL);
++ spi_unregister_master(host->master);
++ spi_master_put(host->master);
++ return 0;
++}
++
++#ifdef CONFIG_PM
++static int fmc_spi_suspend(struct platform_device *pdev, pm_message_t msg)
++{
++ return 0;
++}
++
++static int fmc_spi_resume(struct platform_device *pdev)
++{
++ return 0;
++}
++#else
++#define fmc_spi_suspend NULL
++#define fmc_spi_resume NULL
++#endif
++
++static const struct of_device_id fmc_spi_of_match[] = {
++ { .compatible = "aspeed,fmc-spi" },
++ {},
++};
++
++static struct platform_driver fmc_spi_driver = {
++ .probe = fmc_spi_probe,
++ .remove = fmc_spi_remove,
++#ifdef CONFIG_PM
++ .suspend = fmc_spi_suspend,
++ .resume = fmc_spi_resume,
++#endif
++ .driver = {
++ .name = KBUILD_MODNAME,
++ .of_match_table = fmc_spi_of_match,
++ },
++};
++
++module_platform_driver(fmc_spi_driver);
++
++MODULE_DESCRIPTION("FMC SPI Driver");
++MODULE_AUTHOR("Ryan Chen");
++MODULE_LICENSE("GPL");
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0002-Enable-pass-through-on-GPIOE1-and-GPIOE3-free.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0002-Enable-pass-through-on-GPIOE1-and-GPIOE3-free.patch
index ecee21f1c..58d81db75 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0002-Enable-pass-through-on-GPIOE1-and-GPIOE3-free.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0002-Enable-pass-through-on-GPIOE1-and-GPIOE3-free.patch
@@ -15,19 +15,78 @@ enabled again.
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
---
drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c | 1 +
- drivers/pinctrl/aspeed/pinctrl-aspeed.c | 60 ++++++++++++++++++++++++++++++
+ drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c | 1 +
+ drivers/pinctrl/aspeed/pinctrl-aspeed.c | 60 ++++++++++++++++++++++
drivers/pinctrl/aspeed/pinctrl-aspeed.h | 3 ++
- 3 files changed, 64 insertions(+)
+ 4 files changed, 65 insertions(+)
diff --git a/drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c b/drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c
-index d8a804b9f958..5e7f53fab76e 100644
+index 0cab4c2576e2..a8d64184ace1 100644
--- a/drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c
+++ b/drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c
-@@ -2805,6 +2805,7 @@ static const struct pinmux_ops aspeed_g5_pinmux_ops = {
+@@ -2780,6 +2780,22 @@ static int aspeed_g5_sig_expr_set(struct aspeed_pinmux_data *ctx,
+ return 0;
+ }
+
++#define GPIOE1 33
++#define GPIOE3 35
++static void aspeed_g5_gpio_disable_free(struct pinctrl_dev *pctldev,
++ struct pinctrl_gpio_range *range,
++ unsigned int offset)
++{
++ /*
++ * If we're freeing GPIOE1 (33) or GPIOE3 (35) then re-enable the
++ * pass-through mux setting; otherwise, do nothing.
++ */
++ if (offset != GPIOE1 && offset != GPIOE3)
++ return;
++
++ aspeed_gpio_disable_free(pctldev, range, offset);
++}
++
+ static const struct aspeed_pin_config_map aspeed_g5_pin_config_map[] = {
+ { PIN_CONFIG_BIAS_PULL_DOWN, 0, 1, BIT_MASK(0)},
+ { PIN_CONFIG_BIAS_PULL_DOWN, -1, 0, BIT_MASK(0)},
+@@ -2815,6 +2837,7 @@ static const struct pinmux_ops aspeed_g5_pinmux_ops = {
.get_function_groups = aspeed_pinmux_get_fn_groups,
.set_mux = aspeed_pinmux_set_mux,
.gpio_request_enable = aspeed_gpio_request_enable,
-+ .gpio_disable_free = aspeed_gpio_disable_free,
++ .gpio_disable_free = aspeed_g5_gpio_disable_free,
+ .strict = true,
+ };
+
+diff --git a/drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c b/drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c
+index eb0c11a9fbf2..cae6fdd83c80 100644
+--- a/drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c
++++ b/drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c
+@@ -2655,6 +2655,22 @@ static int aspeed_g6_sig_expr_set(struct aspeed_pinmux_data *ctx,
+ return 0;
+ }
+
++#define GPIOP1 121
++#define GPIOP3 123
++static void aspeed_g6_gpio_disable_free(struct pinctrl_dev *pctldev,
++ struct pinctrl_gpio_range *range,
++ unsigned int offset)
++{
++ /*
++ * If we're freeing GPIOP1 (121) or GPIOP3 (123) then re-enable the
++ * pass-through mux setting; otherwise, do nothing.
++ */
++ if (offset != GPIOP1 && offset != GPIOP3)
++ return;
++
++ aspeed_gpio_disable_free(pctldev, range, offset);
++}
++
+ static const struct aspeed_pin_config_map aspeed_g6_pin_config_map[] = {
+ { PIN_CONFIG_BIAS_PULL_DOWN, 0, 1, BIT_MASK(0)},
+ { PIN_CONFIG_BIAS_PULL_DOWN, -1, 0, BIT_MASK(0)},
+@@ -2695,6 +2717,7 @@ static const struct pinmux_ops aspeed_g6_pinmux_ops = {
+ .get_function_groups = aspeed_pinmux_get_fn_groups,
+ .set_mux = aspeed_pinmux_set_mux,
+ .gpio_request_enable = aspeed_gpio_request_enable,
++ .gpio_disable_free = aspeed_g6_gpio_disable_free,
.strict = true,
};
@@ -35,33 +94,26 @@ diff --git a/drivers/pinctrl/aspeed/pinctrl-aspeed.c b/drivers/pinctrl/aspeed/pi
index 54933665b5f8..aa7d56e99824 100644
--- a/drivers/pinctrl/aspeed/pinctrl-aspeed.c
+++ b/drivers/pinctrl/aspeed/pinctrl-aspeed.c
-@@ -356,6 +356,66 @@ int aspeed_gpio_request_enable(struct pinctrl_dev *pctldev,
- return aspeed_sig_expr_enable(&pdata->pinmux, expr);
+@@ -375,6 +375,59 @@ int aspeed_gpio_request_enable(struct pinctrl_dev *pctldev,
+ return 0;
}
+void aspeed_gpio_disable_free(struct pinctrl_dev *pctldev,
+ struct pinctrl_gpio_range *range,
+ unsigned int offset)
+{
-+ const struct aspeed_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
++ struct aspeed_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
+ const struct aspeed_pin_desc *pdesc = pdata->pins[offset].drv_data;
+ const struct aspeed_sig_expr ***prios, **funcs, *expr;
+ int ret;
+
-+ /*
-+ * If we're freeing GPIOE1 (33) or GPIOE3 (35) then re-enable the
-+ * pass-through mux setting; otherwise, do nothing.
-+ */
-+ if (offset != 33 && offset != 35)
++ if (!pdesc)
+ return;
+
+ dev_dbg(pctldev->dev,
+ "Freeing pass-through pin %s (%d). Re-enabling pass-through.\n",
+ pdesc->name, offset);
+
-+ if (!pdesc)
-+ return;
-+
+ prios = pdesc->prios;
+
+ if (!prios)
@@ -106,7 +158,7 @@ diff --git a/drivers/pinctrl/aspeed/pinctrl-aspeed.h b/drivers/pinctrl/aspeed/pi
index a5d83986f32e..c1104341e202 100644
--- a/drivers/pinctrl/aspeed/pinctrl-aspeed.h
+++ b/drivers/pinctrl/aspeed/pinctrl-aspeed.h
-@@ -67,6 +67,9 @@ int aspeed_pinmux_set_mux(struct pinctrl_dev *pctldev, unsigned int function,
+@@ -101,6 +101,9 @@ int aspeed_pinmux_set_mux(struct pinctrl_dev *pctldev, unsigned int function,
int aspeed_gpio_request_enable(struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *range,
unsigned int offset);
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0003-Enable-GPIOE0-and-GPIOE2-pass-through-by-default.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0003-Enable-GPIOE0-and-GPIOE2-pass-through-by-default.patch
index 263b64822..1ee1c68de 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0003-Enable-GPIOE0-and-GPIOE2-pass-through-by-default.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0003-Enable-GPIOE0-and-GPIOE2-pass-through-by-default.patch
@@ -54,8 +54,8 @@ index 09e53c5..6165b44 100644
/*
+ * Select the pass-through pinctrl config to enable the pass-through
-+ * mux for GPIOs E0 and E2. Then call pinctrl_put() to release claim
-+ * of the GPIO pins, so they can be requested at runtime.
++ * mux for GPIOs marked as pass-through. Then call pinctrl_put() to
++ * release claim of the GPIO pins, so they can be requested at runtime.
+ */
+ pinctrl = pinctrl_get_select(&pdev->dev, "pass-through");
+ if (!IS_ERR(pinctrl))
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0006-Allow-monitoring-of-power-control-input-GPIOs.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0006-Allow-monitoring-of-power-control-input-GPIOs.patch
index c84746359..0b0e430c6 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0006-Allow-monitoring-of-power-control-input-GPIOs.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0006-Allow-monitoring-of-power-control-input-GPIOs.patch
@@ -75,6 +75,48 @@ index 5e7f53fab76e..b08b5325edb1 100644
SIG_EXPR_LIST_DECL_DUAL(P21, SIOONCTRL, SIOONCTRL, ACPI);
SIG_EXPR_LIST_DECL_SINGLE(P21, DASHP21, DASHP21, SIG_DESC_SET(SCU94, 11));
PIN_DECL_2(P21, GPIOY3, SIOONCTRL, DASHP21);
+diff --git a/drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c b/drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c
+index cae6fdd83c80..6ff185d63ab7 100644
+--- a/drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c
++++ b/drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c
+@@ -762,7 +762,7 @@ SSSF_PIN_DECL(AC23, GPIOO7, PWM7, SIG_DESC_SET(SCU41C, 23));
+
+ #define AB22 120
+ SIG_EXPR_LIST_DECL_SEMG(AB22, PWM8, PWM8G1, PWM8, SIG_DESC_SET(SCU41C, 24));
+-SIG_EXPR_LIST_DECL_SESG(AB22, THRUIN0, THRU0, SIG_DESC_SET(SCU4BC, 24));
++SIG_EXPR_LIST_DECL_SESG(AB22, THRUIN0, THRU0);
+ PIN_DECL_2(AB22, GPIOP0, PWM8, THRUIN0);
+ GROUP_DECL(PWM8G1, AB22);
+ FUNC_DECL_2(PWM8, PWM8G0, PWM8G1);
+@@ -779,7 +779,7 @@ FUNC_DECL_2(PWM9, PWM9G0, PWM9G1);
+
+ #define AA23 122
+ SIG_EXPR_LIST_DECL_SEMG(AA23, PWM10, PWM10G1, PWM10, SIG_DESC_SET(SCU41C, 26));
+-SIG_EXPR_LIST_DECL_SESG(AA23, THRUIN1, THRU1, SIG_DESC_SET(SCU4BC, 26));
++SIG_EXPR_LIST_DECL_SESG(AA23, THRUIN1, THRU1);
+ PIN_DECL_2(AA23, GPIOP2, PWM10, THRUIN1);
+ GROUP_DECL(PWM10G1, AA23);
+ FUNC_DECL_2(PWM10, PWM10G0, PWM10G1);
+@@ -1070,16 +1070,16 @@ FUNC_GROUP_DECL(GPIU7, AC17);
+ FUNC_GROUP_DECL(ADC15, AC17);
+
+ #define AB15 168
+-SSSF_PIN_DECL(AB15, GPIOV0, SIOS3, SIG_DESC_SET(SCU434, 8));
++SSSF_PIN_DECL(AB15, GPIOV0, SIOS3);
+
+ #define AF14 169
+-SSSF_PIN_DECL(AF14, GPIOV1, SIOS5, SIG_DESC_SET(SCU434, 9));
++SSSF_PIN_DECL(AF14, GPIOV1, SIOS5);
+
+ #define AD14 170
+ SSSF_PIN_DECL(AD14, GPIOV2, SIOPWREQ, SIG_DESC_SET(SCU434, 10));
+
+ #define AC15 171
+-SSSF_PIN_DECL(AC15, GPIOV3, SIOONCTRL, SIG_DESC_SET(SCU434, 11));
++SSSF_PIN_DECL(AC15, GPIOV3, SIOONCTRL);
+
+ #define AE15 172
+ SSSF_PIN_DECL(AE15, GPIOV4, SIOPWRGD, SIG_DESC_SET(SCU434, 12));
--
2.7.4
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0015-New-flash-map-for-intel.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0015-New-flash-map-for-intel.patch
index 695491d28..b9de9f5a9 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0015-New-flash-map-for-intel.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0015-New-flash-map-for-intel.patch
@@ -1,7 +1,7 @@
From f57d473a30f208754457bdb63512c307f7499ac8 Mon Sep 17 00:00:00 2001
From: Vernon Mauery <vernon.mauery@intel.com>
Date: Mon, 4 Jun 2018 13:45:42 -0700
-Subject: [PATCH] New flash map for Intel
+Subject: [PATCH] New flash map for intel
Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
Signed-off-by: Vikram Bodireddy <vikram.bodireddy@intel.com>
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0016-Add-ASPEED-SGPIO-driver.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0016-Add-ASPEED-SGPIO-driver.patch
index 07bdf60af..2f03c9e5a 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0016-Add-ASPEED-SGPIO-driver.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0016-Add-ASPEED-SGPIO-driver.patch
@@ -1,7 +1,7 @@
From ab104c6067683a3a251e2814991474243b7e1cb8 Mon Sep 17 00:00:00 2001
From: "Feist, James" <james.feist@intel.com>
Date: Tue, 4 Jun 2019 14:00:39 -0700
-Subject: [PATCH] gpio: aspeed: add ASPEED SGPIO driver
+Subject: [PATCH] Add ASPEED SGPIO driver
Add SGPIO driver support for Aspeed SoCs.
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0017-SGPIO-DT-and-pinctrl-fixup.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0017-SGPIO-DT-and-pinctrl-fixup.patch
index 6bfcb43c4..b4f46c2c8 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0017-SGPIO-DT-and-pinctrl-fixup.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0017-SGPIO-DT-and-pinctrl-fixup.patch
@@ -105,6 +105,32 @@ index 271f3c96456a..128e0b5bbae2 100644
};
rtc: rtc@1e781000 {
+diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi
+index 1aab48fbf49e..567f268a3032 100644
+--- a/arch/arm/boot/dts/aspeed-g6.dtsi
++++ b/arch/arm/boot/dts/aspeed-g6.dtsi
+@@ -356,6 +356,21 @@
+ #interrupt-cells = <2>;
+ };
+
++ sgpio: sgpio@1e780500 {
++ #gpio-cells = <2>;
++ gpio-controller;
++ compatible = "aspeed,ast2500-sgpio";
++ reg = <0x1e780500 0x0100>;
++ #interrupt-cells = <2>;
++ interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
++ interrupt-controller;
++ bus-frequency = <1000000>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_sgpm1_default>;
++ clocks = <&syscon ASPEED_CLK_APB1>;
++ status = "disabled";
++ };
++
+ rtc: rtc@1e781000 {
+ compatible = "aspeed,ast2600-rtc";
+ reg = <0x1e781000 0x18>;
diff --git a/drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c b/drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c
index 95ea593fa29d..70284c5f9ad9 100644
--- a/drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0018-Update-PECI-drivers-to-sync-with-linux-upstreaming-v.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0018-Update-PECI-drivers-to-sync-with-linux-upstreaming-v.patch
index 77e413125..d1da4c599 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0018-Update-PECI-drivers-to-sync-with-linux-upstreaming-v.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0018-Update-PECI-drivers-to-sync-with-linux-upstreaming-v.patch
@@ -5212,7 +5212,7 @@ index a6dae71..253fb42 100644
-#define WRPCICFGLOCAL_PECI_CMD 0xe5
-
-#define PECI_BUFFER_SIZE 32
-+#define PECI_DEV_RETRY_TIME_MS 250
++#define PECI_DEV_RETRY_TIME_MS 700
+#define PECI_DEV_RETRY_INTERVAL_USEC 10000
+#define PECI_DEV_RETRY_BIT 0x01
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0019-Add-I2C-IPMB-support.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0019-Add-I2C-IPMB-support.patch
index 675125322..128b11ecf 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0019-Add-I2C-IPMB-support.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0019-Add-I2C-IPMB-support.patch
@@ -1,7 +1,7 @@
From f588865f8180a6370ac639bdfc186ffc5b926246 Mon Sep 17 00:00:00 2001
From: Haiyue Wang <haiyue.wang@linux.intel.com>
Date: Tue, 13 Feb 2018 14:28:12 +0800
-Subject: [PATCH] i2c: slave-mqueue: add mqueue driver to receive ipmi message
+Subject: [PATCH] Add I2C IPMB support
Some protocols over I2C are designed for bi-directional transferring
messages by using I2C Master Write protocol. Like the MCTP (Management
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0022-Add-AST2500-eSPI-driver.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0022-Add-AST2500-eSPI-driver.patch
index 07283f54d..a82fefba0 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0022-Add-AST2500-eSPI-driver.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0022-Add-AST2500-eSPI-driver.patch
@@ -1,8 +1,7 @@
From 6e55e28db5eed85b7717aa4fc92c064f11429f6d Mon Sep 17 00:00:00 2001
From: Haiyue Wang <haiyue.wang@linux.intel.com>
Date: Sat, 24 Feb 2018 11:12:32 +0800
-Subject: [PATCH] eSPI: add ASPEED AST2500 eSPI driver to boot a host with PCH
- runs on eSPI
+Subject: [PATCH] Add AST2500 eSPI driver
When PCH works under eSPI mode, the PMC (Power Management Controller) in
PCH is waiting for SUS_ACK from BMC after it alerts SUS_WARN. It is in
@@ -22,10 +21,12 @@ Also, it provides monitoring interface of PLTRST_N signal through
Signed-off-by: Haiyue Wang <haiyue.wang@linux.intel.com>
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Signed-off-by: James Feist <james.feist@linux.intel.com>
+Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
---
.../devicetree/bindings/misc/aspeed,espi-slave.txt | 19 +
Documentation/misc-devices/espi-slave.rst | 118 ++++++
arch/arm/boot/dts/aspeed-g5.dtsi | 4 +
+ arch/arm/boot/dts/aspeed-g6.dtsi | 12 +
drivers/misc/Kconfig | 8 +
drivers/misc/Makefile | 1 +
drivers/misc/aspeed-espi-slave.c | 420 +++++++++++++++++++++
@@ -39,12 +40,13 @@ new file mode 100644
index 000000000000..8660e2ffbb89
--- /dev/null
+++ b/Documentation/devicetree/bindings/misc/aspeed,espi-slave.txt
-@@ -0,0 +1,19 @@
+@@ -0,0 +1,20 @@
+ASPEED eSPI Slave Controller
+
+Required properties:
+ - compatible: must be one of:
+ - "aspeed,ast2500-espi-slave"
++ - "aspeed,ast2600-espi-slave"
+
+ - reg: physical base address of the controller and length of memory mapped
+ region
@@ -205,6 +207,36 @@ index 88f75736fe48..26671cc4dbd5 100644
};
lpc: lpc@1e789000 {
+diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi
+index 567f268a3032..48de17a24c74 100644
+--- a/arch/arm/boot/dts/aspeed-g6.dtsi
++++ b/arch/arm/boot/dts/aspeed-g6.dtsi
+@@ -3,6 +3,7 @@
+
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/clock/ast2600-clock.h>
++#include <dt-bindings/gpio/aspeed-gpio.h>
+
+ / {
+ model = "Aspeed BMC";
+@@ -512,6 +513,17 @@
+ status = "disabled";
+ };
+
++ espi: espi@1e6ee000 {
++ compatible = "aspeed,ast2600-espi-slave";
++ reg = <0x1e6ee000 0x200>;
++ interrupts-extended = <&gic GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
++ <&gpio0 ASPEED_GPIO(W, 7) IRQ_TYPE_EDGE_FALLING>;
++ status = "disabled";
++ clocks = <&syscon ASPEED_CLK_GATE_ESPICLK>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_espi_default>;
++ };
++
+ i2c: bus@1e78a000 {
+ compatible = "simple-bus";
+ #address-cells = <1>;
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index d681b7201f8c..50814caba1d3 100644
--- a/drivers/misc/Kconfig
@@ -241,7 +273,7 @@ new file mode 100644
index 000000000000..b0fc01692d3a
--- /dev/null
+++ b/drivers/misc/aspeed-espi-slave.c
-@@ -0,0 +1,420 @@
+@@ -0,0 +1,421 @@
+// SPDX-License-Identifier: GPL-2.0
+// Copyright (c) 2015-2019, Intel Corporation.
+
@@ -644,6 +676,7 @@ index 000000000000..b0fc01692d3a
+
+static const struct of_device_id of_espi_match_table[] = {
+ { .compatible = "aspeed,ast2500-espi-slave" },
++ { .compatible = "aspeed,ast2600-espi-slave" },
+ { }
+};
+MODULE_DEVICE_TABLE(of, of_espi_match_table);
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0026-Add-support-for-new-PECI-commands.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0026-Add-support-for-new-PECI-commands.patch
index 4dc14d3b1..223c15fc6 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0026-Add-support-for-new-PECI-commands.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0026-Add-support-for-new-PECI-commands.patch
@@ -461,7 +461,7 @@ index 2a6be04..43a86a0 100644
+ msg->tx_buf[6] = (u8)umsg->param1;
+ msg->tx_buf[7] = (u8)(umsg->param1 >> 8);
+ msg->tx_buf[8] = (u8)umsg->param2;
-+ msg->tx_buf[8] = (u8)(umsg->param2 >> 8);
++ msg->tx_buf[9] = (u8)(umsg->param2 >> 8);
+
+ ret = peci_xfer_with_retries(adapter, msg, false);
+ if (!ret)
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0028-Add-AST2500-JTAG-driver.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0028-Add-AST2500-JTAG-driver.patch
index 28bc8d36c..45dec5b20 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0028-Add-AST2500-JTAG-driver.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0028-Add-AST2500-JTAG-driver.patch
@@ -1,9 +1,9 @@
From a4413fe3ba94906243b632e0b9e0e9a91620dd22 Mon Sep 17 00:00:00 2001
From: "Corona, Ernesto" <ernesto.corona@intel.com>
Date: Fri, 1 Mar 2019 11:46:09 -0700
-Subject: [PATCH] Update AST2500d JTAG driver. Step 1
+Subject: [PATCH] Add AST2500 JTAG driver
-Update AST2500d JTAG driver. Remove Legacy driver but keep headers.
+Update AST2500 JTAG driver. Remove Legacy driver but keep headers.
Signed-off-by: Corona, Ernesto <ernesto.corona@intel.com>
---
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0032-misc-aspeed-Add-Aspeed-UART-routing-control-driver.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0032-misc-aspeed-Add-Aspeed-UART-routing-control-driver.patch
index f1e3612e8..f1507020a 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0032-misc-aspeed-Add-Aspeed-UART-routing-control-driver.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0032-misc-aspeed-Add-Aspeed-UART-routing-control-driver.patch
@@ -13,15 +13,16 @@ the other UARTs wired up in a testable way.
Signed-off-by: Oskar Senft <osk@google.com>
Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
+Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
---
- .../ABI/stable/sysfs-driver-aspeed-uart-routing | 14 +
- Documentation/misc-devices/aspeed-uart-routing.txt | 49 +++
- arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts | 4 +
- arch/arm/boot/dts/aspeed-g5.dtsi | 6 +
- drivers/misc/Kconfig | 6 +
- drivers/misc/Makefile | 1 +
- drivers/misc/aspeed-uart-routing.c | 383 +++++++++++++++++++++
- 7 files changed, 463 insertions(+)
+ .../stable/sysfs-driver-aspeed-uart-routing | 14 +
+ .../misc-devices/aspeed-uart-routing.txt | 49 +++
+ arch/arm/boot/dts/aspeed-g5.dtsi | 6 +
+ arch/arm/boot/dts/aspeed-g6.dtsi | 6 +
+ drivers/misc/Kconfig | 6 +
+ drivers/misc/Makefile | 1 +
+ drivers/misc/aspeed-uart-routing.c | 383 ++++++++++++++++++
+ 7 files changed, 465 insertions(+)
create mode 100644 Documentation/ABI/stable/sysfs-driver-aspeed-uart-routing
create mode 100644 Documentation/misc-devices/aspeed-uart-routing.txt
create mode 100644 drivers/misc/aspeed-uart-routing.c
@@ -56,7 +57,7 @@ index 000000000000..afaf17cb7eda
+=================================
+
+Supported chips:
-+ASPEED AST2500
++ASPEED AST2500/AST2600
+
+Author:
+Google LLC
@@ -64,8 +65,8 @@ index 000000000000..afaf17cb7eda
+Description
+-----------
+
-+The Aspeed AST2500 allows to dynamically route the inputs for the built-in
-+UARTS and physical serial I/O ports.
++The Aspeed AST2500/AST2600 allows to dynamically route the inputs for the
++built-in UARTS and physical serial I/O ports.
+
+This allows, for example, to connect the output of UART to another UART.
+This can be used to enable host<->BMC communication via UARTs, e.g. to allow
@@ -101,21 +102,6 @@ index 000000000000..afaf17cb7eda
+ >/sys/bus/platform/drivers/aspeed-uart-routing/*.uart_routing/uart1
+$ cat /sys/bus/platform/drivers/aspeed-uart-routing/*.uart_routing/uart1
+io1 io2 io3 io4 uart2 [uart3] uart4 io6
-diff --git a/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts b/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts
-index 0aa2ac82cae4..403f29a74281 100644
---- a/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts
-+++ b/arch/arm/boot/dts/aspeed-bmc-intel-ast2500.dts
-@@ -260,6 +260,10 @@
- status = "okay";
- };
-
-+&uart_routing {
-+ status = "okay";
-+};
-+
- &mac1 {
- status = "okay";
-
diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
index 26671cc4dbd5..8288002e4f02 100644
--- a/arch/arm/boot/dts/aspeed-g5.dtsi
@@ -133,6 +119,23 @@ index 26671cc4dbd5..8288002e4f02 100644
};
peci: bus@1e78b000 {
+diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi
+index 48de17a24c74..3a6ff98df8ea 100644
+--- a/arch/arm/boot/dts/aspeed-g6.dtsi
++++ b/arch/arm/boot/dts/aspeed-g6.dtsi
+@@ -311,6 +311,12 @@
+ compatible = "aspeed,ast2600-pinctrl";
+ };
+
++ uart_routing: uart_routing@9c {
++ compatible = "aspeed,ast2500-uart-routing";
++ reg = <0x9c 0x4>;
++ status = "disabled";
++ };
++
+ smp-memram@180 {
+ compatible = "aspeed,ast2600-smpmem";
+ reg = <0x180 0x40>;
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 50814caba1d3..439f3b0de702 100644
--- a/drivers/misc/Kconfig
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0039-Add-Aspeed-PWM-driver-which-uses-FTTMR010-timer-IP.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0039-Add-Aspeed-PWM-driver-which-uses-FTTMR010-timer-IP.patch
index 6d8ec4883..e6de3e473 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0039-Add-Aspeed-PWM-driver-which-uses-FTTMR010-timer-IP.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0039-Add-Aspeed-PWM-driver-which-uses-FTTMR010-timer-IP.patch
@@ -471,7 +471,7 @@ index 000000000000..4c929a25e27c
+ struct pwm_chip *chip = &priv->chip;
+ unsigned int i;
+
-+ for (i = chip->variant.chan_min; i < chip->variant.chan_max; i++) {
++ for (i = priv->variant.chan_min; i < priv->variant.chan_max; i++) {
+ struct pwm_device *pwm = &chip->pwms[i];
+ struct pwm_fttmr010_chan *chan = pwm_get_chip_data(pwm);
+
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0043-char-ipmi-Add-clock-control-logic-into-Aspeed-LPC-BT.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0043-char-ipmi-Add-clock-control-logic-into-Aspeed-LPC-BT.patch
index 139d06df0..c59ff1e9c 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0043-char-ipmi-Add-clock-control-logic-into-Aspeed-LPC-BT.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0043-char-ipmi-Add-clock-control-logic-into-Aspeed-LPC-BT.patch
@@ -15,12 +15,14 @@ individually so this patch adds clock control logic into the LPC
BT driver.
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
---
- .../bindings/ipmi/aspeed,ast2400-ibt-bmc.txt | 3 +++
- arch/arm/boot/dts/aspeed-g4.dtsi | 1 +
- arch/arm/boot/dts/aspeed-g5.dtsi | 1 +
- drivers/char/ipmi/bt-bmc.c | 24 +++++++++++++++++++++-
- 4 files changed, 28 insertions(+), 1 deletion(-)
+ .../bindings/ipmi/aspeed,ast2400-ibt-bmc.txt | 3 +++
+ arch/arm/boot/dts/aspeed-g4.dtsi | 1 +
+ arch/arm/boot/dts/aspeed-g5.dtsi | 1 +
+ arch/arm/boot/dts/aspeed-g6.dtsi | 1 +
+ drivers/char/ipmi/bt-bmc.c | 24 ++++++++++++++++++-
+ 5 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/ipmi/aspeed,ast2400-ibt-bmc.txt b/Documentation/devicetree/bindings/ipmi/aspeed,ast2400-ibt-bmc.txt
index 028268fd99ee..d13887d60f19 100644
@@ -65,6 +67,18 @@ index 653e03a0fa4c..49f792eafdd1 100644
interrupts = <8>;
status = "disabled";
};
+diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi
+index 653e03a0fa4c..49f792eafdd1 100644
+--- a/arch/arm/boot/dts/aspeed-g6.dtsi
++++ b/arch/arm/boot/dts/aspeed-g6.dtsi
+@@ -546,6 +546,7 @@
+ ibt: ibt@c0 {
+ compatible = "aspeed,ast2600-ibt-bmc";
+ reg = <0xc0 0x18>;
++ clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
+ interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
diff --git a/drivers/char/ipmi/bt-bmc.c b/drivers/char/ipmi/bt-bmc.c
index 40b9927c072c..a4ec9d1743d7 100644
--- a/drivers/char/ipmi/bt-bmc.c
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0044-misc-Add-clock-control-logic-into-Aspeed-LPC-SNOOP-d.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0044-misc-Add-clock-control-logic-into-Aspeed-LPC-SNOOP-d.patch
index cd20e77ac..bfd65cbe3 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0044-misc-Add-clock-control-logic-into-Aspeed-LPC-SNOOP-d.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0044-misc-Add-clock-control-logic-into-Aspeed-LPC-SNOOP-d.patch
@@ -15,11 +15,14 @@ individually so this patch adds clock control logic into the LPC
SNOOP driver.
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
---
arch/arm/boot/dts/aspeed-g4.dtsi | 1 +
arch/arm/boot/dts/aspeed-g5.dtsi | 1 +
+ arch/arm/boot/dts/aspeed-g6.dtsi | 1 +
drivers/soc/aspeed/aspeed-lpc-snoop.c | 30 +++++++++++++++++++++++++++---
3 files changed, 29 insertions(+), 3 deletions(-)
+ 4 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi
index b3b6720fb6fb..58c5148194a3 100644
@@ -45,6 +48,18 @@ index 49f792eafdd1..955789d8c736 100644
status = "disabled";
};
+diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi
+index 49f792eafdd1..955789d8c736 100644
+--- a/arch/arm/boot/dts/aspeed-g6.dtsi
++++ b/arch/arm/boot/dts/aspeed-g6.dtsi
+@@ -400,6 +527,7 @@
+ compatible = "aspeed,ast2600-lpc-snoop";
+ reg = <0x0 0x80>;
+ interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
++ clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
+ status = "disabled";
+ };
+
diff --git a/drivers/soc/aspeed/aspeed-lpc-snoop.c b/drivers/soc/aspeed/aspeed-lpc-snoop.c
index 48f7ac238861..96ea52db25be 100644
--- a/drivers/soc/aspeed/aspeed-lpc-snoop.c
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0045-char-ipmi-Add-clock-control-logic-into-Aspeed-LPC-KC.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0045-char-ipmi-Add-clock-control-logic-into-Aspeed-LPC-KC.patch
index cfff0a842..f8515351b 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0045-char-ipmi-Add-clock-control-logic-into-Aspeed-LPC-KC.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0045-char-ipmi-Add-clock-control-logic-into-Aspeed-LPC-KC.patch
@@ -16,12 +16,14 @@ individually so this patch adds clock control logic into the LPC
KCS driver.
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
---
.../devicetree/bindings/ipmi/aspeed-kcs-bmc.txt | 3 ++
arch/arm/boot/dts/aspeed-g4.dtsi | 35 ++++++++++++++++++++
arch/arm/boot/dts/aspeed-g5.dtsi | 6 +++-
+ arch/arm/boot/dts/aspeed-g6.dtsi | 4 ++
drivers/char/ipmi/kcs_bmc_aspeed.c | 37 ++++++++++++++++++----
- 4 files changed, 73 insertions(+), 8 deletions(-)
+ 5 files changed, 77 insertions(+), 8 deletions(-)
diff --git a/Documentation/devicetree/bindings/ipmi/aspeed-kcs-bmc.txt b/Documentation/devicetree/bindings/ipmi/aspeed-kcs-bmc.txt
index d98a9bf45d6c..3453eb0bf8f2 100644
@@ -140,6 +142,42 @@ index 955789d8c736..19739183c1c8 100644
status = "disabled";
};
+diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi
+index 955789d8c736..19739183c1c8 100644
+--- a/arch/arm/boot/dts/aspeed-g6.dtsi
++++ b/arch/arm/boot/dts/aspeed-g6.dtsi
+@@ -356,18 +477,23 @@
+ kcs1: kcs1@0 {
+ compatible = "aspeed,ast2600-kcs-bmc";
+ interrupts = <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>;
++ clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
+ kcs_chan = <1>;
+ status = "disabled";
+ };
++
+ kcs2: kcs2@0 {
+ compatible = "aspeed,ast2600-kcs-bmc";
+ interrupts = <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>;
++ clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
+ kcs_chan = <2>;
+ status = "disabled";
+ };
++
+ kcs3: kcs3@0 {
+ compatible = "aspeed,ast2600-kcs-bmc";
+ interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
++ clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
+ kcs_chan = <3>;
+ status = "disabled";
+ };
+@@ -385,6 +511,7 @@
+ kcs4: kcs4@0 {
+ compatible = "aspeed,ast2600-kcs-bmc";
+ interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
++ clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
+ kcs_chan = <4>;
+ status = "disabled";
+ };
diff --git a/drivers/char/ipmi/kcs_bmc_aspeed.c b/drivers/char/ipmi/kcs_bmc_aspeed.c
index 3c955946e647..bd1912dc5a21 100644
--- a/drivers/char/ipmi/kcs_bmc_aspeed.c
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0051-Add-AST2500-JTAG-device.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0051-Add-AST2500-JTAG-device.patch
index 02bb6527f..abfbcd68c 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0051-Add-AST2500-JTAG-device.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0051-Add-AST2500-JTAG-device.patch
@@ -1,7 +1,7 @@
From ce35414258a8541a8b81a4a8a929bcf9cdface97 Mon Sep 17 00:00:00 2001
From: "Hunt, Bryan" <bryan.hunt@intel.com>
Date: Mon, 6 May 2019 10:02:14 -0700
-Subject: [PATCH] Add AST2500d JTAG driver
+Subject: [PATCH] Add AST2500 JTAG device
Adding aspeed jtag device
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0053-Add-Aspeed-SoC-24xx-and-25xx-families-JTAG.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0053-Add-Aspeed-SoC-24xx-and-25xx-families-JTAG.patch
index 94722d6c4..1ffaf7646 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0053-Add-Aspeed-SoC-24xx-and-25xx-families-JTAG.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0053-Add-Aspeed-SoC-24xx-and-25xx-families-JTAG.patch
@@ -1,8 +1,7 @@
From 817a43d1b1e197e7eff43492599469bbc23bf0fd Mon Sep 17 00:00:00 2001
From: "Corona, Ernesto" <ernesto.corona@intel.com>
Date: Mon, 3 Jun 2019 08:22:09 -0800
-Subject: [PATCH v29 2/6] Add Aspeed SoC 24xx and 25xx families JTAG master
- driver
+Subject: [PATCH] Add Aspeed SoC 24xx and 25xx families JTAG
Driver adds support of Aspeed 2500/2400 series SOC JTAG master controller.
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0054-Documentation-jtag-Add-bindings-for-Aspeed-SoC.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0054-Documentation-jtag-Add-bindings-for-Aspeed-SoC.patch
index f17bdcd68..12073da02 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0054-Documentation-jtag-Add-bindings-for-Aspeed-SoC.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0054-Documentation-jtag-Add-bindings-for-Aspeed-SoC.patch
@@ -1,8 +1,7 @@
From 2a22feac440070b7feaf0a6fe7e7e555d57ca19b Mon Sep 17 00:00:00 2001
From: "Corona, Ernesto" <ernesto.corona@intel.com>
Date: Wed, 10 Mar 2019 11:45:04 -0800
-Subject: [PATCH v29 3/6] Documentation: jtag: Add bindings for Aspeed SoC
- 24xx and 25xx families JTAG master driver
+Subject: [PATCH] Documentation: jtag: Add bindings for Aspeed SoC
It has been tested on Mellanox system with BMC equipped with
Aspeed 2520 SoC for programming CPLD devices.
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0060-i2c-aspeed-fix-master-pending-state-handling.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0060-i2c-aspeed-fix-master-pending-state-handling.patch
deleted file mode 100644
index d38c089af..000000000
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0060-i2c-aspeed-fix-master-pending-state-handling.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From ca5e5e784ada4da11caebf6ba6852e1ff8a13bf7 Mon Sep 17 00:00:00 2001
-From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
-Date: Tue, 11 Jun 2019 14:59:53 -0700
-Subject: [PATCH] i2c: aspeed: fix master pending state handling
-
-In case of master pending state, it should not trigger a master
-command, otherwise data could be corrupted because this H/W shares
-the same data buffer for slave and master operations. It also means
-that H/W command queue handling is unreliable because of the buffer
-sharing issue. To fix this issue, it clears command queue if a
-master command is queued in pending state to use S/W solution
-instead of H/W command queue handling. Also, it refines restarting
-mechanism of the pending master command.
-
-Fixes: 2e57b7cebb98 ("i2c: aspeed: Add multi-master use case support")
-
-Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
----
- drivers/i2c/busses/i2c-aspeed.c | 54 ++++++++++++++++++++++++++---------------
- 1 file changed, 34 insertions(+), 20 deletions(-)
-
-diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c
-index 58bdbe472721..7becfcd67142 100644
---- a/drivers/i2c/busses/i2c-aspeed.c
-+++ b/drivers/i2c/busses/i2c-aspeed.c
-@@ -108,6 +108,12 @@
- #define ASPEED_I2CD_S_TX_CMD BIT(2)
- #define ASPEED_I2CD_M_TX_CMD BIT(1)
- #define ASPEED_I2CD_M_START_CMD BIT(0)
-+#define ASPEED_I2CD_MASTER_CMDS_MASK \
-+ (ASPEED_I2CD_M_STOP_CMD | \
-+ ASPEED_I2CD_M_S_RX_CMD_LAST | \
-+ ASPEED_I2CD_M_RX_CMD | \
-+ ASPEED_I2CD_M_TX_CMD | \
-+ ASPEED_I2CD_M_START_CMD)
-
- /* 0x18 : I2CD Slave Device Address Register */
- #define ASPEED_I2CD_DEV_ADDR_MASK GENMASK(6, 0)
-@@ -351,18 +357,19 @@ static void aspeed_i2c_do_start(struct aspeed_i2c_bus *bus)
- struct i2c_msg *msg = &bus->msgs[bus->msgs_index];
- u8 slave_addr = i2c_8bit_addr_from_msg(msg);
-
-- bus->master_state = ASPEED_I2C_MASTER_START;
--
- #if IS_ENABLED(CONFIG_I2C_SLAVE)
- /*
- * If it's requested in the middle of a slave session, set the master
- * state to 'pending' then H/W will continue handling this master
- * command when the bus comes back to the idle state.
- */
-- if (bus->slave_state != ASPEED_I2C_SLAVE_INACTIVE)
-+ if (bus->slave_state != ASPEED_I2C_SLAVE_INACTIVE) {
- bus->master_state = ASPEED_I2C_MASTER_PENDING;
-+ return;
-+ }
- #endif /* CONFIG_I2C_SLAVE */
-
-+ bus->master_state = ASPEED_I2C_MASTER_START;
- bus->buf_index = 0;
-
- if (msg->flags & I2C_M_RD) {
-@@ -437,20 +444,6 @@ static u32 aspeed_i2c_master_irq(struct aspeed_i2c_bus *bus, u32 irq_status)
- }
- }
-
--#if IS_ENABLED(CONFIG_I2C_SLAVE)
-- /*
-- * A pending master command will be started by H/W when the bus comes
-- * back to idle state after completing a slave operation so change the
-- * master state from 'pending' to 'start' at here if slave is inactive.
-- */
-- if (bus->master_state == ASPEED_I2C_MASTER_PENDING) {
-- if (bus->slave_state != ASPEED_I2C_SLAVE_INACTIVE)
-- goto out_no_complete;
--
-- bus->master_state = ASPEED_I2C_MASTER_START;
-- }
--#endif /* CONFIG_I2C_SLAVE */
--
- /* Master is not currently active, irq was for someone else. */
- if (bus->master_state == ASPEED_I2C_MASTER_INACTIVE ||
- bus->master_state == ASPEED_I2C_MASTER_PENDING)
-@@ -477,11 +470,15 @@ static u32 aspeed_i2c_master_irq(struct aspeed_i2c_bus *bus, u32 irq_status)
- #if IS_ENABLED(CONFIG_I2C_SLAVE)
- /*
- * If a peer master starts a xfer immediately after it queues a
-- * master command, change its state to 'pending' then H/W will
-- * continue the queued master xfer just after completing the
-- * slave mode session.
-+ * master command, clear the queued master command and change
-+ * its state to 'pending'. To simplify handling of pending
-+ * cases, it uses S/W solution instead of H/W command queue
-+ * handling.
- */
- if (unlikely(irq_status & ASPEED_I2CD_INTR_SLAVE_MATCH)) {
-+ writel(readl(bus->base + ASPEED_I2C_CMD_REG) &
-+ ~ASPEED_I2CD_MASTER_CMDS_MASK,
-+ bus->base + ASPEED_I2C_CMD_REG);
- bus->master_state = ASPEED_I2C_MASTER_PENDING;
- dev_dbg(bus->dev,
- "master goes pending due to a slave start\n");
-@@ -644,6 +641,14 @@ static irqreturn_t aspeed_i2c_bus_irq(int irq, void *dev_id)
- irq_handled |= aspeed_i2c_master_irq(bus,
- irq_remaining);
- }
-+
-+ /*
-+ * Start a pending master command at here if a slave operation is
-+ * completed.
-+ */
-+ if (bus->master_state == ASPEED_I2C_MASTER_PENDING &&
-+ bus->slave_state == ASPEED_I2C_SLAVE_INACTIVE)
-+ aspeed_i2c_do_start(bus);
- #else
- irq_handled = aspeed_i2c_master_irq(bus, irq_remaining);
- #endif /* CONFIG_I2C_SLAVE */
-@@ -707,6 +712,15 @@ static int aspeed_i2c_master_xfer(struct i2c_adapter *adap,
- ASPEED_I2CD_BUS_BUSY_STS))
- aspeed_i2c_recover_bus(bus);
-
-+ /*
-+ * If timed out and the state is still pending, drop the pending
-+ * master command.
-+ */
-+ spin_lock_irqsave(&bus->lock, flags);
-+ if (bus->master_state == ASPEED_I2C_MASTER_PENDING)
-+ bus->master_state = ASPEED_I2C_MASTER_INACTIVE;
-+ spin_unlock_irqrestore(&bus->lock, flags);
-+
- return -ETIMEDOUT;
- }
-
---
-2.7.4
-
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0073-Add-IO-statistics-to-USB-Mass-storage-gadget.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0073-Add-IO-statistics-to-USB-Mass-storage-gadget.patch
index 41969349e..1056b3beb 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0073-Add-IO-statistics-to-USB-Mass-storage-gadget.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0073-Add-IO-statistics-to-USB-Mass-storage-gadget.patch
@@ -1,7 +1,7 @@
From 5c82e0b33f2a373d5e19569635f108cfa096f53e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrian=20Ambro=C5=BCewicz?= <adrian.ambrozewicz@intel.com>
Date: Mon, 29 Jul 2019 10:19:00 +0200
-Subject: [PATCH] Add IO stats to USB Mass Storage gadget
+Subject: [PATCH] Add IO statistics to USB Mass storage gadget
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0076-arm-ast2600-add-pwm_tacho-driver-from-aspeed.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0076-arm-ast2600-add-pwm_tacho-driver-from-aspeed.patch
new file mode 100644
index 000000000..38a8a4a45
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0076-arm-ast2600-add-pwm_tacho-driver-from-aspeed.patch
@@ -0,0 +1,1107 @@
+From d5c421c1fc4c3bfd724a92e8563bc4fac128362c Mon Sep 17 00:00:00 2001
+From: Vernon Mauery <vernon.mauery@intel.com>
+Date: Fri, 27 Sep 2019 13:09:48 -0700
+Subject: [PATCH] arm: ast2600: add pwm_tacho driver from aspeed
+
+Add the pwm_tacho driver from Aspeed to get pwm working until an
+upstream PWM/Tacho driver is available. This was copied from the v5.02
+BSP from Aspeed.
+
+Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
+---
+ arch/arm/boot/dts/aspeed-g6.dtsi | 10 +
+ drivers/hwmon/Kconfig | 11 +
+ drivers/hwmon/Makefile | 1 +
+ drivers/hwmon/aspeed-g6-pwm-tacho.c | 1025 +++++++++++++++++++++++++++
+ 4 files changed, 1047 insertions(+)
+ create mode 100644 drivers/hwmon/aspeed-g6-pwm-tacho.c
+
+diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi
+index 03a991c97f00..b793b2f294a4 100644
+--- a/arch/arm/boot/dts/aspeed-g6.dtsi
++++ b/arch/arm/boot/dts/aspeed-g6.dtsi
+@@ -257,6 +257,16 @@
+ #size-cells = <1>;
+ ranges;
+
++ pwm_tacho: pwm-tacho-controller@1e610000 {
++ compatible = "aspeed,ast2600-pwm-tacho";
++ #address-cells = <1>;
++ #size-cells = <0>;
++ reg = <0x1e610000 0x100>;
++ clocks = <&syscon ASPEED_CLK_AHB>;
++ resets = <&syscon ASPEED_RESET_PWM>;
++ status = "disabled";
++ };
++
+ syscon: syscon@1e6e2000 {
+ compatible = "aspeed,ast2600-scu", "syscon", "simple-mfd";
+ reg = <0x1e6e2000 0x1000>;
+diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
+index 7399c3cef30c..b5365f5602b9 100644
+--- a/drivers/hwmon/Kconfig
++++ b/drivers/hwmon/Kconfig
+@@ -361,6 +361,17 @@ config SENSORS_ASPEED
+ This driver can also be built as a module. If so, the module
+ will be called aspeed_pwm_tacho.
+
++config SENSORS_ASPEED_G6
++ tristate "ASPEED AST2600 PWM and Fan tach driver"
++ depends on THERMAL || THERMAL=n
++ select REGMAP
++ help
++ This driver provides support for ASPEED AST2600 PWM
++ and Fan Tacho controllers.
++
++ This driver can also be built as a module. If so, the module
++ will be called aspeed_g6_pwm_tacho.
++
+ config SENSORS_ATXP1
+ tristate "Attansic ATXP1 VID controller"
+ depends on I2C
+diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile
+index 22e0882ffc70..d21a69797a86 100644
+--- a/drivers/hwmon/Makefile
++++ b/drivers/hwmon/Makefile
+@@ -50,6 +50,7 @@ obj-$(CONFIG_SENSORS_ARM_SCMI) += scmi-hwmon.o
+ obj-$(CONFIG_SENSORS_ARM_SCPI) += scpi-hwmon.o
+ obj-$(CONFIG_SENSORS_ASC7621) += asc7621.o
+ obj-$(CONFIG_SENSORS_ASPEED) += aspeed-pwm-tacho.o
++obj-$(CONFIG_SENSORS_ASPEED_G6) += aspeed-g6-pwm-tacho.o
+ obj-$(CONFIG_SENSORS_ATXP1) += atxp1.o
+ obj-$(CONFIG_SENSORS_CORETEMP) += coretemp.o
+ obj-$(CONFIG_SENSORS_DA9052_ADC)+= da9052-hwmon.o
+diff --git a/drivers/hwmon/aspeed-g6-pwm-tacho.c b/drivers/hwmon/aspeed-g6-pwm-tacho.c
+new file mode 100644
+index 000000000000..d6aa5a36ca88
+--- /dev/null
++++ b/drivers/hwmon/aspeed-g6-pwm-tacho.c
+@@ -0,0 +1,1025 @@
++/*
++ * Copyright (C) ASPEED Technology Inc.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 or later as
++ * published by the Free Software Foundation.
++ */
++
++#include <linux/clk.h>
++#include <linux/errno.h>
++#include <linux/gpio/consumer.h>
++#include <linux/delay.h>
++#include <linux/hwmon.h>
++#include <linux/hwmon-sysfs.h>
++#include <linux/io.h>
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/of_platform.h>
++#include <linux/of_device.h>
++#include <linux/platform_device.h>
++#include <linux/sysfs.h>
++#include <linux/reset.h>
++#include <linux/regmap.h>
++#include <linux/thermal.h>
++
++#define ASPEED_PWM_CTRL 0x00 //PWM0 General Register
++#define ASPEED_PWM_CTRL_CH(x) ((x * 0x10) + 0x00)
++#define PWM_LOAD_AS_WDT BIT(19) //load selection as WDT
++#define PWM_DUTY_LOAD_AS_WDT_EN BIT(18) //enable PWM duty load as WDT
++#define PWM_DUTY_SYNC_DIS BIT(17) //disable PWM duty sync
++#define PWM_CLK_ENABLE BIT(16) //enable PWM clock
++#define PWM_LEVEL_OUTPUT BIT(15) //output PWM level
++#define PWM_INVERSE BIT(14) //inverse PWM pin
++#define PWM_OPEN_DRAIN_EN BIT(13) //enable open-drain
++#define PWM_PIN_EN BIT(12) //enable PWM pin
++#define PWM_CLK_DIV_H_MASK (0xf << 8) //PWM clock division H bit [3:0]
++#define PWM_CLK_DIV_L_MASK (0xff) //PWM clock division H bit [3:0]
++
++/*
++\xregmid {11:8 }{RW}{PWM clock division H bit [3:0]}{
++ 0: divide 1 \n
++ 1: divide 2 \n
++ 2: divide 4 \n
++ 3: divide 8 \n
++ ... \n
++ F: divide 32768}
++\xregmid {7 :0 }{RW}{PWM clock division L bit [7:0]}{
++ 00: divide 1 \n
++ 01: divide 2 \n
++ 02: divide 3 \n
++ 03: divide 4 \n
++ ... \n
++ FF: divide 256}
++*/
++
++#define ASPEED_PWM_DUTY_CYCLE 0x04 //PWM0 Duty Cycle Register
++#define ASPEED_PWM_DUTY_CYCLE_CH(x) ((x * 0x10) + 0x04)
++#define PWM_LOOP_BIT_MASK (0xf << 24) //loop bit [7:0]
++#define PWM_PERIOD_BIT (24) //pwm period bit [7:0]
++#define PWM_PERIOD_BIT_MASK (0xff << 24) //pwm period bit [7:0]
++#define PWM_RISING_FALLING_AS_WDT_BIT (16)
++#define PWM_RISING_FALLING_AS_WDT_MASK (0xff << 16) //pwm rising/falling point bit [7:0] as WDT
++#define PWM_RISING_FALLING_MASK (0xffff)
++#define PWM_RISING_FALLING_BIT (8) //pwm falling point bit [7:0]
++#define PWM_RISING_RISING_BIT (0) //pwm rising point bit [7:0]
++
++#define ASPEED_TACHO_CTRL 0x08 //TACH0 General Register
++#define ASPEED_TACHO_CTRL_CH(x) ((x * 0x10) + 0x08)
++#define TACHO_IER BIT(31) //enable tacho interrupt
++#define TACHO_INVERS_LIMIT BIT(30) //inverse tacho limit comparison
++#define TACHO_LOOPBACK BIT(29) //tacho loopback
++#define TACHO_ENABLE BIT(28) //{enable tacho}
++#define TACHO_DEBOUNCE_BIT (26) //{tacho de-bounce}
++#define TACHO_DEBOUNCE_MASK (0x3 << 26) //{tacho de-bounce}
++#define TECHIO_EDGE_MASK (0x3 << 24) //tacho edge}
++#define TECHIO_EDGE_BIT (24) //tacho edge}
++#define TACHO_CLK_DIV_T_MASK (0xf << 20)
++#define TACHO_CLK_DIV_BIT (20)
++#define TACHO_THRESHOLD_MASK (0xfffff) //tacho threshold bit
++/*
++\xregmid {23:20}{RW}{tacho clock division T bit [3:0]}{
++ 0: divide 1 \n
++ 1: divide 4 \n
++ 2: divide 16 \n
++ 3: divide 64 \n
++ ... \n
++ B: divide 4194304 \n
++ others: reserved}
++\xregmidb{19 :0 }{RW}{tacho threshold bit [19:0]}
++*/
++
++#define ASPEED_TACHO_STS 0x0C //TACH0 Status Register
++#define ASPEED_TACHO_STS_CH(x) ((x * 0x10) + 0x0C)
++#define TACHO_ISR BIT(31) //interrupt status and clear
++#define PWM_OUT BIT(25) //{pwm_out}
++#define PWM_OEN BIT(24) //{pwm_oeN}
++#define TACHO_DEB_INPUT BIT(23) //tacho deB input
++#define TACHO_RAW_INPUT BIT(22) //tacho raw input}
++#define TACHO_VALUE_UPDATE BIT(21) //tacho value updated since the last read
++#define TACHO_FULL_MEASUREMENT BIT(20) //{tacho full measurement}
++#define TACHO_VALUE_MASK 0xfffff //tacho value bit [19:0]}
++
++#define MAX_CDEV_NAME_LEN 16
++
++struct aspeed_pwm_channel_params {
++ int load_wdt_rising_falling_pt;
++ int load_wdt_selection; //0: rising , 1: falling
++ int load_wdt_enable;
++ int duty_sync_enable;
++ int invert_pin;
++ u8 divide_h;
++ u8 divide_l;
++ u8 period;
++ u8 rising;
++ u8 falling;
++};
++
++static struct aspeed_pwm_channel_params default_pwm_params[] = {
++ [0] = {
++ .load_wdt_rising_falling_pt = 0x10,
++ .load_wdt_selection = 0,
++ .load_wdt_enable = 1,
++ .duty_sync_enable = 0,
++ .invert_pin = 0,
++ .divide_h = 0x5,
++ .divide_l = 0x6,
++ .period = 0x13, //5% ~~
++ .rising = 0x00,
++ .falling = 0x0a,
++ },
++ [1] = {
++ .load_wdt_rising_falling_pt = 0x10,
++ .load_wdt_selection = 0,
++ .load_wdt_enable = 0,
++ .duty_sync_enable = 0,
++ .invert_pin = 0,
++ .divide_h = 0x5,
++ .divide_l = 0x6,
++ .period = 0x13, //5% ~~
++ .rising = 0x00,
++ .falling = 0x0a,
++ },
++ [2] = {
++ .load_wdt_rising_falling_pt = 0x10,
++ .load_wdt_selection = 0,
++ .load_wdt_enable = 0,
++ .duty_sync_enable = 0,
++ .invert_pin = 0,
++ .divide_h = 0x5,
++ .divide_l = 0x6,
++ .period = 0x13, //5% ~~
++ .rising = 0x00,
++ .falling = 0x0a,
++ },
++ [3] = {
++ .load_wdt_rising_falling_pt = 0x10,
++ .load_wdt_selection = 0,
++ .load_wdt_enable = 0,
++ .duty_sync_enable = 0,
++ .invert_pin = 0,
++ .divide_h = 0x5,
++ .divide_l = 0x6,
++ .period = 0x13, //5% ~~
++ .rising = 0x00,
++ .falling = 0x0a,
++ },
++ [4] = {
++ .load_wdt_rising_falling_pt = 0x10,
++ .load_wdt_selection = 0,
++ .load_wdt_enable = 0,
++ .duty_sync_enable = 0,
++ .invert_pin = 0,
++ .divide_h = 0x5,
++ .divide_l = 0x6,
++ .period = 0x13, //5% ~~
++ .rising = 0x00,
++ .falling = 0x0a,
++ },
++ [5] = {
++ .load_wdt_rising_falling_pt = 0x10,
++ .load_wdt_selection = 0,
++ .load_wdt_enable = 0,
++ .duty_sync_enable = 0,
++ .invert_pin = 0,
++ .divide_h = 0x5,
++ .divide_l = 0x6,
++ .period = 0x13, //5% ~~
++ .rising = 0x00,
++ .falling = 0x0a,
++ },
++ [6] = {
++ .load_wdt_rising_falling_pt = 0x10,
++ .load_wdt_selection = 0,
++ .load_wdt_enable = 0,
++ .duty_sync_enable = 0,
++ .invert_pin = 0,
++ .divide_h = 0x5,
++ .divide_l = 0x6,
++ .period = 0x13, //5% ~~
++ .rising = 0x00,
++ .falling = 0x0a,
++ },
++ [7] = {
++ .load_wdt_rising_falling_pt = 0x10,
++ .load_wdt_selection = 0,
++ .load_wdt_enable = 0,
++ .duty_sync_enable = 0,
++ .invert_pin = 0,
++ .divide_h = 0x5,
++ .divide_l = 0x6,
++ .period = 0x13, //5% ~~
++ .rising = 0x00,
++ .falling = 0x0a,
++ },
++ [8] = {
++ .load_wdt_rising_falling_pt = 0x10,
++ .load_wdt_selection = 0,
++ .load_wdt_enable = 0,
++ .duty_sync_enable = 0,
++ .invert_pin = 0,
++ .divide_h = 0x5,
++ .divide_l = 0x6,
++ .period = 0x13, //5% ~~
++ .rising = 0x00,
++ .falling = 0x0a,
++ },
++ [9] = {
++ .load_wdt_rising_falling_pt = 0x10,
++ .load_wdt_selection = 0,
++ .load_wdt_enable = 0,
++ .duty_sync_enable = 0,
++ .invert_pin = 0,
++ .divide_h = 0x5,
++ .divide_l = 0x6,
++ .period = 0x13, //5% ~~
++ .rising = 0x00,
++ .falling = 0x0a,
++ },
++ [10] = {
++ .load_wdt_rising_falling_pt = 0x10,
++ .load_wdt_selection = 0,
++ .load_wdt_enable = 0,
++ .duty_sync_enable = 0,
++ .invert_pin = 0,
++ .divide_h = 0x5,
++ .divide_l = 0x6,
++ .period = 0x13, //5% ~~
++ .rising = 0x00,
++ .falling = 0x0a,
++ },
++ [11] = {
++ .load_wdt_rising_falling_pt = 0x10,
++ .load_wdt_selection = 0,
++ .load_wdt_enable = 0,
++ .duty_sync_enable = 0,
++ .invert_pin = 0,
++ .divide_h = 0x5,
++ .divide_l = 0x6,
++ .period = 0x13, //5% ~~
++ .rising = 0x00,
++ .falling = 0x0a,
++ },
++ [12] = {
++ .load_wdt_rising_falling_pt = 0x10,
++ .load_wdt_selection = 0,
++ .load_wdt_enable = 0,
++ .duty_sync_enable = 0,
++ .invert_pin = 0,
++ .divide_h = 0x5,
++ .divide_l = 0x6,
++ .period = 0x13, //5% ~~
++ .rising = 0x00,
++ .falling = 0x0a,
++ },
++ [13] = {
++ .load_wdt_rising_falling_pt = 0x10,
++ .load_wdt_selection = 0,
++ .load_wdt_enable = 0,
++ .duty_sync_enable = 0,
++ .invert_pin = 0,
++ .divide_h = 0x5,
++ .divide_l = 0x6,
++ .period = 0x13, //5% ~~
++ .rising = 0x00,
++ .falling = 0x0a,
++ },
++ [14] = {
++ .load_wdt_rising_falling_pt = 0x10,
++ .load_wdt_selection = 0,
++ .load_wdt_enable = 0,
++ .duty_sync_enable = 0,
++ .invert_pin = 0,
++ .divide_h = 0x5,
++ .divide_l = 0x6,
++ .period = 0x13, //5% ~~
++ .rising = 0x00,
++ .falling = 0x0a,
++ },
++ [15] = {
++ .load_wdt_rising_falling_pt = 0x10,
++ .load_wdt_selection = 0,
++ .load_wdt_enable = 0,
++ .duty_sync_enable = 0,
++ .invert_pin = 0,
++ .divide_h = 0x5,
++ .divide_l = 0x6,
++ .period = 0x13, //5% ~~
++ .rising = 0x00,
++ .falling = 0x0a,
++ },
++};
++
++/*
++ * 5:4 fan tach edge mode selection bit:
++ * 00: falling
++ * 01: rising
++ * 10: both
++ * 11: reserved.
++ */
++
++struct aspeed_tacho_channel_params {
++ int limited_inverse;
++ u16 threshold;
++ u8 tacho_edge;
++ u8 tacho_debounce;
++ u8 divide;
++};
++
++
++static struct aspeed_tacho_channel_params default_tacho_params[] = {
++ [0] = {
++ .limited_inverse = 0,
++ .threshold = 0,
++ .tacho_edge = 0,
++ .tacho_debounce = 0,
++ .divide = 8,
++ },
++ [1] = {
++ .limited_inverse = 0,
++ .threshold = 0,
++ .tacho_edge = 0,
++ .tacho_debounce = 0,
++ .divide = 8,
++ },
++ [2] = {
++ .limited_inverse = 0,
++ .threshold = 0,
++ .tacho_edge = 0,
++ .tacho_debounce = 0,
++ .divide = 8,
++ },
++ [3] = {
++ .limited_inverse = 0,
++ .threshold = 0,
++ .tacho_edge = 0,
++ .tacho_debounce = 0,
++ .divide = 8,
++ },
++ [4] = {
++ .limited_inverse = 0,
++ .threshold = 0,
++ .tacho_edge = 0,
++ .tacho_debounce = 0,
++ .divide = 8,
++ },
++ [5] = {
++ .limited_inverse = 0,
++ .threshold = 0,
++ .tacho_edge = 0,
++ .tacho_debounce = 0,
++ .divide = 8,
++ },
++ [6] = {
++ .limited_inverse = 0,
++ .threshold = 0,
++ .tacho_edge = 0,
++ .tacho_debounce = 0,
++ .divide = 8,
++ },
++ [7] = {
++ .limited_inverse = 0,
++ .threshold = 0,
++ .tacho_edge = 0,
++ .tacho_debounce = 0,
++ .divide = 8,
++ },
++ [8] = {
++ .limited_inverse = 0,
++ .threshold = 0,
++ .tacho_edge = 0,
++ .tacho_debounce = 0,
++ .divide = 8,
++ },
++ [9] = {
++ .limited_inverse = 0,
++ .threshold = 0,
++ .tacho_edge = 0,
++ .tacho_debounce = 0,
++ .divide = 8,
++ },
++ [10] = {
++ .limited_inverse = 0,
++ .threshold = 0,
++ .tacho_edge = 0,
++ .tacho_debounce = 0,
++ .divide = 8,
++ },
++ [11] = {
++ .limited_inverse = 0,
++ .threshold = 0,
++ .tacho_edge = 0,
++ .tacho_debounce = 0,
++ .divide = 8,
++ },
++ [12] = {
++ .limited_inverse = 0,
++ .threshold = 0,
++ .tacho_edge = 0,
++ .tacho_debounce = 0,
++ .divide = 8,
++ },
++ [13] = {
++ .limited_inverse = 0,
++ .threshold = 0,
++ .tacho_edge = 0,
++ .tacho_debounce = 0,
++ .divide = 8,
++ },
++ [14] = {
++ .limited_inverse = 0,
++ .threshold = 0,
++ .tacho_edge = 0,
++ .tacho_debounce = 0,
++ .divide = 8,
++ },
++ [15] = {
++ .limited_inverse = 0,
++ .threshold = 0,
++ .tacho_edge = 0,
++ .tacho_debounce = 0,
++ .divide = 8,
++ },
++};
++
++struct aspeed_pwm_tachometer_data {
++ struct regmap *regmap;
++ unsigned long clk_freq;
++ struct reset_control *reset;
++ bool pwm_present[16];
++ bool fan_tach_present[16];
++ struct aspeed_pwm_channel_params *pwm_channel;
++ struct aspeed_tacho_channel_params *tacho_channel;
++ struct aspeed_cooling_device *cdev[8];
++ const struct attribute_group *groups[3];
++};
++
++struct aspeed_cooling_device {
++ char name[16];
++ struct aspeed_pwm_tachometer_data *priv;
++ struct thermal_cooling_device *tcdev;
++ int pwm_channel;
++ u8 *cooling_levels;
++ u8 max_state;
++ u8 cur_state;
++};
++
++static int regmap_aspeed_pwm_tachometer_reg_write(void *context, unsigned int reg,
++ unsigned int val)
++{
++ void __iomem *regs = (void __iomem *)context;
++
++ writel(val, regs + reg);
++ return 0;
++}
++
++static int regmap_aspeed_pwm_tachometer_reg_read(void *context, unsigned int reg,
++ unsigned int *val)
++{
++ void __iomem *regs = (void __iomem *)context;
++
++ *val = readl(regs + reg);
++ return 0;
++}
++
++static const struct regmap_config aspeed_pwm_tachometer_regmap_config = {
++ .reg_bits = 32,
++ .val_bits = 32,
++ .reg_stride = 4,
++ .max_register = 0x100,
++ .reg_write = regmap_aspeed_pwm_tachometer_reg_write,
++ .reg_read = regmap_aspeed_pwm_tachometer_reg_read,
++ .fast_io = true,
++};
++
++static void aspeed_set_pwm_channel_enable(struct regmap *regmap, u8 pwm_channel,
++ bool enable)
++{
++ regmap_update_bits(regmap, ASPEED_PWM_CTRL_CH(pwm_channel), (PWM_CLK_ENABLE | PWM_PIN_EN), enable ? (PWM_CLK_ENABLE | PWM_PIN_EN) : 0);
++}
++
++static void aspeed_set_fan_tach_ch_enable(struct aspeed_pwm_tachometer_data *priv, u8 fan_tach_ch,
++ bool enable)
++{
++ u32 i = 0, j;
++ u32 divide_val = 0;
++ u32 reg_value = 0;
++
++ if(enable) {
++ //4 ^ n
++ //check pwm clk and to change tacho devide 25KZ
++ for(i = 0; i < 12; i++) {
++ divide_val = 1;
++ for(j = 1; j <= i; j++)
++ divide_val *= 4;
++// printk("i : %d , priv->clk_freq/divide_val %d ",i, priv->clk_freq/divide_val);
++ if((priv->clk_freq/divide_val) < 250000)
++ break;
++ }
++ i--;
++ divide_val = ((1 << i) * (1 << i));
++// printk("tacho divide_val %d , i %x max tacho clk %d \n", divide_val, i, priv->clk_freq / divide_val);
++ priv->tacho_channel[fan_tach_ch].divide = i;
++
++ reg_value = TACHO_ENABLE |
++ (priv->tacho_channel[fan_tach_ch].tacho_edge << TECHIO_EDGE_BIT) |
++ (priv->tacho_channel[fan_tach_ch].divide << TACHO_CLK_DIV_BIT) |
++ (priv->tacho_channel[fan_tach_ch].tacho_debounce << TACHO_DEBOUNCE_BIT);
++
++ if(priv->tacho_channel[fan_tach_ch].limited_inverse)
++ reg_value |= TACHO_INVERS_LIMIT;
++
++ if(priv->tacho_channel[fan_tach_ch].threshold)
++ reg_value |= (TACHO_IER | priv->tacho_channel[fan_tach_ch].threshold);
++
++ regmap_write(priv->regmap, ASPEED_TACHO_CTRL_CH(fan_tach_ch), reg_value);
++ } else
++ regmap_update_bits(priv->regmap, ASPEED_TACHO_CTRL_CH(fan_tach_ch), TACHO_ENABLE, 0);
++}
++
++static void aspeed_set_pwm_channel_fan_ctrl(struct aspeed_pwm_tachometer_data *priv,
++ u8 index, u8 fan_ctrl)
++{
++ u32 duty_value, ctrl_value;
++
++ if (fan_ctrl == 0) {
++ aspeed_set_pwm_channel_enable(priv->regmap, index, false);
++ } else {
++ duty_value = (priv->pwm_channel[index].period << PWM_PERIOD_BIT) |
++ (0 << PWM_RISING_RISING_BIT) | (fan_ctrl << PWM_RISING_FALLING_BIT);
++
++ ctrl_value = (priv->pwm_channel[index].divide_h << 8) | priv->pwm_channel[index].divide_l;
++
++ if (priv->pwm_channel[index].load_wdt_enable) {
++ ctrl_value |= PWM_DUTY_LOAD_AS_WDT_EN;
++ if(priv->pwm_channel[index].load_wdt_selection) {
++ ctrl_value |= PWM_LOAD_AS_WDT;
++ duty_value |= (priv->pwm_channel[index].load_wdt_rising_falling_pt << PWM_RISING_FALLING_AS_WDT_BIT);
++ } else {
++ duty_value |= (priv->pwm_channel[index].load_wdt_rising_falling_pt << PWM_RISING_FALLING_AS_WDT_BIT);
++ }
++ }
++
++ regmap_write(priv->regmap, ASPEED_PWM_DUTY_CYCLE_CH(index), duty_value);
++
++ regmap_write(priv->regmap, ASPEED_PWM_CTRL_CH(index), ctrl_value);
++// printk("pwm clk is %d \n", priv->clk_freq / (priv->pwm_channel[index].period + 1));
++ aspeed_set_pwm_channel_enable(priv->regmap, index, true);
++ }
++}
++
++#define BOTH_EDGES 0x02 /* 10b */
++
++static int aspeed_get_fan_tach_ch_rpm(struct aspeed_pwm_tachometer_data *priv,
++ u8 fan_tach_ch)
++{
++ u32 raw_data, tach_div, clk_source, val;
++ u8 mode, both;
++ int i, retries = 3;
++
++ for(i = 0; i < retries; i++) {
++ regmap_read(priv->regmap, ASPEED_TACHO_STS_CH(fan_tach_ch), &val);
++ if (TACHO_FULL_MEASUREMENT & val)
++ break;
++ }
++
++ raw_data = val & TACHO_VALUE_MASK;
++ if(raw_data == 0xfffff)
++ return 0;
++
++ tach_div = priv->tacho_channel[fan_tach_ch].divide;
++ /*
++ * We need the mode to determine if the raw_data is double (from
++ * counting both edges).
++ */
++ mode = priv->tacho_channel[fan_tach_ch].tacho_edge;
++ both = (mode & BOTH_EDGES) ? 1 : 0;
++// printk("clk %ld, raw_data %x , tach_div %x both %x \n", priv->clk_freq, raw_data, tach_div, both);
++
++ tach_div = (tach_div * 2) * (0x1 << both);
++ clk_source = priv->clk_freq;
++
++ if (raw_data == 0)
++ return 0;
++
++ return (clk_source * 60) / (2 * raw_data * tach_div);
++
++}
++
++static ssize_t set_pwm(struct device *dev, struct device_attribute *attr,
++ const char *buf, size_t count)
++{
++ struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr);
++ int index = sensor_attr->index;
++ int ret;
++ struct aspeed_pwm_tachometer_data *priv = dev_get_drvdata(dev);
++ long fan_ctrl;
++
++ ret = kstrtol(buf, 10, &fan_ctrl);
++ if (ret != 0)
++ return ret;
++
++ if (fan_ctrl < 0 || fan_ctrl > priv->pwm_channel[index].period)
++ return -EINVAL;
++
++ if (priv->pwm_channel[index].falling == fan_ctrl)
++ return count;
++
++ priv->pwm_channel[index].falling = fan_ctrl;
++ aspeed_set_pwm_channel_fan_ctrl(priv, index, fan_ctrl);
++
++ return count;
++}
++
++static ssize_t show_pwm(struct device *dev, struct device_attribute *attr,
++ char *buf)
++{
++ struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr);
++ int index = sensor_attr->index;
++ struct aspeed_pwm_tachometer_data *priv = dev_get_drvdata(dev);
++
++ return sprintf(buf, "%u\n", priv->pwm_channel[index].falling);
++}
++
++static ssize_t show_rpm(struct device *dev, struct device_attribute *attr,
++ char *buf)
++{
++ struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr);
++ int index = sensor_attr->index;
++ int rpm;
++ struct aspeed_pwm_tachometer_data *priv = dev_get_drvdata(dev);
++
++ rpm = aspeed_get_fan_tach_ch_rpm(priv, index);
++ if (rpm < 0)
++ return rpm;
++
++ return sprintf(buf, "%d\n", rpm);
++}
++
++static umode_t pwm_is_visible(struct kobject *kobj,
++ struct attribute *a, int index)
++{
++ struct device *dev = container_of(kobj, struct device, kobj);
++ struct aspeed_pwm_tachometer_data *priv = dev_get_drvdata(dev);
++
++ if (!priv->pwm_present[index])
++ return 0;
++ return a->mode;
++}
++
++static umode_t fan_dev_is_visible(struct kobject *kobj,
++ struct attribute *a, int index)
++{
++ struct device *dev = container_of(kobj, struct device, kobj);
++ struct aspeed_pwm_tachometer_data *priv = dev_get_drvdata(dev);
++
++ if (!priv->fan_tach_present[index])
++ return 0;
++ return a->mode;
++}
++
++static SENSOR_DEVICE_ATTR(pwm0, 0644,
++ show_pwm, set_pwm, 0);
++static SENSOR_DEVICE_ATTR(pwm1, 0644,
++ show_pwm, set_pwm, 1);
++static SENSOR_DEVICE_ATTR(pwm2, 0644,
++ show_pwm, set_pwm, 2);
++static SENSOR_DEVICE_ATTR(pwm3, 0644,
++ show_pwm, set_pwm, 3);
++static SENSOR_DEVICE_ATTR(pwm4, 0644,
++ show_pwm, set_pwm, 4);
++static SENSOR_DEVICE_ATTR(pwm5, 0644,
++ show_pwm, set_pwm, 5);
++static SENSOR_DEVICE_ATTR(pwm6, 0644,
++ show_pwm, set_pwm, 6);
++static SENSOR_DEVICE_ATTR(pwm7, 0644,
++ show_pwm, set_pwm, 7);
++static SENSOR_DEVICE_ATTR(pwm8, 0644,
++ show_pwm, set_pwm, 8);
++static SENSOR_DEVICE_ATTR(pwm9, 0644,
++ show_pwm, set_pwm, 9);
++static SENSOR_DEVICE_ATTR(pwm10, 0644,
++ show_pwm, set_pwm, 10);
++static SENSOR_DEVICE_ATTR(pwm11, 0644,
++ show_pwm, set_pwm, 11);
++static SENSOR_DEVICE_ATTR(pwm12, 0644,
++ show_pwm, set_pwm, 12);
++static SENSOR_DEVICE_ATTR(pwm13, 0644,
++ show_pwm, set_pwm, 13);
++static SENSOR_DEVICE_ATTR(pwm14, 0644,
++ show_pwm, set_pwm, 14);
++static SENSOR_DEVICE_ATTR(pwm15, 0644,
++ show_pwm, set_pwm, 15);
++static struct attribute *pwm_dev_attrs[] = {
++ &sensor_dev_attr_pwm0.dev_attr.attr,
++ &sensor_dev_attr_pwm1.dev_attr.attr,
++ &sensor_dev_attr_pwm2.dev_attr.attr,
++ &sensor_dev_attr_pwm3.dev_attr.attr,
++ &sensor_dev_attr_pwm4.dev_attr.attr,
++ &sensor_dev_attr_pwm5.dev_attr.attr,
++ &sensor_dev_attr_pwm6.dev_attr.attr,
++ &sensor_dev_attr_pwm7.dev_attr.attr,
++ &sensor_dev_attr_pwm8.dev_attr.attr,
++ &sensor_dev_attr_pwm9.dev_attr.attr,
++ &sensor_dev_attr_pwm10.dev_attr.attr,
++ &sensor_dev_attr_pwm11.dev_attr.attr,
++ &sensor_dev_attr_pwm12.dev_attr.attr,
++ &sensor_dev_attr_pwm13.dev_attr.attr,
++ &sensor_dev_attr_pwm14.dev_attr.attr,
++ &sensor_dev_attr_pwm15.dev_attr.attr,
++ NULL,
++};
++
++static const struct attribute_group pwm_dev_group = {
++ .attrs = pwm_dev_attrs,
++ .is_visible = pwm_is_visible,
++};
++
++static SENSOR_DEVICE_ATTR(fan0_input, 0444,
++ show_rpm, NULL, 0);
++static SENSOR_DEVICE_ATTR(fan1_input, 0444,
++ show_rpm, NULL, 1);
++static SENSOR_DEVICE_ATTR(fan2_input, 0444,
++ show_rpm, NULL, 2);
++static SENSOR_DEVICE_ATTR(fan3_input, 0444,
++ show_rpm, NULL, 3);
++static SENSOR_DEVICE_ATTR(fan4_input, 0444,
++ show_rpm, NULL, 4);
++static SENSOR_DEVICE_ATTR(fan5_input, 0444,
++ show_rpm, NULL, 5);
++static SENSOR_DEVICE_ATTR(fan6_input, 0444,
++ show_rpm, NULL, 6);
++static SENSOR_DEVICE_ATTR(fan7_input, 0444,
++ show_rpm, NULL, 7);
++static SENSOR_DEVICE_ATTR(fan8_input, 0444,
++ show_rpm, NULL, 8);
++static SENSOR_DEVICE_ATTR(fan9_input, 0444,
++ show_rpm, NULL, 9);
++static SENSOR_DEVICE_ATTR(fan10_input, 0444,
++ show_rpm, NULL, 10);
++static SENSOR_DEVICE_ATTR(fan11_input, 0444,
++ show_rpm, NULL, 11);
++static SENSOR_DEVICE_ATTR(fan12_input, 0444,
++ show_rpm, NULL, 12);
++static SENSOR_DEVICE_ATTR(fan13_input, 0444,
++ show_rpm, NULL, 13);
++static SENSOR_DEVICE_ATTR(fan14_input, 0444,
++ show_rpm, NULL, 14);
++static SENSOR_DEVICE_ATTR(fan15_input, 0444,
++ show_rpm, NULL, 15);
++static struct attribute *fan_dev_attrs[] = {
++ &sensor_dev_attr_fan0_input.dev_attr.attr,
++ &sensor_dev_attr_fan1_input.dev_attr.attr,
++ &sensor_dev_attr_fan2_input.dev_attr.attr,
++ &sensor_dev_attr_fan3_input.dev_attr.attr,
++ &sensor_dev_attr_fan4_input.dev_attr.attr,
++ &sensor_dev_attr_fan5_input.dev_attr.attr,
++ &sensor_dev_attr_fan6_input.dev_attr.attr,
++ &sensor_dev_attr_fan7_input.dev_attr.attr,
++ &sensor_dev_attr_fan8_input.dev_attr.attr,
++ &sensor_dev_attr_fan9_input.dev_attr.attr,
++ &sensor_dev_attr_fan10_input.dev_attr.attr,
++ &sensor_dev_attr_fan11_input.dev_attr.attr,
++ &sensor_dev_attr_fan12_input.dev_attr.attr,
++ &sensor_dev_attr_fan13_input.dev_attr.attr,
++ &sensor_dev_attr_fan14_input.dev_attr.attr,
++ &sensor_dev_attr_fan15_input.dev_attr.attr,
++ NULL
++};
++
++static const struct attribute_group fan_dev_group = {
++ .attrs = fan_dev_attrs,
++ .is_visible = fan_dev_is_visible,
++};
++
++static void aspeed_create_pwm_channel(struct aspeed_pwm_tachometer_data *priv,
++ u8 pwm_channel)
++{
++ priv->pwm_present[pwm_channel] = true;
++
++ //use default
++ aspeed_set_pwm_channel_fan_ctrl(priv, pwm_channel, priv->pwm_channel[pwm_channel].falling);
++}
++
++static void aspeed_create_fan_tach_channel(struct aspeed_pwm_tachometer_data *priv,
++ u8 *fan_tach_ch,
++ int count)
++{
++ u8 val, index;
++
++ for (val = 0; val < count; val++) {
++ index = fan_tach_ch[val];
++ priv->fan_tach_present[index] = true;
++ aspeed_set_fan_tach_ch_enable(priv, index, true);
++ }
++}
++
++static int
++aspeed_pwm_cz_get_max_state(struct thermal_cooling_device *tcdev,
++ unsigned long *state)
++{
++ struct aspeed_cooling_device *cdev = tcdev->devdata;
++
++ *state = cdev->max_state;
++
++ return 0;
++}
++
++static int
++aspeed_pwm_cz_get_cur_state(struct thermal_cooling_device *tcdev,
++ unsigned long *state)
++{
++ struct aspeed_cooling_device *cdev = tcdev->devdata;
++
++ *state = cdev->cur_state;
++
++ return 0;
++}
++
++static int
++aspeed_pwm_cz_set_cur_state(struct thermal_cooling_device *tcdev,
++ unsigned long state)
++{
++ struct aspeed_cooling_device *cdev = tcdev->devdata;
++
++ if (state > cdev->max_state)
++ return -EINVAL;
++
++ cdev->cur_state = state;
++ cdev->priv->pwm_channel[cdev->pwm_channel].falling =
++ cdev->cooling_levels[cdev->cur_state];
++ aspeed_set_pwm_channel_fan_ctrl(cdev->priv, cdev->pwm_channel,
++ cdev->cooling_levels[cdev->cur_state]);
++
++ return 0;
++}
++
++static const struct thermal_cooling_device_ops aspeed_pwm_cool_ops = {
++ .get_max_state = aspeed_pwm_cz_get_max_state,
++ .get_cur_state = aspeed_pwm_cz_get_cur_state,
++ .set_cur_state = aspeed_pwm_cz_set_cur_state,
++};
++
++static int aspeed_create_pwm_cooling(struct device *dev,
++ struct device_node *child,
++ struct aspeed_pwm_tachometer_data *priv,
++ u32 pwm_channel, u8 num_levels)
++{
++ int ret;
++ struct aspeed_cooling_device *cdev;
++
++ cdev = devm_kzalloc(dev, sizeof(*cdev), GFP_KERNEL);
++ if (!cdev)
++ return -ENOMEM;
++
++ cdev->cooling_levels = devm_kzalloc(dev, num_levels, GFP_KERNEL);
++ if (!cdev->cooling_levels)
++ return -ENOMEM;
++
++ cdev->max_state = num_levels - 1;
++ ret = of_property_read_u8_array(child, "cooling-levels",
++ cdev->cooling_levels,
++ num_levels);
++ if (ret) {
++ dev_err(dev, "Property 'cooling-levels' cannot be read.\n");
++ return ret;
++ }
++ snprintf(cdev->name, MAX_CDEV_NAME_LEN, "%s%d", child->name, pwm_channel);
++
++ cdev->tcdev = thermal_of_cooling_device_register(child,
++ cdev->name,
++ cdev,
++ &aspeed_pwm_cool_ops);
++ if (IS_ERR(cdev->tcdev))
++ return PTR_ERR(cdev->tcdev);
++
++ cdev->priv = priv;
++ cdev->pwm_channel = pwm_channel;
++
++ priv->cdev[pwm_channel] = cdev;
++
++ return 0;
++}
++
++static int aspeed_pwm_create_fan(struct device *dev,
++ struct device_node *child,
++ struct aspeed_pwm_tachometer_data *priv)
++{
++ u8 *fan_tach_ch;
++ u32 pwm_channel;
++ int ret, count;
++
++ ret = of_property_read_u32(child, "reg", &pwm_channel);
++ if (ret)
++ return ret;
++
++ aspeed_create_pwm_channel(priv, (u8)pwm_channel);
++
++ ret = of_property_count_u8_elems(child, "cooling-levels");
++ if (ret > 0) {
++ ret = aspeed_create_pwm_cooling(dev, child, priv, pwm_channel,
++ ret);
++ if (ret)
++ return ret;
++ }
++
++ count = of_property_count_u8_elems(child, "aspeed,fan-tach-ch");
++ if (count < 1)
++ return -EINVAL;
++
++ fan_tach_ch = devm_kzalloc(dev, sizeof(*fan_tach_ch) * count,
++ GFP_KERNEL);
++ if (!fan_tach_ch)
++ return -ENOMEM;
++ ret = of_property_read_u8_array(child, "aspeed,fan-tach-ch",
++ fan_tach_ch, count);
++ if (ret)
++ return ret;
++
++ aspeed_create_fan_tach_channel(priv, fan_tach_ch, count);
++
++ return 0;
++}
++
++static int aspeed_pwm_tachometer_probe(struct platform_device *pdev)
++{
++ struct device *dev = &pdev->dev;
++ struct device_node *np, *child;
++ struct aspeed_pwm_tachometer_data *priv;
++ void __iomem *regs;
++ struct resource *res;
++ struct device *hwmon;
++ struct clk *clk;
++ int ret;
++
++ np = dev->of_node;
++
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ if (!res)
++ return -ENOENT;
++ regs = devm_ioremap_resource(dev, res);
++ if (IS_ERR(regs))
++ return PTR_ERR(regs);
++ priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
++ if (!priv)
++ return -ENOMEM;
++
++ priv->pwm_channel = default_pwm_params;
++ priv->tacho_channel = default_tacho_params;
++ priv->regmap = devm_regmap_init(dev, NULL, (__force void *)regs,
++ &aspeed_pwm_tachometer_regmap_config);
++ if (IS_ERR(priv->regmap))
++ return PTR_ERR(priv->regmap);
++
++ clk = devm_clk_get(dev, NULL);
++ if (IS_ERR(clk))
++ return -ENODEV;
++ priv->clk_freq = clk_get_rate(clk);
++
++ priv->reset = devm_reset_control_get(&pdev->dev, NULL);
++ if (IS_ERR(priv->reset)) {
++ dev_err(&pdev->dev, "can't get aspeed_pwm_tacho reset\n");
++ return PTR_ERR(priv->reset);
++ }
++
++ //scu init
++ reset_control_assert(priv->reset);
++ reset_control_deassert(priv->reset);
++
++ for_each_child_of_node(np, child) {
++ ret = aspeed_pwm_create_fan(dev, child, priv);
++ if (ret) {
++ of_node_put(child);
++ return ret;
++ }
++ }
++
++ priv->groups[0] = &pwm_dev_group;
++ priv->groups[1] = &fan_dev_group;
++ priv->groups[2] = NULL;
++ hwmon = devm_hwmon_device_register_with_groups(dev,
++ "aspeed_g6_pwm_tacho",
++ priv, priv->groups);
++
++ return PTR_ERR_OR_ZERO(hwmon);
++}
++
++static const struct of_device_id of_pwm_tachometer_match_table[] = {
++ { .compatible = "aspeed,ast2600-pwm-tacho", },
++ {},
++};
++MODULE_DEVICE_TABLE(of, of_pwm_tachometer_match_table);
++
++static struct platform_driver aspeed_pwm_tachometer_driver = {
++ .probe = aspeed_pwm_tachometer_probe,
++ .driver = {
++ .name = "aspeed_g6_pwm_tacho",
++ .of_match_table = of_pwm_tachometer_match_table,
++ },
++};
++
++module_platform_driver(aspeed_pwm_tachometer_driver);
++
++MODULE_AUTHOR("Ryan Chen <ryan_chen@aspeedtech.com>");
++MODULE_DESCRIPTION("ASPEED PWM and Fan Tachometer device driver");
++MODULE_LICENSE("GPL");
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0078-Fix-NCSI-driver-issue-caused-by-host-shutdown.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0078-Fix-NCSI-driver-issue-caused-by-host-shutdown.patch
new file mode 100644
index 000000000..c02131b6a
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0078-Fix-NCSI-driver-issue-caused-by-host-shutdown.patch
@@ -0,0 +1,70 @@
+From 3e698a7666ec54582d0e2b4842f3e7f27fabe303 Mon Sep 17 00:00:00 2001
+From: Kuiying Wang <kuiying.wang@intel.com>
+Date: Tue, 29 Oct 2019 11:28:29 +0800
+Subject: [PATCH] Fix NCSI driver issue caused by host shutdown due to
+ overheated.
+
+NCSI device cannot be recovered when host shutdown due to overheated.
+
+Tested:
+Heat host till shutdown due to overheated and then
+run the ipmi command like power status
+
+Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
+---
+ net/ncsi/ncsi-manage.c | 18 +++++++++++++-----
+ 1 file changed, 13 insertions(+), 5 deletions(-)
+
+diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
+index 755aab66dcab..2c5294582ef6 100644
+--- a/net/ncsi/ncsi-manage.c
++++ b/net/ncsi/ncsi-manage.c
+@@ -133,18 +133,15 @@ static void ncsi_channel_monitor(struct timer_list *t)
+ netdev_err(ndp->ndev.dev, "NCSI Channel %d timed out!\n",
+ nc->id);
+ ncsi_report_link(ndp, true);
+- ndp->flags |= NCSI_DEV_RESHUFFLE;
+
+ ncsi_stop_channel_monitor(nc);
+
+- ncm = &nc->modes[NCSI_MODE_LINK];
+ spin_lock_irqsave(&nc->lock, flags);
+- nc->state = NCSI_CHANNEL_INVISIBLE;
+- ncm->data[2] &= ~0x1;
++ nc->state = NCSI_CHANNEL_INACTIVE;
+ spin_unlock_irqrestore(&nc->lock, flags);
+
+ spin_lock_irqsave(&ndp->lock, flags);
+- nc->state = NCSI_CHANNEL_ACTIVE;
++ ndp->flags |= NCSI_DEV_RESHUFFLE | NCSI_DEV_RESET;
+ list_add_tail_rcu(&nc->link, &ndp->channel_queue);
+ spin_unlock_irqrestore(&ndp->lock, flags);
+ ncsi_process_next_channel(ndp);
+@@ -425,6 +422,7 @@ static void ncsi_request_timeout(struct timer_list *t)
+ {
+ struct ncsi_request *nr = from_timer(nr, t, timer);
+ struct ncsi_dev_priv *ndp = nr->ndp;
++ struct ncsi_dev *nd = &ndp->ndev;
+ struct ncsi_cmd_pkt *cmd;
+ struct ncsi_package *np;
+ struct ncsi_channel *nc;
+@@ -439,6 +437,16 @@ static void ncsi_request_timeout(struct timer_list *t)
+ spin_unlock_irqrestore(&ndp->lock, flags);
+ return;
+ }
++ if (nd->state == ncsi_dev_state_suspend ||
++ nd->state == ncsi_dev_state_suspend_select ||
++ nd->state == ncsi_dev_state_suspend_gls ||
++ nd->state == ncsi_dev_state_suspend_dcnt ||
++ nd->state == ncsi_dev_state_suspend_dc ||
++ nd->state == ncsi_dev_state_suspend_deselect ||
++ nd->state == ncsi_dev_state_suspend_done) {
++ ndp->flags |= NCSI_DEV_RESET;
++ nd->state = ncsi_dev_state_suspend_done;
++ }
+ spin_unlock_irqrestore(&ndp->lock, flags);
+
+ if (nr->flags == NCSI_REQ_FLAG_NETLINK_DRIVEN) {
+--
+2.7.4
+
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0079-usb-gadget-aspeed-backport-aspeed-vhub-bug-fixes.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0079-usb-gadget-aspeed-backport-aspeed-vhub-bug-fixes.patch
new file mode 100644
index 000000000..17db705d1
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0079-usb-gadget-aspeed-backport-aspeed-vhub-bug-fixes.patch
@@ -0,0 +1,473 @@
+From 0475ac3698cf3d95d78b0230418ec7ef5fdc62c7 Mon Sep 17 00:00:00 2001
+From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+Date: Tue, 29 Oct 2019 11:42:08 -0700
+Subject: [PATCH] usb: gadget: aspeed: backport aspeed vhub bug fixes
+
+usb: gadget: aspeed: Implement dummy hub TT requests
+
+We just accept them instead of stalling and return
+zeros on GetTTState.
+
+usb: Add definitions for the USB2.0 hub TT requests
+
+usb: gadget: aspeed: Improve debugging when nuking
+
+When nuking requests, it's useful to display how many were
+actually nuked. It has proven handy when debugging issues
+where EP0 went in a wrong state.
+
+usb: gadget: aspeed: Remove unused "suspended" flag
+
+The state bit in the hub is sufficient
+
+usb: gadget: aspeed: Rework the reset logic
+
+We had some dodgy code using the speed setting to decide whether a
+port reset would reset the device or just enable it.
+
+Instead, if the device is disabled and has a gadget attached, a
+reset will enable it. If it's already enabled, a reset will
+reset it.
+
+usb: gadget: aspeed: Check suspend/resume callback existence
+
+.. before calling them
+
+usb: gadget: aspeed: Don't reject requests on suspended devices
+
+A disconnect may just suspend the hub in absence of a physical
+disconnect detection. If we start rejecting requests, the mass
+storage function gets into a spin trying to requeue the same
+request for ever and hangs.
+
+usb: gadget: aspeed: Fix EP0 stall handling
+
+When stalling EP0, we need to wait for an ACK interrupt,
+otherwise we may get out of sync on the next setup packet
+data phase. Also we need to ignore the direction when
+processing that interrupt as the HW reports a potential
+mismatch.
+
+Implement this by adding a stall state to EP0. This fixes
+some reported issues with mass storage and some hosts.
+
+usb: gadget: aspeed: Cleanup EP0 state on port reset
+
+Otherwise, we can have a stale state after a disconnect and reconnect
+causing errors on the first SETUP packet to the device.
+
+causing errors on the first SETUP packet to the device.
+
+usb: gadget: aspeed: Don't set port enable change bit on reset
+
+This bit should be only set when the port enable goes down, for
+example, on errors. Not when it gets set after a port reset. Some
+USB stacks seem to be sensitive to this and fails enumeration.
+
+Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
+Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+---
+ drivers/usb/gadget/udc/aspeed-vhub/core.c | 7 +--
+ drivers/usb/gadget/udc/aspeed-vhub/dev.c | 80 +++++++++++++++----------------
+ drivers/usb/gadget/udc/aspeed-vhub/ep0.c | 59 ++++++++++++++++-------
+ drivers/usb/gadget/udc/aspeed-vhub/epn.c | 2 +-
+ drivers/usb/gadget/udc/aspeed-vhub/hub.c | 15 +++++-
+ drivers/usb/gadget/udc/aspeed-vhub/vhub.h | 3 +-
+ include/linux/usb/hcd.h | 4 ++
+ 7 files changed, 107 insertions(+), 63 deletions(-)
+
+diff --git a/drivers/usb/gadget/udc/aspeed-vhub/core.c b/drivers/usb/gadget/udc/aspeed-vhub/core.c
+index db3628be38c0..90b134d5dca9 100644
+--- a/drivers/usb/gadget/udc/aspeed-vhub/core.c
++++ b/drivers/usb/gadget/udc/aspeed-vhub/core.c
+@@ -65,14 +65,16 @@ void ast_vhub_done(struct ast_vhub_ep *ep, struct ast_vhub_req *req,
+ void ast_vhub_nuke(struct ast_vhub_ep *ep, int status)
+ {
+ struct ast_vhub_req *req;
+-
+- EPDBG(ep, "Nuking\n");
++ int count = 0;
+
+ /* Beware, lock will be dropped & req-acquired by done() */
+ while (!list_empty(&ep->queue)) {
+ req = list_first_entry(&ep->queue, struct ast_vhub_req, queue);
+ ast_vhub_done(ep, req, status);
++ count++;
+ }
++ if (count)
++ EPDBG(ep, "Nuked %d request(s)\n", count);
+ }
+
+ struct usb_request *ast_vhub_alloc_request(struct usb_ep *u_ep,
+@@ -348,7 +350,6 @@ static int ast_vhub_probe(struct platform_device *pdev)
+ /* Find interrupt and install handler */
+ vhub->irq = platform_get_irq(pdev, 0);
+ if (vhub->irq < 0) {
+- dev_err(&pdev->dev, "Failed to get interrupt\n");
+ rc = vhub->irq;
+ goto err;
+ }
+diff --git a/drivers/usb/gadget/udc/aspeed-vhub/dev.c b/drivers/usb/gadget/udc/aspeed-vhub/dev.c
+index 6b1b16b17d7d..4008e7a51188 100644
+--- a/drivers/usb/gadget/udc/aspeed-vhub/dev.c
++++ b/drivers/usb/gadget/udc/aspeed-vhub/dev.c
+@@ -50,11 +50,14 @@ void ast_vhub_dev_irq(struct ast_vhub_dev *d)
+
+ static void ast_vhub_dev_enable(struct ast_vhub_dev *d)
+ {
+- u32 reg, hmsk;
++ u32 reg, hmsk, i;
+
+ if (d->enabled)
+ return;
+
++ /* Cleanup EP0 state */
++ ast_vhub_reset_ep0(d);
++
+ /* Enable device and its EP0 interrupts */
+ reg = VHUB_DEV_EN_ENABLE_PORT |
+ VHUB_DEV_EN_EP0_IN_ACK_IRQEN |
+@@ -73,6 +76,19 @@ static void ast_vhub_dev_enable(struct ast_vhub_dev *d)
+ /* Set EP0 DMA buffer address */
+ writel(d->ep0.buf_dma, d->regs + AST_VHUB_DEV_EP0_DATA);
+
++ /* Clear stall on all EPs */
++ for (i = 0; i < AST_VHUB_NUM_GEN_EPs; i++) {
++ struct ast_vhub_ep *ep = d->epns[i];
++
++ if (ep && (ep->epn.stalled || ep->epn.wedged)) {
++ ep->epn.stalled = false;
++ ep->epn.wedged = false;
++ ast_vhub_update_epn_stall(ep);
++ }
++ }
++
++ /* Additional cleanups */
++ d->wakeup_en = false;
+ d->enabled = true;
+ }
+
+@@ -93,7 +109,6 @@ static void ast_vhub_dev_disable(struct ast_vhub_dev *d)
+ writel(0, d->regs + AST_VHUB_DEV_EN_CTRL);
+ d->gadget.speed = USB_SPEED_UNKNOWN;
+ d->enabled = false;
+- d->suspended = false;
+ }
+
+ static int ast_vhub_dev_feature(struct ast_vhub_dev *d,
+@@ -201,14 +216,19 @@ int ast_vhub_std_dev_request(struct ast_vhub_ep *ep,
+ u16 wValue, wIndex;
+
+ /* No driver, we shouldn't be enabled ... */
+- if (!d->driver || !d->enabled || d->suspended) {
++ if (!d->driver || !d->enabled) {
+ EPDBG(ep,
+- "Device is wrong state driver=%p enabled=%d"
+- " suspended=%d\n",
+- d->driver, d->enabled, d->suspended);
++ "Device is wrong state driver=%p enabled=%d\n",
++ d->driver, d->enabled);
+ return std_req_stall;
+ }
+
++ /*
++ * Note: we used to reject/stall requests while suspended,
++ * we don't do that anymore as we seem to have cases of
++ * mass storage getting very upset.
++ */
++
+ /* First packet, grab speed */
+ if (d->gadget.speed == USB_SPEED_UNKNOWN) {
+ d->gadget.speed = ep->vhub->speed;
+@@ -449,8 +469,7 @@ static const struct usb_gadget_ops ast_vhub_udc_ops = {
+
+ void ast_vhub_dev_suspend(struct ast_vhub_dev *d)
+ {
+- d->suspended = true;
+- if (d->driver) {
++ if (d->driver && d->driver->suspend) {
+ spin_unlock(&d->vhub->lock);
+ d->driver->suspend(&d->gadget);
+ spin_lock(&d->vhub->lock);
+@@ -459,8 +478,7 @@ void ast_vhub_dev_suspend(struct ast_vhub_dev *d)
+
+ void ast_vhub_dev_resume(struct ast_vhub_dev *d)
+ {
+- d->suspended = false;
+- if (d->driver) {
++ if (d->driver && d->driver->resume) {
+ spin_unlock(&d->vhub->lock);
+ d->driver->resume(&d->gadget);
+ spin_lock(&d->vhub->lock);
+@@ -469,46 +487,28 @@ void ast_vhub_dev_resume(struct ast_vhub_dev *d)
+
+ void ast_vhub_dev_reset(struct ast_vhub_dev *d)
+ {
+- /*
+- * If speed is not set, we enable the port. If it is,
+- * send reset to the gadget and reset "speed".
+- *
+- * Speed is an indication that we have got the first
+- * setup packet to the device.
+- */
+- if (d->gadget.speed == USB_SPEED_UNKNOWN && !d->enabled) {
+- DDBG(d, "Reset at unknown speed of disabled device, enabling...\n");
+- ast_vhub_dev_enable(d);
+- d->suspended = false;
++ /* No driver, just disable the device and return */
++ if (!d->driver) {
++ ast_vhub_dev_disable(d);
++ return;
+ }
+- if (d->gadget.speed != USB_SPEED_UNKNOWN && d->driver) {
+- unsigned int i;
+
+- DDBG(d, "Reset at known speed of bound device, resetting...\n");
++ /* If the port isn't enabled, just enable it */
++ if (!d->enabled) {
++ DDBG(d, "Reset of disabled device, enabling...\n");
++ ast_vhub_dev_enable(d);
++ } else {
++ DDBG(d, "Reset of enabled device, resetting...\n");
+ spin_unlock(&d->vhub->lock);
+- d->driver->reset(&d->gadget);
++ usb_gadget_udc_reset(&d->gadget, d->driver);
+ spin_lock(&d->vhub->lock);
+
+ /*
+- * Disable/re-enable HW, this will clear the address
++ * Disable and maybe re-enable HW, this will clear the address
+ * and speed setting.
+ */
+ ast_vhub_dev_disable(d);
+ ast_vhub_dev_enable(d);
+-
+- /* Clear stall on all EPs */
+- for (i = 0; i < AST_VHUB_NUM_GEN_EPs; i++) {
+- struct ast_vhub_ep *ep = d->epns[i];
+-
+- if (ep && ep->epn.stalled) {
+- ep->epn.stalled = false;
+- ast_vhub_update_epn_stall(ep);
+- }
+- }
+-
+- /* Additional cleanups */
+- d->wakeup_en = false;
+- d->suspended = false;
+ }
+ }
+
+diff --git a/drivers/usb/gadget/udc/aspeed-vhub/ep0.c b/drivers/usb/gadget/udc/aspeed-vhub/ep0.c
+index e2927fb083cf..022b777b85f8 100644
+--- a/drivers/usb/gadget/udc/aspeed-vhub/ep0.c
++++ b/drivers/usb/gadget/udc/aspeed-vhub/ep0.c
+@@ -105,18 +105,20 @@ void ast_vhub_ep0_handle_setup(struct ast_vhub_ep *ep)
+ (crq.bRequestType & USB_DIR_IN) ? "in" : "out",
+ ep->ep0.state);
+
+- /* Check our state, cancel pending requests if needed */
+- if (ep->ep0.state != ep0_state_token) {
++ /*
++ * Check our state, cancel pending requests if needed
++ *
++ * Note: Under some circumstances, we can get a new setup
++ * packet while waiting for the stall ack, just accept it.
++ *
++ * In any case, a SETUP packet in wrong state should have
++ * reset the HW state machine, so let's just log, nuke
++ * requests, move on.
++ */
++ if (ep->ep0.state != ep0_state_token &&
++ ep->ep0.state != ep0_state_stall) {
+ EPDBG(ep, "wrong state\n");
+ ast_vhub_nuke(ep, -EIO);
+-
+- /*
+- * Accept the packet regardless, this seems to happen
+- * when stalling a SETUP packet that has an OUT data
+- * phase.
+- */
+- ast_vhub_nuke(ep, 0);
+- goto stall;
+ }
+
+ /* Calculate next state for EP0 */
+@@ -165,7 +167,7 @@ void ast_vhub_ep0_handle_setup(struct ast_vhub_ep *ep)
+ stall:
+ EPDBG(ep, "stalling\n");
+ writel(VHUB_EP0_CTRL_STALL, ep->ep0.ctlstat);
+- ep->ep0.state = ep0_state_status;
++ ep->ep0.state = ep0_state_stall;
+ ep->ep0.dir_in = false;
+ return;
+
+@@ -299,8 +301,8 @@ void ast_vhub_ep0_handle_ack(struct ast_vhub_ep *ep, bool in_ack)
+ if ((ep->ep0.dir_in && (stat & VHUB_EP0_TX_BUFF_RDY)) ||
+ (!ep->ep0.dir_in && (stat & VHUB_EP0_RX_BUFF_RDY)) ||
+ (ep->ep0.dir_in != in_ack)) {
++ /* In that case, ignore interrupt */
+ dev_warn(dev, "irq state mismatch");
+- stall = true;
+ break;
+ }
+ /*
+@@ -335,12 +337,22 @@ void ast_vhub_ep0_handle_ack(struct ast_vhub_ep *ep, bool in_ack)
+ dev_warn(dev, "status direction mismatch\n");
+ stall = true;
+ }
++ break;
++ case ep0_state_stall:
++ /*
++ * There shouldn't be any request left, but nuke just in case
++ * otherwise the stale request will block subsequent ones
++ */
++ ast_vhub_nuke(ep, -EIO);
++ break;
+ }
+
+- /* Reset to token state */
+- ep->ep0.state = ep0_state_token;
+- if (stall)
++ /* Reset to token state or stall */
++ if (stall) {
+ writel(VHUB_EP0_CTRL_STALL, ep->ep0.ctlstat);
++ ep->ep0.state = ep0_state_stall;
++ } else
++ ep->ep0.state = ep0_state_token;
+ }
+
+ static int ast_vhub_ep0_queue(struct usb_ep* u_ep, struct usb_request *u_req,
+@@ -367,7 +379,7 @@ static int ast_vhub_ep0_queue(struct usb_ep* u_ep, struct usb_request *u_req,
+ return -EINVAL;
+
+ /* Disabled device */
+- if (ep->dev && (!ep->dev->enabled || ep->dev->suspended))
++ if (ep->dev && !ep->dev->enabled)
+ return -ESHUTDOWN;
+
+ /* Data, no buffer and not internal ? */
+@@ -390,8 +402,12 @@ static int ast_vhub_ep0_queue(struct usb_ep* u_ep, struct usb_request *u_req,
+ spin_lock_irqsave(&vhub->lock, flags);
+
+ /* EP0 can only support a single request at a time */
+- if (!list_empty(&ep->queue) || ep->ep0.state == ep0_state_token) {
++ if (!list_empty(&ep->queue) ||
++ ep->ep0.state == ep0_state_token ||
++ ep->ep0.state == ep0_state_stall) {
+ dev_warn(dev, "EP0: Request in wrong state\n");
++ EPVDBG(ep, "EP0: list_empty=%d state=%d\n",
++ list_empty(&ep->queue), ep->ep0.state);
+ spin_unlock_irqrestore(&vhub->lock, flags);
+ return -EBUSY;
+ }
+@@ -459,6 +475,15 @@ static const struct usb_ep_ops ast_vhub_ep0_ops = {
+ .free_request = ast_vhub_free_request,
+ };
+
++void ast_vhub_reset_ep0(struct ast_vhub_dev *dev)
++{
++ struct ast_vhub_ep *ep = &dev->ep0;
++
++ ast_vhub_nuke(ep, -EIO);
++ ep->ep0.state = ep0_state_token;
++}
++
++
+ void ast_vhub_init_ep0(struct ast_vhub *vhub, struct ast_vhub_ep *ep,
+ struct ast_vhub_dev *dev)
+ {
+diff --git a/drivers/usb/gadget/udc/aspeed-vhub/epn.c b/drivers/usb/gadget/udc/aspeed-vhub/epn.c
+index 35941dc125f9..7475c74aa5c5 100644
+--- a/drivers/usb/gadget/udc/aspeed-vhub/epn.c
++++ b/drivers/usb/gadget/udc/aspeed-vhub/epn.c
+@@ -352,7 +352,7 @@ static int ast_vhub_epn_queue(struct usb_ep* u_ep, struct usb_request *u_req,
+
+ /* Endpoint enabled ? */
+ if (!ep->epn.enabled || !u_ep->desc || !ep->dev || !ep->d_idx ||
+- !ep->dev->enabled || ep->dev->suspended) {
++ !ep->dev->enabled) {
+ EPDBG(ep, "Enqueuing request on wrong or disabled EP\n");
+ return -ESHUTDOWN;
+ }
+diff --git a/drivers/usb/gadget/udc/aspeed-vhub/hub.c b/drivers/usb/gadget/udc/aspeed-vhub/hub.c
+index 7c040f56100e..19b3517e04c0 100644
+--- a/drivers/usb/gadget/udc/aspeed-vhub/hub.c
++++ b/drivers/usb/gadget/udc/aspeed-vhub/hub.c
+@@ -449,8 +449,15 @@ static void ast_vhub_change_port_stat(struct ast_vhub *vhub,
+ USB_PORT_STAT_C_OVERCURRENT |
+ USB_PORT_STAT_C_RESET |
+ USB_PORT_STAT_C_L1;
+- p->change |= chg;
+
++ /*
++ * We only set USB_PORT_STAT_C_ENABLE if we are disabling
++ * the port as per USB spec, otherwise MacOS gets upset
++ */
++ if (p->status & USB_PORT_STAT_ENABLE)
++ chg &= ~USB_PORT_STAT_C_ENABLE;
++
++ p->change = chg;
+ ast_vhub_update_hub_ep1(vhub, port);
+ }
+ }
+@@ -723,6 +730,12 @@ enum std_req_rc ast_vhub_class_hub_request(struct ast_vhub_ep *ep,
+ case ClearPortFeature:
+ EPDBG(ep, "ClearPortFeature(%d,%d)\n", wIndex & 0xf, wValue);
+ return ast_vhub_clr_port_feature(ep, wIndex & 0xf, wValue);
++ case ClearTTBuffer:
++ case ResetTT:
++ case StopTT:
++ return std_req_complete;
++ case GetTTState:
++ return ast_vhub_simple_reply(ep, 0, 0, 0, 0);
+ default:
+ EPDBG(ep, "Unknown class request\n");
+ }
+diff --git a/drivers/usb/gadget/udc/aspeed-vhub/vhub.h b/drivers/usb/gadget/udc/aspeed-vhub/vhub.h
+index 4ed03d33a5a9..761919e220d3 100644
+--- a/drivers/usb/gadget/udc/aspeed-vhub/vhub.h
++++ b/drivers/usb/gadget/udc/aspeed-vhub/vhub.h
+@@ -257,6 +257,7 @@ enum ep0_state {
+ ep0_state_token,
+ ep0_state_data,
+ ep0_state_status,
++ ep0_state_stall,
+ };
+
+ /*
+@@ -353,7 +354,6 @@ struct ast_vhub_dev {
+ struct usb_gadget_driver *driver;
+ bool registered : 1;
+ bool wakeup_en : 1;
+- bool suspended : 1;
+ bool enabled : 1;
+
+ /* Endpoint structures */
+@@ -507,6 +507,7 @@ void ast_vhub_init_hw(struct ast_vhub *vhub);
+ /* ep0.c */
+ void ast_vhub_ep0_handle_ack(struct ast_vhub_ep *ep, bool in_ack);
+ void ast_vhub_ep0_handle_setup(struct ast_vhub_ep *ep);
++void ast_vhub_reset_ep0(struct ast_vhub_dev *dev);
+ void ast_vhub_init_ep0(struct ast_vhub *vhub, struct ast_vhub_ep *ep,
+ struct ast_vhub_dev *dev);
+ int ast_vhub_reply(struct ast_vhub_ep *ep, char *ptr, int len);
+diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
+index a20e7815d814..774a03028da2 100644
+--- a/include/linux/usb/hcd.h
++++ b/include/linux/usb/hcd.h
+@@ -594,6 +594,10 @@ extern void usb_ep0_reinit(struct usb_device *);
+ #define GetPortStatus HUB_CLASS_REQ(USB_DIR_IN, USB_RT_PORT, USB_REQ_GET_STATUS)
+ #define SetHubFeature HUB_CLASS_REQ(USB_DIR_OUT, USB_RT_HUB, USB_REQ_SET_FEATURE)
+ #define SetPortFeature HUB_CLASS_REQ(USB_DIR_OUT, USB_RT_PORT, USB_REQ_SET_FEATURE)
++#define ClearTTBuffer HUB_CLASS_REQ(USB_DIR_OUT, USB_RT_PORT, HUB_CLEAR_TT_BUFFER)
++#define ResetTT HUB_CLASS_REQ(USB_DIR_OUT, USB_RT_PORT, HUB_RESET_TT)
++#define GetTTState HUB_CLASS_REQ(USB_DIR_IN, USB_RT_PORT, HUB_GET_TT_STATE)
++#define StopTT HUB_CLASS_REQ(USB_DIR_OUT, USB_RT_PORT, HUB_STOP_TT)
+
+
+ /*-------------------------------------------------------------------------*/
+--
+2.7.4
+
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0080-i2c-aspeed-filter-garbage-interrupts-out.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0080-i2c-aspeed-filter-garbage-interrupts-out.patch
new file mode 100644
index 000000000..0e32615d5
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0080-i2c-aspeed-filter-garbage-interrupts-out.patch
@@ -0,0 +1,64 @@
+From 6825259fc0ac015c6544f6070ceaf9cc263c1853 Mon Sep 17 00:00:00 2001
+From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+Date: Fri, 8 Nov 2019 15:57:27 -0800
+Subject: [PATCH] i2c: aspeed: filter garbage interrupts out
+
+AST2600 makes a garbage interrupt which is decribed as 'reserved'
+in datasheet so filter them out.
+
+Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+---
+ drivers/i2c/busses/i2c-aspeed.c | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c
+index 62b803e15ce2..e7cba33c0c87 100644
+--- a/drivers/i2c/busses/i2c-aspeed.c
++++ b/drivers/i2c/busses/i2c-aspeed.c
+@@ -87,7 +87,11 @@
+ * These share bit definitions, so use the same values for the enable &
+ * status bits.
+ */
++#if defined(CONFIG_MACH_ASPEED_G6)
++#define ASPEED_I2CD_INTR_SLAVE_ADDR_RECEIVED_PENDING BIT(29)
++#else
+ #define ASPEED_I2CD_INTR_SLAVE_ADDR_RECEIVED_PENDING BIT(30)
++#endif
+ #define ASPEED_I2CD_INTR_SLAVE_INACTIVE_TIMEOUT BIT(15)
+ #define ASPEED_I2CD_INTR_SDA_DL_TIMEOUT BIT(14)
+ #define ASPEED_I2CD_INTR_BUS_RECOVER_DONE BIT(13)
+@@ -118,6 +122,11 @@
+ ASPEED_I2CD_INTR_RX_DONE | \
+ ASPEED_I2CD_INTR_TX_NAK | \
+ ASPEED_I2CD_INTR_TX_ACK)
++#define ASPEED_I2CD_INTR_STATUS_MASK \
++ (ASPEED_I2CD_INTR_SLAVE_ADDR_RECEIVED_PENDING | \
++ ASPEED_I2CD_INTR_GCALL_ADDR | \
++ ASPEED_I2CD_INTR_SLAVE_MATCH | \
++ ASPEED_I2CD_INTR_ALL)
+
+ /* 0x14 : I2CD Command/Status Register */
+ #define ASPEED_I2CD_SCL_LINE_STS BIT(18)
+@@ -1018,9 +1027,19 @@ static irqreturn_t aspeed_i2c_bus_irq(int irq, void *dev_id)
+
+ spin_lock(&bus->lock);
+ irq_received = readl(bus->base + ASPEED_I2C_INTR_STS_REG);
++ if (!irq_received) {
++ spin_unlock(&bus->lock);
++ return IRQ_NONE;
++ }
++
+ /* Ack all interrupts except for Rx done */
+ writel(irq_received & ~ASPEED_I2CD_INTR_RX_DONE,
+ bus->base + ASPEED_I2C_INTR_STS_REG);
++ /*
++ * AST2600 makes a garbage interrupt which is decribed as 'reserved'
++ * in datasheet so filter them out.
++ */
++ irq_received &= ASPEED_I2CD_INTR_STATUS_MASK;
+ irq_remaining = irq_received;
+
+ #if IS_ENABLED(CONFIG_I2C_SLAVE)
+--
+2.7.4
+
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0081-clk-ast2600-enable-BCLK-for-PCI-PCIe-bus-always.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0081-clk-ast2600-enable-BCLK-for-PCI-PCIe-bus-always.patch
new file mode 100644
index 000000000..22c4d191c
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0081-clk-ast2600-enable-BCLK-for-PCI-PCIe-bus-always.patch
@@ -0,0 +1,32 @@
+From ff0b985d3ad004398db3222a40607f1bef433f9b Mon Sep 17 00:00:00 2001
+From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+Date: Tue, 19 Nov 2019 15:12:42 -0800
+Subject: [PATCH] clk: ast2600: enable BCLK for PCI/PCIe bus always
+
+BCLK for PCI/PCIe bus should be enabled always with having the
+CLK_IS_CRITICAL flag otherwise it will be disabled at kernel late
+initcall phase as an unused clock, and eventually it causes
+unexpected behavior on BMC features that are connected to the host
+through PCI/PCIe bus.
+
+Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+---
+ drivers/clk/clk-ast2600.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/clk/clk-ast2600.c b/drivers/clk/clk-ast2600.c
+index 9191bc3e78ee..8201d65018b9 100644
+--- a/drivers/clk/clk-ast2600.c
++++ b/drivers/clk/clk-ast2600.c
+@@ -64,7 +64,7 @@ static const struct aspeed_gate_data aspeed_g6_gates[] = {
+ [ASPEED_CLK_GATE_GCLK] = { 2, 7, "gclk-gate", NULL, 0 }, /* 2D engine */
+ /* vclk parent - dclk/d1clk/hclk/mclk */
+ [ASPEED_CLK_GATE_VCLK] = { 3, 6, "vclk-gate", NULL, 0 }, /* Video Capture */
+- [ASPEED_CLK_GATE_BCLK] = { 4, 8, "bclk-gate", "bclk", 0 }, /* PCIe/PCI */
++ [ASPEED_CLK_GATE_BCLK] = { 4, 8, "bclk-gate", "bclk", CLK_IS_CRITICAL }, /* PCIe/PCI */
+ /* From dpll */
+ [ASPEED_CLK_GATE_DCLK] = { 5, -1, "dclk-gate", NULL, CLK_IS_CRITICAL }, /* DAC */
+ [ASPEED_CLK_GATE_REF0CLK] = { 6, -1, "ref0clk-gate", "clkin", CLK_IS_CRITICAL },
+--
+2.7.4
+
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0082-ARM-dts-aspeed-g6-add-USB-virtual-hub-fixup.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0082-ARM-dts-aspeed-g6-add-USB-virtual-hub-fixup.patch
new file mode 100644
index 000000000..b0995992b
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0082-ARM-dts-aspeed-g6-add-USB-virtual-hub-fixup.patch
@@ -0,0 +1,53 @@
+From 4594ddeadebe0c818c94671295308c51f00a8e7e Mon Sep 17 00:00:00 2001
+From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+Date: Wed, 20 Nov 2019 13:06:58 -0800
+Subject: [PATCH] ARM: dts: aspeed-g6: add USB virtual hub fixup
+
+This commit adds dt and pinctrl fixup for USB virtual hub.
+
+Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+---
+ arch/arm/boot/dts/aspeed-g6-pinctrl.dtsi | 5 +++++
+ arch/arm/boot/dts/aspeed-g6.dtsi | 10 ++++++++++
+ 2 files changed, 15 insertions(+)
+
+diff --git a/arch/arm/boot/dts/aspeed-g6-pinctrl.dtsi b/arch/arm/boot/dts/aspeed-g6-pinctrl.dtsi
+index 045ce66ca876..6ea66aaf9dd0 100644
+--- a/arch/arm/boot/dts/aspeed-g6-pinctrl.dtsi
++++ b/arch/arm/boot/dts/aspeed-g6-pinctrl.dtsi
+@@ -1112,6 +1112,11 @@
+ groups = "UART9";
+ };
+
++ pinctrl_usb2adp_default: usb2adp_default {
++ function = "USB2ADP";
++ groups = "USBA";
++ };
++
+ pinctrl_vb_default: vb_default {
+ function = "VB";
+ groups = "VB";
+diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi
+index 88bd02058585..b2549f2a619b 100644
+--- a/arch/arm/boot/dts/aspeed-g6.dtsi
++++ b/arch/arm/boot/dts/aspeed-g6.dtsi
+@@ -253,6 +253,16 @@
+ status = "disabled";
+ };
+
++ vhub: usb-vhub@1e6a0000 {
++ compatible = "aspeed,ast2600-usb-vhub";
++ reg = <0x1e6a0000 0x300>;
++ interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
++ clocks = <&syscon ASPEED_CLK_GATE_USBPORT1CLK>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_usb2adp_default>;
++ status = "disabled";
++ };
++
+ apb {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+--
+2.7.4
+
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0083-usb-gadget-aspeed-add-ast2600-compatible-string.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0083-usb-gadget-aspeed-add-ast2600-compatible-string.patch
new file mode 100644
index 000000000..8093b2bc1
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0083-usb-gadget-aspeed-add-ast2600-compatible-string.patch
@@ -0,0 +1,32 @@
+From 7a9aa0e35180a14d352516a92166743a2b063533 Mon Sep 17 00:00:00 2001
+From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+Date: Wed, 20 Nov 2019 12:49:46 -0800
+Subject: [PATCH] usb: gadget: aspeed: add ast2600 compatible string
+
+This commit adds "aspeed,ast2600-usb-vhub" compatible string to
+use it for AST2600 USB virtual hub driver. AST2600 support total 7
+downstream device ports so this driver should be modified later to
+support the additional ports.
+
+Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+---
+ drivers/usb/gadget/udc/aspeed-vhub/core.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/drivers/usb/gadget/udc/aspeed-vhub/core.c b/drivers/usb/gadget/udc/aspeed-vhub/core.c
+index 90b134d5dca9..905e1cfd3d51 100644
+--- a/drivers/usb/gadget/udc/aspeed-vhub/core.c
++++ b/drivers/usb/gadget/udc/aspeed-vhub/core.c
+@@ -407,6 +407,9 @@ static const struct of_device_id ast_vhub_dt_ids[] = {
+ {
+ .compatible = "aspeed,ast2500-usb-vhub",
+ },
++ {
++ .compatible = "aspeed,ast2600-usb-vhub",
++ },
+ { }
+ };
+ MODULE_DEVICE_TABLE(of, ast_vhub_dt_ids);
+--
+2.7.4
+
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0084-ARM-dts-aspeed-g6-add-GFX-node.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0084-ARM-dts-aspeed-g6-add-GFX-node.patch
new file mode 100644
index 000000000..d3a4a9fdc
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0084-ARM-dts-aspeed-g6-add-GFX-node.patch
@@ -0,0 +1,35 @@
+From ad8984556c191b75404fc5608466ee95ccc3b501 Mon Sep 17 00:00:00 2001
+From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+Date: Wed, 20 Nov 2019 15:01:06 -0800
+Subject: [PATCH] ARM: dts: aspeed-g6: add GFX node
+
+This commit adds GFX node for AST2600 SoC.
+
+Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+---
+ arch/arm/boot/dts/aspeed-g6.dtsi | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi
+index b2549f2a619b..34281b14128a 100644
+--- a/arch/arm/boot/dts/aspeed-g6.dtsi
++++ b/arch/arm/boot/dts/aspeed-g6.dtsi
+@@ -311,6 +311,15 @@
+ quality = <100>;
+ };
+
++ gfx: display@1e6e6000 {
++ compatible = "aspeed,ast2600-gfx", "syscon";
++ reg = <0x1e6e6000 0x1000>;
++ reg-io-width = <4>;
++ clocks = <&syscon ASPEED_CLK_GATE_D1CLK>;
++ status = "disabled";
++ interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
++ };
++
+ adc: adc@1e6e9000 {
+ compatible = "aspeed,ast2500-adc";
+ reg = <0x1e6e9000 0x100>;
+--
+2.7.4
+
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0085-drm-add-AST2600-GFX-support.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0085-drm-add-AST2600-GFX-support.patch
new file mode 100644
index 000000000..b936886cf
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0085-drm-add-AST2600-GFX-support.patch
@@ -0,0 +1,105 @@
+From 0709e2bab2d763b75683a823c97f4016253ebe6b Mon Sep 17 00:00:00 2001
+From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+Date: Wed, 20 Nov 2019 14:58:24 -0800
+Subject: [PATCH] drm: add AST2600 GFX support
+
+This commit adds support for AST2600 GFX.
+
+Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+---
+ drivers/gpu/drm/aspeed/aspeed_gfx.h | 4 ++++
+ drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c | 6 +++---
+ drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 18 +++++++++++-------
+ 3 files changed, 18 insertions(+), 10 deletions(-)
+
+diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx.h b/drivers/gpu/drm/aspeed/aspeed_gfx.h
+index a10358bb61ec..eebd72eb1220 100644
+--- a/drivers/gpu/drm/aspeed/aspeed_gfx.h
++++ b/drivers/gpu/drm/aspeed/aspeed_gfx.h
+@@ -13,11 +13,15 @@ struct aspeed_gfx {
+ struct drm_simple_display_pipe pipe;
+ struct drm_connector connector;
+ struct drm_fbdev_cma *fbdev;
++ u32 scu_misc_offset;
+ };
+
+ int aspeed_gfx_create_pipe(struct drm_device *drm);
+ int aspeed_gfx_create_output(struct drm_device *drm);
+
++#define SCU_MISC_AST2500 0x2c /* SCU Misc of AST2500 */
++#define SCU_MISC_AST2600 0xc0 /* SCU Misc1 of AST2600 */
++
+ #define CRT_CTRL1 0x60 /* CRT Control I */
+ #define CRT_CTRL2 0x64 /* CRT Control II */
+ #define CRT_STATUS 0x68 /* CRT Status */
+diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c b/drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c
+index 15db9e426ec4..2c95c720f34a 100644
+--- a/drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c
++++ b/drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c
+@@ -59,8 +59,8 @@ static void aspeed_gfx_enable_controller(struct aspeed_gfx *priv)
+ u32 ctrl1 = readl(priv->base + CRT_CTRL1);
+ u32 ctrl2 = readl(priv->base + CRT_CTRL2);
+
+- /* SCU2C: set DAC source for display output to Graphics CRT (GFX) */
+- regmap_update_bits(priv->scu, 0x2c, BIT(16), BIT(16));
++ /* Set DAC source for display output to Graphics CRT (GFX) */
++ regmap_update_bits(priv->scu, priv->scu_misc_offset, BIT(16), BIT(16));
+
+ writel(ctrl1 | CRT_CTRL_EN, priv->base + CRT_CTRL1);
+ writel(ctrl2 | CRT_CTRL_DAC_EN, priv->base + CRT_CTRL2);
+@@ -74,7 +74,7 @@ static void aspeed_gfx_disable_controller(struct aspeed_gfx *priv)
+ writel(ctrl1 & ~CRT_CTRL_EN, priv->base + CRT_CTRL1);
+ writel(ctrl2 & ~CRT_CTRL_DAC_EN, priv->base + CRT_CTRL2);
+
+- regmap_update_bits(priv->scu, 0x2c, BIT(16), 0);
++ regmap_update_bits(priv->scu, priv->scu_misc_offset, BIT(16), 0);
+ }
+
+ static void aspeed_gfx_crtc_mode_set_nofb(struct aspeed_gfx *priv)
+diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
+index eeb22eccd1fc..aa44e01ac245 100644
+--- a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
++++ b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
+@@ -112,8 +112,14 @@ static int aspeed_gfx_load(struct drm_device *drm)
+
+ priv->scu = syscon_regmap_lookup_by_compatible("aspeed,ast2500-scu");
+ if (IS_ERR(priv->scu)) {
+- dev_err(&pdev->dev, "failed to find SCU regmap\n");
+- return PTR_ERR(priv->scu);
++ priv->scu = syscon_regmap_lookup_by_compatible("aspeed,ast2600-scu");
++ if (IS_ERR(priv->scu)) {
++ dev_err(&pdev->dev, "failed to find SCU regmap\n");
++ return PTR_ERR(priv->scu);
++ }
++ priv->scu_misc_offset = SCU_MISC_AST2600;
++ } else {
++ priv->scu_misc_offset = SCU_MISC_AST2500;
+ }
+
+ ret = of_reserved_mem_device_init(drm->dev);
+@@ -130,12 +136,9 @@ static int aspeed_gfx_load(struct drm_device *drm)
+ }
+
+ priv->rst = devm_reset_control_get_exclusive(&pdev->dev, NULL);
+- if (IS_ERR(priv->rst)) {
+- dev_err(&pdev->dev,
+- "missing or invalid reset controller device tree entry");
+- return PTR_ERR(priv->rst);
++ if (!IS_ERR_OR_NULL(priv->rst)) {
++ reset_control_deassert(priv->rst);
+ }
+- reset_control_deassert(priv->rst);
+
+ priv->clk = devm_clk_get(drm->dev, NULL);
+ if (IS_ERR(priv->clk)) {
+@@ -212,6 +215,7 @@ static struct drm_driver aspeed_gfx_driver = {
+
+ static const struct of_device_id aspeed_gfx_match[] = {
+ { .compatible = "aspeed,ast2500-gfx" },
++ { .compatible = "aspeed,ast2600-gfx" },
+ { }
+ };
+
+--
+2.7.4
+
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0086-ADC-linux-driver-for-AST2600.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0086-ADC-linux-driver-for-AST2600.patch
new file mode 100644
index 000000000..63b683826
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0086-ADC-linux-driver-for-AST2600.patch
@@ -0,0 +1,271 @@
+From 14a4e77c801be8adbfc0726667a8051957e7a7dd Mon Sep 17 00:00:00 2001
+From: Chen Yugang <yugang.chen@linux.intel.com>
+Date: Tue, 3 Dec 2019 13:41:37 +0800
+Subject: [PATCH] ADC linux driver for AST2600
+
+Tested:
+it's tested with DC input.
+
+Signed-off-by: Chen Yugang <yugang.chen@linux.intel.com>
+---
+ arch/arm/boot/dts/aspeed-g6.dtsi | 14 +++++-
+ drivers/iio/adc/aspeed_adc.c | 99 +++++++++++++++++++++++++++++++++++-----
+ 2 files changed, 99 insertions(+), 14 deletions(-)
+
+diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi
+index 34281b1..4e8d25f 100644
+--- a/arch/arm/boot/dts/aspeed-g6.dtsi
++++ b/arch/arm/boot/dts/aspeed-g6.dtsi
+@@ -320,12 +320,22 @@
+ interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+- adc: adc@1e6e9000 {
+- compatible = "aspeed,ast2500-adc";
++ adc0: adc@1e6e9000 {
++ compatible = "aspeed,ast2600-adc";
+ reg = <0x1e6e9000 0x100>;
+ clocks = <&syscon ASPEED_CLK_APB2>;
++ resets = <&syscon ASPEED_RESET_ADC>;
+ interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
++ #io-channel-cells = <1>;
++ status = "disabled";
++ };
++
++ adc1: adc@1e6e9100 {
++ compatible = "aspeed,ast2600-adc";
++ reg = <0x1e6e9100 0x100>;
++ clocks = <&syscon ASPEED_CLK_APB2>;
+ resets = <&syscon ASPEED_RESET_ADC>;
++ interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
+ #io-channel-cells = <1>;
+ status = "disabled";
+ };
+diff --git a/drivers/iio/adc/aspeed_adc.c b/drivers/iio/adc/aspeed_adc.c
+index d3fc39d..1dd5a97 100644
+--- a/drivers/iio/adc/aspeed_adc.c
++++ b/drivers/iio/adc/aspeed_adc.c
+@@ -1,8 +1,12 @@
+-// SPDX-License-Identifier: GPL-2.0-only
+ /*
+- * Aspeed AST2400/2500 ADC
++ * Aspeed AST2400/2500/2600 ADC
+ *
+ * Copyright (C) 2017 Google, Inc.
++ * Copyright (C) ASPEED Technology Inc.
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms and conditions of the GNU General Public License,
++ * version 2, as published by the Free Software Foundation.
++ *
+ */
+
+ #include <linux/clk.h>
+@@ -30,6 +34,14 @@
+ #define ASPEED_REG_CLOCK_CONTROL 0x0C
+ #define ASPEED_REG_MAX 0xC0
+
++/* ast2600 */
++#define REF_VLOTAGE_2500mV 0
++#define REF_VLOTAGE_1200mV GENMASK(6, 6)
++#define REF_VLOTAGE_1550mV GENMASK(7, 7)
++#define REF_VLOTAGE_900mV GENMASK(7, 6)
++
++#define ASPEED_AUTOPENSATING BIT(5)
++
+ #define ASPEED_OPERATION_MODE_POWER_DOWN (0x0 << 1)
+ #define ASPEED_OPERATION_MODE_STANDBY (0x1 << 1)
+ #define ASPEED_OPERATION_MODE_NORMAL (0x7 << 1)
+@@ -45,8 +57,10 @@ struct aspeed_adc_model_data {
+ const char *model_name;
+ unsigned int min_sampling_rate; // Hz
+ unsigned int max_sampling_rate; // Hz
+- unsigned int vref_voltage; // mV
++ u32 vref_voltage; // mV
+ bool wait_init_sequence;
++ struct iio_chan_spec const *channels;
++ int num_channels;
+ };
+
+ struct aspeed_adc_data {
+@@ -56,6 +70,7 @@ struct aspeed_adc_data {
+ struct clk_hw *clk_prescaler;
+ struct clk_hw *clk_scaler;
+ struct reset_control *rst;
++ int cv;
+ };
+
+ #define ASPEED_CHAN(_idx, _data_reg_addr) { \
+@@ -87,6 +102,17 @@ static const struct iio_chan_spec aspeed_adc_iio_channels[] = {
+ ASPEED_CHAN(15, 0x2E),
+ };
+
++static const struct iio_chan_spec ast2600_adc_iio_channels[] = {
++ ASPEED_CHAN(0, 0x10),
++ ASPEED_CHAN(1, 0x12),
++ ASPEED_CHAN(2, 0x14),
++ ASPEED_CHAN(3, 0x16),
++ ASPEED_CHAN(4, 0x18),
++ ASPEED_CHAN(5, 0x1A),
++ ASPEED_CHAN(6, 0x1C),
++ ASPEED_CHAN(7, 0x1E),
++};
++
+ static int aspeed_adc_read_raw(struct iio_dev *indio_dev,
+ struct iio_chan_spec const *chan,
+ int *val, int *val2, long mask)
+@@ -175,7 +201,10 @@ static int aspeed_adc_probe(struct platform_device *pdev)
+ const struct aspeed_adc_model_data *model_data;
+ struct resource *res;
+ const char *clk_parent_name;
++ char prescaler_clk_name[32];
++ char scaler_clk_name[32];
+ int ret;
++ u32 eng_ctrl = 0;
+ u32 adc_engine_control_reg_val;
+
+ indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*data));
+@@ -194,19 +223,21 @@ static int aspeed_adc_probe(struct platform_device *pdev)
+ spin_lock_init(&data->clk_lock);
+ clk_parent_name = of_clk_get_parent_name(pdev->dev.of_node, 0);
+
++ snprintf(prescaler_clk_name, sizeof(prescaler_clk_name), "prescaler-%s", pdev->name);
+ data->clk_prescaler = clk_hw_register_divider(
+- &pdev->dev, "prescaler", clk_parent_name, 0,
++ &pdev->dev, prescaler_clk_name, clk_parent_name, 0,
+ data->base + ASPEED_REG_CLOCK_CONTROL,
+ 17, 15, 0, &data->clk_lock);
+ if (IS_ERR(data->clk_prescaler))
+ return PTR_ERR(data->clk_prescaler);
+
++ snprintf(scaler_clk_name, sizeof(scaler_clk_name), "scaler-%s", pdev->name);
+ /*
+ * Register ADC clock scaler downstream from the prescaler. Allow rate
+ * setting to adjust the prescaler as well.
+ */
+ data->clk_scaler = clk_hw_register_divider(
+- &pdev->dev, "scaler", "prescaler",
++ &pdev->dev, scaler_clk_name, prescaler_clk_name,
+ CLK_SET_RATE_PARENT,
+ data->base + ASPEED_REG_CLOCK_CONTROL,
+ 0, 10, 0, &data->clk_lock);
+@@ -215,7 +246,7 @@ static int aspeed_adc_probe(struct platform_device *pdev)
+ goto scaler_error;
+ }
+
+- data->rst = devm_reset_control_get_exclusive(&pdev->dev, NULL);
++ data->rst = devm_reset_control_get_shared(&pdev->dev, NULL);
+ if (IS_ERR(data->rst)) {
+ dev_err(&pdev->dev,
+ "invalid or missing reset controller device tree entry");
+@@ -225,11 +256,26 @@ static int aspeed_adc_probe(struct platform_device *pdev)
+ reset_control_deassert(data->rst);
+
+ model_data = of_device_get_match_data(&pdev->dev);
++ if (!of_property_read_u32(pdev->dev.of_node, "ref_voltage", (u32 *)&model_data->vref_voltage)) {
++ if (model_data->vref_voltage == 2500)
++ eng_ctrl = REF_VLOTAGE_2500mV;
++ else if (model_data->vref_voltage == 1200)
++ eng_ctrl = REF_VLOTAGE_1200mV;
++ else if ((model_data->vref_voltage >= 1550) && (model_data->vref_voltage <= 2700))
++ eng_ctrl = REF_VLOTAGE_1550mV;
++ else if ((model_data->vref_voltage >= 900) && (model_data->vref_voltage <= 1650))
++ eng_ctrl = REF_VLOTAGE_900mV;
++ else {
++ printk("error ref voltage %d \n", model_data->vref_voltage);
++ eng_ctrl = 0;
++ }
++ } else
++ eng_ctrl = 0;
+
+ if (model_data->wait_init_sequence) {
+ /* Enable engine in normal mode. */
+- writel(ASPEED_OPERATION_MODE_NORMAL | ASPEED_ENGINE_ENABLE,
+- data->base + ASPEED_REG_ENGINE_CONTROL);
++ eng_ctrl |= ASPEED_OPERATION_MODE_NORMAL | ASPEED_ENGINE_ENABLE;
++ writel(eng_ctrl, data->base + ASPEED_REG_ENGINE_CONTROL);
+
+ /* Wait for initial sequence complete. */
+ ret = readl_poll_timeout(data->base + ASPEED_REG_ENGINE_CONTROL,
+@@ -242,12 +288,26 @@ static int aspeed_adc_probe(struct platform_device *pdev)
+ goto poll_timeout_error;
+ }
+
++ /* do compensating calculation use ch 0 */
++ writel(eng_ctrl | ASPEED_OPERATION_MODE_NORMAL |
++ ASPEED_ENGINE_ENABLE | ASPEED_AUTOPENSATING, data->base + ASPEED_REG_ENGINE_CONTROL);
++
++ writel(eng_ctrl | ASPEED_OPERATION_MODE_NORMAL | BIT(16) |
++ ASPEED_ENGINE_ENABLE | ASPEED_AUTOPENSATING, data->base + ASPEED_REG_ENGINE_CONTROL);
++ mdelay(1);
++
++ data->cv = 0x200 - (readl(data->base + 0x10) & GENMASK(9, 0));
++
++ writel(eng_ctrl | ASPEED_OPERATION_MODE_NORMAL |
++ ASPEED_ENGINE_ENABLE | ASPEED_AUTOPENSATING, data->base + ASPEED_REG_ENGINE_CONTROL);
++ printk(KERN_INFO "aspeed_adc: cv %d \n", data->cv);
++
+ /* Start all channels in normal mode. */
+ ret = clk_prepare_enable(data->clk_scaler->clk);
+ if (ret)
+ goto clk_enable_error;
+
+- adc_engine_control_reg_val = GENMASK(31, 16) |
++ adc_engine_control_reg_val = eng_ctrl | GENMASK(31, 16) |
+ ASPEED_OPERATION_MODE_NORMAL | ASPEED_ENGINE_ENABLE;
+ writel(adc_engine_control_reg_val,
+ data->base + ASPEED_REG_ENGINE_CONTROL);
+@@ -257,8 +317,8 @@ static int aspeed_adc_probe(struct platform_device *pdev)
+ indio_dev->dev.parent = &pdev->dev;
+ indio_dev->info = &aspeed_adc_iio_info;
+ indio_dev->modes = INDIO_DIRECT_MODE;
+- indio_dev->channels = aspeed_adc_iio_channels;
+- indio_dev->num_channels = ARRAY_SIZE(aspeed_adc_iio_channels);
++ indio_dev->channels = model_data->channels;
++ indio_dev->num_channels = model_data->num_channels;
+
+ ret = iio_device_register(indio_dev);
+ if (ret)
+@@ -301,6 +361,8 @@ static const struct aspeed_adc_model_data ast2400_model_data = {
+ .vref_voltage = 2500, // mV
+ .min_sampling_rate = 10000,
+ .max_sampling_rate = 500000,
++ .channels = aspeed_adc_iio_channels,
++ .num_channels = 16,
+ };
+
+ static const struct aspeed_adc_model_data ast2500_model_data = {
+@@ -309,11 +371,24 @@ static const struct aspeed_adc_model_data ast2500_model_data = {
+ .min_sampling_rate = 1,
+ .max_sampling_rate = 1000000,
+ .wait_init_sequence = true,
++ .channels = aspeed_adc_iio_channels,
++ .num_channels = 16,
++};
++
++static const struct aspeed_adc_model_data ast2600_model_data = {
++ .model_name = "ast2500-adc",
++ .vref_voltage = 1800, /* mV --> can be 1.2v or 2.5 or ext 1.55~2.7v, 0.9v ~1.65v */
++ .min_sampling_rate = 1,
++ .max_sampling_rate = 1000000,
++ .wait_init_sequence = true,
++ .channels = ast2600_adc_iio_channels,
++ .num_channels = 8,
+ };
+
+ static const struct of_device_id aspeed_adc_matches[] = {
+ { .compatible = "aspeed,ast2400-adc", .data = &ast2400_model_data },
+ { .compatible = "aspeed,ast2500-adc", .data = &ast2500_model_data },
++ { .compatible = "aspeed,ast2600-adc", .data = &ast2600_model_data },
+ {},
+ };
+ MODULE_DEVICE_TABLE(of, aspeed_adc_matches);
+@@ -330,5 +405,5 @@ static struct platform_driver aspeed_adc_driver = {
+ module_platform_driver(aspeed_adc_driver);
+
+ MODULE_AUTHOR("Rick Altherr <raltherr@google.com>");
+-MODULE_DESCRIPTION("Aspeed AST2400/2500 ADC Driver");
++MODULE_DESCRIPTION("Aspeed AST2400/2500/2600 ADC Driver");
+ MODULE_LICENSE("GPL");
+--
+2.7.4
+
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/intel.cfg b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/intel.cfg
index 2a4e87d80..714f40bfd 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/intel.cfg
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/intel.cfg
@@ -1,6 +1,5 @@
CONFIG_BLK_DEV_RAM=y
CONFIG_HWMON=y
-CONFIG_SENSORS_ASPEED=y
CONFIG_SPI=y
CONFIG_SPI_MASTER=y
CONFIG_IIO=y
@@ -49,6 +48,7 @@ CONFIG_USB_F_HID=y
CONFIG_USB_GADGET=y
CONFIG_U_SERIAL_CONSOLE=y
CONFIG_USB_ASPEED_VHUB=y
+CONFIG_USB_MASS_STORAGE=y
CONFIG_USB_CONFIGFS=y
CONFIG_USB_CONFIGFS_MASS_STORAGE=y
CONFIG_USB_CONFIGFS_F_FS=y
@@ -72,3 +72,16 @@ CONFIG_CIFS_XATTR=y
CONFIG_PSTORE=y
CONFIG_PSTORE_ZLIB_COMPRESS=y
CONFIG_PSTORE_RAM=y
+CONFIG_FSI=n
+CONFIG_FSI_MASTER_HUB=n
+CONFIG_FSI_MASTER_ASPEED=n
+CONFIG_FSI_SCOM=n
+CONFIG_FSI_SBEFIFO=n
+CONFIG_FSI_OCC=n
+CONFIG_ASPEED_P2A_CTRL=n
+CONFIG_USB=n
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=n
+CONFIG_USB_DYNAMIC_MINORS=n
+CONFIG_USB_EHCI_HCD=n
+CONFIG_USB_EHCI_ROOT_HUB_TT=n
+CONFIG_USB_EHCI_HCD_PLATFORM=n
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend
index 085f58182..2ebad4093 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend
@@ -8,6 +8,8 @@ do_compile_prepend(){
SRC_URI += " \
file://intel.cfg \
file://0001-arm-dts-add-DTS-for-Intel-ast2500-platforms.patch \
+ file://0001-arm-dts-add-DTS-for-Intel-ast2600-platforms.patch \
+ file://0001-arm-dts-base-aspeed-g6-dtsi-fixups.patch \
file://0002-Enable-pass-through-on-GPIOE1-and-GPIOE3-free.patch \
file://0003-Enable-GPIOE0-and-GPIOE2-pass-through-by-default.patch \
file://0006-Allow-monitoring-of-power-control-input-GPIOs.patch \
@@ -44,7 +46,6 @@ SRC_URI += " \
file://0055-Documentation-jtag-Add-ABI-documentation.patch \
file://0056-Documentation-jtag-Add-JTAG-core-driver-ioctl-number.patch \
file://0057-drivers-jtag-Add-JTAG-core-driver-Maintainers.patch \
- file://0060-i2c-aspeed-fix-master-pending-state-handling.patch \
file://0061-i2c-aspeed-add-buffer-mode-transfer-support.patch \
file://0062-i2c-aspeed-add-DMA-mode-transfer-support.patch \
file://0063-i2c-aspeed-add-general-call-support.patch \
@@ -57,7 +58,17 @@ SRC_URI += " \
file://0074-media-aspeed-refine-HSYNC-VSYNC-polarity-setting-log.patch \
file://0075-Refine-initialization-flow-in-I2C-driver.patch \
file://0076-media-aspeed-clear-garbage-interrupts.patch \
+ file://0076-arm-ast2600-add-pwm_tacho-driver-from-aspeed.patch \
file://0077-soc-aspeed-Add-read-only-property-support.patch \
+ file://0078-Fix-NCSI-driver-issue-caused-by-host-shutdown.patch \
+ file://0079-usb-gadget-aspeed-backport-aspeed-vhub-bug-fixes.patch \
+ file://0080-i2c-aspeed-filter-garbage-interrupts-out.patch \
+ file://0081-clk-ast2600-enable-BCLK-for-PCI-PCIe-bus-always.patch \
+ file://0082-ARM-dts-aspeed-g6-add-USB-virtual-hub-fixup.patch \
+ file://0083-usb-gadget-aspeed-add-ast2600-compatible-string.patch \
+ file://0084-ARM-dts-aspeed-g6-add-GFX-node.patch \
+ file://0085-drm-add-AST2600-GFX-support.patch \
+ file://0086-ADC-linux-driver-for-AST2600.patch \
"
SRC_URI += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'file://0005-128MB-flashmap-for-PFR.patch', '', d)}"
diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0001-Enhance-DHCP-beyond-just-OFF-and-IPv4-IPv6-enabled.patch b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0001-Enhance-DHCP-beyond-just-OFF-and-IPv4-IPv6-enabled.patch
new file mode 100644
index 000000000..41541500f
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network/0001-Enhance-DHCP-beyond-just-OFF-and-IPv4-IPv6-enabled.patch
@@ -0,0 +1,657 @@
+From c7050f4a1f87d49e8a619d5d8752d1c98bfed3e8 Mon Sep 17 00:00:00 2001
+From: Johnathan Mantey <johnathanx.mantey@intel.com>
+Date: Wed, 3 Jul 2019 14:12:49 -0700
+Subject: [PATCH] Enhance DHCP beyond just OFF and IPv4/IPv6 enabled.
+
+DHCP is not a binary option. The network interface can have DHCP
+disabled, IPv4 only, IPv6 only, and IPv4/IPv6.
+
+Tested:
+Using dbus-send or busctl:
+Disabled DHCP, and confirmed only link local addresses were present.
+
+Assigned only static addresses. Both with/and without the gateway set
+to 0.0.0.0
+
+Deleted static IPv4 addresses.
+Reassigned static addresses.
+
+Enabled DHCP for ipv4 only, and witnessed a DHCP server assign a valid
+address. It also correctly managed the routing table.
+
+Assigned static IPv4 address.
+Assigned static IPv6 address.
+Confirmed both IPv4 and IPv6 static addresses are active.
+
+Enabled DHCP for ipv6 only, and confirmed the static v4 address
+remains. The ipv6 address is removed, waiting for a DHCP6 server.
+
+Enabled DHCP for both ipv4 and ipv6. IPv4 address was assigned. IPv6
+address is assumed to succeed, as systemd config file enables IPv6
+DHCP.
+
+Change-Id: I2e0ff80ac3a5e88bcff28adac419bf21e37be162
+Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
+---
+ Makefile.am | 5 +
+ configure.ac | 1 +
+ ethernet_interface.cpp | 170 ++++++++++++++++++++++---------
+ ethernet_interface.hpp | 31 +++++-
+ ipaddress.cpp | 2 +-
+ network_manager.cpp | 2 +-
+ test/test_ethernet_interface.cpp | 3 +-
+ test/test_vlan_interface.cpp | 3 +-
+ types.hpp | 3 +
+ util.cpp | 69 ++++++++++++-
+ util.hpp | 13 ++-
+ vlan_interface.cpp | 2 +-
+ vlan_interface.hpp | 4 +-
+ 13 files changed, 246 insertions(+), 62 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 79db184..2768e38 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -97,6 +97,11 @@ phosphor_network_manager_CXXFLAGS = \
+ $(SDEVENTPLUS_CFLAGS) \
+ $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
+ $(PHOSPHOR_LOGGING_CFLAGS) \
++ -DBOOST_ERROR_CODE_HEADER_ONLY \
++ -DBOOST_SYSTEM_NO_DEPRECATED \
++ -DBOOST_COROUTINES_NO_DEPRECATION_WARNING \
++ -DBOOST_ASIO_DISABLE_THREADS \
++ -DBOOST_ALL_NO_LIB \
+ -flto
+
+ xyz/openbmc_project/Network/VLAN/Create/server.cpp: xyz/openbmc_project/Network/VLAN/Create.interface.yaml xyz/openbmc_project/Network/VLAN/Create/server.hpp
+diff --git a/configure.ac b/configure.ac
+index 8870fcd..00b23bc 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -36,6 +36,7 @@ AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++])
+ PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging])
+ PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces])
+ PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0])
++AC_CHECK_HEADER(boost/algorithm/string/split.hpp, [], [AC_MSG_ERROR([Could not find boost/algorithm/string/split.hpp])])
+
+ # Checks for header files.
+ AC_CHECK_HEADER(systemd/sd-bus.h, ,\
+diff --git a/ethernet_interface.cpp b/ethernet_interface.cpp
+index c3edd4b..537054f 100644
+--- a/ethernet_interface.cpp
++++ b/ethernet_interface.cpp
+@@ -3,9 +3,9 @@
+ #include "ethernet_interface.hpp"
+
+ #include "config_parser.hpp"
+-#include "ipaddress.hpp"
+ #include "neighbor.hpp"
+ #include "network_manager.hpp"
++#include "util.hpp"
+ #include "vlan_interface.hpp"
+
+ #include <arpa/inet.h>
+@@ -40,9 +40,12 @@ using Argument = xyz::openbmc_project::Common::InvalidArgument;
+ static constexpr const char* networkChannelCfgFile =
+ "/var/channel_intf_data.json";
+ static constexpr const char* defaultChannelPriv = "priv-admin";
++std::map<std::string, std::string> mapDHCPToSystemd = {
++ {"both", "true"}, {"v4", "ipv4"}, {"v6", "ipv6"}, {"none", "false"}};
++
+ EthernetInterface::EthernetInterface(sdbusplus::bus::bus& bus,
+ const std::string& objPath,
+- bool dhcpEnabled, Manager& parent,
++ DHCPConf dhcpEnabled, Manager& parent,
+ bool emitSignal) :
+ Ifaces(bus, objPath.c_str(), true),
+ bus(bus), manager(parent), objPath(objPath)
+@@ -81,24 +84,78 @@ static IP::Protocol convertFamily(int family)
+ throw std::invalid_argument("Bad address family");
+ }
+
++void EthernetInterface::disableDHCP(IP::Protocol protocol)
++{
++ DHCPConf dhcpState = EthernetInterfaceIntf::dHCPEnabled();
++ if (dhcpState == EthernetInterface::DHCPConf::both)
++ {
++ if (protocol == IP::Protocol::IPv4)
++ {
++ dHCPEnabled(EthernetInterface::DHCPConf::v6);
++ }
++ else if (protocol == IP::Protocol::IPv6)
++ {
++ dHCPEnabled(EthernetInterface::DHCPConf::v4);
++ }
++ }
++ else if ((dhcpState == EthernetInterface::DHCPConf::v4) &&
++ (protocol == IP::Protocol::IPv4))
++ {
++ dHCPEnabled(EthernetInterface::DHCPConf::none);
++ }
++ else if ((dhcpState == EthernetInterface::DHCPConf::v6) &&
++ (protocol == IP::Protocol::IPv6))
++ {
++ dHCPEnabled(EthernetInterface::DHCPConf::none);
++ }
++}
++
++bool EthernetInterface::dhcpIsEnabled(IP::Protocol family, bool ignoreProtocol)
++{
++ return ((EthernetInterfaceIntf::dHCPEnabled() ==
++ EthernetInterface::DHCPConf::both) ||
++ ((EthernetInterfaceIntf::dHCPEnabled() ==
++ EthernetInterface::DHCPConf::v6) &&
++ ((family == IP::Protocol::IPv6) || ignoreProtocol)) ||
++ ((EthernetInterfaceIntf::dHCPEnabled() ==
++ EthernetInterface::DHCPConf::v4) &&
++ ((family == IP::Protocol::IPv4) || ignoreProtocol)));
++}
++
++bool EthernetInterface::dhcpToBeEnabled(IP::Protocol family,
++ std::string& nextDHCPState)
++{
++ return ((nextDHCPState == "true") ||
++ ((nextDHCPState == "ipv6") && (family == IP::Protocol::IPv6)) ||
++ ((nextDHCPState == "ipv4") && (family == IP::Protocol::IPv4)));
++}
++
++bool EthernetInterface::addressIsStatic(IP::AddressOrigin origin)
++{
++ return (
++#ifdef LINK_LOCAL_AUTOCONFIGURATION
++ (origin == IP::AddressOrigin::Static)
++#else
++ (origin == IP::AddressOrigin::Static ||
++ origin == IP::AddressOrigin::LinkLocal)
++#endif
++
++ );
++}
++
+ void EthernetInterface::createIPAddressObjects()
+ {
+ addrs.clear();
+
+ auto addrs = getInterfaceAddrs()[interfaceName()];
++ if (getIPAddrOrigins(addrs))
++ {
++ return;
++ }
+
+ for (auto& addr : addrs)
+ {
+ IP::Protocol addressType = convertFamily(addr.addrType);
+- IP::AddressOrigin origin = IP::AddressOrigin::Static;
+- if (dHCPEnabled())
+- {
+- origin = IP::AddressOrigin::DHCP;
+- }
+- if (isLinkLocalIP(addr.ipaddress))
+- {
+- origin = IP::AddressOrigin::LinkLocal;
+- }
+ // Obsolete parameter
+ std::string gateway = "";
+
+@@ -108,7 +165,7 @@ void EthernetInterface::createIPAddressObjects()
+ this->addrs.emplace(addr.ipaddress,
+ std::make_shared<phosphor::network::IPAddress>(
+ bus, ipAddressObjectPath.c_str(), *this,
+- addressType, addr.ipaddress, origin,
++ addressType, addr.ipaddress, addr.origin,
+ addr.prefix, gateway));
+ }
+ }
+@@ -152,11 +209,11 @@ ObjectPath EthernetInterface::iP(IP::Protocol protType, std::string ipaddress,
+ uint8_t prefixLength, std::string gateway)
+ {
+
+- if (dHCPEnabled())
++ if (dhcpIsEnabled(protType))
+ {
+ log<level::INFO>("DHCP enabled on the interface"),
+ entry("INTERFACE=%s", interfaceName().c_str());
+- dHCPEnabled(false);
++ disableDHCP(protType);
+ }
+
+ IP::AddressOrigin origin = IP::AddressOrigin::Static;
+@@ -438,7 +495,7 @@ bool EthernetInterface::iPv6AcceptRA(bool value)
+ return value;
+ }
+
+-bool EthernetInterface::dHCPEnabled(bool value)
++EthernetInterface::DHCPConf EthernetInterface::dHCPEnabled(DHCPConf value)
+ {
+ if (value == EthernetInterfaceIntf::dHCPEnabled())
+ {
+@@ -505,7 +562,7 @@ void EthernetInterface::loadVLAN(VlanId id)
+ std::string path = objPath;
+ path += "_" + std::to_string(id);
+
+- auto dhcpEnabled =
++ DHCPConf dhcpEnabled =
+ getDHCPValue(manager.getConfDir().string(), vlanInterfaceName);
+
+ auto vlanIntf = std::make_unique<phosphor::network::VlanInterface>(
+@@ -527,7 +584,8 @@ ObjectPath EthernetInterface::createVLAN(VlanId id)
+ path += "_" + std::to_string(id);
+
+ auto vlanIntf = std::make_unique<phosphor::network::VlanInterface>(
+- bus, path.c_str(), false, id, *this, manager);
++ bus, path.c_str(), EthernetInterface::DHCPConf::none, id, *this,
++ manager);
+
+ // write the device file for the vlan interface.
+ vlanIntf->writeDeviceFile();
+@@ -600,8 +658,6 @@ void EthernetInterface::writeConfigurationFile()
+ // write all the static ip address in the systemd-network conf file
+
+ using namespace std::string_literals;
+- using AddressOrigin =
+- sdbusplus::xyz::openbmc_project::Network::server::IP::AddressOrigin;
+ namespace fs = std::experimental::filesystem;
+
+ // if there is vlan interafce then write the configuration file
+@@ -670,41 +726,57 @@ void EthernetInterface::writeConfigurationFile()
+ }
+
+ // Add the DHCP entry
+- auto value = dHCPEnabled() ? "true"s : "false"s;
+- stream << "DHCP="s + value + "\n";
+-
+- // When the interface configured as dhcp, we don't need below given entries
+- // in config file.
+- if (dHCPEnabled() == false)
+- {
+- // Static
+- for (const auto& addr : addrs)
++ std::string requestedDHCPState;
++ std::string::size_type loc;
++ std::string value = convertForMessage(EthernetInterfaceIntf::dHCPEnabled());
++ loc = value.rfind(".");
++ requestedDHCPState = value.substr(loc + 1);
++ std::string mappedDHCPState = mapDHCPToSystemd[requestedDHCPState];
++ stream << "DHCP="s + mappedDHCPState + "\n";
++
++ bool dhcpv6Requested = dhcpToBeEnabled(IP::Protocol::IPv6, mappedDHCPState);
++ bool dhcpv4Requested = dhcpToBeEnabled(IP::Protocol::IPv4, mappedDHCPState);
++ // Static IP addresses
++ for (const auto& addr : addrs)
++ {
++ bool isValidIPv4 = isValidIP(AF_INET, addr.second->address());
++ bool isValidIPv6 = isValidIP(AF_INET6, addr.second->address());
++ if (((!dhcpv4Requested && isValidIPv4) ||
++ (!dhcpv6Requested && isValidIPv6)) &&
++ addressIsStatic(addr.second->origin()))
+ {
+- if (addr.second->origin() == AddressOrigin::Static
+-#ifndef LINK_LOCAL_AUTOCONFIGURATION
+- || addr.second->origin() == AddressOrigin::LinkLocal
+-#endif
+- )
++ std::string address = addr.second->address() + "/" +
++ std::to_string(addr.second->prefixLength());
++
++ // build the address entries. Do not use [Network] shortcuts to
++ // insert address entries.
++ stream << "[Address]\n";
++ stream << "Address=" << address << "\n";
++
++ // build the route section. Do not use [Network] shortcuts to apply
++ // default gateway values.
++ std::string gw = "0.0.0.0";
++ if (addr.second->gateway() != "0.0.0.0" &&
++ addr.second->gateway() != "")
+ {
+- std::string address =
+- addr.second->address() + "/" +
+- std::to_string(addr.second->prefixLength());
+-
+- stream << "Address=" << address << "\n";
++ gw = addr.second->gateway();
+ }
+- }
+-
+- if (manager.getSystemConf())
+- {
+- const auto& gateway = manager.getSystemConf()->defaultGateway();
+- if (!gateway.empty())
++ else
+ {
+- stream << "Gateway=" << gateway << "\n";
++ if (isValidIPv4)
++ {
++ gw = manager.getSystemConf()->defaultGateway();
++ }
++ else if (isValidIPv6)
++ {
++ gw = manager.getSystemConf()->defaultGateway6();
++ }
+ }
+- const auto& gateway6 = manager.getSystemConf()->defaultGateway6();
+- if (!gateway6.empty())
++
++ if (!gw.empty())
+ {
+- stream << "Gateway=" << gateway6 << "\n";
++ stream << "[Route]\n";
++ stream << "Gateway=" << gw << "\n";
+ }
+ }
+ }
+@@ -816,7 +888,7 @@ std::string EthernetInterface::mACAddress(std::string value)
+
+ void EthernetInterface::deleteAll()
+ {
+- if (EthernetInterfaceIntf::dHCPEnabled())
++ if (dhcpIsEnabled(IP::Protocol::IPv4, true))
+ {
+ log<level::INFO>("DHCP enabled on the interface"),
+ entry("INTERFACE=%s", interfaceName().c_str());
+diff --git a/ethernet_interface.hpp b/ethernet_interface.hpp
+index 3e4cf12..a962751 100644
+--- a/ethernet_interface.hpp
++++ b/ethernet_interface.hpp
+@@ -91,7 +91,7 @@ class EthernetInterface : public Ifaces
+ * send.
+ */
+ EthernetInterface(sdbusplus::bus::bus& bus, const std::string& objPath,
+- bool dhcpEnabled, Manager& parent,
++ DHCPConf dhcpEnabled, Manager& parent,
+ bool emitSignal = true);
+
+ /** @brief Function to create ipaddress dbus object.
+@@ -157,7 +157,34 @@ class EthernetInterface : public Ifaces
+ }
+
+ /** Set value of DHCPEnabled */
+- bool dHCPEnabled(bool value) override;
++ DHCPConf dHCPEnabled(DHCPConf value) override;
++
++ /** @brief Determines if DHCP is active for the IP::Protocol supplied.
++ * @param[in] protocol - Either IPv4 or IPv6
++ * @param[in] ignoreProtocol - Allows IPv4 and IPv6 to be checked using a
++ * single call.
++ * @returns true/false value if DHCP is active for the input protocol
++ */
++ bool dhcpIsEnabled(IP::Protocol protocol, bool ignoreProtocol = false);
++
++ /** @brief Determines if DHCP will be active following next reconfig
++ * @param[in] protocol - Either IPv4 or IPv6
++ * @param[in] nextDHCPState - The new DHCP mode to take affect
++ * @returns true/false value if DHCP is active for the input protocol
++ */
++ bool dhcpToBeEnabled(IP::Protocol family, std::string& nextDHCPState);
++
++ /** @brief Determines if the address is manually assigned
++ * @param[in] origin - The origin entry of the IP::Address
++ * @returns true/false value if the address is static
++ */
++ bool addressIsStatic(IP::AddressOrigin origin);
++
++ /** @brief Selectively disables DHCP
++ * @param[in] protocol - The IPv4 or IPv6 protocol to return to static
++ * addressing mode
++ */
++ void disableDHCP(IP::Protocol protocol);
+
+ /** @brief sets the MAC address.
+ * @param[in] value - MAC address which needs to be set on the system.
+diff --git a/ipaddress.cpp b/ipaddress.cpp
+index 10a22b2..5b2bf56 100644
+--- a/ipaddress.cpp
++++ b/ipaddress.cpp
+@@ -57,7 +57,7 @@ IP::AddressOrigin IPAddress::origin(IP::AddressOrigin origin)
+ }
+ void IPAddress::delete_()
+ {
+- if (origin() != IP::AddressOrigin::Static)
++ if (parent.dhcpIsEnabled(type()))
+ {
+ log<level::ERR>("Tried to delete a non-static address"),
+ entry("ADDRESS=%s", address().c_str()),
+diff --git a/network_manager.cpp b/network_manager.cpp
+index 75f4e5f..f7e8a75 100644
+--- a/network_manager.cpp
++++ b/network_manager.cpp
+@@ -248,7 +248,7 @@ void Manager::createInterfaces()
+ // normal ethernet interface
+ objPath /= interface;
+
+- auto dhcp = getDHCPValue(confDir, interface);
++ EthernetInterfaceIntf::DHCPConf dhcp = getDHCPValue(confDir, interface);
+
+ auto intf = std::make_shared<phosphor::network::EthernetInterface>(
+ bus, objPath.string(), dhcp, *this);
+diff --git a/test/test_ethernet_interface.cpp b/test/test_ethernet_interface.cpp
+index 30dee8a..87fd68d 100644
+--- a/test/test_ethernet_interface.cpp
++++ b/test/test_ethernet_interface.cpp
+@@ -58,7 +58,8 @@ class TestEthernetInterface : public testing::Test
+ {
+ mock_clear();
+ mock_addIF("test0", 1, mac);
+- return {bus, "/xyz/openbmc_test/network/test0", false, manager};
++ return {bus, "/xyz/openbmc_test/network/test0",
++ EthernetInterface::DHCPConf::none, manager};
+ }
+
+ int countIPObjects()
+diff --git a/test/test_vlan_interface.cpp b/test/test_vlan_interface.cpp
+index 1dffc7e..e49b43f 100644
+--- a/test/test_vlan_interface.cpp
++++ b/test/test_vlan_interface.cpp
+@@ -50,7 +50,8 @@ class TestVlanInterface : public testing::Test
+ {
+ mock_clear();
+ mock_addIF("test0", 1);
+- return {bus, "/xyz/openbmc_test/network/test0", false, manager};
++ return {bus, "/xyz/openbmc_test/network/test0",
++ EthernetInterface::DHCPConf::none, manager};
+ }
+
+ void setConfDir()
+diff --git a/types.hpp b/types.hpp
+index 123067a..c4409fe 100644
+--- a/types.hpp
++++ b/types.hpp
+@@ -1,5 +1,7 @@
+ #pragma once
+
++#include "ipaddress.hpp"
++
+ #include <ifaddrs.h>
+ #include <netinet/in.h>
+ #include <systemd/sd-event.h>
+@@ -50,6 +52,7 @@ struct AddrInfo
+ {
+ uint8_t addrType;
+ std::string ipaddress;
++ IP::AddressOrigin origin;
+ uint16_t prefix;
+ };
+
+diff --git a/util.cpp b/util.cpp
+index afbc229..2e5b164 100644
+--- a/util.cpp
++++ b/util.cpp
+@@ -6,12 +6,17 @@
+ #include <arpa/inet.h>
+ #include <dirent.h>
+ #include <net/if.h>
++#include <sys/stat.h>
+ #include <sys/wait.h>
+
+ #include <algorithm>
++#include <boost/algorithm/string/classification.hpp>
++#include <boost/algorithm/string/split.hpp>
++#include <boost/process.hpp>
+ #include <cstdlib>
+ #include <cstring>
+ #include <experimental/filesystem>
++#include <fstream>
+ #include <iostream>
+ #include <list>
+ #include <phosphor-logging/elog-errors.hpp>
+@@ -26,6 +31,54 @@ namespace phosphor
+ namespace network
+ {
+
++int getIPAddrOrigins(AddrList& addressList)
++{
++ boost::process::ipstream inputStream;
++ boost::process::child ipaddr("ip -o addr",
++ boost::process::std_out > inputStream);
++ std::string ipaddrLine;
++
++ while (inputStream && std::getline(inputStream, ipaddrLine) &&
++ !ipaddrLine.empty())
++ {
++ std::vector<std::string> addressElements;
++ std::vector<std::string> addrPrefixVec;
++
++ boost::split(addressElements, ipaddrLine, boost::is_any_of(" "),
++ boost::token_compress_on);
++ boost::split(addrPrefixVec, addressElements[3], boost::is_any_of("/"),
++ boost::token_compress_on);
++ std::string& nic = addressElements[1];
++ std::string& ipClass = addressElements[2]; // inet | inet6
++ std::string& address = addrPrefixVec[0];
++ if (nic != "lo")
++ {
++ for (auto it = addressList.begin(); it != addressList.end(); it++)
++ {
++ if (it->ipaddress == address)
++ {
++ bool isIPv6 = (ipClass == "inet6");
++ int globalStrIdx = isIPv6 ? 5 : 7;
++ if (addressElements[globalStrIdx] == "global")
++ {
++ it->origin = (addressElements[8] == "dynamic")
++ ? IP::AddressOrigin::DHCP
++ : IP::AddressOrigin::Static;
++ }
++ else if (addressElements[globalStrIdx] == "link")
++ {
++ it->origin = isIPv6 ? IP::AddressOrigin::SLAAC
++ : IP::AddressOrigin::LinkLocal;
++ }
++ break;
++ }
++ }
++ }
++ }
++ ipaddr.wait();
++ return 0;
++}
++
+ namespace
+ {
+
+@@ -410,9 +463,11 @@ std::optional<std::string> interfaceToUbootEthAddr(const char* intf)
+ return "eth" + std::to_string(idx) + "addr";
+ }
+
+-bool getDHCPValue(const std::string& confDir, const std::string& intf)
++EthernetInterfaceIntf::DHCPConf getDHCPValue(const std::string& confDir,
++ const std::string& intf)
+ {
+- bool dhcp = false;
++ EthernetInterfaceIntf::DHCPConf dhcp =
++ EthernetInterfaceIntf::DHCPConf::none;
+ // Get the interface mode value from systemd conf
+ // using namespace std::string_literals;
+ fs::path confPath = confDir;
+@@ -434,7 +489,15 @@ bool getDHCPValue(const std::string& confDir, const std::string& intf)
+ // There will be only single value for DHCP key.
+ if (values[0] == "true")
+ {
+- dhcp = true;
++ dhcp = EthernetInterfaceIntf::DHCPConf::both;
++ }
++ else if (values[0] == "ipv4")
++ {
++ dhcp = EthernetInterfaceIntf::DHCPConf::v4;
++ }
++ else if (values[0] == "ipv6")
++ {
++ dhcp = EthernetInterfaceIntf::DHCPConf::v6;
+ }
+ return dhcp;
+ }
+diff --git a/util.hpp b/util.hpp
+index 251aa0d..b3f7bba 100644
+--- a/util.hpp
++++ b/util.hpp
+@@ -13,12 +13,16 @@
+ #include <sdbusplus/bus.hpp>
+ #include <string>
+ #include <string_view>
++#include <xyz/openbmc_project/Network/EthernetInterface/server.hpp>
+
+ namespace phosphor
+ {
+ namespace network
+ {
+
++using EthernetInterfaceIntf =
++ sdbusplus::xyz::openbmc_project::Network::server::EthernetInterface;
++
+ constexpr auto IPV4_MIN_PREFIX_LENGTH = 1;
+ constexpr auto IPV4_MAX_PREFIX_LENGTH = 32;
+ constexpr auto IPV6_MAX_PREFIX_LENGTH = 64;
+@@ -156,7 +160,8 @@ std::optional<std::string> interfaceToUbootEthAddr(const char* intf);
+ * @param[in] confDir - Network configuration directory.
+ * @param[in] intf - Interface name.
+ */
+-bool getDHCPValue(const std::string& confDir, const std::string& intf);
++EthernetInterfaceIntf::DHCPConf getDHCPValue(const std::string& confDir,
++ const std::string& intf);
+
+ namespace internal
+ {
+@@ -183,6 +188,12 @@ void execute(const char* path, ArgTypes&&... tArgs)
+ internal::executeCommandinChildProcess(path, args);
+ }
+
++/* @brief Retrieve the source (DHCP, Static, Local/Self assigned) for
++ * each IP address supplied
++ * @param[in] addressList - List of IP addresses active on one interface
++ */
++int getIPAddrOrigins(AddrList& addressList);
++
+ } // namespace network
+
+ /** @brief Copies data from a buffer into a copyable type
+diff --git a/vlan_interface.cpp b/vlan_interface.cpp
+index 73de4e8..26282cb 100644
+--- a/vlan_interface.cpp
++++ b/vlan_interface.cpp
+@@ -22,7 +22,7 @@ using namespace phosphor::logging;
+ using namespace sdbusplus::xyz::openbmc_project::Common::Error;
+
+ VlanInterface::VlanInterface(sdbusplus::bus::bus& bus,
+- const std::string& objPath, bool dhcpEnabled,
++ const std::string& objPath, DHCPConf dhcpEnabled,
+ uint32_t vlanID, EthernetInterface& intf,
+ Manager& parent) :
+ VlanIface(bus, objPath.c_str()),
+diff --git a/vlan_interface.hpp b/vlan_interface.hpp
+index a994d05..37ae7ee 100644
+--- a/vlan_interface.hpp
++++ b/vlan_interface.hpp
+@@ -45,8 +45,8 @@ class VlanInterface : public VlanIface,
+ * @param[in] manager - network manager object.
+ */
+ VlanInterface(sdbusplus::bus::bus& bus, const std::string& objPath,
+- bool dhcpEnabled, uint32_t vlanID, EthernetInterface& intf,
+- Manager& manager);
++ DHCPConf dhcpEnabled, uint32_t vlanID,
++ EthernetInterface& intf, Manager& manager);
+
+ /** @brief Delete this d-bus object.
+ */
+--
+2.21.0
+
diff --git a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network_%.bbappend b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network_%.bbappend
index 1544c168c..db231d42f 100644
--- a/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-network/network/phosphor-network_%.bbappend
@@ -1,8 +1,9 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-DEPENDS += "nlohmann-json"
+DEPENDS += "nlohmann-json boost"
SRC_URI += "git://github.com/openbmc/phosphor-networkd"
SRC_URI += "file://0003-Adding-channel-specific-privilege-to-network.patch \
+ file://0001-Enhance-DHCP-beyond-just-OFF-and-IPv4-IPv6-enabled.patch \
"
SRCREV = "cb42fe26febc9e457a9c4279278bd8c85f60851a"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend
index 7819c90f6..60c9fdb67 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend
@@ -1,6 +1,6 @@
# this is here just to bump faster than upstream
SRC_URI = "git://github.com/openbmc/entity-manager.git"
-SRCREV = "978fcadadc8320ff5356ed1a5dc25e3284e3745f"
+SRCREV = "7d807754cc9153b04b599804464edd9654d7a81e"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync.bb
new file mode 100644
index 000000000..089aaf59f
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync.bb
@@ -0,0 +1,26 @@
+
+SUMMARY = "PCH BMC time service"
+DESCRIPTION = "This service will read date/time from PCH device periodically, and set the BMC system time accordingly"
+
+SRC_URI = "\
+ file://CMakeLists.txt \
+ file://pch-time-sync.cpp \
+ "
+PV = "0.1"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
+
+S = "${WORKDIR}"
+
+SYSTEMD_SERVICE_${PN} = "pch-time-sync.service"
+
+inherit cmake
+inherit obmc-phosphor-systemd
+
+DEPENDS += " \
+ sdbusplus \
+ phosphor-logging \
+ boost \
+ i2c-tools \
+ "
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/.clang-format b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/.clang-format
new file mode 100644
index 000000000..dd2770837
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/.clang-format
@@ -0,0 +1,98 @@
+---
+Language: Cpp
+# BasedOnStyle: LLVM
+AccessModifierOffset: -2
+AlignAfterOpenBracket: Align
+AlignConsecutiveAssignments: false
+AlignConsecutiveDeclarations: false
+AlignEscapedNewlinesLeft: false
+AlignOperands: true
+AlignTrailingComments: true
+AllowAllParametersOfDeclarationOnNextLine: true
+AllowShortBlocksOnASingleLine: false
+AllowShortCaseLabelsOnASingleLine: false
+AllowShortFunctionsOnASingleLine: None
+AllowShortIfStatementsOnASingleLine: false
+AllowShortLoopsOnASingleLine: false
+AlwaysBreakAfterDefinitionReturnType: None
+AlwaysBreakAfterReturnType: None
+AlwaysBreakBeforeMultilineStrings: false
+AlwaysBreakTemplateDeclarations: false
+BinPackArguments: true
+BinPackParameters: true
+BraceWrapping:
+ AfterClass: true
+ AfterControlStatement: true
+ AfterEnum: true
+ AfterFunction: true
+ AfterNamespace: true
+ AfterObjCDeclaration: true
+ AfterStruct: true
+ AfterUnion: true
+ BeforeCatch: true
+ BeforeElse: true
+ IndentBraces: false
+BreakBeforeBinaryOperators: None
+BreakBeforeBraces: Custom
+BreakBeforeTernaryOperators: true
+BreakConstructorInitializers: AfterColon
+ColumnLimit: 80
+CommentPragmas: '^ IWYU pragma:'
+ConstructorInitializerAllOnOneLineOrOnePerLine: false
+ConstructorInitializerIndentWidth: 4
+ContinuationIndentWidth: 4
+Cpp11BracedListStyle: true
+DerivePointerAlignment: true
+PointerAlignment: Left
+DisableFormat: false
+ExperimentalAutoDetectBinPacking: false
+FixNamespaceComments: true
+ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
+IncludeBlocks: Regroup
+IncludeCategories:
+ - Regex: '^[<"](gtest|gmock)'
+ Priority: 5
+ - Regex: '^"config.h"'
+ Priority: -1
+ - Regex: '^".*\.hpp"'
+ Priority: 1
+ - Regex: '^<.*\.h>'
+ Priority: 2
+ - Regex: '^<.*'
+ Priority: 3
+ - Regex: '.*'
+ Priority: 4
+IndentCaseLabels: true
+IndentWidth: 4
+IndentWrappedFunctionNames: true
+KeepEmptyLinesAtTheStartOfBlocks: true
+MacroBlockBegin: ''
+MacroBlockEnd: ''
+MaxEmptyLinesToKeep: 1
+NamespaceIndentation: None
+ObjCBlockIndentWidth: 2
+ObjCSpaceAfterProperty: false
+ObjCSpaceBeforeProtocolList: true
+PenaltyBreakBeforeFirstCallParameter: 19
+PenaltyBreakComment: 300
+PenaltyBreakFirstLessLess: 120
+PenaltyBreakString: 1000
+PenaltyExcessCharacter: 1000000
+PenaltyReturnTypeOnItsOwnLine: 60
+PointerAlignment: Right
+ReflowComments: true
+SortIncludes: true
+SpaceAfterCStyleCast: false
+SpaceBeforeAssignmentOperators: true
+SpaceBeforeParens: ControlStatements
+SpaceInEmptyParentheses: false
+SpacesBeforeTrailingComments: 1
+SpacesInAngles: false
+SpacesInContainerLiterals: true
+SpacesInCStyleCastParentheses: false
+SpacesInParentheses: false
+SpacesInSquareBrackets: false
+Standard: Cpp11
+TabWidth: 4
+UseTab: Never
+...
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/CMakeLists.txt b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/CMakeLists.txt
new file mode 100644
index 000000000..a4cf8155f
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/CMakeLists.txt
@@ -0,0 +1,40 @@
+cmake_minimum_required (VERSION 3.5 FATAL_ERROR)
+project (pch-time-sync CXX)
+set (CMAKE_CXX_STANDARD 17)
+set (CMAKE_CXX_STANDARD_REQUIRED ON)
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
+set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-rtti")
+
+include_directories (${CMAKE_CURRENT_SOURCE_DIR})
+
+# boost support
+find_package (Boost REQUIRED)
+# pkg_check_modules(Boost boost REQUIRED)
+include_directories (${Boost_INCLUDE_DIRS})
+add_definitions (-DBOOST_ERROR_CODE_HEADER_ONLY)
+add_definitions (-DBOOST_SYSTEM_NO_DEPRECATED)
+add_definitions (-DBOOST_ALL_NO_LIB)
+add_definitions (-DBOOST_NO_RTTI)
+add_definitions (-DBOOST_NO_TYPEID)
+add_definitions (-DBOOST_ASIO_DISABLE_THREADS)
+
+# import sdbusplus
+find_package (PkgConfig REQUIRED)
+pkg_check_modules (SDBUSPLUSPLUS sdbusplus REQUIRED)
+include_directories (${SDBUSPLUSPLUS_INCLUDE_DIRS})
+link_directories (${SDBUSPLUSPLUS_LIBRARY_DIRS})
+
+# import phosphor-logging
+find_package (PkgConfig REQUIRED)
+pkg_check_modules (LOGGING phosphor-logging REQUIRED)
+include_directories (${LOGGING_INCLUDE_DIRS})
+link_directories (${LOGGING_LIBRARY_DIRS})
+
+add_executable (pch-time-sync pch-time-sync.cpp)
+
+target_link_libraries (${PROJECT_NAME} ${Boost_LIBRARIES})
+target_link_libraries (${PROJECT_NAME} ${SDBUSPLUSPLUS_LIBRARIES}
+ phosphor_logging)
+target_link_libraries (${PROJECT_NAME} i2c)
+
+install (TARGETS pch-time-sync DESTINATION bin)
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/cmake-format.json b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/cmake-format.json
new file mode 100644
index 000000000..583c255a3
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/cmake-format.json
@@ -0,0 +1,12 @@
+{
+ "enum_char": ".",
+ "line_ending": "unix",
+ "bullet_char": "*",
+ "max_subargs_per_line": 99,
+ "command_case": "lower",
+ "tab_size": 4,
+ "line_width": 80,
+ "separate_fn_name_with_space": true,
+ "dangle_parens": true,
+ "separate_ctrl_name_with_space": true
+} \ No newline at end of file
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.cpp b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.cpp
new file mode 100644
index 000000000..0c1014589
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.cpp
@@ -0,0 +1,265 @@
+/* Copyright 2019 Intel
+ *
+ * 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.
+ */
+
+#include <time.h>
+
+#include <boost/date_time/posix_time/posix_time.hpp>
+#include <chrono>
+#include <iostream>
+#include <phosphor-logging/log.hpp>
+#include <sdbusplus/asio/object_server.hpp>
+extern "C" {
+#include <i2c/smbus.h>
+#include <linux/i2c-dev.h>
+}
+
+static constexpr uint32_t syncIntervalNormalMS = 60000;
+static constexpr uint32_t syncIntervalFastMS = (syncIntervalNormalMS / 2);
+
+static uint32_t syncIntervalMS = syncIntervalNormalMS;
+
+// will update bmc time if the time difference beyond this value
+static constexpr uint8_t timeDiffAllowedSecond = 1;
+
+static inline uint8_t bcd2Decimal(uint8_t hex)
+{
+ uint8_t dec = ((hex & 0xF0) >> 4) * 10 + (hex & 0x0F);
+ return dec;
+}
+
+class I2CFile
+{
+ private:
+ int fd = -1;
+
+ public:
+ I2CFile(const int& i2cBus, const int& slaveAddr, const int& flags)
+ {
+ std::string i2cDev = "/dev/i2c-" + std::to_string(i2cBus);
+
+ fd = open(i2cDev.c_str(), flags);
+ if (fd < 0)
+ {
+ throw std::runtime_error("Unable to open i2c device.");
+ }
+
+ if (ioctl(fd, I2C_SLAVE_FORCE, slaveAddr) < 0)
+ {
+ close(fd);
+ fd = -1;
+ throw std::runtime_error("Unable to set i2c slave address.");
+ }
+ }
+
+ uint8_t i2cReadByteData(const uint8_t& offset)
+ {
+ int ret = i2c_smbus_read_byte_data(fd, offset);
+
+ if (ret < 0)
+ {
+ throw std::runtime_error("i2c read failed");
+ }
+ return static_cast<uint8_t>(ret);
+ }
+
+ ~I2CFile()
+ {
+ if (!(fd < 0))
+ {
+ close(fd);
+ }
+ }
+};
+
+class PCHSync
+{
+ private:
+ bool getPCHDate(uint8_t& year, uint8_t& month, uint8_t& day, uint8_t& hour,
+ uint8_t& minute, uint8_t& second)
+ {
+ try
+ {
+ constexpr uint8_t pchDevI2CBusNumber = 0x03;
+ constexpr uint8_t pchDevI2CSlaveAddress = 0x44;
+ constexpr uint8_t pchDevRegRTCYear = 0x0f;
+ constexpr uint8_t pchDevRegRTCMonth = 0x0e;
+ constexpr uint8_t pchDevRegRTCDay = 0x0d;
+ constexpr uint8_t pchDevRegRTCHour = 0x0b;
+ constexpr uint8_t pchDevRegRTCMinute = 0x0a;
+ constexpr uint8_t pchDevRegRTCSecond = 0x09;
+ I2CFile pchDev(pchDevI2CBusNumber, pchDevI2CSlaveAddress,
+ O_RDWR | O_CLOEXEC);
+ year = pchDev.i2cReadByteData(pchDevRegRTCYear);
+ year = bcd2Decimal(year);
+ if (year > 99)
+ {
+ return false;
+ }
+
+ month = pchDev.i2cReadByteData(pchDevRegRTCMonth);
+ month = bcd2Decimal(month);
+ if ((month < 1) || (month > 12))
+ {
+ return false;
+ }
+
+ day = pchDev.i2cReadByteData(pchDevRegRTCDay);
+ day = bcd2Decimal(day);
+ if ((day < 1) || (day > 31))
+ {
+ return false;
+ }
+
+ hour = pchDev.i2cReadByteData(pchDevRegRTCHour);
+ hour = bcd2Decimal(hour);
+ if (hour >= 24)
+ {
+ return false;
+ }
+
+ minute = pchDev.i2cReadByteData(pchDevRegRTCMinute);
+ minute = bcd2Decimal(minute);
+ if (minute >= 60)
+ {
+ return false;
+ }
+
+ second = pchDev.i2cReadByteData(pchDevRegRTCSecond);
+ second = bcd2Decimal(second);
+ if (second >= 60)
+ {
+ return false;
+ }
+ }
+ catch (const std::exception& e)
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ bool getSystemTime(time_t& timeSeconds)
+ {
+ struct timespec sTime = {0};
+ int ret = 0;
+
+ ret = clock_gettime(CLOCK_REALTIME, &sTime);
+
+ if (ret != 0)
+ {
+ return false;
+ }
+ timeSeconds = sTime.tv_sec;
+ return true;
+ }
+
+ bool setSystemTime(uint32_t timeSeconds)
+ {
+ struct timespec sTime = {0};
+ int ret = 0;
+
+ sTime.tv_sec = timeSeconds;
+ sTime.tv_nsec = 0;
+
+ ret = clock_settime(CLOCK_REALTIME, &sTime);
+
+ return (ret == 0);
+ }
+
+ bool updateBMCTime()
+ {
+ int ret = 0;
+ time_t BMCTimeSeconds = 0;
+ time_t PCHTimeSeconds = 0;
+ struct tm tm = {0};
+
+ // get PCH and system time
+ if (!getPCHDate(year, month, day, hour, minute, second))
+ {
+ return false;
+ };
+
+ if (!getSystemTime(BMCTimeSeconds))
+ {
+ return false;
+ }
+
+ std::string dateString =
+ "20" + std::to_string(year) + "-" + std::to_string(month) + "-" +
+ std::to_string(day) + " " + std::to_string(hour) + ":" +
+ std::to_string(minute) + ":" + std::to_string(second);
+
+ strptime(dateString.c_str(), "%Y-%m-%d %H:%M:%S", &tm);
+
+ PCHTimeSeconds = mktime(&tm);
+ if (PCHTimeSeconds == -1)
+ {
+ return false;
+ }
+
+ if (std::abs(PCHTimeSeconds - BMCTimeSeconds) > timeDiffAllowedSecond)
+ {
+ if (!setSystemTime(PCHTimeSeconds))
+ {
+ return false;
+ }
+ std::cout << "Update BMC time to " << dateString << std::endl;
+ }
+
+ return true;
+ }
+
+ void startSyncTimer()
+ {
+ if (updateBMCTime())
+ {
+ syncIntervalMS = syncIntervalNormalMS;
+ }
+ else
+ {
+ std::cout << "Update BMC time Fail" << std::endl;
+ syncIntervalMS = syncIntervalFastMS;
+ }
+
+ syncTimer->expires_after(std::chrono::milliseconds(syncIntervalMS));
+ syncTimer->async_wait(
+ [this](const boost::system::error_code& ec) { startSyncTimer(); });
+ }
+
+ std::unique_ptr<boost::asio::steady_timer> syncTimer;
+ uint8_t year, month, day, hour, minute, second;
+
+ public:
+ PCHSync(boost::asio::io_service& io)
+ {
+ syncTimer = std::make_unique<boost::asio::steady_timer>(io);
+ startSyncTimer();
+ }
+
+ ~PCHSync() = default;
+};
+
+int main(int argc, char** argv)
+{
+ boost::asio::io_service io;
+ PCHSync pchSyncer(io);
+
+ phosphor::logging::log<phosphor::logging::level::INFO>(
+ "Starting PCH time sync service");
+
+ io.run();
+ return 0;
+}
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.service b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.service
new file mode 100644
index 000000000..cf9c3053f
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=PCH BMC time sync service
+Conflicts=systemd-timesyncd.service
+
+[Service]
+Restart=always
+RestartSec=10
+ExecStart=/usr/bin/pch-time-sync
+StartLimitInterval=0
+Type=simple
+
+[Install]
+WantedBy=sysinit.target
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0001-Reapply-Enhance-DHCP-beyond-just-OFF-and-IPv4-IPv6-e.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0001-Reapply-Enhance-DHCP-beyond-just-OFF-and-IPv4-IPv6-e.patch
new file mode 100644
index 000000000..3344c27dd
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0001-Reapply-Enhance-DHCP-beyond-just-OFF-and-IPv4-IPv6-e.patch
@@ -0,0 +1,47 @@
+From 3789a98fda6e3cafd377b0f4fa1c0c40bb94297e Mon Sep 17 00:00:00 2001
+From: Johnathan Mantey <jonathanx.mantey@intel.com>
+Date: Wed, 20 Nov 2019 10:56:44 -0500
+Subject: [PATCH] Reapply: "Enhance DHCP beyond just OFF and IPv4/IPv6
+ enabled."
+
+DHCP is not a binary option. The network interface can have DHCP
+disabled, IPv4 only, IPv6 only, and IPv4/IPv6.
+
+Signed-off-by: Johnathan Mantey <jonathanx.mantey@intel.com>
+
+Reapplied ->
+Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
+Change-Id: I7654116aa3962de253225271190ce4a2fe229ce9
+---
+ .../Network/EthernetInterface.interface.yaml | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/xyz/openbmc_project/Network/EthernetInterface.interface.yaml b/xyz/openbmc_project/Network/EthernetInterface.interface.yaml
+index ee54145..56285ee 100644
+--- a/xyz/openbmc_project/Network/EthernetInterface.interface.yaml
++++ b/xyz/openbmc_project/Network/EthernetInterface.interface.yaml
+@@ -23,7 +23,7 @@ properties:
+ description: >
+ Domain names of the ethernet interface.
+ - name: DHCPEnabled
+- type: boolean
++ type: enum[self.DHCPConf]
+ description: >
+ Address mode of the ethernet interface.
+ - name: Nameservers
+@@ -69,4 +69,11 @@ enumerations:
+ - name: v4
+ - name: v6
+ - name: none
+-
++ - name: DHCPConf
++ description: >
++ A list of the permitted DHCP settings used by systemd.
++ values:
++ - name: both
++ - name: v4
++ - name: v6
++ - name: none
+--
+2.21.0
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0005-Add-DBUS-interface-of-CPU-and-Memory-s-properties.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0005-Add-DBUS-interface-of-CPU-and-Memory-s-properties.patch
index 7568f8ce9..4cfc4acc8 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0005-Add-DBUS-interface-of-CPU-and-Memory-s-properties.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0005-Add-DBUS-interface-of-CPU-and-Memory-s-properties.patch
@@ -1,15 +1,14 @@
From a30a09f58b9ebfb267c0b9cce9ae25994ea025ca Mon Sep 17 00:00:00 2001
From: cyang29 <cheng.c.yang@intel.com>
Date: Tue, 17 Jul 2018 16:04:58 +0800
-Subject: [PATCH] Add DBUS interface of CPU and Memory's properties Feature
- Support: SMBIOS service interface. CPU DIMM information redfish
+Subject: [PATCH] Add DBUS interface of CPU properties Feature
+ Support: SMBIOS service interface. CPU information redfish
interface. Base on smbios spec DSP0134_3.0.0
Signed-off-by: cyang29 <cheng.c.yang@intel.com>
---
.../Inventory/Item/Cpu.interface.yaml | 41 +++++++++++++++++++
- .../Inventory/Item/Dimm.interface.yaml | 46 +++++++++++++++++++++-
- 2 files changed, 86 insertions(+), 1 deletion(-)
+ 1 files changed, 41 insertions(+)
diff --git a/xyz/openbmc_project/Inventory/Item/Cpu.interface.yaml b/xyz/openbmc_project/Inventory/Item/Cpu.interface.yaml
index ab29cf3..313eada 100644
@@ -61,60 +60,6 @@ index ab29cf3..313eada 100644
+ The Count of Thread CPU Can Support
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
-diff --git a/xyz/openbmc_project/Inventory/Item/Dimm.interface.yaml b/xyz/openbmc_project/Inventory/Item/Dimm.interface.yaml
-index d85326d..b750320 100644
---- a/xyz/openbmc_project/Inventory/Item/Dimm.interface.yaml
-+++ b/xyz/openbmc_project/Inventory/Item/Dimm.interface.yaml
-@@ -1,4 +1,48 @@
- description: >
- Implement to provide DIMM attributes.
--
-+properties:
-+ - name: MemoryDataWidth
-+ type: uint16
-+ description: >
-+ Data width of Memory.
-+ - name: MemorySizeInKB
-+ type: uint32
-+ description: >
-+ Memory size of DIMM in Kilobyte.
-+ - name: MemoryDeviceLocator
-+ type: string
-+ description: >
-+ Socket on base board where Memory located.
-+ - name: MemoryType
-+ type: string
-+ description: >
-+ Type of memory.
-+ - name: MemoryTypeDetail
-+ type: string
-+ description: >
-+ Additional detail on Memory.
-+ - name: MemorySpeed
-+ type: uint16
-+ description: >
-+ The maximun capable speed of Memory.
-+ - name: MemoryManufacturer
-+ type: string
-+ description: >
-+ Manufacturer of memory.
-+ - name: MemorySerialNum
-+ type: string
-+ description: >
-+ Memory Serial Number.
-+ - name: MemoryPartNum
-+ type: string
-+ description: >
-+ Memory Part Number.
-+ - name: MemoryAttributes
-+ type: byte
-+ description: >
-+ Rank attributes of Memory.
-+ - name: MemoryConfClockSpeed
-+ type: uint16
-+ description: >
-+ Configured clock speed to Memory.
- # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
--
2.16.2
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
index c306e5afc..f21845ce6 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
@@ -1,6 +1,5 @@
-# todo Johnathan, undo nobranch once phosphor-networking is working
-SRC_URI = "git://github.com/openbmc/phosphor-dbus-interfaces.git;nobranch=1"
-SRCREV = "9cb4a711cff999b373cf98b44cc18b9001c1395a"
+SRC_URI = "git://github.com/openbmc/phosphor-dbus-interfaces.git"
+SRCREV = "4610bace070eb17c6e4ee015210dac44284c53a7"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
@@ -13,4 +12,5 @@ SRC_URI += "file://0005-Add-DBUS-interface-of-CPU-and-Memory-s-properties.patch
file://0022-Add-chassis-power-cycle-and-reset-to-Chassis-State.patch \
file://0024-Add-the-pre-timeout-interrupt-defined-in-IPMI-spec.patch \
file://0025-Add-PreInterruptFlag-properity-in-DBUS.patch \
+ file://0001-Reapply-Enhance-DHCP-beyond-just-OFF-and-IPv4-IPv6-e.patch \
"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend
index 842d89f03..cbd8e1171 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend
@@ -5,6 +5,6 @@ SYSTEMD_SERVICE_${PN} = "phosphor-pid-control.service"
EXTRA_OECONF = "--enable-configure-dbus=yes"
SRC_URI = "git://github.com/openbmc/phosphor-pid-control.git"
-SRCREV = "6b9f59991b7f694866c98775b4179ae97c5e69a8"
+SRCREV = "3660b3888af789266b6c84714b4e161a32e6ea54"
FILES_${PN} = "${bindir}/swampd ${bindir}/setsensor"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru/checkFru.sh b/meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru/checkFru.sh
index 908e4b51e..9f22b179e 100755
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru/checkFru.sh
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru/checkFru.sh
@@ -26,11 +26,20 @@ if grep -q 'CPU part\s*: 0xb76' /proc/cpuinfo; then
case $BOARD_ID in
12) NAME="D50TNP1SB";;
40) NAME="CooperCity";;
+ 42) NAME="WilsonCity";;
45) NAME="WilsonCity";;
60) NAME="M50CYP2SB2U";;
62) NAME="WilsonPoint";;
*) NAME="S2600WFT";;
esac
+
+elif grep -q 'CPU part\s*: 0xc07' /proc/cpuinfo; then
+ # AST2600
+ case $BOARD_ID in
+ 62) NAME="ArcherCity";;
+ *) NAME="AST2600EVB";;
+ esac
+
fi
if [ -z "$NAME" ]; then
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend
index 53b5b50c1..93e684cd7 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend
@@ -1,5 +1,5 @@
SRC_URI = "git://github.com/openbmc/bmcweb.git"
-SRCREV = "c45f00821add8cd29cbd148d4b4b9f6e988665cf"
+SRCREV = "274dfe625f862e8ded2d4eb88dd856cf66bf54bf"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
@@ -17,4 +17,7 @@ EXTRA_OECMAKE += "-DBMCWEB_ENABLE_REDFISH_RAW_PECI=ON"
EXTRA_OECMAKE += "-DBMCWEB_ENABLE_REDFISH_BMC_JOURNAL=ON"
# Enable PFR support
-EXTRA_OECMAKE += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', '-DBMCWEB_ENABLE_REDFISH_PFR_FEATURE=ON', '', d)}"
+EXTRA_OECMAKE += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', '-DBMCWEB_ENABLE_REDFISH_PROVISIONING_FEATURE=ON', '', d)}"
+
+#Disable the Dbus interface
+EXTRA_OECMAKE += "-DBMCWEB_ENABLE_DBUS_REST=OFF"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
index dc9c2ce20..b02595e81 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
@@ -1,6 +1,6 @@
{
"0" : {
- "name" : "IPMB",
+ "name" : "Ipmb",
"is_valid" : true,
"active_sessions" : 0,
"channel_info" : {
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Modify-Get-Lan-Configuration-IP-Address-Source-to-us.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Modify-Get-Lan-Configuration-IP-Address-Source-to-us.patch
new file mode 100644
index 000000000..1e4d3b0a9
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Modify-Get-Lan-Configuration-IP-Address-Source-to-us.patch
@@ -0,0 +1,201 @@
+From 3db78afe49a662ce7e90f3f5ce40d625a54d576b Mon Sep 17 00:00:00 2001
+From: Johnathan Mantey <johnathanx.mantey@intel.com>
+Date: Thu, 14 Nov 2019 11:24:19 -0800
+Subject: [PATCH] Modify Get Lan Configuration IP Address Source to use correct
+ DBus DHCPEnabled type
+
+The Get/Set Lan Configuration "IP Address Source" subcommand got
+broken by phosphor-dbus-interfaces commit 12162be
+
+12162be changed the DBus DHCPEnabled type from boolean to enum
+type. The Get LAN Configuration IP address Source IPMI command did not
+get changed to an enum type prior to 12162be being merged. This commit
+retroactively updates the boolean type to enum type.
+
+Tested:
+
+ipmitool raw 0xc 2 3 4 0 0 # returns correct state
+ipmitool raw 0xc 1 3 4 1 # changes DCHP to Static
+ipmitool raw 0xc 1 3 4 2 # returns Static to DHCP
+
+Assigned a static address via Redfish and tested using:
+ipmitool raw 0xc 2 3 4 0 0 # returns correct state
+
+Returned the NIC to use DHCP via Redfish and tested using:
+ipmitool raw 0xc 2 3 4 0 0 # returns correct state
+
+Change-Id: Ia66f7fcf3d5ad0a383b06658b18e8ce2b282e052
+Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
+---
+ transporthandler.cpp | 88 ++++++++++++++++++++++++++++++++++++--------
+ 1 file changed, 73 insertions(+), 15 deletions(-)
+
+diff --git a/transporthandler.cpp b/transporthandler.cpp
+index 09df184..8dc5677 100644
+--- a/transporthandler.cpp
++++ b/transporthandler.cpp
+@@ -109,6 +109,18 @@ constexpr auto INTF_NEIGHBOR_CREATE_STATIC =
+ constexpr auto INTF_VLAN = "xyz.openbmc_project.Network.VLAN";
+ constexpr auto INTF_VLAN_CREATE = "xyz.openbmc_project.Network.VLAN.Create";
+
++static const char* dhcpv4v6 =
++ "xyz.openbmc_project.Network.EthernetInterface.DHCPConf.both";
++static const char* dhcpv6 =
++ "xyz.openbmc_project.Network.EthernetInterface.DHCPConf.v6";
++static const char* dhcpv4 =
++ "xyz.openbmc_project.Network.EthernetInterface.DHCPConf.v4";
++static const char* dhcpoff =
++ "xyz.openbmc_project.Network.EthernetInterface.DHCPConf.none";
++
++static std::array<const char*, 4> dhcpEnumerations = {dhcpv4v6, dhcpv4, dhcpv6,
++ dhcpoff};
++
+ /** @brief Generic paramters for different address families */
+ template <int family>
+ struct AddrFamily
+@@ -456,25 +468,63 @@ auto channelCall(uint8_t channel, Args&&... args)
+ *
+ * @param[in] bus - The bus object used for lookups
+ * @param[in] params - The parameters for the channel
+- * @return True if DHCP is enabled, false otherwise
++ * @return string containing an enumerated value
++ * constexpr's dhcpv4v6, dhcpv4, dhcpv6, and dhcpoff
+ */
+-bool getDHCPProperty(sdbusplus::bus::bus& bus, const ChannelParams& params)
++std::string getDHCPProperty(sdbusplus::bus::bus& bus,
++ const ChannelParams& params)
+ {
+- return std::get<bool>(getDbusProperty(
++ return std::get<std::string>(getDbusProperty(
+ bus, params.service, params.logicalPath, INTF_ETHERNET, "DHCPEnabled"));
+ }
+
+ /** @brief Sets the system value for DHCP on the given interface
+ *
+- * @param[in] bus - The bus object used for lookups
+- * @param[in] params - The parameters for the channel
+- * @param[in] on - Whether or not to enable DHCP
++ * @param[in] bus - The bus object used for lookups
++ * @param[in] params - The parameters for the channel
++ * @param[in] setting - DHCP state to assign (none, v4, v6, both)
+ */
+ void setDHCPProperty(sdbusplus::bus::bus& bus, const ChannelParams& params,
+- bool on)
++ const std::string& setting)
+ {
++ auto it = dhcpEnumerations.begin();
++ while (it != dhcpEnumerations.end())
++ {
++ if (*it == setting)
++ {
++ break;
++ }
++ it++;
++ }
++ if (it == dhcpEnumerations.end())
++ {
++ log<level::ERR>("Invalid DHCP setting.",
++ entry("Requested DHCP mode=%s", setting.c_str()));
++ elog<InternalFailure>();
++ }
++
++ std::string dhcp = getDHCPProperty(bus, params);
++ std::string nextDhcp{};
++
++ if (((dhcp == dhcpv4) && (setting == dhcpv6)) ||
++ ((dhcp == dhcpv6) && (setting == dhcpv4)))
++ {
++ // DHCP is enabled independently for IPv4 and IPv6. If IPv4
++ // DHCP is enabled, and a request to add IPv6 is received,
++ // change the DHCPEnabled enum to "both" active. The same
++ // logic is applied if IPV6 is already enabled, and an IPv4
++ // enable request is made.
++ nextDhcp = dhcpv4v6;
++ }
++ else
++ {
++ // "both" enabled -> ipv4 only
++ // "both" enabled -> ipv6 only
++ // "ip4v", "ipv6", or "both" enabled -> no DHCP
++ nextDhcp = setting;
++ }
+ setDbusProperty(bus, params.service, params.logicalPath, INTF_ETHERNET,
+- "DHCPEnabled", on);
++ "DHCPEnabled", nextDhcp);
+ }
+
+ /** @brief Converts a human readable MAC string into MAC bytes
+@@ -1113,7 +1163,7 @@ void deconfigureChannel(sdbusplus::bus::bus& bus, ChannelParams& params)
+ }
+
+ // Clear out any settings on the lower physical interface
+- setDHCPProperty(bus, params, false);
++ setDHCPProperty(bus, params, dhcpoff);
+ }
+
+ /** @brief Creates a new VLAN on the specified interface
+@@ -1395,7 +1445,11 @@ RspType<> setLan(uint4_t channelBits, uint4_t, uint8_t parameter,
+ {
+ case IPSrc::DHCP:
+ {
+- channelCall<setDHCPProperty>(channel, true);
++ // The IPSrc IPMI command is only for IPv4
++ // management. Modifying IPv6 state is done using
++ // a completely different Set LAN Configuration
++ // subcommand.
++ channelCall<setDHCPProperty>(channel, dhcpv4);
+ return responseSuccess();
+ }
+ case IPSrc::Unspecified:
+@@ -1403,7 +1457,7 @@ RspType<> setLan(uint4_t channelBits, uint4_t, uint8_t parameter,
+ case IPSrc::BIOS:
+ case IPSrc::BMC:
+ {
+- channelCall<setDHCPProperty>(channel, false);
++ channelCall<setDHCPProperty>(channel, dhcpoff);
+ return responseSuccess();
+ }
+ }
+@@ -1540,7 +1594,8 @@ RspType<> setLan(uint4_t channelBits, uint4_t, uint8_t parameter,
+ return responseReqDataLenInvalid();
+ }
+ std::bitset<8> expected;
+- if (channelCall<getDHCPProperty>(channel))
++ std::string dhcp = channelCall<getDHCPProperty>(channel);
++ if ((dhcp == dhcpv4v6) | (dhcp == dhcpv6))
+ {
+ expected[IPv6RouterControlFlag::Dynamic] = 1;
+ }
+@@ -1690,7 +1745,8 @@ RspType<message::Payload> getLan(uint4_t channelBits, uint3_t, bool revOnly,
+ case LanParam::IPSrc:
+ {
+ auto src = IPSrc::Static;
+- if (channelCall<getDHCPProperty>(channel))
++ std::string dhcpSetting = channelCall<getDHCPProperty>(channel);
++ if ((dhcpSetting == dhcpv4) || (dhcpSetting == dhcpv4v6))
+ {
+ src = IPSrc::DHCP;
+ }
+@@ -1811,7 +1867,8 @@ RspType<message::Payload> getLan(uint4_t channelBits, uint3_t, bool revOnly,
+ case LanParam::IPv6RouterControl:
+ {
+ std::bitset<8> control;
+- if (channelCall<getDHCPProperty>(channel))
++ std::string dhcp = channelCall<getDHCPProperty>(channel);
++ if ((dhcp == dhcpv4v6) || (dhcp == dhcpv6))
+ {
+ control[IPv6RouterControlFlag::Dynamic] = 1;
+ }
+@@ -1825,7 +1882,8 @@ RspType<message::Payload> getLan(uint4_t channelBits, uint3_t, bool revOnly,
+ case LanParam::IPv6StaticRouter1IP:
+ {
+ in6_addr gateway{};
+- if (!channelCall<getDHCPProperty>(channel))
++ std::string dhcp = channelCall<getDHCPProperty>(channel);
++ if ((dhcp == dhcpv4) || (dhcp == dhcpoff))
+ {
+ gateway =
+ channelCall<getGatewayProperty<AF_INET6>>(channel).value_or(
+--
+2.21.0
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0013-ipmi-add-set-bios-id-to-whitelist.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0013-ipmi-add-set-bios-id-to-whitelist.patch
deleted file mode 100644
index 396d2e949..000000000
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0013-ipmi-add-set-bios-id-to-whitelist.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From ad7276f3aedb6f5aed315db57406c98f2bf71a09 Mon Sep 17 00:00:00 2001
-From: "Jia, Chunhui" <chunhui.jia@intel.com>
-Date: Tue, 24 Jul 2018 13:21:52 +0800
-Subject: [PATCH] [ipmi] add set bios id to whitelist
-
-Add "SetBIOSId" and "GetDeviceInfo" 2 OEM commands into whitelist
-
-Signed-off-by: Jia, Chunhui <chunhui.jia@intel.com>
----
- host-ipmid-whitelist.conf | 2 ++
- 1 file changed, 2 insertions(+)
-
-Index: phosphor-host-ipmid/host-ipmid-whitelist.conf
-===================================================================
---- phosphor-host-ipmid.orig/host-ipmid-whitelist.conf
-+++ phosphor-host-ipmid/host-ipmid-whitelist.conf
-@@ -47,3 +47,5 @@
- 0x2C:0x06 //<Group Extension>:<Get Asset Tag>
- 0x2C:0x07 //<Group Extension>:<Get Sensor Info>
- 0x2C:0x10 //<Group Extension>:<Get Temperature Readings>
-+0x30:0x26 //<OEM>:<Set BIOS ID>
-+0x30:0x27 //<OEM>:<Get Device Info>
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0039-ipmi-add-oem-command-get-AIC-FRU-to-whitelist.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0039-ipmi-add-oem-command-get-AIC-FRU-to-whitelist.patch
deleted file mode 100644
index fdaa91085..000000000
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0039-ipmi-add-oem-command-get-AIC-FRU-to-whitelist.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From cf466ba2c66a95825ae0014d7c378ad63b050d2f Mon Sep 17 00:00:00 2001
-From: "Jia, Chunhui" <chunhui.jia@intel.com>
-Date: Wed, 15 Aug 2018 14:50:04 +0800
-Subject: [PATCH] [ipmi] add oem command "get AIC FRU" to whitelist
-
-Intel BIOS requires this oem command to get addon card FRU info.
-Add to whitelist to unblock.
-
-Signed-off-by: Jia, Chunhui <chunhui.jia@intel.com>
----
- host-ipmid-whitelist.conf | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/host-ipmid-whitelist.conf b/host-ipmid-whitelist.conf
-index db54a49..49746a2 100644
---- a/host-ipmid-whitelist.conf
-+++ b/host-ipmid-whitelist.conf
-@@ -43,3 +43,4 @@
- 0x30:0x41 //<OEM>:<Set System GUID>
- 0x30:0x26 //<OEM>:<Set BIOS ID>
- 0x30:0x27 //<OEM>:<Get Device Info>
-+0x30:0x31 //<OEM>:<Get AIC card FRU>
---
-2.16.2
-
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0050-enable-6-oem-commands.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0050-enable-6-oem-commands.patch
deleted file mode 100644
index b800632cc..000000000
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0050-enable-6-oem-commands.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/host-ipmid-whitelist.conf b/host-ipmid-whitelist.conf
-index 22a2a3c..5d71698 100644
---- a/host-ipmid-whitelist.conf
-+++ b/host-ipmid-whitelist.conf
-@@ -49,3 +49,10 @@
- 0x30:0x26 //<OEM>:<Set BIOS ID>
- 0x30:0x27 //<OEM>:<Get Device Info>
- 0x30:0x31 //<OEM>:<Get AIC card FRU>
-+0x30:0x54 //<OEM>:<Set Power Restore Delay>
-+0x30:0x55 //<OEM>:<Get Power Restore Delay>
-+0x30:0x9A //<OEM>:<Get Processor Error Config>
-+0x30:0x9B //<OEM>:<Set Processor Error Config>
-+0x30:0xB0 //<OEM>:<Get LED Status>
-+0x30:0xE9 //<OEM>:<Get BIOS Post Codes>
-+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0056-add-SetInProgress-to-get-set-boot-option-cmd.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0056-add-SetInProgress-to-get-set-boot-option-cmd.patch
index 3a77887a0..987e61448 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0056-add-SetInProgress-to-get-set-boot-option-cmd.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0056-add-SetInProgress-to-get-set-boot-option-cmd.patch
@@ -1,4 +1,4 @@
-From 949db3a985719335d3df77db368eb2b296756749 Mon Sep 17 00:00:00 2001
+From f9f260391f099b4e67999f9d4ca05cbf9b422baf Mon Sep 17 00:00:00 2001
From: "Jia, chunhui" <chunhui.jia@linux.intel.com>
Date: Tue, 19 Mar 2019 16:09:06 +0800
Subject: [PATCH] add SetInProgress to get/set boot option cmd
@@ -9,16 +9,17 @@ option flow.
Change-Id: Ibb0501ea5bc36c4f1f72339efef03724dd4e613f
Signed-off-by: Jia, chunhui <chunhui.jia@linux.intel.com>
+Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
---
- chassishandler.cpp | 26 +++++++++++++++++++++++++-
+ chassishandler.cpp | 28 +++++++++++++++++++++++++++-
chassishandler.hpp | 3 +++
- 2 files changed, 28 insertions(+), 1 deletion(-)
+ 2 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/chassishandler.cpp b/chassishandler.cpp
-index 6d14d1b..553afa8 100644
+index 305897b..ee23845 100644
--- a/chassishandler.cpp
+++ b/chassishandler.cpp
-@@ -1351,6 +1351,10 @@ static ipmi_ret_t setBootMode(const Mode::Modes& mode)
+@@ -1399,6 +1399,10 @@ static ipmi_ret_t setBootMode(const Mode::Modes& mode)
return IPMI_CC_OK;
}
@@ -29,7 +30,7 @@ index 6d14d1b..553afa8 100644
ipmi_ret_t ipmi_chassis_get_sys_boot_options(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
ipmi_request_t request,
ipmi_response_t response,
-@@ -1365,11 +1369,21 @@ ipmi_ret_t ipmi_chassis_get_sys_boot_options(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
+@@ -1413,11 +1417,21 @@ ipmi_ret_t ipmi_chassis_get_sys_boot_options(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
get_sys_boot_options_t* reqptr = (get_sys_boot_options_t*)request;
IpmiValue bootOption = ipmiDefault;
@@ -52,14 +53,16 @@ index 6d14d1b..553afa8 100644
/*
* Parameter #5 means boot flags. Please refer to 28.13 of ipmi doc.
* This is the only parameter used by petitboot.
-@@ -1505,6 +1519,16 @@ ipmi_ret_t ipmi_chassis_set_sys_boot_options(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
+@@ -1553,6 +1567,18 @@ ipmi_ret_t ipmi_chassis_set_sys_boot_options(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
// This IPMI command does not have any resposne data
*data_len = 0;
+ if (reqptr->parameter ==
+ static_cast<uint8_t>(BootOptionParameter::SET_IN_PROGRESS))
+ {
-+ if (transferStatus == setInProgress) {
++ if ((transferStatus == setInProgress) &&
++ (reqptr->data[0] != setComplete))
++ {
+ return IPMI_CC_FAIL_SET_IN_PROGRESS;
+ }
+ transferStatus = reqptr->data[0];
@@ -70,10 +73,10 @@ index 6d14d1b..553afa8 100644
* Parameter #5 means boot flags. Please refer to 28.13 of ipmi doc.
* This is the only parameter used by petitboot.
diff --git a/chassishandler.hpp b/chassishandler.hpp
-index 2c42b11..6a24507 100644
+index dcaf06c..353a929 100644
--- a/chassishandler.hpp
+++ b/chassishandler.hpp
-@@ -28,6 +28,7 @@ enum ipmi_chassis_return_codes
+@@ -25,6 +25,7 @@ enum ipmi_chassis_return_codes
{
IPMI_OK = 0x0,
IPMI_CC_PARM_NOT_SUPPORTED = 0x80,
@@ -81,7 +84,7 @@ index 2c42b11..6a24507 100644
};
// Generic completion codes,
-@@ -49,6 +50,7 @@ enum ipmi_chassis_control_cmds : uint8_t
+@@ -46,6 +47,7 @@ enum ipmi_chassis_control_cmds : uint8_t
};
enum class BootOptionParameter : size_t
{
@@ -89,7 +92,7 @@ index 2c42b11..6a24507 100644
BOOT_INFO = 0x4,
BOOT_FLAGS = 0x5,
OPAL_NETWORK_SETTINGS = 0x61
-@@ -56,6 +58,7 @@ enum class BootOptionParameter : size_t
+@@ -53,6 +55,7 @@ enum class BootOptionParameter : size_t
enum class BootOptionResponseSize : size_t
{
@@ -98,5 +101,5 @@ index 2c42b11..6a24507 100644
OPAL_NETWORK_SETTINGS = 50
};
--
-2.16.2
+2.7.4
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0059-Move-Set-SOL-config-parameter-to-host-ipmid.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0059-Move-Set-SOL-config-parameter-to-host-ipmid.patch
index 2dad2fc16..0d1a5abbb 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0059-Move-Set-SOL-config-parameter-to-host-ipmid.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0059-Move-Set-SOL-config-parameter-to-host-ipmid.patch
@@ -42,7 +42,7 @@ diff --git a/transporthandler.cpp b/transporthandler.cpp
index e88eb63..4a42e7b 100644
--- a/transporthandler.cpp
+++ b/transporthandler.cpp
-@@ -1168,8 +1168,323 @@ RspType<message::Payload> getLan(uint4_t channelBits, uint3_t, bool revOnly,
+@@ -1469,8 +1469,323 @@ RspType<message::Payload> getLan(uint4_t channelBits, uint3_t, bool revOnly,
} // namespace transport
} // namespace ipmi
@@ -366,10 +366,10 @@ index e88eb63..4a42e7b 100644
void register_netfn_transport_functions()
{
ipmi::registerHandler(ipmi::prioOpenBmcBase, ipmi::netFnTransport,
-@@ -1178,4 +1493,11 @@ void register_netfn_transport_functions()
+@@ -1479,4 +1794,11 @@ void register_netfn_transport_functions()
ipmi::registerHandler(ipmi::prioOpenBmcBase, ipmi::netFnTransport,
ipmi::transport::cmdGetLanConfigParameters,
- ipmi::Privilege::Admin, ipmi::transport::getLan);
+ ipmi::Privilege::Operator, ipmi::transport::getLan);
+
+ ipmi::registerHandler(ipmi::prioOpenBmcBase, ipmi::netFnTransport,
+ ipmi::transport::cmdSetSolConfigParameters,
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch
index f29111758..6c61e0995 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch
@@ -1,4 +1,4 @@
-From 00fb92edcb4229eeb5b46c4eb206ba7d70e241fc Mon Sep 17 00:00:00 2001
+From 959030b7ee71a7b23d1c081a0aadaa4eedbc0f63 Mon Sep 17 00:00:00 2001
From: "Jason M. Bills" <jason.m.bills@linux.intel.com>
Date: Mon, 3 Jun 2019 17:01:47 -0700
Subject: [PATCH] Update IPMI Chassis Control command
@@ -19,11 +19,11 @@ ipmitool power soft: soft power-off requested from system software
Change-Id: Ic9fba3ca4abd9a758eb88f1e6ee09f7ca64ff80a
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
---
- chassishandler.cpp | 206 ++++++++++++++---------------------------------------
- 1 file changed, 52 insertions(+), 154 deletions(-)
+ chassishandler.cpp | 205 +++++++++++++----------------------------------------
+ 1 file changed, 50 insertions(+), 155 deletions(-)
diff --git a/chassishandler.cpp b/chassishandler.cpp
-index 88bf84b..ad564e2 100644
+index 053f29a..53b25b8 100644
--- a/chassishandler.cpp
+++ b/chassishandler.cpp
@@ -31,6 +31,7 @@
@@ -34,7 +34,7 @@ index 88bf84b..ad564e2 100644
#include <xyz/openbmc_project/State/Host/server.hpp>
#include <xyz/openbmc_project/State/PowerOnHours/server.hpp>
-@@ -712,59 +713,63 @@ ipmi_ret_t ipmi_set_chassis_cap(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
+@@ -712,59 +713,63 @@ ipmi::RspType<> ipmiSetChassisCap(bool intrusion, bool fpLockout,
//------------------------------------------
// Calls into Host State Manager Dbus object
//------------------------------------------
@@ -133,8 +133,8 @@ index 88bf84b..ad564e2 100644
+ return 0;
}
- namespace power_policy
-@@ -1033,76 +1038,6 @@ ipmi::RspType<bool, // Power is on
+ //------------------------------------------
+@@ -1065,76 +1070,6 @@ ipmi::RspType<bool, // Power is on
diagButtonDisableAllow, sleepButtonDisableAllow);
}
@@ -211,7 +211,7 @@ index 88bf84b..ad564e2 100644
/** @brief Implementation of chassis control command
*
* @param - chassisControl command byte
-@@ -1115,61 +1050,24 @@ ipmi::RspType<> ipmiChassisControl(uint8_t chassisControl)
+@@ -1147,63 +1082,23 @@ ipmi::RspType<> ipmiChassisControl(uint8_t chassisControl)
switch (chassisControl)
{
case CMD_POWER_ON:
@@ -279,11 +279,11 @@ index 88bf84b..ad564e2 100644
- // Request Host State Manager to do a soft power off
- rc = initiate_state_transition(State::Host::Transition::Off);
+ rc = initiateHostStateTransition(State::Host::Transition::Off);
-+ break;
-+ case CMD_PULSE_DIAGNOSTIC_INTR:
break;
-
- default:
+-
+ case CMD_PULSE_DIAGNOSTIC_INTR:
+ rc = setNmiProperty(true);
+ break;
--
2.7.4
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Enable-watchdog-to-save-useflag-after-host-power-off.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Enable-watchdog-to-save-useflag-after-host-power-off.patch
deleted file mode 100644
index 523a3e1a9..000000000
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Enable-watchdog-to-save-useflag-after-host-power-off.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From c82162866be3c236ed73c6a19b9a0bb3097718ae Mon Sep 17 00:00:00 2001
-From: Yong Li <yong.b.li@linux.intel.com>
-Date: Sat, 12 Oct 2019 12:23:24 +0800
-Subject: [PATCH] Enable watchdog to save useflag after host power off
-
-Get the right useflag after host power off.
-
-Tested:
-Set a watchdog (Timer action is none and Time Use is BIOS FRB2)
-ipmitool raw 0x06 0x24 0x01 0x00 0x00 0x00 0x40 0x00
-Get watchdog
-ipmitool mc watchdog get
-Start watchdog
-ipmitool mc watchdog reset
-Get watchdog
-ipmitool mc watchdog get
-After timer is stop, set a watchdog again
-(Timer action is none and Time Use is BIOS/POST)
-ipmitool raw 0x06 0x24 0x02 0x00 0x00 0x00 0x40 0x00
-Start watchdog and wait until timer is stop,
-Get watchdog
-ipmitool mc watchdog get
-Timer Expiration Flags should be 0x06(BIOS FRB2, BIOS/POST)
-Power down the Host
-Ipmitool chassis power off
-Check the Timer Expiration Flags(User Flags)
-ipmitool mc watchdog get
-Timer Expiration Flags should be 0x06(BIOS FRB2, BIOS/POST)
-
-Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
----
- app/watchdog.cpp | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/app/watchdog.cpp b/app/watchdog.cpp
-index c64a92f..2ff9ee9 100644
---- a/app/watchdog.cpp
-+++ b/app/watchdog.cpp
-@@ -437,22 +437,20 @@ ipmi::RspType<uint3_t, // timerUse - timer use
- wdTimerUseToIpmiTimerUse(wd_prop.expiredTimerUse));
- }
-
-+ expireFlags = timerUseExpirationFlags;
- if (wd_prop.enabled)
- {
- presentCountdown = htole16(wd_prop.timeRemaining / 100);
-- expireFlags = 0;
- }
- else
- {
- if (wd_prop.expiredTimerUse == WatchdogService::TimerUse::Reserved)
- {
- presentCountdown = initialCountdown;
-- expireFlags = 0;
- }
- else
- {
- presentCountdown = 0;
-- expireFlags = timerUseExpirationFlags;
- // Automatically clear it whenever a timer expiration occurs.
- timerNotLogFlags = false;
- }
---
-2.7.4
-
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/host-ipmid-whitelist.conf b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/host-ipmid-whitelist.conf
index f3218d8d8..268e12848 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/host-ipmid-whitelist.conf
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/host-ipmid-whitelist.conf
@@ -81,6 +81,7 @@
0x0C:0x02 //<Transport>:<Get LAN Configuration Parameters>
0x0C:0x04 //<Transport>:<Get IPUDPRMCP Statistics>
0x0C:0x11 //<Transport>:<Get Serial Modem Configuration>
+0x0C:0x21 //<Transport>:<Set SOL Configuration Parameters>
0x0C:0x22 //<Transport>:<Get SOL Configuration Parameters>
0x2C:0x1F //<Group Extension>:<Get CPU PECI Package Config Data>
0x2C:0x20 //<Group Extension>:<Get MDR Data Region Status>
@@ -117,6 +118,8 @@
0x30:0x43 //<Intel General Application>:<Get BMC Reset Disables>
0x30:0x44 //<Intel General Application>:<Send Embedded Firmware Update Status>
0x30:0x47 //<Intel General Application>:<HSBP Get Version>
+0x30:0x54 //<Intel General Application>:<Set Power Restore Delay>
+0x30:0x55 //<Intel General Application>:<Get Power Restore Delay>
0x30:0x55 //<Intel General Application>:<Get Power Restore Delay>
0x30:0x58 //<Intel General Application>:<Get DIMM Fault Status>
0x30:0x62 //<Intel General Application>:<Get Shutdown Policy>
@@ -141,6 +144,7 @@
0x30:0x94 //<Intel General Application>:<Get BMC Revision ID>
0x30:0x95 //<Intel General Application>:<Get Is AP CPU>
0x30:0x9A //<Intel General Application>:<Get Processor Error Configuration and Status>
+0x30:0x9B //<Intel General Application>:<Set Processor Error Config>
0x30:0x9D //<Intel General Application>:<Get Fan PWM Limit>
0x30:0xB0 //<Intel General Application>:<Get LED Status>
0x30:0xB2 //<Intel General Application>:<Get BMC Service Status>
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
index 522eb9d7f..c6bc80202 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
@@ -2,26 +2,24 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
PROJECT_SRC_DIR := "${THISDIR}/${PN}"
SRC_URI = "git://github.com/openbmc/phosphor-host-ipmid"
-SRCREV = "ddb1f443d1d6e76949a230847e6145b108114a40"
+SRCREV = "225dec858e52f0e8319acfe72d7b3630adcc7a0d"
SRC_URI += "file://phosphor-ipmi-host.service \
file://host-ipmid-whitelist.conf \
file://0010-fix-get-system-GUID-ipmi-command.patch \
- file://0013-ipmi-add-set-bios-id-to-whitelist.patch \
- file://0039-ipmi-add-oem-command-get-AIC-FRU-to-whitelist.patch \
- file://0050-enable-6-oem-commands.patch \
file://0053-Fix-keep-looping-issue-when-entering-OS.patch \
file://0056-add-SetInProgress-to-get-set-boot-option-cmd.patch \
file://0059-Move-Set-SOL-config-parameter-to-host-ipmid.patch \
file://0060-Move-Get-SOL-config-parameter-to-host-ipmid.patch \
file://0062-Update-IPMI-Chassis-Control-command.patch \
file://0063-Save-the-pre-timeout-interrupt-in-dbus-property.patch \
- file://0064-Enable-watchdog-to-save-useflag-after-host-power-off.patch \
file://0064-Update-provisioning-mode-filter-logic.patch \
+ file://0001-Modify-Get-Lan-Configuration-IP-Address-Source-to-us.patch \
"
EXTRA_OECONF_append = " --disable-i2c-whitelist-check"
EXTRA_OECONF_append = " --enable-transport-oem=yes"
+EXTRA_OECONF_append = " --disable-boot-flag-safe-mode-support"
RDEPENDS_${PN}_remove = "clear-once"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend
index f33be5760..016dd0002 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend
@@ -1,2 +1,2 @@
SRC_URI = "git://github.com/openbmc/ipmbbridge.git"
-SRCREV = "bbfd00abdbc6d2f7c0389eae91cc055a1d4fe0c3"
+SRCREV = "43c89138ea759b4e47f6cef481f677b9f421d148"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend
index 140d1b302..adb1cc551 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend
@@ -11,7 +11,7 @@ SMM_DEVICE = "ipmi_kcs4"
SYSTEMD_SERVICE_${PN}_append = " ${PN}@${SMM_DEVICE}.service "
SRC_URI = "git://github.com/openbmc/kcsbridge.git"
-SRCREV = "2cdc49585235a6557c9cbb6c8b75c064fc02681a"
+SRCREV = "46525ae48db23333493ac927c12ed13a0e663de5"
SRC_URI += "file://99-ipmi-kcs.rules"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0012-Do-not-stop-session-in-deactivate-payload.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0012-Do-not-stop-session-in-deactivate-payload.patch
new file mode 100644
index 000000000..6430a6928
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0012-Do-not-stop-session-in-deactivate-payload.patch
@@ -0,0 +1,48 @@
+From cf8c0e1bf18334fe4a8f76c1e9b34ccfdc82f6f9 Mon Sep 17 00:00:00 2001
+From: Yong Li <yong.b.li@linux.intel.com>
+Date: Fri, 15 Nov 2019 18:34:04 +0800
+Subject: [PATCH] Do not stop session in deactivate payload
+
+IPMI spec defines that:
+The Deactivate Payload command does not cause the session to be terminated;
+
+Also during SOL looptest, there is only one time startSession call,
+but multiple stopSessions calls,
+This causes the looptest will fail if there is any new sessions comes in,
+needs to remove the stopSession call.
+
+Tested:
+Start the loop test in a terminal:
+ipmitool -H $BMCIP -Uroot -P 0penBmc -I lanplus sol looptest 500 200
+
+Then start a new session in another terminal:
+ipmitool -H $BMCIP -Uroot -P 0penBmc -I lanplus raw 6 1
+
+The looptest still works
+
+Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
+---
+ command/payload_cmds.cpp | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/command/payload_cmds.cpp b/command/payload_cmds.cpp
+index f558781..363b843 100644
+--- a/command/payload_cmds.cpp
++++ b/command/payload_cmds.cpp
+@@ -176,13 +176,6 @@ std::vector<uint8_t> deactivatePayload(const std::vector<uint8_t>& inPayload,
+ */
+ return outPayload;
+ }
+-
+- auto check =
+- std::get<session::Manager&>(singletonPool).stopSession(sessionID);
+- if (!check)
+- {
+- response->completionCode = IPMI_CC_UNSPECIFIED_ERROR;
+- }
+ }
+ catch (std::exception& e)
+ {
+--
+2.7.4
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend
index 7f7d89105..9f3bf81ca 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend
@@ -3,7 +3,7 @@ inherit useradd
# TODO: This should be removed, once up-stream bump up
# issue is resolved
SRC_URI += "git://github.com/openbmc/phosphor-net-ipmid"
-SRCREV = "dafe36444fa438030fdf27089b0e94d8d88411dc"
+SRCREV = "49a94b2f82fb1aa68d608f28c4863bb36661a3a4"
USERADD_PACKAGES = "${PN}"
# add a group called ipmi
@@ -22,5 +22,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += " file://0006-Modify-dbus-namespace-of-chassis-control-for-guid.patch \
file://0009-Add-dbus-interface-for-sol-commands.patch \
file://0011-Remove-Get-SOL-Config-Command-from-Netipmid.patch \
+ file://0012-Do-not-stop-session-in-deactivate-payload.patch \
"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb
index fd0a6562b..6d8334865 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb
@@ -3,7 +3,7 @@ DESCRIPTION = "The Node Manager Proxy provides a simple interface for communicat
with Management Engine via IPMB"
SRC_URI = "git://git@github.com/Intel-BMC/node-manager;protocol=ssh"
-SRCREV = "cceeff9cd35aa548cba039b8ad47c20c5870fa27"
+SRCREV = "a0d3ec079f569c47af21d8cafe46e65f5784cd5b"
PV = "0.1+git${SRCPV}"
LICENSE = "Apache-2.0"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb
index 0fd3a99a0..78b6dd2bd 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "4aec5d06d6adbaf53dbe7f18ea9f803eb2198b86"
+SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
inherit cmake systemd
SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.U_Boot.Environment.Manager.service"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/prov-mode-mgr/prov-mode-mgr_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/prov-mode-mgr/prov-mode-mgr_git.bb
index 7510444a2..94f0f8729 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/prov-mode-mgr/prov-mode-mgr_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/prov-mode-mgr/prov-mode-mgr_git.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "4aec5d06d6adbaf53dbe7f18ea9f803eb2198b86"
+SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
inherit cmake systemd
SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.RestrictionMode.Manager.service"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/security-manager/security-manager_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/security-manager/security-manager_git.bb
new file mode 100644
index 000000000..84e3f6c2b
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/security-manager/security-manager_git.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Security Manager daemon to detect the security violation- ASD/ user management"
+DESCRIPTION = "Daemon check for Remote debug enable and user account violation"
+
+PV = "1.0+git${SRCPV}"
+
+S = "${WORKDIR}/git/security-manager"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
+inherit cmake systemd
+
+SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
+SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
+
+SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.SecurityManager.service"
+
+DEPENDS += " \
+ systemd \
+ sdbusplus \
+ libgpiod \
+ sdbusplus-native \
+ phosphor-logging \
+ boost \
+ "
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend
index 32d7ad4ca..de8bdccd7 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend
@@ -1,5 +1,5 @@
# Enable downstream autobump
SRC_URI = "git://github.com/openbmc/phosphor-sel-logger.git"
-SRCREV = "6afe9560852c6431c43c8e79a28e2b7cb498e355"
+SRCREV = "151b7c1fc62971b7d319146e5ea129d44eadd9d7"
EXTRA_OECMAKE_intel += "-DREDFISH_LOG_MONITOR_PULSE_EVENTS=ON"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend
index 183a52d7c..7da1cdc4d 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend
@@ -1,4 +1,4 @@
-SRCREV = "4316218ab824c3c60f566b38f620a6d778e45a83"
+SRCREV = "2424cb7c9752cbecc3d133a67cf1c20f8589f2c1"
SRC_URI = "git://github.com/openbmc/dbus-sensors.git"
DEPENDS_append = " libgpiod"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb
index b0569050e..b8e3aa8e5 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb
@@ -1,7 +1,7 @@
SUMMARY = "Settings"
SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "4aec5d06d6adbaf53dbe7f18ea9f803eb2198b86"
+SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
PV = "0.1+git${SRCPV}"
LICENSE = "Apache-2.0"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb
index 017108366..9b339d260 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb
@@ -9,7 +9,8 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "4aec5d06d6adbaf53dbe7f18ea9f803eb2198b86"
+SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
+EXTRA_OECMAKE += "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'validation-unsecure', '-DBMC_VALIDATION_UNSECURE_FEATURE=ON', '', d)}"
inherit cmake systemd
SYSTEMD_SERVICE_${PN} = "specialmodemgr.service"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/srvcfg-manager/srvcfg-manager_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/srvcfg-manager/srvcfg-manager_git.bb
index a2107d791..47202253a 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/srvcfg-manager/srvcfg-manager_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/srvcfg-manager/srvcfg-manager_git.bb
@@ -9,7 +9,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "4aec5d06d6adbaf53dbe7f18ea9f803eb2198b86"
+SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
inherit cmake systemd
SYSTEMD_SERVICE_${PN} = "srvcfg-manager.service"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/state/post-code-manager/0001-Implement-post-code-manager.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/state/post-code-manager/0001-Implement-post-code-manager.patch
deleted file mode 100644
index 56bb8d1c3..000000000
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/state/post-code-manager/0001-Implement-post-code-manager.patch
+++ /dev/null
@@ -1,499 +0,0 @@
-From 7d78e70735e1bce51ef34cfe128be68758de3447 Mon Sep 17 00:00:00 2001
-From: Kuiying Wang <kuiying.wang@intel.com>
-Date: Tue, 19 Feb 2019 15:00:11 +0800
-Subject: [PATCH] Implement post code manager
-
-Implement method and properties defined in PostCode.interface.yaml
-under phosphor-dbus-interfaces/xyz/openbmc_project/State/Boot
-1. Method: std::vector<uint64_t> PostCode::getPostCodes(uint16_t index)
-2. Properties: CurrentBootCycleIndex/MaxBootCycleNum
-
-Test-By:
- Every cycle post codes is saved in "/var/lib/phosphor-post-code-manager"
- "1" file is saved all post codes for cycle 1
- "2" file is saved all post codes for cycle 2
- "CurrentBootCycleIndex" file is saved the current boot cycle number.
- root@wolfpass:/var/lib/phosphor-post-code-manager# ls
- 1 2 CurrentBootCycleIndex
-
-Change-Id: Ia89b9121983261fef5573092d890beb84626ceeb
-Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
----
- CMakeLists.txt | 45 ++++++
- MAINTAINERS | 45 ++++++
- inc/post_code.hpp | 152 ++++++++++++++++++
- ...penbmc_project.State.Boot.PostCode.service | 11 ++
- src/main.cpp | 61 +++++++
- src/post_code.cpp | 109 +++++++++++++
- 6 files changed, 423 insertions(+)
- create mode 100644 CMakeLists.txt
- create mode 100644 MAINTAINERS
- create mode 100644 inc/post_code.hpp
- create mode 100644 service_files/xyz.openbmc_project.State.Boot.PostCode.service
- create mode 100644 src/main.cpp
- create mode 100644 src/post_code.cpp
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-new file mode 100644
-index 0000000..594d839
---- /dev/null
-+++ b/CMakeLists.txt
-@@ -0,0 +1,45 @@
-+cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR)
-+project(post-code-manager CXX)
-+set(CMAKE_CXX_STANDARD 17)
-+set(CMAKE_CXX_STANDARD_REQUIRED ON)
-+
-+set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
-+include(GNUInstallDirs)
-+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/inc)
-+include_directories(${CMAKE_CURRENT_BINARY_DIR})
-+
-+set(DBUS_OBJECT_NAME "xyz/openbmc_project/State/Boot/PostCode")
-+set(DBUS_INTF_NAME "xyz.openbmc_project.State.Boot.PostCode")
-+
-+add_definitions(-DDBUS_OBJECT_NAME="/${DBUS_OBJECT_NAME}")
-+add_definitions(-DDBUS_INTF_NAME="${DBUS_INTF_NAME}")
-+set(SRC_FILES src/post_code.cpp
-+ src/main.cpp )
-+set ( SERVICE_FILES
-+ service_files/xyz.openbmc_project.State.Boot.PostCode.service )
-+
-+# import sdbusplus
-+find_package(PkgConfig REQUIRED)
-+pkg_check_modules(SDBUSPLUSPLUS sdbusplus REQUIRED)
-+include_directories(${SDBUSPLUSPLUS_INCLUDE_DIRS})
-+link_directories(${SDBUSPLUSPLUS_LIBRARY_DIRS})
-+find_program(SDBUSPLUSPLUS sdbus++)
-+
-+# import phosphor-logging
-+find_package(PkgConfig REQUIRED)
-+pkg_check_modules(LOGGING phosphor-logging REQUIRED)
-+include_directories(${LOGGING_INCLUDE_DIRS})
-+link_directories(${LOGGING_LIBRARY_DIRS})
-+
-+# phosphor-dbus-interfaces
-+find_package(PkgConfig REQUIRED)
-+pkg_check_modules(DBUSINTERFACE phosphor-dbus-interfaces REQUIRED)
-+include_directories(${DBUSINTERFACE_INCLUDE_DIRS})
-+link_directories(${DBUSINTERFACE_LIBRARY_DIRS})
-+
-+add_executable(${PROJECT_NAME} ${SRC_FILES})
-+target_link_libraries(${PROJECT_NAME} ${DBUSINTERFACE_LIBRARIES} )
-+target_link_libraries(${PROJECT_NAME} "${SDBUSPLUSPLUS_LIBRARIES} -lstdc++fs -lphosphor_dbus")
-+
-+install (TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
-+install (FILES ${SERVICE_FILES} DESTINATION /lib/systemd/system/)
-\ No newline at end of file
-diff --git a/MAINTAINERS b/MAINTAINERS
-new file mode 100644
-index 0000000..de6cc54
---- /dev/null
-+++ b/MAINTAINERS
-@@ -0,0 +1,45 @@
-+How to use this list:
-+ Find the most specific section entry (described below) that matches where
-+ your change lives and add the reviewers (R) and maintainers (M) as
-+ reviewers. You can use the same method to track down who knows a particular
-+ code base best.
-+
-+ Your change/query may span multiple entries; that is okay.
-+
-+ If you do not find an entry that describes your request at all, someone
-+ forgot to update this list; please at least file an issue or send an email
-+ to a maintainer, but preferably you should just update this document.
-+
-+Description of section entries:
-+
-+ Section entries are structured according to the following scheme:
-+
-+ X: NAME <EMAIL_USERNAME@DOMAIN> <IRC_USERNAME!>
-+ X: ...
-+ .
-+ .
-+ .
-+
-+ Where REPO_NAME is the name of the repository within the OpenBMC GitHub
-+ organization; FILE_PATH is a file path within the repository, possibly with
-+ wildcards; X is a tag of one of the following types:
-+
-+ M: Denotes maintainer; has fields NAME <EMAIL_USERNAME@DOMAIN> <IRC_USERNAME!>;
-+ if omitted from an entry, assume one of the maintainers from the
-+ MAINTAINERS entry.
-+ R: Denotes reviewer; has fields NAME <EMAIL_USERNAME@DOMAIN> <IRC_USERNAME!>;
-+ these people are to be added as reviewers for a change matching the repo
-+ path.
-+ F: Denotes forked from an external repository; has fields URL.
-+
-+ Line comments are to be denoted "# SOME COMMENT" (typical shell style
-+ comment); it is important to follow the correct syntax and semantics as we
-+ may want to use automated tools with this file in the future.
-+
-+ A change cannot be added to an OpenBMC repository without a MAINTAINER's
-+ approval; thus, a MAINTAINER should always be listed as a reviewer.
-+
-+START OF MAINTAINERS LIST
-+-------------------------
-+
-+M: Kuiying Wang <kuiying.wang@intel.com> <kuiyingw>
-\ No newline at end of file
-diff --git a/inc/post_code.hpp b/inc/post_code.hpp
-new file mode 100644
-index 0000000..84c8b3e
---- /dev/null
-+++ b/inc/post_code.hpp
-@@ -0,0 +1,152 @@
-+/*
-+// Copyright (c) 2019 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.
-+*/
-+#pragma once
-+#include <fcntl.h>
-+#include <unistd.h>
-+#include <cereal/cereal.hpp>
-+#include <experimental/filesystem>
-+#include <cereal/access.hpp>
-+#include <cereal/archives/json.hpp>
-+#include <iostream>
-+#include <fstream>
-+#include <cereal/types/vector.hpp>
-+
-+#include <xyz/openbmc_project/State/Boot/PostCode/server.hpp>
-+#include <xyz/openbmc_project/Common/error.hpp>
-+#include <phosphor-logging/elog-errors.hpp>
-+#include <xyz/openbmc_project/State/Host/server.hpp>
-+
-+#define MaxPostCodeCycles 100
-+
-+const static constexpr char *PostCodePath =
-+ "/xyz/openbmc_project/state/boot/raw";
-+const static constexpr char *PropertiesIntf =
-+ "org.freedesktop.DBus.Properties";
-+const static constexpr char *PostCodeListPath =
-+ "/var/lib/phosphor-post-code-manager/";
-+const static constexpr char *CurrentBootCycleIndexName =
-+ "CurrentBootCycleIndex";
-+const static constexpr char *HostStatePath =
-+ "/xyz/openbmc_project/state/host0";
-+
-+
-+struct EventDeleter
-+{
-+ void operator()(sd_event *event) const
-+ {
-+ event = sd_event_unref(event);
-+ }
-+};
-+using EventPtr = std::unique_ptr<sd_event, EventDeleter>;
-+namespace fs = std::experimental::filesystem;
-+namespace StateServer = sdbusplus::xyz::openbmc_project::State::server;
-+
-+using post_code =
-+ sdbusplus::xyz::openbmc_project::State::Boot::server::PostCode;
-+
-+struct PostCode : sdbusplus::server::object_t<post_code>
-+{
-+ PostCode(sdbusplus::bus::bus& bus, const char* path,
-+ EventPtr &event) :
-+ sdbusplus::server::object_t<post_code>(bus, path),
-+ bus(bus),
-+ propertiesChangedSignalRaw(
-+ bus,
-+ sdbusplus::bus::match::rules::type::signal() +
-+ sdbusplus::bus::match::rules::member("PropertiesChanged") +
-+ sdbusplus::bus::match::rules::path(PostCodePath) +
-+ sdbusplus::bus::match::rules::interface(PropertiesIntf),
-+ [this](sdbusplus::message::message &msg) {
-+ std::string objectName;
-+ std::map<std::string, sdbusplus::message::variant<uint64_t>> msgData;
-+ msg.read(objectName, msgData);
-+ // Check if it was the Value property that changed.
-+ auto valPropMap = msgData.find("Value");
-+ {
-+ if (valPropMap != msgData.end())
-+ {
-+ this->savePostCodes(sdbusplus::message::variant_ns::get<uint64_t>(valPropMap->second));
-+ }
-+ }
-+ }),
-+ propertiesChangedSignalCurrentHostState(
-+ bus,
-+ sdbusplus::bus::match::rules::type::signal() +
-+ sdbusplus::bus::match::rules::member("PropertiesChanged") +
-+ sdbusplus::bus::match::rules::path(HostStatePath) +
-+ sdbusplus::bus::match::rules::interface(PropertiesIntf),
-+ [this](sdbusplus::message::message &msg) {
-+ std::string objectName;
-+ std::map<std::string, sdbusplus::message::variant<std::string>> msgData;
-+ msg.read(objectName, msgData);
-+ // Check if it was the Value property that changed.
-+ auto valPropMap = msgData.find("CurrentHostState");
-+ {
-+ if (valPropMap != msgData.end())
-+ {
-+ StateServer::Host::HostState currentHostState =
-+ StateServer::Host::convertHostStateFromString(
-+ sdbusplus::message::variant_ns::get<std::string>(valPropMap->second));
-+ if (currentHostState == StateServer::Host::HostState::Off)
-+ {
-+ if (this->currentBootCycleIndex() >= this->maxBootCycleNum())
-+ {
-+ this->currentBootCycleIndex(1);
-+ } else{
-+ this->currentBootCycleIndex(this->currentBootCycleIndex() + 1);
-+ }
-+ this->postCodes.clear();
-+ }
-+ }
-+ }
-+ })
-+ {
-+ phosphor::logging::log<phosphor::logging::level::INFO>(
-+ "PostCode is created");
-+ auto dir = fs::path(PostCodeListPath);
-+ fs::create_directories(dir);
-+ strPostCodeListPath = PostCodeListPath;
-+ strCurrentBootCycleIndexName = CurrentBootCycleIndexName;
-+ uint16_t index = 0;
-+ deserialize(fs::path(strPostCodeListPath + strCurrentBootCycleIndexName), index);
-+ currentBootCycleIndex(index);
-+ maxBootCycleNum(MaxPostCodeCycles);
-+ if (currentBootCycleIndex() >= maxBootCycleNum())
-+ {
-+ currentBootCycleIndex(1);
-+ } else{
-+ currentBootCycleIndex(currentBootCycleIndex() + 1);
-+ }
-+ }
-+ ~PostCode()
-+ {
-+
-+ }
-+
-+ std::vector<uint64_t> getPostCodes(uint16_t index) override;
-+
-+ private:
-+ sdbusplus::bus::bus& bus;
-+ std::vector<uint64_t> postCodes;
-+ std::string strPostCodeListPath;
-+ std::string strCurrentBootCycleIndexName;
-+ void savePostCodes(uint64_t code);
-+ sdbusplus::bus::match_t propertiesChangedSignalRaw;
-+ sdbusplus::bus::match_t propertiesChangedSignalCurrentHostState;
-+ fs::path serialize(const std::string& path);
-+ bool deserialize(const fs::path& path, uint16_t& index);
-+ bool deserializePostCodes(const fs::path& path, std::vector<uint64_t> &codes);
-+};
-diff --git a/service_files/xyz.openbmc_project.State.Boot.PostCode.service b/service_files/xyz.openbmc_project.State.Boot.PostCode.service
-new file mode 100644
-index 0000000..67bc43f
---- /dev/null
-+++ b/service_files/xyz.openbmc_project.State.Boot.PostCode.service
-@@ -0,0 +1,11 @@
-+[Unit]
-+Description=Post code manager
-+
-+[Service]
-+ExecStart=/usr/bin/env post-code-manager
-+SyslogIdentifier=post-code-manager
-+Type=dbus
-+BusName=xyz.openbmc_project.State.Boot.PostCode
-+
-+[Install]
-+WantedBy=multi-user.target
-diff --git a/src/main.cpp b/src/main.cpp
-new file mode 100644
-index 0000000..4a74b29
---- /dev/null
-+++ b/src/main.cpp
-@@ -0,0 +1,61 @@
-+/*
-+// Copyright (c) 2019 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.
-+*/
-+#include "post_code.hpp"
-+
-+int main(int argc, char* argv[])
-+{
-+ int ret = 0;
-+
-+ phosphor::logging::log<phosphor::logging::level::INFO>(
-+ "Start post code manager service...");
-+
-+ sd_event* event = nullptr;
-+ ret = sd_event_default(&event);
-+ if (ret < 0)
-+ {
-+ phosphor::logging::log<phosphor::logging::level::ERR>(
-+ "Error creating a default sd_event handler");
-+ return ret;
-+ }
-+ EventPtr eventP{event};
-+ event = nullptr;
-+
-+ sdbusplus::bus::bus bus = sdbusplus::bus::new_default();
-+ sdbusplus::server::manager_t m{bus, DBUS_OBJECT_NAME};
-+
-+ bus.request_name(DBUS_INTF_NAME);
-+
-+ PostCode postCode{bus, DBUS_OBJECT_NAME, eventP};
-+
-+ try
-+ {
-+ bus.attach_event(eventP.get(), SD_EVENT_PRIORITY_NORMAL);
-+ ret = sd_event_loop(eventP.get());
-+ if (ret < 0)
-+ {
-+ phosphor::logging::log<phosphor::logging::level::ERR>(
-+ "Error occurred during the sd_event_loop",
-+ phosphor::logging::entry("RET=%d", ret));
-+ }
-+ }
-+ catch (std::exception& e)
-+ {
-+ phosphor::logging::log<phosphor::logging::level::ERR>(e.what());
-+ return -1;
-+ }
-+ return 0;
-+
-+}
-diff --git a/src/post_code.cpp b/src/post_code.cpp
-new file mode 100644
-index 0000000..983eeee
---- /dev/null
-+++ b/src/post_code.cpp
-@@ -0,0 +1,109 @@
-+/*
-+// Copyright (c) 2019 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.
-+*/
-+#include "post_code.hpp"
-+std::vector<uint64_t> PostCode::getPostCodes(uint16_t index)
-+{
-+ std::vector<uint64_t> codes;
-+
-+ if (currentBootCycleIndex() == index)
-+ return postCodes;
-+ deserializePostCodes(fs::path(strPostCodeListPath + std::to_string(index)), codes);
-+ return codes;
-+}
-+void PostCode::savePostCodes(uint64_t code)
-+{
-+ postCodes.push_back(code);
-+ serialize(fs::path(PostCodeListPath));
-+ return;
-+}
-+
-+fs::path PostCode::serialize(const std::string& path)
-+{
-+ try
-+ {
-+ uint16_t index = currentBootCycleIndex();
-+ fs::path fullPath(path + strCurrentBootCycleIndexName);
-+ std::ofstream os(fullPath.c_str(), std::ios::binary);
-+ cereal::JSONOutputArchive oarchive(os);
-+ oarchive(index);
-+ std::ofstream osPostCodes((path + std::to_string(currentBootCycleIndex())).c_str(), std::ios::binary);
-+ cereal::JSONOutputArchive oarchivePostCodes(osPostCodes);
-+ oarchivePostCodes(postCodes);
-+ }
-+ catch (cereal::Exception& e)
-+ {
-+ phosphor::logging::log<phosphor::logging::level::ERR>(e.what());
-+ return "";
-+ }
-+ catch (const fs::filesystem_error& e)
-+ {
-+ phosphor::logging::log<phosphor::logging::level::ERR>(e.what());
-+ return "";
-+ }
-+ return path;
-+}
-+
-+bool PostCode::deserialize(const fs::path& path, uint16_t& index)
-+{
-+ try
-+ {
-+ if (fs::exists(path))
-+ {
-+ std::ifstream is(path.c_str(), std::ios::in | std::ios::binary);
-+ cereal::JSONInputArchive iarchive(is);
-+ iarchive(index);
-+ return true;
-+ }
-+ return false;
-+ }
-+ catch (cereal::Exception& e)
-+ {
-+ phosphor::logging::log<phosphor::logging::level::ERR>(e.what());
-+ return false;
-+ }
-+ catch (const fs::filesystem_error& e)
-+ {
-+ return false;
-+ }
-+
-+ return false;
-+}
-+
-+bool PostCode::deserializePostCodes(const fs::path& path, std::vector<uint64_t> &codes)
-+{
-+ try
-+ {
-+ if (fs::exists(path))
-+ {
-+ std::ifstream is(path.c_str(), std::ios::in | std::ios::binary);
-+ cereal::JSONInputArchive iarchive(is);
-+ iarchive(codes);
-+ return true;
-+ }
-+ return false;
-+ }
-+ catch (cereal::Exception& e)
-+ {
-+ phosphor::logging::log<phosphor::logging::level::ERR>(e.what());
-+ return false;
-+ }
-+ catch (const fs::filesystem_error& e)
-+ {
-+ return false;
-+ }
-+
-+ return false;
-+}
---
-2.19.1
-
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/state/post-code-manager_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/state/post-code-manager_git.bb
index 8f2ead18a..0d612f3b3 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/state/post-code-manager_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/state/post-code-manager_git.bb
@@ -2,7 +2,7 @@ SUMMARY = "Phosphor post code manager"
DESCRIPTION = "Post Code Manager"
SRC_URI = "git://github.com/openbmc/phosphor-post-code-manager.git"
-SRCREV = "7f50dcaa6feb66cf5307b8a0e4742a36a50eed29"
+SRCREV = "3a0444002398714c3a5539c93355c74eb184b2b1"
S = "${WORKDIR}/git"
@@ -31,4 +31,3 @@ RDEPENDS_${PN} += " \
phosphor-logging \
"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-SRC_URI += "file://0001-Implement-post-code-manager.patch"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/system/callback-manager.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/system/callback-manager.bb
index 9b94284ec..1ef186e3a 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/system/callback-manager.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/system/callback-manager.bb
@@ -7,7 +7,7 @@ inherit cmake systemd
DEPENDS = "boost sdbusplus"
PV = "0.1+git${SRCPV}"
-SRCREV = "4aec5d06d6adbaf53dbe7f18ea9f803eb2198b86"
+SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
S = "${WORKDIR}/git/callback-manager"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager/0005-Added-suport-for-multiple-user-manager-services.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager/0005-Added-suport-for-multiple-user-manager-services.patch
index 0af64698a..c19f33da2 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager/0005-Added-suport-for-multiple-user-manager-services.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager/0005-Added-suport-for-multiple-user-manager-services.patch
@@ -1,4 +1,4 @@
-From a519a128b9a44b1798419bf3a653d58e266c60fb Mon Sep 17 00:00:00 2001
+From b8a8e561d7dba48f3f0a0eb34662b2450dcad35d Mon Sep 17 00:00:00 2001
From: Radivoje Jovanovic <radivoje.jovanovic@intel.com>
Date: Mon, 2 Jul 2018 19:23:25 -0700
Subject: [PATCH] Added suport for multiple user manager services
@@ -11,11 +11,11 @@ Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.co
---
Makefile.am | 5 +-
mainapp.cpp | 89 ++++++-
- user_mgr.cpp | 290 ++-------------------
+ user_mgr.cpp | 295 ++-------------------
user_mgr.hpp | 9 +-
- user_service.cpp | 781 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ user_service.cpp | 786 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
user_service.hpp | 233 +++++++++++++++++
- 6 files changed, 1139 insertions(+), 268 deletions(-)
+ 6 files changed, 1144 insertions(+), 273 deletions(-)
create mode 100644 user_service.cpp
create mode 100644 user_service.hpp
@@ -150,7 +150,7 @@ index c9da030..03c406a 100644
// Claim the bus now
bus.request_name(USER_MANAGER_BUSNAME);
diff --git a/user_mgr.cpp b/user_mgr.cpp
-index 17146e6..db6e7d5 100644
+index 2f22323..db6e7d5 100644
--- a/user_mgr.cpp
+++ b/user_mgr.cpp
@@ -14,26 +14,20 @@
@@ -434,7 +434,7 @@ index 17146e6..db6e7d5 100644
log<level::INFO>("User enabled/disabled state updated successfully",
entry("USER_NAME=%s", userName.c_str()),
-@@ -728,49 +570,8 @@ bool UserMgr::userLockedForFailedAttempt(const std::string &userName,
+@@ -728,54 +570,8 @@ bool UserMgr::userLockedForFailedAttempt(const std::string &userName,
UserSSHLists UserMgr::getUserAndSshGrpList()
{
@@ -462,10 +462,15 @@ index 17146e6..db6e7d5 100644
- // Any error, break the loop.
- break;
- }
+-#ifdef ENABLE_ROOT_USER_MGMT
- // Add all users whose UID >= 1000 and < 65534
- // and special UID 0.
- if ((pwp->pw_uid == 0) ||
- ((pwp->pw_uid >= 1000) && (pwp->pw_uid < 65534)))
+-#else
+- // Add all users whose UID >=1000 and < 65534
+- if ((pwp->pw_uid >= 1000) && (pwp->pw_uid < 65534))
+-#endif
- {
- std::string userName(pwp->pw_name);
- userList.emplace_back(userName);
@@ -486,7 +491,7 @@ index 17146e6..db6e7d5 100644
}
size_t UserMgr::getIpmiUsersCount()
-@@ -781,49 +582,14 @@ size_t UserMgr::getIpmiUsersCount()
+@@ -786,49 +582,14 @@ size_t UserMgr::getIpmiUsersCount()
bool UserMgr::isUserEnabled(const std::string &userName)
{
@@ -540,7 +545,7 @@ index 17146e6..db6e7d5 100644
}
DbusUserObj UserMgr::getPrivilegeMapperObject(void)
-@@ -1052,11 +818,9 @@ void UserMgr::initUserObjects(void)
+@@ -1057,11 +818,9 @@ void UserMgr::initUserObjects(void)
{
// All user management lock has to be based on /etc/shadow
phosphor::user::shadow::Lock lock();
@@ -554,7 +559,7 @@ index 17146e6..db6e7d5 100644
if (!userNameList.empty())
{
-@@ -1111,7 +875,8 @@ void UserMgr::initUserObjects(void)
+@@ -1116,7 +875,8 @@ void UserMgr::initUserObjects(void)
}
}
@@ -564,7 +569,7 @@ index 17146e6..db6e7d5 100644
Ifaces(bus, path, true), bus(bus), path(path)
{
UserMgrIface::allPrivileges(privMgr);
-@@ -1220,6 +985,7 @@ UserMgr::UserMgr(sdbusplus::bus::bus &bus, const char *path) :
+@@ -1225,6 +985,7 @@ UserMgr::UserMgr(sdbusplus::bus::bus &bus, const char *path) :
}
AccountPolicyIface::accountUnlockTimeout(value32);
}
@@ -616,10 +621,10 @@ index b25e9f2..c24733b 100644
"priv-user", "priv-callback"};
diff --git a/user_service.cpp b/user_service.cpp
new file mode 100644
-index 0000000..9bb602c
+index 0000000..c3c45bd
--- /dev/null
+++ b/user_service.cpp
-@@ -0,0 +1,781 @@
+@@ -0,0 +1,786 @@
+/*
+// Copyright (c) 2018 Intel Corporation
+//
@@ -735,10 +740,15 @@ index 0000000..9bb602c
+ // Any error, break the loop.
+ break;
+ }
++#ifdef ENABLE_ROOT_USER_MGMT
+ // Add all users whose UID >= 1000 and < 65534
+ // and special UID 0.
+ if ((pwp->pw_uid == 0) ||
+ ((pwp->pw_uid >= 1000) && (pwp->pw_uid < 65534)))
++#else
++ // Add all users whose UID >=1000 and < 65534
++ if ((pwp->pw_uid >= 1000) && (pwp->pw_uid < 65534))
++#endif
+ {
+ std::string userName(pwp->pw_name);
+ userList.emplace_back(userName);
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend
index 327be045d..f7a3a7875 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend
@@ -1,8 +1,9 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
#SRC_URI = "git://github.com/openbmc/phosphor-user-manager;nobranch=1"
-SRCREV = "1af1223304dbf7aaecd5f238227abee95cce8b39"
+SRCREV = "d4d655006c6179d47008d9b374debcedcc03a1c4"
+EXTRA_OECONF += "${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-root-login' ], '', '--disable-root_user_mgmt', d)}"
SRC_URI += " \
file://0005-Added-suport-for-multiple-user-manager-services.patch \
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/virtual-media/virtual-media.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/virtual-media/virtual-media.bb
index 74ccd9754..a2c271885 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/virtual-media/virtual-media.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/virtual-media/virtual-media.bb
@@ -2,7 +2,7 @@ SUMMARY = "Virtual Media Service"
DESCRIPTION = "Virtual Media Service"
SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "4aec5d06d6adbaf53dbe7f18ea9f803eb2198b86"
+SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
S = "${WORKDIR}/git/virtual-media/"
PV = "1.0+git${SRCPV}"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend
index 22e1b9456..2da438914 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend
@@ -1,2 +1,2 @@
-SRC_URI = "git://git@github.com/Intel-BMC/phosphor-webui;protocol=ssh;branch=intel"
-SRCREV = "2145e7b53c1d90bbf8282e05865a41c719e4c972"
+SRC_URI = "git://git@github.com/Intel-BMC/phosphor-webui;protocol=ssh;branch=intel2"
+SRCREV = "b26d415f38684f86e19e09a8073f9d4244adcb97"
diff --git a/meta-openbmc-mods/meta-common/recipes-utilities/intel-signed-image/files/genimage-si.ini b/meta-openbmc-mods/meta-common/recipes-utilities/intel-signed-image/files/genimage-si.ini
index 619570dbb..38609ad5d 100644
--- a/meta-openbmc-mods/meta-common/recipes-utilities/intel-signed-image/files/genimage-si.ini
+++ b/meta-openbmc-mods/meta-common/recipes-utilities/intel-signed-image/files/genimage-si.ini
@@ -105,7 +105,7 @@ SecVersion = 1
Major = 1
Minor = 1
Type = DTB\x00
-File = uImage-aspeed-bmc-intel-purley.dtb
+File = uImage-aspeed-bmc-intel-ast2500.dtb
SecVersion = 0
; Root File System
diff --git a/meta-openbmc-mods/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend b/meta-openbmc-mods/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend
new file mode 100755
index 000000000..217345885
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend
@@ -0,0 +1,3 @@
+# Enable downstream autobump
+SRC_URI = "git://github.com/openbmc/x86-power-control.git;protocol=ssh"
+SRCREV = "3f6ecb212494d1a9362256d7aae03e11f3efb6f7"
diff --git a/meta-openbmc-mods/meta-egs/conf/bblayers.conf.sample b/meta-openbmc-mods/meta-egs/conf/bblayers.conf.sample
new file mode 100644
index 000000000..3879d00a1
--- /dev/null
+++ b/meta-openbmc-mods/meta-egs/conf/bblayers.conf.sample
@@ -0,0 +1,25 @@
+# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
+# changes incompatibly
+LCONF_VERSION = "10"
+
+BBPATH = "${TOPDIR}"
+BBFILES ?= ""
+
+BBLAYERS ?= " \
+ ##OEROOT##/meta \
+ ##OEROOT##/meta-poky \
+ ##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-x86 \
+ ##OEROOT##/meta-openbmc-mods \
+ ##OEROOT##/meta-intel \
+ ##OEROOT##/meta-openbmc-mods/meta-common \
+ ##OEROOT##/meta-openbmc-mods/meta-common-small \
+ ##OEROOT##/meta-openbmc-mods/meta-ast2600 \
+ ##OEROOT##/meta-openbmc-mods/meta-egs \
+ ##OEROOT##/meta-security \
+ "
diff --git a/meta-openbmc-mods/meta-egs/conf/conf-notes.txt b/meta-openbmc-mods/meta-egs/conf/conf-notes.txt
new file mode 100644
index 000000000..91059a72d
--- /dev/null
+++ b/meta-openbmc-mods/meta-egs/conf/conf-notes.txt
@@ -0,0 +1,6 @@
+Common targets are:
+ intel-platforms
+ obmc-phosphor-image
+ qemu-helper-native
+ virtual/kernel
+ phosphor-ipmi-host
diff --git a/meta-openbmc-mods/meta-egs/conf/layer.conf b/meta-openbmc-mods/meta-egs/conf/layer.conf
new file mode 100644
index 000000000..e139b7249
--- /dev/null
+++ b/meta-openbmc-mods/meta-egs/conf/layer.conf
@@ -0,0 +1,14 @@
+LOCALCONF_VERSION = "4"
+# 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 += "egs"
+BBFILE_PATTERN_egs = ""
+BBFILE_PRIORITY_egs = "7"
+LAYERSERIES_COMPAT_egs = "warrior zeus"
+
+PRODUCT_GENERATION = "egs"
diff --git a/meta-openbmc-mods/meta-egs/conf/local.conf.sample b/meta-openbmc-mods/meta-egs/conf/local.conf.sample
new file mode 100644
index 000000000..3cf6a01b3
--- /dev/null
+++ b/meta-openbmc-mods/meta-egs/conf/local.conf.sample
@@ -0,0 +1,29 @@
+MACHINE ??= "intel-ast2600"
+DISTRO ?= "openbmc-phosphor"
+PACKAGE_CLASSES ?= "package_rpm"
+SANITY_TESTED_DISTROS_append ?= " RedHatEnterpriseWorkstation-6.*"
+EXTRA_IMAGE_FEATURES = "debug-tweaks"
+USER_CLASSES ?= "buildstats image-mklibs image-prelink"
+PATCHRESOLVE = "noop"
+
+# PFR image Build
+# Before exporting the conf, please uncomment the below line
+# for building Intel PFR compliant images.
+#IMAGE_FSTYPES += "intel-pfr"
+
+BB_DISKMON_DIRS = "\
+ STOPTASKS,${TMPDIR},1G,100K \
+ STOPTASKS,${DL_DIR},1G,100K \
+ STOPTASKS,${SSTATE_DIR},1G,100K \
+ STOPTASKS,/tmp,100M,100K \
+ ABORT,${TMPDIR},100M,1K \
+ ABORT,${DL_DIR},100M,1K \
+ ABORT,${SSTATE_DIR},100M,1K \
+ ABORT,/tmp,10M,1K"
+CONF_VERSION = "4"
+#BB_NUMBER_THREADS = "70"
+
+FULL_OPTIMIZATION = "-Os -pipe ${DEBUG_FLAGS}"
+require conf/distro/include/security_flags.inc
+#SSTATE_DIR="~/.yocto/sstate"
+#DL_DIR="~/.yocto/download"
diff --git a/meta-openbmc-mods/meta-egs/conf/machine/intel-ast2600.conf b/meta-openbmc-mods/meta-egs/conf/machine/intel-ast2600.conf
new file mode 100644
index 000000000..c46d87dde
--- /dev/null
+++ b/meta-openbmc-mods/meta-egs/conf/machine/intel-ast2600.conf
@@ -0,0 +1 @@
+require conf/machine/include/intel-ast2600.inc
diff --git a/meta-openbmc-mods/meta-wht/conf/layer.conf b/meta-openbmc-mods/meta-wht/conf/layer.conf
index cc568c2ec..3c2354e62 100644
--- a/meta-openbmc-mods/meta-wht/conf/layer.conf
+++ b/meta-openbmc-mods/meta-wht/conf/layer.conf
@@ -1,4 +1,4 @@
-LOCALCONF_VERSION = "4"
+LOCALCONF_VERSION = "5"
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
@@ -11,4 +11,4 @@ BBFILE_PATTERN_wht = ""
BBFILE_PRIORITY_wht = "7"
LAYERSERIES_COMPAT_wht = "warrior zeus"
-PRODUCT_GENERATION = "wht" \ No newline at end of file
+PRODUCT_GENERATION = "wht"
diff --git a/meta-openbmc-mods/meta-wht/conf/local.conf.sample b/meta-openbmc-mods/meta-wht/conf/local.conf.sample
index f92bf8b33..aaf295ba4 100644
--- a/meta-openbmc-mods/meta-wht/conf/local.conf.sample
+++ b/meta-openbmc-mods/meta-wht/conf/local.conf.sample
@@ -4,7 +4,7 @@ MACHINE ??= "intel-ast2500"
DISTRO ?= "openbmc-phosphor"
PACKAGE_CLASSES ?= "package_rpm"
SANITY_TESTED_DISTROS_append ?= " RedHatEnterpriseWorkstation-6.*"
-EXTRA_IMAGE_FEATURES = "debug-tweaks"
+EXTRA_IMAGE_FEATURES = "debug-tweaks validation-unsecure"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
@@ -22,7 +22,7 @@ BB_DISKMON_DIRS = "\
ABORT,${DL_DIR},100M,1K \
ABORT,${SSTATE_DIR},100M,1K \
ABORT,/tmp,10M,1K"
-CONF_VERSION = "4"
+CONF_VERSION = "5"
#BB_NUMBER_THREADS = "70"
FULL_OPTIMIZATION = "-Os -pipe ${DEBUG_FLAGS}"
diff --git a/meta-openbmc-mods/meta-wolfpass/conf/layer.conf b/meta-openbmc-mods/meta-wolfpass/conf/layer.conf
index d24c6a33c..acfeed4e2 100644
--- a/meta-openbmc-mods/meta-wolfpass/conf/layer.conf
+++ b/meta-openbmc-mods/meta-wolfpass/conf/layer.conf
@@ -1,4 +1,4 @@
-LOCALCONF_VERSION = "3"
+LOCALCONF_VERSION = "4"
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
diff --git a/meta-openbmc-mods/meta-wolfpass/conf/local.conf.sample b/meta-openbmc-mods/meta-wolfpass/conf/local.conf.sample
index 0d8c780f3..e4962ad81 100644
--- a/meta-openbmc-mods/meta-wolfpass/conf/local.conf.sample
+++ b/meta-openbmc-mods/meta-wolfpass/conf/local.conf.sample
@@ -4,7 +4,7 @@ MACHINE ??= "intel-ast2500"
DISTRO ?= "openbmc-phosphor"
PACKAGE_CLASSES ?= "package_rpm"
SANITY_TESTED_DISTROS_append ?= " RedHatEnterpriseWorkstation-6.*"
-EXTRA_IMAGE_FEATURES = "debug-tweaks"
+EXTRA_IMAGE_FEATURES = "debug-tweaks validation-unsecure"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS = "\
@@ -16,7 +16,7 @@ BB_DISKMON_DIRS = "\
ABORT,${DL_DIR},100M,1K \
ABORT,${SSTATE_DIR},100M,1K \
ABORT,/tmp,10M,1K"
-CONF_VERSION = "3"
+CONF_VERSION = "4"
#BB_NUMBER_THREADS = "70"
FULL_OPTIMIZATION = "-Os -pipe ${DEBUG_FLAGS}"