Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp493936rwr; Wed, 19 Apr 2023 09:08:32 -0700 (PDT) X-Google-Smtp-Source: AKy350ZzqgXIQf6oo8iLtQ+gXAkRDDcOaRSWSWsZfB4cmqb6ji1jtJzBLmxMgkUob9XN8sqs9fW1 X-Received: by 2002:a17:90a:800c:b0:246:d185:bd7c with SMTP id b12-20020a17090a800c00b00246d185bd7cmr3279872pjn.5.1681920512338; Wed, 19 Apr 2023 09:08:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681920512; cv=none; d=google.com; s=arc-20160816; b=zk0gcHb4nMkRedVP00k/Emq9Hnrq8o6f8Y7lMs3mDMnDDXq+plJINeyFpx9t4Gwc2m WEQI7XJVZ/963yzMvrDe3bCepzBDiAKogIVrlH1B2yubeNTb+GKbdpVsaI0PRrUR/eMb GQWPTA3PkTZRGwta4ERGiD8qIynu2SEt1NyOb6WutAUjWg6i5vtQPqyPRLVgK6EtK3gG PcoswmtyMrYNaBInFdPYjqGVIKP4OFZqFVLJjeW+QQzwBJ1fF3EUU0eH3WqyqQSCuKjw c4BG3d/2s7HZn/rT10mamTg659CSytvBUKe/+2q42AWm+YHAFBUnddlGA+NzdOt+SKdk o29A== 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=9M2svKiwrpIq/WCUmmzlfZzkUx+/Kv7aeUNsiFDlWY0=; b=s/ALlrQRFSRVnWaddEAC+/R6HBkjCtr/2gcHefFrDXZpQ2PNqI7D4kijAWAjo1mgw0 kMi89a2Lc1qPHrvZ5arIuS9ljJPg2+jkuZiKnXWbD9TdFZDn9X8+9fic7bNK4kxyluD8 WShtpj0SlxqwahilU2hOm90w76aHmOT1tUBK0lVeZzC2LfvN34JAMu1+UUEIn7XBXDFl f3gBbTYl563HlWTjUwUDPaVnFKUhX01EZWjP8pF2BTQmQdOtRIxAaJHNn0lzmXg24BpY nxiQn7cFuhvLion3iam3vXQmzmvUqiBYbKYG9PWeKNAFCN9U3f3lO7Ygc2oLfCKnKbPL VoPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=z3ntu header.b="Btyge/ZR"; 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=NONE dis=NONE) header.from=z3ntu.xyz Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o9-20020a655209000000b005194ff488d9si16500906pgp.516.2023.04.19.09.08.13; Wed, 19 Apr 2023 09:08:32 -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=@z3ntu.xyz header.s=z3ntu header.b="Btyge/ZR"; 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=NONE dis=NONE) header.from=z3ntu.xyz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233115AbjDSQAj (ORCPT + 99 others); Wed, 19 Apr 2023 12:00:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232297AbjDSQAi (ORCPT ); Wed, 19 Apr 2023 12:00:38 -0400 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F45B11A; Wed, 19 Apr 2023 09:00:37 -0700 (PDT) Received: from g550jk.localnet (unknown [62.108.10.64]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id B6E72CCC24; Wed, 19 Apr 2023 16:00:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=z3ntu.xyz; s=z3ntu; t=1681920035; bh=Kvp+y1PlgCtZ/H7c3YDNPiFv1aZtJPEuqKzBkTmEB2E=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Btyge/ZRpJOT+0+JVsBPYpXC8khmH2HpUfJI+qgJYFweAnWSPf5yzl7TdoKfcK5FT WHNl7VnV8diSwjBGwmX58RN1RsgxsBs6y4qpZ+XiCBMH6TqRCpiG4y0k5K1/OXyNWF dWjEWr9+GDBuDLeE9LEx349hO0RrkahdzXSq0zQk= From: Luca Weiss To: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Eduardo Valentin , linux-arm-msm@vger.kernel.org, Konrad Dybcio Cc: Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Craig Tatlor Subject: Re: [PATCH] ARM: dts: qcom: msm8974: correct qfprom node reg Date: Wed, 19 Apr 2023 18:00:35 +0200 Message-ID: <5664419.DvuYhMxLoT@z3ntu.xyz> In-Reply-To: <2401830.jE0xQCEvom@z3ntu.xyz> References: <20230130-msm8974-qfprom-v1-1-975aa0e5e083@z3ntu.xyz> <568ebb75-5cb2-af97-bfae-c1e1e6174a45@linaro.org> <2401830.jE0xQCEvom@z3ntu.xyz> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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: X-Mailing-List: linux-kernel@vger.kernel.org Hi Konrad, On Montag, 30. J=E4nner 2023 21:37:29 CEST Luca Weiss wrote: > On Montag, 30. J=E4nner 2023 19:42:51 CET Konrad Dybcio wrote: > > On 30.01.2023 19:36, Luca Weiss wrote: > > > On Montag, 30. J=E4nner 2023 19:30:04 CET Konrad Dybcio wrote: > > >> On 30.01.2023 19:20, luca@z3ntu.xyz wrote: > > >>> From: Craig Tatlor > > >>>=20 > > >>> The qfprom actually starts at 0xfc4b8000 instead of 0xfc4bc000 as > > >>> defined previously. Adjust the tsens offsets accordingly. > > >>>=20 > > >>> [luca@z3ntu.xyz: extract to standalone patch] > > >>>=20 > > >>> Fixes: c59ffb519357 ("arm: dts: msm8974: Add thermal zones, tsens a= nd > > >>> qfprom nodes") Signed-off-by: Craig Tatlor > > >>> Signed-off-by: Luca Weiss > > >>> --- > > >>=20 > > >> Isn't this a raw vs ecc-corrected values problem? > > >=20 > > > Not quite sure what you mean. > >=20 > > 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. >=20 > Yeah that actually seems to work... >=20 > But downstream's using this +0x4000 only for tsens it seems >=20 > <0xfc4bc000 0x1000> as "tsens_eeprom_physical" >=20 > qcom,clock-krait-8974 is using this: >=20 > <0xfc4b80b0 0x08> as "efuse" >=20 > Also seems HDMI driver is using a mix for HDCP stuff >=20 > drivers/video/msm/mdss/mdss_hdmi_util.h: >=20 > /* 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) >=20 > Any clue why Qualcomm used it this way in downstream? I'd rather not devi= ate > too much if not for a good reason... Any comments on the above? Regards Luca >=20 > Regards > Luca >=20 > > Konrad > >=20 > > > The original intention behind this patch is to allow to use the pvs f= use > > > at > > > (now) 0xb0 which was inaccessible with the former definition. > > >=20 > > > pvs: pvs@b0 { > > > =20 > > > reg =3D <0xb0 0x8>; > > > =20 > > > }; > > >=20 > > > Regards > > > Luca > > >=20 > > >> Konrad > > >>=20 > > >>> arch/arm/boot/dts/qcom-msm8974.dtsi | 12 ++++++------ > > >>> 1 file changed, 6 insertions(+), 6 deletions(-) > > >>>=20 > > >>> diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi > > >>> b/arch/arm/boot/dts/qcom-msm8974.dtsi index 8d216a3c0851..922d235c6= 065 > > >>> 100644 > > >>> --- a/arch/arm/boot/dts/qcom-msm8974.dtsi > > >>> +++ b/arch/arm/boot/dts/qcom-msm8974.dtsi > > >>> @@ -1132,16 +1132,16 @@ restart@fc4ab000 { > > >>>=20 > > >>> reg =3D <0xfc4ab000 0x4>; > > >>> =09 > > >>> }; > > >>>=20 > > >>> - qfprom: qfprom@fc4bc000 { > > >>> + qfprom: qfprom@fc4b8000 { > > >>>=20 > > >>> compatible =3D "qcom,msm8974-qfprom", > > >=20 > > > "qcom,qfprom"; > > >=20 > > >>> - reg =3D <0xfc4bc000 0x1000>; > > >>> + reg =3D <0xfc4b8000 0x7000>; > > >>>=20 > > >>> #address-cells =3D <1>; > > >>> #size-cells =3D <1>; > > >>>=20 > > >>> - tsens_calib: calib@d0 { > > >>> - reg =3D <0xd0 0x18>; > > >>> + tsens_calib: calib@40d0 { > > >>> + reg =3D <0x40d0 0x18>; > > >>>=20 > > >>> }; > > >>>=20 > > >>> - tsens_backup: backup@440 { > > >>> - reg =3D <0x440 0x10>; > > >>> + tsens_backup: backup@4440 { > > >>> + reg =3D <0x4440 0x10>; > > >>>=20 > > >>> }; > > >>> =09 > > >>> }; > > >>>=20 > > >>> --- > > >>> base-commit: 6d796c50f84ca79f1722bb131799e5a5710c4700 > > >>> change-id: 20230130-msm8974-qfprom-619c0e8f26eb > > >>>=20 > > >>> Best regards,