summaryrefslogtreecommitdiff
path: root/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot/init_once.sh
diff options
context:
space:
mode:
authorLancelot Kao <lancelot.kao@fii-usa.com>2021-02-23 03:50:48 +0300
committerVivekanand Veeracholan <vveerach@google.com>2021-05-06 03:15:59 +0300
commit96a7ee39b88ce3db86c65e21d3390d97b12166c6 (patch)
treec2298babda004adb7c4e466a32805254a63a5bd5 /meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot/init_once.sh
parent653287259d89e1e7fbc442da9dc8cc669b46d8d7 (diff)
downloadopenbmc-96a7ee39b88ce3db86c65e21d3390d97b12166c6.tar.xz
meta-fii/meta-kudo: configure kudo system during bmc boot
1. do initialize during BMC boot Signed-off-by: Lancelot Kao <lancelot.kao@fii-usa.com> Change-Id: I5d3ff526a973152a96d00433eb86f7d7dd59e2d3 Signed-off-by: Mohaimen Alsamarai <Mohaimen.Alsamarai@fii-na.com>
Diffstat (limited to 'meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot/init_once.sh')
-rw-r--r--meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot/init_once.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot/init_once.sh b/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot/init_once.sh
new file mode 100644
index 000000000..1e928e509
--- /dev/null
+++ b/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot/init_once.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+source /usr/sbin/kudo-lib.sh
+
+# set all mux route to CPU before power on host
+# BMC_CPU_RTC_I2C_SEL #120
+set_gpio_ctrl 120 out 1
+# BMC_CPU_DDR_I2C_SEL #84
+set_gpio_ctrl 84 out 1
+# BMC_CPU_EEPROM_I2C_SEL #85
+set_gpio_ctrl 85 out 1
+# BMC_CPU_PMBUS_SEL #86
+set_gpio_ctrl 86 out 1
+
+# LED control
+# LED_BMC_LIVE #0
+set_gpio_ctrl 0 out 1
+
+# SPI control
+# Send command to CPLD to switch the bios spi interface to host
+i2cset -y -f -a 13 0x76 0x10 0x00
+
+# Power control
+# MON_BMC_ALIVE, GPIO 10
+set_gpio_ctrl 10 out 1
+# S0_BMC_OK, GPIO 69
+set_gpio_ctrl 69 out 1