Message ID | 20230324175456.219954-4-angelogioacchino.delregno@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp812176vqo; Fri, 24 Mar 2023 10:58:52 -0700 (PDT) X-Google-Smtp-Source: AKy350ZHVGaOjm2yHu4hSvsgARDNeh//qMLvDt63Q1FZIUfTW8nogh/e+I+lOEX/qg+aKukZ81Rc X-Received: by 2002:a17:906:7243:b0:8f3:dc49:d8eb with SMTP id n3-20020a170906724300b008f3dc49d8ebmr3480848ejk.71.1679680732488; Fri, 24 Mar 2023 10:58:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679680732; cv=none; d=google.com; s=arc-20160816; b=UxoGxVimH2pjqqZrvi1U54QRuISq3jhIr/4iLUArA0twZJaPLmQNbley3S88lPtnzg 2HIjzPZQ3Azhz8n0mpbnFX2wOdo2qNqLhJG+LJhVjhzILapwQpU0FnJzh60HwbhxY0eM yE/TA09fL8Ul9WHH5tkcfZVcvmD2LnmPEtZwHTBmbppvsZ216BsPZunC0F4Xog6GXMRS qN5qVnCTX0utoj+wZA+54heLqmL8bOmDCYjbaV26dfPzxZUaQuYNbMtZ6/+R1Dctr/Mf cSBLOwevUZIbJjWKGCNZiat2kukQVgNc72+mqYZluVJCzP6WII7Ct4q4pB1sabJY/MlK xhhQ== 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 :dkim-signature; bh=Leyd8D2nRHtjpbORXUngUPB1GU9NSyALdF0HPadNxJM=; b=iveLz1385jh5AIsYUP9fl3OUxuNhOaR+ryO1dbtQXFJa+siAVTuwHwqwj9RcGqMS2H U7whx9+9OvZRPqhRSkKASmRm7uku/v45QYcSbl8sljvMyfegdm7rsg/8OcIB9zF8frTK haJuLFARbejhR6JKQT0TKzLCycmuR+tjPhTP0CUToxWTEQClsGxelENyTxMHIBMpEtMU jMzbvTb+fPeyEEjwFroO5rMdzODoFfk/ffl9M6MNM6p86F7SUwx1HemEVKZg98ElZrB4 hcU0QV9nynB7pe+saxj3XPPqvLY7Qoa2ozeLg/UhVOOEugh+s1InXVtjEQ4LsRHnqzqr Wfhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Ams36ojB; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kt22-20020a170906aad600b0092522b9937dsi23721576ejb.320.2023.03.24.10.58.28; Fri, 24 Mar 2023 10:58:52 -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=@collabora.com header.s=mail header.b=Ams36ojB; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232141AbjCXR4Y (ORCPT <rfc822;makky5685@gmail.com> + 99 others); Fri, 24 Mar 2023 13:56:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232049AbjCXR4P (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 24 Mar 2023 13:56:15 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03C8A1ACF6; Fri, 24 Mar 2023 10:55:50 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id DCDCF6603130; Fri, 24 Mar 2023 17:55:02 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1679680503; bh=WzRAN9wdA273tqZEI1XBRQYQ34kkvCmE+TRLQXkcUfI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ams36ojBJMVxIc5HvWzMXt7fadVAKmNvyNvXbDr1SIfjjcsxhR4/t1n+E4o1iFfdy 26HgPV3F0T6mZ4xOt2/mfaxLVmw7QYwVKWyIUtu2xvfaOt0nNaR2sL1ewdrA8WgIxC 6RTt244duGpb3yHRXLx2MEHWuBo+JFl53MfcueyylPi3jFZfp8aQ5N6QbEC1T406Ou 3LyK3q7E7S5Trc+zfmiqj4yE2MqC2GX50uUjEIsaxSUFugk7ogyNaVj5pbmebJh/Y3 PANgRk+LyR73AEPhxc2Xe7OypsHaWi7xWDB8UKtMFWyxsYK+0BnEvcoa53jn/3lDpm BFqx4y3RzMdpQ== From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> To: matthias.bgg@gmail.com Cc: qii.wang@mediatek.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jassisinghbrar@gmail.com, houlong.wei@mediatek.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Subject: [PATCH v1 03/18] arm64: dts: mediatek: mt6795: xperia-m5: Enable Frequency Hopping Date: Fri, 24 Mar 2023 18:54:41 +0100 Message-Id: <20230324175456.219954-4-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230324175456.219954-1-angelogioacchino.delregno@collabora.com> References: <20230324175456.219954-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761272903584765764?= X-GMAIL-MSGID: =?utf-8?q?1761272903584765764?= |
Series |
MT6795 Helio X10 and Sony Xperia M5: DT step 2!
|
|
Commit Message
AngeloGioacchino Del Regno
March 24, 2023, 5:54 p.m. UTC
Enable FHCTL with Spread Spectrum for MAINPLL, MPLL and MSDCPLL
as found on the downstream kernel for this smartphone.
Which one to enable, and at what SSC percentage, was found by
dumping the debugging data from a running downstream kernel and
checking the downstream code.
/proc/freqhopping # cat status
FH status:
===============================================
id == fh_status == pll_status == setting_id == curr_freq == user_defined
0 0 1 0 1599000 0
1 0 1 0 1716000 0
2 1 1 2 1092000 0
3 1 1 2 2912000 0
4 1 0 2 1600000 0
5 0 0 0 0 0
6 0 1 0 1518002 0
7 0 0 0 0 0
8 0 0 0 0 0
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts | 7 +++++++
1 file changed, 7 insertions(+)
Comments
On Fri 2023-03-24 18:54:41, AngeloGioacchino Del Regno wrote: > Enable FHCTL with Spread Spectrum for MAINPLL, MPLL and MSDCPLL > as found on the downstream kernel for this smartphone. > Which one to enable, and at what SSC percentage, was found by > dumping the debugging data from a running downstream kernel and > checking the downstream code. What advantages does this have? Lower EMI emissions? Best regards, Pavel -- People of Russia, stop Putin before his war on Ukraine escalates.
Il 25/03/23 22:11, Pavel Machek ha scritto: > On Fri 2023-03-24 18:54:41, AngeloGioacchino Del Regno wrote: >> Enable FHCTL with Spread Spectrum for MAINPLL, MPLL and MSDCPLL >> as found on the downstream kernel for this smartphone. >> Which one to enable, and at what SSC percentage, was found by >> dumping the debugging data from a running downstream kernel and >> checking the downstream code. > > What advantages does this have? Lower EMI emissions? > Hello Pavel, this is done for multiple reasons, main one being lower EMI, but the effects on functionality, depending on the actual board, may be quite dramatic and ranging from lower WiFi and/or modem signal "sensitivity" (as in, for example, having to automatically lower signal gain because of signal disturbance from the conducted EMI ripple), to even a complete platform crash due to clocking issues. This is not about accounting for hardware quirks because having this situation is totally normal and expected, especially on "particular" usecases such as smartphones, where the actual board is typically much constrained in terms of space, and where on the same board you have multiple components generating noise, either wanted (a nfc/wifi/bt/2g/3g/4g/5g/something-else signal), or unwanted. Cheers! Angelo
diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts index d3415527d389..52ce3284a46f 100644 --- a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts @@ -48,6 +48,13 @@ bootloader-region@46000000 { }; }; +&fhctl { + clocks = <&apmixedsys CLK_APMIXED_MAINPLL>, <&apmixedsys CLK_APMIXED_MPLL>, + <&apmixedsys CLK_APMIXED_MSDCPLL>; + mediatek,hopping-ssc-percent = <8>, <5>, <8>; + status = "okay"; +}; + &pio { uart0_pins: uart0-pins { pins-rx {