Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3145744rwe; Sun, 16 Apr 2023 12:50:09 -0700 (PDT) X-Google-Smtp-Source: AKy350a9yhxEx25m49JMI8QquI6RlrMOQHu8k7sn0BU1JhDPLtbB3w2GaITbJJEIjr67EpuijC9m X-Received: by 2002:a17:90a:8048:b0:247:78c0:125e with SMTP id e8-20020a17090a804800b0024778c0125emr4268682pjw.15.1681674609542; Sun, 16 Apr 2023 12:50:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681674609; cv=none; d=google.com; s=arc-20160816; b=setcV2O2dRgpemP1s2HWQ9UcAoTZb3wtvEaEku6nf+/YHuojqNKbmrE3oQG4+tR/dj QuEIaTs1WplU91jg+5jI6dOxD5iP4cLvw8I0m5XMbPy4uwJ/C3/nu7Y7jCZ+/WDzFKCu HDLiySFv4iVTy/T7T16rjqVyIzZ8ei0Yw+IxRLdgyaYlAVcYG2zIhQG9+sFSSmly8ui3 YmwuGapxcck/PmbyQ6Y5kojzCHUx1Jeaxupg7+FOx+lUPZyh2ff33aGtxofY/Beuv3CK fKQR18XmQk9sNa5WFfQqwSsW70Yz0TxQnja77kwcJ6zT9112AMdXtDKqvzmcRuQr52j6 otDA== 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 :dkim-signature; bh=UEI0eSnVROGbttT9l8rewKYrct6gZV9DrPEigxvXAbE=; b=ZOdj6hreApxTrsjps2FbJhzzxnLmLlt79WxCCwRaGEdmEomicHbXQAJ3LqmEyj0tOq XQPgtj4CI7hec2qJaekPxULLZeJWqxuhjoVc+1aydACeFFpacfC1AxjZo3L8u1bzhvMf fr55Mx7tNTMIyAib/qsVzDjo+Po28it812iHgxEli9oYfajg9/nLCtuq66y1hMVyP2tw RvA43d85WmhCbz0zTrNlDZ+qJsVmVdC9yOynzol/h+qqVdSqg0G+jikMv2/0Xo9ApKwd j1BDCcTVYh1GIKzZ2t76GxJnkh3G8MUtzaD6biY3MIhLCN7HXvBvSRwITxf7XAqI8sOV VJ3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=ifKVIowj; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t184-20020a6381c1000000b00513776b1d31si9799323pgd.74.2023.04.16.12.49.56; Sun, 16 Apr 2023 12:50:09 -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; dkim=pass header.i=@gmail.com header.s=20221208 header.b=ifKVIowj; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229984AbjDPTsC (ORCPT + 99 others); Sun, 16 Apr 2023 15:48:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229959AbjDPTr7 (ORCPT ); Sun, 16 Apr 2023 15:47:59 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7204D3C39; Sun, 16 Apr 2023 12:47:46 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id la15so224142plb.11; Sun, 16 Apr 2023 12:47:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681674465; x=1684266465; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UEI0eSnVROGbttT9l8rewKYrct6gZV9DrPEigxvXAbE=; b=ifKVIowjbe1YizUEM+3ST0gRExiI9O1DyUUeZRr6cCIJTD8X7F3XPXMR9B5TX25zC3 8lgoJhipUwQSlAcNGXf0UDxuYQXUNjT1Avz7WST6RvDZm1L9XCSnXV3oGq8Xy7Pym28c kpFuaq8nAIRzEhNjSKl/fglm0W7iZh/9LKL8J12Nb8f20Y0KgIu61FRUjvmSipXOOd3q Iuitg/MTszSXpLUI3InHo0cTIONDg4GusUqg362stUuW8ih3Ub33mOla55pwLE0BPGI6 lawHzvtD1T4+doDwmmKML2FFGcH13ysKjhIhVdXSDDAf8Momc8JaxsugQz+iDNtQNsWX 9Mhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681674465; x=1684266465; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UEI0eSnVROGbttT9l8rewKYrct6gZV9DrPEigxvXAbE=; b=dtG4YdBBN/vD/hpFq5V5vNuQ92BDXCyHPRxaBZ4aeRwH0fkq5CccjsuxyPgi/+Vs+q 4cAxho/Tr/efxuenx0qr3PBHZfnAPeZMbGHdNbcG5Ew+bWwL/c6ZS7KmXAoSihJRuu1T 5+nzegcdvODHuaWwct7+K2j1FdvebGbNQQZ45hcDY8wztWzqGZMmbDfm3hxuXJA1df2v ubOgY9Br+LtUDdaNrFTzrrT76gIwedXWnAv/nevDu+anyYbI1Zkg14qFPUHmvkJrS3qZ ezz1FpGYw4aH1Mz3YoN9MFYEVU7oELlaB+bJdGStn4+/fcjjfYuowXsG9tdgpkumgURP VTkg== X-Gm-Message-State: AAQBX9dUuDXub8nJWZXBDc7XC3WOODB4NYyzHNPIXCAbIH/jqCIPAcLJ d2Zgipbis5l1e30pvTr0bxoe5uHKBhMIdXAUV5I= X-Received: by 2002:a17:903:22c3:b0:1a6:4032:ef2 with SMTP id y3-20020a17090322c300b001a640320ef2mr11717060plg.28.1681674465407; Sun, 16 Apr 2023 12:47:45 -0700 (PDT) Received: from d.home.yangfl.dn42 ([104.28.245.201]) by smtp.gmail.com with ESMTPSA id jd9-20020a170903260900b001a69b28f5c5sm4490375plb.222.2023.04.16.12.47.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Apr 2023 12:47:45 -0700 (PDT) From: David Yang To: linux-clk@vger.kernel.org Cc: David Yang , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Philipp Zabel , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 3/4] dt-bindings: clock: Add gate-clock Date: Mon, 17 Apr 2023 03:46:21 +0800 Message-Id: <20230416194624.1258860-4-mmyangfl@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230416194624.1258860-1-mmyangfl@gmail.com> References: <20230416194624.1258860-1-mmyangfl@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 Add DT bindings documentation for gate clock, which can gate its output. Signed-off-by: David Yang --- .../devicetree/bindings/clock/gate-clock.yaml | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/gate-clock.yaml diff --git a/Documentation/devicetree/bindings/clock/gate-clock.yaml b/Documentation/devicetree/bindings/clock/gate-clock.yaml new file mode 100644 index 000000000000..bcd549dd9db1 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/gate-clock.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/gate-clock.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Clock which can gate its output + +maintainers: + - David Yang + +description: | + Clock which can gate its output, by toggling one bit in a register. Such + register may also control other clocks or reset requests. + + The registers map is retrieved from the parental dt-node. So the clock node + should be represented as a sub-node of a "clock-controller" node. + + See also: Documentation/devicetree/bindings/clock/simple-clock-controller.yaml + +properties: + compatible: + const: gate-clock + + '#clock-cells': + const: 0 + + clocks: + maxItems: 1 + description: Parent clock. + + offset: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Offset in the register map for the control register (in bytes). + + bits: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Bit index which controls the output. + + clock-output-names: + maxItems: 1 + +required: + - compatible + - '#clock-cells' + - offset + - bits + +additionalProperties: false + +examples: + - | + clock { + compatible = "gate-clock"; + #clock-cells = <0>; + offset = <0xcc>; + bits = <3>; + clock-output-names = "my-clk"; + }; -- 2.39.2