From patchwork Mon Jul 17 02:30:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xingyu Wu X-Patchwork-Id: 120988 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp867368vqt; Sun, 16 Jul 2023 19:33:21 -0700 (PDT) X-Google-Smtp-Source: APBJJlEar77kOvDVmlePMbXel2FqOmIFWFj4Yj5uBahFpQkFY8XOrV2szUkBibWCzZqqweV2Tnes X-Received: by 2002:a17:906:6496:b0:974:1ef7:1e88 with SMTP id e22-20020a170906649600b009741ef71e88mr9603560ejm.13.1689561201051; Sun, 16 Jul 2023 19:33:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689561201; cv=none; d=google.com; s=arc-20160816; b=GDJLW2p5oKst8zOk8V8PX7TFwIcw+9BW9TDfButHa+JvyZH8+fL+hzeoIpomJG3l// LPaFzGjQhCxLr6pCnMefWcsu6mf4Sic0aOqGIAEwa1+mWXEdtTkIHfJQCFST1k2qcQIM PBlPE5eA51FzBGrh1MOAqkt4uC5s6LnFRy+IUZRyK7C2eYEHIEqCF0dY1WEk0WI1cxjt +srkNxe5dXsJanN+kU45VFu4pMEQpBCg/GmUMHvF2jlQCwyHPvhpWLzcxtw4QXz78Dij HgmieE5UnbXd4nZYZjGK9FzG5xLi9C+pm6sUJRY0PXKvIwiKUKMu4qyFkBobdBK6jf9G lRAA== 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=SrXSEMW5QNYdxVq/3HW2b5IOPQP4etCLmegGEIZQAFI=; fh=L5BHRvtUZAZ8Rhz2I9jy0uMRl6XQRieQsKquOzHZx+Q=; b=l51Ua5wwPDG6/Iqhk0Jkg5G4AOJx8fN3t5nIuSHfF5d5D6D5bPym045rr2oZsnOchB evxePO1ky+tYs4QefHnbhp0Uh4QYNZm0WKSdqhyf71GupdTOb61XcG+xD641y0u9l4PA +lQt/ufWvOEfO5EwvLLQPkfzjrBjUSyQ2+dajPtWoHIHpcN23nKzlBYwBs+l9MDFd5qO 53e0hthrwRtSuy7UgHFEvWUXc+gNuze5O9SR/srGXlZUWTRjWldOyOuik/PpE1pB+ATV DJPnt1Iv4CQjhY/cjgxkyhjwi58N9F55oEmwIrABtvtIIerMHqDLEopbFEEhupsbGXTB 6G2A== 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 ga15-20020a170906b84f00b0098decd9e210si12253606ejb.19.2023.07.16.19.32.58; Sun, 16 Jul 2023 19:33:21 -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; 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 S230495AbjGQCat convert rfc822-to-8bit (ORCPT + 99 others); Sun, 16 Jul 2023 22:30:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbjGQCaq (ORCPT ); Sun, 16 Jul 2023 22:30:46 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75A7B1AA; Sun, 16 Jul 2023 19:30:44 -0700 (PDT) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 3DC8C24E278; Mon, 17 Jul 2023 10:30:43 +0800 (CST) Received: from EXMBX061.cuchost.com (172.16.6.61) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 17 Jul 2023 10:30:43 +0800 Received: from localhost.localdomain (113.72.147.86) by EXMBX061.cuchost.com (172.16.6.61) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 17 Jul 2023 10:30:42 +0800 From: Xingyu Wu To: , , "Michael Turquette" , Stephen Boyd , "Rob Herring" , Krzysztof Kozlowski , Philipp Zabel , Conor Dooley , Emil Renner Berthing CC: Paul Walmsley , Palmer Dabbelt , Albert Ou , Hal Feng , Xingyu Wu , "William Qiu" , , Subject: [PATCH v7 1/7] dt-bindings: clock: Add StarFive JH7110 PLL clock generator Date: Mon, 17 Jul 2023 10:30:34 +0800 Message-ID: <20230717023040.78860-2-xingyu.wu@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230717023040.78860-1-xingyu.wu@starfivetech.com> References: <20230717023040.78860-1-xingyu.wu@starfivetech.com> MIME-Version: 1.0 X-Originating-IP: [113.72.147.86] X-ClientProxiedBy: EXCAS062.cuchost.com (172.16.6.22) To EXMBX061.cuchost.com (172.16.6.61) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771633325692123126 X-GMAIL-MSGID: 1771633325692123126 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 Reviewed-by: Emil Renner Berthing --- .../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..be8300ce86d0 --- /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 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..3fb5e31c3be4 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_PLLCLK_PLL0_OUT 0 +#define JH7110_PLLCLK_PLL1_OUT 1 +#define JH7110_PLLCLK_PLL2_OUT 2 +#define JH7110_PLLCLK_END 3 + /* SYSCRG clocks */ #define JH7110_SYSCLK_CPU_ROOT 0 #define JH7110_SYSCLK_CPU_CORE 1