From patchwork Mon Apr 17 06:50:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu Tu X-Patchwork-Id: 84024 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1932795vqo; Mon, 17 Apr 2023 00:08:21 -0700 (PDT) X-Google-Smtp-Source: AKy350Z+PoJDagsYDyRZMpoQKxPR8kTPM8R37nc4sQ945gSvdKv0qSwtarkIhuTntys7ltfgqRBg X-Received: by 2002:a05:6a20:389d:b0:d7:5f98:d2a3 with SMTP id n29-20020a056a20389d00b000d75f98d2a3mr13435857pzf.54.1681715300991; Mon, 17 Apr 2023 00:08:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681715300; cv=none; d=google.com; s=arc-20160816; b=ZipOOIpQiAvsCKIsAYHtejU4hL1d1jpbqfbI8u9o96cHxDXzKJOfo8XgCjSDx1MjI1 6Xg3OFbld0nnsia6xP+U2waw11jSGb59cwQ06PWBOnyPcwl8elt6Y0KGwpkBoteV6keO Z0MgqzE7wCQJaQv0PDMLpsC+t/VrgoOrucFVL1kBZajLfjawbL1cTcADIPrHgDLNbaRa 3WyZpNGkiGN1Wug3kqV+5U9j4gaU6a3M5Uhyka7kR+C0fiV5c8DB3OIXOJlX3I6EGAQa qJxaIaLyo34SOoqyY4uHm6+Ke1QoJDvQq/k2XlcU8uFT6MBwOz5nuwPL15FQjDtHcWUz cUTQ== 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=IHxte++ASoOjClvtRP6AwNHlbAapjJKleSclwkgnbF8=; b=QvVcANZZ+0a/dQFsQDL0K8jhNEKTXTRc8AQCHaDkK8EQdlyh1ENUkr9yp4mbZvGjGc UnxcpDTDOmQNliOc6oXqhntDhJZgOXEA8TaqMAyTD5AkNnSDur71EiPQoTox8EAJgua3 mbIoCCx0unmbAjeCwWgKW4iklEtUU0xZhsXYzqG3jpaLH+hqBhL02Mw09SBZ1eA7m4jp Rv2YyOr/mCQLzm+shCXj8fj/asPa3pYQKz86RxOuHow6pvfPH0eV6eW9Z3R8WQK4itiF q6I7QCIsLwVZyNgS00yW5b+sA9Mh/y/f7iHydWInyBo9e8gqJYE4jzo1J4q5Bd+SG77F EQQQ== 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 bv184-20020a632ec1000000b00517d81adf00si10746351pgb.624.2023.04.17.00.08.06; Mon, 17 Apr 2023 00:08: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 S230285AbjDQGvm (ORCPT + 99 others); Mon, 17 Apr 2023 02:51:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230270AbjDQGvf (ORCPT ); Mon, 17 Apr 2023 02:51:35 -0400 Received: from mail-sh.amlogic.com (mail-sh.amlogic.com [58.32.228.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF49310DE; Sun, 16 Apr 2023 23:50:52 -0700 (PDT) Received: from droid06.amlogic.com (10.18.11.248) by mail-sh.amlogic.com (10.18.11.5) with Microsoft SMTP Server id 15.1.2507.13; Mon, 17 Apr 2023 14:52:10 +0800 From: Yu Tu To: , , , , , Rob Herring , "Neil Armstrong" , Jerome Brunet , Kevin Hilman , Michael Turquette , Stephen Boyd , "Krzysztof Kozlowski" , Martin Blumenstingl CC: , , Yu Tu Subject: [PATCH V7 1/4] dt-bindings: clock: document Amlogic S4 SoC PLL clock controller Date: Mon, 17 Apr 2023 14:50:02 +0800 Message-ID: <20230417065005.24967-2-yu.tu@amlogic.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20230417065005.24967-1-yu.tu@amlogic.com> References: <20230417065005.24967-1-yu.tu@amlogic.com> MIME-Version: 1.0 X-Originating-IP: [10.18.11.248] X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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?1763406303504796193?= X-GMAIL-MSGID: =?utf-8?q?1763406303504796193?= Add the S4 PLL clock controller dt-bindings in the s4 SoC family. Signed-off-by: Yu Tu Reviewed-by: Rob Herring --- .../bindings/clock/amlogic,s4-pll-clkc.yaml | 50 +++++++++++++++++++ MAINTAINERS | 1 + .../dt-bindings/clock/amlogic,s4-pll-clkc.h | 30 +++++++++++ 3 files changed, 81 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/amlogic,s4-pll-clkc.yaml create mode 100644 include/dt-bindings/clock/amlogic,s4-pll-clkc.h diff --git a/Documentation/devicetree/bindings/clock/amlogic,s4-pll-clkc.yaml b/Documentation/devicetree/bindings/clock/amlogic,s4-pll-clkc.yaml new file mode 100644 index 000000000000..aeda4861cebe --- /dev/null +++ b/Documentation/devicetree/bindings/clock/amlogic,s4-pll-clkc.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/amlogic,s4-pll-clkc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic Meson S serials PLL Clock Controller + +maintainers: + - Neil Armstrong + - Jerome Brunet + - Yu Tu + +properties: + compatible: + const: amlogic,s4-pll-clkc + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + items: + - const: xtal + + "#clock-cells": + const: 1 + +required: + - compatible + - reg + - clocks + - clock-names + - "#clock-cells" + +additionalProperties: false + +examples: + - | + clkc_pll: clock-controller@fe008000 { + compatible = "amlogic,s4-pll-clkc"; + reg = <0xfe008000 0x1e8>; + clocks = <&xtal>; + clock-names = "xtal"; + #clock-cells = <1>; + }; + +... diff --git a/MAINTAINERS b/MAINTAINERS index 809dad977786..56dcd6d85064 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1882,6 +1882,7 @@ L: linux-amlogic@lists.infradead.org S: Maintained F: Documentation/devicetree/bindings/clock/amlogic* F: drivers/clk/meson/ +F: include/dt-bindings/clock/amlogic* F: include/dt-bindings/clock/gxbb* F: include/dt-bindings/clock/meson* diff --git a/include/dt-bindings/clock/amlogic,s4-pll-clkc.h b/include/dt-bindings/clock/amlogic,s4-pll-clkc.h new file mode 100644 index 000000000000..1dcdedb1a6dd --- /dev/null +++ b/include/dt-bindings/clock/amlogic,s4-pll-clkc.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ +/* + * Copyright (c) 2021 Amlogic, Inc. All rights reserved. + * Author: Yu Tu + */ + +#ifndef _DT_BINDINGS_CLOCK_AMLOGIC_S4_PLL_CLKC_H +#define _DT_BINDINGS_CLOCK_AMLOGIC_S4_PLL_CLKC_H + +/* + * CLKID index values + */ + +#define CLKID_FIXED_PLL 1 +#define CLKID_FCLK_DIV2 3 +#define CLKID_FCLK_DIV3 5 +#define CLKID_FCLK_DIV4 7 +#define CLKID_FCLK_DIV5 9 +#define CLKID_FCLK_DIV7 11 +#define CLKID_FCLK_DIV2P5 13 +#define CLKID_GP0_PLL 15 +#define CLKID_HIFI_PLL 17 +#define CLKID_HDMI_PLL 20 +#define CLKID_MPLL_50M 22 +#define CLKID_MPLL0 25 +#define CLKID_MPLL1 27 +#define CLKID_MPLL2 29 +#define CLKID_MPLL3 31 + +#endif /* _DT_BINDINGS_CLOCK_AMLOGIC_S4_PLL_CLKC_H */