Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1041227rdb; Fri, 1 Dec 2023 05:46:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IF71ADfs5l/hGaCZD4JK/dkkopKJu1N1+qxzGI+SYssswgE19dj4JB4axhT4yP6EFPY2mNB X-Received: by 2002:a17:903:2291:b0:1cf:cd31:459d with SMTP id b17-20020a170903229100b001cfcd31459dmr19206880plh.21.1701438387305; Fri, 01 Dec 2023 05:46:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701438387; cv=none; d=google.com; s=arc-20160816; b=aRo6t0TQ3rNwz4u+SUS4PB0VARDkNQYS+T7Lae1VlR5Q06jGM9GwmaAF1DtQ8/de5j DpvwtMM4SOf72rsjGCfjsOcZ8w5tZ8j6bkFkT4ie4cMsw8Q/Fay3lWfsr/WyJIBP6VZR yFctdp9FKmAYLtsXPE30ieJQ7TuK4FLczUrEopN3OfUfJ+Zz/oroqPCQiQsZleQECTuk 9Baq6DuKEKpCCE98cs3ClhxZEcXzNKrtVAEBX4ziMvnrmd3cprpxBbx9VMjzCrMtg7CI lSnUuVkpMwtMXmbm+BrKnDaes6gHolAgPJbq1FC92/PDbCjrpzkmEl1D2nrNQ5wlaHuC uWQA== 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:mime-version :references:in-reply-to:from:dkim-signature; bh=aIjaCW3pUrXp+pTpaK834thD0tFwpmqmqseWMXTUtMQ=; fh=tL7EdM1e30JduGrfcNr4IHL9icIB6+ucFB2Q96mrCkU=; b=wUISw1IUHsRCJoX8fhLlThBpsw2Ut+SlZk77QC/1g8DhTMcWlLpQSlfiGlh675VVs+ i3/jiTW6Owlh8w+MBWY49peNoyjQYZKDdORNwlMxyMNPgAC2WAQm5sH1r/R4vbeyZKtH 47NslHXBAl9e5o7IexHn2g+ws8G3XBu4OBzSu/sVMx6b+Zv1kiLgLMNBTP8wNL3/eYQg xoZiZnuL5fItDnHU2rCwNrgSdjHi4M71VkdnsCujbbLBXhz9hq8CyXZWSHuvfU1jGJHo ktHA1+E10RLpYf0pm5ZkN2diUwmCPJ79Y+fsO5Y1piN6bmgv+7zBfEu+2KxVaOWujRqO SN4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=lJfVPYBM; 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=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id f8-20020a170902ce8800b001cf7c07be54si3426275plg.507.2023.12.01.05.46.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 05:46:27 -0800 (PST) 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; dkim=pass header.i=@canonical.com header.s=20210705 header.b=lJfVPYBM; 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=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id BCE2E807D6AD; Fri, 1 Dec 2023 05:45:18 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379031AbjLANpB (ORCPT + 99 others); Fri, 1 Dec 2023 08:45:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379024AbjLANpA (ORCPT ); Fri, 1 Dec 2023 08:45:00 -0500 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBE4E197 for ; Fri, 1 Dec 2023 05:45:04 -0800 (PST) Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) (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-0.canonical.com (Postfix) with ESMTPS id 8A3764443E for ; Fri, 1 Dec 2023 13:45:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1701438301; bh=aIjaCW3pUrXp+pTpaK834thD0tFwpmqmqseWMXTUtMQ=; h=From:In-Reply-To:References:Mime-Version:Date:Message-ID:Subject: To:Cc:Content-Type; b=lJfVPYBMJyAwvJfqMZzEYJKspBsM6suBWYY0btqL9WHMBewzLbsrI/pWzADENo3lr gY4N2QKm1237X/3w0zzuyRw73RJ1wXbO9mytTSW/P6LNUwWwucOfw9+1T2zLj1Ihhf 5DHt0AUk9Kh+AOZWsVtgYHg1I7yauNQnCQhnOJJFYbRQjpz0SAeKSw0+FY5Cll7omq fex1cwq578pEGOB2RlM1XtleKyHmFesBm7PsSNYfPJGmkhPxXGlYF2e5Qtv4E8vNgh 8/1aUdKIU779z+5gJpdHao/4Eg/v7KPIuADuTnsA97nEhQ7rQAiW1pCTkh3XIRR0I2 PFjKwkurrXgrA== Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-423e22075f4so24317761cf.0 for ; Fri, 01 Dec 2023 05:45:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701438299; x=1702043099; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aIjaCW3pUrXp+pTpaK834thD0tFwpmqmqseWMXTUtMQ=; b=o8X0xF0uU+l9H34+iSo6m5X5DMGY5+0U33ef7/B1v0CzOL0K1GdF2GJ362843RIZDl rmPIqf6NY430wfTn6LjDEbXEciTd5oYKUO4FmU6BQuh/+5Q4T/6095XjuW8cz8uoBhE9 /FABxxhAVE231csPznNpwZEA4zUz5ite6SGLkB1SIIStIMWH4YiWAdoZJueWkL7JaySp oDBYT89nUE4srzO4DQvEo5sZUwUi22RfHBz5NCgLghN5QIpmgpPSCSB+sPeC9cHaOuHb bVtENMaQvuzCeWnmaXKd7T4qrrLrevPQVL/jRZSblvgfdFnW7wrdAX+4TSc4JxDlZ1kM 1T7A== X-Gm-Message-State: AOJu0Ywq31v0RmhQ5yVejroT18OCW7BDF/dkEn5SB8N1CvJPk+X5tNLP tdX628nH6+CzoF3g+jSy1WWoh5Z6M7YMLQq/BYxqpi+efNrTk4ZVHpEjENlhuUlmKNZaMhXF5he yMPRMTW4CWaWK+NhIrX7R0twEetQc5sAfEOtkOlRjeN1oaJ+yH92vawOnfw== X-Received: by 2002:ac8:40c1:0:b0:423:a89d:df9c with SMTP id f1-20020ac840c1000000b00423a89ddf9cmr18751999qtm.60.1701438299402; Fri, 01 Dec 2023 05:44:59 -0800 (PST) X-Received: by 2002:ac8:40c1:0:b0:423:a89d:df9c with SMTP id f1-20020ac840c1000000b00423a89ddf9cmr18751983qtm.60.1701438299151; Fri, 01 Dec 2023 05:44:59 -0800 (PST) Received: from 348282803490 named unknown by gmailapi.google.com with HTTPREST; Fri, 1 Dec 2023 14:44:58 +0100 From: Emil Renner Berthing In-Reply-To: <20231130-bobbing-valid-b97f26fe8edc@spud> References: <20231130-bobbing-valid-b97f26fe8edc@spud> Mime-Version: 1.0 Date: Fri, 1 Dec 2023 14:44:58 +0100 Message-ID: Subject: Re: [PATCH v1] riscv: dts: starfive: move timebase-frequency to .dtsi To: Conor Dooley , linux-riscv@lists.infradead.org Cc: Conor Dooley , Emil Renner Berthing , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Walker Chen , JeeHeng Sia , Leyfoon Tan Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 lipwig.vger.email Precedence: bulk List-ID: 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]); Fri, 01 Dec 2023 05:45:19 -0800 (PST) Conor Dooley wrote: > From: Conor Dooley > > Properties fixed by the SoC should be defined in the $soc.dtsi, and the > timebase-frequency is not sourced directly from an off-chip oscillator. Yes, according to the JH7100 docs[1] the mtime register is sourced from the osc_sys external oscillator through u74rtc_toggle. However I haven't yet found a place in the docs that describe where that clock is divided by 4 to get 6.25MHz from the 25MHz. I expect the JH7110 mtime is set up in a similar way, but haven't yet dug into the available documentation. [1]: https://github.com/starfive-tech/JH7100_Docs/blob/main/vic_u7_manual_with_creativecommons.pdf /Emil > > Signed-off-by: Conor Dooley > --- > I actually have no idea whether this is true or not, I asked on the > jh8100 series but only got an answer for that SoC and not the existing > ones. I'm hoping that a patch envokes more of a reaction! > > CC: Emil Renner Berthing > CC: Conor Dooley > CC: Rob Herring > CC: Krzysztof Kozlowski > CC: Paul Walmsley > CC: Palmer Dabbelt > CC: linux-riscv@lists.infradead.org > CC: devicetree@vger.kernel.org > CC: linux-kernel@vger.kernel.org > CC: Walker Chen > CC: JeeHeng Sia > CC: Leyfoon Tan > --- > arch/riscv/boot/dts/starfive/jh7100-common.dtsi | 4 ---- > arch/riscv/boot/dts/starfive/jh7100.dtsi | 1 + > .../riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi | 4 ---- > arch/riscv/boot/dts/starfive/jh7110.dtsi | 1 + > 4 files changed, 2 insertions(+), 8 deletions(-) > > diff --git a/arch/riscv/boot/dts/starfive/jh7100-common.dtsi b/arch/riscv/boot/dts/starfive/jh7100-common.dtsi > index b93ce351a90f..214f27083d7b 100644 > --- a/arch/riscv/boot/dts/starfive/jh7100-common.dtsi > +++ b/arch/riscv/boot/dts/starfive/jh7100-common.dtsi > @@ -19,10 +19,6 @@ chosen { > stdout-path = "serial0:115200n8"; > }; > > - cpus { > - timebase-frequency = <6250000>; > - }; > - > memory@80000000 { > device_type = "memory"; > reg = <0x0 0x80000000 0x2 0x0>; > diff --git a/arch/riscv/boot/dts/starfive/jh7100.dtsi b/arch/riscv/boot/dts/starfive/jh7100.dtsi > index e68cafe7545f..c50b32424721 100644 > --- a/arch/riscv/boot/dts/starfive/jh7100.dtsi > +++ b/arch/riscv/boot/dts/starfive/jh7100.dtsi > @@ -16,6 +16,7 @@ / { > cpus { > #address-cells = <1>; > #size-cells = <0>; > + timebase-frequency = <6250000>; > > U74_0: cpu@0 { > compatible = "sifive,u74-mc", "riscv"; > diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi > index b89e9791efa7..7873c7ffde4d 100644 > --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi > +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi > @@ -26,10 +26,6 @@ chosen { > stdout-path = "serial0:115200n8"; > }; > > - cpus { > - timebase-frequency = <4000000>; > - }; > - > memory@40000000 { > device_type = "memory"; > reg = <0x0 0x40000000 0x1 0x0>; > diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi > index 45213cdf50dc..ee7d4bb1f537 100644 > --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi > +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi > @@ -18,6 +18,7 @@ / { > cpus { > #address-cells = <1>; > #size-cells = <0>; > + timebase-frequency = <4000000>; > > S7_0: cpu@0 { > compatible = "sifive,s7", "riscv"; > -- > 2.39.2 >