From patchwork Wed Sep 21 01:56:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinbo Zhu X-Patchwork-Id: 12982971 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B4A3C6FA90 for ; Wed, 21 Sep 2022 01:56:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230150AbiIUB4V (ORCPT ); Tue, 20 Sep 2022 21:56:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229805AbiIUB4U (ORCPT ); Tue, 20 Sep 2022 21:56:20 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F3AA979632; Tue, 20 Sep 2022 18:56:17 -0700 (PDT) Received: from localhost.localdomain (unknown [10.180.13.64]) by localhost.localdomain (Coremail) with SMTP id AQAAf8DxReI3bypj2yYfAA--.51844S3; Wed, 21 Sep 2022 09:56:13 +0800 (CST) From: Yinbo Zhu To: "Rafael J . Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Rob Herring , Krzysztof Kozlowski , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: zhanghongchen , Yinbo Zhu Subject: [PATCH v2 2/3] dt-bindings: thermal: Convert loongson2 to json-schema Date: Wed, 21 Sep 2022 09:56:04 +0800 Message-Id: <20220921015605.17078-2-zhuyinbo@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220921015605.17078-1-zhuyinbo@loongson.cn> References: <20220921015605.17078-1-zhuyinbo@loongson.cn> MIME-Version: 1.0 X-CM-TRANS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2js IE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZF pf9x0JU2_M3UUUUU= X-CM-SenderInfo: 52kx5xhqerqz5rrqw2lrqou0/ Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Convert the loongson2 thermal binding to DT schema format using json-schema. Signed-off-by: Yinbo Zhu --- Change in v2: 1. Add description and type about the "id". 2. Make the filename was based on compatible. .../bindings/thermal/loongson2-thermal.yaml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/loongson2-thermal.yaml diff --git a/Documentation/devicetree/bindings/thermal/loongson2-thermal.yaml b/Documentation/devicetree/bindings/thermal/loongson2-thermal.yaml new file mode 100644 index 000000000000..2994ae3a56aa --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/loongson2-thermal.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/thermal/loongson2-thermal.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Thermal sensors on loongson2 SoCs + +maintainers: + - zhanghongchen + - Yinbo Zhu + +properties: + compatible: + const: loongson,loongson2-thermal + + reg: + maxItems: 1 + + id: + $ref: '//schemas/types.yaml#/definitions/uint32' + description: | + Specify the thermal sensor id. + minimum: 0 + maximum: 3 + + interrupts: + maxItems: 1 + + "#thermal-sensor-cells": + const: 1 + +required: + - compatible + - reg + - id + - interrupt-parent + - interrupts + - '#thermal-sensor-cells' + +additionalProperties: false + +examples: + - | + thermal: thermal@1fe01500 { + compatible = "loongson,loongson2-thermal"; + reg = <0 0x1fe01500 0 0x30>; + id = <0>; + interrupt-parent = <&icu>; + interrupts = <7>; + #thermal-sensor-cells = <1>; + };