Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp1075386rwp; Thu, 13 Jul 2023 05:57:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlGgvsu+0VaC8QkzjvffJ8aOdoYhMl2CwgQFT1rbWJ0uvOFaBNEf8vy760gsRwwrCgmgBxTP X-Received: by 2002:a17:90a:9e6:b0:25b:e07f:4c43 with SMTP id 93-20020a17090a09e600b0025be07f4c43mr1095887pjo.10.1689253032068; Thu, 13 Jul 2023 05:57:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689253032; cv=none; d=google.com; s=arc-20160816; b=EgQpHIBscy8dl46cRh7cYDwAq1QFKIMDZrFnp35MUtLMnHwg0LnIXKaeC/XIpymvZ2 6Q98i735BYBJV8USs8FvJnC0FHTN0hXO6Bk0Kg0ZaJ29hNroRkOoI9Zy9NjfbtMDp3ni pIX6oclJI+LZf6XoUdcF4chVpXvScXW5T1fD3LKmupiZr9mXgxhYiNMRasuvFpckx3RV c0QPD9psHidIIShvK0gArC3oMwuZfwvb9+iPPnQcIeja7EimY2FvlFQDJPEidU6ggAtp nUM8GTpkGV0IB2CGYEB9f5tdXHQROeblWIYupjHKfGfSNqtQW7PRiAqidq6BmsT8IeR7 7L9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=MsO02jH+ViDHvNLshcafKBuW3XX0NRCU1Az8N0nWX44=; fh=Fe9WTfVgOcFhXcYpWzClQJGZPYwRZLiEuPzjB/vkqQU=; b=J3OnL3jQz7otiTPheMA4xtedkjyyZovnIqVe1RjgWHSucG0+bx7IxOKF7V4iLFL48c gP05EjyGIfsvgeCSqbW4kIL7LqVGn4SMQ/UYAvHtR/Z1Y/SukYxWUjusL1Jev5WLxlYD K9NcTCO7rTpLp0v/mdUM4dbSwUEG/nkCMevV+4LVnUvcA0nkmo44MzmwvTVruzR/pbkk wfBmtHApG91YZutdrybgf8lfaAVhSyjo7ELhIq1xe2sro+HS6fL2yD9WQFQEx4VhFDaH PAXSbhyQjMBSRpR55uUDui1jhS14+84FHENTNqwiRKM7YZeOKhy0E75o1WGpJa3sY5uZ B34Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=MI8819JT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mp12-20020a17090b190c00b0025de453ee4csi5154185pjb.168.2023.07.13.05.56.59; Thu, 13 Jul 2023 05:57:12 -0700 (PDT) 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; dkim=pass header.i=@canonical.com header.s=20210705 header.b=MI8819JT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234358AbjGMM1J (ORCPT + 99 others); Thu, 13 Jul 2023 08:27:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234349AbjGMM1H (ORCPT ); Thu, 13 Jul 2023 08:27:07 -0400 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 007701BEF for ; Thu, 13 Jul 2023 05:27:05 -0700 (PDT) Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id D04293F1A1 for ; Thu, 13 Jul 2023 12:27:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1689251221; bh=MsO02jH+ViDHvNLshcafKBuW3XX0NRCU1Az8N0nWX44=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=MI8819JTf4cvauEwJYdoMRYHhkUDTtMBjj2hzDPO4mTxdM+inLKp71PK4yN8D8S2S DgIxTDpxp5eJq4WZ7Fz7xu9CdJe/lsunYNc9dqIhs/JB07sQ3Ko9l9ywUauYRlSPDd aYdVgUcDE2vcu+GW8E83qiyL6AWT/jK5pR4mtmY+DQQxNtIzKh33wj4ZwtgfYx+8yu tFvdCNOJvjqt3AC4mwIzJK/x72Ppri9nYsyC89Sxzohp52ZS+PFBMp5MSCujKU+NCZ gUcKOaIVQZNoiYs3x+/Y5N5IXOqrBUorkwKwoT9bTlGTxHk960vcYVf7rzAR82DGkz UbCdRX5rc9D4A== Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-403aa5cca80so6333651cf.0 for ; Thu, 13 Jul 2023 05:27:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689251219; x=1691843219; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MsO02jH+ViDHvNLshcafKBuW3XX0NRCU1Az8N0nWX44=; b=WA8FJexFCB2cM6JwCodQPUjJYvnr7spE0scA1Zk9kIgjwORpqRa9m4kppLWJmyyFBV nrqLnfUokk8x2BynXW5t4bXqnSAsUEQZKSK098lS/5R+opruDkergCy++vje111iPUfB MEUkCt1SeiXbf15QLiPmw0LBMtf5gVnAnfJmQL2tKrgMXkMCiX4Ayw0VWK7H0/cRLuEY Z6e6Upy6b1LMufdMPwfKK/0MTnPDkE+kE98Iba5QtGRMOHj0YVmckGtsXd6DTswdKKNT mOo1rhTIrfWCws0hZjPZsKoSEi5NWfDnU/StB1yMdJcYmQ57eeQW6a47cQcyJrHqxBOg sYCQ== X-Gm-Message-State: ABy/qLYSNrS3VLlqFOKw6s2o3qOgnwTH8vr0Tv4PS13r+bjPX07Ssgtb ZWnn5DN3CYSbcMchLjI1y9ggMo6NUzlWxKbgwBoN8q6moFLlMhRtgSEFVqixTINGxSEDQXne12G h4feKygfx14CcdCLgCHJp+ezSgB92bqpT3/Fk98xlPwzIU9273roFksztjQ== X-Received: by 2002:a05:622a:1003:b0:403:a927:1947 with SMTP id d3-20020a05622a100300b00403a9271947mr1557738qte.23.1689251218756; Thu, 13 Jul 2023 05:26:58 -0700 (PDT) X-Received: by 2002:a05:622a:1003:b0:403:a927:1947 with SMTP id d3-20020a05622a100300b00403a9271947mr1557722qte.23.1689251218536; Thu, 13 Jul 2023 05:26:58 -0700 (PDT) MIME-Version: 1.0 References: <20230704064610.292603-1-xingyu.wu@starfivetech.com> <20230704064610.292603-2-xingyu.wu@starfivetech.com> In-Reply-To: <20230704064610.292603-2-xingyu.wu@starfivetech.com> From: Emil Renner Berthing Date: Thu, 13 Jul 2023 14:26:42 +0200 Message-ID: Subject: Re: [RESEND PATCH v6 1/7] dt-bindings: clock: Add StarFive JH7110 PLL clock generator To: Xingyu Wu Cc: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Philipp Zabel , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Hal Feng , William Qiu , linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 4 Jul 2023 at 08:49, Xingyu Wu wrote: > > Add bindings for the PLL clock generator on the JH7110 RISC-V SoC. > > Reviewed-by: Conor Dooley > Reviewed-by: Krzysztof Kozlowski > Signed-off-by: Xingyu Wu > --- > .../bindings/clock/starfive,jh7110-pll.yaml | 46 +++++++++++++++++++ > .../dt-bindings/clock/starfive,jh7110-crg.h | 6 +++ > 2 files changed, 52 insertions(+) > create mode 100644 Documentation/devicetree/bindings/clock/starfive,jh7110-pll.yaml > > diff --git a/Documentation/devicetree/bindings/clock/starfive,jh7110-pll.yaml b/Documentation/devicetree/bindings/clock/starfive,jh7110-pll.yaml > new file mode 100644 > index 000000000000..beb78add5a8d > --- /dev/null > +++ b/Documentation/devicetree/bindings/clock/starfive,jh7110-pll.yaml > @@ -0,0 +1,46 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/clock/starfive,jh7110-pll.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: StarFive JH7110 PLL Clock Generator > + > +description: > + These PLLs are high speed, low jitter frequency synthesizers in JH7110. ..synthesizers in the JH7110. > + Each PLL works in integer mode or fraction mode, with configuration > + registers in the sys syscon. So the PLLs node should be a child of > + SYS-SYSCON node. > + The formula for calculating frequency is > + Fvco = Fref * (NI + NF) / M / Q1 > + > +maintainers: > + - Xingyu Wu > + > +properties: > + compatible: > + const: starfive,jh7110-pll > + > + clocks: > + maxItems: 1 > + description: Main Oscillator (24 MHz) > + > + '#clock-cells': > + const: 1 > + description: > + See for valid indices. > + > +required: > + - compatible > + - clocks > + - '#clock-cells' > + > +additionalProperties: false > + > +examples: > + - | > + clock-controller { > + compatible = "starfive,jh7110-pll"; > + clocks = <&osc>; > + #clock-cells = <1>; > + }; > diff --git a/include/dt-bindings/clock/starfive,jh7110-crg.h b/include/dt-bindings/clock/starfive,jh7110-crg.h > index 06257bfd9ac1..086a6ddcf380 100644 > --- a/include/dt-bindings/clock/starfive,jh7110-crg.h > +++ b/include/dt-bindings/clock/starfive,jh7110-crg.h > @@ -6,6 +6,12 @@ > #ifndef __DT_BINDINGS_CLOCK_STARFIVE_JH7110_CRG_H__ > #define __DT_BINDINGS_CLOCK_STARFIVE_JH7110_CRG_H__ > > +/* PLL clocks */ > +#define JH7110_CLK_PLL0_OUT 0 > +#define JH7110_CLK_PLL1_OUT 1 > +#define JH7110_CLK_PLL2_OUT 2 > +#define JH7110_PLLCLK_END 3 It would be nice if these names followed the same pattern as the clocks below. Eg. something like JH7110_PLLCLK_PLL?_OUT and JH7110_PLLCLK_END. But maybe these defines are not even needed, since you just do <&pll 0>, <&pll 1> and it's obvious what that means. > /* SYSCRG clocks */ > #define JH7110_SYSCLK_CPU_ROOT 0 > #define JH7110_SYSCLK_CPU_CORE 1 > -- > 2.25.1 >