[Skiboot] [PATCH v3 00/11] add DTS support for cores and memory buffers

Cédric Le Goater clg at fr.ibm.com
Tue Mar 10 07:56:11 AEDT 2015


Hello !

This v3 addresses the compatibility issue of v2. Old distros should 
be able to run on newer firmware without loosing sensor support on
FSP Power systems.

The new device tree layout completes the current one without
interfering and the Linux driver makes use of the different compatible
property to capture the sensors from both trees.


Changes since v2:

 - removed all changes from the device tree related to the FSP sensors.
   This to keep comptability with previous OPAL.

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 sensors from different 
OPAL components, the current code only supporting the FSP. The DTS 
support comes next with a new device tree layout for sensors :

	<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 the cores DTS and finally some documentation.

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 enhanced 'ibmpowernv' driver supporting the current device tree and 
the new one ! To be sent soon as a followup.

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

Open items:

 - get the junction temperatures (OCC SRAM changes to plan)
 - get Centaur DTS on Tuletas
 - improve the device tree for FSP sensors, keeping the compatibility.

Thanks,

C. 

Cédric Le Goater (11):
  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
  dts: add a status property
  dts: add a type property
  dts: add some extra properties to improve the driver
  dts: 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
  fsp-sensor: add a label property for the ambient sensor

 core/Makefile.inc                    |    2 +-
 core/init.c                          |    4 +
 core/sensor.c                        |   47 ++++++
 doc/device-tree/ibm,opal/sensors.txt |   93 ++++++++++
 doc/opal-api/opal-sensor-read-88.txt |   33 ++++
 hw/Makefile.inc                      |    2 +-
 hw/dts.c                             |  309 ++++++++++++++++++++++++++++++++++
 hw/fsp/fsp-sensor.c                  |   17 +-
 include/dts.h                        |   25 +++
 include/fsp.h                        |    2 +
 include/platform.h                   |    6 +
 include/sensor.h                     |   58 +++++++
 platforms/ibm-fsp/common.c           |    5 +
 platforms/ibm-fsp/firenze.c          |    1 +
 platforms/ibm-fsp/ibm-fsp.h          |    3 +
 15 files changed, 596 insertions(+), 11 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

-- 
1.7.10.4



More information about the Skiboot mailing list