Skip to content
This repository has been archived by the owner on Jul 24, 2018. It is now read-only.

Commit

Permalink
Merge latest versions of the <system>.py files
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Chris Austen committed May 25, 2016
1 parent bedd727 commit 59a98e4
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 5 deletions.
36 changes: 36 additions & 0 deletions data/Barreleye.py
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
Expand Down Expand Up @@ -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' },
}
18 changes: 17 additions & 1 deletion data/Firestone.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'] = \
Expand Down Expand Up @@ -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' },
}
16 changes: 16 additions & 0 deletions data/Garrison.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'] = \
Expand Down Expand Up @@ -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' },
}
27 changes: 23 additions & 4 deletions data/Palmetto.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -184,7 +190,7 @@
'<inventory_root>/system/chassis/motherboard/cpu0/core11' : { 'fru_type' : 'CORE', 'is_fru' : False, },


'<inventory_root>/system/chassis/motherboard/centaur0' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
'<inventory_root>/system/chassis/motherboard/membuf0' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },

'<inventory_root>/system/chassis/motherboard/dimm0' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
'<inventory_root>/system/chassis/motherboard/dimm1' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
Expand All @@ -206,7 +212,7 @@
0x0d : '<inventory_root>/system/chassis',
0x34 : '<inventory_root>/system/chassis/motherboard',
0x01 : '<inventory_root>/system/chassis/motherboard/cpu0',
0x02 : '<inventory_root>/system/chassis/motherboard/centaur0',
0x02 : '<inventory_root>/system/chassis/motherboard/membuf0',
0x03 : '<inventory_root>/system/chassis/motherboard/dimm0',
0x04 : '<inventory_root>/system/chassis/motherboard/dimm1',
0x05 : '<inventory_root>/system/chassis/motherboard/dimm2',
Expand All @@ -217,7 +223,7 @@
'PRODUCT_15' : '<inventory_root>/system',
'CHASSIS_2' : '<inventory_root>/system/chassis',
'BOARD_1' : '<inventory_root>/system/chassis/motherboard/cpu0',
'BOARD_2' : '<inventory_root>/system/chassis/motherboard/centaur0',
'BOARD_2' : '<inventory_root>/system/chassis/motherboard/membuf0',
'BOARD_14' : '<inventory_root>/system/chassis/motherboard',
'PRODUCT_3' : '<inventory_root>/system/chassis/motherboard/dimm0',
'PRODUCT_4' : '<inventory_root>/system/chassis/motherboard/dimm1',
Expand All @@ -244,7 +250,7 @@
0x2b : '<inventory_root>/system/chassis/motherboard/cpu0/core9',
0x2c : '<inventory_root>/system/chassis/motherboard/cpu0/core10',
0x2d : '<inventory_root>/system/chassis/motherboard/cpu0/core11',
0x2e : '<inventory_root>/system/chassis/motherboard/centaur0',
0x2e : '<inventory_root>/system/chassis/motherboard/membuf0',
0x1e : '<inventory_root>/system/chassis/motherboard/dimm0',
0x1f : '<inventory_root>/system/chassis/motherboard/dimm1',
0x20 : '<inventory_root>/system/chassis/motherboard/dimm2',
Expand All @@ -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' }
Expand Down Expand Up @@ -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' },
}

0 comments on commit 59a98e4

Please sign in to comment.