[Skiboot] [PATCH v2 00/13] add DTS support for cores and memory buffers

Cédric Le Goater clg at fr.ibm.com
Sat Feb 21 01:27:23 AEDT 2015

Hello !

Here is a v2 taking into account Stewart's comments. 

Changes since v1:

 - removed 'sensor_read' operation for the open power platform as it
   was not adding much value.
 - moved dts_sensor_read() in common routine opal_sensor_read()
 - moved the creation of the /ibm,opal/sensors node in sensor_init()
 - moved the sensor_init() call before platform.init() to make sure
   the FSP is initialized after the sensor node is created
 - added documentation for the OPAL call

The patchset starts with a framework to support sensor from different 
OPAL components, the current code only supporting the FSP. The DTS 
support comes next. Patch 5 brings in a lot of changes: it makes use 
of the new SPCN definitions and it reworks the device tree for the FSP 
sensors, using such a layout :

	<resource class name>@<resource identifier>/
	   └── ...

	cooling-fan at 2100/
	   ├── name             "cooling-fan"
	   ├── sensor-status    00052100 (336128)
	   ├── compatible       "ibm,opal-sensor"
	   ├── ibm,loc-code     "A1"
	   ├── sensor-threshold 01052100 (17113344)
	   ├── sensor-data      02052100 (33890560)
	   ├── sensor-type      "fan"
	   ├── phandle          10000016 (268435478)
	   └── linux,phandle    10000016 (268435478)

The remaining patches add a few extra sensor properties useful for output in 
the Linux driver, support for the memory buffers DTS, which are very similar
to cores and finally some documentations.

On the Linux side, we need a small change in the OPAL_SENSOR_READ call
to be able to read a sensor value in a synchronous manner. We also need 
a reworked 'ibmpowernv' driver supporting the new device tree. To be
sent soon as a followup and as an RFC.


 - get the junction temperatures (OCC SRAM changes to plan)
 - get Centaur DTS on Tuletas.
 - improve the location property 

The code is based on skitboot-4.1.1+ (6b968dd2977f). Tested on IBM 
Power and Open Power systems.



Cédric Le Goater (13):
  core: add a platform op to read sensors
  dts: add support to read the core temperatures
  dts: add device tree nodes for the core temperatures
  spcn: add definitions for the PRS command and modifiers
  fsp-sensor: rework device tree for sensors
  fsp-sensor: add a status property
  sensor: add a type property
  dts: add some extra properties to improve the driver
  fsp-sensor: cleanup unused code
  sensor: add device tree documentation
  dts: add memory buffers temperature sensors
  sensor: add documentation for the OPAL_SENSOR_READ call
  sensor: return OPAL_UNSUPPORTED when no sensors are supported

 core/Makefile.inc                    |    2 +-
 core/init.c                          |    4 +
 core/sensor.c                        |   47 ++++
 doc/device-tree/ibm,opal/sensors.txt |  171 ++++++++++++
 doc/opal-api/opal-sensor-read-88.txt |   33 +++
 hw/Makefile.inc                      |    2 +-
 hw/dts.c                             |  321 ++++++++++++++++++++++
 hw/fsp/fsp-sensor.c                  |  501 +++++++++++++++++++---------------
 include/dts.h                        |   25 ++
 include/fsp.h                        |    2 +
 include/platform.h                   |    6 +
 include/sensor.h                     |   58 ++++
 include/spcn.h                       |   94 +++++++
 platforms/ibm-fsp/common.c           |    5 +
 platforms/ibm-fsp/firenze.c          |    1 +
 platforms/ibm-fsp/ibm-fsp.h          |    3 +
 16 files changed, 1054 insertions(+), 221 deletions(-)
 create mode 100644 core/sensor.c
 create mode 100644 doc/device-tree/ibm,opal/sensors.txt
 create mode 100644 doc/opal-api/opal-sensor-read-88.txt
 create mode 100644 hw/dts.c
 create mode 100644 include/dts.h
 create mode 100644 include/sensor.h


More information about the Skiboot mailing list