From 59a98e41395eb6838d2e3c5d0efb9b02e7f717af Mon Sep 17 00:00:00 2001 From: Chris Austen Date: Tue, 24 May 2016 23:49:09 -0500 Subject: [PATCH] Merge latest versions of the .py files We do copy these files from https://github.com/openbmc/skeleton There was change to the way memory buffers URIs were named I copied the other systems for consistency --- data/Barreleye.py | 36 ++++++++++++++++++++++++++++++++++++ data/Firestone.py | 18 +++++++++++++++++- data/Garrison.py | 16 ++++++++++++++++ data/Palmetto.py | 27 +++++++++++++++++++++++---- 4 files changed, 92 insertions(+), 5 deletions(-) diff --git a/data/Barreleye.py b/data/Barreleye.py index 0cf55a1..6c28fc2 100755 --- a/data/Barreleye.py +++ b/data/Barreleye.py @@ -539,6 +539,7 @@ GPIO_CONFIG['PCIE_RESET'] = { 'gpio_pin': 'B5', 'direction': 'out' } GPIO_CONFIG['USB_RESET'] = { 'gpio_pin': 'B6', 'direction': 'out' } +GPIO_CONFIG['IDBTN'] = { 'gpio_pin': 'Q7', 'direction': 'out' } GPIO_CONFIG['BMC_THROTTLE'] = { 'gpio_pin': 'J3', 'direction': 'out' } GPIO_CONFIG['RESET_BUTTON'] = { 'gpio_pin': 'E2', 'direction': 'both' } GPIO_CONFIG['CPLD_TCK'] = { 'gpio_pin': 'P0', 'direction': 'out' } @@ -716,5 +717,40 @@ def convertGpio(name): '101' : { 'object_path' : 'temperature/membuf7','poll_interval' : 5000,'scale' : 1000,'units' : 'C' }, } }, + '4-0010' : { + 'names' : { + # Barreleye uses 0.25 millioohms sense resistor for adm1278 + # To convert Iout register value Y to real-world value X, use an equation: + # X= 1/m * (Y * 10^-R - b), here m = 800 * R_sense, and R_sense is expressed in milliohms. + # The adm1278 driver did the conversion, but the R_sense is set here as a scale factor. + 'curr1_input' : { 'object_path' : 'HSCA/Iout','poll_interval' : 5000,'scale' : 0.25,'units' : 'mA' }, + 'in2_input' : { 'object_path' : 'HSCA/Vout','poll_interval' : 5000,'scale' : 1,'units' : 'mV' }, + } + }, + '5-0010' : { + 'names' : { + 'curr1_input' : { 'object_path' : 'HSCB/Iout','poll_interval' : 5000,'scale' : 0.25,'units' : 'mA' }, + 'in2_input' : { 'object_path' : 'HSCB/Vout','poll_interval' : 5000,'scale' : 1,'units' : 'mV' }, + } + }, + '6-0010' : { + 'names' : { + 'curr1_input' : { 'object_path' : 'HSCC/Iout','poll_interval' : 5000,'scale' : 0.25,'units' : 'mA' }, + 'in2_input' : { 'object_path' : 'HSCC/Vout','poll_interval' : 5000,'scale' : 1,'units' : 'mV' }, + } + }, } +# Miscellaneous non-poll sensor with system specific properties. +# The sensor id is the same as those defined in ID_LOOKUP['SENSOR']. +MISC_SENSORS = { + 0x09 : { 'class' : 'BootCountSensor' }, + 0x05 : { 'class' : 'BootProgressSensor' }, + 0x08 : { 'class' : 'OccStatusSensor', + 'os_path' : '/sys/class/i2c-adapter/i2c-3/3-0050/online' }, + 0x0A : { 'class' : 'OccStatusSensor', + 'os_path' : '/sys/class/i2c-adapter/i2c-3/3-0051/online' }, + 0x32 : { 'class' : 'OperatingSystemStatusSensor' }, + 0x33 : { 'class' : 'PowerCap', + 'os_path' : '/sys/class/hwmon/hwmon3/user_powercap' }, +} diff --git a/data/Firestone.py b/data/Firestone.py index 91a6099..4767178 100755 --- a/data/Firestone.py +++ b/data/Firestone.py @@ -466,7 +466,8 @@ {'gpio_pin': 'N3', 'direction': 'out'} GPIO_CONFIG['CP1_DEVICES_RESET_N'] = \ {'gpio_pin': 'N5', 'direction': 'out'} - +GPIO_CONFIG['IDBTN'] = \ + { 'gpio_pin': 'Q7', 'direction': 'out' } GPIO_CONFIG['FSI_DATA'] = \ {'gpio_pin': 'A5', 'direction': 'out'} GPIO_CONFIG['FSI_CLK'] = \ @@ -608,3 +609,18 @@ def convertGpio(name): } }, } + + +# Miscellaneous non-poll sensor with system specific properties. +# The sensor id is the same as those defined in ID_LOOKUP['SENSOR']. +MISC_SENSORS = { + 0x5f : { 'class' : 'BootCountSensor' }, + 0x05 : { 'class' : 'BootProgressSensor' }, + 0x08 : { 'class' : 'OccStatusSensor', + 'os_path' : '/sys/class/i2c-adapter/i2c-3/3-0050/online' }, + 0x09 : { 'class' : 'OccStatusSensor', + 'os_path' : '/sys/class/i2c-adapter/i2c-3/3-0051/online' }, + 0xb5 : { 'class' : 'OperatingSystemStatusSensor' }, + 0xb3 : { 'class' : 'PowerCap', + 'os_path' : '/sys/class/hwmon/hwmon3/user_powercap' }, +} diff --git a/data/Garrison.py b/data/Garrison.py index 5564162..e8f0927 100755 --- a/data/Garrison.py +++ b/data/Garrison.py @@ -478,6 +478,8 @@ GPIO_CONFIG['BMC_THROTTLE'] = \ {'gpio_pin': 'J3', 'direction': 'out'} +GPIO_CONFIG['IDBTN'] = \ + { 'gpio_pin': 'Q7', 'direction': 'out' } GPIO_CONFIG['POWER_BUTTON'] = \ {'gpio_pin': 'E0', 'direction': 'both'} GPIO_CONFIG['RESET_BUTTON'] = \ @@ -608,3 +610,17 @@ def convertGpio(name): } }, } + +# Miscellaneous non-poll sensor with system specific properties. +# The sensor id is the same as those defined in ID_LOOKUP['SENSOR']. +MISC_SENSORS = { + 0x5f : { 'class' : 'BootCountSensor' }, + 0x05 : { 'class' : 'BootProgressSensor' }, + 0x08 : { 'class' : 'OccStatusSensor', + 'os_path' : '/sys/class/i2c-adapter/i2c-3/3-0050/online' }, + 0x09 : { 'class' : 'OccStatusSensor', + 'os_path' : '/sys/class/i2c-adapter/i2c-3/3-0051/online' }, + 0xb5 : { 'class' : 'OperatingSystemStatusSensor' }, + 0xb3 : { 'class' : 'PowerCap', + 'os_path' : '/sys/class/hwmon/hwmon3/user_powercap' }, +} diff --git a/data/Palmetto.py b/data/Palmetto.py index 09fbe06..bb4d6f2 100755 --- a/data/Palmetto.py +++ b/data/Palmetto.py @@ -123,6 +123,12 @@ 'monitor_process' : True, 'process_name' : 'flash_bios.exe', }, + 'bmc_flash_control' : { + 'system_state' : 'BMC_STARTING', + 'start_process' : True, + 'monitor_process' : True, + 'process_name' : 'bmc_update.py', + }, 'download_manager' : { 'system_state' : 'BMC_STARTING', 'start_process' : True, @@ -184,7 +190,7 @@ '/system/chassis/motherboard/cpu0/core11' : { 'fru_type' : 'CORE', 'is_fru' : False, }, - '/system/chassis/motherboard/centaur0' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, }, + '/system/chassis/motherboard/membuf0' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, }, '/system/chassis/motherboard/dimm0' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, '/system/chassis/motherboard/dimm1' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, @@ -206,7 +212,7 @@ 0x0d : '/system/chassis', 0x34 : '/system/chassis/motherboard', 0x01 : '/system/chassis/motherboard/cpu0', - 0x02 : '/system/chassis/motherboard/centaur0', + 0x02 : '/system/chassis/motherboard/membuf0', 0x03 : '/system/chassis/motherboard/dimm0', 0x04 : '/system/chassis/motherboard/dimm1', 0x05 : '/system/chassis/motherboard/dimm2', @@ -217,7 +223,7 @@ 'PRODUCT_15' : '/system', 'CHASSIS_2' : '/system/chassis', 'BOARD_1' : '/system/chassis/motherboard/cpu0', - 'BOARD_2' : '/system/chassis/motherboard/centaur0', + 'BOARD_2' : '/system/chassis/motherboard/membuf0', 'BOARD_14' : '/system/chassis/motherboard', 'PRODUCT_3' : '/system/chassis/motherboard/dimm0', 'PRODUCT_4' : '/system/chassis/motherboard/dimm1', @@ -244,7 +250,7 @@ 0x2b : '/system/chassis/motherboard/cpu0/core9', 0x2c : '/system/chassis/motherboard/cpu0/core10', 0x2d : '/system/chassis/motherboard/cpu0/core11', - 0x2e : '/system/chassis/motherboard/centaur0', + 0x2e : '/system/chassis/motherboard/membuf0', 0x1e : '/system/chassis/motherboard/dimm0', 0x1f : '/system/chassis/motherboard/dimm1', 0x20 : '/system/chassis/motherboard/dimm2', @@ -269,6 +275,7 @@ GPIO_CONFIG['CRONUS_SEL'] = { 'gpio_pin': 'A6', 'direction': 'out' } GPIO_CONFIG['PGOOD'] = { 'gpio_pin': 'C7', 'direction': 'in' } GPIO_CONFIG['BMC_THROTTLE'] = { 'gpio_pin': 'J3', 'direction': 'out' } +GPIO_CONFIG['IDBTN'] = { 'gpio_pin': 'Q7', 'direction': 'out' } GPIO_CONFIG['POWER_BUTTON'] = { 'gpio_pin': 'E0', 'direction': 'both' } GPIO_CONFIG['PCIE_RESET'] = { 'gpio_pin': 'B5', 'direction': 'out' } GPIO_CONFIG['USB_RESET'] = { 'gpio_pin': 'B6', 'direction': 'out' } @@ -306,3 +313,15 @@ def convertGpio(name): } } } + +# Miscellaneous non-poll sensor with system specific properties. +# The sensor id is the same as those defined in ID_LOOKUP['SENSOR']. +MISC_SENSORS = { + 0x09 : { 'class' : 'BootCountSensor' }, + 0x05 : { 'class' : 'BootProgressSensor' }, + 0x08 : { 'class' : 'OccStatusSensor', + 'os_path' : '/sys/class/i2c-adapter/i2c-3/3-0050/online' }, + 0x32 : { 'class' : 'OperatingSystemStatusSensor' }, + 0x33 : { 'class' : 'PowerCap', + 'os_path' : '/sys/class/hwmon/hwmon1/user_powercap' }, +}