summaryrefslogtreecommitdiff
path: root/meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/chassis/ir38163-workaround/ir38163_workaround.sh
diff options
context:
space:
mode:
authorKen Chen <chen.kenyy@inventec.com>2018-01-30 04:51:50 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-01-31 17:50:52 +0300
commit811e6b72fe3ef44ae73a6e9ab2b1a7e82c513f17 (patch)
tree3a659b848cd3d14f93b5648b2c8297e5c9078a5d /meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/chassis/ir38163-workaround/ir38163_workaround.sh
parentbfdc337f68fbc6d3719cd624777b0f45190c4ba2 (diff)
downloadopenbmc-811e6b72fe3ef44ae73a6e9ab2b1a7e82c513f17.tar.xz
Add IR38163 re-probe workaround
IR38163 work on DC on state, need re-probe for centriq2400 HW design Change-Id: I8f2bf997d3fdd9c223367c96b4bd38768c006cdb Signed-off-by: Ken Chen <chen.kenyy@inventec.com>
Diffstat (limited to 'meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/chassis/ir38163-workaround/ir38163_workaround.sh')
-rw-r--r--meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/chassis/ir38163-workaround/ir38163_workaround.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/chassis/ir38163-workaround/ir38163_workaround.sh b/meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/chassis/ir38163-workaround/ir38163_workaround.sh
new file mode 100644
index 000000000..60120cf0d
--- /dev/null
+++ b/meta-openbmc-machines/meta-arm/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/chassis/ir38163-workaround/ir38163_workaround.sh
@@ -0,0 +1,19 @@
+#!/bin/sh -e
+# For one of the IR38163 device on i2c bus 5, address 0x42
+# Because the device only work when DC-ON, so when BMC during the DC-OFF state
+# the device will probe fail, need the workaround for this HW design..
+
+if [ "$1" == "add" ]; then
+ echo Add the 0x42 device on i2c bus 5....
+ sleep 2
+ echo 5-0042 > /sys/bus/i2c/drivers/ir38163/bind
+ sleep 1
+elif [ "$1" == "rm" ]; then
+ echo Remove the 0x42 deivce
+ sleep 2
+ echo 5-0042 > /sys/bus/i2c/drivers/ir38163/unbind
+ sleep 1
+else
+ echo "$0 <add|rm>" to set state
+fi
+