From patchwork Wed Oct 19 06:29:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinbo Zhu X-Patchwork-Id: 4449 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp163835wrs; Tue, 18 Oct 2022 23:41:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4TEoLJa1067Ks5EDwVroQIA1GwBC50gv8K7x/8HHQWCDesvcSVFoWNi+L1a7HZqCyu6f53 X-Received: by 2002:a05:6402:2949:b0:451:fabf:d88a with SMTP id ed9-20020a056402294900b00451fabfd88amr5873106edb.324.1666161680315; Tue, 18 Oct 2022 23:41:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666161680; cv=none; d=google.com; s=arc-20160816; b=yvmI/22BFJz7zdI3SCmBZyogy0m+L2An+VeEf7HXLExAOM1co8wF21Ybt9nY0vl8lk FBpsn8AWGXiwuVEmxjcMQwWbA5YXdHjhlIBFMhLViFKPHKO2FzGJHTF0mFt0/TlwwHjZ bbv2sTPhneeEMJ8VdMnVgVJ98YdZUcGwHZD40O41L1CkUemagzZKE2BVt+2mq8D7WuDR vXMQZwuc7V3cm6DCBxRqSW6sMFi0BeMzV2QalHhOjwoblG7KxtPuyl8c6qSRe4OBnZpr s2UcH8CkWgC9J26JSJhtG/sJAze9PHcoMwhO/hL3IYw8Wg3ZLaFOuWoXA+PI6zUukzh+ yo/A== 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:to:from; bh=OoltD01hh0fS2rZrJMqRHrh52310ovxQYTC/430zhIo=; b=Ijdy31kcgq3TcUpm0R0TWUfQFXMO+h/oilRkSWczs/4kUmjTZLG8knUGIl2pCyC1WF wM2xqyVi/qM8BTz/8VCJfhqYMqbvRPZJGHePjo7pEjPTPXw1Ldhcf8feh6dhnHJt8PNz MSjiLjgSTlTy494hM2UO/khSPb8H8FOL8P53FAJRjbH2ny/lljeYOTm2Js8uh26Vu3Dz nQFfahOOlK188Q07W+s8lNN1UTyPZaouXJfJRJ7IvNm+oatFcSYe7gt0VJVVbfN01eSP hPTBn4Px5yU77DmHlI+S/VtsUHCxi3X/PXu6mI57btfPyrMJCzwacu2aZevqHU6JMSIu Y9iQ== 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 s17-20020aa7c551000000b0045c9dbe290csi12212289edr.406.2022.10.18.23.40.56; Tue, 18 Oct 2022 23:41:20 -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 S230046AbiJSG33 (ORCPT + 99 others); Wed, 19 Oct 2022 02:29:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229981AbiJSG31 (ORCPT ); Wed, 19 Oct 2022 02:29:27 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 38972617C; Tue, 18 Oct 2022 23:29:26 -0700 (PDT) Received: from loongson.cn (unknown [10.180.13.64]) by gateway (Coremail) with SMTP id _____8BxfdpFmU9jh6gAAA--.3697S3; Wed, 19 Oct 2022 14:29:25 +0800 (CST) Received: from localhost.localdomain (unknown [10.180.13.64]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxXuA9mU9jHicBAA--.4688S4; Wed, 19 Oct 2022 14:29:23 +0800 (CST) From: Yinbo Zhu To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Huacai Chen , WANG Xuerui , Jiaxun Yang , Jianmin Lv , Yang Li , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, loongarch@lists.linux.dev, Yinbo Zhu Subject: [PATCH v2 3/3] dt-bindings: clock: add loongson2 clock binding Date: Wed, 19 Oct 2022 14:29:12 +0800 Message-Id: <20221019062912.3463-3-zhuyinbo@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20221019062912.3463-1-zhuyinbo@loongson.cn> References: <20221019062912.3463-1-zhuyinbo@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8CxXuA9mU9jHicBAA--.4688S4 X-CM-SenderInfo: 52kx5xhqerqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvJXoWxXF47tF4kJw4fuF43JFWDJwb_yoW5Xr1rpF nxC345GrW09F17uws5KFyxA3Z5Z3WkAFnrZanrAa4jyF98W3W5XF47K34DZa9rAFyxZ39F vFWfur4UC3W8Cw7anT9S1TB71UUUUjDqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bSxFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AKwVWUXVWUAwA2ocxC64 kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26ryj6F1UM28E F7xvwVC0I7IYx2IY6xkF7I0E14v26F4j6r4UJwA2z4x0Y4vEx4A2jsIE14v26r4UJVWxJr 1l84ACjcxK6I8E87Iv6xkF7I0E14v26r4UJVWxJr1ln4kS14v26r126r1DM2AIxVAIcxkE cVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx1l5I8CrVACY4xI64kE6c02F4 0Ex7xfMcIj6xIIjxv20xvE14v26r1q6rW5McIj6I8E87Iv67AKxVWxJVW8Jr1lOx8S6xCa FVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JMxkF7I0En4kS14v26r126r1DMxAIw28Icx kI7VAKI48JMxAIw28IcVCjz48v1sIEY20_WwCFx2IqxVCFs4IE7xkEbVWUJVW8JwCFI7km 07C267AKxVWUAVWUtwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r 1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVW5 JVW7JwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r 1j6r1xMIIF0xvEx4A2jsIE14v26F4j6r4UJwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4U JbIYCTnIWIevJa73UjIFyTuYvjxUzGYpUUUUU X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS 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?1747097150094232097?= X-GMAIL-MSGID: =?utf-8?q?1747097150094232097?= Add the loongson2 clock binding with DT schema format using json-schema. Signed-off-by: Yinbo Zhu --- Change in v2: 1. Drop "Binding" string in the title. 2. Drop entire allOf and move the contents to top level. 3. Change string "refclk_100m" to "ref_100m". .../bindings/clock/loongson,ls2k-clk.yaml | 64 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 65 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/loongson,ls2k-clk.yaml diff --git a/Documentation/devicetree/bindings/clock/loongson,ls2k-clk.yaml b/Documentation/devicetree/bindings/clock/loongson,ls2k-clk.yaml new file mode 100644 index 000000000000..104e38a618e2 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/loongson,ls2k-clk.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/loongson,ls2k-clk.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Loongson2 SoC Clock Control Module + +maintainers: + - Yinbo Zhu + +description: | + Loongson2 SoC clock control module is an integrated clock controller, which + generates and supplies to all modules. + +properties: + compatible: + enum: + - loongson,ls2k-clk + + reg: + maxItems: 1 + + clocks: + items: + - description: 100m ref + + clock-names: + items: + - const: ref_100m + + '#clock-cells': + const: 1 + description: + The clock consumer should specify the desired clock by having the clock + ID in its "clocks" phandle cell. See include/dt-bindings/clock/loongson,ls2k-clk.h + for the full list of loongson2 SoC clock IDs. + +required: + - compatible + - reg + - clocks + - clock-names + - '#clock-cells' + +additionalProperties: false + +examples: + - | + ref_100m: clock-ref-100m { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <100000000>; + clock-output-names = "ref_100m"; + }; + + - | + clk: clock-controller@1fe00480 { + compatible = "loongson,ls2k-clk"; + reg = <0x1fe00480 0x58>; + #clock-cells = <1>; + clocks = <&ref_100m>; + clock-names = "ref_100m"; + }; diff --git a/MAINTAINERS b/MAINTAINERS index a4de8f1b81f0..7b7ba73ccb99 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -11918,6 +11918,7 @@ LOONGSON2 SOC SERIES CLOCK DRIVER M: Yinbo Zhu L: linux-clk@vger.kernel.org S: Maintained +F: Documentation/devicetree/bindings/clock/loongson,ls2k-clk.yaml F: drivers/clk/clk-loongson2.c F: include/dt-bindings/clock/loongson,ls2k-clk.h