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

Cédric Le Goater clg at fr.ibm.com
Thu Feb 5 17:30:48 AEDT 2015


Hello !

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 last patches add a few extra sensor properties useful for output in 
the Linux driver.

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
  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
  document ibm,opal/sensors/ device tree nodes
  dts: add memory buffers temperature sensors

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. 

TODO:

 * 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. Tested on IBM Power and Open Power 
systems.


Thanks,

C. 

 core/Makefile.inc                    |    2 +-
 core/init.c                          |    4 +
 core/sensor.c                        |   38 +++
 doc/device-tree/ibm,opal/sensors.txt |  171 ++++++++++++
 hw/Makefile.inc                      |    2 +-
 hw/dts.c                             |  326 ++++++++++++++++++++++
 hw/fsp/fsp-sensor.c                  |  496 +++++++++++++++++++---------------
 include/dts.h                        |   25 ++
 include/fsp.h                        |    2 +
 include/platform.h                   |    6 +
 include/sensor.h                     |   53 ++++
 include/spcn.h                       |   94 +++++++
 platforms/astbmc/astbmc.h            |    2 +
 platforms/astbmc/common.c            |   11 +
 platforms/astbmc/firestone.c         |    1 +
 platforms/astbmc/habanero.c          |    1 +
 platforms/astbmc/palmetto.c          |    1 +
 platforms/ibm-fsp/common.c           |   10 +
 platforms/ibm-fsp/firenze.c          |    1 +
 platforms/ibm-fsp/ibm-fsp.h          |    3 +
 20 files changed, 1032 insertions(+), 217 deletions(-)
 create mode 100644 core/sensor.c
 create mode 100644 doc/device-tree/ibm,opal/sensors.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