From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60A0EC7EE2D for ; Tue, 23 May 2023 02:44:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234896AbjEWCox (ORCPT ); Mon, 22 May 2023 22:44:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232366AbjEWCow (ORCPT ); Mon, 22 May 2023 22:44:52 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57CC3CA; Mon, 22 May 2023 19:44:50 -0700 (PDT) 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 05FF724E03C; Tue, 23 May 2023 10:44:49 +0800 (CST) Received: from EXMBX061.cuchost.com (172.16.6.61) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 23 May 2023 10:44:49 +0800 Received: from [192.168.125.131] (183.27.98.143) by EXMBX061.cuchost.com (172.16.6.61) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 23 May 2023 10:44:47 +0800 Message-ID: <6dd7e9ac-a513-5a05-b342-7fca7b295079@starfivetech.com> Date: Tue, 23 May 2023 10:42:50 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v4 1/7] dt-bindings: clock: Add StarFive JH7110 PLL clock generator Content-Language: en-US To: Conor Dooley , Torsten Duwe CC: , , , Michael Turquette , Stephen Boyd , Krzysztof Kozlowski , Philipp Zabel , Conor Dooley , Emil Renner Berthing , "Rob Herring" , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Hal Feng" , William Qiu , , References: <20230512022036.97987-1-xingyu.wu@starfivetech.com> <20230512022036.97987-2-xingyu.wu@starfivetech.com> <20230519135733.GA10188@lst.de> <20230519-smokeless-guileless-2a71cae06509@wendy> From: Xingyu Wu In-Reply-To: <20230519-smokeless-guileless-2a71cae06509@wendy> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [183.27.98.143] X-ClientProxiedBy: EXCAS064.cuchost.com (172.16.6.24) To EXMBX061.cuchost.com (172.16.6.61) X-YovoleRuleAgent: yovoleflag Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/5/19 22:16, Conor Dooley wrote: > On Fri, May 19, 2023 at 03:57:33PM +0200, Torsten Duwe wrote: >> On Fri, May 12, 2023 at 10:20:30AM +0800, Xingyu Wu wrote: >> [...] >> > #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 >> >> In U-Boot commit 58c9c60b Yanhong Wang added: >> >> + >> +#define JH7110_SYSCLK_PLL0_OUT 190 >> +#define JH7110_SYSCLK_PLL1_OUT 191 >> +#define JH7110_SYSCLK_PLL2_OUT 192 >> + >> +#define JH7110_SYSCLK_END 193 >> >> in that respective file. >> >> > +#define JH7110_PLLCLK_END 3 >> > + >> > /* SYSCRG clocks */ >> > #define JH7110_SYSCLK_CPU_ROOT 0 >> >> If the symbolic names referred to the same items, would it be possible >> to keep the two files in sync somehow? > > Ohh, that's not good.. If you pass the U-Boot dtb to Linux it won't > understand the numbering. The headers are part of the dt-binding :/ Because PLL driver is separated from SYSCRG driver in Linux, the numbering starts from 0. But in Uboot, the PLL driver is included in the SYSCRG driver, and the number follows the SYSCRG. Best regards, Xingyu Wu From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C2F0FC7EE23 for ; Tue, 23 May 2023 02:45:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:CC:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3l2oEbIFQx/gwLslKGgihJNbE3FjK7exC4zRp4PnWss=; b=qPSSM2q6YEf2za t+8lJ6WGxjv2MIMsHvbNGLmBOXikptm9XKAT3aLO5kSuUs278MRFqdbLrGJ2iPwJbfiIpvIvWGxx6 PcMDY0R95ATXNmpNgWx5dsFva9z+xgdH2CFMBrref1PhEV2CQ9i5QEssWeqLeCyDY70TlhNblREn1 lkdMLISIkltKqVQbAwrMRNkF2/S5EQwVl4mKsIA19fqjogujqJ2Cj6rsE9R7RLFM9OlIXKiwilQOO haqOQ+FU05SzhswlGlOKI+TnYlTyrdud6gLjBOIEqB0cP6NZ86ulcgewwfrVzUe7+EzKALBGoGkPG OzA+hRkljEx02pMIO+YA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q1I1J-008igk-09; Tue, 23 May 2023 02:45:05 +0000 Received: from ex01.ufhost.com ([61.152.239.75]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q1I1G-008ifr-08 for linux-riscv@lists.infradead.org; Tue, 23 May 2023 02:45:03 +0000 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 05FF724E03C; Tue, 23 May 2023 10:44:49 +0800 (CST) Received: from EXMBX061.cuchost.com (172.16.6.61) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 23 May 2023 10:44:49 +0800 Received: from [192.168.125.131] (183.27.98.143) by EXMBX061.cuchost.com (172.16.6.61) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 23 May 2023 10:44:47 +0800 Message-ID: <6dd7e9ac-a513-5a05-b342-7fca7b295079@starfivetech.com> Date: Tue, 23 May 2023 10:42:50 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v4 1/7] dt-bindings: clock: Add StarFive JH7110 PLL clock generator Content-Language: en-US To: Conor Dooley , Torsten Duwe CC: , , , Michael Turquette , Stephen Boyd , Krzysztof Kozlowski , Philipp Zabel , Conor Dooley , Emil Renner Berthing , "Rob Herring" , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Hal Feng" , William Qiu , , References: <20230512022036.97987-1-xingyu.wu@starfivetech.com> <20230512022036.97987-2-xingyu.wu@starfivetech.com> <20230519135733.GA10188@lst.de> <20230519-smokeless-guileless-2a71cae06509@wendy> From: Xingyu Wu In-Reply-To: <20230519-smokeless-guileless-2a71cae06509@wendy> X-Originating-IP: [183.27.98.143] X-ClientProxiedBy: EXCAS064.cuchost.com (172.16.6.24) To EXMBX061.cuchost.com (172.16.6.61) X-YovoleRuleAgent: yovoleflag X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230522_194502_212261_1553A0E2 X-CRM114-Status: GOOD ( 13.20 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On 2023/5/19 22:16, Conor Dooley wrote: > On Fri, May 19, 2023 at 03:57:33PM +0200, Torsten Duwe wrote: >> On Fri, May 12, 2023 at 10:20:30AM +0800, Xingyu Wu wrote: >> [...] >> > #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 >> >> In U-Boot commit 58c9c60b Yanhong Wang added: >> >> + >> +#define JH7110_SYSCLK_PLL0_OUT 190 >> +#define JH7110_SYSCLK_PLL1_OUT 191 >> +#define JH7110_SYSCLK_PLL2_OUT 192 >> + >> +#define JH7110_SYSCLK_END 193 >> >> in that respective file. >> >> > +#define JH7110_PLLCLK_END 3 >> > + >> > /* SYSCRG clocks */ >> > #define JH7110_SYSCLK_CPU_ROOT 0 >> >> If the symbolic names referred to the same items, would it be possible >> to keep the two files in sync somehow? > > Ohh, that's not good.. If you pass the U-Boot dtb to Linux it won't > understand the numbering. The headers are part of the dt-binding :/ Because PLL driver is separated from SYSCRG driver in Linux, the numbering starts from 0. But in Uboot, the PLL driver is included in the SYSCRG driver, and the number follows the SYSCRG. Best regards, Xingyu Wu _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv