336 94 39KB
English Pages 5
SYSTEM MANAGEMENT BUS - IT’S NOT JUST FOR BATTERIES John Milios, USAR Systems Wei Wang, USAR Systems
process can be found in the System Management Bus (SMBus). The SMBus is best known for its flagship application - the Smart Battery System. The SMBus, based on the proven IIC technology, was created to be the control bus for smart batteries and smart chargers, allowing for greater command over battery management and power drain. What is not so widely known about the SMBus is that it offers a simple, even elegant, method to connect an almost limitless array of peripheral devices such as EEPROMs, digital potentiometers, power plane controls, temperature sensors, etc. to a system with no fuss, muss or extensive engineering resources.
Abstract A wide variety of System Management Bus-compatible components, such as Smart Batteries, Smart Chargers, EEPROMs, digital potentiometers, temperature sensors, etc. are now readily available to portable and handheld system designers. These devices can enable OEMs to add a heightened level of functionality to their products. Therefore it is important to offer an easy way to access these devices while at the same time providing a standard supported platform at the BIOS and O/S level for the implementation of input device and power management-related features. This paper will offer a technique for implementing the SMBus in one step using a single, low-cost IC, as well as discuss BIOS issues and the relation between the SMBus and the new power management specification ACPI.
The Importance of a Standard Interface System designers who need to use a Digital Potentiometer for LCD backlight/contrast, or a temperature sensor to monitor the CPU now must use a customized chip in order to control these devices. This is because different peripheral devices have different interfaces and utilize different operating methods. Designing such peripheral devices into a system is therefore more of a headache than a challenge. However, if the same designer implemented the SMBus in his system, his desire for aspirin (or something stronger) would diminish. SMBus devices are standard devices and share a common interface method. Such devices
On Simplification As the advances in technology over the last ten years have increased the speed and utility of the PC to before unimagined levels, so also have they increased the complexity of the machine itself. The parts list for a computer now more resembles that of a Boeing 747 than that of the home appliance the PC is poised to become. The challenge for OEMs in the coming years, then, will be to simplify PC design while continuing to increase its utility. The solution to one small part of the simplification 1
can be connected to the SMBus using typically only two lines (clock, data and sometimes interrupt), require far fewer components than are currently needed for connection, and do not have to have a proprietary implementation for each individual component. Further, SMBus peripherals, essentially IIC devices, are readily available from several leading manufacturers, including National Semiconductor, Philips, Maxim, Microchip, Xicor and others.
Such an implementation method is particularly useful to hand-held/single board computer designers, as it makes the SMBus instantly available to the real-estate and resource-strained systems that often rely on the types of peripheral devices the SMBus makes easily accessible. Utilizing a keyboard encoder does not limit access to the SMBus in any way. Smart batteries, smart chargers and the rest of the smart battery subsystem are just as easy to plug-in as other SMBus devices. In addition, the keyboard encoder has other valuable attributes, such as its ability to act as the only powered device in the system and its ability to command a system wake-up. Following is a block diagram of an SMBus implementation using a keyboard encoder.
Implementing the SMBus in a Portable System The SMBus can be implemented using a specialized motherboard keyboard controller. This type of implementation has already been covered in a variety of other papers, including papers submitted at the Portable by Design conference (see, for example, Maximizing Portable Computer Power Management Using Smart Battery Data, Stephen Gentile and Michael Michland, SystemSoft, Second Annual Portable by Design Conference). Another method for implementing the SMBus is by using a dedicated, low cost IC to act as an SMBus master. Using a stand-alone IC does present some difficulties, though, as such an IC would have no obvious means of communicating with the host system. Because the SMBus offers multiple master support - devices can not only communicate to the system and visa versa, but also to each other - such communication is important. Therefore it is practical to use an IC that already communicates to the host, such as a keyboard encoder. The keyboard encoder communicates to the host via the 8042 port provided by typical motherboard chip sets.
Communication Between SMBus Devices and the Host One implementation problem is how to facilitate communication between SMBus peripheral devices and the host via the keyboard encoder. In USAR’s implementation, the encoder supports a set of PS/2 protocol extensions that implement communication between the host system and the devices attached to 2
the SMBus. These protocol extensions provide a complete implementation of the SMBus specification, allowing O/S and BIOS to gain full access and control of any SMBus compatible device connected to the encoder IC’s SMBus port. The protocol extensions provide both a command format of communication with the system as well as a method for monitoring actual data traffic generated by each command on the SMBus. In addition, the IC can implement a set of actions and maintenance tasks on SMBus devices that can be either invoked by keyboard action or can be programmed to be executed periodically. Such actions include control of the LCD contrast through the keyboard or periodic polling of the Smart Battery for customized alert levels. A unique feature of this implementation is the IC’s capability of relaying messages from one SMB device to another. This capability is extremely important in the case of communications between a smart charger and the smart battery. The inability of some smart chargers to talk directly to smart batteries has been a stumbling block in other SMBus implementations.
returning the contents of the SMBus Control/Status Register (SMBCSR), or the status accompanied with data, if available. In case of a transaction initiated by an SMBus device, the encoder will receive the data and subsequently will communicate it to the host system. The following diagrams illustrate the transactions process for commands initiated by the device and the system. Transaction Initiated by SMBus Device SMBus Device Initiates Command/Report to SMBus Host
UR5HCSMB Receives and ACKs Data Report
SMBus Enabled?
Yes
UR5HCSMB Creates Report to Host System
Transactions Overview Most of the SMBus transactions are initiated by the host system. The only exemption is a report that the encoder IC receives from an SMBus device acting as a slave. Such report may be initiated by a Smart Battery to alert the host of low power level. Typically the host will initiate a transaction by issuing an Extended Protocol command to the encoder IC. The IC will then relay the information to the target device. After the transaction is complete it will report to the host either the status of SMBus, by 3
No
No Action
Transaction Initiated by the Host System
The Issue of BIOS and OS In DOS-based systems, there are no conflicts as far as communication between the SMBus devices and the host. However, in the Windows environment, the Windows keyboard driver takes exclusive control of the 8042 disabling access to other device drivers and BIOS. This problem can be addressed only by substituting the VKD.Vxd with a custom one providing synchronization and SMBus support. Luckily, the next generation of Windows, or Memphis, does offer full SMBus support. This support is provided via a new power management interface - Advanced Configuration and Power Interface (ACPI) - which is incorporated into the new Windows.
Application or System Initiated Transaction
System Issues Extended Protocol Command through the 8042 to the UR5HCSMB
UR5HCSMB Decodes & Processes Command
Command is relayed to target device on SMBus
Is Command Relayed Succesfully?
No
ACPI
Yes No
Does Command Require Data/Response from SMBus Device?
Yes
Initiate Report to System
ACPI was designed jointly by Microsoft, Intel and Toshiba as a way of achieving the goal of the OnNow initiative. PCs utilizing ACPI will come on immediately when activated by a user and, even when turned-off, will be able to perform certain automated tasks. ACPI achieves this by implementing a low-power system-wide sleep state that can be used as an alternative to simply shutting the system down. In addition, ACPI can be used as the control mechanism for powering on and off peripherals and consumer devices connected to the system, such as network cards, CD-ROMs, TVs and VCRs. Connected devices can also activate the ACPI-enabled PC. In short, ACPI makes it easier to integrate PCs into home environments. It also makes it possible to access the SMBus without the use of custom BIOS and custom device drivers. Because it is a power management paradigm, it provides a
No
No
Return Contents of SMBCSR
4
natural gateway for the SMBus and consequently the power-conscious Smart Battery System.
Conclusion Whether a system designer is interested in creating a Smart Battery System or merely wants a relatively painless method to connect a variety of necessary peripheral devices, the SMBus is a proven and hassle-free solution. In addition, the SMBus is an industry standard, with a fully developed, free specification, which minimizes compatibility problems, and it is supported by an industry group comprised of leading electronics manufacturers. These factors combine to make SMBus not just an easy way to connect peripherals, but also a more secure way.
5