Script to set witherspoon fan speeds

Sets all fans to the RPM value passed in.  Uses the i2cset
command because there is no hwmon entry yet for the
fan controller chip.

Will be removed when real fan control is implemented.

Change-Id: I50289dbcfcf175ab3349d851f4e45da061436b73
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/fan-default-speed/set_fan_speeds.sh b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/fan-default-speed/set_fan_speeds.sh
new file mode 100755
index 0000000..073c031
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/fan-default-speed/set_fan_speeds.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+if [ -e $1 ]
+then
+  RPM=8000
+else
+  RPM=$1
+fi
+
+for fan in `seq 0 3`; do
+    i2cset -y 3 0x52 0x00 $fan b
+    i2cset -y 3 0x52 0x3A 0xD0 b
+    i2cset -y 3 0x52 0xD1 0x00 0x00 i
+    i2cset -y 3 0x52 0xD9 0x00 b
+    i2cset -y 3 0x52 0xF1 0x40 0xF3 i
+    i2cset -y 3 0x52 0xF5 0x00 0x00 i
+    i2cset -y 3 0x52 0xF6 0x00 0x00 i
+    i2cset -y 3 0x52 0x3B $RPM w
+done