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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BAB7C433EF for ; Wed, 20 Oct 2021 18:16:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6D23061212 for ; Wed, 20 Oct 2021 18:16:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231273AbhJTSTB (ORCPT ); Wed, 20 Oct 2021 14:19:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230381AbhJTSS6 (ORCPT ); Wed, 20 Oct 2021 14:18:58 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8B0CC06161C; Wed, 20 Oct 2021 11:16:43 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id y30so295877edi.0; Wed, 20 Oct 2021 11:16:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2Jn7WfTLu8jwkYeAj+iAPqeRaBH+HlGXHIsBLIJGA0w=; b=l5Yp4jOV8szTGfylg2ypOzkihdNd0JdPDwuRrgRvQ0UeaaqS+v699603BDGKO04VpU 54pyLP19VJL8QATcdVqcQrIb8veUCHvxIaUQpTyv6rM3jys8kvaaUADch1PMcXXFlAP/ vzZL4/vqsidX45IZn4mhpGae11IxaphvXsBKdlEs0WUybA+2HDL/iwCg7gcvQFWcrBIn xq0TExqOLZoQizipb86+q/50cQTDEPRQFI7Yss+qWPDrC88aeIDS74uA2gQIdjYUAjiS oW3Ux2/Y/F3LvJ8gUqRQ7CnxOggbgk/nrYnbyqX3lusPCZN25TGi8ev6D2HfNBwbRBls nNwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2Jn7WfTLu8jwkYeAj+iAPqeRaBH+HlGXHIsBLIJGA0w=; b=PXpVAIbToG0hOGgAnBrVOaTlMvOB9ojiJ1lAVImJFDSG1aAOY81/odm3slZiyIZopx 7sPedpPflQDr02l1xK8tsPzDUWvZHONRoDoKjfKvfgqwBZXapqHYWRbQ9r6mFMBce2L2 ABvw791k3x7bJJBzhKf2jrItyybHiaxDHD4Or2TGv1TpxF67KwtcpQpcKFaMbSzwztBK MFcduCHZLJUaBqygeTJ3bJAo+pBMZuB2K6oeHuAJQvOkEW3xYMuH1FxBLqT6fO4ZxCvg xhjiF3pYIlrRHZ3MnsawwrGhlWIYb1unSqGK63uvXyU/sfKAAsMcHcndo0419r+eYzYu lBKw== X-Gm-Message-State: AOAM530rS5k7+mzVF2BzHoFpxeTclShrFqSQzATsZmYW/tDnsVfXvC/5 DEydHbAnrHekRPMrmGuu86iNFblNIgZdM2GKeN1kdugwekc= X-Google-Smtp-Source: ABdhPJyMGVsnf3QU6/teL21jshD1FVHfAlbBDN7+Ikc/9F0vhYqmSUmw7uXsudjF0O7XdetHc3yt4e40gU9EQaMKYDw= X-Received: by 2002:a17:906:f2cd:: with SMTP id gz13mr1093501ejb.278.1634753800493; Wed, 20 Oct 2021 11:16:40 -0700 (PDT) MIME-Version: 1.0 References: <20211016145939.15643-1-martin.blumenstingl@googlemail.com> <1j5ytuvdmw.fsf@starbuckisacylon.baylibre.com> <1jmtn6tu99.fsf@starbuckisacylon.baylibre.com> In-Reply-To: <1jmtn6tu99.fsf@starbuckisacylon.baylibre.com> From: Martin Blumenstingl Date: Wed, 20 Oct 2021 20:16:29 +0200 Message-ID: Subject: Re: [PATCH] clk: meson: gxbb: Add the spread spectrum bit for MPLL0 on GXBB To: Jerome Brunet Cc: linux-amlogic@lists.infradead.org, Neil Armstrong , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Christian Hewitt Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jerome, On Mon, Oct 18, 2021 at 2:03 PM Jerome Brunet wrote: [...] > > The difference here is BIT(14). un-setting BIT(14) (documented as > > EN_DDS0) did not change anything according to Christian's test. > > That also means that SDM, SDM_EN and N2 have the expected values. > > I manually did the maths: > > (2000000000Hz * 16384) / ((16384 * 6) + 12808) = 294909640.7Hz > > which matches what clk_summary sees: > > 294909641Hz > > ... and (2000000000Hz * 16384) / ((16384 * 6) = 333MHz which is fairly close > to what you get w/o flipping the bit This is actually a great hint. So far MPLL clocks have "just worked" for me and I didn't have to work with this. With your explanation it makes sense that SDM_EN makes the hardware use or ignore the SDM value. [...] > For example yes. I am asking check a bit more what this bit does and > what it does not: > - I need confirmation whether or not it does spread spectrum. Yes this > needs to be observed on a SoC pin, like MCLK with a fairly low divider > to the averaging effect which could partially mask spread spectrum. I did some more tests with Christian. It turns out that on GXBB HHI_MPLL_CNTL7[15] has no impact on the rate seen by meson-clk-msr. On the other hand, HHI_MPLL_CNTL[25] makes MPLL0 use or ignore the SDM value (again, verified through meson-clk-msr). > - Get an idea what it actually does. The 2 calculations above are an > hint. (Spread spectrum does not change the rate mean value) Indeed! My conclusion is that on GXBB: 1) HHI_MPLL_CNTL[25] doesn't control the spread spectrum setting of MPLL0 - just like you thought 2) HHI_MPLL_CNTL[25] is actually SDM_EN (and HHI_MPLL_CNTL7[15] doesn't seem to have any impact on MPLL0's output rate) Please let me know if there's anything else we can test. Else I'll send a patch for making HHI_MPLL_CNTL[25] the SDM_EN bit of MPLL0 on GXBB. Best regards, Martin 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0ABC2C433F5 for ; Wed, 20 Oct 2021 18:16:54 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id B6DAA6128E for ; Wed, 20 Oct 2021 18:16:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B6DAA6128E Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5Nfw+bkLQ4W/pyuGr1n8iNuvbd9QkSwjRI+PJGv4GsE=; b=BZ3EE0Q2BNP2R2 Ls1ptgLRO6zASlyMp4066YxUInqf1MqTixFjV6pnIeT3SyqO0XHijhhx5DEeDTlHgqmaLFBXUvRIp 604ROWVsB+RfJoC/rmls4HMdb462alAj8XaiOyTfJHj8AqPcDt0WHqxs2y8HcYeHH2mIjV51S7LHW TznvyLw+k+Ojy7CheqE6oIQhfjjvJC76a7fDD16dLPtEaZLFV+4KNfLN84ya4pHSYho/jUjN1dRIo mdPSi0nyH+OcXzax929Ua5GNsCZsheWLzqaA/MW+QogaH+dCr8Wl9vdQDIRf4wO/JzXIuHsC1vcao NJlFTVyxFVSChuxknCSQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdG8r-005Ocp-Jw; Wed, 20 Oct 2021 18:16:45 +0000 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdG8p-005OcP-6Y; Wed, 20 Oct 2021 18:16:44 +0000 Received: by mail-ed1-x52f.google.com with SMTP id 5so386718edw.7; Wed, 20 Oct 2021 11:16:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2Jn7WfTLu8jwkYeAj+iAPqeRaBH+HlGXHIsBLIJGA0w=; b=l5Yp4jOV8szTGfylg2ypOzkihdNd0JdPDwuRrgRvQ0UeaaqS+v699603BDGKO04VpU 54pyLP19VJL8QATcdVqcQrIb8veUCHvxIaUQpTyv6rM3jys8kvaaUADch1PMcXXFlAP/ vzZL4/vqsidX45IZn4mhpGae11IxaphvXsBKdlEs0WUybA+2HDL/iwCg7gcvQFWcrBIn xq0TExqOLZoQizipb86+q/50cQTDEPRQFI7Yss+qWPDrC88aeIDS74uA2gQIdjYUAjiS oW3Ux2/Y/F3LvJ8gUqRQ7CnxOggbgk/nrYnbyqX3lusPCZN25TGi8ev6D2HfNBwbRBls nNwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2Jn7WfTLu8jwkYeAj+iAPqeRaBH+HlGXHIsBLIJGA0w=; b=Q2acT7zVlJ9KtJU7gdeAj9jUXwLKjq8DTDkwe6limqtt9Kttv/0ltZb5PK9w8YwINq 5vs6kmEPYXRb+iQwUfS7p/4DUTgTn3yq0/rGeoemuhHveeuyFa+BFt62SuXwyFTYrsuz 6GLTtLQdhtMpOnbfBnG4mala0Z0xH8mwB71scqeLaVib9XhUPMI8Tju4ED83LW0PwyGV DH4jzIYH9ES80mIi6m2B1l07mwIC7LPaWf8TRyOP1SgpseOWJ5+QrRiistnZkqn0/P+w RToNnIwf/1MZH/KkTW3/XbbXlkBykc1fTGm4EealFxHS97hXresK6D6+0NEJE5jxsG77 TLGQ== X-Gm-Message-State: AOAM531CUnwf+OF6TuorryNukFFSi56DLuyUh/yetEBw3D4dEPgDNauP RlztKkJuJFEK1ThUMP/rD1ksPAViRVLYt8WX4MA= X-Google-Smtp-Source: ABdhPJyMGVsnf3QU6/teL21jshD1FVHfAlbBDN7+Ikc/9F0vhYqmSUmw7uXsudjF0O7XdetHc3yt4e40gU9EQaMKYDw= X-Received: by 2002:a17:906:f2cd:: with SMTP id gz13mr1093501ejb.278.1634753800493; Wed, 20 Oct 2021 11:16:40 -0700 (PDT) MIME-Version: 1.0 References: <20211016145939.15643-1-martin.blumenstingl@googlemail.com> <1j5ytuvdmw.fsf@starbuckisacylon.baylibre.com> <1jmtn6tu99.fsf@starbuckisacylon.baylibre.com> In-Reply-To: <1jmtn6tu99.fsf@starbuckisacylon.baylibre.com> From: Martin Blumenstingl Date: Wed, 20 Oct 2021 20:16:29 +0200 Message-ID: Subject: Re: [PATCH] clk: meson: gxbb: Add the spread spectrum bit for MPLL0 on GXBB To: Jerome Brunet Cc: linux-amlogic@lists.infradead.org, Neil Armstrong , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Christian Hewitt X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211020_111643_277705_17DE0E32 X-CRM114-Status: GOOD ( 18.51 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Hi Jerome, On Mon, Oct 18, 2021 at 2:03 PM Jerome Brunet wrote: [...] > > The difference here is BIT(14). un-setting BIT(14) (documented as > > EN_DDS0) did not change anything according to Christian's test. > > That also means that SDM, SDM_EN and N2 have the expected values. > > I manually did the maths: > > (2000000000Hz * 16384) / ((16384 * 6) + 12808) = 294909640.7Hz > > which matches what clk_summary sees: > > 294909641Hz > > ... and (2000000000Hz * 16384) / ((16384 * 6) = 333MHz which is fairly close > to what you get w/o flipping the bit This is actually a great hint. So far MPLL clocks have "just worked" for me and I didn't have to work with this. With your explanation it makes sense that SDM_EN makes the hardware use or ignore the SDM value. [...] > For example yes. I am asking check a bit more what this bit does and > what it does not: > - I need confirmation whether or not it does spread spectrum. Yes this > needs to be observed on a SoC pin, like MCLK with a fairly low divider > to the averaging effect which could partially mask spread spectrum. I did some more tests with Christian. It turns out that on GXBB HHI_MPLL_CNTL7[15] has no impact on the rate seen by meson-clk-msr. On the other hand, HHI_MPLL_CNTL[25] makes MPLL0 use or ignore the SDM value (again, verified through meson-clk-msr). > - Get an idea what it actually does. The 2 calculations above are an > hint. (Spread spectrum does not change the rate mean value) Indeed! My conclusion is that on GXBB: 1) HHI_MPLL_CNTL[25] doesn't control the spread spectrum setting of MPLL0 - just like you thought 2) HHI_MPLL_CNTL[25] is actually SDM_EN (and HHI_MPLL_CNTL7[15] doesn't seem to have any impact on MPLL0's output rate) Please let me know if there's anything else we can test. Else I'll send a patch for making HHI_MPLL_CNTL[25] the SDM_EN bit of MPLL0 on GXBB. Best regards, Martin _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 419E4C433F5 for ; Wed, 20 Oct 2021 18:18:11 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id EC0BB60C49 for ; Wed, 20 Oct 2021 18:18:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org EC0BB60C49 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YiPsTlj0Bdfd+94lBDU4LCKaE6LVyzS2dbJmAsavKGA=; b=cYHWuRIsPuSOUe 8YRVwbDa1wt7osMskmn8fo/NTyS6avqRfHsseFaCrTAc+SesWFhkxjb8HBpw637+ApbLhROtJg4/C YNkoL1VBlzOw1uQPe8HJOLIvpzeBNq561TGQb5LgIlw3GsfVsogbxDI5Ab+lTbfjo3Ye76sW5DpYs 8mX2KVofeqIKfDd1sI1/L+rTjAFVXgiI4NkOB7WvuyY5lOT55ROF3cAjfeojItNz3www9vP4SMByb /IU9SzzpVh1buaEVi5ycNYRc7bdSC/NzgyEM4lDdZpi1HbbMtRiu9XdSiCN9/ILgYPYXiPaKM3KXt JcgJJfbMeJu4ZATBsf9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdG8t-005Ocx-6A; Wed, 20 Oct 2021 18:16:47 +0000 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdG8p-005OcP-6Y; Wed, 20 Oct 2021 18:16:44 +0000 Received: by mail-ed1-x52f.google.com with SMTP id 5so386718edw.7; Wed, 20 Oct 2021 11:16:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2Jn7WfTLu8jwkYeAj+iAPqeRaBH+HlGXHIsBLIJGA0w=; b=l5Yp4jOV8szTGfylg2ypOzkihdNd0JdPDwuRrgRvQ0UeaaqS+v699603BDGKO04VpU 54pyLP19VJL8QATcdVqcQrIb8veUCHvxIaUQpTyv6rM3jys8kvaaUADch1PMcXXFlAP/ vzZL4/vqsidX45IZn4mhpGae11IxaphvXsBKdlEs0WUybA+2HDL/iwCg7gcvQFWcrBIn xq0TExqOLZoQizipb86+q/50cQTDEPRQFI7Yss+qWPDrC88aeIDS74uA2gQIdjYUAjiS oW3Ux2/Y/F3LvJ8gUqRQ7CnxOggbgk/nrYnbyqX3lusPCZN25TGi8ev6D2HfNBwbRBls nNwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2Jn7WfTLu8jwkYeAj+iAPqeRaBH+HlGXHIsBLIJGA0w=; b=Q2acT7zVlJ9KtJU7gdeAj9jUXwLKjq8DTDkwe6limqtt9Kttv/0ltZb5PK9w8YwINq 5vs6kmEPYXRb+iQwUfS7p/4DUTgTn3yq0/rGeoemuhHveeuyFa+BFt62SuXwyFTYrsuz 6GLTtLQdhtMpOnbfBnG4mala0Z0xH8mwB71scqeLaVib9XhUPMI8Tju4ED83LW0PwyGV DH4jzIYH9ES80mIi6m2B1l07mwIC7LPaWf8TRyOP1SgpseOWJ5+QrRiistnZkqn0/P+w RToNnIwf/1MZH/KkTW3/XbbXlkBykc1fTGm4EealFxHS97hXresK6D6+0NEJE5jxsG77 TLGQ== X-Gm-Message-State: AOAM531CUnwf+OF6TuorryNukFFSi56DLuyUh/yetEBw3D4dEPgDNauP RlztKkJuJFEK1ThUMP/rD1ksPAViRVLYt8WX4MA= X-Google-Smtp-Source: ABdhPJyMGVsnf3QU6/teL21jshD1FVHfAlbBDN7+Ikc/9F0vhYqmSUmw7uXsudjF0O7XdetHc3yt4e40gU9EQaMKYDw= X-Received: by 2002:a17:906:f2cd:: with SMTP id gz13mr1093501ejb.278.1634753800493; Wed, 20 Oct 2021 11:16:40 -0700 (PDT) MIME-Version: 1.0 References: <20211016145939.15643-1-martin.blumenstingl@googlemail.com> <1j5ytuvdmw.fsf@starbuckisacylon.baylibre.com> <1jmtn6tu99.fsf@starbuckisacylon.baylibre.com> In-Reply-To: <1jmtn6tu99.fsf@starbuckisacylon.baylibre.com> From: Martin Blumenstingl Date: Wed, 20 Oct 2021 20:16:29 +0200 Message-ID: Subject: Re: [PATCH] clk: meson: gxbb: Add the spread spectrum bit for MPLL0 on GXBB To: Jerome Brunet Cc: linux-amlogic@lists.infradead.org, Neil Armstrong , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Christian Hewitt X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211020_111643_277705_17DE0E32 X-CRM114-Status: GOOD ( 18.51 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Jerome, On Mon, Oct 18, 2021 at 2:03 PM Jerome Brunet wrote: [...] > > The difference here is BIT(14). un-setting BIT(14) (documented as > > EN_DDS0) did not change anything according to Christian's test. > > That also means that SDM, SDM_EN and N2 have the expected values. > > I manually did the maths: > > (2000000000Hz * 16384) / ((16384 * 6) + 12808) = 294909640.7Hz > > which matches what clk_summary sees: > > 294909641Hz > > ... and (2000000000Hz * 16384) / ((16384 * 6) = 333MHz which is fairly close > to what you get w/o flipping the bit This is actually a great hint. So far MPLL clocks have "just worked" for me and I didn't have to work with this. With your explanation it makes sense that SDM_EN makes the hardware use or ignore the SDM value. [...] > For example yes. I am asking check a bit more what this bit does and > what it does not: > - I need confirmation whether or not it does spread spectrum. Yes this > needs to be observed on a SoC pin, like MCLK with a fairly low divider > to the averaging effect which could partially mask spread spectrum. I did some more tests with Christian. It turns out that on GXBB HHI_MPLL_CNTL7[15] has no impact on the rate seen by meson-clk-msr. On the other hand, HHI_MPLL_CNTL[25] makes MPLL0 use or ignore the SDM value (again, verified through meson-clk-msr). > - Get an idea what it actually does. The 2 calculations above are an > hint. (Spread spectrum does not change the rate mean value) Indeed! My conclusion is that on GXBB: 1) HHI_MPLL_CNTL[25] doesn't control the spread spectrum setting of MPLL0 - just like you thought 2) HHI_MPLL_CNTL[25] is actually SDM_EN (and HHI_MPLL_CNTL7[15] doesn't seem to have any impact on MPLL0's output rate) Please let me know if there's anything else we can test. Else I'll send a patch for making HHI_MPLL_CNTL[25] the SDM_EN bit of MPLL0 on GXBB. Best regards, Martin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel