kernel: Move to 4.13 kernel

We have 236 commits, 127 files changed, 17766 insertions(+), 2128
deletions(-). Some of these are backports from upstream. This list
does not include patches from the 4.13 stable releases, but we do
include those in the dev-4.13 branch.

     1  Alexey Khoroshilov
    34  Andrew Jeffery
     1  Arnd Bergmann
     1  Benjamin Herrenschmidt
     1  Bhumika Goyal
     1  Brad Bishop
     1  Brendan Higgins
     11  Christopher Bostic
     1  Cyril Bur
    14  Cédric Le Goater
    49  Edward A. James
     3  Gavin Shan
     1  Guenter Roeck
     8  Ivan Mikhaylov
     1  Jacek Anaszewski
     1  James Feist
     7  Jeremy Kerr
    72  Joel Stanley
     2  Julia Lawall
     1  Ken Chen
     6  Lei YU
     3  Milton Miller
     1  Mykola Kostenok
     1  Patrick Venture
     2  Philipp Zabel
     1  Rick Altherr
    11  Samuel Mendoza-Jonas
     2  Wei Yongjun
     1  Xo Wang
     1  Yong Li

Note that the 4.13 branch is EOL'd by the Linux community, and as such
should not be used for any products beyond development.

React to removal of occ hwmon instances from device trees with a
new startup/shutdown mechanism for phosphor-hwmon.

To fix this, a helper script will be used to start the service that
will pass the service the device tree name if it is present, or the
udev device path if it isn't.  This script will still run from the
udev rule as before, but it will stop and start the service itself
without using the SYSTEMD_WANTS attribute.

As the path to the hwmon environment file matches the service
template argument, the paths for the OCC .conf files need to change
to match the device path instead of the previous device tree path.

Note that the pure device path would have the hwmon instance number
in it, but since that can't be known ahead of time it is stripped
off by the script that starts the service.

In addition, the pure device path for the OCCs contain several
':'s, meaning the associated environment files would also need to.
However, Yocto/Bitbake cannot handle a ':' in a file path, so they
are converted to '--'s by the script that starts the service and
phosphor-hwmon will convert them back internally when it starts.

The service file also needed some changes now that the service
lifetime is no longer controlled by systemd via SYSTEMD_WANTS.

This script will be called by a udev rule to start and
stop phosphor-hwmon when the hwmon device driver is started
and stopped.

It is passed both the device path and the OF_FULLNAME device
tree attribute.  If OF_FULLNAME is present, it will start the
service with that as its template argument, otherwise it will
use the device path.  This is to handle devices that aren't in
the device tree so they won't have OF_FULLNAME.

If a '/hwmon/hwmonN' is in the path it is removed, as this path
is also used as a path to an environment file and so must be
known ahead of time, which the hwmon instance N is not.

If there is a ':' in the path name, it is converted to a '--'.
Yocto/Bitbake cannot handle a ':' in file paths.

Resolves openbmc/openbmc#2953

Change-Id: I815be4d6d9e1cbea8428bb1bb8c332776ee71ece
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-kernel/linux/linux-obmc/defconfig b/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-kernel/linux/linux-obmc/defconfig
index 411ebbe..74d9343 100644
--- a/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-kernel/linux/linux-obmc/defconfig
+++ b/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-kernel/linux/linux-obmc/defconfig
@@ -12,7 +12,6 @@
 # CONFIG_RD_BZIP2 is not set
 # CONFIG_RD_LZO is not set
 # CONFIG_RD_LZ4 is not set
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_KALLSYMS_ALL=y
 CONFIG_BPF_SYSCALL=y
 # CONFIG_AIO is not set
@@ -23,16 +22,17 @@
 CONFIG_SLAB_FREELIST_RANDOM=y
 CONFIG_JUMP_LABEL=y
 CONFIG_CC_STACKPROTECTOR_STRONG=y
+CONFIG_STRICT_KERNEL_RWX=y
 # CONFIG_LBDAF is not set
-# CONFIG_BLK_DEV_BSG is not set
 # CONFIG_IOSCHED_DEADLINE is not set
-# CONFIG_IOSCHED_CFQ is not set
+# CONFIG_MQ_IOSCHED_DEADLINE is not set
+# CONFIG_MQ_IOSCHED_KYBER is not set
 # CONFIG_ARCH_MULTI_V7 is not set
 CONFIG_ARCH_ASPEED=y
 CONFIG_MACH_ASPEED_G4=y
-CONFIG_DEBUG_RODATA=y
 CONFIG_VMSPLIT_2G=y
 CONFIG_AEABI=y
+# CONFIG_COMPACTION is not set
 CONFIG_UACCESS_WITH_MEMCPY=y
 CONFIG_SECCOMP=y
 # CONFIG_ATAGS is not set
@@ -53,14 +53,12 @@
 # CONFIG_INET_XFRM_MODE_TRANSPORT is not set
 # CONFIG_INET_XFRM_MODE_TUNNEL is not set
 # CONFIG_INET_XFRM_MODE_BEET is not set
-CONFIG_INET_UDP_DIAG=y
+# CONFIG_INET_DIAG is not set
 # CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
 # CONFIG_INET6_XFRM_MODE_TUNNEL is not set
 # CONFIG_INET6_XFRM_MODE_BEET is not set
-# CONFIG_IPV6_SIT is not set
 CONFIG_NETFILTER=y
-CONFIG_IP_NF_IPTABLES=y
-CONFIG_IP_NF_FILTER=y
+# CONFIG_NETFILTER_ADVANCED is not set
 CONFIG_VLAN_8021Q=y
 CONFIG_NET_NCSI=y
 # CONFIG_WIRELESS is not set
@@ -78,10 +76,16 @@
 CONFIG_MTD_UBI_FASTMAP=y
 CONFIG_MTD_UBI_BLOCK=y
 CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_LOOP_MIN_COUNT=0
 CONFIG_BLK_DEV_RAM=y
 CONFIG_ASPEED_LPC_CTRL=y
+CONFIG_ASPEED_LPC_SNOOP=y
+CONFIG_ASPEED_LPC_MBOX=y
 CONFIG_EEPROM_AT24=y
 CONFIG_NETDEVICES=y
+# CONFIG_NET_VENDOR_ALACRITECH is not set
+# CONFIG_NET_VENDOR_AMAZON is not set
+# CONFIG_NET_VENDOR_AQUANTIA is not set
 # CONFIG_NET_VENDOR_ARC is not set
 # CONFIG_NET_CADENCE is not set
 # CONFIG_NET_VENDOR_BROADCOM is not set
@@ -99,16 +103,15 @@
 # CONFIG_NET_VENDOR_ROCKER is not set
 # CONFIG_NET_VENDOR_SAMSUNG is not set
 # CONFIG_NET_VENDOR_SEEQ is not set
+# CONFIG_NET_VENDOR_SOLARFLARE is not set
 # CONFIG_NET_VENDOR_SMSC is not set
 # CONFIG_NET_VENDOR_STMICRO is not set
-# CONFIG_NET_VENDOR_SYNOPSYS is not set
 # CONFIG_NET_VENDOR_VIA is not set
 # CONFIG_NET_VENDOR_WIZNET is not set
+# CONFIG_NET_VENDOR_SYNOPSYS is not set
 CONFIG_BROADCOM_PHY=y
 CONFIG_REALTEK_PHY=y
 # CONFIG_WLAN is not set
-# CONFIG_INPUT_LEDS is not set
-# CONFIG_INPUT_MOUSEDEV is not set
 CONFIG_INPUT_EVDEV=y
 # CONFIG_KEYBOARD_ATKBD is not set
 CONFIG_KEYBOARD_GPIO=y
@@ -128,6 +131,7 @@
 CONFIG_ASPEED_BT_IPMI_BMC=y
 CONFIG_HW_RANDOM_TIMERIOMEM=y
 CONFIG_I2C=y
+# CONFIG_I2C_COMPAT is not set
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_MUX=y
 CONFIG_I2C_MUX_PCA9541=y
@@ -146,20 +150,28 @@
 CONFIG_SENSORS_NCT7904=y
 CONFIG_SENSORS_OCC=y
 CONFIG_SENSORS_OCC_P8_I2C=y
+CONFIG_SENSORS_OCC_P9_SBE=y
 CONFIG_PMBUS=y
-# CONFIG_SENSORS_PMBUS is not set
 CONFIG_SENSORS_ADM1275=y
 CONFIG_SENSORS_IBM_CFFPS=y
+CONFIG_SENSORS_IR35221=y
 CONFIG_SENSORS_LM25066=y
 CONFIG_SENSORS_MAX31785=y
 CONFIG_SENSORS_UCD9000=y
+CONFIG_SENSORS_UCD9200=y
 CONFIG_SENSORS_TMP421=y
-# CONFIG_HID is not set
-# CONFIG_USB_SUPPORT is not set
+CONFIG_USB=y
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+CONFIG_USB_DYNAMIC_MINORS=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_EHCI_HCD_PLATFORM=y
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
 CONFIG_LEDS_CLASS_FLASH=y
 CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_PCA955X=y
+CONFIG_LEDS_PCA955X_GPIO=y
 CONFIG_LEDS_TRIGGERS=y
 CONFIG_LEDS_TRIGGER_TIMER=y
 CONFIG_LEDS_TRIGGER_HEARTBEAT=y
@@ -168,9 +180,7 @@
 CONFIG_RTC_DRV_DS1307=y
 CONFIG_RTC_DRV_PCF8523=y
 CONFIG_RTC_DRV_RV8803=y
-CONFIG_RTC_DRV_ASPEED=y
 CONFIG_MAILBOX=y
-CONFIG_ASPEED_LPC_MBOX=y
 # CONFIG_IOMMU_SUPPORT is not set
 CONFIG_IIO=y
 CONFIG_ASPEED_ADC=y
@@ -181,13 +191,13 @@
 CONFIG_FSI_MASTER_HUB=y
 CONFIG_FSI_SCOM=y
 CONFIG_FSI_SBEFIFO=y
+CONFIG_FSI_OCC=y
 CONFIG_FIRMWARE_MEMMAP=y
 CONFIG_FANOTIFY=y
-CONFIG_AUTOFS4_FS=y
 CONFIG_OVERLAY_FS=y
 CONFIG_TMPFS=y
-CONFIG_TMPFS_POSIX_ACL=y
 CONFIG_JFFS2_FS=y
+# CONFIG_JFFS2_FS_WRITEBUFFER is not set
 CONFIG_JFFS2_SUMMARY=y
 CONFIG_JFFS2_FS_XATTR=y
 CONFIG_UBIFS_FS=y
@@ -195,18 +205,21 @@
 CONFIG_SQUASHFS_XZ=y
 CONFIG_PRINTK_TIME=y
 CONFIG_DYNAMIC_DEBUG=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_INFO_REDUCED=y
+CONFIG_DEBUG_INFO_DWARF4=y
+CONFIG_GDB_SCRIPTS=y
 CONFIG_STRIP_ASM_SYMS=y
-CONFIG_LOCKUP_DETECTOR=y
+CONFIG_SOFTLOCKUP_DETECTOR=y
+# CONFIG_DETECT_HUNG_TASK is not set
 CONFIG_WQ_WATCHDOG=y
 CONFIG_PANIC_TIMEOUT=-1
 # CONFIG_SCHED_DEBUG is not set
-CONFIG_TIMER_STATS=y
+CONFIG_SCHED_STACK_END_CHECK=y
 CONFIG_FUNCTION_TRACER=y
 # CONFIG_TRACING_EVENTS_GPIO is not set
+CONFIG_DEBUG_USER=y
 # CONFIG_CRYPTO_ECHAINIV is not set
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_SHA256=y
-CONFIG_CRYPTO_USER_API_HASH=y
 # CONFIG_CRYPTO_HW is not set
 # CONFIG_XZ_DEC_X86 is not set
 # CONFIG_XZ_DEC_POWERPC is not set
diff --git a/meta-openbmc-bsp/meta-aspeed/meta-ast2500/recipes-kernel/linux/linux-obmc/defconfig b/meta-openbmc-bsp/meta-aspeed/meta-ast2500/recipes-kernel/linux/linux-obmc/defconfig
index 86d5cca..d651779 100755
--- a/meta-openbmc-bsp/meta-aspeed/meta-ast2500/recipes-kernel/linux/linux-obmc/defconfig
+++ b/meta-openbmc-bsp/meta-aspeed/meta-ast2500/recipes-kernel/linux/linux-obmc/defconfig
@@ -1,6 +1,7 @@
 CONFIG_KERNEL_XZ=y
 # CONFIG_SWAP is not set
 CONFIG_SYSVIPC=y
+CONFIG_IRQ_DOMAIN_DEBUG=y
 CONFIG_NO_HZ_IDLE=y
 CONFIG_HIGH_RES_TIMERS=y
 CONFIG_IKCONFIG=y
@@ -11,15 +12,22 @@
 # CONFIG_RD_BZIP2 is not set
 # CONFIG_RD_LZO is not set
 # CONFIG_RD_LZ4 is not set
+CONFIG_KALLSYMS_ALL=y
 CONFIG_BPF_SYSCALL=y
 # CONFIG_AIO is not set
 CONFIG_EMBEDDED=y
 CONFIG_PERF_EVENTS=y
 # CONFIG_COMPAT_BRK is not set
 CONFIG_SLAB=y
+CONFIG_SLAB_FREELIST_RANDOM=y
 CONFIG_JUMP_LABEL=y
 CONFIG_GCC_PLUGINS=y
+CONFIG_CC_STACKPROTECTOR_STRONG=y
+CONFIG_STRICT_KERNEL_RWX=y
 # CONFIG_LBDAF is not set
+# CONFIG_IOSCHED_DEADLINE is not set
+# CONFIG_MQ_IOSCHED_DEADLINE is not set
+# CONFIG_MQ_IOSCHED_KYBER is not set
 CONFIG_ARCH_MULTI_V6=y
 # CONFIG_ARCH_MULTI_V7 is not set
 CONFIG_ARCH_ASPEED=y
@@ -27,7 +35,6 @@
 # CONFIG_CACHE_L2X0 is not set
 CONFIG_VMSPLIT_2G=y
 CONFIG_AEABI=y
-# CONFIG_CPU_SW_DOMAIN_PAN is not set
 # CONFIG_COMPACTION is not set
 CONFIG_SECCOMP=y
 # CONFIG_ATAGS is not set
@@ -52,7 +59,8 @@
 # CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
 # CONFIG_INET6_XFRM_MODE_TUNNEL is not set
 # CONFIG_INET6_XFRM_MODE_BEET is not set
-# CONFIG_IPV6_SIT is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_ADVANCED is not set
 CONFIG_VLAN_8021Q=y
 CONFIG_NET_NCSI=y
 # CONFIG_WIRELESS is not set
@@ -69,15 +77,16 @@
 CONFIG_MTD_UBI=y
 CONFIG_MTD_UBI_FASTMAP=y
 CONFIG_MTD_UBI_BLOCK=y
-CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_ASPEED_LPC_CTRL=y
 CONFIG_ASPEED_LPC_SNOOP=y
+CONFIG_ASPEED_LPC_MBOX=y
 CONFIG_EEPROM_AT24=y
 CONFIG_NETDEVICES=y
 CONFIG_NETCONSOLE=y
 # CONFIG_NET_VENDOR_ALACRITECH is not set
 # CONFIG_NET_VENDOR_AMAZON is not set
+# CONFIG_NET_VENDOR_AQUANTIA is not set
 # CONFIG_NET_VENDOR_ARC is not set
 # CONFIG_NET_CADENCE is not set
 # CONFIG_NET_VENDOR_BROADCOM is not set
@@ -98,15 +107,12 @@
 # CONFIG_NET_VENDOR_SOLARFLARE is not set
 # CONFIG_NET_VENDOR_SMSC is not set
 # CONFIG_NET_VENDOR_STMICRO is not set
-# CONFIG_NET_VENDOR_SYNOPSYS is not set
 # CONFIG_NET_VENDOR_VIA is not set
 # CONFIG_NET_VENDOR_WIZNET is not set
+# CONFIG_NET_VENDOR_SYNOPSYS is not set
 CONFIG_BROADCOM_PHY=y
 CONFIG_REALTEK_PHY=y
-# CONFIG_USB_NET_DRIVERS is not set
 # CONFIG_WLAN is not set
-# CONFIG_INPUT_LEDS is not set
-# CONFIG_INPUT_MOUSEDEV is not set
 CONFIG_INPUT_EVDEV=y
 # CONFIG_KEYBOARD_ATKBD is not set
 CONFIG_KEYBOARD_GPIO=y
@@ -145,6 +151,7 @@
 CONFIG_SENSORS_LM75=y
 CONFIG_SENSORS_NCT7904=y
 CONFIG_SENSORS_OCC=y
+CONFIG_SENSORS_OCC_P8_I2C=y
 CONFIG_SENSORS_OCC_P9_SBE=y
 CONFIG_PMBUS=y
 CONFIG_SENSORS_ADM1275=y
@@ -175,9 +182,7 @@
 CONFIG_RTC_DRV_DS1307=y
 CONFIG_RTC_DRV_PCF8523=y
 CONFIG_RTC_DRV_RV8803=y
-CONFIG_RTC_DRV_ASPEED=y
 CONFIG_MAILBOX=y
-CONFIG_ASPEED_LPC_MBOX=y
 # CONFIG_IOMMU_SUPPORT is not set
 CONFIG_IIO=y
 CONFIG_ASPEED_ADC=y
@@ -189,7 +194,7 @@
 CONFIG_FSI_MASTER_HUB=y
 CONFIG_FSI_SCOM=y
 CONFIG_FSI_SBEFIFO=y
-CONFIG_OCCFIFO=y
+CONFIG_FSI_OCC=y
 CONFIG_FIRMWARE_MEMMAP=y
 CONFIG_FANOTIFY=y
 CONFIG_OVERLAY_FS=y
@@ -203,19 +208,22 @@
 CONFIG_SQUASHFS_XZ=y
 CONFIG_PRINTK_TIME=y
 CONFIG_DYNAMIC_DEBUG=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_INFO_REDUCED=y
+CONFIG_DEBUG_INFO_DWARF4=y
+CONFIG_GDB_SCRIPTS=y
 CONFIG_STRIP_ASM_SYMS=y
-CONFIG_LOCKUP_DETECTOR=y
+CONFIG_SOFTLOCKUP_DETECTOR=y
+# CONFIG_DETECT_HUNG_TASK is not set
 CONFIG_WQ_WATCHDOG=y
+CONFIG_PANIC_ON_OOPS=y
 CONFIG_PANIC_TIMEOUT=-1
+# CONFIG_SCHED_DEBUG is not set
 CONFIG_SCHED_STACK_END_CHECK=y
-CONFIG_TIMER_STATS=y
 CONFIG_FUNCTION_TRACER=y
 # CONFIG_TRACING_EVENTS_GPIO is not set
 CONFIG_DEBUG_USER=y
 # CONFIG_CRYPTO_ECHAINIV is not set
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_SHA256=y
-CONFIG_CRYPTO_USER_API_HASH=y
 # CONFIG_CRYPTO_HW is not set
 # CONFIG_XZ_DEC_X86 is not set
 # CONFIG_XZ_DEC_POWERPC is not set
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.inc b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.inc
index 638861f..cae6050 100644
--- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.inc
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control.inc
@@ -2,4 +2,4 @@
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
 SRC_URI += "git://github.com/openbmc/openpower-occ-control"
-SRCREV = "1111087e39e61fb220b987542643ad9bf0a100c7"
+SRCREV = "e7d976b4d28ad30f563f300322df1dc6c4c38017"
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/sensors/phosphor-hwmon%.bbappend b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/sensors/phosphor-hwmon%.bbappend
index 1572980..03b2622 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/sensors/phosphor-hwmon%.bbappend
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/sensors/phosphor-hwmon%.bbappend
@@ -16,11 +16,11 @@
 ITEMS = "${@compose_list(d, 'ITEMSFMT', 'CHIPS')}"
 
 OCCS = " \
-       sbefifo@2400/occ@1/occ-hwmon@1 \
-       hub@3400/cfam@1,0/sbefifo@2400/occ@2/occ-hwmon@2 \
+       00--00--00--06/sbefifo1-dev0/occ-hwmon.1 \
+       00--00--00--0a/fsi1/slave@01--00/01--01--00--06/sbefifo2-dev0/occ-hwmon.2 \
        "
 
-OCCSFMT = "gpio-fsi/cfam@0,0/{0}.conf"
+OCCSFMT = "devices/platform/gpio-fsi/fsi0/slave@00--00/{0}.conf"
 OCCITEMS = "${@compose_list(d, 'OCCSFMT', 'OCCS')}"
 
 ENVS = "obmc/hwmon/{0}"
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/gpio-fsi/cfam@0,0/sbefifo@2400/occ@1/occ-hwmon@1.conf b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/devices/platform/gpio-fsi/fsi0/slave@00--00/00--00--00--06/sbefifo1-dev0/occ-hwmon.1.conf
similarity index 100%
rename from meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/gpio-fsi/cfam@0,0/sbefifo@2400/occ@1/occ-hwmon@1.conf
rename to meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/devices/platform/gpio-fsi/fsi0/slave@00--00/00--00--00--06/sbefifo1-dev0/occ-hwmon.1.conf
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/gpio-fsi/cfam@0,0/hub@3400/cfam@1,0/sbefifo@2400/occ@2/occ-hwmon@2.conf b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/devices/platform/gpio-fsi/fsi0/slave@00--00/00--00--00--0a/fsi1/slave@01--00/01--01--00--06/sbefifo2-dev0/occ-hwmon.2.conf
similarity index 100%
rename from meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/gpio-fsi/cfam@0,0/hub@3400/cfam@1,0/sbefifo@2400/occ@2/occ-hwmon@2.conf
rename to meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/devices/platform/gpio-fsi/fsi0/slave@00--00/00--00--00--0a/fsi1/slave@01--00/01--01--00--06/sbefifo2-dev0/occ-hwmon.2.conf
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%.bbappend b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%.bbappend
index 77fb0c0..1b88196 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%.bbappend
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%.bbappend
@@ -16,10 +16,10 @@
 WSPOON_ITEMS = "${@compose_list(d, 'WSPOON_ITEMSFMT', 'WSPOON_CHIPS')}"
 
 WSPOON_OCCS = " \
-              sbefifo@2400/occ@1/occ-hwmon@1 \
-              hub@3400/cfam@1,0/sbefifo@2400/occ@2/occ-hwmon@2 \
+              00--00--00--06/sbefifo1-dev0/occ-hwmon.1 \
+              00--00--00--0a/fsi1/slave@01--00/01--01--00--06/sbefifo2-dev0/occ-hwmon.2 \
               "
-WSPOON_OCCSFMT = "gpio-fsi/cfam@0,0/{0}.conf"
+WSPOON_OCCSFMT = "devices/platform/gpio-fsi/fsi0/slave@00--00/{0}.conf"
 WSPOON_OCCITEMS = "${@compose_list(d, 'WSPOON_OCCSFMT', 'WSPOON_OCCS')}"
 
 ENVS = "obmc/hwmon/{0}"
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/gpio-fsi/cfam@0,0/sbefifo@2400/occ@1/occ-hwmon@1.conf b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/devices/platform/gpio-fsi/fsi0/slave@00--00/00--00--00--06/sbefifo1-dev0/occ-hwmon.1.conf
similarity index 100%
rename from meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/gpio-fsi/cfam@0,0/sbefifo@2400/occ@1/occ-hwmon@1.conf
rename to meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/devices/platform/gpio-fsi/fsi0/slave@00--00/00--00--00--06/sbefifo1-dev0/occ-hwmon.1.conf
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/gpio-fsi/cfam@0,0/hub@3400/cfam@1,0/sbefifo@2400/occ@2/occ-hwmon@2.conf b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/devices/platform/gpio-fsi/fsi0/slave@00--00/00--00--00--0a/fsi1/slave@01--00/01--01--00--06/sbefifo2-dev0/occ-hwmon.2.conf
similarity index 100%
rename from meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/gpio-fsi/cfam@0,0/hub@3400/cfam@1,0/sbefifo@2400/occ@2/occ-hwmon@2.conf
rename to meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/devices/platform/gpio-fsi/fsi0/slave@00--00/00--00--00--0a/fsi1/slave@01--00/01--01--00--06/sbefifo2-dev0/occ-hwmon.2.conf
diff --git a/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%.bbappend b/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%.bbappend
index ecf9cb5..1aaa631 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%.bbappend
+++ b/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%.bbappend
@@ -6,10 +6,10 @@
 ZAIUS_ITEMS = "${@compose_list(d, 'ZAIUS_ITEMSFMT', 'ZAIUS_CHIPS')}"
 
 ZAIUS_OCCS = " \
-              sbefifo@2400/occ@1/occ-hwmon@1 \
-              hub@3400/cfam@1,0/sbefifo@2400/occ@2/occ-hwmon@2 \
+              00--00--00--06/sbefifo1-dev0/occ-hwmon.1 \
+              00--00--00--0a/fsi1/slave@01--00/01--01--00--06/sbefifo2-dev0/occ-hwmon.2 \
               "
-ZAIUS_OCCSFMT = "gpio-fsi/cfam@0,0/{0}.conf"
+ZAIUS_OCCSFMT = "devices/platform/gpio-fsi/fsi0/slave@00--00/{0}.conf"
 ZAIUS_OCCITEMS = "${@compose_list(d, 'ZAIUS_OCCSFMT', 'ZAIUS_OCCS')}"
 
 ENVS = "obmc/hwmon/{0}"
diff --git a/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/gpio-fsi/cfam@0,0/sbefifo@2400/occ@1/occ-hwmon@1.conf b/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/devices/platform/gpio-fsi/fsi0/slave@00--00/00--00--00--06/sbefifo1-dev0/occ-hwmon.1.conf
similarity index 100%
rename from meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/gpio-fsi/cfam@0,0/sbefifo@2400/occ@1/occ-hwmon@1.conf
rename to meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/devices/platform/gpio-fsi/fsi0/slave@00--00/00--00--00--06/sbefifo1-dev0/occ-hwmon.1.conf
diff --git a/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/gpio-fsi/cfam@0,0/hub@3400/cfam@1,0/sbefifo@2400/occ@2/occ-hwmon@2.conf b/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/devices/platform/gpio-fsi/fsi0/slave@00--00/00--00--00--0a/fsi1/slave@01--00/01--01--00--06/sbefifo2-dev0/occ-hwmon.2.conf
similarity index 100%
rename from meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/gpio-fsi/cfam@0,0/hub@3400/cfam@1,0/sbefifo@2400/occ@2/occ-hwmon@2.conf
rename to meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/devices/platform/gpio-fsi/fsi0/slave@00--00/00--00--00--0a/fsi1/slave@01--00/01--01--00--06/sbefifo2-dev0/occ-hwmon.2.conf
diff --git a/meta-phosphor/common/recipes-kernel/linux/linux-obmc/0001-ARM-dts-Aspeed-Witherspoon-Update-BMC-partitioning.patch b/meta-phosphor/common/recipes-kernel/linux/linux-obmc/0001-ARM-dts-Aspeed-Witherspoon-Update-BMC-partitioning.patch
index 3407f2f..f514ef2 100644
--- a/meta-phosphor/common/recipes-kernel/linux/linux-obmc/0001-ARM-dts-Aspeed-Witherspoon-Update-BMC-partitioning.patch
+++ b/meta-phosphor/common/recipes-kernel/linux/linux-obmc/0001-ARM-dts-Aspeed-Witherspoon-Update-BMC-partitioning.patch
@@ -1,4 +1,4 @@
-From 8b1e098b70d2701ad2b53d4527c2423b7c2f7ce1 Mon Sep 17 00:00:00 2001
+From 3e0b58ab998209b392a2870124503659245c2483 Mon Sep 17 00:00:00 2001
 From: "Edward A. James" <eajames@us.ibm.com>
 Date: Wed, 16 Aug 2017 07:58:56 -0500
 Subject: [PATCH] ARM: dts: Aspeed: Witherspoon: Update BMC partitioning
@@ -7,17 +7,18 @@
 default in Witherspoon.
 
 Signed-off-by: Edward A. James <eajames@us.ibm.com>
+Signed-off-by: Joel Stanley <joel@jms.id.au>
 ---
  .../boot/dts/aspeed-bmc-alt-opp-flash-layout-ubi.dtsi  | 18 ++++++++++++++++++
  arch/arm/boot/dts/aspeed-bmc-opp-flash-layout-ubi.dtsi | 18 ++++++++++++++++++
- arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts       |  5 +++--
- 3 files changed, 39 insertions(+), 2 deletions(-)
+ arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts       |  3 ++-
+ 3 files changed, 38 insertions(+), 1 deletion(-)
  create mode 100644 arch/arm/boot/dts/aspeed-bmc-alt-opp-flash-layout-ubi.dtsi
  create mode 100644 arch/arm/boot/dts/aspeed-bmc-opp-flash-layout-ubi.dtsi
 
 diff --git a/arch/arm/boot/dts/aspeed-bmc-alt-opp-flash-layout-ubi.dtsi b/arch/arm/boot/dts/aspeed-bmc-alt-opp-flash-layout-ubi.dtsi
 new file mode 100644
-index 0000000..9277599
+index 000000000000..927759950023
 --- /dev/null
 +++ b/arch/arm/boot/dts/aspeed-bmc-alt-opp-flash-layout-ubi.dtsi
 @@ -0,0 +1,18 @@
@@ -41,7 +42,7 @@
 +		};
 diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-flash-layout-ubi.dtsi b/arch/arm/boot/dts/aspeed-bmc-opp-flash-layout-ubi.dtsi
 new file mode 100644
-index 0000000..0059ad1
+index 000000000000..0059ad16d2ba
 --- /dev/null
 +++ b/arch/arm/boot/dts/aspeed-bmc-opp-flash-layout-ubi.dtsi
 @@ -0,0 +1,18 @@
@@ -64,25 +65,25 @@
 +				};
 +		};
 diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
-index dd30c20..51f965e 100644
+index b24ea9967fc8..0b69aa942e18 100644
 --- a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
 +++ b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
-@@ -174,12 +174,13 @@
+@@ -182,13 +182,14 @@
  		status = "okay";
+ 		label = "bmc";
  		m25p,fast-read;
- 
 -#include "openbmc-flash-layout.dtsi"
 +#include "aspeed-bmc-opp-flash-layout-ubi.dtsi"
  	};
+ 
  	flash@1 {
  		status = "okay";
--		label = "alt";
+ 		label = "alt";
  		m25p,fast-read;
-+
 +#include "aspeed-bmc-alt-opp-flash-layout-ubi.dtsi"
  	};
  };
  
 -- 
-1.8.3.1
+2.15.1
 
diff --git a/meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.10.bb b/meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.10.bb
deleted file mode 100644
index 4dc958d..0000000
--- a/meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.10.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-KBRANCH ?= "dev-4.10"
-LINUX_VERSION ?= "4.10.17"
-
-SRCREV="d7ccda2b787f8589c65f3943d854ee0ea9b69c50"
-
-require linux-obmc.inc
diff --git a/meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.13.bb b/meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.13.bb
new file mode 100644
index 0000000..ec7ee3e
--- /dev/null
+++ b/meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.13.bb
@@ -0,0 +1,6 @@
+KBRANCH ?= "dev-4.13"
+LINUX_VERSION ?= "4.13.16"
+
+SRCREV="462662bc3577d0c73e30cdc96eb28d63c89528df"
+
+require linux-obmc.inc
diff --git a/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon.bb b/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon.bb
index 9cc70dd..5bef75b 100644
--- a/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon.bb
+++ b/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon.bb
@@ -25,6 +25,7 @@
         sdbusplus \
         phosphor-dbus-interfaces \
         phosphor-logging \
+        bash \
         "
 
 RRECOMMENDS_${PN} += "${VIRTUAL-RUNTIME_phosphor-hwmon-config}"
@@ -35,6 +36,7 @@
 SRC_URI += "git://github.com/openbmc/phosphor-hwmon"
 SRC_URI += "file://70-hwmon.rules"
 SRC_URI += "file://70-iio.rules"
+SRC_URI += "file://start_hwmon.sh"
 
 SRCREV = "a23babd6952cb21397d6aa408a827047d1de81de"
 
@@ -45,4 +47,7 @@
         install -d ${D}/${base_libdir}/udev/rules.d/
         install ${WORKDIR}/70-hwmon.rules ${D}/${base_libdir}/udev/rules.d/
         install ${WORKDIR}/70-iio.rules ${D}/${base_libdir}/udev/rules.d/
+
+        install -d ${D}${bindir}
+        install -m 0755 ${WORKDIR}/start_hwmon.sh ${D}${bindir}
 }
diff --git a/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon/70-hwmon.rules b/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon/70-hwmon.rules
index 070d88f..503b2d0 100644
--- a/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon/70-hwmon.rules
+++ b/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon/70-hwmon.rules
@@ -1 +1,2 @@
-SUBSYSTEM=="hwmon", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="xyz.openbmc_project.Hwmon@%E{OF_FULLNAME}.service"
+SUBSYSTEM=="hwmon", ACTION=="add", RUN="/usr/bin/start_hwmon.sh start %p %E{OF_FULLNAME}"
+SUBSYSTEM=="hwmon", ACTION=="remove", RUN="/usr/bin/start_hwmon.sh stop %p %E{OF_FULLNAME}"
diff --git a/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon/70-iio.rules b/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon/70-iio.rules
index f332d11..45fb4b0 100644
--- a/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon/70-iio.rules
+++ b/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon/70-iio.rules
@@ -1 +1,2 @@
-SUBSYSTEM=="iio", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="xyz.openbmc_project.Hwmon@%E{OF_FULLNAME}.service"
+SUBSYSTEM=="iio", ACTION=="add", RUN="/usr/bin/start_hwmon.sh start %p %E{OF_FULLNAME}"
+SUBSYSTEM=="iio", ACTION=="remove", RUN="/usr/bin/start_hwmon.sh stop %p %E{OF_FULLNAME}"
diff --git a/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon/start_hwmon.sh b/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon/start_hwmon.sh
new file mode 100755
index 0000000..cde0f96
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon/start_hwmon.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+action=$1
+devpath=$2
+of_fullname=$3
+
+#Use of_fullname if it's there, otherwise use devpath.
+
+path=$of_fullname
+if [ -z "$path" ]
+then
+    path=$devpath
+
+    if [[ "$path" =~ (.*)/hwmon/hwmon[0-9]+$ ]];
+    then
+        path=${BASH_REMATCH[1]}
+    fi
+fi
+
+path="${path//:/--}"
+
+systemctl $action 'xyz.openbmc_project.Hwmon@'$path'.service'
diff --git a/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon/xyz.openbmc_project.Hwmon@.service b/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon/xyz.openbmc_project.Hwmon@.service
index 8dca3ad..9d3e263 100644
--- a/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon/xyz.openbmc_project.Hwmon@.service
+++ b/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon/xyz.openbmc_project.Hwmon@.service
@@ -1,11 +1,10 @@
 [Unit]
 Description=Phosphor Hwmon Poller
 ConditionFileNotEmpty=/etc/default/obmc/hwmon/%I.conf
-StopWhenUnneeded=true
 After=xyz.openbmc_project.ObjectMapper.service
 
 [Service]
-Restart=always
+Restart=on-failure
 ExecStart=/usr/bin/env phosphor-hwmon-readd -o %f
 SyslogIdentifier=phosphor-hwmon-readd
 EnvironmentFile=/etc/default/obmc/hwmon/%I.conf