summaryrefslogtreecommitdiffstats
path: root/meta-aspeed/recipes-utils
diff options
context:
space:
mode:
authorTimothy Pearson <tpearson@raptorengineering.com>2017-08-27 16:20:38 -0500
committerTimothy Pearson <tpearson@raptorengineering.com>2017-08-27 16:20:38 -0500
commit84eea7fdc46dd76e84cafbf96813bc826d5e08ad (patch)
tree035d28afe18ce33231b956349d1a3a90ec763d60 /meta-aspeed/recipes-utils
parente65a7944211c70f6b5cfb6cedd73cc31105319de (diff)
downloadast2050-yocto-openbmc-84eea7fdc46dd76e84cafbf96813bc826d5e08ad.zip
ast2050-yocto-openbmc-84eea7fdc46dd76e84cafbf96813bc826d5e08ad.tar.gz
Add initial support for the ASpeed 2050 and the ASUS KGPE-D16
Thermal management is functional but expects all fans to be attached Known issues: * BMC has been observed spontaneously rebooting after ~7-8 hours uptime with no logs and no console output. * While kcs has been implemented, the IPMI daemon is only functional enough to report chassis status.
Diffstat (limited to 'meta-aspeed/recipes-utils')
-rw-r--r--meta-aspeed/recipes-utils/openbmc-gpio/files/ast2050_gpio_table.py220
-rw-r--r--meta-aspeed/recipes-utils/openbmc-gpio/files/ast_gpio_parser.py4
-rw-r--r--meta-aspeed/recipes-utils/openbmc-gpio/files/data/ast2050-gpio.csv45
-rw-r--r--meta-aspeed/recipes-utils/openbmc-gpio/openbmc-gpio_%.bbappend1
4 files changed, 268 insertions, 2 deletions
diff --git a/meta-aspeed/recipes-utils/openbmc-gpio/files/ast2050_gpio_table.py b/meta-aspeed/recipes-utils/openbmc-gpio/files/ast2050_gpio_table.py
new file mode 100644
index 0000000..d49dc0b
--- /dev/null
+++ b/meta-aspeed/recipes-utils/openbmc-gpio/files/ast2050_gpio_table.py
@@ -0,0 +1,220 @@
+# Copyright 2017 Raptor Engineering, LLC
+# 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 (
+ BitsEqual, BitsNotEqual, And, Or, Function)
+
+
+# The fallowing table is generated using:
+# python ast_gpio_parser.py data/ast2050-gpio.csv
+# DO NOT MODIFY THE TABLE!!!
+# Manual modification will be overridden!!!
+
+soc_gpio_table = {
+ 'A10': [
+ Function('VBCK', BitsEqual(0x70, [5], 0x1)),
+ Function('GPIOB5', None)
+ ],
+ 'A11': [
+ Function('FLBUSY#', BitsEqual(0x74, [2], 0x1)),
+ Function('GPIOB1', None)
+ ],
+ 'A12': [
+ Function('SDA7', BitsEqual(0x74, [14], 0x1)),
+ Function('GPIOH2', None)
+ ],
+ 'A13': [
+ Function('MII2DIO', BitsEqual(0x74, [20], 0x1)),
+ Function('SDA5', BitsEqual(0x74, [12], 0x1)),
+ Function('GPIOC6', None)
+ ],
+ 'A8': [
+ Function('PWM4', BitsEqual(0x74, [11], 0x1)),
+ Function('GPIOC5', None)
+ ],
+ 'A9': [
+ Function('PECIO', BitsEqual(0x74, [7], 0x1)),
+ Function('GPIOC1', None)
+ ],
+ 'B1': [
+ Function('OSCCLK', BitsEqual(0x2c, [1], 0x1)),
+ Function('DDCACLK', BitsEqual(0x74, [18], 0x1)),
+ Function('GPIOD7', None)
+ ],
+ 'B10': [
+ Function('VBCS', BitsEqual(0x70, [5], 0x1)),
+ Function('LRST#', BitsEqual(0x70, [23], 0x1)),
+ Function('GPIOB4', None)
+ ],
+ 'B11': [
+ Function('INTA#', BitsEqual(0x78, [4], 0x0)),
+ Function('GPIOB0', None)
+ ],
+ 'B12': [
+ Function('SCL7', BitsEqual(0x74, [14], 0x1)),
+ Function('GPIOH3', None)
+ ],
+ 'B13': [
+ Function('MII2DC', BitsEqual(0x74, [20], 0x1)),
+ Function('SCL5', BitsEqual(0x74, [12], 0x1)),
+ Function('GPIOC7', None)
+ ],
+ 'B2': [
+ Function('DDCADAT', BitsEqual(0x74, [18], 0x1)),
+ Function('GPIOD6', None)
+ ],
+ 'B8': [
+ Function('PWM3', BitsEqual(0x74, [10], 0x1)),
+ Function('GPIOC4', None)
+ ],
+ 'B9': [
+ Function('PECII', BitsEqual(0x74, [7], 0x1)),
+ Function('GPIOC0', None)
+ ],
+ 'C11': [
+ Function('PHYPD#', BitsEqual(0x74, [25], 0x1)),
+ Function('GPIOA5', None)
+ ],
+ 'C12': [
+ Function('SDA6', BitsEqual(0x74, [13], 0x1)),
+ Function('GPIOH0', None)
+ ],
+ 'C8': [
+ Function('PWM2', BitsEqual(0x74, [9], 0x1)),
+ Function('GPIOC3', None)
+ ],
+ 'C9': [
+ Function('VBDI', BitsEqual(0x70, [5], 0x1)),
+ Function('GPIOB7', None)
+ ],
+ 'D10': [
+ Function('FLWP#', BitsEqual(0x74, [2], 0x1)),
+ Function('GPIOB2', None)
+ ],
+ 'D11': [
+ Function('PHYLINK', BitsEqual(0x74, [25], 0x1)),
+ Function('GPIOA4', None)
+ ],
+ 'D12': [
+ Function('SCL6', BitsEqual(0x74, [13], 0x1)),
+ Function('GPIOH1', None)
+ ],
+ 'D8': [
+ Function('PWM1', BitsEqual(0x74, [8], 0x1)),
+ Function('GPIOC2', None)
+ ],
+ 'D9': [
+ Function('VBDO', BitsEqual(0x70, [5], 0x1)),
+ Function('WDTRST', BitsEqual(0x78, [3], 0x1)),
+ Function('GPIOB6', None)
+ ],
+ 'R1': [
+ Function('VP2', BitsEqual(0x74, [22], 0x1)),
+ Function('GPIOE2', None)
+ ],
+ 'R2': [
+ Function('VP1', BitsEqual(0x74, [22], 0x1)),
+ Function('GPIOE1', None)
+ ],
+ 'R3': [
+ Function('VP0', BitsEqual(0x74, [22], 0x1)),
+ Function('GPIOE0', None)
+ ],
+ 'R4': [
+ Function('VSYNC', BitsEqual(0x74, [15], 0x1)),
+ Function('VPAVSYNC', BitsEqual(0x74, [16], 0x1)),
+ Function('GPIOH5', None)
+ ],
+ 'T1': [
+ Function('VPACLK', BitsEqual(0x74, [16], 0x1)),
+ Function('GPIOH7', None)
+ ],
+ 'T2': [
+ Function('VP5', BitsEqual(0x74, [22], 0x1)),
+ Function('GPIOE5', None)
+ ],
+ 'T3': [
+ Function('VP4', BitsEqual(0x74, [22], 0x1)),
+ Function('GPIOE4', None)
+ ],
+ 'T4': [
+ Function('VP3', BitsEqual(0x74, [22], 0x1)),
+ Function('GPIOE3', None)
+ ],
+ 'U1': [
+ Function('VPADE', BitsEqual(0x74, [16], 0x1)),
+ Function('GPIOH6', None)
+ ],
+ 'U2': [
+ Function('HSYNC', BitsEqual(0x74, [15], 0x1)),
+ Function('VPAHSYNC', BitsEqual(0x74, [16], 0x1)),
+ Function('GPIOH4', None)
+ ],
+ 'U3': [
+ Function('VP7', BitsEqual(0x74, [22], 0x1)),
+ Function('GPIOE7', None)
+ ],
+ 'U4': [
+ Function('VP6', BitsEqual(0x74, [22], 0x1)),
+ Function('GPIOE6', None)
+ ],
+ 'V1': [
+ Function('VP11', BitsEqual(0x74, [22], 0x1)),
+ Function('GPIOF3', None)
+ ],
+ 'V2': [
+ Function('VP10', BitsEqual(0x74, [22], 0x1)),
+ Function('GPIOF2', None)
+ ],
+ 'V3': [
+ Function('VP9', BitsEqual(0x74, [22], 0x1)),
+ Function('GPIOF1', None)
+ ],
+ 'V4': [
+ Function('VP8', BitsEqual(0x74, [22], 0x1)),
+ Function('GPIOF0', None)
+ ],
+ 'W1': [
+ Function('VP15', BitsEqual(0x74, [23], 0x1)),
+ Function('GPIOF7', None)
+ ],
+ 'W2': [
+ Function('VP14', BitsEqual(0x74, [23], 0x1)),
+ Function('GPIOF6', None)
+ ],
+ 'W3': [
+ Function('VP13', BitsEqual(0x74, [23], 0x1)),
+ Function('GPIOF5', None)
+ ],
+ 'W4': [
+ Function('VP12', BitsEqual(0x74, [23], 0x1)),
+ Function('GPIOF4', None)
+ ],
+ 'Y3': [
+ Function('VP17', BitsEqual(0x74, [23], 0x1)),
+ Function('GPIOG1', None)
+ ],
+ 'Y4': [
+ Function('VP16', BitsEqual(0x74, [23], 0x1)),
+ Function('GPIOG0', None)
+ ],
+}
diff --git a/meta-aspeed/recipes-utils/openbmc-gpio/files/ast_gpio_parser.py b/meta-aspeed/recipes-utils/openbmc-gpio/files/ast_gpio_parser.py
index acc4c1a..647ec76 100644
--- a/meta-aspeed/recipes-utils/openbmc-gpio/files/ast_gpio_parser.py
+++ b/meta-aspeed/recipes-utils/openbmc-gpio/files/ast_gpio_parser.py
@@ -167,7 +167,7 @@ class AstGPIO(object):
if line is None:
break
- logging.debug('Parsing line: %s' % line)
+ logging.warning('Parsing line: %s' % line)
# V21,ROMA24,SCU88[28]=1 & SCU94[1]=0,VPOR6,SCU88[28]=1 & SCU94[1]=1,GPIOR4
pin = line[0]
@@ -175,7 +175,7 @@ class AstGPIO(object):
# empty line
continue
funcs = self._parse_funcs(line[1:])
- logging.debug('%s: %s' % (pin, funcs))
+ logging.warning('%s: %s' % (pin, funcs))
assert pin not in self.pins
self.pins[pin] = funcs
diff --git a/meta-aspeed/recipes-utils/openbmc-gpio/files/data/ast2050-gpio.csv b/meta-aspeed/recipes-utils/openbmc-gpio/files/data/ast2050-gpio.csv
new file mode 100644
index 0000000..b9b3632
--- /dev/null
+++ b/meta-aspeed/recipes-utils/openbmc-gpio/files/data/ast2050-gpio.csv
@@ -0,0 +1,45 @@
+D11,PHYLINK,SCU74[25]=1,GPIOA4,,
+C11,PHYPD#,SCU74[25]=1,GPIOA5,,
+B11,INTA#,SCU78[4]=0,GPIOB0,,
+A11,FLBUSY#,SCU74[2]=1,GPIOB1,,
+D10,FLWP#,SCU74[2]=1,GPIOB2,,
+B10,VBCS,Strap[5]=1,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F3,,
+W4,VP12,SCU74[23]=1,GPIOF4,,
+W3,VP13,SCU74[23]=1,GPIOF5,,
+W2,VP14,SCU74[23]=1,GPIOF6,,
+W1,VP15,SCU74[23]=1,GPIOF7,,
+Y4,VP16,SCU74[23]=1,GPIOG0,,
+Y3,VP17,SCU74[23]=1,GPIOG1,,
diff --git a/meta-aspeed/recipes-utils/openbmc-gpio/openbmc-gpio_%.bbappend b/meta-aspeed/recipes-utils/openbmc-gpio/openbmc-gpio_%.bbappend
index a87a8c9..0efefea 100644
--- a/meta-aspeed/recipes-utils/openbmc-gpio/openbmc-gpio_%.bbappend
+++ b/meta-aspeed/recipes-utils/openbmc-gpio/openbmc-gpio_%.bbappend
@@ -19,5 +19,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += " \
file://soc_gpio.py \
+ file://ast2050_gpio_table.py \
file://ast2400_gpio_table.py \
"
OpenPOWER on IntegriCloud