summaryrefslogtreecommitdiffstats
path: root/meta-facebook/meta-wedge100/recipes-utils
diff options
context:
space:
mode:
authorTian Fang <tfang@fb.com>2015-12-14 22:08:40 -0800
committerTian Fang <tfang@fb.com>2015-12-15 09:49:21 -0800
commite65a7944211c70f6b5cfb6cedd73cc31105319de (patch)
tree067082251bc52bc6c09ca87feaa1352d0468a5ac /meta-facebook/meta-wedge100/recipes-utils
parent8a67fbdd0e251bb34d55992b0771edba1837d589 (diff)
downloadast2050-yocto-openbmc-e65a7944211c70f6b5cfb6cedd73cc31105319de.zip
ast2050-yocto-openbmc-e65a7944211c70f6b5cfb6cedd73cc31105319de.tar.gz
Sync to internal OpenBMC repo f926614
Diffstat (limited to 'meta-facebook/meta-wedge100/recipes-utils')
-rw-r--r--meta-facebook/meta-wedge100/recipes-utils/lm_sensors/files/wedge100.conf78
-rw-r--r--meta-facebook/meta-wedge100/recipes-utils/lm_sensors/lmsensors_%.bbappend10
-rw-r--r--meta-facebook/meta-wedge100/recipes-utils/oob-nic/oob-nic_%.bbappend5
-rw-r--r--meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/board_gpio_rev_table.py33
-rw-r--r--meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/board_gpio_table_v1.py107
-rw-r--r--meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/board_gpio_table_v2.py118
-rw-r--r--meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/data/wedge100-BMC-GPIO-DVT.csv104
-rw-r--r--meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/data/wedge100-BMC-GPIO-EVT.csv83
-rw-r--r--meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/openbmc_gpio_setup.py75
-rw-r--r--meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/setup_board.py22
-rw-r--r--meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/wedge100_gpio_parse.py102
-rw-r--r--meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/openbmc-gpio_%.bbappend36
-rw-r--r--meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/files/COPYING340
-rw-r--r--meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/files/board-utils.sh81
-rw-r--r--meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/files/disable_watchdog.sh6
-rw-r--r--meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/files/power-on.sh51
-rw-r--r--meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/files/wedge_power.sh187
-rw-r--r--meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/files/wedge_us_mac.sh38
-rw-r--r--meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/openbmc-utils_%.bbappend64
-rw-r--r--meta-facebook/meta-wedge100/recipes-utils/wedge-eeprom/libwedge-eeprom_0.1.bbappend18
20 files changed, 1558 insertions, 0 deletions
diff --git a/meta-facebook/meta-wedge100/recipes-utils/lm_sensors/files/wedge100.conf b/meta-facebook/meta-wedge100/recipes-utils/lm_sensors/files/wedge100.conf
new file mode 100644
index 0000000..770d343
--- /dev/null
+++ b/meta-facebook/meta-wedge100/recipes-utils/lm_sensors/files/wedge100.conf
@@ -0,0 +1,78 @@
+
+bus "i2c-3" "ast_i2c.3"
+
+bus "i2c-4" "ast_i2c.4"
+
+bus "i2c-8" "ast_i2c.8"
+
+chip "tmp75-i2c-3-48"
+ label temp1 "Outlet Middle Temp"
+ set temp1_max 70
+ set temp1_max_hyst 60
+
+chip "tmp75-i2c-3-49"
+ label temp1 "Inlet Middle Temp"
+ set temp1_max 70
+ set temp1_max_hyst 60
+
+chip "tmp75-i2c-3-4a"
+ label temp1 "Inlet Left Temp"
+ set temp1_max 70
+ set temp1_max_hyst 60
+
+chip "tmp75-i2c-3-4b"
+ label temp1 "Switch Temp"
+ set temp1_max 70
+ set temp1_max_hyst 60
+
+chip "tmp75-i2c-3-4c"
+ label temp1 "Inlet Right Temp"
+ set temp1_max 70
+ set temp1_max_hyst 60
+
+chip "tmp75-i2c-8-48"
+ label temp1 "Outlet Right Temp"
+ set temp1_max 70
+ set temp1_max_hyst 60
+
+chip "tmp75-i2c-8-49"
+ label temp1 "Outlet Left Temp"
+ set temp1_max 70
+ set temp1_max_hyst 60
+
+chip "fancpld-i2c-8-33"
+ label fan1 "Fan 1 front"
+ label fan2 "Fan 1 rear"
+ label fan3 "Fan 2 front"
+ label fan4 "Fan 2 rear"
+ label fan5 "Fan 3 front"
+ label fan6 "Fan 3 rear"
+ label fan7 "Fan 4 front"
+ label fan8 "Fan 4 rear"
+ label fan9 "Fan 5 front"
+ label fan10 "Fan 5 rear"
+
+chip "fb_panther_plus-*"
+ label temp1 "CPU Temp"
+ label temp2 "DIMM0 Temp"
+ ignore temp3
+ ignore temp4
+ ignore temp5
+
+chip "ast_adc-isa-0000"
+ ignore in0
+ ignore in1
+ ignore in2
+ ignore in3
+ ignore in4
+ label in5 "+1 Core Voltage"
+ label in6 "+1 Analog Voltage"
+ label in7 "+5 Voltage"
+ label in8 "+3.3 Voltage"
+ label in9 "+2.5 Voltage"
+ ignore in10
+ ignore in11
+ ignore in12
+ ignore in13
+ ignore in14
+ ignore in15
diff --git a/meta-facebook/meta-wedge100/recipes-utils/lm_sensors/lmsensors_%.bbappend b/meta-facebook/meta-wedge100/recipes-utils/lm_sensors/lmsensors_%.bbappend
new file mode 100644
index 0000000..23a3cc3
--- /dev/null
+++ b/meta-facebook/meta-wedge100/recipes-utils/lm_sensors/lmsensors_%.bbappend
@@ -0,0 +1,10 @@
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI += "file://wedge100.conf \
+ "
+
+do_install_board_config() {
+ install -d ${D}${sysconfdir}/sensors.d
+ install -m 644 ../wedge100.conf ${D}${sysconfdir}/sensors.d/wedge100.conf
+}
diff --git a/meta-facebook/meta-wedge100/recipes-utils/oob-nic/oob-nic_%.bbappend b/meta-facebook/meta-wedge100/recipes-utils/oob-nic/oob-nic_%.bbappend
new file mode 100644
index 0000000..6f46ea6
--- /dev/null
+++ b/meta-facebook/meta-wedge100/recipes-utils/oob-nic/oob-nic_%.bbappend
@@ -0,0 +1,5 @@
+# No OOB NIC on wedge100. Just copy the i2craw
+do_install() {
+ install -d ${D}${sbindir}
+ install -m 755 i2craw ${D}${sbindir}/i2craw
+}
diff --git a/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/board_gpio_rev_table.py b/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/board_gpio_rev_table.py
new file mode 100644
index 0000000..353944e
--- /dev/null
+++ b/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/board_gpio_rev_table.py
@@ -0,0 +1,33 @@
+# Copyright 2015-present Facebook. All rights reserved.
+#
+# This program file 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; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program in a file named COPYING; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301 USA
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
+from openbmc_gpio_table import BoardGPIO
+
+# The fallowing table is generated using:
+# python wedge100_gpio_parser.py data/wedge100-BMC-gpio.csv
+# DO NOT MODIFY THE TABLE!!!
+# Manual modification will be overridden!!!
+
+board_gpio_rev_table = [
+ BoardGPIO('GPIOY0', 'BOARD_REV_ID0'),
+ BoardGPIO('GPIOY1', 'BOARD_REV_ID1'),
+ BoardGPIO('GPIOY2', 'BOARD_REV_ID2'),
+]
diff --git a/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/board_gpio_table_v1.py b/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/board_gpio_table_v1.py
new file mode 100644
index 0000000..d51bafb
--- /dev/null
+++ b/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/board_gpio_table_v1.py
@@ -0,0 +1,107 @@
+# Copyright 2015-present Facebook. All rights reserved.
+#
+# This program file 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; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program in a file named COPYING; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301 USA
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
+from openbmc_gpio_table import BoardGPIO
+
+
+# The fallowing table is generated using:
+# python wedge100_gpio_parser.py data/wedge100-BMC-gpio.csv
+# DO NOT MODIFY THE TABLE!!!
+# Manual modification will be overridden!!!
+
+board_gpio_table_v1 = [
+ BoardGPIO('GPIOB0', 'PANTHER_I2C_ALERT_N'),
+ BoardGPIO('GPIOB1', 'MSERV_NIC_SMBUS_ALERT_N'),
+ BoardGPIO('GPIOB2', 'DEBUG_PORT_UART_SEL_N'),
+ BoardGPIO('GPIOB4', 'LED_POSTCODE_4'),
+ BoardGPIO('GPIOB5', 'LED_POSTCODE_5'),
+ BoardGPIO('GPIOB6', 'LED_POSTCODE_6'),
+ BoardGPIO('GPIOB7', 'LED_POSTCODE_7'),
+ BoardGPIO('GPIOC2', 'ISO_BUF_EN'),
+ BoardGPIO('GPIOD0', 'BMC_PWR_BTN_IN_N'),
+ BoardGPIO('GPIOD1', 'BMC_PWR_BTN_OUT_N'),
+ BoardGPIO('GPIOD2', 'BMC_CPLD_RESET1'),
+ BoardGPIO('GPIOD3', 'BMC_CPLD_RESET2'),
+ BoardGPIO('GPIOD4', 'BMC_CPLD_RESET3'),
+ BoardGPIO('GPIOD5', 'BMC_CPLD_RESET4'),
+ BoardGPIO('GPIOD7', 'BMC_CPLD_QSFP_INT'),
+ BoardGPIO('GPIOE0', 'DEBUG_UART_SEL_0'),
+ BoardGPIO('GPIOE2', 'SWITCH_EEPROM1_WRT'),
+ BoardGPIO('GPIOE4', 'ISO_MICROSRV_PRSNT_N'),
+ BoardGPIO('GPIOE5', 'LED_PWR_BLUE'),
+ BoardGPIO('GPIOF0', 'MSERVE_ISOBUF_EN'),
+ BoardGPIO('GPIOF1', 'BMC_MAIN_RESET_N'),
+ BoardGPIO('GPIOF2', 'CPLD_JTAG_SEL'),
+ BoardGPIO('GPIOF4', 'MSERV_POWERUP'),
+ BoardGPIO('GPIOF5', 'RCKMON_RS485_DE'),
+ BoardGPIO('GPIOG0', 'LED_POSTCODE_0'),
+ BoardGPIO('GPIOG1', 'LED_POSTCODE_1'),
+ BoardGPIO('GPIOG2', 'LED_POSTCODE_2'),
+ BoardGPIO('GPIOG3', 'LED_POSTCODE_3'),
+ BoardGPIO('GPIOG4', 'BMC_WDTRST1'),
+ BoardGPIO('GPIOG5', 'BMC_WDTRST2'),
+ BoardGPIO('GPIOH3', 'QSFP_LED_POSITION'),
+ BoardGPIO('GPIOH4', 'PM_SM_ALERT_N'),
+ BoardGPIO('GPIOI4', 'BMC_EEPROM1_SPI_SS'),
+ BoardGPIO('GPIOI5', 'BMC_EEPROM1_SPI_SCK'),
+ BoardGPIO('GPIOI6', 'BMC_EEPROM1_SPI_MOSI'),
+ BoardGPIO('GPIOI7', 'BMC_EEPROM1_SPI_MISO'),
+ BoardGPIO('GPIOJ0', 'RCKMON_SPARE0'),
+ BoardGPIO('GPIOJ1', 'RCKMON_SPARE1'),
+ BoardGPIO('GPIOJ2', 'RCKMON_SPARE2'),
+ BoardGPIO('GPIOJ3', 'RCKMON_SPARE3'),
+ BoardGPIO('GPIOJ4', 'FANCARD_CPLD_TMS'),
+ BoardGPIO('GPIOJ5', 'FANCARD_CPLD_TCK'),
+ BoardGPIO('GPIOJ6', 'FANCARD_CPLD_TDI'),
+ BoardGPIO('GPIOJ7', 'FANCARD_CPLD_TDO'),
+ BoardGPIO('GPIOL5', 'BMC_UART_1_RTS'),
+ BoardGPIO('GPIOM0', 'CPLD_UPD_EN'),
+ BoardGPIO('GPIOM1', 'SMB_ALERT'),
+ BoardGPIO('GPIOM3', 'TH_POWERUP'),
+ BoardGPIO('GPIOM4', 'BMC_CPLD_TMS'),
+ BoardGPIO('GPIOM5', 'BMC_CPLD_TDI'),
+ BoardGPIO('GPIOM6', 'BMC_CPLD_TCK'),
+ BoardGPIO('GPIOM7', 'BMC_CPLD_TDO'),
+ BoardGPIO('GPIOO0', 'RCKMON_SPARE4'),
+ BoardGPIO('GPIOO1', 'RCKMON_SPARE5'),
+ BoardGPIO('GPIOO2', 'RCKMON_SPARE10'),
+ BoardGPIO('GPIOO3', 'RCKMON_SPARE11'),
+ BoardGPIO('GPIOO4', 'RCKMON_SPARE8'),
+ BoardGPIO('GPIOO5', 'RCKMON_SPARE9'),
+ BoardGPIO('GPIOO6', 'RCKMON_SPARE6'),
+ BoardGPIO('GPIOO7', 'RCKMON_SPARE7'),
+ BoardGPIO('GPIOP0', 'RMON1_PF'),
+ BoardGPIO('GPIOP1', 'RMON1_RF'),
+ BoardGPIO('GPIOP2', 'RMON2_PF'),
+ BoardGPIO('GPIOP3', 'RMON2_RF'),
+ BoardGPIO('GPIOP4', 'RMON3_PF'),
+ BoardGPIO('GPIOP5', 'RMON3_RF'),
+ BoardGPIO('GPIOP6', 'FANCARD_I2C_ALARM'),
+ BoardGPIO('GPIOP7', 'BMC_READY_N'),
+ BoardGPIO('GPIOQ4', 'BMC_CPLD_POWER_INT'),
+ BoardGPIO('GPIOQ5', 'BMC_CPLD_SPARE7'),
+ BoardGPIO('GPIOQ6', 'USB_OCS_N1'),
+ BoardGPIO('GPIOQ7', 'BMC_HEARTBEAT_N'),
+ BoardGPIO('GPIOR0', 'SPI_IBMC_BT_CS1_N_R'),
+ BoardGPIO('GPIOR6', 'SWITCH_MDC'),
+ BoardGPIO('GPIOR7', 'SWITCH_MDIO'),
+ BoardGPIO('GPIOS0', 'BMC_SPI_WP_N'),
+]
diff --git a/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/board_gpio_table_v2.py b/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/board_gpio_table_v2.py
new file mode 100644
index 0000000..a95ecf4
--- /dev/null
+++ b/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/board_gpio_table_v2.py
@@ -0,0 +1,118 @@
+# Copyright 2015-present Facebook. All rights reserved.
+#
+# This program file 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; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program in a file named COPYING; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301 USA
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
+from openbmc_gpio_table import BoardGPIO
+
+
+# The fallowing table is generated using:
+# python wedge100_gpio_parser.py data/wedge100-BMC-gpio.csv
+# DO NOT MODIFY THE TABLE!!!
+# Manual modification will be overridden!!!
+
+board_gpio_table_v2 = [
+ BoardGPIO('GPIOB0', 'PANTHER_I2C_ALERT_N'),
+ BoardGPIO('GPIOB1', 'MSERV_NIC_SMBUS_ALERT_N'),
+ BoardGPIO('GPIOB2', 'DEBUG_PORT_UART_SEL_N'),
+ BoardGPIO('GPIOB5', 'LED_POSTCODE_5'),
+ BoardGPIO('GPIOB6', 'LED_POSTCODE_6'),
+ BoardGPIO('GPIOB7', 'LED_POSTCODE_7'),
+ BoardGPIO('GPIOC2', 'ISO_BUF_EN'),
+ BoardGPIO('GPIOD0', 'BMC_PWR_BTN_IN_N'),
+ BoardGPIO('GPIOD1', 'BMC_PWR_BTN_OUT_N'),
+ BoardGPIO('GPIOD2', 'BMC_CPLD_RESET1'),
+ BoardGPIO('GPIOD3', 'BMC_CPLD_RESET2'),
+ BoardGPIO('GPIOD4', 'BMC_CPLD_RESET3'),
+ BoardGPIO('GPIOD5', 'BMC_CPLD_RESET4'),
+ BoardGPIO('GPIOD7', 'BMC_CPLD_QSFP_INT'),
+ BoardGPIO('GPIOE0', 'DEBUG_UART_SEL_0'),
+ BoardGPIO('GPIOE2', 'SWITCH_EEPROM1_WRT'),
+ BoardGPIO('GPIOE4', 'ISO_MICROSRV_PRSNT_N'),
+ BoardGPIO('GPIOE5', 'LED_PWR_BLUE'),
+ BoardGPIO('GPIOF0', 'MSERVE_ISOBUF_EN'),
+ BoardGPIO('GPIOF1', 'BMC_MAIN_RESET_N'),
+ BoardGPIO('GPIOF2', 'CPLD_JTAG_SEL'),
+ BoardGPIO('GPIOF4', 'MSERV_POWERUP'),
+ BoardGPIO('GPIOF5', 'BMC_UART_4_RTS'),
+ BoardGPIO('GPIOG0', 'LED_POSTCODE_0'),
+ BoardGPIO('GPIOG1', 'LED_POSTCODE_1'),
+ BoardGPIO('GPIOG2', 'LED_POSTCODE_2'),
+ BoardGPIO('GPIOG3', 'LED_POSTCODE_3'),
+ BoardGPIO('GPIOG4', 'BMC_WDTRST1'),
+ BoardGPIO('GPIOG5', 'BMC_WDTRST2'),
+ BoardGPIO('GPIOG6', 'BMC_COM_NIC_ISOBUF_EN'),
+ BoardGPIO('GPIOG7', 'BMC_COM_PANTHER_ISOBUF_EN'),
+ BoardGPIO('GPIOH3', 'QSFP_LED_POSITION'),
+ BoardGPIO('GPIOH4', 'PM_SM_ALERT_N'),
+ BoardGPIO('GPIOI4', 'BMC_EEPROM1_SPI_SS'),
+ BoardGPIO('GPIOI5', 'BMC_EEPROM1_SPI_SCK'),
+ BoardGPIO('GPIOI6', 'BMC_EEPROM1_SPI_MOSI'),
+ BoardGPIO('GPIOI7', 'BMC_EEPROM1_SPI_MISO'),
+ BoardGPIO('GPIOJ0', 'RCKMON_SPARE0'),
+ BoardGPIO('GPIOJ1', 'RCKMON_SPARE1'),
+ BoardGPIO('GPIOJ2', 'RCKMON_SPARE2'),
+ BoardGPIO('GPIOJ3', 'RCKMON_SPARE3'),
+ BoardGPIO('GPIOJ4', 'FANCARD_CPLD_TMS'),
+ BoardGPIO('GPIOJ5', 'FANCARD_CPLD_TCK'),
+ BoardGPIO('GPIOJ6', 'FANCARD_CPLD_TDI'),
+ BoardGPIO('GPIOJ7', 'FANCARD_CPLD_TDO'),
+ BoardGPIO('GPIOL5', 'BMC_UART_1_RTS'),
+ BoardGPIO('GPIOM0', 'CPLD_UPD_EN'),
+ BoardGPIO('GPIOM1', 'SMB_ALERT'),
+ BoardGPIO('GPIOM3', 'TH_POWERUP'),
+ BoardGPIO('GPIOM4', 'BMC_CPLD_TMS'),
+ BoardGPIO('GPIOM5', 'BMC_CPLD_TDI'),
+ BoardGPIO('GPIOM6', 'BMC_CPLD_TCK'),
+ BoardGPIO('GPIOM7', 'BMC_CPLD_TDO'),
+ BoardGPIO('GPION0', 'ISO_COM_SUS_S3_N'),
+ BoardGPIO('GPION1', 'ISO_COM_SUS_S4_N'),
+ BoardGPIO('GPION2', 'ISO_COM_SUS_S5_N'),
+ BoardGPIO('GPION3', 'ISO_COM_SUS_STAT_N'),
+ BoardGPIO('GPION4', 'ISO_COM_BRG_WDT'),
+ BoardGPIO('GPION5', 'BRG_COM_BIOS_DIS0_N'),
+ BoardGPIO('GPION6', 'BRG_COM_BIOS_DIS1_N'),
+ BoardGPIO('GPION7', 'ISO_COM_PWROK'),
+ BoardGPIO('GPIOO0', 'COM_SPI_SEL'),
+ BoardGPIO('GPIOO1', 'COM6_BUF_EN'),
+ BoardGPIO('GPIOO2', 'RCKMON_SPARE4'),
+ BoardGPIO('GPIOO3', 'RCKMON_SPARE5'),
+ BoardGPIO('GPIOO4', 'TPM_SPI_SEL'),
+ BoardGPIO('GPIOO5', 'TPM_SPI_BUF_EN'),
+ BoardGPIO('GPIOO6', 'ISO_BRG_THRMTRIP_N'),
+ BoardGPIO('GPIOO7', 'ISO_BRG_THRM_N'),
+ BoardGPIO('GPIOP0', 'RMON1_PF'),
+ BoardGPIO('GPIOP1', 'RMON1_RF'),
+ BoardGPIO('GPIOP2', 'RMON2_PF'),
+ BoardGPIO('GPIOP3', 'RMON2_RF'),
+ BoardGPIO('GPIOP4', 'RMON3_PF'),
+ BoardGPIO('GPIOP5', 'RMON3_RF'),
+ BoardGPIO('GPIOP6', 'FANCARD_I2C_ALARM'),
+ BoardGPIO('GPIOP7', 'BMC_READY_N'),
+ BoardGPIO('GPIOQ4', 'BMC_CPLD_POWER_INT'),
+ BoardGPIO('GPIOQ5', 'BMC_CPLD_SPARE7'),
+ BoardGPIO('GPIOQ6', 'USB_OCS_N1'),
+ BoardGPIO('GPIOQ7', 'BMC_HEARTBEAT_N'),
+ BoardGPIO('GPIOR0', 'SPI_IBMC_BT_CS1_N_R'),
+ BoardGPIO('GPIOR6', 'SWITCH_MDC'),
+ BoardGPIO('GPIOR7', 'SWITCH_MDIO'),
+ BoardGPIO('GPIOS0', 'BMC_SPI_WP_N'),
+ BoardGPIO('GPIOY3', 'LED_POSTCODE_4'),
+]
+
diff --git a/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/data/wedge100-BMC-GPIO-DVT.csv b/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/data/wedge100-BMC-GPIO-DVT.csv
new file mode 100644
index 0000000..1ded15c
--- /dev/null
+++ b/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/data/wedge100-BMC-GPIO-DVT.csv
@@ -0,0 +1,104 @@
+J21,GPIOB0_SALT1,In,PANTHER_I2C_ALERT_N,panther i2c alert_n
+J20,GPIOB1_SALT2,In,MSERV_NIC_SMBUS_ALERT_N,"micro server NIC SMBUS alert_n, active low"
+H18,GPIOB2_SALT3,In,DEBUG_PORT_UART_SEL_N,The DEBUG_PORT_UART_SEL_N is connected to a push button in the front panel. When Debug port select button in Front panel is pressed DEBUG_PORT_UART_SEL_N becomes low.
+E19,GPIOB4_LPCRST_N,Out,LPC_RST_N,Signal to reset LPC
+H19,GPIOB5_LPCPD_N_LPCSMI_N,Out,LED_POSTCODE_5,LED 7-segment code bit-5 for facebook debug header
+H20,GPIOB6_LPCPME_N,Out,LED_POSTCODE_6,LED 7-segment code bit-6 for facebook debug header
+E18,GPIOB7_EXTRST_N_SPICS1_N,Out,LED_POSTCODE_7,LED 7-segment code bit-7 for facebook debug header
+A2,GPIOC2_SD1DAT0_SCL11,Out,ISO_BUF_EN,"reserved for ISO_BUFFER control, in default serial resister is depop, use CPLD to control"
+A18,GPIOD0_SD2CLK,,BMC_PWR_BTN_IN_N,to emulate Microserver power button function using BMC
+D16,GPIOD1_SD2CMD,,BMC_PWR_BTN_OUT_N,
+B17,GPIOD2_SD2DAT0,Out,BMC_CPLD_RESET1,Spare Reset signal connected to CPLD
+A17,GPIOD3_SD2DAT1,Out,BMC_CPLD_RESET2,Spare Reset signal connected to CPLD
+C16,GPIOD4_SD2DAT2,Out,BMC_CPLD_RESET3,Spare Reset signal connected to CPLD (USB_BRDG RST function moved to CPLD)
+B16,GPIOD5_SD2DAT3,Out,BMC_CPLD_RESET4,Spare Reset signal connected to CPLD
+E15,GPIOD7_SD2WP_N,In,BMC_CPLD_QSFP_INT,Intrerrupt from CPLD to BMC for any QSFP events (USB RESET function moved to CPLD)
+D15,GPIOE0_NCTS3,Out,DEBUG_UART_SEL_0,FB debug connector UART select 0: BMC uART 1: microserver UART
+B15,GPIOE2_NDSR3,out,SWITCH_EEPROM1_WRT,"0: BCM5387 SPI interface connect to SPI EEPROM
+1: BCM5387 SPI interface connect to BMC SPI EEPROM interface
+this bit is used as BCM5387 straping configuration too"
+E14,GPIOE4_NDTR3,in,ISO_MICROSRV_PRSNT_N,"0: Microserver is present in PCIe slot
+1: microserver is not present in PCIe slot"
+D14,GPIOE5_NRTS3,out,LED_PWR_BLUE,"Power LED blue will be ON when LED_PWR_BLUE is high.
+Power LED blue will be off when LED_PWR_BLUE is low"
+D18,GPIOF0_NCTS4,Out,MSERVE_ISOBUF_EN,To enable isolation buffer dedicated for microserver com port
+B19,GPIOF1_NDCD4_SIOPBI_N,Out,BMC_MAIN_RESET_N,BMC can request cpld to reset main power
+A20,GPIOF2_NDSR4_SIOPWRGD,Out,CPLD_JTAG_SEL,"SYSCPLD upgrade enable, 0: jtag header program, 1: BMC programming"
+B18,GPIOF4_NDTR4,Out,MSERV_POWERUP,To request cpld to turn on P12_uServer for microserver
+A19,GPIOF5_NRTS4_SIOSCI_N,Out,BMC_UART_4_RTS,BMC com port 4 rts to cpld
+E16,GPIOF6_TXD4,In,BMC_UART_4_TX,BMC com port to cpld
+C17,GPIOF7_RXD4,Out,BMC_UART_4_RX,BMC com port to cpld
+A14,GPIOG0_SGPSCK,Out,LED_POSTCODE_0,LED 7-segment code bit-0 for facebook debug header
+E13,GPIOG1_SGPSLD,Out,LED_POSTCODE_1,LED 7-segment code bit-1 for facebook debug header
+D13,GPIOG2_SGPSI0,Out,LED_POSTCODE_2,LED 7-segment code bit-2 for facebook debug header
+C13,GPIOG3_SGPSI1,Out,LED_POSTCODE_3,LED 7-segment code bit-3 for facebook debug header
+B13,GPIOG4_WDTRST1_OSCCLK,Out,BMC_WDTRST1,Watch dog timer reset1 output from BMC to CPLD
+Y21,GPIOG5_WDTRST2_USBCKI,Out,BMC_WDTRST2,Watch dog timer reset2 output from BMC to CPLD
+AA22,GPIOG6_FLBUSY_N,Out,BMC_COM_NIC_ISOBUF_EN,Active low signal to enable the isolation buffer for SMBUS to COMe
+U18,GPIOG7_FLWP_N,Out,BMC_COM_PANTHER_ISOBUF_EN,Active low signal to enable the isolation buffer for I2C BUS to COMe
+A7,GPIOH3_ROMD11_NRI6,In,QSFP_LED_POSITION,QSFP position select input
+D7,GPIOH4_ROMD12_NDTR6,In,PM_SM_ALERT_N,SM bus alert from power manager (also connected to CPLD)
+C22,GPIOI0_SYSCS_N,Out,BMC_TPM_SPI_CS_N,BMC SPI interface to SPI based TPM
+G18,GPIOI1_SYSCK,Out,BMC_TPM_SPI_CLK,BMC SPI interface to SPI based TPM
+D19,GPIOI2_SYSDO,Out,BMC_TPM_SPI_MOSI,BMC SPI interface to SPI based TPM
+C20,GPIOI3_SYSDI,In,BMC_TPM_SPI_MISO,BMC SPI interface to SPI based TPM
+B22,GPIOI4_SPICS0_N_VBCS_N,Out,BMC_EEPROM1_SPI_SS,"BMC SPI EEPROM interface connect to BCM5387 switch if SWITCH_EEPRM1_WRT is 1, "
+G19,GPIOI5_SPICK_VBCK,Out,BMC_EEPROM1_SPI_SCK,
+C18,GPIOI6_SPIDO_VBDO,Out,BMC_EEPROM1_SPI_MOSI,
+E20,GPIOI7_SPIDI_VBDI,In,BMC_EEPROM1_SPI_MISO,
+J5,GPIOJ0_SGPMCK,Bi,RCKMON_SPARE0,Spare gpios to rack mon card
+J4,GPIOJ1_SGPMLD,Bi,RCKMON_SPARE1,Spare gpios to rack mon card
+K5,GPIOJ2_SGPMO,Bi,RCKMON_SPARE2,Spare gpios to rack mon card
+J3,GPIOJ3_SGPMI,Bi,RCKMON_SPARE3,Spare gpios to rack mon card
+T4,VGAHS_GPIOJ4,,FANCARD_CPLD_TMS,"fancard CPLD JTAG upgrade interface, BMC output to CPLD TMS"
+U2,VGAVS_GPIOJ5,,FANCARD_CPLD_TCK,"fancard CPLD JTAG upgrade interface, BMC output to CPLD TCK"
+T2,DDCCLK_GPIOJ6,,FANCARD_CPLD_TDI,"fancard CPLD JTAG upgrade interface, BMC output to CPLD TDI"
+T1,DDCDAT_GPIOJ7,,FANCARD_CPLD_TDO,"fancard CPLD JTAG upgrade interface, BMC input to CPLD TDO"
+V2,GPIOL5_NRTS1_VPICLK,Out,BMC_UART_1_RTS,connect to SYSCPLD
+W1,GPIOL6_TXD1_VPIB0,Out,BMC_UART_TX_1,connect to SYSCPLD
+U5,GPIOL7_RXD1_VPIB1,In,BMC_UART_RX_1,connect to SYSCPLD
+V3,GPIOM0_NCTS2_VPIB2,Out,CPLD_UPD_EN,"fan_card CPLD upgrade enable, 0: jtag header programming, 1: BMC programming"
+W2,GPIOM1_NDCD2_VPIB3,In,SMB_ALERT,"Alert signal from cpld representing Alert from the power supplies(Vcore,vanlg,3.3)"
+V4,GPIOM3_NRI2_VPIB5,out,TH_POWERUP,"tomahawk power up enable, active high. Connect to CPLD, cpld will control pwr1014a"
+W3,GPIOM4_NDTR2_VPIB6,out,BMC_CPLD_TMS,"SYSCPLD CPLD JTAG upgrade interface, BMC output to SYSCPLD TMS"
+Y2,GPIOM5_NRTS2_VPIB7,out,BMC_CPLD_TDI,"SYSCPLD CPLD JTAG upgrade interface, BMC output to SYSCPLD TDI"
+AA1,GPIOM6_TXD2_VPIB8,out,BMC_CPLD_TCK,"SYSCPLD CPLD JTAG upgrade interface, BMC output to SYSCPLD TCK"
+V5,GPIOM7_RXD2_VPIB9,In,BMC_CPLD_TDO,"SYSCPLD CPLD JTAG upgrade interface, BMC output to SYSCPLD TDO"
+W4,GPION0_PWM0_VPIG0,In,ISO_COM_SUS_S3_N,s3 sleep signal from com(COME Signal)
+Y3,GPION1_PWM1_VPIG1,In,ISO_COM_SUS_S4_N,s4 sleep signal from com (COME Signal)
+AA2,GPION2_PWM2_VPIG2,In,ISO_COM_SUS_S5_N,s5 sleep signal from com (COME Signal)
+AB1,GPION3_PWM3_VPIG3,In,ISO_COM_SUS_STAT_N,suspend status signal from com (COME Signal)
+W5,GPION4_PWM4_VPIG4,In,ISO_COM_BRG_WDT,watch dog timer output from com(COME Signal)
+Y4,GPION5_PWM5_VPIG5,Out,BRG_COM_BIOS_DIS0_N,BMC can select the bootdevice of COM (COME Signal)
+AA3,GPION6_PWM6_VPIG6,Out,BRG_COM_BIOS_DIS1_N,BMC can select the bootdevice of COM (COME Signal)
+AB2,GPION7_PWM7_VPIG7,Out,ISO_COM_PWROK,com power ok signal from BMC (COME Signal)
+V6,GPIOO0_TACH0_VPIG8,Out,COM_SPI_SEL,"override signal from bmc to select bmc to upgrade com eeprom
+0:On board spi flash
+1:BMC can write into SPI flash"
+Y5,GPIOO1_TACH1_VPIG9,Out,COM6_BUF_EN,Active low signal to enable isolation buffer dedicated for com signals
+AA4,GPIOO2_TACH2_VPIR0,BI,RCKMON_SPARE4,RCKMON_SPARE[0:11] connect to fan_ctrl_rmon card connector
+AB3,GPIOO3_TACH3_VPIR1,BI,RCKMON_SPARE5,RCKMON_SPARE[0:11] connect to fan_ctrl_rmon card connector
+W6,GPIOO4_TACH4_VPIR2,Out,TPM_SPI_SEL,Signal from BMC to select whether BMC or COM SPI should go to TPM module. By default COM SPI is Selected. BMC can drive this signal high to select SPI from BMC
+AA5,GPIOO5_TACH5_VPIR3,Out,TPM_SPI_BUF_EN,Signal from BMC to enable or disable the MUX which selects BMC or COM SPI to TPM module. Default the MUX is enabled .BMC can drive high to disable it.
+AB4,GPIOO6_TACH6_VPIR4,In,ISO_BRG_THRMTRIP_N,"Active low Signal from COM to indicate processor over heating ,and com will go into s5 state (COME Signal)"
+V7,GPIOO7_TACH7_VPIR5,Out,ISO_BRG_THRM_N,Active low Signal from BMC to indicate overtemperature (COME Signal)
+Y6,GPIOP0_TACH8_VPIR6,In,RMON1_PF,"rack 1 monitor status, Power Failure, active low"
+AB5,GPIOP1_TACH9_VPIR7,In,RMON1_RF,"rack 1 monitor status, redudancy Failure, active low"
+W7,GPIOP2_TACH10_VPIR8,In,RMON2_PF,"rack 2 monitor status, Power Failure, active low"
+AA6,GPIOP3_TACH11_VPIR9,In,RMON2_RF,"rack 2 monitor status, redudancy Failure, active low"
+AB6,GPIOP4_TACH12,In,RMON3_PF,"rack 3 monitor status, Power Failure, active low"
+Y7,GPIOP5_TACH13,In,RMON3_RF,"rack 3 monitor status, redudancy Failure, active low"
+AA7,GPIOP6_TACH14_BMCINT,In,FANCARD_I2C_ALARM,"fan card alarm input, active low"
+AB7,GPIOP7_TACH15_FLACK,out,BMC_READY_N,"0: BMC is ready for service. 1: BMC is not ready, or during initialization"
+H4,GPIOQ4_SCL14,In,BMC_CPLD_POWER_INT,Intrerrupt from CPLD to BMC for any Power events
+H3,GPIOQ5_SDA14,,BMC_CPLD_SPARE7,Spare GPIOs to CPLD
+H2,GPIOQ6,out,USB_OCS_N1,over-current sense output to USB2513 hub
+H1,GPIOQ7,out,BMC_HEARTBEAT_N,BMC heatbeat output to onboard heartbeat LED
+V20,GPIOR0_ROMCS1_N,out,SPI_IBMC_BT_CS1_N_R,chip select to secondary boot SPI flash
+C6,GPIOR6_MDC1,BI,SWITCH_MDC,MDC/MDIO to GE Switch
+A5,GPIOR7_MDIO1,BI,SWITCH_MDIO,
+U21,ROMD4_GPIOS0_VPODE,Out,BMC_SPI_WP_N,Write protect for Secondary Boot Flash. Connected to CPLD. CPLD will drive it to the flash chip
+C21,GPIOY0_SIOS3_N,In,BOARD_REV_ID0,"Board ID input bit0, resister straping, connect to both BMC and CPLD"
+F20,GPIOY1_SIOS5_N,In,BOARD_REV_ID1,"Board ID input bit1, resister straping, connect to both BMC and CPLD"
+G20,GPIOY2_SIOPWREQ_N,In,BOARD_REV_ID2,"Board ID input bit2, resister straping, connect to both BMC and CPLD"
+K20,GPIOY3_SIOONCTRL_N,,LED_POSTCODE_4,LED 7-segment code bit-4 for facebook debug header \ No newline at end of file
diff --git a/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/data/wedge100-BMC-GPIO-EVT.csv b/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/data/wedge100-BMC-GPIO-EVT.csv
new file mode 100644
index 0000000..781d739
--- /dev/null
+++ b/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/data/wedge100-BMC-GPIO-EVT.csv
@@ -0,0 +1,83 @@
+J21,GPIOB0_SALT1,In,PANTHER_I2C_ALERT_N,panther i2c alert_n
+J20,GPIOB1_SALT2,In,MSERV_NIC_SMBUS_ALERT_N,"micro server NIC SMBUS alert_n, active low"
+H18,GPIOB2_SALT3,In,DEBUG_PORT_UART_SEL_N,The DEBUG_PORT_UART_SEL_N is connected to a push button in the front panel. When Debug port select button in Front panel is pressed DEBUG_PORT_UART_SEL_N becomes low.
+E19,GPIOB4_LPCRST_N,Out,LED_POSTCODE_4,LED 7-segment code bit-4 for facebook debug header
+H19,GPIOB5_LPCPD_N_LPCSMI_N,Out,LED_POSTCODE_5,LED 7-segment code bit-5 for facebook debug header
+H20,GPIOB6_LPCPME_N,Out,LED_POSTCODE_6,LED 7-segment code bit-6 for facebook debug header
+E18,GPIOB7_EXTRST_N_SPICS1_N,Out,LED_POSTCODE_7,LED 7-segment code bit-7 for facebook debug header
+A2,GPIOC2_SD1DAT0_SCL11,Out,ISO_BUF_EN,"reserved for ISO_BUFFER control, in default serial resister is depop, use CPLD to control"
+A18,GPIOD0_SD2CLK,,BMC_PWR_BTN_IN_N,to emulate Microserver power button function using BMC
+D16,GPIOD1_SD2CMD,,BMC_PWR_BTN_OUT_N,
+B17,GPIOD2_SD2DAT0,Out,BMC_CPLD_RESET1,Spare Reset signal connected to CPLD
+A17,GPIOD3_SD2DAT1,Out,BMC_CPLD_RESET2,Spare Reset signal connected to CPLD
+C16,GPIOD4_SD2DAT2,Out,BMC_CPLD_RESET3,Spare Reset signal connected to CPLD (USB_BRDG RST function moved to CPLD)
+B16,GPIOD5_SD2DAT3,Out,BMC_CPLD_RESET4,Spare Reset signal connected to CPLD
+E15,GPIOD7_SD2WP_N,In,BMC_CPLD_QSFP_INT,Intrerrupt from CPLD to BMC for any QSFP events (USB RESET function moved to CPLD)
+D15,GPIOE0_NCTS3,Out,DEBUG_UART_SEL_0,FB debug connector UART select 0: BMC uART 1: microserver UART
+B15,GPIOE2_NDSR3,out,SWITCH_EEPROM1_WRT,"0: BCM5387 SPI interface connect to SPI EEPROM
+1: BCM5387 SPI interface connect to BMC SPI EEPROM interface
+this bit is used as BCM5387 straping configuration too"
+E14,GPIOE4_NDTR3,in,ISO_MICROSRV_PRSNT_N,"0: Microserver is present in PCIe slot
+1: microserver is not present in PCIe slot"
+D14,GPIOE5_NRTS3,out,LED_PWR_BLUE,"Power LED blue will be ON when LED_PWR_BLUE is high.
+Power LED blue will be off when LED_PWR_BLUE is low"
+D18,GPIOF0_NCTS4,Out,MSERVE_ISOBUF_EN,To enable isolation buffer dedicated for microserver com port
+B19,GPIOF1_NDCD4_SIOPBI_N,Out,BMC_MAIN_RESET_N,BMC can request cpld to reset main power
+A20,GPIOF2_NDSR4_SIOPWRGD,Out,CPLD_JTAG_SEL,"SYSCPLD upgrade enable, 0: jtag header program, 1: BMC programming"
+B18,GPIOF4_NDTR4,Out,MSERV_POWERUP,To request cpld to turn on P12_uServer for microserver
+A19,GPIOF5_NRTS4,Out,RCKMON_RS485_DE,RS485 Drive Enable (TX/RX Toggle) pin for rackmon
+A14,GPIOG0_SGPSCK,Out,LED_POSTCODE_0,LED 7-segment code bit-0 for facebook debug header
+E13,GPIOG1_SGPSLD,Out,LED_POSTCODE_1,LED 7-segment code bit-1 for facebook debug header
+D13,GPIOG2_SGPSI0,Out,LED_POSTCODE_2,LED 7-segment code bit-2 for facebook debug header
+C13,GPIOG3_SGPSI1,Out,LED_POSTCODE_3,LED 7-segment code bit-3 for facebook debug header
+B13,GPIOG4_WDTRST1_OSCCLK,Out,BMC_WDTRST1,Watch dog timer reset1 output from BMC to CPLD
+Y21,GPIOG5_WDTRST2_USBCKI,Out,BMC_WDTRST2,Watch dog timer reset2 output from BMC to CPLD
+A7,GPIOH3_ROMD11_NRI6,In,QSFP_LED_POSITION,QSFP position select input
+D7,GPIOH4_ROMD12_NDTR6,In,PM_SM_ALERT_N,SM bus alert from power manager (also connected to CPLD)
+B22,GPIOI4_SPICS0_N_VBCS_N,Out,BMC_EEPROM1_SPI_SS,"BMC SPI EEPROM interface connect to BCM5387 switch if SWITCH_EEPRM1_WRT is 1, "
+G19,GPIOI5_SPICK_VBCK,Out,BMC_EEPROM1_SPI_SCK,
+C18,GPIOI6_SPIDO_VBDO,Out,BMC_EEPROM1_SPI_MOSI,
+E20,GPIOI7_SPIDI_VBDI,In,BMC_EEPROM1_SPI_MISO,
+J5,GPIOJ0_SGPMCK,Bi,RCKMON_SPARE0,Spare gpios to rack mon card
+J4,GPIOJ1_SGPMLD,Bi,RCKMON_SPARE1,Spare gpios to rack mon card
+K5,GPIOJ2_SGPMO,Bi,RCKMON_SPARE2,Spare gpios to rack mon card
+J3,GPIOJ3_SGPMI,Bi,RCKMON_SPARE3,Spare gpios to rack mon card
+T4,VGAHS_GPIOJ4,,FANCARD_CPLD_TMS,"fancard CPLD JTAG upgrade interface, BMC output to CPLD TMS"
+U2,VGAVS_GPIOJ5,,FANCARD_CPLD_TCK,"fancard CPLD JTAG upgrade interface, BMC output to CPLD TCK"
+T2,DDCCLK_GPIOJ6,,FANCARD_CPLD_TDI,"fancard CPLD JTAG upgrade interface, BMC output to CPLD TDI"
+T1,DDCDAT_GPIOJ7,,FANCARD_CPLD_TDO,"fancard CPLD JTAG upgrade interface, BMC input to CPLD TDO"
+V2,GPIOL5_NRTS1_VPICLK,Out,BMC_UART_1_RTS,connect to SYSCPLD
+V3,GPIOM0_NCTS2_VPIB2,Out,CPLD_UPD_EN,"fan_card CPLD upgrade enable, 0: jtag header programming, 1: BMC programming"
+W2,GPIOM1_NDCD2_VPIB3,In,SMB_ALERT,"Alert signal from cpld representing Alert from the power supplies(Vcore,vanlg,3.3)"
+V4,GPIOM3_NRI2_VPIB5,out,TH_POWERUP,"tomahawk power up enable, active high. Connect to CPLD, cpld will control pwr1014a"
+W3,GPIOM4_NDTR2_VPIB6,out,BMC_CPLD_TMS,"SYSCPLD CPLD JTAG upgrade interface, BMC output to SYSCPLD TMS"
+Y2,GPIOM5_NRTS2_VPIB7,out,BMC_CPLD_TDI,"SYSCPLD CPLD JTAG upgrade interface, BMC output to SYSCPLD TDI"
+AA1,GPIOM6_TXD2_VPIB8,out,BMC_CPLD_TCK,"SYSCPLD CPLD JTAG upgrade interface, BMC output to SYSCPLD TCK"
+V5,GPIOM7_RXD2_VPIB9,In,BMC_CPLD_TDO,"SYSCPLD CPLD JTAG upgrade interface, BMC output to SYSCPLD TDO"
+V6,GPIOO0_TACH0_VPIG8,BI,RCKMON_SPARE4,RCKMON_SPARE[0:11] connect to fan_ctrl_rmon card connector
+Y5,GPIOO1_TACH1_VPIG9,BI,RCKMON_SPARE5,RCKMON_SPARE[0:11] connect to fan_ctrl_rmon card connector
+AA4,GPIOO2_TACH2_VPIR0,BI,RCKMON_SPARE10,RCKMON_SPARE[0:11] connect to fan_ctrl_rmon card connector(now not connected)
+AB3,GPIOO3_TACH3_VPIR1,BI,RCKMON_SPARE11,RCKMON_SPARE[0:11] connect to fan_ctrl_rmon card connector(now not connected)
+W6,GPIOO4_TACH4_VPIR2,BI,RCKMON_SPARE8,RCKMON_SPARE[0:11] connect to fan_ctrl_rmon card connector(now not connected)
+AA5,GPIOO5_TACH5_VPIR3,BI,RCKMON_SPARE9,RCKMON_SPARE[0:11] connect to fan_ctrl_rmon card connector(now not connected)
+AB4,GPIOO6_TACH6_VPIR4,BI,RCKMON_SPARE6,RCKMON_SPARE[0:11] connect to fan_ctrl_rmon card connector(now not connected)
+V7,GPIOO7_TACH7_VPIR5,BI,RCKMON_SPARE7,RCKMON_SPARE[0:11] connect to fan_ctrl_rmon card connector(now not connected)
+Y6,GPIOP0_TACH8_VPIR6,In,RMON1_PF,"rack 1 monitor status, Power Failure, active low"
+AB5,GPIOP1_TACH9_VPIR7,In,RMON1_RF,"rack 1 monitor status, redudancy Failure, active low"
+W7,GPIOP2_TACH10_VPIR8,In,RMON2_PF,"rack 2 monitor status, Power Failure, active low"
+AA6,GPIOP3_TACH11_VPIR9,In,RMON2_RF,"rack 2 monitor status, redudancy Failure, active low"
+AB6,GPIOP4_TACH12,In,RMON3_PF,"rack 3 monitor status, Power Failure, active low"
+Y7,GPIOP5_TACH13,In,RMON3_RF,"rack 3 monitor status, redudancy Failure, active low"
+AA7,GPIOP6_TACH14_BMCINT,In,FANCARD_I2C_ALARM,"fan card alarm input, active low"
+AB7,GPIOP7_TACH15_FLACK,out,BMC_READY_N,"0: BMC is ready for service. 1: BMC is not ready, or during initialization"
+H4,GPIOQ4_SCL14,In,BMC_CPLD_POWER_INT,Intrerrupt from CPLD to BMC for any Power events
+H3,GPIOQ5_SDA14,,BMC_CPLD_SPARE7,Spare GPIOs to CPLD
+H2,GPIOQ6,out,USB_OCS_N1,over-current sense output to USB2513 hub
+H1,GPIOQ7,out,BMC_HEARTBEAT_N,BMC heatbeat output to onboard heartbeat LED
+C6,GPIOR6_MDC1,BI,SWITCH_MDC,MDC/MDIO to GE Switch
+A5,GPIOR7_MDIO1,BI,SWITCH_MDIO,
+V20,GPIOR0_ROMCS1_N,out,SPI_IBMC_BT_CS1_N_R,chip select to secondary boot SPI flash
+U21,ROMD4_GPIOS0_VPODE,Out,BMC_SPI_WP_N,Write protect for Secondary Boot Flash. Connected to CPLD. CPLD will drive it to the flash chip
+C21,GPIOY0_SIOS3_N,In,BOARD_REV_ID0,"Board ID input bit0, resister straping, connect to both BMC and CPLD"
+F20,GPIOY1_SIOS5_N,In,BOARD_REV_ID1,"Board ID input bit1, resister straping, connect to both BMC and CPLD"
+G20,GPIOY2_SIOPWREQ_N,In,BOARD_REV_ID2,"Board ID input bit2, resister straping, connect to both BMC and CPLD"
diff --git a/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/openbmc_gpio_setup.py b/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/openbmc_gpio_setup.py
new file mode 100644
index 0000000..dd14763
--- /dev/null
+++ b/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/openbmc_gpio_setup.py
@@ -0,0 +1,75 @@
+#!/usr/bin/python -tt
+# Copyright 2015-present Facebook. All rights reserved.
+#
+# This program file 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; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program in a file named COPYING; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301 USA
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
+from board_gpio_rev_table import board_gpio_rev_table
+from board_gpio_table_v1 import board_gpio_table_v1
+from board_gpio_table_v2 import board_gpio_table_v2
+from soc_gpio_table import soc_gpio_table
+from openbmc_gpio_table import setup_board_gpio
+from soc_gpio import soc_get_register
+
+import openbmc_gpio
+import sys
+
+def set_register():
+ '''
+ For DVT/EVT boards the framework is not able to handle for GPIOS0 and
+ causes error : 'Failed to configure "GPIOS0" for "BMC_SPI_WP_N":
+ Not able to unsatisfy an AND condition'. In order to fix the error
+ set the specific bit in the register so the framework can handle it.
+ '''
+ l_reg = soc_get_register(0x8C)
+ l_reg.clear_bit(0, write_through=True)
+
+def wedge_board_rev(soc_gpio_table, board_gpio_rev_table):
+ # Setup to read revision
+ setup_board_gpio(soc_gpio_table, board_gpio_rev_table)
+ # Read the gpio values
+ v0 = openbmc_gpio.gpio_get('BOARD_REV_ID0')
+ v1 = openbmc_gpio.gpio_get('BOARD_REV_ID1')
+ v2 = openbmc_gpio.gpio_get('BOARD_REV_ID2')
+ return ((v2 << 2) | (v1 << 1) | v0)
+
+def main():
+ print('Setting up GPIOs ... ', end='')
+ sys.stdout.flush()
+ openbmc_gpio.setup_shadow()
+ version = wedge_board_rev(soc_gpio_table,board_gpio_rev_table)
+ # In order to satisy/unsatisfy conditions in setup_board_gpio()
+ # modify the registers
+ set_register()
+ if version is 1:
+ print('Using GPIO EVT table ', end='')
+ setup_board_gpio(soc_gpio_table, board_gpio_table_v1)
+ else:
+ if version is 2:
+ print('Using GPIO DVT table ', end='')
+ else:
+ print('Unexpected board version %s. Using GPIO DVT table. '
+ % version, end='')
+ setup_board_gpio(soc_gpio_table, board_gpio_table_v2)
+ print('Done')
+ sys.stdout.flush()
+ return 0
+
+if __name__ == '__main__':
+ sys.exit(main())
diff --git a/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/setup_board.py b/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/setup_board.py
new file mode 100644
index 0000000..bb6ccb1
--- /dev/null
+++ b/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/setup_board.py
@@ -0,0 +1,22 @@
+# Copyright 2015-present Facebook. All rights reserved.
+#
+# This program file 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; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program in a file named COPYING; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301 USA
+
+board_py_modules=[
+ 'board_gpio_table_v1',
+ 'board_gpio_table_v2',
+ 'board_gpio_rev_table',
+]
diff --git a/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/wedge100_gpio_parse.py b/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/wedge100_gpio_parse.py
new file mode 100644
index 0000000..b53f9de
--- /dev/null
+++ b/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/files/wedge100_gpio_parse.py
@@ -0,0 +1,102 @@
+#!/usr/bin/python -tt
+# Copyright 2015-present Facebook. All Rights Reserved.
+#
+# This program file 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; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program in a file named COPYING; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301 USA
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
+import argparse
+import csv
+import logging
+import re
+import sys
+
+
+GPIO_SYMBOL = 'BoardGPIO'
+
+
+class CsvReader:
+ '''
+ A class for parsing the CSV files containing the board GPIO config
+ '''
+ def __init__(self, path):
+ self.path = path
+
+ fileobj = open(path, 'r')
+ self.reader = csv.reader(fileobj, delimiter=b',', quotechar=b'"')
+
+ def next(self):
+ try:
+ line = self.reader.next()
+ except StopIteration:
+ return None
+ return line
+
+
+class WedgeGPIO(object):
+ def __init__(self, data):
+ self.data = data
+ self.gpios = {}
+ self.names = set()
+
+ def parse(self):
+ while True:
+ line = self.data.next()
+ if line is None:
+ break
+
+ logging.debug('Parsing line: %s' % line)
+
+ if len(line) < 4:
+ logging.error('No enough fields in "%s". Skip!' % line)
+ continue
+
+ gpio = None
+ for part in line[1].split('_'):
+ if part.startswith('GPIO'):
+ gpio = part
+ break
+ if gpio is None:
+ logging.error('Cannot find GPIO file from "%s". Skip!' % line)
+ continue
+
+ name = line[3]
+ assert gpio not in self.gpios and name not in self.names
+ self.gpios[gpio] = name
+ self.names.add(name)
+
+ def print(self, out):
+ for gpio in sorted(self.gpios):
+ out.write(' %s(\'%s\', \'%s\'),\n'
+ % (GPIO_SYMBOL, gpio, self.gpios[gpio]))
+
+
+def main():
+ ap = argparse.ArgumentParser()
+ ap.add_argument('data', help='The GPIO data file')
+ args = ap.parse_args()
+
+ logging.basicConfig(level=logging.INFO, format='%(asctime)s: %(message)s')
+
+ gpio = WedgeGPIO(CsvReader(args.data))
+ gpio.parse()
+ gpio.print(sys.stdout)
+
+
+rc = main()
+sys.exit(rc)
diff --git a/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/openbmc-gpio_%.bbappend b/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/openbmc-gpio_%.bbappend
new file mode 100644
index 0000000..afc133a
--- /dev/null
+++ b/meta-facebook/meta-wedge100/recipes-utils/openbmc-gpio/openbmc-gpio_%.bbappend
@@ -0,0 +1,36 @@
+# Copyright 2014-present Facebook. All Rights Reserved.
+#
+# This program file 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; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program in a file named COPYING; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301 USA
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI += " \
+ file://board_gpio_table_v1.py \
+ file://board_gpio_table_v2.py \
+ file://board_gpio_rev_table.py \
+ file://openbmc_gpio_setup.py \
+ file://setup_board.py \
+ "
+OPENBMC_GPIO_SOC_TABLE = "ast2400_gpio_table.py"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/init.d
+ install -d ${D}${sysconfdir}/rcS.d
+ install -m 755 openbmc_gpio_setup.py ${D}${sysconfdir}/init.d/openbmc_gpio_setup.py
+ update-rc.d -r ${D} openbmc_gpio_setup.py start 59 S .
+}
+
+FILES_${PN} += "/usr/local/bin ${sysconfdir}"
diff --git a/meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/files/COPYING b/meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/files/COPYING
new file mode 100644
index 0000000..3912109
--- /dev/null
+++ b/meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/files/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ 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.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/files/board-utils.sh b/meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/files/board-utils.sh
new file mode 100644
index 0000000..a999a9c
--- /dev/null
+++ b/meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/files/board-utils.sh
@@ -0,0 +1,81 @@
+# Copyright 2015-present Facebook. All Rights Reserved.
+
+SYSCPLD_SYSFS_DIR="/sys/class/i2c-adapter/i2c-12/12-0031"
+PWR_MAIN_SYSFS="${SYSCPLD_SYSFS_DIR}/pwr_main_n"
+PWR_USRV_SYSFS="${SYSCPLD_SYSFS_DIR}/pwr_usrv_en"
+PWR_USRV_BTN_SYSFS="${SYSCPLD_SYSFS_DIR}/pwr_usrv_btn_en"
+SLOTID_SYSFS="${SYSCPLD_SYSFS_DIR}/slotid"
+
+wedge_iso_buf_enable() {
+ # TODO, no isolation buffer
+ return 0
+}
+
+wedge_iso_buf_disable() {
+ # TODO, no isolation buffer
+ return 0
+}
+
+wedge_is_us_on() {
+ local val n retries prog
+ if [ $# -gt 0 ]; then
+ retries="$1"
+ else
+ retries=1
+ fi
+ if [ $# -gt 1 ]; then
+ prog="$2"
+ else
+ prog=""
+ fi
+ if [ $# -gt 2 ]; then
+ default=$3 # value 0 means defaul is 'ON'
+ else
+ default=1
+ fi
+ val=$(cat $PWR_USRV_SYSFS 2> /dev/null | head -n 1)
+ if [ -z "$val" ]; then
+ return $default
+ elif [ "$val" == "0x1" ]; then
+ return 0 # powered on
+ else
+ return 1
+ fi
+}
+
+wedge_board_type() {
+ echo 'WEDGE100'
+}
+
+wedge_slot_id() {
+ printf "%d\n" $(cat $SLOTID_SYSFS)
+}
+
+wedge_board_rev() {
+ local val0 val1 val2
+ val0=$(gpio_get BOARD_REV_ID0)
+ val1=$(gpio_get BOARD_REV_ID1)
+ val2=$(gpio_get BOARD_REV_ID2)
+ echo $((val0 | (val1 << 1) | (val2 << 2)))
+}
+
+# Should we enable OOB interface or not
+wedge_should_enable_oob() {
+ # wedge100 uses BMC MAC since beginning
+ return -1
+}
+
+wedge_power_on_board() {
+ local val
+ # power on main power, uServer power, and enable power button
+ val=$(cat $PWR_MAIN_SYSFS | head -n 1)
+ if [ "$val" != "0x1" ]; then
+ echo 1 > $PWR_MAIN_SYSFS
+ sleep 2
+ fi
+ val=$(cat $PWR_USRV_BTN_SYSFS | head -n 1)
+ if [ "$val" != "0x1" ]; then
+ echo 1 > $PWR_USRV_BTN_SYSFS
+ sleep 1
+ fi
+}
diff --git a/meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/files/disable_watchdog.sh b/meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/files/disable_watchdog.sh
new file mode 100644
index 0000000..07826d6
--- /dev/null
+++ b/meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/files/disable_watchdog.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+. /usr/local/bin/openbmc-utils.sh
+
+# Disable the dual boot watch dog
+devmem_clear_bit 0x1e78502c 0
diff --git a/meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/files/power-on.sh b/meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/files/power-on.sh
new file mode 100644
index 0000000..1f22dcf
--- /dev/null
+++ b/meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/files/power-on.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# Copyright 2014-present Facebook. All Rights Reserved.
+#
+# This program file 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; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program in a file named COPYING; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301 USA
+
+### BEGIN INIT INFO
+# Provides: power-on
+# Required-Start:
+# Required-Stop:
+# Default-Start: S
+# Default-Stop:
+# Short-Description: Power on micro-server
+### END INIT INFO
+. /usr/local/bin/openbmc-utils.sh
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
+
+# make power button high to prepare for power on sequence
+gpio_set BMC_PWR_BTN_OUT_N 1
+
+# First power on TH, and if Panther+ is used,
+# provide standby power to Panther+.
+wedge_power_on_board
+
+echo -n "Checking microserver power status ... "
+if wedge_is_us_on 10 "."; then
+ echo "on"
+ on=1
+else
+ echo "off"
+ on=0
+fi
+
+if [ $on -eq 0 ]; then
+ # Power on now
+ wedge_power.sh on -f
+fi
diff --git a/meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/files/wedge_power.sh b/meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/files/wedge_power.sh
new file mode 100644
index 0000000..0ad93e6
--- /dev/null
+++ b/meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/files/wedge_power.sh
@@ -0,0 +1,187 @@
+#!/bin/bash
+#
+# Copyright 2015-present Facebook. All Rights Reserved.
+#
+# This program file 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; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program in a file named COPYING; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301 USA
+#
+
+. /usr/local/bin/openbmc-utils.sh
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
+
+prog="$0"
+
+PWR_BTN_GPIO="BMC_PWR_BTN_OUT_N"
+PWR_SYSTEM_SYSFS="${SYSCPLD_SYSFS_DIR}/pwr_cyc_all_n"
+PWR_USRV_RST_SYSFS="${SYSCPLD_SYSFS_DIR}/usrv_rst_n"
+
+usage() {
+ echo "Usage: $prog <command> [command options]"
+ echo
+ echo "Commands:"
+ echo " status: Get the current microserver power status"
+ echo
+ echo " on: Power on microserver if not powered on already"
+ echo " options:"
+ echo " -f: Re-do power on sequence no matter if microserver has "
+ echo " been powered on or not."
+ echo
+ echo " off: Power off microserver ungracefully"
+ echo
+ echo " reset: Power reset microserver ungracefully"
+ echo " options:"
+ echo " -s: Power reset whole wedge system ungracefully"
+ echo
+}
+
+do_status() {
+ echo -n "Microserver power is "
+ if wedge_is_us_on; then
+ echo "on"
+ else
+ echo "off"
+ fi
+ return 0
+}
+
+do_on_com_e() {
+ echo 1 > $PWR_USRV_SYSFS
+ return $?
+}
+
+do_on() {
+ local force opt ret
+ force=0
+ while getopts "f" opt; do
+ case $opt in
+ f)
+ force=1
+ ;;
+ *)
+ usage
+ exit -1
+ ;;
+
+ esac
+ done
+ echo -n "Power on microserver ..."
+ if [ $force -eq 0 ]; then
+ # need to check if uS is on or not
+ if wedge_is_us_on 10 "."; then
+ echo " Already on. Skip!"
+ return 1
+ fi
+ fi
+
+ # power on sequence
+ do_on_com_e
+ ret=$?
+ if [ $ret -eq 0 ]; then
+ echo " Done"
+ else
+ echo " Failed"
+ fi
+ return $ret
+}
+
+do_off_com_e() {
+ echo 0 > $PWR_USRV_SYSFS
+ return $?
+}
+
+do_off() {
+ local ret
+ echo -n "Power off microserver ..."
+ do_off_com_e
+ ret=$?
+ if [ $ret -eq 0 ]; then
+ echo " Done"
+ else
+ echo " Failed"
+ fi
+ return $ret
+}
+
+do_reset() {
+ local system opt pulse_us
+ system=0
+ while getopts "s" opt; do
+ case $opt in
+ s)
+ system=1
+ ;;
+ *)
+ usage
+ exit -1
+ ;;
+ esac
+ done
+ if [ $system -eq 1 ]; then
+ pulse_us=100000 # 100ms
+ echo -n "Power reset whole system ..."
+ sleep 1
+ echo 0 > $PWR_SYSTEM_SYSFS
+ # Echo 0 above should work already. However, after CPLD upgrade,
+ # We need to re-generate the pulse to make this work
+ usleep $pulse_us
+ echo 1 > $PWR_SYSTEM_SYSFS
+ usleep $pulse_us
+ echo 0 > $PWR_SYSTEM_SYSFS
+ usleep $pulse_us
+ echo 1 > $PWR_SYSTEM_SYSFS
+ else
+ if ! wedge_is_us_on; then
+ echo "Power resetting microserver that is powered off has no effect."
+ echo "Use '$prog on' to power the microserver on"
+ return -1
+ fi
+ echo -n "Power reset microserver ..."
+ echo 0 > $PWR_USRV_RST_SYSFS
+ sleep 1
+ echo 1 > $PWR_USRV_RST_SYSFS
+ fi
+ echo " Done"
+ return 0
+}
+
+if [ $# -lt 1 ]; then
+ usage
+ exit -1
+fi
+
+command="$1"
+shift
+
+case "$command" in
+ status)
+ do_status $@
+ ;;
+ on)
+ do_on $@
+ ;;
+ off)
+ do_off $@
+ ;;
+ reset)
+ do_reset $@
+ ;;
+ *)
+ usage
+ exit -1
+ ;;
+esac
+
+exit $?
diff --git a/meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/files/wedge_us_mac.sh b/meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/files/wedge_us_mac.sh
new file mode 100644
index 0000000..8ad2fec
--- /dev/null
+++ b/meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/files/wedge_us_mac.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+#
+# Copyright 2015-present Facebook. All Rights Reserved.
+#
+# This program file 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; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program in a file named COPYING; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301 USA
+#
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
+
+. /usr/local/bin/openbmc-utils.sh
+
+if ! wedge_is_us_on; then
+ echo "Cannot retrive microserver MAC when microserver is powered off." 1>&2
+ exit -2
+fi
+
+mac=$(i2cdump -f -y 0x4 0x33 b 2> /dev/null | grep '^50: '| awk '{ printf "%s:%s:%s:%s:%s:%s\n", $2, $3, $4, $5, $6, $7 }')
+
+if [ -n "$mac" -a "${mac/X/}" = "${mac}" ]; then
+ echo $mac
+ exit 0
+else
+ echo "Cannot find out the microserver MAC" 1>&2
+ exit -1
+fi
diff --git a/meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/openbmc-utils_%.bbappend b/meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/openbmc-utils_%.bbappend
new file mode 100644
index 0000000..87db374
--- /dev/null
+++ b/meta-facebook/meta-wedge100/recipes-utils/openbmc-utils/openbmc-utils_%.bbappend
@@ -0,0 +1,64 @@
+# Copyright 2015-present Facebook. All Rights Reserved.
+#
+# This program file 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; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program in a file named COPYING; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301 USA
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI += "file://disable_watchdog.sh \
+ file://board-utils.sh \
+ "
+
+OPENBMC_UTILS_FILES += " \
+ disable_watchdog.sh \
+ "
+
+DEPENDS_append = " update-rc.d-native"
+
+do_install_board() {
+ # for backward compatible, create /usr/local/fbpackages/utils/ast-functions
+ olddir="/usr/local/fbpackages/utils"
+ install -d ${D}${olddir}
+ ln -s "/usr/local/bin/openbmc-utils.sh" "${D}${olddir}/ast-functions"
+
+ # common lib and include files
+ install -d ${D}${includedir}/facebook
+ install -m 0644 src/include/i2c-dev.h ${D}${includedir}/facebook/i2c-dev.h
+
+ # init
+ install -d ${D}${sysconfdir}/init.d
+ install -d ${D}${sysconfdir}/rcS.d
+ # the script to mount /mnt/data
+ install -m 0755 ${WORKDIR}/mount_data0.sh ${D}${sysconfdir}/init.d/mount_data0.sh
+ update-rc.d -r ${D} mount_data0.sh start 03 S .
+ install -m 0755 ${WORKDIR}/rc.early ${D}${sysconfdir}/init.d/rc.early
+ update-rc.d -r ${D} rc.early start 04 S .
+
+ # networking is done after rcS, any start level within rcS
+ # for mac fixup should work
+ install -m 755 eth0_mac_fixup.sh ${D}${sysconfdir}/init.d/eth0_mac_fixup.sh
+ update-rc.d -r ${D} eth0_mac_fixup.sh start 70 S .
+
+ install -m 755 power-on.sh ${D}${sysconfdir}/init.d/power-on.sh
+ update-rc.d -r ${D} power-on.sh start 85 S .
+
+ install -m 0755 ${WORKDIR}/rc.local ${D}${sysconfdir}/init.d/rc.local
+ update-rc.d -r ${D} rc.local start 99 2 3 4 5 .
+
+ install -m 0755 ${WORKDIR}/disable_watchdog.sh ${D}${sysconfdir}/init.d/disable_watchdog.sh
+ update-rc.d -r ${D} disable_watchdog.sh start 99 2 3 4 5 .
+}
+
+FILES_${PN} += "${sysconfdir}"
diff --git a/meta-facebook/meta-wedge100/recipes-utils/wedge-eeprom/libwedge-eeprom_0.1.bbappend b/meta-facebook/meta-wedge100/recipes-utils/wedge-eeprom/libwedge-eeprom_0.1.bbappend
new file mode 100644
index 0000000..bb2fba7
--- /dev/null
+++ b/meta-facebook/meta-wedge100/recipes-utils/wedge-eeprom/libwedge-eeprom_0.1.bbappend
@@ -0,0 +1,18 @@
+# Copyright 2015-present Facebook. All Rights Reserved.
+#
+# This program file 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; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program in a file named COPYING; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301 USA
+
+CFLAGS_prepend = "-DFBW_EEPROM_FILE=\\"/sys/class/i2c-adapter/i2c-6/6-0051/eeprom\\" "
OpenPOWER on IntegriCloud