[v2,09/14] dt-bindings: clock: Add StarFive JH7110 system clock and reset generator
Message ID | 20221118010627.70576-10-hal.feng@starfivetech.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp723145wrr; Thu, 17 Nov 2022 17:36:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf5V8NRO9qIJesd5SG83uPjnbB/EY4Q7W30XncPSNn+Txm03k5HDClmhkEM/plfWwN1TFpzX X-Received: by 2002:aa7:c046:0:b0:461:54f0:f7dc with SMTP id k6-20020aa7c046000000b0046154f0f7dcmr4339021edo.117.1668735390334; Thu, 17 Nov 2022 17:36:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668735390; cv=none; d=google.com; s=arc-20160816; b=UnUlkVaxfyDN8ofk9Pdv7OY4qLgkBL3KzrRlTaDrUkdDb3UunUPV4h74SEQszdz719 ISqqmB/9G0OszUhpNJaxt7aN6vXMZlgzutQC8q/62a93Vwhxs8l7dh9d+8adSWaRJrfb 2B1Geu3Osk5+SCy3ASah2E7e0Rd9W44zj8cwyQxF+U90kdLOqkCDblRGg5+8xL9BI21C o2ThjIMYHSlyF/eppTb+EpceFQPbaYmuDLAe6NsSvzzjc5ueTUoSQ2RH2Weqflc3+Abv O4oV971lK1akZXlHlmrehr99QRvnQmaDkCEkPoTGXQGq18rjV9ffSlshuB6cC5zxtmYE Tj+g== 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=AFiMlUrOJDhK5ZtmAJzSk2oDqLbSNeU3IvAuZeUJkHg=; b=uqcwEwSzvrjvamLiI2sK9boTdINPFenOTgoxOpiVko44kZ9sAUlNmWX7cSCwNE6tEh C/YYad/Nbo44FnmaJ6cOvwzjY/2ZtMKL1sf85nrxOKrD25GTCAjLfubZ0vcT3Df+jG3E Ep2NPBL20BumpkqAFn5q9hvvv4nW3Afbx9SMMcgl/fkSyzkpaZYXcZ5wf/G8ZJ0D+Upt sfDXqC7qhdMRIaRm285P1dXXlq+ReFsIOc8oMJg2p/CXAZ6RSDUk3QWmJyIvdjmjB6UT 0GYBDconykFWyb0DGKJjNyiKY6OzQWGmPiQ1zvjivqvLqr7mUwVAcbPuKHekxh2wuwwI gFXA== 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 io3-20020a17090780c300b007ae0ea7fbb8si1703392ejc.825.2022.11.17.17.36.06; Thu, 17 Nov 2022 17:36:30 -0800 (PST) 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 S240455AbiKRBei convert rfc822-to-8bit (ORCPT <rfc822;a1648639935@gmail.com> + 99 others); Thu, 17 Nov 2022 20:34:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240889AbiKRBeY (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 17 Nov 2022 20:34:24 -0500 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B89526305; Thu, 17 Nov 2022 17:34:22 -0800 (PST) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 0669124E1DF; Fri, 18 Nov 2022 09:06:36 +0800 (CST) Received: from EXMBX072.cuchost.com (172.16.6.82) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 18 Nov 2022 09:06:36 +0800 Received: from ubuntu.localdomain (183.27.96.116) by EXMBX072.cuchost.com (172.16.6.82) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 18 Nov 2022 09:06:35 +0800 From: Hal Feng <hal.feng@starfivetech.com> To: <linux-riscv@lists.infradead.org>, <devicetree@vger.kernel.org>, <linux-clk@vger.kernel.org> CC: Conor Dooley <conor@kernel.org>, Palmer Dabbelt <palmer@dabbelt.com>, "Rob Herring" <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Stephen Boyd <sboyd@kernel.org>, "Michael Turquette" <mturquette@baylibre.com>, Philipp Zabel <p.zabel@pengutronix.de>, Emil Renner Berthing <emil.renner.berthing@canonical.com>, Hal Feng <hal.feng@starfivetech.com>, <linux-kernel@vger.kernel.org> Subject: [PATCH v2 09/14] dt-bindings: clock: Add StarFive JH7110 system clock and reset generator Date: Fri, 18 Nov 2022 09:06:22 +0800 Message-ID: <20221118010627.70576-10-hal.feng@starfivetech.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221118010627.70576-1-hal.feng@starfivetech.com> References: <20221118010627.70576-1-hal.feng@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [183.27.96.116] X-ClientProxiedBy: EXCAS064.cuchost.com (172.16.6.24) To EXMBX072.cuchost.com (172.16.6.82) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749795880989868801?= X-GMAIL-MSGID: =?utf-8?q?1749795880989868801?= |
Series |
Basic clock and reset support for StarFive JH7110 RISC-V SoC
|
|
Commit Message
Hal Feng
Nov. 18, 2022, 1:06 a.m. UTC
From: Emil Renner Berthing <kernel@esmil.dk> Add bindings for the system clock and reset generator (SYSCRG) on the JH7110 RISC-V SoC by StarFive Ltd. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Signed-off-by: Hal Feng <hal.feng@starfivetech.com> --- .../clock/starfive,jh7110-syscrg.yaml | 80 +++++++++++++++++++ MAINTAINERS | 2 +- 2 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml
Comments
On Fri, 18 Nov 2022 at 02:06, Hal Feng <hal.feng@starfivetech.com> wrote: > > From: Emil Renner Berthing <kernel@esmil.dk> > > Add bindings for the system clock and reset generator (SYSCRG) on the > JH7110 RISC-V SoC by StarFive Ltd. > > Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> > Signed-off-by: Hal Feng <hal.feng@starfivetech.com> > --- > .../clock/starfive,jh7110-syscrg.yaml | 80 +++++++++++++++++++ > MAINTAINERS | 2 +- > 2 files changed, 81 insertions(+), 1 deletion(-) > create mode 100644 Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml > > diff --git a/Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml b/Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml > new file mode 100644 > index 000000000000..a8cafbc0afe2 > --- /dev/null > +++ b/Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml > @@ -0,0 +1,80 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/clock/starfive,jh7110-syscrg.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: StarFive JH7110 System Clock and Reset Generator > + > +maintainers: > + - Emil Renner Berthing <kernel@esmil.dk> > + > +properties: > + compatible: > + const: starfive,jh7110-syscrg > + > + reg: > + maxItems: 1 > + > + clocks: > + items: > + - description: Main Oscillator (24 MHz) > + - description: RMII reference clock > + - description: RGMII RX clock > + - description: I2S TX bit clock > + - description: I2S TX left/right clock > + - description: I2S RX bit clock > + - description: I2S RX left/right clock > + - description: TDM > + - description: mclk Maybe you could ask your colleagues for a better description of these clocks. > + > + clock-names: > + items: > + - const: osc > + - const: gmac1_rmii_refin > + - const: gmac1_rgmii_rxin > + - const: i2stx_bclk_ext > + - const: i2stx_lrck_ext > + - const: i2srx_bclk_ext > + - const: i2srx_lrck_ext > + - const: tdm_ext > + - const: mclk_ext > + > + '#clock-cells': > + const: 1 > + description: > + See <dt-bindings/clock/starfive-jh7110.h> for valid indices. > + > + '#reset-cells': > + const: 1 > + description: > + See <dt-bindings/reset/starfive-jh7110.h> for valid indices. > + > +required: > + - compatible > + - reg > + - clocks > + - clock-names > + - '#clock-cells' > + - '#reset-cells' > + > +additionalProperties: false > + > +examples: > + - | > + clock-controller@13020000 { > + compatible = "starfive,jh7110-syscrg"; > + reg = <0x13020000 0x10000>; > + clocks = <&osc>, <&gmac1_rmii_refin>, > + <&gmac1_rgmii_rxin>, > + <&i2stx_bclk_ext>, <&i2stx_lrck_ext>, > + <&i2srx_bclk_ext>, <&i2srx_lrck_ext>, > + <&tdm_ext>, <&mclk_ext>; > + clock-names = "osc", "gmac1_rmii_refin", > + "gmac1_rgmii_rxin", > + "i2stx_bclk_ext", "i2stx_lrck_ext", > + "i2srx_bclk_ext", "i2srx_lrck_ext", > + "tdm_ext", "mclk_ext"; > + #clock-cells = <1>; > + #reset-cells = <1>; > + }; > diff --git a/MAINTAINERS b/MAINTAINERS > index eeab26f5597c..ec6647e2772f 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -19602,7 +19602,7 @@ STARFIVE CLOCK DRIVERS > M: Emil Renner Berthing <kernel@esmil.dk> > M: Hal Feng <hal.feng@starfivetech.com> > S: Maintained > -F: Documentation/devicetree/bindings/clock/starfive,jh7100-*.yaml > +F: Documentation/devicetree/bindings/clock/starfive* > F: drivers/clk/starfive/ > F: include/dt-bindings/clock/starfive* > > -- > 2.38.1 >
On 18/11/2022 02:06, Hal Feng wrote: > From: Emil Renner Berthing <kernel@esmil.dk> > > Add bindings for the system clock and reset generator (SYSCRG) on the > JH7110 RISC-V SoC by StarFive Ltd. > > Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> > Signed-off-by: Hal Feng <hal.feng@starfivetech.com> Binding headers are coming with the file bringing bindings for the device, so you need to squash patches. > --- > .../clock/starfive,jh7110-syscrg.yaml | 80 +++++++++++++++++++ > MAINTAINERS | 2 +- > 2 files changed, 81 insertions(+), 1 deletion(-) > create mode 100644 Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml > > diff --git a/Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml b/Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml > new file mode 100644 > index 000000000000..a8cafbc0afe2 > --- /dev/null > +++ b/Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml > @@ -0,0 +1,80 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/clock/starfive,jh7110-syscrg.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: StarFive JH7110 System Clock and Reset Generator > + > +maintainers: > + - Emil Renner Berthing <kernel@esmil.dk> > + > +properties: > + compatible: > + const: starfive,jh7110-syscrg > + > + reg: > + maxItems: 1 > + > + clocks: > + items: > + - description: Main Oscillator (24 MHz) > + - description: RMII reference clock > + - description: RGMII RX clock > + - description: I2S TX bit clock > + - description: I2S TX left/right clock > + - description: I2S RX bit clock > + - description: I2S RX left/right clock > + - description: TDM > + - description: mclk > + > + clock-names: > + items: > + - const: osc > + - const: gmac1_rmii_refin > + - const: gmac1_rgmii_rxin > + - const: i2stx_bclk_ext > + - const: i2stx_lrck_ext > + - const: i2srx_bclk_ext > + - const: i2srx_lrck_ext > + - const: tdm_ext > + - const: mclk_ext > + > + '#clock-cells': > + const: 1 > + description: > + See <dt-bindings/clock/starfive-jh7110.h> for valid indices. Fix filename. > + > + '#reset-cells': > + const: 1 > + description: > + See <dt-bindings/reset/starfive-jh7110.h> for valid indices. Fix filename. > + > +required: > + - compatible > + - reg > + - clocks > + - clock-names > + - '#clock-cells' > + - '#reset-cells' > + Best regards, Krzysztof
On 18/11/2022 17:50, Emil Renner Berthing wrote: > On Fri, 18 Nov 2022 at 02:06, Hal Feng <hal.feng@starfivetech.com> wrote: >> >> From: Emil Renner Berthing <kernel@esmil.dk> >> >> Add bindings for the system clock and reset generator (SYSCRG) on the >> JH7110 RISC-V SoC by StarFive Ltd. >> >> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> >> Signed-off-by: Hal Feng <hal.feng@starfivetech.com> >> --- >> .../clock/starfive,jh7110-syscrg.yaml | 80 +++++++++++++++++++ >> MAINTAINERS | 2 +- >> 2 files changed, 81 insertions(+), 1 deletion(-) >> create mode 100644 Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml >> >> diff --git a/Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml b/Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml >> new file mode 100644 >> index 000000000000..a8cafbc0afe2 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml >> @@ -0,0 +1,80 @@ >> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/clock/starfive,jh7110-syscrg.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: StarFive JH7110 System Clock and Reset Generator >> + >> +maintainers: >> + - Emil Renner Berthing <kernel@esmil.dk> >> + >> +properties: >> + compatible: >> + const: starfive,jh7110-syscrg >> + >> + reg: >> + maxItems: 1 >> + >> + clocks: >> + items: >> + - description: Main Oscillator (24 MHz) >> + - description: RMII reference clock >> + - description: RGMII RX clock >> + - description: I2S TX bit clock >> + - description: I2S TX left/right clock >> + - description: I2S RX bit clock >> + - description: I2S RX left/right clock >> + - description: TDM >> + - description: mclk > > Maybe you could ask your colleagues for a better description of these clocks. And drop "clock" from previous descriptions. All these are clocks, so no need to repeat it. Best regards, Krzysztof
On Sat, 19 Nov 2022 00:50:41 +0800, Emil Renner Berthing wrote: > On Fri, 18 Nov 2022 at 02:06, Hal Feng <hal.feng@starfivetech.com> wrote: > > diff --git a/Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml b/Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml > > new file mode 100644 > > index 000000000000..a8cafbc0afe2 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml > > @@ -0,0 +1,80 @@ > > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/clock/starfive,jh7110-syscrg.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: StarFive JH7110 System Clock and Reset Generator > > + > > +maintainers: > > + - Emil Renner Berthing <kernel@esmil.dk> > > + > > +properties: > > + compatible: > > + const: starfive,jh7110-syscrg > > + > > + reg: > > + maxItems: 1 > > + > > + clocks: > > + items: > > + - description: Main Oscillator (24 MHz) > > + - description: RMII reference clock > > + - description: RGMII RX clock > > + - description: I2S TX bit clock > > + - description: I2S TX left/right clock > > + - description: I2S RX bit clock > > + - description: I2S RX left/right clock > > + - description: TDM > > + - description: mclk > > Maybe you could ask your colleagues for a better description of these clocks. OK, I will improve the description. Best regards, Hal
On Mon, 21 Nov 2022 09:47:08 +0100, Krzysztof Kozlowski wrote: > On 18/11/2022 02:06, Hal Feng wrote: > > From: Emil Renner Berthing <kernel@esmil.dk> > > > > Add bindings for the system clock and reset generator (SYSCRG) on the > > JH7110 RISC-V SoC by StarFive Ltd. > > > > Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> > > Signed-off-by: Hal Feng <hal.feng@starfivetech.com> > > Binding headers are coming with the file bringing bindings for the > device, so you need to squash patches. As we discussed in patch 7, could I merge patch 7, 8, 9, 10 and add the following files in one commit? include/dt-bindings/clock/starfive,jh7110-crg.h include/dt-bindings/reset/starfive,jh7110-crg.h Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml Documentation/devicetree/bindings/clock/starfive,jh7110-aoncrg.yaml Best regards, Hal > > > --- > > .../clock/starfive,jh7110-syscrg.yaml | 80 +++++++++++++++++++ > > MAINTAINERS | 2 +- > > 2 files changed, 81 insertions(+), 1 deletion(-) > > create mode 100644 Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml
On Fri, 25 Nov 2022 14:41:12 +0800, Hal Feng wrote: > On Mon, 21 Nov 2022 09:47:08 +0100, Krzysztof Kozlowski wrote: > > On 18/11/2022 02:06, Hal Feng wrote: > > > From: Emil Renner Berthing <kernel@esmil.dk> > > > > > > Add bindings for the system clock and reset generator (SYSCRG) on the > > > JH7110 RISC-V SoC by StarFive Ltd. > > > > > > Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> > > > Signed-off-by: Hal Feng <hal.feng@starfivetech.com> > > > > Binding headers are coming with the file bringing bindings for the > > device, so you need to squash patches. > > As we discussed in patch 7, could I merge patch 7, 8, 9, 10 and add the > following files in one commit? > > include/dt-bindings/clock/starfive,jh7110-crg.h > include/dt-bindings/reset/starfive,jh7110-crg.h > Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml > Documentation/devicetree/bindings/clock/starfive,jh7110-aoncrg.yaml Hi, Krzysztof, Could you please give me some suggestions? Best regards, Hal > > > > > > --- > > > .../clock/starfive,jh7110-syscrg.yaml | 80 +++++++++++++++++++ > > > MAINTAINERS | 2 +- > > > 2 files changed, 81 insertions(+), 1 deletion(-) > > > create mode 100644 Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml >
On 30/11/2022 10:47, Hal Feng wrote: > On Fri, 25 Nov 2022 14:41:12 +0800, Hal Feng wrote: >> On Mon, 21 Nov 2022 09:47:08 +0100, Krzysztof Kozlowski wrote: >>> On 18/11/2022 02:06, Hal Feng wrote: >>>> From: Emil Renner Berthing <kernel@esmil.dk> >>>> >>>> Add bindings for the system clock and reset generator (SYSCRG) on the >>>> JH7110 RISC-V SoC by StarFive Ltd. >>>> >>>> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> >>>> Signed-off-by: Hal Feng <hal.feng@starfivetech.com> >>> >>> Binding headers are coming with the file bringing bindings for the >>> device, so you need to squash patches. >> >> As we discussed in patch 7, could I merge patch 7, 8, 9, 10 and add the >> following files in one commit? >> >> include/dt-bindings/clock/starfive,jh7110-crg.h >> include/dt-bindings/reset/starfive,jh7110-crg.h >> Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml >> Documentation/devicetree/bindings/clock/starfive,jh7110-aoncrg.yaml > > Hi, Krzysztof, > > Could you please give me some suggestions? You can keep aon and sys split. First add one of them with their own headers. Then add second with their own defines. Best regards, Krzysztof
On Wed, 30 Nov 2022 12:48:30 +0100, Krzysztof Kozlowski wrote: > On 30/11/2022 10:47, Hal Feng wrote: >> On Fri, 25 Nov 2022 14:41:12 +0800, Hal Feng wrote: >>> On Mon, 21 Nov 2022 09:47:08 +0100, Krzysztof Kozlowski wrote: >>>> On 18/11/2022 02:06, Hal Feng wrote: >>>>> From: Emil Renner Berthing <kernel@esmil.dk> >>>>> >>>>> Add bindings for the system clock and reset generator (SYSCRG) on the >>>>> JH7110 RISC-V SoC by StarFive Ltd. >>>>> >>>>> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> >>>>> Signed-off-by: Hal Feng <hal.feng@starfivetech.com> >>>> >>>> Binding headers are coming with the file bringing bindings for the >>>> device, so you need to squash patches. >>> >>> As we discussed in patch 7, could I merge patch 7, 8, 9, 10 and add the >>> following files in one commit? >>> >>> include/dt-bindings/clock/starfive,jh7110-crg.h >>> include/dt-bindings/reset/starfive,jh7110-crg.h >>> Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml >>> Documentation/devicetree/bindings/clock/starfive,jh7110-aoncrg.yaml >> >> Hi, Krzysztof, >> >> Could you please give me some suggestions? > > You can keep aon and sys split. First add one of them with their own > headers. Then add second with their own defines. You mean split patch 7 and patch 8 into sys part and aon part respectively? There are totally five regions (sys/aon/stg/isp/vout) for clocks and resets in JH7110. If we do that, there will be 5 headers for JH7110 in either clock or reset directory finally. Is that OK if there are too many headers for just one SoC? Best regards, Hal
On 30/11/2022 16:12, Hal Feng wrote: > On Wed, 30 Nov 2022 12:48:30 +0100, Krzysztof Kozlowski wrote: >> On 30/11/2022 10:47, Hal Feng wrote: >>> On Fri, 25 Nov 2022 14:41:12 +0800, Hal Feng wrote: >>>> On Mon, 21 Nov 2022 09:47:08 +0100, Krzysztof Kozlowski wrote: >>>>> On 18/11/2022 02:06, Hal Feng wrote: >>>>>> From: Emil Renner Berthing <kernel@esmil.dk> >>>>>> >>>>>> Add bindings for the system clock and reset generator (SYSCRG) on the >>>>>> JH7110 RISC-V SoC by StarFive Ltd. >>>>>> >>>>>> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> >>>>>> Signed-off-by: Hal Feng <hal.feng@starfivetech.com> >>>>> >>>>> Binding headers are coming with the file bringing bindings for the >>>>> device, so you need to squash patches. >>>> >>>> As we discussed in patch 7, could I merge patch 7, 8, 9, 10 and add the >>>> following files in one commit? >>>> >>>> include/dt-bindings/clock/starfive,jh7110-crg.h >>>> include/dt-bindings/reset/starfive,jh7110-crg.h >>>> Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml >>>> Documentation/devicetree/bindings/clock/starfive,jh7110-aoncrg.yaml >>> >>> Hi, Krzysztof, >>> >>> Could you please give me some suggestions? >> >> You can keep aon and sys split. First add one of them with their own >> headers. Then add second with their own defines. > > You mean split patch 7 and patch 8 into sys part and aon part > respectively? There are totally five regions (sys/aon/stg/isp/vout) > for clocks and resets in JH7110. If we do that, there will be 5 > headers for JH7110 in either clock or reset directory finally. Is > that OK if there are too many headers for just one SoC? Sorry, I lost the track of what patches you have. The comment was - bindings include both the doc and headers. You want to split some, some merge, sorry, no clue. I did not propose splitting headers... Best regards, Krzysztof
On Wed, 30 Nov 2022 16:19:06 +0100, Krzysztof Kozlowski wrote: > On 30/11/2022 16:12, Hal Feng wrote: >> On Wed, 30 Nov 2022 12:48:30 +0100, Krzysztof Kozlowski wrote: >>> On 30/11/2022 10:47, Hal Feng wrote: >>>> On Fri, 25 Nov 2022 14:41:12 +0800, Hal Feng wrote: >>>>> On Mon, 21 Nov 2022 09:47:08 +0100, Krzysztof Kozlowski wrote: >>>>>> On 18/11/2022 02:06, Hal Feng wrote: >>>>>>> From: Emil Renner Berthing <kernel@esmil.dk> >>>>>>> >>>>>>> Add bindings for the system clock and reset generator (SYSCRG) on the >>>>>>> JH7110 RISC-V SoC by StarFive Ltd. >>>>>>> >>>>>>> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> >>>>>>> Signed-off-by: Hal Feng <hal.feng@starfivetech.com> >>>>>> >>>>>> Binding headers are coming with the file bringing bindings for the >>>>>> device, so you need to squash patches. >>>>> >>>>> As we discussed in patch 7, could I merge patch 7, 8, 9, 10 and add the >>>>> following files in one commit? >>>>> >>>>> include/dt-bindings/clock/starfive,jh7110-crg.h >>>>> include/dt-bindings/reset/starfive,jh7110-crg.h >>>>> Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml >>>>> Documentation/devicetree/bindings/clock/starfive,jh7110-aoncrg.yaml >>>> >>>> Hi, Krzysztof, >>>> >>>> Could you please give me some suggestions? >>> >>> You can keep aon and sys split. First add one of them with their own >>> headers. Then add second with their own defines. >> >> You mean split patch 7 and patch 8 into sys part and aon part >> respectively? There are totally five regions (sys/aon/stg/isp/vout) >> for clocks and resets in JH7110. If we do that, there will be 5 >> headers for JH7110 in either clock or reset directory finally. Is >> that OK if there are too many headers for just one SoC? > > > Sorry, I lost the track of what patches you have. The comment was - > bindings include both the doc and headers. You want to split some, some > merge, sorry, no clue. I did not propose splitting headers... It's ok. The problem was that the header include/dt-bindings/clock/starfive,jh7110-crg.h was used in both Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml and Documentation/devicetree/bindings/clock/starfive,jh7110-aoncrg.yaml. The same for include/dt-bindings/reset/starfive,jh7110-crg.h. So should I add these four files in one patch? Best regards, Hal
On 30/11/2022 19:05, Hal Feng wrote: > On Wed, 30 Nov 2022 16:19:06 +0100, Krzysztof Kozlowski wrote: >> On 30/11/2022 16:12, Hal Feng wrote: >>> On Wed, 30 Nov 2022 12:48:30 +0100, Krzysztof Kozlowski wrote: >>>> On 30/11/2022 10:47, Hal Feng wrote: >>>>> On Fri, 25 Nov 2022 14:41:12 +0800, Hal Feng wrote: >>>>>> On Mon, 21 Nov 2022 09:47:08 +0100, Krzysztof Kozlowski wrote: >>>>>>> On 18/11/2022 02:06, Hal Feng wrote: >>>>>>>> From: Emil Renner Berthing <kernel@esmil.dk> >>>>>>>> >>>>>>>> Add bindings for the system clock and reset generator (SYSCRG) on the >>>>>>>> JH7110 RISC-V SoC by StarFive Ltd. >>>>>>>> >>>>>>>> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> >>>>>>>> Signed-off-by: Hal Feng <hal.feng@starfivetech.com> >>>>>>> >>>>>>> Binding headers are coming with the file bringing bindings for the >>>>>>> device, so you need to squash patches. >>>>>> >>>>>> As we discussed in patch 7, could I merge patch 7, 8, 9, 10 and add the >>>>>> following files in one commit? >>>>>> >>>>>> include/dt-bindings/clock/starfive,jh7110-crg.h >>>>>> include/dt-bindings/reset/starfive,jh7110-crg.h >>>>>> Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml >>>>>> Documentation/devicetree/bindings/clock/starfive,jh7110-aoncrg.yaml >>>>> >>>>> Hi, Krzysztof, >>>>> >>>>> Could you please give me some suggestions? >>>> >>>> You can keep aon and sys split. First add one of them with their own >>>> headers. Then add second with their own defines. >>> >>> You mean split patch 7 and patch 8 into sys part and aon part >>> respectively? There are totally five regions (sys/aon/stg/isp/vout) >>> for clocks and resets in JH7110. If we do that, there will be 5 >>> headers for JH7110 in either clock or reset directory finally. Is >>> that OK if there are too many headers for just one SoC? >> >> >> Sorry, I lost the track of what patches you have. The comment was - >> bindings include both the doc and headers. You want to split some, some >> merge, sorry, no clue. I did not propose splitting headers... > > It's ok. The problem was that the header > > include/dt-bindings/clock/starfive,jh7110-crg.h > > was used in both > > Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml > > and > > Documentation/devicetree/bindings/clock/starfive,jh7110-aoncrg.yaml. > > The same for include/dt-bindings/reset/starfive,jh7110-crg.h. > So should I add these four files in one patch? No. I think I wrote proposed flow of patches: 1. syscrg bindings with header 2. aoncrg bindings with changes to header Why do you need to merge anything? Best regards, Krzysztof
On Thu, 1 Dec 2022 11:21:04 +0100, Krzysztof Kozlowski wrote: > On 30/11/2022 19:05, Hal Feng wrote: >> On Wed, 30 Nov 2022 16:19:06 +0100, Krzysztof Kozlowski wrote: >>> On 30/11/2022 16:12, Hal Feng wrote: >>>> On Wed, 30 Nov 2022 12:48:30 +0100, Krzysztof Kozlowski wrote: >>>>> On 30/11/2022 10:47, Hal Feng wrote: >>>>>> On Fri, 25 Nov 2022 14:41:12 +0800, Hal Feng wrote: >>>>>>> On Mon, 21 Nov 2022 09:47:08 +0100, Krzysztof Kozlowski wrote: >>>>>>>> On 18/11/2022 02:06, Hal Feng wrote: >>>>>>>>> From: Emil Renner Berthing <kernel@esmil.dk> >>>>>>>>> >>>>>>>>> Add bindings for the system clock and reset generator (SYSCRG) on the >>>>>>>>> JH7110 RISC-V SoC by StarFive Ltd. >>>>>>>>> >>>>>>>>> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> >>>>>>>>> Signed-off-by: Hal Feng <hal.feng@starfivetech.com> >>>>>>>> >>>>>>>> Binding headers are coming with the file bringing bindings for the >>>>>>>> device, so you need to squash patches. >>>>>>> >>>>>>> As we discussed in patch 7, could I merge patch 7, 8, 9, 10 and add the >>>>>>> following files in one commit? >>>>>>> >>>>>>> include/dt-bindings/clock/starfive,jh7110-crg.h >>>>>>> include/dt-bindings/reset/starfive,jh7110-crg.h >>>>>>> Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml >>>>>>> Documentation/devicetree/bindings/clock/starfive,jh7110-aoncrg.yaml >>>>>> >>>>>> Hi, Krzysztof, >>>>>> >>>>>> Could you please give me some suggestions? >>>>> >>>>> You can keep aon and sys split. First add one of them with their own >>>>> headers. Then add second with their own defines. >>>> >>>> You mean split patch 7 and patch 8 into sys part and aon part >>>> respectively? There are totally five regions (sys/aon/stg/isp/vout) >>>> for clocks and resets in JH7110. If we do that, there will be 5 >>>> headers for JH7110 in either clock or reset directory finally. Is >>>> that OK if there are too many headers for just one SoC? >>> >>> >>> Sorry, I lost the track of what patches you have. The comment was - >>> bindings include both the doc and headers. You want to split some, some >>> merge, sorry, no clue. I did not propose splitting headers... >> >> It's ok. The problem was that the header >> >> include/dt-bindings/clock/starfive,jh7110-crg.h >> >> was used in both >> >> Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml >> >> and >> >> Documentation/devicetree/bindings/clock/starfive,jh7110-aoncrg.yaml. >> >> The same for include/dt-bindings/reset/starfive,jh7110-crg.h. >> So should I add these four files in one patch? > > No. I think I wrote proposed flow of patches: > 1. syscrg bindings with header > 2. aoncrg bindings with changes to header Great. Got it. Thanks a lot! Best regards, Hal > > Why do you need to merge anything?
diff --git a/Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml b/Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml new file mode 100644 index 000000000000..a8cafbc0afe2 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml @@ -0,0 +1,80 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/starfive,jh7110-syscrg.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: StarFive JH7110 System Clock and Reset Generator + +maintainers: + - Emil Renner Berthing <kernel@esmil.dk> + +properties: + compatible: + const: starfive,jh7110-syscrg + + reg: + maxItems: 1 + + clocks: + items: + - description: Main Oscillator (24 MHz) + - description: RMII reference clock + - description: RGMII RX clock + - description: I2S TX bit clock + - description: I2S TX left/right clock + - description: I2S RX bit clock + - description: I2S RX left/right clock + - description: TDM + - description: mclk + + clock-names: + items: + - const: osc + - const: gmac1_rmii_refin + - const: gmac1_rgmii_rxin + - const: i2stx_bclk_ext + - const: i2stx_lrck_ext + - const: i2srx_bclk_ext + - const: i2srx_lrck_ext + - const: tdm_ext + - const: mclk_ext + + '#clock-cells': + const: 1 + description: + See <dt-bindings/clock/starfive-jh7110.h> for valid indices. + + '#reset-cells': + const: 1 + description: + See <dt-bindings/reset/starfive-jh7110.h> for valid indices. + +required: + - compatible + - reg + - clocks + - clock-names + - '#clock-cells' + - '#reset-cells' + +additionalProperties: false + +examples: + - | + clock-controller@13020000 { + compatible = "starfive,jh7110-syscrg"; + reg = <0x13020000 0x10000>; + clocks = <&osc>, <&gmac1_rmii_refin>, + <&gmac1_rgmii_rxin>, + <&i2stx_bclk_ext>, <&i2stx_lrck_ext>, + <&i2srx_bclk_ext>, <&i2srx_lrck_ext>, + <&tdm_ext>, <&mclk_ext>; + clock-names = "osc", "gmac1_rmii_refin", + "gmac1_rgmii_rxin", + "i2stx_bclk_ext", "i2stx_lrck_ext", + "i2srx_bclk_ext", "i2srx_lrck_ext", + "tdm_ext", "mclk_ext"; + #clock-cells = <1>; + #reset-cells = <1>; + }; diff --git a/MAINTAINERS b/MAINTAINERS index eeab26f5597c..ec6647e2772f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -19602,7 +19602,7 @@ STARFIVE CLOCK DRIVERS M: Emil Renner Berthing <kernel@esmil.dk> M: Hal Feng <hal.feng@starfivetech.com> S: Maintained -F: Documentation/devicetree/bindings/clock/starfive,jh7100-*.yaml +F: Documentation/devicetree/bindings/clock/starfive* F: drivers/clk/starfive/ F: include/dt-bindings/clock/starfive*