From patchwork Mon Nov 6 08:55:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xianwei Zhao X-Patchwork-Id: 161899 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp2523661vqu; Mon, 6 Nov 2023 00:57:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IE1Iy18q6DkqdwisPhstJcUlxd8hssP7pQkrGPp4GUSoz0x/MSg5OyDjv4ZnZnybn+UDmxW X-Received: by 2002:a17:902:904a:b0:1c9:f780:8070 with SMTP id w10-20020a170902904a00b001c9f7808070mr29677703plz.19.1699261033663; Mon, 06 Nov 2023 00:57:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699261033; cv=none; d=google.com; s=arc-20160816; b=ti51rhNsMNtJd7Q0TuuWOOegXIjvMQPXvCXknYzvJSQcYkGZvvhwm9w3udZxnYhbhr xJH1b1VBzNoW2VpWBhCbPxk5DMW9P+qWgGlRldarhLxLmoHzjLTRQbYle88tKaswi22S J+Dch24VCqTw3VWvVbdEEt2nfAfW9QJKXExuKQhVFTMb8IoLfnQ38VtpcBAgi0e9BEdR FmMnsiuwGHilLlXxqB3dZL4ahRbIHMoCtBaGs5d8cVvz2itjHzAHj68OHahlkvbrn7aw kt2GYPvEs/SXz4Y8g2K1Nqiamt8UuxFilzPMyxASKoMpt6zW99x2rJDDbRD7v8Bryw4w PMbA== 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=db+yKSGGAYhUJeStjFL25BBp6Ga6aaQ4h9ZKjhJgRps=; fh=oBbb0mPe52rzzTIwtg9Xc2rZ0LejYIA322XCn8vhPVE=; b=j5QpOm/fx2BOKMNEyGCeU1bIvds4EDUtAJJkikKCbOpxB9fIhwqiyV76GTyGVEZu7Z mHwMpwaBKlCd4DjKlR/bwTOVPkhbCyPNLMD3GWIwoeQiHJ/H2moSlJQOS6Fl/7tKjR7O by5CVYJ6I7UsWjUPDbYpUMwhLazEbi5w+ww7+1SuWFJpWFMOd53mt0W10nR5pn2GXNV1 c5uQpKSJMYUqWNEXlZ3ZS4QD5qZH34b5X/wLx6a/egZ89dY3j/saq3g3tKbh8Eb6z3cx FZ/cj1FG9FBdDzm27f2FPVSTl5FGBI6f/Kh0rR0UMMEO9YKIvllU7v1iKvNsS4wvUTEX CUUQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=amlogic.com Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id w18-20020a170902d11200b001cc310cb08dsi7258184plw.53.2023.11.06.00.57.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 00:57:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=amlogic.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 9CBC58048C16; Mon, 6 Nov 2023 00:57:10 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231368AbjKFI44 (ORCPT + 35 others); Mon, 6 Nov 2023 03:56:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231285AbjKFI4x (ORCPT ); Mon, 6 Nov 2023 03:56:53 -0500 Received: from mail-sh.amlogic.com (mail-sh.amlogic.com [58.32.228.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66388E1; Mon, 6 Nov 2023 00:56:11 -0800 (PST) Received: from droid01-cd.amlogic.com (10.98.11.200) by mail-sh.amlogic.com (10.18.11.5) with Microsoft SMTP Server id 15.1.2507.13; Mon, 6 Nov 2023 16:56:08 +0800 From: Xianwei Zhao To: , , , , CC: Neil Armstrong , Jerome Brunet , Michael Turquette , "Stephen Boyd" , Rob Herring , "Krzysztof Kozlowski" , Kevin Hilman , Martin Blumenstingl , Chuan Liu , Xianwei Zhao Subject: [PATCH V6 1/4] dt-bindings: clock: add Amlogic C3 PLL clock controller bindings Date: Mon, 6 Nov 2023 16:55:51 +0800 Message-ID: <20231106085554.3237511-2-xianwei.zhao@amlogic.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20231106085554.3237511-1-xianwei.zhao@amlogic.com> References: <20231106085554.3237511-1-xianwei.zhao@amlogic.com> MIME-Version: 1.0 X-Originating-IP: [10.98.11.200] X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 06 Nov 2023 00:57:10 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781804337637353857 X-GMAIL-MSGID: 1781804337637353857 Add the PLL clock controller dt-bindings for Amlogic C3 SoC family. Co-developed-by: Chuan Liu Signed-off-by: Chuan Liu Signed-off-by: Xianwei Zhao Reviewed-by: Krzysztof Kozlowski --- .../bindings/clock/amlogic,c3-pll-clkc.yaml | 59 +++++++++++++++++++ .../dt-bindings/clock/amlogic,c3-pll-clkc.h | 44 ++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/amlogic,c3-pll-clkc.yaml create mode 100644 include/dt-bindings/clock/amlogic,c3-pll-clkc.h diff --git a/Documentation/devicetree/bindings/clock/amlogic,c3-pll-clkc.yaml b/Documentation/devicetree/bindings/clock/amlogic,c3-pll-clkc.yaml new file mode 100644 index 000000000000..9ca047698045 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/amlogic,c3-pll-clkc.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2022-2023 Amlogic, Inc. All rights reserved +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/amlogic,c3-pll-clkc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic C3 Serials PLL Clock Controller + +maintainers: + - Neil Armstrong + - Jerome Brunet + - Chuan Liu + - Xianwei Zhao + +properties: + compatible: + const: amlogic,c3-pll-clkc + + reg: + maxItems: 1 + + clocks: + items: + - description: input Top pll + - description: input MCLK pll + + clock-names: + items: + - const: top + - const: mpll + + "#clock-cells": + const: 1 + +required: + - compatible + - reg + - clocks + - clock-names + - "#clock-cells" + +additionalProperties: false + +examples: + - | + apb { + #address-cells = <2>; + #size-cells = <2>; + + clock-controller@8000 { + compatible = "amlogic,c3-pll-clkc"; + reg = <0x0 0x8000 0x0 0x1a4>; + clocks = <&clkc_periphs 0>, + <&clkc_periphs 1>; + clock-names = "top", "mpll"; + #clock-cells = <1>; + }; + }; diff --git a/include/dt-bindings/clock/amlogic,c3-pll-clkc.h b/include/dt-bindings/clock/amlogic,c3-pll-clkc.h new file mode 100644 index 000000000000..60df483629ed --- /dev/null +++ b/include/dt-bindings/clock/amlogic,c3-pll-clkc.h @@ -0,0 +1,44 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ +/* + * Copyright (c) 2023 Amlogic, Inc. All rights reserved. + * Author: Chuan Liu + */ + +#ifndef _DT_BINDINGS_CLOCK_AMLOGIC_C3_PLL_CLKC_H +#define _DT_BINDINGS_CLOCK_AMLOGIC_C3_PLL_CLKC_H + +#define CLKID_FIXED_PLL_DCO 0 +#define CLKID_FIXED_PLL 1 +#define CLKID_FCLK_50M_EN 2 +#define CLKID_FCLK_50M 3 +#define CLKID_FCLK_DIV2_DIV 4 +#define CLKID_FCLK_DIV2 5 +#define CLKID_FCLK_DIV2P5_DIV 6 +#define CLKID_FCLK_DIV2P5 7 +#define CLKID_FCLK_DIV3_DIV 8 +#define CLKID_FCLK_DIV3 9 +#define CLKID_FCLK_DIV4_DIV 10 +#define CLKID_FCLK_DIV4 11 +#define CLKID_FCLK_DIV5_DIV 12 +#define CLKID_FCLK_DIV5 13 +#define CLKID_FCLK_DIV7_DIV 14 +#define CLKID_FCLK_DIV7 15 +#define CLKID_GP0_PLL_DCO 16 +#define CLKID_GP0_PLL 17 +#define CLKID_GP1_PLL_DCO 18 +#define CLKID_GP1_PLL 19 +#define CLKID_HIFI_PLL_DCO 20 +#define CLKID_HIFI_PLL 21 +#define CLKID_MCLK_PLL_DCO 22 +#define CLKID_MCLK_PLL_OD 23 +#define CLKID_MCLK_PLL 24 +#define CLKID_MCLK0_SEL 25 +#define CLKID_MCLK0_SEL_EN 26 +#define CLKID_MCLK0_DIV 27 +#define CLKID_MCLK0 28 +#define CLKID_MCLK1_SEL 29 +#define CLKID_MCLK1_SEL_EN 30 +#define CLKID_MCLK1_DIV 31 +#define CLKID_MCLK1 32 + +#endif /* _DT_BINDINGS_CLOCK_AMLOGIC_C3_PLL_CLKC_H */