summaryrefslogtreecommitdiff
path: root/meta-facebook/meta-minerva
diff options
context:
space:
mode:
authorYang Chen <yang.chen@quantatw.com>2024-05-20 14:29:49 +0300
committerPatrick Williams <patrick@stwcx.xyz>2024-05-23 01:42:54 +0300
commitbb61c2ef1930eef966a00a628deb4749d78f1e65 (patch)
treed16116334fc013faa0ffc64fea2ab2d3397bea7e /meta-facebook/meta-minerva
parentfc97a08e3fa91e1620d81bdb8f30256b80c17e7b (diff)
downloadopenbmc-bb61c2ef1930eef966a00a628deb4749d78f1e65.tar.xz
meta-facebook: minerva: send command for enable POE
Initial setting the UART device and send power source configuration command to STM32F for enable POE. Change-Id: Ic9adab1f9cd36a5aff6aac420c3da3bcc93ec706 Signed-off-by: Yang Chen <yang.chen@quantatw.com>
Diffstat (limited to 'meta-facebook/meta-minerva')
-rw-r--r--meta-facebook/meta-minerva/recipes-phosphor/console/obmc-console/80-minerva-obmc-console-uart.rules4
-rw-r--r--meta-facebook/meta-minerva/recipes-phosphor/initrdscripts/phosphor-static-norootfs-init/99-platform-init35
2 files changed, 39 insertions, 0 deletions
diff --git a/meta-facebook/meta-minerva/recipes-phosphor/console/obmc-console/80-minerva-obmc-console-uart.rules b/meta-facebook/meta-minerva/recipes-phosphor/console/obmc-console/80-minerva-obmc-console-uart.rules
index 2b236f7be6..9f39f460c8 100644
--- a/meta-facebook/meta-minerva/recipes-phosphor/console/obmc-console/80-minerva-obmc-console-uart.rules
+++ b/meta-facebook/meta-minerva/recipes-phosphor/console/obmc-console/80-minerva-obmc-console-uart.rules
@@ -1 +1,5 @@
SUBSYSTEM=="tty", ATTRS{iomem_base}=="0x1E790000", ENV{SYSTEMD_WANTS}="obmc-console@ttyS5", TAG+="systemd"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011"
+SUBSYSTEM=="tty", ATTRS{bInterfaceNumber}=="03", SYMLINK+="ttyPOE"
+SUBSYSTEM=="tty", ATTRS{bInterfaceNumber}=="02", SYMLINK+="ttyRS485-1"
+SUBSYSTEM=="tty", ATTRS{bInterfaceNumber}=="01", SYMLINK+="ttyRS485-0"
diff --git a/meta-facebook/meta-minerva/recipes-phosphor/initrdscripts/phosphor-static-norootfs-init/99-platform-init b/meta-facebook/meta-minerva/recipes-phosphor/initrdscripts/phosphor-static-norootfs-init/99-platform-init
index d9def86a2a..c40e6475bd 100644
--- a/meta-facebook/meta-minerva/recipes-phosphor/initrdscripts/phosphor-static-norootfs-init/99-platform-init
+++ b/meta-facebook/meta-minerva/recipes-phosphor/initrdscripts/phosphor-static-norootfs-init/99-platform-init
@@ -20,4 +20,39 @@ else
echo "0" > "$SLOT_FILE"
fi
+# Below is the diagram of the smart valve implemtation on the CMM.
+# There are two end-device for smart valve and two communication interfaces.
+# One is Modbus (RS485) interface connected to FT4232H channel 1, 2.
+# Anorther is by ethernet interface which is connected to Marvell 88E6369X switch.
+# The PoE interface is connected to STM32F + BCM59011 PoE controller (Broadcom solution) for PoE power supply.
+# BMC can control the PoE power supply by sending command to STM32F via RS232.
+#
+# Diagram:
+# D_485_x = End device for smart valve x via RS485
+# D_POE_x = End device for smart valve x via PoE
+#
+# +----------+ +-------------+
+# | FT4232H | <----- USB ----> | BMC |
+# +----------+ +-------------+
+# / | \ \ |
+# ch0 ch1 ch2 ch3 RMII
+# | | | \ |
+# X (RS485) RS232 +-------------+
+# / \ \ | Marvell |
+# / \ \ | 88E6369X |
+#|D_485_0| |D_485_1| |STM32F| +-------------+
+# | | |
+# i2c | |
+# | | |
+# |BCM59011| 1000 Base-T
+# | | |
+# |(power |(data |(data
+# | | |
+# P54 POE----->|D_POE_0| |D_POE_1|
+POE_DEV="/dev/ttyPOE"
+# Set baud rate to 19200 and raw mode
+stty -F $POE_DEV 19200 raw
+# Send Power Source Configuration Command (0x18) to STM32F for enable PoE
+echo -e '\x18\x00\x00\x2c\x01\x00\x00\xff\xff\xff\xff\x41' > $POE_DEV
+
exit 0