Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1830401lqa; Mon, 29 Apr 2024 23:45:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXx6TJWiueD+KWJ9iDZOwFTX7bdoXujYpNValoZODQrUtuOKp3qWBsLiai2PKZ1zOpXWbSEkD+dyHR735L2CxRkkJcm4HZZ2GCoCD5DpA== X-Google-Smtp-Source: AGHT+IGGBn/OvvNm/sVE3uNjEAcN1y82VBEBpJj3B0YO9paGcQZtho99/rJOtOeVRLiAFewGavU/ X-Received: by 2002:a05:6214:d08:b0:6a0:4d4f:9428 with SMTP id 8-20020a0562140d0800b006a04d4f9428mr2770328qvh.32.1714459518500; Mon, 29 Apr 2024 23:45:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714459518; cv=pass; d=google.com; s=arc-20160816; b=f4mM+4BA6PKZB1D4BjEt4aANPKqI2dPyRkhEGocFaAfSSmmVvp7+K9v50L2tJJrJW8 gmFMxO1cIaCP3k5SMnG+nRlOer3NMjq6j+B/Jfbf3RahiT1HTYRoPaDDt9EqPjqtOJma u5AUi8W9xoYFtMqN98JJMzMQs7/2TSR5rlySdQiLsZxwFtiFO2onTFSNVLVzakbHwOVD ILMIIb8nRzokPdEEm90VuuTxPJpI+n/OI87TpsPPS8HGgjdVjKVjFBLL9I4tuj014gnW +4AffaSWfjkTEw1pratHQN7ojzS4Q7e1hwoo5OeQEY2/iMuVafPyYmB7suiJjeORrWwm uvzg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=rGarG1bwDdWtewayy8qsdQ2E1oDepEG45ww/UhYGAPk=; fh=MRPyjbFBl1+yR9iRaDjv8ZysOzvZycpU+bGObtKY4hw=; b=sRwjDsIRQCm8p6X/TyYSOtphFSnSTl7gclfHXlvc+l16gYfeloimrK4JZAr7GVI0Ih s1wcPxn53GUvR9RktXwX2c/6BJ8FFHNRMT9INL2eIOCrpiEFsM8qX2BKPxD3Z6JVGjWP PWDsgB6QO7owXvIHBAwuZ4PpL/r7PYr5be79xzZwVWeW4pOMg0pwtLm8/jy13l4q4dZc T9GR8hRkYRfhNrZwyUqm1urksRCQLH4k9Ay+Icixv+txDTin1yEoNxpJOBQazT+42mLK zoTWUssvlbx4KeIiCvQypHcmDqjyWS+BHI2ZxaQjtSfmGmupDufbhHod7vJkbAKZkWK/ rT6w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=amlogic.com dmarc=pass fromdomain=amlogic.com); spf=pass (google.com: domain of linux-kernel+bounces-163428-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163428-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=amlogic.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id pt2-20020a056214048200b006993d828d7fsi28573507qvb.259.2024.04.29.23.45.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 23:45:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163428-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=amlogic.com dmarc=pass fromdomain=amlogic.com); spf=pass (google.com: domain of linux-kernel+bounces-163428-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163428-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=amlogic.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3D6491C21163 for ; Tue, 30 Apr 2024 06:45:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CE3843AC16; Tue, 30 Apr 2024 06:44:55 +0000 (UTC) Received: from mail-sh.amlogic.com (unknown [58.32.228.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A32B41C291; Tue, 30 Apr 2024 06:44:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=58.32.228.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714459495; cv=none; b=nPM8eZo7HwnbZ/ZFuNu0sw8CXDUPgvqujrCMgLBckHTtlsrHBdmmK1VTEELyTC+bOiH+eiYaZXPli5JEUPqJMDjqbK+Zt838HITblacL1qxJXv5mCMaaKjmDBfsLQWAJe3tHQXOYKbNN1SaUTSTAIVe05/mXu/ywbjCo4iCtpY4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714459495; c=relaxed/simple; bh=vnBURd88BzQGdLsCt5oWszBO5nUaBcW/oA6W2AlAjMI=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=u9EJLTmm6/2rSlWojWu5RpNJ2nIEellmLInXMTC+hbBv6NtiH0WSg+u/qgV0uNMdJOlX+yeSc/jChjXsCmdqYsSMnHLMk49yVPFGtfgb0W1Dto70rJJhX60xydsKfhTz1K+PDyF8XVpdafU+9rWzf0cJ4dNsXhPkTxWFTb7Nvvg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amlogic.com; spf=pass smtp.mailfrom=amlogic.com; arc=none smtp.client-ip=58.32.228.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amlogic.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amlogic.com 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.6; Tue, 30 Apr 2024 14:44:48 +0800 From: Xianwei Zhao To: , , , , CC: Neil Armstrong , Jerome Brunet , Michael Turquette , "Stephen Boyd" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kevin Hilman , Xianwei Zhao , Krzysztof Kozlowski , Chuan Liu Subject: [PATCH v8 1/5] dt-bindings: clock: add Amlogic C3 PLL clock controller Date: Tue, 30 Apr 2024 14:44:34 +0800 Message-ID: <20240430064438.2094701-2-xianwei.zhao@amlogic.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240430064438.2094701-1-xianwei.zhao@amlogic.com> References: <20240430064438.2094701-1-xianwei.zhao@amlogic.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Add the PLL clock controller dt-bindings for Amlogic C3 SoC family. Reviewed-by: Krzysztof Kozlowski Co-developed-by: Chuan Liu Signed-off-by: Chuan Liu Signed-off-by: Xianwei Zhao --- .../bindings/clock/amlogic,c3-pll-clkc.yaml | 59 +++++++++++++++++++ .../dt-bindings/clock/amlogic,c3-pll-clkc.h | 40 +++++++++++++ 2 files changed, 99 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..43de3c6fc1cf --- /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 series 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: mclk + + "#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 = <&scmi_clk 2>, + <&scmi_clk 5>; + clock-names = "top", "mclk"; + #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..fcdc558715e8 --- /dev/null +++ b/include/dt-bindings/clock/amlogic,c3-pll-clkc.h @@ -0,0 +1,40 @@ +/* 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_FCLK_50M_EN 0 +#define CLKID_FCLK_50M 1 +#define CLKID_FCLK_DIV2_DIV 2 +#define CLKID_FCLK_DIV2 3 +#define CLKID_FCLK_DIV2P5_DIV 4 +#define CLKID_FCLK_DIV2P5 5 +#define CLKID_FCLK_DIV3_DIV 6 +#define CLKID_FCLK_DIV3 7 +#define CLKID_FCLK_DIV4_DIV 8 +#define CLKID_FCLK_DIV4 9 +#define CLKID_FCLK_DIV5_DIV 10 +#define CLKID_FCLK_DIV5 11 +#define CLKID_FCLK_DIV7_DIV 12 +#define CLKID_FCLK_DIV7 13 +#define CLKID_GP0_PLL_DCO 14 +#define CLKID_GP0_PLL 15 +#define CLKID_HIFI_PLL_DCO 16 +#define CLKID_HIFI_PLL 17 +#define CLKID_MCLK_PLL_DCO 18 +#define CLKID_MCLK_PLL_OD 19 +#define CLKID_MCLK_PLL 20 +#define CLKID_MCLK0_SEL 21 +#define CLKID_MCLK0_SEL_EN 22 +#define CLKID_MCLK0_DIV 23 +#define CLKID_MCLK0 24 +#define CLKID_MCLK1_SEL 25 +#define CLKID_MCLK1_SEL_EN 26 +#define CLKID_MCLK1_DIV 27 +#define CLKID_MCLK1 28 + +#endif /* _DT_BINDINGS_CLOCK_AMLOGIC_C3_PLL_CLKC_H */ -- 2.39.2