Message ID | 20230130-msm8974-qfprom-v1-1-975aa0e5e083@z3ntu.xyz |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2339448wrn; Mon, 30 Jan 2023 10:47:59 -0800 (PST) X-Google-Smtp-Source: AK7set9qR1LAJa+WK8UN2c9+qhDyDgfmDzeGHNSj+L+puQJgYas5Ctn1obxLyqGfifqXs0LwK52/ X-Received: by 2002:a17:907:1c89:b0:889:58bd:86f1 with SMTP id nb9-20020a1709071c8900b0088958bd86f1mr5099229ejc.14.1675104478891; Mon, 30 Jan 2023 10:47:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675104478; cv=none; d=google.com; s=arc-20160816; b=y7yfjsQkLsEvrqz4NVjf1VWnQccBI8tP7WoQPKIdomOBO7XLJXJ+weO3PkGfQzPKmt Cq6/zWsow9RLY1gQhveCxVor+Mza+mG4gsC+Hqwh/QkHcdLIY19FsBfd/aOU7Ko59tTy SXdxPN2iMFCEcnsWAfhyJb3uLxH0DTAR+dWilJZBaA5aRd5/dVVxz15vhRB8qVY6XRSj wGUPBXZ/2R+3hvljPswEZLbxw5va6cU2Lv6QWcUGDEmOiHbjQ19h7A8HYEGQKv/0Jkfm 3zChTuNsX+DxP9RR1BOFLc1sj2ZX/i57lqBM3bfYuJAT1ainQWOD7xSk3EyD0zYcjMrb v5/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:message-id:content-transfer-encoding :mime-version:subject:date:from:dkim-signature; bh=8HfViRE3FIkMr+9L51VB1kE0KW66fyduLLc9NmNSkCI=; b=yfW/sCw2fKj2zGrbMJwdrEZAUJ3kbW8KI2m+L4G+5E/KQnZx0EF+cl+o8OXsqS4liY mDEQfRPcxIMnrjUHAwkUtdIAIkNTOHeQoo8m46eUxC0SSortixk99gknDNisTZ8j5K2L i71SB6/TWBclRG8CxOr5SYsb25fAsm5+OJTedsN7z1Tsc2xQ08lXUlJwdTJxb1XpBCFY pl7cxxE7XoJCbNSX2U7KltJVSpwbxbmZjTIUVs6id3cNRJ9xiT7Txoy8Xnq+UtyE/d3T Di0xbxxALYUQTH0dbU4TBLPRw3APFWXUJvV/Cx1RMLbIXcNbRrwKnZ2l/VKc8gREfC6J ddAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@z3ntu.xyz header.s=z3ntu header.b=D16azt9T; 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=fail (p=NONE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gk13-20020a17090790cd00b008787afd881asi14648001ejb.458.2023.01.30.10.47.35; Mon, 30 Jan 2023 10:47:58 -0800 (PST) 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=fail header.i=@z3ntu.xyz header.s=z3ntu header.b=D16azt9T; 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=fail (p=NONE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238050AbjA3Sbw (ORCPT <rfc822;maxin.john@gmail.com> + 99 others); Mon, 30 Jan 2023 13:31:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237956AbjA3SbY (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 30 Jan 2023 13:31:24 -0500 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0AD746D45; Mon, 30 Jan 2023 10:30:26 -0800 (PST) Received: from [192.168.178.23] (unknown [62.108.10.64]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id AA6D8CD174; Mon, 30 Jan 2023 18:21:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1675102888; bh=0Dr8kzc+XRr5dNSVrvnHxckyOzuvWhj6XIseX8RubjA=; h=From:Date:Subject:To:Cc; b=D16azt9T9bLignTgJ07fiBAdLPEaULiLYbb6+IuLW2/P2qErB6JI0Y5BbMXfTO+HO F7Y5/osagMJuNkmzjYwDyTVMcX902ioocpmf7lRDjpbP3/c7azwjLkAal+SLGGkVVO 4XCRrwZo8zoDACifGj67PCLcaQsChRiwAwiic9CA= From: luca@z3ntu.xyz Date: Mon, 30 Jan 2023 19:20:56 +0100 Subject: [PATCH] ARM: dts: qcom: msm8974: correct qfprom node reg MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230130-msm8974-qfprom-v1-1-975aa0e5e083@z3ntu.xyz> X-B4-Tracking: v=1; b=H4sIAIcK2GMC/zWNQQ7CIBAAv9Ls2W2AGmz9SuMBcLEcoLBEo2n6d 6mJx0lmMhtU4kAVrt0GTK9Qw5oayFMHbjHpQRjujUEJNQg5CIw1jtPljMVnXiNqOTlBo1eaLLT Imkpo2SS3HFlxzfknupf9B11+eqZyyJnJh/fvPt/2/QvdljUxjQAAAA== To: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Eduardo Valentin <edubezval@gmail.com>, Rajendra Nayak <rnayak@codeaurora.org> Cc: Rob Herring <robh@kernel.org>, Andy Gross <andy.gross@linaro.org>, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Craig Tatlor <ctatlor97@gmail.com>, Luca Weiss <luca@z3ntu.xyz> X-Mailer: b4 0.12.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1418; i=luca@z3ntu.xyz; h=from:subject:message-id; bh=xTrlk6QIwUDPatxqOUyG7LEgj/mkoRl+FjSk+cr9SJQ=; b=owEBbQKS/ZANAwAIAXLYQ7idTddWAcsmYgBj2AqjW0MExW5rjkpzFW2ONlWKbjwUW2lGAD0Q/zk/ gnuUBFqJAjMEAAEIAB0WIQQ5utIvCCzakboVj/py2EO4nU3XVgUCY9gKowAKCRBy2EO4nU3XVg5XD/ 4oonBTUFx+3ZyGh7WBhSUZ7X/FDrA1fL1E6sTEkh2ZWoH4f/Qzq1RrPGP06pD8ouFB68Fwjclnmp93 otp8tWOlx/Q1WSWlpIOtNRRvtvbTfSruouPg84KE8wSHx63tNYJmAdX+4FVjgNhv8QJ1PjDywKoxAI rkfeCUkWLFyZCBr3YST1c6SdH9N4C8Aw8l419DrVjZWA+McDFmEPg/3zd5r5Szrw0hJgf/qLmv91Rs DOdCgFIhn35Py1GrLddrwYepTvnHdZ5+7XLGrX4ICQlTooO+ZB18wCvA1xY6zmasHg73XNJQg0Mtx0 j407N9RixlM7c+aTSZup2t1xrPkluU1o+ylNUgMCPHeHkf+POHNdMkgoxyVFatv+kId+bhPdvn/hnP 5xpBxhOUpadz84Q0afT5zAQmU1CTtd4U3U3xcwI9UpGqZcBrXo93KeUUw+eebEYlUUzRhsHbBtT5DD 5x0x8I9KY6ABFjIAfAH7j1o8mEIk3u+cfOMDqfOPcqx6p+wQzCIUSSHvl9/Pp4NDm2MSkN6BLuuH91 BlJnIDgT2K4L7879EbGGilxvuRrWVAxufu+71HvJJ9loapVgBmV31C2KcqvqegwnojvywXdlyZrFq9 BfRJhdSYmU2fKEotq07Rse/luA7FpH9IVdlCV3Yoia8ziTLOwW22nVabLOpw== X-Developer-Key: i=luca@z3ntu.xyz; a=openpgp; fpr=BD04DA24C971B8D587B2B8D7FAF69CF6CD2D02CD X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD, FROM_SUSPICIOUS_NTLD_FP,SPF_HELO_NONE,SPF_PASS,T_PDS_OTHER_BAD_TLD autolearn=no 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?1756473591099677670?= X-GMAIL-MSGID: =?utf-8?q?1756474353933079016?= |
Series |
ARM: dts: qcom: msm8974: correct qfprom node reg
|
|
Commit Message
Luca Weiss
Jan. 30, 2023, 6:20 p.m. UTC
From: Craig Tatlor <ctatlor97@gmail.com> The qfprom actually starts at 0xfc4b8000 instead of 0xfc4bc000 as defined previously. Adjust the tsens offsets accordingly. [luca@z3ntu.xyz: extract to standalone patch] Fixes: c59ffb519357 ("arm: dts: msm8974: Add thermal zones, tsens and qfprom nodes") Signed-off-by: Craig Tatlor <ctatlor97@gmail.com> Signed-off-by: Luca Weiss <luca@z3ntu.xyz> --- arch/arm/boot/dts/qcom-msm8974.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- base-commit: 6d796c50f84ca79f1722bb131799e5a5710c4700 change-id: 20230130-msm8974-qfprom-619c0e8f26eb Best regards,
Comments
On Montag, 30. Jänner 2023 19:30:04 CET Konrad Dybcio wrote: > On 30.01.2023 19:20, luca@z3ntu.xyz wrote: > > From: Craig Tatlor <ctatlor97@gmail.com> > > > > The qfprom actually starts at 0xfc4b8000 instead of 0xfc4bc000 as > > defined previously. Adjust the tsens offsets accordingly. > > > > [luca@z3ntu.xyz: extract to standalone patch] > > > > Fixes: c59ffb519357 ("arm: dts: msm8974: Add thermal zones, tsens and > > qfprom nodes") Signed-off-by: Craig Tatlor <ctatlor97@gmail.com> > > Signed-off-by: Luca Weiss <luca@z3ntu.xyz> > > --- > > Isn't this a raw vs ecc-corrected values problem? Not quite sure what you mean. The original intention behind this patch is to allow to use the pvs fuse at (now) 0xb0 which was inaccessible with the former definition. pvs: pvs@b0 { reg = <0xb0 0x8>; }; Regards Luca > > Konrad > > > arch/arm/boot/dts/qcom-msm8974.dtsi | 12 ++++++------ > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi > > b/arch/arm/boot/dts/qcom-msm8974.dtsi index 8d216a3c0851..922d235c6065 > > 100644 > > --- a/arch/arm/boot/dts/qcom-msm8974.dtsi > > +++ b/arch/arm/boot/dts/qcom-msm8974.dtsi > > @@ -1132,16 +1132,16 @@ restart@fc4ab000 { > > > > reg = <0xfc4ab000 0x4>; > > > > }; > > > > - qfprom: qfprom@fc4bc000 { > > + qfprom: qfprom@fc4b8000 { > > > > compatible = "qcom,msm8974-qfprom", "qcom,qfprom"; > > > > - reg = <0xfc4bc000 0x1000>; > > + reg = <0xfc4b8000 0x7000>; > > > > #address-cells = <1>; > > #size-cells = <1>; > > > > - tsens_calib: calib@d0 { > > - reg = <0xd0 0x18>; > > + tsens_calib: calib@40d0 { > > + reg = <0x40d0 0x18>; > > > > }; > > > > - tsens_backup: backup@440 { > > - reg = <0x440 0x10>; > > + tsens_backup: backup@4440 { > > + reg = <0x4440 0x10>; > > > > }; > > > > }; > > > > --- > > base-commit: 6d796c50f84ca79f1722bb131799e5a5710c4700 > > change-id: 20230130-msm8974-qfprom-619c0e8f26eb > > > > Best regards,
On 30.01.2023 19:36, Luca Weiss wrote: > On Montag, 30. Jänner 2023 19:30:04 CET Konrad Dybcio wrote: >> On 30.01.2023 19:20, luca@z3ntu.xyz wrote: >>> From: Craig Tatlor <ctatlor97@gmail.com> >>> >>> The qfprom actually starts at 0xfc4b8000 instead of 0xfc4bc000 as >>> defined previously. Adjust the tsens offsets accordingly. >>> >>> [luca@z3ntu.xyz: extract to standalone patch] >>> >>> Fixes: c59ffb519357 ("arm: dts: msm8974: Add thermal zones, tsens and >>> qfprom nodes") Signed-off-by: Craig Tatlor <ctatlor97@gmail.com> >>> Signed-off-by: Luca Weiss <luca@z3ntu.xyz> >>> --- >> >> Isn't this a raw vs ecc-corrected values problem? > > Not quite sure what you mean. The QFPROM is split into two parts: one where raw values are stored, and the other one where ECC-corrected copies of them reside. Usually it's at offset of 0x4000. We should generally be using the ECC-corrected ones, because.. well.. they are ECC-corrected.. You may want to check if the fuse you're adding reads the same value at +0x4000. Konrad > > The original intention behind this patch is to allow to use the pvs fuse at > (now) 0xb0 which was inaccessible with the former definition. > > pvs: pvs@b0 { > reg = <0xb0 0x8>; > }; > > Regards > Luca > >> >> Konrad >> >>> arch/arm/boot/dts/qcom-msm8974.dtsi | 12 ++++++------ >>> 1 file changed, 6 insertions(+), 6 deletions(-) >>> >>> diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi >>> b/arch/arm/boot/dts/qcom-msm8974.dtsi index 8d216a3c0851..922d235c6065 >>> 100644 >>> --- a/arch/arm/boot/dts/qcom-msm8974.dtsi >>> +++ b/arch/arm/boot/dts/qcom-msm8974.dtsi >>> @@ -1132,16 +1132,16 @@ restart@fc4ab000 { >>> >>> reg = <0xfc4ab000 0x4>; >>> >>> }; >>> >>> - qfprom: qfprom@fc4bc000 { >>> + qfprom: qfprom@fc4b8000 { >>> >>> compatible = "qcom,msm8974-qfprom", > "qcom,qfprom"; >>> >>> - reg = <0xfc4bc000 0x1000>; >>> + reg = <0xfc4b8000 0x7000>; >>> >>> #address-cells = <1>; >>> #size-cells = <1>; >>> >>> - tsens_calib: calib@d0 { >>> - reg = <0xd0 0x18>; >>> + tsens_calib: calib@40d0 { >>> + reg = <0x40d0 0x18>; >>> >>> }; >>> >>> - tsens_backup: backup@440 { >>> - reg = <0x440 0x10>; >>> + tsens_backup: backup@4440 { >>> + reg = <0x4440 0x10>; >>> >>> }; >>> >>> }; >>> >>> --- >>> base-commit: 6d796c50f84ca79f1722bb131799e5a5710c4700 >>> change-id: 20230130-msm8974-qfprom-619c0e8f26eb >>> >>> Best regards, > > > >
On Montag, 30. Jänner 2023 19:42:51 CET Konrad Dybcio wrote: > On 30.01.2023 19:36, Luca Weiss wrote: > > On Montag, 30. Jänner 2023 19:30:04 CET Konrad Dybcio wrote: > >> On 30.01.2023 19:20, luca@z3ntu.xyz wrote: > >>> From: Craig Tatlor <ctatlor97@gmail.com> > >>> > >>> The qfprom actually starts at 0xfc4b8000 instead of 0xfc4bc000 as > >>> defined previously. Adjust the tsens offsets accordingly. > >>> > >>> [luca@z3ntu.xyz: extract to standalone patch] > >>> > >>> Fixes: c59ffb519357 ("arm: dts: msm8974: Add thermal zones, tsens and > >>> qfprom nodes") Signed-off-by: Craig Tatlor <ctatlor97@gmail.com> > >>> Signed-off-by: Luca Weiss <luca@z3ntu.xyz> > >>> --- > >> > >> Isn't this a raw vs ecc-corrected values problem? > > > > Not quite sure what you mean. > > The QFPROM is split into two parts: one where raw values > are stored, and the other one where ECC-corrected copies > of them reside. Usually it's at offset of 0x4000. We should > generally be using the ECC-corrected ones, because.. well.. > they are ECC-corrected.. You may want to check if the > fuse you're adding reads the same value at +0x4000. Yeah that actually seems to work... But downstream's using this +0x4000 only for tsens it seems <0xfc4bc000 0x1000> as "tsens_eeprom_physical" qcom,clock-krait-8974 is using this: <0xfc4b80b0 0x08> as "efuse" Also seems HDMI driver is using a mix for HDCP stuff drivers/video/msm/mdss/mdss_hdmi_util.h: /* QFPROM Registers for HDMI/HDCP */ #define QFPROM_RAW_FEAT_CONFIG_ROW0_LSB (0x000000F8) #define QFPROM_RAW_FEAT_CONFIG_ROW0_MSB (0x000000FC) #define HDCP_KSV_LSB (0x000060D8) #define HDCP_KSV_MSB (0x000060DC) Any clue why Qualcomm used it this way in downstream? I'd rather not deviate too much if not for a good reason... Regards Luca > > Konrad > > > The original intention behind this patch is to allow to use the pvs fuse > > at > > (now) 0xb0 which was inaccessible with the former definition. > > > > pvs: pvs@b0 { > > > > reg = <0xb0 0x8>; > > > > }; > > > > Regards > > Luca > > > >> Konrad > >> > >>> arch/arm/boot/dts/qcom-msm8974.dtsi | 12 ++++++------ > >>> 1 file changed, 6 insertions(+), 6 deletions(-) > >>> > >>> diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi > >>> b/arch/arm/boot/dts/qcom-msm8974.dtsi index 8d216a3c0851..922d235c6065 > >>> 100644 > >>> --- a/arch/arm/boot/dts/qcom-msm8974.dtsi > >>> +++ b/arch/arm/boot/dts/qcom-msm8974.dtsi > >>> @@ -1132,16 +1132,16 @@ restart@fc4ab000 { > >>> > >>> reg = <0xfc4ab000 0x4>; > >>> > >>> }; > >>> > >>> - qfprom: qfprom@fc4bc000 { > >>> + qfprom: qfprom@fc4b8000 { > >>> > >>> compatible = "qcom,msm8974-qfprom", > > > > "qcom,qfprom"; > > > >>> - reg = <0xfc4bc000 0x1000>; > >>> + reg = <0xfc4b8000 0x7000>; > >>> > >>> #address-cells = <1>; > >>> #size-cells = <1>; > >>> > >>> - tsens_calib: calib@d0 { > >>> - reg = <0xd0 0x18>; > >>> + tsens_calib: calib@40d0 { > >>> + reg = <0x40d0 0x18>; > >>> > >>> }; > >>> > >>> - tsens_backup: backup@440 { > >>> - reg = <0x440 0x10>; > >>> + tsens_backup: backup@4440 { > >>> + reg = <0x4440 0x10>; > >>> > >>> }; > >>> > >>> }; > >>> > >>> --- > >>> base-commit: 6d796c50f84ca79f1722bb131799e5a5710c4700 > >>> change-id: 20230130-msm8974-qfprom-619c0e8f26eb > >>> > >>> Best regards,
Hi Konrad, On Montag, 30. Jänner 2023 21:37:29 CEST Luca Weiss wrote: > On Montag, 30. Jänner 2023 19:42:51 CET Konrad Dybcio wrote: > > On 30.01.2023 19:36, Luca Weiss wrote: > > > On Montag, 30. Jänner 2023 19:30:04 CET Konrad Dybcio wrote: > > >> On 30.01.2023 19:20, luca@z3ntu.xyz wrote: > > >>> From: Craig Tatlor <ctatlor97@gmail.com> > > >>> > > >>> The qfprom actually starts at 0xfc4b8000 instead of 0xfc4bc000 as > > >>> defined previously. Adjust the tsens offsets accordingly. > > >>> > > >>> [luca@z3ntu.xyz: extract to standalone patch] > > >>> > > >>> Fixes: c59ffb519357 ("arm: dts: msm8974: Add thermal zones, tsens and > > >>> qfprom nodes") Signed-off-by: Craig Tatlor <ctatlor97@gmail.com> > > >>> Signed-off-by: Luca Weiss <luca@z3ntu.xyz> > > >>> --- > > >> > > >> Isn't this a raw vs ecc-corrected values problem? > > > > > > Not quite sure what you mean. > > > > The QFPROM is split into two parts: one where raw values > > are stored, and the other one where ECC-corrected copies > > of them reside. Usually it's at offset of 0x4000. We should > > generally be using the ECC-corrected ones, because.. well.. > > they are ECC-corrected.. You may want to check if the > > fuse you're adding reads the same value at +0x4000. > > Yeah that actually seems to work... > > But downstream's using this +0x4000 only for tsens it seems > > <0xfc4bc000 0x1000> as "tsens_eeprom_physical" > > qcom,clock-krait-8974 is using this: > > <0xfc4b80b0 0x08> as "efuse" > > Also seems HDMI driver is using a mix for HDCP stuff > > drivers/video/msm/mdss/mdss_hdmi_util.h: > > /* QFPROM Registers for HDMI/HDCP */ > #define QFPROM_RAW_FEAT_CONFIG_ROW0_LSB (0x000000F8) > #define QFPROM_RAW_FEAT_CONFIG_ROW0_MSB (0x000000FC) > #define HDCP_KSV_LSB (0x000060D8) > #define HDCP_KSV_MSB (0x000060DC) > > Any clue why Qualcomm used it this way in downstream? I'd rather not deviate > too much if not for a good reason... Any comments on the above? Regards Luca > > Regards > Luca > > > Konrad > > > > > The original intention behind this patch is to allow to use the pvs fuse > > > at > > > (now) 0xb0 which was inaccessible with the former definition. > > > > > > pvs: pvs@b0 { > > > > > > reg = <0xb0 0x8>; > > > > > > }; > > > > > > Regards > > > Luca > > > > > >> Konrad > > >> > > >>> arch/arm/boot/dts/qcom-msm8974.dtsi | 12 ++++++------ > > >>> 1 file changed, 6 insertions(+), 6 deletions(-) > > >>> > > >>> diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi > > >>> b/arch/arm/boot/dts/qcom-msm8974.dtsi index 8d216a3c0851..922d235c6065 > > >>> 100644 > > >>> --- a/arch/arm/boot/dts/qcom-msm8974.dtsi > > >>> +++ b/arch/arm/boot/dts/qcom-msm8974.dtsi > > >>> @@ -1132,16 +1132,16 @@ restart@fc4ab000 { > > >>> > > >>> reg = <0xfc4ab000 0x4>; > > >>> > > >>> }; > > >>> > > >>> - qfprom: qfprom@fc4bc000 { > > >>> + qfprom: qfprom@fc4b8000 { > > >>> > > >>> compatible = "qcom,msm8974-qfprom", > > > > > > "qcom,qfprom"; > > > > > >>> - reg = <0xfc4bc000 0x1000>; > > >>> + reg = <0xfc4b8000 0x7000>; > > >>> > > >>> #address-cells = <1>; > > >>> #size-cells = <1>; > > >>> > > >>> - tsens_calib: calib@d0 { > > >>> - reg = <0xd0 0x18>; > > >>> + tsens_calib: calib@40d0 { > > >>> + reg = <0x40d0 0x18>; > > >>> > > >>> }; > > >>> > > >>> - tsens_backup: backup@440 { > > >>> - reg = <0x440 0x10>; > > >>> + tsens_backup: backup@4440 { > > >>> + reg = <0x4440 0x10>; > > >>> > > >>> }; > > >>> > > >>> }; > > >>> > > >>> --- > > >>> base-commit: 6d796c50f84ca79f1722bb131799e5a5710c4700 > > >>> change-id: 20230130-msm8974-qfprom-619c0e8f26eb > > >>> > > >>> Best regards,
On 19.04.2023 18:00, Luca Weiss wrote: > Hi Konrad, > > On Montag, 30. Jänner 2023 21:37:29 CEST Luca Weiss wrote: >> On Montag, 30. Jänner 2023 19:42:51 CET Konrad Dybcio wrote: >>> On 30.01.2023 19:36, Luca Weiss wrote: >>>> On Montag, 30. Jänner 2023 19:30:04 CET Konrad Dybcio wrote: >>>>> On 30.01.2023 19:20, luca@z3ntu.xyz wrote: >>>>>> From: Craig Tatlor <ctatlor97@gmail.com> >>>>>> >>>>>> The qfprom actually starts at 0xfc4b8000 instead of 0xfc4bc000 as >>>>>> defined previously. Adjust the tsens offsets accordingly. >>>>>> >>>>>> [luca@z3ntu.xyz: extract to standalone patch] >>>>>> >>>>>> Fixes: c59ffb519357 ("arm: dts: msm8974: Add thermal zones, tsens and >>>>>> qfprom nodes") Signed-off-by: Craig Tatlor <ctatlor97@gmail.com> >>>>>> Signed-off-by: Luca Weiss <luca@z3ntu.xyz> >>>>>> --- >>>>> >>>>> Isn't this a raw vs ecc-corrected values problem? >>>> >>>> Not quite sure what you mean. >>> >>> The QFPROM is split into two parts: one where raw values >>> are stored, and the other one where ECC-corrected copies >>> of them reside. Usually it's at offset of 0x4000. We should >>> generally be using the ECC-corrected ones, because.. well.. >>> they are ECC-corrected.. You may want to check if the >>> fuse you're adding reads the same value at +0x4000. >> >> Yeah that actually seems to work... >> >> But downstream's using this +0x4000 only for tsens it seems >> >> <0xfc4bc000 0x1000> as "tsens_eeprom_physical" >> >> qcom,clock-krait-8974 is using this: >> >> <0xfc4b80b0 0x08> as "efuse" >> >> Also seems HDMI driver is using a mix for HDCP stuff >> >> drivers/video/msm/mdss/mdss_hdmi_util.h: >> >> /* QFPROM Registers for HDMI/HDCP */ >> #define QFPROM_RAW_FEAT_CONFIG_ROW0_LSB (0x000000F8) >> #define QFPROM_RAW_FEAT_CONFIG_ROW0_MSB (0x000000FC) >> #define HDCP_KSV_LSB (0x000060D8) >> #define HDCP_KSV_MSB (0x000060DC) >> >> Any clue why Qualcomm used it this way in downstream? I'd rather not deviate >> too much if not for a good reason... > > Any comments on the above? This thread got burried to deep in the mailbox! I see two reasons why they could be using the uncorrected region: - their generators are messed up in general - they may have had an early chip revision once where there were problems with this and their generators were messed up to accommodate for it and everybody forgot to fix that No other good explanations as far as I'm aware! Konrad > > Regards > Luca > >> >> Regards >> Luca >> >>> Konrad >>> >>>> The original intention behind this patch is to allow to use the pvs fuse >>>> at >>>> (now) 0xb0 which was inaccessible with the former definition. >>>> >>>> pvs: pvs@b0 { >>>> >>>> reg = <0xb0 0x8>; >>>> >>>> }; >>>> >>>> Regards >>>> Luca >>>> >>>>> Konrad >>>>> >>>>>> arch/arm/boot/dts/qcom-msm8974.dtsi | 12 ++++++------ >>>>>> 1 file changed, 6 insertions(+), 6 deletions(-) >>>>>> >>>>>> diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi >>>>>> b/arch/arm/boot/dts/qcom-msm8974.dtsi index 8d216a3c0851..922d235c6065 >>>>>> 100644 >>>>>> --- a/arch/arm/boot/dts/qcom-msm8974.dtsi >>>>>> +++ b/arch/arm/boot/dts/qcom-msm8974.dtsi >>>>>> @@ -1132,16 +1132,16 @@ restart@fc4ab000 { >>>>>> >>>>>> reg = <0xfc4ab000 0x4>; >>>>>> >>>>>> }; >>>>>> >>>>>> - qfprom: qfprom@fc4bc000 { >>>>>> + qfprom: qfprom@fc4b8000 { >>>>>> >>>>>> compatible = "qcom,msm8974-qfprom", >>>> >>>> "qcom,qfprom"; >>>> >>>>>> - reg = <0xfc4bc000 0x1000>; >>>>>> + reg = <0xfc4b8000 0x7000>; >>>>>> >>>>>> #address-cells = <1>; >>>>>> #size-cells = <1>; >>>>>> >>>>>> - tsens_calib: calib@d0 { >>>>>> - reg = <0xd0 0x18>; >>>>>> + tsens_calib: calib@40d0 { >>>>>> + reg = <0x40d0 0x18>; >>>>>> >>>>>> }; >>>>>> >>>>>> - tsens_backup: backup@440 { >>>>>> - reg = <0x440 0x10>; >>>>>> + tsens_backup: backup@4440 { >>>>>> + reg = <0x4440 0x10>; >>>>>> >>>>>> }; >>>>>> >>>>>> }; >>>>>> >>>>>> --- >>>>>> base-commit: 6d796c50f84ca79f1722bb131799e5a5710c4700 >>>>>> change-id: 20230130-msm8974-qfprom-619c0e8f26eb >>>>>> >>>>>> Best regards, > > > >
On Mittwoch, 19. April 2023 18:12:04 CEST Konrad Dybcio wrote: > On 19.04.2023 18:00, Luca Weiss wrote: > > Hi Konrad, > > > > On Montag, 30. Jänner 2023 21:37:29 CEST Luca Weiss wrote: > >> On Montag, 30. Jänner 2023 19:42:51 CET Konrad Dybcio wrote: > >>> On 30.01.2023 19:36, Luca Weiss wrote: > >>>> On Montag, 30. Jänner 2023 19:30:04 CET Konrad Dybcio wrote: > >>>>> On 30.01.2023 19:20, luca@z3ntu.xyz wrote: > >>>>>> From: Craig Tatlor <ctatlor97@gmail.com> > >>>>>> > >>>>>> The qfprom actually starts at 0xfc4b8000 instead of 0xfc4bc000 as > >>>>>> defined previously. Adjust the tsens offsets accordingly. > >>>>>> > >>>>>> [luca@z3ntu.xyz: extract to standalone patch] > >>>>>> > >>>>>> Fixes: c59ffb519357 ("arm: dts: msm8974: Add thermal zones, tsens and > >>>>>> qfprom nodes") Signed-off-by: Craig Tatlor <ctatlor97@gmail.com> > >>>>>> Signed-off-by: Luca Weiss <luca@z3ntu.xyz> > >>>>>> --- > >>>>> > >>>>> Isn't this a raw vs ecc-corrected values problem? > >>>> > >>>> Not quite sure what you mean. > >>> > >>> The QFPROM is split into two parts: one where raw values > >>> are stored, and the other one where ECC-corrected copies > >>> of them reside. Usually it's at offset of 0x4000. We should > >>> generally be using the ECC-corrected ones, because.. well.. > >>> they are ECC-corrected.. You may want to check if the > >>> fuse you're adding reads the same value at +0x4000. > >> > >> Yeah that actually seems to work... > >> > >> But downstream's using this +0x4000 only for tsens it seems > >> > >> <0xfc4bc000 0x1000> as "tsens_eeprom_physical" > >> > >> qcom,clock-krait-8974 is using this: > >> <0xfc4b80b0 0x08> as "efuse" > >> > >> Also seems HDMI driver is using a mix for HDCP stuff > >> > >> drivers/video/msm/mdss/mdss_hdmi_util.h: > >> /* QFPROM Registers for HDMI/HDCP */ > >> #define QFPROM_RAW_FEAT_CONFIG_ROW0_LSB (0x000000F8) > >> #define QFPROM_RAW_FEAT_CONFIG_ROW0_MSB (0x000000FC) > >> #define HDCP_KSV_LSB (0x000060D8) > >> #define HDCP_KSV_MSB (0x000060DC) > >> > >> Any clue why Qualcomm used it this way in downstream? I'd rather not > >> deviate too much if not for a good reason... > > > > Any comments on the above? > > This thread got burried to deep in the mailbox! > > I see two reasons why they could be using the uncorrected region: > - their generators are messed up in general > > - they may have had an early chip revision once where there were > problems with this and their generators were messed up to > accommodate for it and everybody forgot to fix that > > No other good explanations as far as I'm aware! So, resolution is to use the offsets as declared in downstream, so take this patch to have the full range available? Regards Luca
On 19.04.2023 18:18, Luca Weiss wrote: > On Mittwoch, 19. April 2023 18:12:04 CEST Konrad Dybcio wrote: >> On 19.04.2023 18:00, Luca Weiss wrote: >>> Hi Konrad, >>> >>> On Montag, 30. Jänner 2023 21:37:29 CEST Luca Weiss wrote: >>>> On Montag, 30. Jänner 2023 19:42:51 CET Konrad Dybcio wrote: >>>>> On 30.01.2023 19:36, Luca Weiss wrote: >>>>>> On Montag, 30. Jänner 2023 19:30:04 CET Konrad Dybcio wrote: >>>>>>> On 30.01.2023 19:20, luca@z3ntu.xyz wrote: >>>>>>>> From: Craig Tatlor <ctatlor97@gmail.com> >>>>>>>> >>>>>>>> The qfprom actually starts at 0xfc4b8000 instead of 0xfc4bc000 as >>>>>>>> defined previously. Adjust the tsens offsets accordingly. >>>>>>>> >>>>>>>> [luca@z3ntu.xyz: extract to standalone patch] >>>>>>>> >>>>>>>> Fixes: c59ffb519357 ("arm: dts: msm8974: Add thermal zones, tsens and >>>>>>>> qfprom nodes") Signed-off-by: Craig Tatlor <ctatlor97@gmail.com> >>>>>>>> Signed-off-by: Luca Weiss <luca@z3ntu.xyz> >>>>>>>> --- >>>>>>> >>>>>>> Isn't this a raw vs ecc-corrected values problem? >>>>>> >>>>>> Not quite sure what you mean. >>>>> >>>>> The QFPROM is split into two parts: one where raw values >>>>> are stored, and the other one where ECC-corrected copies >>>>> of them reside. Usually it's at offset of 0x4000. We should >>>>> generally be using the ECC-corrected ones, because.. well.. >>>>> they are ECC-corrected.. You may want to check if the >>>>> fuse you're adding reads the same value at +0x4000. >>>> >>>> Yeah that actually seems to work... >>>> >>>> But downstream's using this +0x4000 only for tsens it seems >>>> >>>> <0xfc4bc000 0x1000> as "tsens_eeprom_physical" >>>> >>>> qcom,clock-krait-8974 is using this: >>>> <0xfc4b80b0 0x08> as "efuse" >>>> >>>> Also seems HDMI driver is using a mix for HDCP stuff >>>> >>>> drivers/video/msm/mdss/mdss_hdmi_util.h: >>>> /* QFPROM Registers for HDMI/HDCP */ >>>> #define QFPROM_RAW_FEAT_CONFIG_ROW0_LSB (0x000000F8) >>>> #define QFPROM_RAW_FEAT_CONFIG_ROW0_MSB (0x000000FC) >>>> #define HDCP_KSV_LSB (0x000060D8) >>>> #define HDCP_KSV_MSB (0x000060DC) >>>> >>>> Any clue why Qualcomm used it this way in downstream? I'd rather not >>>> deviate too much if not for a good reason... >>> >>> Any comments on the above? >> >> This thread got burried to deep in the mailbox! >> >> I see two reasons why they could be using the uncorrected region: >> - their generators are messed up in general >> >> - they may have had an early chip revision once where there were >> problems with this and their generators were messed up to >> accommodate for it and everybody forgot to fix that >> >> No other good explanations as far as I'm aware! > > So, resolution is to use the offsets as declared in downstream, so take this > patch to have the full range available? No, the correct resolution to "fix QFPROM reg" would be to increase the size to 0x7000-0x4000 = 0x3000, as we should be using the ECC-corrected entries. Konrad > > Regards > Luca > > >
diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi index 8d216a3c0851..922d235c6065 100644 --- a/arch/arm/boot/dts/qcom-msm8974.dtsi +++ b/arch/arm/boot/dts/qcom-msm8974.dtsi @@ -1132,16 +1132,16 @@ restart@fc4ab000 { reg = <0xfc4ab000 0x4>; }; - qfprom: qfprom@fc4bc000 { + qfprom: qfprom@fc4b8000 { compatible = "qcom,msm8974-qfprom", "qcom,qfprom"; - reg = <0xfc4bc000 0x1000>; + reg = <0xfc4b8000 0x7000>; #address-cells = <1>; #size-cells = <1>; - tsens_calib: calib@d0 { - reg = <0xd0 0x18>; + tsens_calib: calib@40d0 { + reg = <0x40d0 0x18>; }; - tsens_backup: backup@440 { - reg = <0x440 0x10>; + tsens_backup: backup@4440 { + reg = <0x4440 0x10>; }; };