From patchwork Thu Sep 28 06:34:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xianwei Zhao X-Patchwork-Id: 145794 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp3117286vqu; Wed, 27 Sep 2023 23:52:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFDEHAbD0Bdzp65LYI8NhzRrEbbCRdyD4qjov6u8Zw6zDGFuZsyxtDzHZqqM7f6oDvPy9Gm X-Received: by 2002:a05:6a00:21ce:b0:68e:4587:3da8 with SMTP id t14-20020a056a0021ce00b0068e45873da8mr416451pfj.21.1695883925495; Wed, 27 Sep 2023 23:52:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695883925; cv=none; d=google.com; s=arc-20160816; b=wDj04ju0es+4xVClX0+SLWbuCP/MkfNXw9C2Q2sndNdfhHZV48aJiF2fniXnKpJ+nv j2SPh3qT4ixh0vWok+L59gL0mHx9ah9sKag+fznDKKdF2uDY29Qh9QAGlmS0S3nJPdi3 jEMmBDSiDqVyOUC9wH6X9BlmNA04WwyEF5YcRGluV8wijsZz7TMRQkiDfGxGdT9OwZ4G rgMR4WwQ+ODbbyZ1KOibM6MVcLpx1SkCX1N8TxYfwchzg2l7r6x6+iajIgBk2lq3m8ng WxFDphKBti4iuoj5WkGlXw+RWqVGqItUxTuu46ga6itZ8fCJZpFWwxrKQtRFcl8HE5xB GjUw== 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=itwl/QzcQSJIKCNvW5OpUIej9UFPuEq3poKlpwoNwZo=; fh=PoiO6xh+aNhztqmwntGaLvl61JRAi4HnpIAxmKjWJYg=; b=pC4RVFoxJ+XhuFmvLibptY7YAkkb/F6wY3XvRwhjSaZVFyIrR/vCv2xyNUQfSuDTOS sIswqSwS9d8A3sjrbrVfRsKUf7eowKkkIW1tCaMYYQVHHVdK2DBIZPLaOtlKguwO+Y3t q9TGgoZFsI8MUUbuvrf2ci0hw0DBy5KnnuOHR7p7JFvzolMAjzFzYX1bobwdc7Cl3pzn XOUzVEm4DqcRO9smCrE1wxfi5dPSrFzhYiM51QZaFfu65EpmJzDK0HqQECzRm6G3uk4l VjUamNjXP/U9GUyTrcgBKcbe2t2C7tPOtkly1z70o/ko1W6tgazlKXVx3tx5TX0KZhGS k+UQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id e21-20020a656895000000b0056da0ae25a0si17228998pgt.441.2023.09.27.23.52.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 23:52:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id B734A80D1DE2; Wed, 27 Sep 2023 23:35:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230466AbjI1Gf1 (ORCPT + 20 others); Thu, 28 Sep 2023 02:35:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230469AbjI1GfW (ORCPT ); Thu, 28 Sep 2023 02:35:22 -0400 Received: from mail-sh.amlogic.com (mail-sh.amlogic.com [58.32.228.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30D3419C; Wed, 27 Sep 2023 23:35:17 -0700 (PDT) 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; Thu, 28 Sep 2023 14:34:57 +0800 From: Xianwei Zhao To: , , , , CC: Neil Armstrong , Jerome Brunet , Michael Turquette , "Stephen Boyd" , Rob Herring , "Krzysztof Kozlowski" , Kevin Hilman , Martin Blumenstingl , Xianwei Zhao Subject: [PATCH 1/4] dt-bindings: clock: add Amlogic C3 PLL clock controller bindings Date: Thu, 28 Sep 2023 14:34:45 +0800 Message-ID: <20230928063448.3544464-2-xianwei.zhao@amlogic.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230928063448.3544464-1-xianwei.zhao@amlogic.com> References: <20230928063448.3544464-1-xianwei.zhao@amlogic.com> MIME-Version: 1.0 X-Originating-IP: [10.98.11.200] X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 27 Sep 2023 23:35:37 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778263182744899254 X-GMAIL-MSGID: 1778263182744899254 Add the C3 PLL clock controller dt-bindings for Amlogic C3 SoC family Signed-off-by: Xianwei Zhao --- .../bindings/clock/amlogic,c3-pll-clkc.yaml | 53 +++++++++++++++++++ .../dt-bindings/clock/amlogic,c3-pll-clkc.h | 42 +++++++++++++++ 2 files changed, 95 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..18c0eb5ac3e4 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/amlogic,c3-pll-clkc.yaml @@ -0,0 +1,53 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +Documentation/devicetree/bindings/clock/amlogic,s4-pll-clkc.yaml +%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: + - Chuan Liu + +properties: + compatible: + const: amlogic,c3-pll-clkc + + reg: + maxItems: 1 + + clocks: + minItems: 2 + items: + - description: input pll_in + - description: input mclk_pll_in + + clock-names: + minItems: 2 + items: + - const: pll_in + - const: mclk_pll_in + + "#clock-cells": + const: 1 + +required: + - compatible + - reg + - clocks + - clock-names + - "#clock-cells" + +additionalProperties: false + +examples: + - | + clkc_pll: clock-controller@8000 { + compatible = "amlogic,c3-pll-clkc"; + reg = <0x0 0x8000 0x0 0x1a4>; + clocks = <&clkc_periphs CLKID_PLL_IN>, + <&clkc_periphs CLKID_MCLK_PLL_IN>; + clock-names = "pll_in", "mclk_pll_in"; + #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..aa731e8fae29 --- /dev/null +++ b/include/dt-bindings/clock/amlogic,c3-pll-clkc.h @@ -0,0 +1,42 @@ +/* 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_DIV40_DIV 2 +#define CLKID_FCLK_DIV40 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_HIFI_PLL_DCO 18 +#define CLKID_HIFI_PLL 19 +#define CLKID_MCLK_PLL_DCO 20 +#define CLKID_MCLK_PLL 21 +#define CLKID_MCLK_PLL_CLK 22 +#define CLKID_MCLK0_SEL 23 +#define CLKID_MCLK0_SEL_OUT 24 +#define CLKID_MCLK0_DIV 25 +#define CLKID_MCLK0 26 +#define CLKID_MCLK1_SEL 27 +#define CLKID_MCLK1_SEL_OUT 28 +#define CLKID_MCLK1_DIV 29 +#define CLKID_MCLK1 30 + +#endif /* _DT_BINDINGS_CLOCK_AMLOGIC_C3_PLL_CLKC_H */