0001 ==============================
0002 IPMB Driver for a Satellite MC
0003 ==============================
0004
0005 The Intelligent Platform Management Bus or IPMB, is an
0006 I2C bus that provides a standardized interconnection between
0007 different boards within a chassis. This interconnection is
0008 between the baseboard management (BMC) and chassis electronics.
0009 IPMB is also associated with the messaging protocol through the
0010 IPMB bus.
0011
0012 The devices using the IPMB are usually management
0013 controllers that perform management functions such as servicing
0014 the front panel interface, monitoring the baseboard,
0015 hot-swapping disk drivers in the system chassis, etc...
0016
0017 When an IPMB is implemented in the system, the BMC serves as
0018 a controller to give system software access to the IPMB. The BMC
0019 sends IPMI requests to a device (usually a Satellite Management
0020 Controller or Satellite MC) via IPMB and the device
0021 sends a response back to the BMC.
0022
0023 For more information on IPMB and the format of an IPMB message,
0024 refer to the IPMB and IPMI specifications.
0025
0026 IPMB driver for Satellite MC
0027 ----------------------------
0028
0029 ipmb-dev-int - This is the driver needed on a Satellite MC to
0030 receive IPMB messages from a BMC and send a response back.
0031 This driver works with the I2C driver and a userspace
0032 program such as OpenIPMI:
0033
0034 1) It is an I2C slave backend driver. So, it defines a callback
0035 function to set the Satellite MC as an I2C slave.
0036 This callback function handles the received IPMI requests.
0037
0038 2) It defines the read and write functions to enable a user
0039 space program (such as OpenIPMI) to communicate with the kernel.
0040
0041
0042 Load the IPMB driver
0043 --------------------
0044
0045 The driver needs to be loaded at boot time or manually first.
0046 First, make sure you have the following in your config file:
0047 CONFIG_IPMB_DEVICE_INTERFACE=y
0048
0049 1) If you want the driver to be loaded at boot time:
0050
0051 a) Add this entry to your ACPI table, under the appropriate SMBus::
0052
0053 Device (SMB0) // Example SMBus host controller
0054 {
0055 Name (_HID, "<Vendor-Specific HID>") // Vendor-Specific HID
0056 Name (_UID, 0) // Unique ID of particular host controller
0057 :
0058 :
0059 Device (IPMB)
0060 {
0061 Name (_HID, "IPMB0001") // IPMB device interface
0062 Name (_UID, 0) // Unique device identifier
0063 }
0064 }
0065
0066 b) Example for device tree::
0067
0068 &i2c2 {
0069 status = "okay";
0070
0071 ipmb@10 {
0072 compatible = "ipmb-dev";
0073 reg = <0x10>;
0074 i2c-protocol;
0075 };
0076 };
0077
0078 If xmit of data to be done using raw i2c block vs smbus
0079 then "i2c-protocol" needs to be defined as above.
0080
0081 2) Manually from Linux::
0082
0083 modprobe ipmb-dev-int
0084
0085
0086 Instantiate the device
0087 ----------------------
0088
0089 After loading the driver, you can instantiate the device as
0090 described in 'Documentation/i2c/instantiating-devices.rst'.
0091 If you have multiple BMCs, each connected to your Satellite MC via
0092 a different I2C bus, you can instantiate a device for each of
0093 those BMCs.
0094
0095 The name of the instantiated device contains the I2C bus number
0096 associated with it as follows::
0097
0098 BMC1 ------ IPMB/I2C bus 1 ---------| /dev/ipmb-1
0099 Satellite MC
0100 BMC1 ------ IPMB/I2C bus 2 ---------| /dev/ipmb-2
0101
0102 For instance, you can instantiate the ipmb-dev-int device from
0103 user space at the 7 bit address 0x10 on bus 2::
0104
0105 # echo ipmb-dev 0x1010 > /sys/bus/i2c/devices/i2c-2/new_device
0106
0107 This will create the device file /dev/ipmb-2, which can be accessed
0108 by the user space program. The device needs to be instantiated
0109 before running the user space program.