From patchwork Mon Nov 28 21:09:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 9450437 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5644C60756 for ; Mon, 28 Nov 2016 21:10:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 48FE127F95 for ; Mon, 28 Nov 2016 21:10:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3DA7327FA4; Mon, 28 Nov 2016 21:10:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0D3427F46 for ; Mon, 28 Nov 2016 21:10:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755285AbcK1VKI (ORCPT ); Mon, 28 Nov 2016 16:10:08 -0500 Received: from www.zeus03.de ([194.117.254.33]:38998 "EHLO mail.zeus03.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754548AbcK1VKH (ORCPT ); Mon, 28 Nov 2016 16:10:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:in-reply-to:references; s=k1; bh=s0N1qKEJKmBPYQlzlJPtPYb2VyxSvmni1Lf0XKxW6JY=; b=JYvVv1BikYKZ P38AjW7P4op6ev1S6GV1yUdn9wAdb+LV6bIRSfX9G/brBSR6pffyPdCV66qG7Yj1 qkNC329PpQi6JKABbT93bdceS28v3+vG0xKyTa3E/aCX73o3TOBEFizoqpv6uS8C a5v5L4Hy4kXIIjFyVi4/PXH7BLMao+c= Received: (qmail 28889 invoked from network); 28 Nov 2016 22:10:05 +0100 Received: from p5b384559.dip0.t-ipconnect.de (HELO localhost) (l3s3148p1@91.56.69.89) by mail.zeus03.de with ESMTPSA (ECDHE-RSA-AES256-GCM-SHA384 encrypted, authenticated); 28 Nov 2016 22:10:05 +0100 From: Wolfram Sang To: linux-pm@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Zhang Rui , Eduardo Valentin , Khiem Nguyen , Kuninori Morimoto , Wolfram Sang , Hien Dang Subject: [PATCH v3 1/4] thermal: rcar_gen3_thermal: Document the R-Car Gen3 Date: Mon, 28 Nov 2016 22:09:21 +0100 Message-Id: <20161128210924.2921-2-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161128210924.2921-1-wsa+renesas@sang-engineering.com> References: <20161128210924.2921-1-wsa+renesas@sang-engineering.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Hien Dang Signed-off-by: Khiem Nguyen Signed-off-by: Wolfram Sang --- Changes since last version: * earlier versions had one node per sensor. This version has one node for all, but we now have one reg entry per sensor. This makes it easier to use the shared resources (FUSE registers, interrupts). There is no driver support for shared resources yet, but it will be added incrementally. * interrupt property specified. We make clear now that all interrupts routed must be specified in the binding. It is up to the driver if and how it makes use of them. Currently, there is no interrupt support, but it will be added later. * due to the well-specified reg entries, no need anymore for aliases. * fixed register range for TSC1. * reformatted paragraphs and fixed some typos. .../bindings/thermal/rcar-gen3-thermal.txt | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.txt diff --git a/Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.txt b/Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.txt new file mode 100644 index 00000000000000..07a9713ae6a757 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.txt @@ -0,0 +1,56 @@ +* DT bindings for Renesas R-Car Gen3 Thermal Sensor driver + +On R-Car Gen3 SoCs, the thermal sensor controllers (TSC) control the thermal +sensors (THS) which are the analog circuits for measuring temperature (Tj) +inside the LSI. + +Required properties: +- compatible : "renesas,-thermal", + Examples with soctypes are: + - "renesas,r8a7795-thermal" (R-Car H3) + - "renesas,r8a7796-thermal" (R-Car M3-W) +- reg : Address ranges of the thermal registers. Each sensor + needs one address range. Sorting must be done in + increasing order according to datasheet, i.e. + TSC1, TSC2, ... +- clocks : Must contain a reference to the functional clock. +- #thermal-sensor-cells : must be <1>. + +Optional properties: + +- interrupts : interrupts routed to the TSC (3 for H3 and M3-W) +- power-domain : Must contain a reference to the power domain. This + property is mandatory if the thermal sensor instance + is part of a controllable power domain. + +Example: + + tsc: thermal@e6198000 { + compatible = "renesas,r8a7795-thermal"; + reg = <0 0xe6198000 0 0x68>, + <0 0xe61a0000 0 0x5c>, + <0 0xe61a8000 0 0x5c>; + interrupts = , + , + ; + clocks = <&cpg CPG_MOD 522>; + power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; + #thermal-sensor-cells = <1>; + status = "okay"; + }; + + thermal-zones { + sensor_thermal1: sensor-thermal1 { + polling-delay-passive = <250>; + polling-delay = <1000>; + thermal-sensors = <&tsc 0>; + + trips { + sensor1_crit: sensor1-crit { + temperature = <90000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + };