From patchwork Tue Jun 20 01:29:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinbo Zhu X-Patchwork-Id: 110231 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3363346vqr; Mon, 19 Jun 2023 18:52:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ51rRB4c2sBHfbmpMdHg5eO27JIjA+CUYwAk8jB4wo/ysokfEnUZg3O8p6xIaQrbJNIPh4j X-Received: by 2002:a05:6a00:2411:b0:64f:7a9c:cb15 with SMTP id z17-20020a056a00241100b0064f7a9ccb15mr7993470pfh.11.1687225921522; Mon, 19 Jun 2023 18:52:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687225921; cv=none; d=google.com; s=arc-20160816; b=s72Q/zBybajb0WrVYh846YfA8XEVTNQa9FORNcUgsDW3IEjOb0GV/cIB1gPtvpbn77 cxojitC73e5yaWAXBt4MijJdrqdY8lmxsedr0Qlp1pI5UcH+yTPXPXhZ6VeWop2Dt9gj ExHogucyZWReZvfmhz0c9xu55jWr7ZlRXPbLwuHNh7qfHk9eCWP4+2qz+GmlqEmE1Sp9 1HJIVwqPdCywA4Fe2fEsery2iP0HVhr2hclxUNHgy3ecwfS5cjisQEehBmVVwKMDsBZN RkgS1D4w/OT+L5TcfloxDW8PNXf8CX5Wef9QsFmTVyJx7Apy2j51bhMZ2BDEvohVs3Uk 04wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=TfDC+2UcUtaCPBK8UYRLzgGBYrNt3iIZKMdbCDYgNZw=; b=i3eZNMwQ+OPO7Q/+qoncohP8S2mqzSHz2PAKx3994+Uci2E/q596tMcCi07QwExDBG yGMo3H4ZiTm4aYQAtpWYQh5/gOM8/HTLNZRMwIfzs1HP4uLzErxzpcsKp7Mo7JBIXQEl ORQefN0+UTiC57/cDPgChCJu+Hxf87tWxXOYv7N0dwj9vOgA/ZjNVUUcw2kpfmN1fElE hpBCiHS5GdZyznoQW05VopyEX5bJVuHGa8HOXMRUpdFjtWQ7JDWLbmCbSbWOgj+z5rnR m2AyWrfQFHk7chT4f9BzxTJswmmwEI9RA2QiOGiIsR+Jq3pK7r0ffK5SX6Domph5QWcx +NLw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p2-20020aa79e82000000b006667a4ebfa8si614041pfq.336.2023.06.19.18.51.49; Mon, 19 Jun 2023 18:52:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229621AbjFTB34 (ORCPT + 99 others); Mon, 19 Jun 2023 21:29:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbjFTB3y (ORCPT ); Mon, 19 Jun 2023 21:29:54 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7C14D1A8; Mon, 19 Jun 2023 18:29:51 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.35]) by gateway (Coremail) with SMTP id _____8Cxc+gOAZFkJAMHAA--.371S3; Tue, 20 Jun 2023 09:29:50 +0800 (CST) Received: from user-pc.202.106.0.20 (unknown [10.20.42.35]) by localhost.localdomain (Coremail) with SMTP id AQAAf8DxFOQJAZFkEQIhAA--.27139S3; Tue, 20 Jun 2023 09:29:49 +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: Jianmin Lv , wanghongliang@loongson.cn, Liu Peibao , loongson-kernel@lists.loongnix.cn, zhanghongchen , Yinbo Zhu , Krzysztof Kozlowski Subject: [PATCH v15 2/2] thermal: dt-bindings: add loongson-2 thermal Date: Tue, 20 Jun 2023 09:29:44 +0800 Message-Id: <20230620012944.28877-2-zhuyinbo@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230620012944.28877-1-zhuyinbo@loongson.cn> References: <20230620012944.28877-1-zhuyinbo@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8DxFOQJAZFkEQIhAA--.27139S3 X-CM-SenderInfo: 52kx5xhqerqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7 ZEXasCq-sGcSsGvfJ3UbIjqfuFe4nvWSU5nxnvy29KBjDU0xBIdaVrnUUvcSsGvfC2Kfnx nUUI43ZEXa7xR_UUUUUUUUU== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769184607504657299?= X-GMAIL-MSGID: =?utf-8?q?1769184607504657299?= Add the Loongson-2 thermal binding with DT schema format using json-schema. Signed-off-by: Yinbo Zhu Reviewed-by: Krzysztof Kozlowski --- Change in v15: 1. Use the specific compatible. Change in v14: 1. NO change, but other patch in this series of patches set has changes. Change in v13: 1. Drop the sensor id. Change in v12: 1. NO change, but other patch in this series of patches set has changes. Change in v11: 1. NO change, but other patch in this series of patches set has changes. Change in v10: 1. Add all history change log information. Change in v9: 1. NO change, but other patch in this series of patches set has changes. Change in v8: 1. Replace string Loongson2/loongson2 with Loongson-2/loongson-2. Change in v7: 1. Split the modification of patch 3 and merge it into this patch. Change in v6: 1. Fix the warning "reg: [[0, 534779136], [0, 48]] is too long" when compile the yaml. Change in v5: 1. Keep use same quotes "'" in all places. Change in v4: 1. Fixup the compatible. 2. Update the binding file name. 3. Include irq.h to fix compile issue. Change in v3: 1. Remove the sensor id. 2. Remove the interrupt-parent in thermal required property. 3. Update the thermal binding file name. 4. Fixup the commit log information. Change in v2: 1. Add description and type about the "id". 2. Make the filename was based on compatible. .../thermal/loongson,ls2k-thermal.yaml | 44 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 45 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/loongson,ls2k-thermal.yaml diff --git a/Documentation/devicetree/bindings/thermal/loongson,ls2k-thermal.yaml b/Documentation/devicetree/bindings/thermal/loongson,ls2k-thermal.yaml new file mode 100644 index 000000000000..7538469997f9 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/loongson,ls2k-thermal.yaml @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/thermal/loongson,ls2k-thermal.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Thermal sensors on Loongson-2 SoCs + +maintainers: + - zhanghongchen + - Yinbo Zhu + +properties: + compatible: + oneOf: + - enum: + - loongson,ls2k1000-thermal + - items: + - enum: + - loongson,ls2k2000-thermal + - const: loongson,ls2k1000-thermal + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + #include + thermal: thermal-sensor@1fe01500 { + compatible = "loongson,ls2k1000-thermal"; + reg = <0x1fe01500 0x30>; + interrupt-parent = <&liointc0>; + interrupts = <7 IRQ_TYPE_LEVEL_LOW>; + }; diff --git a/MAINTAINERS b/MAINTAINERS index f9277fa2a728..0833eb09b2e4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12203,6 +12203,7 @@ M: zhanghongchen M: Yinbo Zhu L: linux-pm@vger.kernel.org S: Maintained +F: Documentation/devicetree/bindings/thermal/loongson,ls2k-thermal.yaml F: drivers/thermal/loongson2_thermal.c LOONGSON GPIO DRIVER