From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61DD8C2D0CD for ; Wed, 18 Dec 2019 04:21:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2EEAF24650 for ; Wed, 18 Dec 2019 04:21:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="skg64jTG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726616AbfLREVb (ORCPT ); Tue, 17 Dec 2019 23:21:31 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:42278 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726594AbfLREVa (ORCPT ); Tue, 17 Dec 2019 23:21:30 -0500 Received: by mail-pg1-f196.google.com with SMTP id s64so517814pgb.9; Tue, 17 Dec 2019 20:21:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=npMj8u0di2OyfuNH4N410BtqEfh3bSH+Sq8lHYLRu2k=; b=skg64jTGQE65DyJCxi2WOtP+F0BF5VHFh+63lrWjnx7Brr/Vc7ngnKiSOO+K4XzV38 0yWoM9kV/DpWAkDz4n9JnjPlLI74pUM2hPIM5Lj/p4pk8m/kVq/I4vVgqwVSD21VYB8n MobspSYphaSUsfLjq5CPhZd4vU/Pz0keFwyC2lupfa4vRruX4gUeSKPYAywecGj21BBQ r9ytK0Zk7w/S0ixBlGeg1Cqy5HY2ieQ4zLp2VYx3V5YuHzmVjTSMNw+T+p6oYOdTz1gu QVpTHwgI2lYIY6qc2bbd0PdyYG3MdisTBiAIxL8VqE8lW9OnJEZABkJt1fRZONB/pfuf T6MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=npMj8u0di2OyfuNH4N410BtqEfh3bSH+Sq8lHYLRu2k=; b=e5IcM28dlR/W/bl6zeouzfjZgLb8/g97QkQ8j3n47PI2eDc3SeePqKrrzI/8XLv50K /fHS/C+JAO8uZRkJ2RSo0AI+1cBBdpIxFrjBgQPEo06Gfm6gZkZqIJrX/MV7zMksNhi5 Ta19ueAIldfhYqsU9664iyC/79LxwfVim5qaOLxmpDupN16ABt1j/6CaZihrCxCUP265 SQZcvTd1gS2FBZrK4A2hyDbP+wCn4hHE48xsAFSNjUzyYRjQdG5jBk49EsjaZtX7UCuB QVgRj8836WjOPx0UN9B94Z3sVJB4bTb67xERkP3M5UWZNx6eWLdylQ+H1ZXD8hnYJM/p psFA== X-Gm-Message-State: APjAAAXb/7ive8mpLWeLvPbPxXNEQOdjoH9Q/QDMUJT0S9yTO14swYao 0njFGfMPG+aP4IJT4rDakh4= X-Google-Smtp-Source: APXvYqzjRDLlV/nbrbOH2SEKHrMXnWg6SzAeK6/M5hYnY3GEoJvrWwu0E3JCNUUPG5fx7QApjbt4og== X-Received: by 2002:a63:5809:: with SMTP id m9mr631607pgb.26.1576642889749; Tue, 17 Dec 2019 20:21:29 -0800 (PST) Received: from anarsoul-thinkpad.lan (216-71-213-236.dyn.novuscom.net. [216.71.213.236]) by smtp.gmail.com with ESMTPSA id g17sm775380pfb.180.2019.12.17.20.21.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2019 20:21:29 -0800 (PST) From: Vasily Khoruzhick To: Yangtao Li , Zhang Rui , Daniel Lezcano , Amit Kucheria , Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai , Mauro Carvalho Chehab , "David S. Miller" , Greg Kroah-Hartman , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?UTF-8?q?Ond=C5=99ej=20Jirman?= , linux-kernel@vger.kernel.org Cc: Vasily Khoruzhick Subject: [PATCH v7 2/7] dt-bindings: thermal: add YAML schema for sun8i-thermal driver bindings Date: Tue, 17 Dec 2019 20:21:16 -0800 Message-Id: <20191218042121.1471954-3-anarsoul@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191218042121.1471954-1-anarsoul@gmail.com> References: <20191218042121.1471954-1-anarsoul@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Yangtao Li sun8i-thermal driver supports thermal sensor in wide range of Allwinner SoCs. Add YAML schema for its bindings. Signed-off-by: Yangtao Li Signed-off-by: Vasily Khoruzhick --- .../thermal/allwinner,sun8i-a83t-ths.yaml | 146 ++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml diff --git a/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml b/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml new file mode 100644 index 000000000000..8768c2450633 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml @@ -0,0 +1,146 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/thermal/allwinner,sun8i-a83t-ths.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Allwinner SUN8I Thermal Controller Device Tree Bindings + +maintainers: + - Yangtao Li + +properties: + compatible: + enum: + - allwinner,sun8i-a83t-ths + - allwinner,sun8i-h3-ths + - allwinner,sun8i-r40-ths + - allwinner,sun50i-a64-ths + - allwinner,sun50i-h5-ths + - allwinner,sun50i-h6-ths + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + resets: + maxItems: 1 + + nvmem-cells: + maxItems: 1 + description: Calibration data for thermal sensors + + nvmem-cell-names: + const: calibration + +allOf: + - if: + properties: + compatible: + contains: + const: allwinner,sun50i-h6-ths + + then: + properties: + clocks: + minItems: 1 + maxItems: 1 + + clock-names: + minItems: 1 + maxItems: 1 + items: + - const: bus + + else: + properties: + clocks: + minItems: 1 + maxItems: 2 + + clock-names: + minItems: 1 + maxItems: 2 + items: + - const: bus + - const: mod + + - if: + properties: + compatible: + contains: + const: allwinner,sun8i-h3-ths + + then: + properties: + "#thermal-sensor-cells": + const: 0 + + else: + properties: + "#thermal-sensor-cells": + const: 1 + + - if: + properties: + compatible: + contains: + enum: + - const: allwinner,sun8i-h3-ths + - const: allwinner,sun8i-r40-ths + - const: allwinner,sun50i-a64-ths + - const: allwinner,sun50i-h5-ths + - const: allwinner,sun50i-h6-ths + + then: + required: + - clocks + - clock-names + - resets + +required: + - compatible + - reg + - interrupts + - '#thermal-sensor-cells' + +examples: + - | + thermal-sensor@1f04000 { + compatible = "allwinner,sun8i-a83t-ths"; + reg = <0x01f04000 0x100>; + interrupts = <0 31 0>; + nvmem-cells = <&ths_calibration>; + nvmem-cell-names = "calibration"; + #thermal-sensor-cells = <1>; + }; + + - | + thermal-sensor@1c25000 { + compatible = "allwinner,sun8i-h3-ths"; + reg = <0x01c25000 0x400>; + clocks = <&ccu 0>, <&ccu 1>; + clock-names = "bus", "mod"; + resets = <&ccu 2>; + interrupts = <0 31 0>; + nvmem-cells = <&ths_calibration>; + nvmem-cell-names = "calibration"; + #thermal-sensor-cells = <0>; + }; + + - | + thermal-sensor@5070400 { + compatible = "allwinner,sun50i-h6-ths"; + reg = <0x05070400 0x100>; + clocks = <&ccu 0>; + clock-names = "bus"; + resets = <&ccu 2>; + interrupts = <0 15 0>; + nvmem-cells = <&ths_calibration>; + nvmem-cell-names = "calibration"; + #thermal-sensor-cells = <1>; + }; + +... -- 2.24.1