]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blame - Documentation/driver-api/ipmb.rst
Merge tag 'asoc-v5.7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[mirror_ubuntu-hirsute-kernel.git] / Documentation / driver-api / ipmb.rst
CommitLineData
51bd6f29
AM
1==============================
2IPMB Driver for a Satellite MC
3==============================
4
5The Intelligent Platform Management Bus or IPMB, is an
6I2C bus that provides a standardized interconnection between
7different boards within a chassis. This interconnection is
8between the baseboard management (BMC) and chassis electronics.
9IPMB is also associated with the messaging protocol through the
10IPMB bus.
11
12The devices using the IPMB are usually management
13controllers that perform management functions such as servicing
14the front panel interface, monitoring the baseboard,
15hot-swapping disk drivers in the system chassis, etc...
16
17When an IPMB is implemented in the system, the BMC serves as
18a controller to give system software access to the IPMB. The BMC
19sends IPMI requests to a device (usually a Satellite Management
20Controller or Satellite MC) via IPMB and the device
21sends a response back to the BMC.
22
23For more information on IPMB and the format of an IPMB message,
24refer to the IPMB and IPMI specifications.
25
26IPMB driver for Satellite MC
27----------------------------
28
29ipmb-dev-int - This is the driver needed on a Satellite MC to
30receive IPMB messages from a BMC and send a response back.
31This driver works with the I2C driver and a userspace
32program such as OpenIPMI:
33
341) It is an I2C slave backend driver. So, it defines a callback
ac499fba
MCC
35 function to set the Satellite MC as an I2C slave.
36 This callback function handles the received IPMI requests.
51bd6f29
AM
37
382) It defines the read and write functions to enable a user
ac499fba 39 space program (such as OpenIPMI) to communicate with the kernel.
51bd6f29
AM
40
41
42Load the IPMB driver
43--------------------
44
45The driver needs to be loaded at boot time or manually first.
46First, make sure you have the following in your config file:
47CONFIG_IPMB_DEVICE_INTERFACE=y
48
491) If you want the driver to be loaded at boot time:
50
ac499fba 51a) Add this entry to your ACPI table, under the appropriate SMBus::
51bd6f29 52
ac499fba
MCC
53 Device (SMB0) // Example SMBus host controller
54 {
55 Name (_HID, "<Vendor-Specific HID>") // Vendor-Specific HID
56 Name (_UID, 0) // Unique ID of particular host controller
57 :
58 :
59 Device (IPMB)
60 {
61 Name (_HID, "IPMB0001") // IPMB device interface
62 Name (_UID, 0) // Unique device identifier
63 }
64 }
51bd6f29 65
ac499fba 66b) Example for device tree::
51bd6f29 67
ac499fba
MCC
68 &i2c2 {
69 status = "okay";
51bd6f29 70
ac499fba
MCC
71 ipmb@10 {
72 compatible = "ipmb-dev";
73 reg = <0x10>;
042f057f 74 i2c-protocol;
ac499fba
MCC
75 };
76 };
51bd6f29 77
042f057f
VK
78If xmit of data to be done using raw i2c block vs smbus
79then "i2c-protocol" needs to be defined as above.
80
ac499fba
MCC
812) Manually from Linux::
82
83 modprobe ipmb-dev-int
51bd6f29
AM
84
85
86Instantiate the device
87----------------------
88
89After loading the driver, you can instantiate the device as
ccf988b6 90described in 'Documentation/i2c/instantiating-devices.rst'.
51bd6f29
AM
91If you have multiple BMCs, each connected to your Satellite MC via
92a different I2C bus, you can instantiate a device for each of
93those BMCs.
ac499fba 94
51bd6f29 95The name of the instantiated device contains the I2C bus number
ac499fba 96associated with it as follows::
51bd6f29 97
ac499fba 98 BMC1 ------ IPMB/I2C bus 1 ---------| /dev/ipmb-1
51bd6f29 99 Satellite MC
ac499fba 100 BMC1 ------ IPMB/I2C bus 2 ---------| /dev/ipmb-2
51bd6f29
AM
101
102For instance, you can instantiate the ipmb-dev-int device from
ac499fba 103user space at the 7 bit address 0x10 on bus 2::
51bd6f29
AM
104
105 # echo ipmb-dev 0x1010 > /sys/bus/i2c/devices/i2c-2/new_device
106
107This will create the device file /dev/ipmb-2, which can be accessed
108by the user space program. The device needs to be instantiated
109before running the user space program.