Message ID | 20231010062917.3624223-2-xianwei.zhao@amlogic.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp2309924vqo; Mon, 9 Oct 2023 23:31:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHeL+Z6uKQdUGyYvmtwhaS+GGLTqlgvTA3ZiQHSWRceP8DvS7u5voWGLLaZu9cy//rHIK4G X-Received: by 2002:a17:90a:c695:b0:27c:efea:f4f4 with SMTP id n21-20020a17090ac69500b0027cefeaf4f4mr281905pjt.42.1696919463396; Mon, 09 Oct 2023 23:31:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696919463; cv=none; d=google.com; s=arc-20160816; b=TEfM7AuRWaJXf+d/U0T1aYH/lwthQ77O7BtMMa+E9sE9CmhN9DW8NTw6bzlXi0wxeU //HufmpWqxcUVNTe2SfESJ97zrumK1cPKQgcoo7XVLhZeZbhwjd/3Gt0vAY43o/BPL9O 19a3HCZ+yht3QFHbnwq2VfTpLkoHOX1TFkNnSx1t0b2/91CVOAvkXQja5Em8As/L/3vS L5cIHMSKhi8U7vyu4a1LkBvi2AtoWnCNha70jFLs+WiBQz755kAxq87hFF6KD541GkyF TcnVJeM0rjnVa8DHJOs70mxvGrrMlQmE3v8hLJSnRBUWUwKNHRappaadJDwJ0tEkn5+I GUHA== 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=1EDcxszz8yfjQnOmJI+T8P4GjShKY7VsqCAxXuY9ZTo=; fh=oBbb0mPe52rzzTIwtg9Xc2rZ0LejYIA322XCn8vhPVE=; b=UXb+HJ4m3uyaZ13A1jy1re3V+H7V5n7Qf5M2xLszRcyQb+ucduGex2tk+EmQgdVWdP JWU8//NFaQk4HFfF2p49Wppr6ldxELZVIjIh2GdeUUsIk0V7neHQBtyHNwu32z5xW5JI DM0RtUPIcJFZBGpL8mK3y2AdpBgl1w6tla3Eqr//NBVvKRjRYebrIVC82udx07mRUINm txxORxy3nUCryAxiGRztBkwZjfKwVi9L5+y+xSTmSgQCT5AjEIiB5Gnn1oL1Vn2h7wfx NYDeFx+GQlD2er3CcMekXZXL1ZBCEKmt1SZP28X06vtg1FJs4rE1xqVQ4bWcrUrk92IE QI0g== 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 x15-20020a17090a8a8f00b0027b258f284esi10085898pjn.26.2023.10.09.23.31.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 23:31:03 -0700 (PDT) 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 DF9308025406; Mon, 9 Oct 2023 23:30:52 -0700 (PDT) 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 S1442264AbjJJGa2 (ORCPT <rfc822;rua109.linux@gmail.com> + 20 others); Tue, 10 Oct 2023 02:30:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442242AbjJJGaZ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 10 Oct 2023 02:30:25 -0400 Received: from mail-sh.amlogic.com (mail-sh.amlogic.com [58.32.228.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5608E9D; Mon, 9 Oct 2023 23:29:37 -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; Tue, 10 Oct 2023 14:29:34 +0800 From: Xianwei Zhao <xianwei.zhao@amlogic.com> To: <linux-arm-kernel@lists.infradead.org>, <linux-amlogic@lists.infradead.org>, <linux-clk@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org> CC: Neil Armstrong <neil.armstrong@linaro.org>, Jerome Brunet <jbrunet@baylibre.com>, Michael Turquette <mturquette@baylibre.com>, "Stephen Boyd" <sboyd@kernel.org>, Rob Herring <robh+dt@kernel.org>, "Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>, Kevin Hilman <khilman@baylibre.com>, Martin Blumenstingl <martin.blumenstingl@googlemail.com>, Chuan Liu <chuan.liu@amlogic.com>, Xianwei Zhao <xianwei.zhao@amlogic.com> Subject: [PATCH V2 1/4] dt-bindings: clock: add Amlogic C3 PLL clock controller bindings Date: Tue, 10 Oct 2023 14:29:14 +0800 Message-ID: <20231010062917.3624223-2-xianwei.zhao@amlogic.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20231010062917.3624223-1-xianwei.zhao@amlogic.com> References: <20231010062917.3624223-1-xianwei.zhao@amlogic.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.98.11.200] X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no 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: <linux-kernel.vger.kernel.org> 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, 09 Oct 2023 23:30:52 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779349022937016132 X-GMAIL-MSGID: 1779349022937016132 |
Series |
Add C3 SoC PLLs and Peripheral clock
|
|
Commit Message
Xianwei Zhao
Oct. 10, 2023, 6:29 a.m. UTC
Add the C3 PLL clock controller dt-bindings for Amlogic C3 SoC family
Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
---
V1 -> V2: Fix errors when check dtbinding use "make dt_binding_check"
---
.../bindings/clock/amlogic,c3-pll-clkc.yaml | 59 +++++++++++++++++++
.../dt-bindings/clock/amlogic,c3-pll-clkc.h | 42 +++++++++++++
2 files changed, 101 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
base-commit: 57b55c76aaf1ba50ecc6dcee5cd6843dc4d85239
Comments
On Tue, 10 Oct 2023 14:29:14 +0800, Xianwei Zhao wrote: > Add the C3 PLL clock controller dt-bindings for Amlogic C3 SoC family > > Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com> > --- > V1 -> V2: Fix errors when check dtbinding use "make dt_binding_check" > --- > .../bindings/clock/amlogic,c3-pll-clkc.yaml | 59 +++++++++++++++++++ > .../dt-bindings/clock/amlogic,c3-pll-clkc.h | 42 +++++++++++++ > 2 files changed, 101 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 > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: Documentation/devicetree/bindings/clock/amlogic,c3-pll-clkc.example.dts:18:18: fatal error: dt-bindings/clock/amlogic,c3-peripherals-clkc.h: No such file or directory 18 | #include <dt-bindings/clock/amlogic,c3-peripherals-clkc.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [scripts/Makefile.lib:419: Documentation/devicetree/bindings/clock/amlogic,c3-pll-clkc.example.dtb] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1427: dt_binding_check] Error 2 make: *** [Makefile:234: __sub-make] Error 2 doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20231010062917.3624223-2-xianwei.zhao@amlogic.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On Tue, Oct 10, 2023 at 02:29:14PM +0800, Xianwei Zhao wrote: > Add the C3 PLL clock controller dt-bindings for Amlogic C3 SoC family > > Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com> > --- > V1 -> V2: Fix errors when check dtbinding use "make dt_binding_check" Your patches aren't bisectable. It's fine if you want to combine patch 1 and 2 into 1 patch. Or just use the raw numbers here instead of the header. > --- > .../bindings/clock/amlogic,c3-pll-clkc.yaml | 59 +++++++++++++++++++ > .../dt-bindings/clock/amlogic,c3-pll-clkc.h | 42 +++++++++++++ > 2 files changed, 101 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..a646992917b7 > --- /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 s/serials/Serials/ > + > +maintainers: > + - Chuan Liu <chuan.liu@amlogic.com> > + > +properties: > + compatible: > + const: amlogic,c3-pll-clkc > + > + reg: > + maxItems: 1 > + > + clocks: > + minItems: 1 > + items: > + - description: input pll_in > + - description: input mclk_pll_in > + > + clock-names: > + minItems: 1 > + items: > + - const: pll_in > + - const: mclk_pll_in > + > + "#clock-cells": > + const: 1 > + > +required: > + - compatible > + - reg > + - clocks > + - clock-names > + - "#clock-cells" > + > +additionalProperties: false > + > +examples: > + - | > + #include <dt-bindings/clock/amlogic,c3-peripherals-clkc.h> > + apb { > + #address-cells = <2>; > + #size-cells = <2>; > + > + clkc_pll: clock-controller@8000 { Drop unused labels. > + compatible = "amlogic,c3-pll-clkc"; Your indentation is not consistent. > + 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 <chuan.liu@amlogic.com> > + */ > + > +#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 */ > > base-commit: 57b55c76aaf1ba50ecc6dcee5cd6843dc4d85239 > -- > 2.37.1 >
Hi Rob, Thanks for your advise. On 2023/10/10 21:21, Rob Herring wrote: > [ EXTERNAL EMAIL ] > > On Tue, Oct 10, 2023 at 02:29:14PM +0800, Xianwei Zhao wrote: >> Add the C3 PLL clock controller dt-bindings for Amlogic C3 SoC family >> >> Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com> >> --- >> V1 -> V2: Fix errors when check dtbinding use "make dt_binding_check" > > Your patches aren't bisectable. It's fine if you want to combine patch 1 > and 2 into 1 patch. Or just use the raw numbers here instead of the > header. > I will combine patch 1 and 2 into 1 patch in V3. >> --- >> .../bindings/clock/amlogic,c3-pll-clkc.yaml | 59 +++++++++++++++++++ >> .../dt-bindings/clock/amlogic,c3-pll-clkc.h | 42 +++++++++++++ >> 2 files changed, 101 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..a646992917b7 >> --- /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 > > s/serials/Serials/ > Will fix >> + >> +maintainers: >> + - Chuan Liu <chuan.liu@amlogic.com> >> + >> +properties: >> + compatible: >> + const: amlogic,c3-pll-clkc >> + >> + reg: >> + maxItems: 1 >> + >> + clocks: >> + minItems: 1 >> + items: >> + - description: input pll_in >> + - description: input mclk_pll_in >> + >> + clock-names: >> + minItems: 1 >> + items: >> + - const: pll_in >> + - const: mclk_pll_in >> + >> + "#clock-cells": >> + const: 1 >> + >> +required: >> + - compatible >> + - reg >> + - clocks >> + - clock-names >> + - "#clock-cells" >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + #include <dt-bindings/clock/amlogic,c3-peripherals-clkc.h> >> + apb { >> + #address-cells = <2>; >> + #size-cells = <2>; >> + >> + clkc_pll: clock-controller@8000 { > > Drop unused labels. > Will delete clkc_pll. >> + compatible = "amlogic,c3-pll-clkc"; > > Your indentation is not consistent. > Will fix it in V3. >> + 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 <chuan.liu@amlogic.com> >> + */ >> + >> +#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 */ >> >> base-commit: 57b55c76aaf1ba50ecc6dcee5cd6843dc4d85239 >> -- >> 2.37.1 >>
On Wed 11 Oct 2023 at 10:50, Xianwei Zhao <xianwei.zhao@amlogic.com> wrote: > Hi Rob, > Thanks for your advise. > > On 2023/10/10 21:21, Rob Herring wrote: >> [ EXTERNAL EMAIL ] >> On Tue, Oct 10, 2023 at 02:29:14PM +0800, Xianwei Zhao wrote: >>> Add the C3 PLL clock controller dt-bindings for Amlogic C3 SoC family >>> >>> Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com> >>> --- >>> V1 -> V2: Fix errors when check dtbinding use "make dt_binding_check" >> Your patches aren't bisectable. It's fine if you want to combine patch 1 >> and 2 into 1 patch. Or just use the raw numbers here instead of the >> header. >> > I will combine patch 1 and 2 into 1 patch in V3. I'd prefer if you used raw ids or even fake node for the example, like <&pll_in> and <&mpll_in> for readability, rather than combining the patches >>> --- >>> .../bindings/clock/amlogic,c3-pll-clkc.yaml | 59 +++++++++++++++++++ >>> .../dt-bindings/clock/amlogic,c3-pll-clkc.h | 42 +++++++++++++ >>> 2 files changed, 101 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..a646992917b7 >>> --- /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 >> s/serials/Serials/ >> > Will fix >>> + >>> +maintainers: >>> + - Chuan Liu <chuan.liu@amlogic.com> >>> + >>> +properties: >>> + compatible: >>> + const: amlogic,c3-pll-clkc >>> + >>> + reg: >>> + maxItems: 1 >>> + >>> + clocks: >>> + minItems: 1 >>> + items: >>> + - description: input pll_in >>> + - description: input mclk_pll_in >>> + >>> + clock-names: >>> + minItems: 1 >>> + items: >>> + - const: pll_in >>> + - const: mclk_pll_in >>> + >>> + "#clock-cells": >>> + const: 1 >>> + >>> +required: >>> + - compatible >>> + - reg >>> + - clocks >>> + - clock-names >>> + - "#clock-cells" >>> + >>> +additionalProperties: false >>> + >>> +examples: >>> + - | >>> + #include <dt-bindings/clock/amlogic,c3-peripherals-clkc.h> >>> + apb { >>> + #address-cells = <2>; >>> + #size-cells = <2>; >>> + >>> + clkc_pll: clock-controller@8000 { >> Drop unused labels. >> > Will delete clkc_pll. >>> + compatible = "amlogic,c3-pll-clkc"; >> Your indentation is not consistent. >> > Will fix it in V3. >>> + 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 <chuan.liu@amlogic.com> >>> + */ >>> + >>> +#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 */ >>> >>> base-commit: 57b55c76aaf1ba50ecc6dcee5cd6843dc4d85239 >>> -- >>> 2.37.1 >>>
Hi Jerome, Thanks for your reply. On 2023/10/13 15:35, Jerome Brunet wrote: > [ EXTERNAL EMAIL ] > > On Wed 11 Oct 2023 at 10:50, Xianwei Zhao <xianwei.zhao@amlogic.com> wrote: > >> Hi Rob, >> Thanks for your advise. >> >> On 2023/10/10 21:21, Rob Herring wrote: >>> [ EXTERNAL EMAIL ] >>> On Tue, Oct 10, 2023 at 02:29:14PM +0800, Xianwei Zhao wrote: >>>> Add the C3 PLL clock controller dt-bindings for Amlogic C3 SoC family >>>> >>>> Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com> >>>> --- >>>> V1 -> V2: Fix errors when check dtbinding use "make dt_binding_check" >>> Your patches aren't bisectable. It's fine if you want to combine patch 1 >>> and 2 into 1 patch. Or just use the raw numbers here instead of the >>> header. >>> >> I will combine patch 1 and 2 into 1 patch in V3. > > I'd prefer if you used raw ids or even fake node for the example, like > <&pll_in> and <&mpll_in> for readability, rather than combining the patches > Will do. >>>> --- >>>> .../bindings/clock/amlogic,c3-pll-clkc.yaml | 59 +++++++++++++++++++ >>>> .../dt-bindings/clock/amlogic,c3-pll-clkc.h | 42 +++++++++++++ >>>> 2 files changed, 101 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..a646992917b7 >>>> --- /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 >>> s/serials/Serials/ >>> >> Will fix >>>> + >>>> +maintainers: >>>> + - Chuan Liu <chuan.liu@amlogic.com> >>>> + >>>> +properties: >>>> + compatible: >>>> + const: amlogic,c3-pll-clkc >>>> + >>>> + reg: >>>> + maxItems: 1 >>>> + >>>> + clocks: >>>> + minItems: 1 >>>> + items: >>>> + - description: input pll_in >>>> + - description: input mclk_pll_in >>>> + >>>> + clock-names: >>>> + minItems: 1 >>>> + items: >>>> + - const: pll_in >>>> + - const: mclk_pll_in >>>> + >>>> + "#clock-cells": >>>> + const: 1 >>>> + >>>> +required: >>>> + - compatible >>>> + - reg >>>> + - clocks >>>> + - clock-names >>>> + - "#clock-cells" >>>> + >>>> +additionalProperties: false >>>> + >>>> +examples: >>>> + - | >>>> + #include <dt-bindings/clock/amlogic,c3-peripherals-clkc.h> >>>> + apb { >>>> + #address-cells = <2>; >>>> + #size-cells = <2>; >>>> + >>>> + clkc_pll: clock-controller@8000 { >>> Drop unused labels. >>> >> Will delete clkc_pll. >>>> + compatible = "amlogic,c3-pll-clkc"; >>> Your indentation is not consistent. >>> >> Will fix it in V3. >>>> + 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 <chuan.liu@amlogic.com> >>>> + */ >>>> + >>>> +#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 */ >>>> >>>> base-commit: 57b55c76aaf1ba50ecc6dcee5cd6843dc4d85239 >>>> -- >>>> 2.37.1 >>>> >
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..a646992917b7 --- /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: + - Chuan Liu <chuan.liu@amlogic.com> + +properties: + compatible: + const: amlogic,c3-pll-clkc + + reg: + maxItems: 1 + + clocks: + minItems: 1 + items: + - description: input pll_in + - description: input mclk_pll_in + + clock-names: + minItems: 1 + items: + - const: pll_in + - const: mclk_pll_in + + "#clock-cells": + const: 1 + +required: + - compatible + - reg + - clocks + - clock-names + - "#clock-cells" + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/amlogic,c3-peripherals-clkc.h> + apb { + #address-cells = <2>; + #size-cells = <2>; + + 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 <chuan.liu@amlogic.com> + */ + +#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 */