diff options
6 files changed, 56 insertions, 269 deletions
diff --git a/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-kernel/linux/linux-obmc/0001-work-around-aspeed-bmc-opp-palmetto-Add-GPIO-hogs-to.patch b/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-kernel/linux/linux-obmc/0001-work-around-aspeed-bmc-opp-palmetto-Add-GPIO-hogs-to.patch deleted file mode 100644 index 038797b19..000000000 --- a/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-kernel/linux/linux-obmc/0001-work-around-aspeed-bmc-opp-palmetto-Add-GPIO-hogs-to.patch +++ /dev/null @@ -1,251 +0,0 @@ -From 5362492a7546230866dc4a45269bb3dae65306cb Mon Sep 17 00:00:00 2001 -From: Andrew Jeffery <andrew@aj.id.au> -Date: Fri, 2 Sep 2016 12:22:41 +0930 -Subject: [PATCH] work-around: aspeed-bmc-opp-palmetto: Add GPIO hogs to - devicetree - -This is a work-in-progress patch that attempts to emulate the GPIO -state originally written by the mach-aspeed board file. - -It isn't entirely analogous: Whilst values might be set in the GPIO -data/direction registers, this doesn't mean the GPIO IP was in control -of the pins affected by the bits in question. However, the content of -the patch is derived directly from the data and direction values that -Steve Faure reported[1] from a Palmetto running the OpenBMC stable branch. - -Secondly, the patch pays no regard to the prescribed active state of the lines -and assumes active high for all pins. This is not a reflection of the -description in the schematic, and neither do the configured GPIO values -necessarily reflect the prescribed initial values from the schematic. - -A starting point for the patch was generated from the following Python script: - - #!/usr/bin/python3 - import sys - - from collections import namedtuple - - GpioRegsetConfig = namedtuple("GpioRegsetConfig", "banks value direction") - banks = ( "ABCD", "EFGH" ) - - broken = ( - GpioRegsetConfig(banks[0], 0x130F8CE3, 0x01706074), - GpioRegsetConfig(banks[1], 0x9F48F7FF, 0x00004002) - ) - - working = ( - GpioRegsetConfig(banks[0], 0x130F8CE3, 0x0370E677), - GpioRegsetConfig(banks[1], 0x0370E677, 0xC738F202) - ) - - GpioConfig = namedtuple("GpioConfig", "bank index direction state active") - - def gpio_dt(name, config): - fmt = "pin_gpio_{} {{\n\tgpio-hog;\n\tgpios = <ASPEED_GPIO({}, {}) {}>;\n\t{};\n\tline-name = \"{}\";\n}};" - if "output" == config.direction: - state = "{}-{}".format(config.direction, config.state) - else: - state = config.direction - return fmt.format( - name.lower(), - config.bank, - config.index, - "GPIO_ACTIVE_HIGH", - state, - name) - - def tell_gpios(config, change): - for i, bank in enumerate(config.banks): - for j in range(0, 8): - bi = i * 8 + j; - if ((1 << bi) & change) > 0: - gpio = "{}{}".format(bank, j) - if (bi & config.direction) > 0: - sd = "output" - value = "high" if (bi & config.value) > 0 else "low" - else: - sd = "input" - value = None - dtconfig = GpioConfig(bank, j, sd, value, "GPIO_ACTIVE_HIGH") - print(gpio_dt(gpio, dtconfig)) - print() - - def main(): - for b, w in zip(broken, working): - cd = b.direction ^ w.direction - tell_gpios(w, cd) - - if __name__ == "__main__": - main() - -The generated patch was tested on a Pass 2 Palmetto. It was found that with the -patch and an OpenBMC userspace generated at v1.99.0-60-g2b717d8489c1, the host -could: - -* Boot to Petitboot -* Reboot to Petitboot -* Survive a reboot of the BMC (remain functional at the Petitboot shell) -* Be powered off by the BMC after reboot - -Reports from Andrew Geissler[2] and Cédric Le Goater[3] suggest mixed results -across the Palmetto fleet, but this patch at least represents a step forwards. - -For the above reasons and those below, this patch is a temporary work-around: - -* GPIOs configured as hogs cannot have their line state changed once initialised -* GPIOs configured as hogs will not be exposed to userspace even if requested - -These two issues combined deny capabilities such as Cronus. The ultimate -solution is userspace daemon(s) requesting and controlling the GPIOs as -desired. - -[1] https://github.com/openbmc/openbmc/issues/527#issuecomment-244239595 -[2] https://github.com/openbmc/openbmc/issues/513#issuecomment-244454018 -[3] https://github.com/openbmc/openbmc/issues/513#issuecomment-244414523 - -Signed-off-by: Andrew Jeffery <andrew@aj.id.au> ---- - arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 127 ++++++++++++++++++++++++++ - 1 file changed, 127 insertions(+) - -diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts b/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts -index 21619fd8cd8d..5c689613e5bd 100644 ---- a/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts -+++ b/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts -@@ -167,6 +167,133 @@ - output-low; - line-name = "func_mode2"; - }; -+ -+ pin_gpio_a0 { -+ gpio-hog; -+ gpios = <ASPEED_GPIO(A, 0) GPIO_ACTIVE_HIGH>; -+ input; -+ line-name = "A0"; -+ }; -+ -+ pin_gpio_a1 { -+ gpio-hog; -+ gpios = <ASPEED_GPIO(A, 1) GPIO_ACTIVE_HIGH>; -+ output-high; -+ line-name = "A1"; -+ }; -+ -+ pin_gpio_b1 { -+ gpio-hog; -+ gpios = <ASPEED_GPIO(B, 1) GPIO_ACTIVE_HIGH>; -+ output-high; -+ line-name = "B1"; -+ }; -+ -+ pin_gpio_b2 { -+ gpio-hog; -+ gpios = <ASPEED_GPIO(B, 2) GPIO_ACTIVE_HIGH>; -+ output-high; -+ line-name = "B2"; -+ }; -+ -+ pin_gpio_b7 { -+ gpio-hog; -+ gpios = <ASPEED_GPIO(B, 7) GPIO_ACTIVE_HIGH>; -+ output-high; -+ line-name = "B7"; -+ }; -+ -+ pin_gpio_d1 { -+ gpio-hog; -+ gpios = <ASPEED_GPIO(D, 1) GPIO_ACTIVE_HIGH>; -+ output-high; -+ line-name = "D1"; -+ }; -+ -+ pin_gpio_f1 { -+ gpio-hog; -+ gpios = <ASPEED_GPIO(F, 1) GPIO_ACTIVE_HIGH>; -+ input; -+ line-name = "F1"; -+ }; -+ -+ pin_gpio_f4 { -+ gpio-hog; -+ gpios = <ASPEED_GPIO(F, 4) GPIO_ACTIVE_HIGH>; -+ input; -+ line-name = "F4"; -+ }; -+ -+ pin_gpio_f5 { -+ gpio-hog; -+ gpios = <ASPEED_GPIO(F, 5) GPIO_ACTIVE_HIGH>; -+ input; -+ line-name = "F5"; -+ }; -+ -+ pin_gpio_f7 { -+ gpio-hog; -+ gpios = <ASPEED_GPIO(F, 7) GPIO_ACTIVE_HIGH>; -+ output-high; -+ line-name = "F7"; -+ }; -+ -+ pin_gpio_g3 { -+ gpio-hog; -+ gpios = <ASPEED_GPIO(G, 3) GPIO_ACTIVE_HIGH>; -+ output-high; -+ line-name = "G3"; -+ }; -+ -+ pin_gpio_g4 { -+ gpio-hog; -+ gpios = <ASPEED_GPIO(G, 4) GPIO_ACTIVE_HIGH>; -+ input; -+ line-name = "G4"; -+ }; -+ -+ pin_gpio_g5 { -+ gpio-hog; -+ gpios = <ASPEED_GPIO(G, 5) GPIO_ACTIVE_HIGH>; -+ input; -+ line-name = "G5"; -+ }; -+ -+ pin_gpio_h0 { -+ gpio-hog; -+ gpios = <ASPEED_GPIO(H, 0) GPIO_ACTIVE_HIGH>; -+ input; -+ line-name = "H0"; -+ }; -+ -+ pin_gpio_h1 { -+ gpio-hog; -+ gpios = <ASPEED_GPIO(H, 1) GPIO_ACTIVE_HIGH>; -+ input; -+ line-name = "H1"; -+ }; -+ -+ pin_gpio_h2 { -+ gpio-hog; -+ gpios = <ASPEED_GPIO(H, 2) GPIO_ACTIVE_HIGH>; -+ output-high; -+ line-name = "H2"; -+ }; -+ -+ pin_gpio_h6 { -+ gpio-hog; -+ gpios = <ASPEED_GPIO(H, 6) GPIO_ACTIVE_HIGH>; -+ output-high; -+ line-name = "H6"; -+ }; -+ -+ pin_gpio_h7 { -+ gpio-hog; -+ gpios = <ASPEED_GPIO(H, 7) GPIO_ACTIVE_HIGH>; -+ output-high; -+ line-name = "H7"; -+ }; -+ - }; - - &vuart { --- -2.7.4 - 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 e9a318297..b0cc79bd6 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 @@ -70,7 +70,7 @@ CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_BLOCK=y CONFIG_MTD_PARTITIONED_MASTER=y CONFIG_MTD_SPI_NOR=y -CONFIG_ASPEED_FLASH_SPI=y +CONFIG_SPI_ASPEED_SMC=y CONFIG_MTD_UBI=y CONFIG_MTD_UBI_FASTMAP=y CONFIG_MTD_UBI_BLOCK=y @@ -104,6 +104,7 @@ CONFIG_FTGMAC100=y # CONFIG_NET_VENDOR_VIA is not set # CONFIG_NET_VENDOR_WIZNET 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 @@ -124,21 +125,35 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y CONFIG_SERIAL_OF_PLATFORM=y CONFIG_SERIAL_ASPEED_VUART=y CONFIG_ASPEED_BT_IPMI_BMC=y -# CONFIG_HW_RANDOM is not set +CONFIG_HW_RANDOM=y +CONFIG_HW_RANDOM_TIMERIOMEM=y CONFIG_I2C=y CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MUX=y +CONFIG_I2C_MUX_PCA9541=y +CONFIG_I2C_MUX_PCA954x=y CONFIG_I2C_ASPEED=y +CONFIG_I2C_FSI=y +CONFIG_GPIOLIB=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_ASPEED=y +CONFIG_W1=y +CONFIG_W1_MASTER_GPIO=y +CONFIG_W1_SLAVE_THERM=y +CONFIG_SENSORS_IIO_HWMON=y CONFIG_SENSORS_LM75=y CONFIG_SENSORS_NCT7904=y -CONFIG_SENSORS_POWER8_OCC_I2C=y CONFIG_PMBUS=y # CONFIG_SENSORS_PMBUS is not set CONFIG_SENSORS_ADM1275=y +CONFIG_SENSORS_LM25066=y +CONFIG_SENSORS_UCD9000=y CONFIG_SENSORS_TMP421=y # CONFIG_HID is not set # CONFIG_USB_SUPPORT is not set CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y +CONFIG_LEDS_CLASS_FLASH=y CONFIG_LEDS_GPIO=y CONFIG_LEDS_TRIGGERS=y CONFIG_LEDS_TRIGGER_TIMER=y @@ -146,14 +161,19 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=y CONFIG_LEDS_TRIGGER_GPIO=y CONFIG_RTC_CLASS=y 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_MBOX=y +CONFIG_ASPEED_LPC_MBOX=y # CONFIG_IOMMU_SUPPORT is not set +CONFIG_IIO=y +CONFIG_ASPEED_ADC=y +CONFIG_BMP280=y CONFIG_FSI=y CONFIG_FSI_MASTER_GPIO=y +CONFIG_FSI_MASTER_HUB=y CONFIG_FSI_SCOM=y -CONFIG_FSI_I2C=y CONFIG_FIRMWARE_MEMMAP=y CONFIG_FANOTIFY=y CONFIG_AUTOFS4_FS=y diff --git a/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-kernel/linux/linux-obmc_%.bbappend b/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-kernel/linux/linux-obmc_%.bbappend index 6034b891b..6d7ae271e 100644 --- a/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-kernel/linux/linux-obmc_%.bbappend +++ b/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-kernel/linux/linux-obmc_%.bbappend @@ -1,3 +1,2 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" SRC_URI += "file://defconfig" -SRC_URI += "file://0001-work-around-aspeed-bmc-opp-palmetto-Add-GPIO-hogs-to.patch" 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 60d538229..9516b7219 100644 --- 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 @@ -73,7 +73,7 @@ CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_BLOCK=y CONFIG_MTD_PARTITIONED_MASTER=y CONFIG_MTD_SPI_NOR=y -CONFIG_ASPEED_FLASH_SPI=y +CONFIG_SPI_ASPEED_SMC=y CONFIG_MTD_UBI=y CONFIG_MTD_UBI_FASTMAP=y CONFIG_MTD_UBI_BLOCK=y @@ -107,11 +107,12 @@ CONFIG_FTGMAC100=y # CONFIG_NET_VENDOR_VIA is not set # CONFIG_NET_VENDOR_WIZNET 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_INPUT_KEYBOARD is not set +CONFIG_INPUT_EVDEV=y # CONFIG_INPUT_MOUSE is not set # CONFIG_SERIO is not set # CONFIG_VT is not set @@ -127,22 +128,35 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y CONFIG_SERIAL_OF_PLATFORM=y CONFIG_SERIAL_ASPEED_VUART=y CONFIG_ASPEED_BT_IPMI_BMC=y -# CONFIG_HW_RANDOM is not set +CONFIG_HW_RANDOM=y +CONFIG_HW_RANDOM_TIMERIOMEM=y CONFIG_I2C=y CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MUX=y +CONFIG_I2C_MUX_PCA9541=y +CONFIG_I2C_MUX_PCA954x=y CONFIG_I2C_ASPEED=y +CONFIG_I2C_FSI=y +CONFIG_GPIOLIB=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_ASPEED=y +CONFIG_W1=y +CONFIG_W1_MASTER_GPIO=y +CONFIG_W1_SLAVE_THERM=y +CONFIG_SENSORS_IIO_HWMON=y CONFIG_SENSORS_MAX31785=y CONFIG_SENSORS_LM75=y CONFIG_SENSORS_NCT7904=y -CONFIG_SENSORS_POWER8_OCC_I2C=y CONFIG_PMBUS=y CONFIG_SENSORS_ADM1275=y +CONFIG_SENSORS_LM25066=y CONFIG_SENSORS_UCD9000=y CONFIG_SENSORS_TMP421=y # CONFIG_HID is not set # CONFIG_USB_SUPPORT is not set CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y +CONFIG_LEDS_CLASS_FLASH=y CONFIG_LEDS_GPIO=y CONFIG_LEDS_TRIGGERS=y CONFIG_LEDS_TRIGGER_TIMER=y @@ -150,16 +164,21 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=y CONFIG_LEDS_TRIGGER_GPIO=y CONFIG_RTC_CLASS=y 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_MBOX=y +CONFIG_ASPEED_LPC_MBOX=y # CONFIG_IOMMU_SUPPORT is not set +CONFIG_IIO=y +CONFIG_ASPEED_ADC=y +CONFIG_BMP280=y CONFIG_FSI=y CONFIG_FSI_MASTER_GPIO=y +CONFIG_FSI_MASTER_HUB=y CONFIG_FSI_SBEFIFO=y CONFIG_OCCFIFO=y CONFIG_FSI_SCOM=y -CONFIG_FSI_I2C=y CONFIG_FIRMWARE_MEMMAP=y CONFIG_FANOTIFY=y CONFIG_AUTOFS4_FS=y 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 new file mode 100644 index 000000000..3a0dd9a64 --- /dev/null +++ b/meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.10.bb @@ -0,0 +1,6 @@ +KBRANCH ?= "dev-4.10" +LINUX_VERSION ?= "4.10.5" + +SRCREV="8736136e756ec127de0bbe2c7e2de683204d4512" + +require linux-obmc.inc diff --git a/meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.7.bb b/meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.7.bb deleted file mode 100644 index 1f4420bc1..000000000 --- a/meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.7.bb +++ /dev/null @@ -1,6 +0,0 @@ -KBRANCH ?= "dev-4.7" -LINUX_VERSION ?= "4.7.10" - -SRCREV="87950053ee336e99ea0f081695b314c962a0859c" - -require linux-obmc.inc |