Add CPLD class for Mihawk platform
If PGOOD signal is abnormal when chassis power_on, read
Mihawk's CPLD-register via I2C to confirm the error.
First, confirm whether the power_on_error signal is 1
when chassis power_on(1 means abnormal).
If the signal is 1, read the error-code-register to
analysis reason.
Second, runtime to confirm whether the power_ready_error
signal is 1 after chassis power_on(1 means abnormal).
If the signal is 1, read the error-code-register to
analysis reason and shutdown the chassis.
Tested:
Use command "obmcutil chassiskill" to trigger PGOOD error
action analysis during chassis power on.
Signed-off-by: Andy YF Wang <Andy_YF_Wang@wistron.com>
Change-Id: I5f9c0d508627324a6c784ded125c28f0437bf52d
Signed-off-by: Alvin Wang <alvinwang@msn.com>
diff --git a/meson.build b/meson.build
index 1827472..2bc4b50 100644
--- a/meson.build
+++ b/meson.build
@@ -58,6 +58,17 @@
install_dir: servicedir)
endforeach
+# Get the power sequencer class name
+sequencer = get_option('power_sequencer')
+if sequencer == 'ucd90160'
+ sequencer_class = 'UCD90160'
+elif sequencer == 'mihawk-cpld'
+ sequencer_class = 'MihawkCPLD'
+else
+ # power sequencer is incorrect
+ error('power sequencer is incorrect')
+endif
+
conf = configuration_data()
conf.set_quoted(
'INPUT_HISTORY_BUSNAME_ROOT', get_option('input-history-busname-root'))
@@ -65,8 +76,10 @@
'INPUT_HISTORY_SENSOR_ROOT', get_option('input-history-sensor-root'))
conf.set_quoted(
'PSU_JSON_PATH', '/usr/share/phosphor-power/psu.json')
+conf.set(
+ 'SEQUENCER', sequencer_class)
conf.set10(
- 'UCD90160_DEVICE_ACCESS', get_option('ucd90160-access'))
+ 'DEVICE_ACCESS', get_option('device-access'))
configure_file(output: 'config.h', configuration: conf)