From patchwork Mon Mar 9 20:56:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?C=C3=A9dric_Le_Goater?= X-Patchwork-Id: 448224 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id E41A3140157 for ; Tue, 10 Mar 2015 07:57:39 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 98B701A074A for ; Tue, 10 Mar 2015 07:57:39 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 1FD3D1A03B6 for ; Tue, 10 Mar 2015 07:57:10 +1100 (AEDT) Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 9 Mar 2015 20:57:07 -0000 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 9 Mar 2015 20:57:05 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 419D21B0805F for ; Mon, 9 Mar 2015 20:57:25 +0000 (GMT) Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t29Kv5Q26881624 for ; Mon, 9 Mar 2015 20:57:05 GMT Received: from d06av03.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t29Kv4mU011774 for ; Mon, 9 Mar 2015 14:57:05 -0600 Received: from hermes.kaod.org (sig-9-78-86-133.uk.ibm.com [9.78.86.133]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t29Kuu52011655; Mon, 9 Mar 2015 14:57:03 -0600 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: skiboot@lists.ozlabs.org Date: Mon, 9 Mar 2015 21:56:18 +0100 Message-Id: <1425934582-7556-8-git-send-email-clg@fr.ibm.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1423117857-32759-1-git-send-email-clg@fr.ibm.com> References: <1423117857-32759-1-git-send-email-clg@fr.ibm.com> MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15030920-0041-0000-0000-00000383B9A9 Subject: [Skiboot] [PATCH v3 07/11] dts: add device tree documentation X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Let's document what has been done so far for DTS sensors in the device tree under node ibm,opal/sensors/ Signed-off-by: Cédric Le Goater --- Changes since v2 : - removed the device tree modifications of the FSP sensors doc/device-tree/ibm,opal/sensors.txt | 67 ++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 doc/device-tree/ibm,opal/sensors.txt diff --git a/doc/device-tree/ibm,opal/sensors.txt b/doc/device-tree/ibm,opal/sensors.txt new file mode 100644 index 000000000000..81aeff81b3ae --- /dev/null +++ b/doc/device-tree/ibm,opal/sensors.txt @@ -0,0 +1,67 @@ +ibm,opal/sensors/ device tree nodes +-------------------------------------- + +All sensors of a POWER8 system are made available to the OS in the +ibm,opal/sensors/ directory. Each sensor is identified with a node +which name follows this pattern : + + @/ + +For example : + + core-temp@20/ + +Each node has a minimum set of properties describing the sensor : + + - a "compatible" property which should be "ibm,opal-sensor" + + - a "sensor-type" property, which can be "temp", "fan", "power". + More will be added when new resources are supported. This type + is used "as is" by the Linux driver to map sensors in the sysfs + interface of the hwmon framework of Linux. + + - a "sensor-data" property giving a unique handler for the + OPAL_SENSOR_READ call to be used by Linux to get the value of + a sensor attribute. A sensor handler has the following encoding : + + | Attr. | Res. | Resource | + | Number | Class | Id | + |--------|--------|----------------| + + - a "sensor-status" property giving the state of the sensor. The + status bits have the slightly meanings depending on the resource + type but testing against 0x6 should raise an alarm. + + - an optional "label" property + + +Each node can have some extra properties depending on the resource +they represent. See the tree below for more information. + +ibm,opal/sensors/ { + + /* + * Core temperatures (DTS) nodes. + * + * We use the PIR of the core as a resource identifier. + */ + core-temp@20 { + compatible = "ibm,opal-sensor"; + name = "core-temp"; + sensor-type = "temp"; + + /* Status bits : + * + * 0x0003 FATAL + * 0x0002 CRITICAL + * 0x0001 WARNING + */ + sensor-data = <0x00800020>; + + /* + * These are extra properties to help Linux output. + */ + ibm,pir = <0x20>; + label = "Core"; + }; +};