~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/hwmon/sbrmi.rst

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 .. SPDX-License-Identifier: GPL-2.0-or-later
  2 
  3 Kernel driver sbrmi
  4 ===================
  5 
  6 Supported hardware:
  7 
  8   * Sideband Remote Management Interface (SB-RMI) compliant AMD SoC
  9     device connected to the BMC via the APML.
 10 
 11     Prefix: 'sbrmi'
 12 
 13     Addresses scanned: This driver doesn't support address scanning.
 14 
 15     To instantiate this driver on an AMD CPU with SB-RMI
 16     support, the i2c bus number would be the bus connected from the board
 17     management controller (BMC) to the CPU.
 18     The SMBus address is really 7 bits. Some vendors and the SMBus
 19     specification show the address as 8 bits, left justified with the R/W
 20     bit as a write (0) making bit 0. Some vendors use only the 7 bits
 21     to describe the address.
 22     As mentioned in AMD's APML specification, The SB-RMI address is
 23     normally 78h(0111 100W) or 3Ch(011 1100) for socket 0 and 70h(0111 000W)
 24     or 38h(011 1000) for socket 1, but it could vary based on hardware
 25     address select pins.
 26 
 27     Datasheet: The SB-RMI interface and protocol along with the Advanced
 28                Platform Management Link (APML) Specification is available
 29                as part of the open source SoC register reference at:
 30 
 31                https://www.amd.com/en/support/tech-docs?keyword=55898
 32 
 33 Author: Akshay Gupta <akshay.gupta@amd.com>
 34 
 35 Description
 36 -----------
 37 
 38 The APML provides a way to communicate with the SB Remote Management interface
 39 (SB-RMI) module from the external SMBus master that can be used to report socket
 40 power on AMD platforms using mailbox command and resembles a typical 8-pin remote
 41 power sensor's I2C interface to BMC.
 42 
 43 This driver implements current power with power cap and power cap max.
 44 
 45 sysfs-Interface
 46 ---------------
 47 Power sensors can be queried and set via the standard ``hwmon`` interface
 48 on ``sysfs``, under the directory ``/sys/class/hwmon/hwmonX`` for some value
 49 of ``X`` (search for the ``X`` such that ``/sys/class/hwmon/hwmonX/name`` has
 50 content ``sbrmi``)
 51 
 52 ================ ===== ========================================================
 53 Name             Perm   Description
 54 ================ ===== ========================================================
 55 power1_input     RO    Current Power consumed
 56 power1_cap       RW    Power limit can be set between 0 and power1_cap_max
 57 power1_cap_max   RO    Maximum powerlimit calculated and reported by the SMU FW
 58 ================ ===== ========================================================
 59 
 60 The following example show how the 'Power' attribute from the i2c-addresses
 61 can be monitored using the userspace utilities like ``sensors`` binary::
 62 
 63   # sensors
 64   sbrmi-i2c-1-38
 65   Adapter: bcm2835 I2C adapter
 66   power1:       61.00 W (cap = 225.00 W)
 67 
 68   sbrmi-i2c-1-3c
 69   Adapter: bcm2835 I2C adapter
 70   power1:       28.39 W (cap = 224.77 W)
 71   #
 72 
 73 Also, Below shows how get and set the values from sysfs entries individually::
 74   # cat /sys/class/hwmon/hwmon1/power1_cap_max
 75   225000000
 76 
 77   # echo 180000000 > /sys/class/hwmon/hwmon1/power1_cap
 78   # cat /sys/class/hwmon/hwmon1/power1_cap
 79   180000000

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php