From patchwork Mon Dec 26 18:54:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 13081933 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C8C6C4167B for ; Mon, 26 Dec 2022 18:58:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232160AbiLZS6j (ORCPT ); Mon, 26 Dec 2022 13:58:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229908AbiLZS6i (ORCPT ); Mon, 26 Dec 2022 13:58:38 -0500 Received: from mxd.seznam.cz (mxd.seznam.cz [77.75.78.210]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E07FFE61; Mon, 26 Dec 2022 10:58:37 -0800 (PST) Received: from email.seznam.cz by smtpc-mxd-695c6957-dx4vg (smtpc-mxd-695c6957-dx4vg [2a02:598:64:8a00::1000:4c7]) id 1bb4020fad94bd541bb3bc78; Mon, 26 Dec 2022 19:57:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seznam.cz; s=szn20221014; t=1672081056; bh=NL/7VPzQpLbEfmL8j77MPiVdn47WRUJI6I8rxExWd0w=; h=Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding; b=hjn6RzKPfrp4HqGa29/jAiUeVsL0ekYI2TnVeg7K00R9J5Oga120poGmbpbYiO2KQ VKOO3yU/DK3F5Apof8PYTN2aabzEVWFf4K4zmV1yZSH5ud3uIVgik2NxT1D3bmjpeS SSC4m2wKqv6kaXfbtYWL+OulwymUYqbSyerH8FNfYt7jpZ3Be8yTXdSpGo9QLX3c2d MHIjLjTOcaWRzyp27Bi7ah6nWjBtJGk2MEDzZjuOTrLLqMN4f8uVTQJHIbi7c9zog2 LZE+rU1kFfIrp+SLIxFp/1ZK1RrMSmvnZYQ2xjgzESpxVFamOnAsNJmPLIxxojULhW 06neZPiowQ7HA== Received: from localhost.localdomain (mail.ms-free.net [185.147.46.46]) by email-relay17.ng.seznam.cz (Seznam SMTPD 1.3.140) with ESMTP; Mon, 26 Dec 2022 19:55:02 +0100 (CET) From: Petr Vorel To: linux-arm-msm@vger.kernel.org Cc: Petr Vorel , Konrad Dybcio , Andy Gross , Bjorn Andersson , Dominik Kobinski , devicetree@vger.kernel.org Subject: [PATCH 1/3] arm64: dts: qcom: msm8992-bullhead: Fix cont_splash_mem size Date: Mon, 26 Dec 2022 19:54:38 +0100 Message-Id: <20221226185440.440968-2-pevik@seznam.cz> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221226185440.440968-1-pevik@seznam.cz> References: <20221226185440.440968-1-pevik@seznam.cz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Petr Vorel Original google firmware reports 12 MiB: [ 0.000000] cma: Found cont_splash_mem@0, memory base 0x0000000003400000, size 12 MiB, limit 0xffffffffffffffff which is actually 12*1024*1024 = 0xc00000. This matches the aosp source [1]: &cont_splash_mem { reg = <0 0x03400000 0 0xc00000>; }; Fixes: 3cb6a271f4b0 ("arm64: dts: qcom: msm8992-bullhead: Fix cont_splash_mem mapping") Fixes: 976d321f32dc ("arm64: dts: qcom: msm8992: Make the DT an overlay on top of 8994") [1] https://android.googlesource.com/kernel/msm.git/+/android-7.0.0_r0.17/arch/arm64/boot/dts/lge/msm8992-bullhead.dtsi#141 Signed-off-by: Petr Vorel Reviewed-by: Konrad Dybcio --- Hi, I'm sorry for introducing a regression. Kind regards, Petr arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi b/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi index 79de9cc395c4..123ec67fb385 100644 --- a/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi @@ -2,7 +2,7 @@ /* * Copyright (c) 2015, LGE Inc. All rights reserved. * Copyright (c) 2016, The Linux Foundation. All rights reserved. - * Copyright (c) 2021, Petr Vorel + * Copyright (c) 2021-2022, Petr Vorel * Copyright (c) 2022, Dominik Kobinski */ @@ -49,7 +49,7 @@ ramoops@1ff00000 { }; cont_splash_mem: memory@3400000 { - reg = <0 0x03400000 0 0x1200000>; + reg = <0 0x03400000 0 0xc00000>; no-map; }; From patchwork Mon Dec 26 18:54:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 13081932 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 835D9C4167B for ; Mon, 26 Dec 2022 18:58:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231702AbiLZS6O (ORCPT ); Mon, 26 Dec 2022 13:58:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229908AbiLZS6O (ORCPT ); Mon, 26 Dec 2022 13:58:14 -0500 X-Greylist: delayed 165 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 26 Dec 2022 10:58:12 PST Received: from mxd.seznam.cz (mxd.seznam.cz [77.75.78.210]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B1D2F19; Mon, 26 Dec 2022 10:58:12 -0800 (PST) Received: from email.seznam.cz by smtpc-mxd-695c6957-dx4vg (smtpc-mxd-695c6957-dx4vg [2a02:598:64:8a00::1000:4c7]) id 2872a1429e521e1928751f35; Mon, 26 Dec 2022 19:55:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seznam.cz; s=szn20221014; t=1672080905; bh=sF418OTjmsBOk6rSBgdD2lu6q1BI77ExaEDILPUNV3s=; h=Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding; b=iIeQEaiNLo2iocKNYq7sujwj2NxiKO5hGqrWh4AZ94BdSckFSUAXqbWPBnOnDMZkd 20wXo20yA8J6LC5an4gTieBfUt86AmWBwK1+0dwxirIrSfPsHjylKb0M2hjiyqYcgQ 5/TLDACkYAnB2lhIDTBoGAZm4qumj9HgJMww4KbdrUDND9jGhNsJg4yUpdkaz8tKz8 ukhvfOKkDSgJj14JgabXvEnMvgNpa4k8xmREli4DOVnyJkxTMdNA6f/S07LIfI5+m3 z4d0CIziomAKw4W9TXGHTM3xQ/D51ZUFe/oh06cp3VcheLqi1+eWlgse4SjP+u9KfE WQNM28TK/Cnyg== Received: from localhost.localdomain (mail.ms-free.net [185.147.46.46]) by email-relay17.ng.seznam.cz (Seznam SMTPD 1.3.140) with ESMTP; Mon, 26 Dec 2022 19:55:04 +0100 (CET) From: Petr Vorel To: linux-arm-msm@vger.kernel.org Cc: Petr Vorel , Konrad Dybcio , Andy Gross , Bjorn Andersson , Dominik Kobinski , devicetree@vger.kernel.org Subject: [PATCH 2/3] arm64: dts: qcom: msm8992-bullhead: Disable dfps_data_mem Date: Mon, 26 Dec 2022 19:54:39 +0100 Message-Id: <20221226185440.440968-3-pevik@seznam.cz> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221226185440.440968-1-pevik@seznam.cz> References: <20221226185440.440968-1-pevik@seznam.cz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Petr Vorel It's disabled on downstream [1] thus not shown on downstream dmesg. Removing it fixes warnings on v6.1: [ 0.000000] OF: reserved mem: OVERLAP DETECTED! [ 0.000000] dfps_data_mem@3400000 (0x0000000003400000--0x0000000003401000) overlaps with memory@3400000 (0x0000000003400000--0x0000000004600000) [1] https://android.googlesource.com/kernel/msm.git/+/android-7.0.0_r0.17/arch/arm64/boot/dts/lge/msm8992-bullhead.dtsi#137 Fixes: 976d321f32dc ("arm64: dts: qcom: msm8992: Make the DT an overlay on top of 8994") Signed-off-by: Petr Vorel Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi b/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi index 123ec67fb385..4bceb362a5c0 100644 --- a/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi @@ -15,6 +15,9 @@ /* cont_splash_mem has different memory mapping */ /delete-node/ &cont_splash_mem; +/* disabled on downstream, conflicts with cont_splash_mem */ +/delete-node/ &dfps_data_mem; + / { model = "LG Nexus 5X"; compatible = "lg,bullhead", "qcom,msm8992"; From patchwork Mon Dec 26 18:54:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 13081930 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA5B8C4167B for ; Mon, 26 Dec 2022 18:55:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232227AbiLZSza (ORCPT ); Mon, 26 Dec 2022 13:55:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229591AbiLZSz3 (ORCPT ); Mon, 26 Dec 2022 13:55:29 -0500 Received: from mxd-1-a59.seznam.cz (mxd-1-a59.seznam.cz [IPv6:2a02:598:128:8a00::1000:a59]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7024AF1D; Mon, 26 Dec 2022 10:55:25 -0800 (PST) Received: from email.seznam.cz by smtpc-mxd-695c6957-5rhr5 (smtpc-mxd-695c6957-5rhr5 [2a02:598:128:8a00::1000:a59]) id 50e26152e6c2de0950e5df25; Mon, 26 Dec 2022 19:55:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seznam.cz; s=szn20221014; t=1672080907; bh=sibxaTeX9saX1pYCBEMQC2W5SKW0HvJK6JNxlYg2dcA=; h=Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding; b=Lwz9IlMjlMPjlLnJD1d7tOuGXpypDScS32DMgnbIuF4eg260VBmRm4IeZCOKmrU8L Cm+IyCMrAINph+N3zT6dNi1cqZpaL7k9oAsJBcWNU9blflLHqOVnISSB5nWaxwCHjf JwVWwneaNQaryFDUWa7ZvLR4bJtzUldLHXoANAeZFZPA7pZxNP58cRj2OY4os8mQD5 pO7I+b6iHuDnV8qcxk+qFq1qNkfNNHkMzJkiA4fytP1jMh1zQ3Yx5yo35/0LbXcrMU zFVuWrBN1WgO8HxIMZwE7HcA06/ul2XwhmTNsu205dv9XcsusMFaUlr8hYtP2SwMfH zadz1JYiEM85A== Received: from localhost.localdomain (mail.ms-free.net [185.147.46.46]) by email-relay17.ng.seznam.cz (Seznam SMTPD 1.3.140) with ESMTP; Mon, 26 Dec 2022 19:55:05 +0100 (CET) From: Petr Vorel To: linux-arm-msm@vger.kernel.org Cc: Petr Vorel , Konrad Dybcio , Andy Gross , Bjorn Andersson , Dominik Kobinski , devicetree@vger.kernel.org Subject: [PATCH 3/3] [RFC] arm64: dts: qcom: msm8992-bullhead: Fix smem_region, mpss_mem Date: Mon, 26 Dec 2022 19:54:40 +0100 Message-Id: <20221226185440.440968-4-pevik@seznam.cz> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221226185440.440968-1-pevik@seznam.cz> References: <20221226185440.440968-1-pevik@seznam.cz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Petr Vorel smem_region has a different region on downstream than on msm8994, it's defined as 150 MiB [1]: [ 0.000000] Linux version 3.10.73-g65a266a (buildkite-agent@lineageos-buildkite) (gcc version 4.9.x 20150123 (prerelease) (GCC) ) #1 SMP PREEMPT Mon Feb 24 10:43:08 UTC 2020 [ 0.000000] CPU: AArch64 Processor [410fd033] revision 3 [ 0.000000] Machine: LGE MSM8992 BULLHEAD rev-1.01 [ 0.000000] cma: Found secure_region@0, memory base 0x0000000000000000, size 150 MiB, limit 0x0000000000000000 [ 0.000000] cma: Found qsecom_region@0, memory base 0x0000000000000000, size 4 MiB, limit 0x0000000000000000 [ 0.000000] cma: Found audio_region@0, memory base 0x0000000000000000, size 4 MiB, limit 0x0000000000000000 [ 0.000000] cma: Found removed_regions@0, memory base 0x0000000000000000, size 34 MiB, limit 0x0000000000000000 [ 0.000000] cma: Found cont_splash_mem@0, memory base 0x0000000000000000, size 12 MiB, limit 0x0000000000000000 [ 0.000000] cma: Found peripheral_region@0, memory base 0x0000000000000000, size 28 MiB, limit 0x0000000000000000 [ 0.000000] cma: Found modem_region@0, memory base 0x0000000000000000, size 100 MiB, limit 0x0000000000000000 [ 0.000000] cma: Found ramoops_region@1ff00000, memory base 0x0000000000000000, size 0 MiB, limit 0x0000000000000000 [ 0.000000] cma: CMA: reserved 152 MiB at 0x0000000000000000 for secure_mem [ 0.000000] cma: CMA: reserved 4 MiB at 0x0000000000000000 for qseecom_mem [ 0.000000] cma: CMA: reserved 4 MiB at 0x0000000000000000 for audio_mem [ 0.000000] cma: CMA: reserved 34 MiB at 0x0000000000000000 for memory_hole [ 0.000000] cma: CMA: reserved 12 MiB at 0x0000000000000000 for cont_splash_mem [ 0.000000] cma: CMA: reserved 28 MiB at 0x0000000000000000 for peripheral_mem [ 0.000000] cma: CMA: reserved 100 MiB at 0x0000000000000000 for modem_mem [ 0.000000] cma: CMA: reserved 0 MiB at 0x0000000000000000 for ramoops_mem [ 0.000000] cma: CMA: reserved 16 MiB at 0x0000000000000000 for default region [ 0.000000] PERCPU: Embedded 15 pages/cpu @0000000000000000 s38912 r0 d22528 u61440 But that conflicts with cont_splash_mem and cont_splash_mem: [ 0.000000] Linux version 6.1.1 (pevik@dell5510) (aarch64-linux-gnu-gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for De2 [ 0.000000] Machine model: LG Nexus 5X rev 1.01 ... [ 0.000000] OF: fdt: Reserved memory: failed to reserve memory for node 'smem_region@0': base 0x0000000000000000, size 150 MiB [ 0.000000] OF: reserved mem: OVERLAP DETECTED! [ 0.000000] smem_region@0 (0x0000000000000000--0x0000000009600000) overlaps with memory@3400000 (0x0000000003400000--0x000000000400000) [ 0.000000] OF: reserved mem: OVERLAP DETECTED! [ 0.000000] reserved@5000000 (0x0000000005000000--0x0000000007200000) overlaps with memory@7000000 (0x0000000007000000--0x000000000ca0) 1) Obviously there are more memory to be fixed, e.g. modem_mem, but fundamental is to find out whether such a big mapping should be really used. If yes, what is the trick downstream uses, that it allows overlapped memory? Or memory is not really overlapping and I cannot trust the reported value? What base and size should I define then? Angler downstream defines crazy values for secure_mem as well [2]: [ 0.000000] cma: Found secure_region@0, memory base 0x0000000000000000, size 300 MiB, limit 0xffffffffffffffff But then in mainline is defined just 2 MiB at 106 MiB: smem_mem: smem_region@6a00000 { reg = <0 0x06a00000 0 0x200000>; no-map; }; => should I use just 2 MiB region? But at what base? 2) Is mpss_mem equivalent of downstream modem_mem [3]? Kind regards, Petr [1] https://android.googlesource.com/kernel/msm.git/+/refs/tags/android-7.0.0_r0.17/arch/arm/boot/dts/qcom/msm8992.dtsi#278 [2] https://android.googlesource.com/kernel/msm.git/+/refs/tags/android-7.0.0_r0.17/arch/arm/boot/dts/qcom/msm8994.dtsi#272 [3] https://android.googlesource.com/kernel/msm.git/+/android-7.0.0_r0.17/arch/arm64/boot/dts/lge/msm8992-bullhead.dtsi#148 Not-Yet-Signed-off-by: Petr Vorel Signed-off-by: Petr Vorel --- arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi b/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi index 4bceb362a5c0..fb4879b4acbe 100644 --- a/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi @@ -12,8 +12,9 @@ #include "pm8994.dtsi" #include "pmi8994.dtsi" -/* cont_splash_mem has different memory mapping */ +/* different memory mapping */ /delete-node/ &cont_splash_mem; +/delete-node/ &smem_mem; /* disabled on downstream, conflicts with cont_splash_mem */ /delete-node/ &dfps_data_mem; @@ -60,6 +61,11 @@ removed_region: reserved@5000000 { reg = <0 0x05000000 0 0x2200000>; no-map; }; + + smem_mem: smem_region@0 { + reg = <0 0 0 0x9600000>; + no-map; + }; }; };