From patchwork Mon Dec 19 13:19:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 635180 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 C4BB3C3DA7A for ; Mon, 19 Dec 2022 13:19:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231739AbiLSNT3 (ORCPT ); Mon, 19 Dec 2022 08:19:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232054AbiLSNT1 (ORCPT ); Mon, 19 Dec 2022 08:19:27 -0500 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E695FCF8 for ; Mon, 19 Dec 2022 05:19:24 -0800 (PST) Received: by mail-lf1-x134.google.com with SMTP id m29so13372339lfo.11 for ; Mon, 19 Dec 2022 05:19:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=U4m7sigmBhYBgKY9HRGSI2miJ1dbHGKyOlPCPQtX404=; b=XSbVyrCX/Fg7rgQ2d1UDfvTwgV8SobdDnfIzHyRafjtEBGGnqBArLiPUQDG2Ox7OT0 kYmFaZ+T/urCGF8kYSejmPpyO/i6LPgBNu3AwneFTBjlnZKiPnnJ4fSM/Fbm4NpiSBBU e1dLAr8eAUz/jDBnTJXWUa5r31EWoy9nYPklZrEkuXh0LM9BvcrMn9y47IGcomhTA+Z1 G/DYfp64lORHBkeQpVlob3ST8LLQRk0uBRHckUZAPDviAuWCxVeAmP3f3P0/prZCJff6 B73J/4P5onkG0FWFblcPBvmW6xh3IHzSu4T2rGwrOMwNWWz59wwi3aNkDobRBUyHQFRP 8agg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=U4m7sigmBhYBgKY9HRGSI2miJ1dbHGKyOlPCPQtX404=; b=KHTSaJQdt/XFwhomEmEtj895seCZNGkPBlhzkaQgx2JMMUdHl7jTfPz7d+/opGxmTu org23Pp9td/lQTQ3C0e6vBkc46xplj4IT+L+LWXGQJjxzl89pVhaVP5BDEVA/+CWG+d0 mU1GiCjKmwEjzswxVaWWByO67G0ysE/Ij4ONfpeYjlZ84CBIqCOWm8JNmSxyhg4PG6iT LGClamTOCCq9Gq0XO/ZpLrCYYk28bPV7ukdMcrH4ea2a0/IfAKsFzNpESIZsI/dKCjRq TpD8Yn2G/43sCukKwD2pLuLibCQUd681iyMPJfYMCIkMvpSlIYLh2/5qEv/hDXq7FREz 3kBw== X-Gm-Message-State: ANoB5pmY0P5XXbgMCA46bPUEjIcet58Gd2c0M+bH0StTSprqud1eJuiY WpklCflV7sZTI5RklYBuxEsi3bCpv9SidNVa X-Google-Smtp-Source: AA0mqf4/CC3d17R/ex5wGel8ruP1CZZ00EcwlgQyc7QkMKeA6GwrCjJAv0mvCALUCLbiWtUr0YC2bw== X-Received: by 2002:a05:6512:468:b0:4b5:5efe:966e with SMTP id x8-20020a056512046800b004b55efe966emr11886555lfd.15.1671455962187; Mon, 19 Dec 2022 05:19:22 -0800 (PST) Received: from localhost.localdomain (abxh44.neoplus.adsl.tpnet.pl. [83.9.1.44]) by smtp.gmail.com with ESMTPSA id z15-20020a056512370f00b004b581ab4c77sm1099501lfr.78.2022.12.19.05.19.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Dec 2022 05:19:21 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Eugene Lepshy , Rob Herring , Krzysztof Kozlowski , Jeremy McNicoll , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] arm64: dts: qcom: msm8992: Don't use sfpb mutex Date: Mon, 19 Dec 2022 14:19:17 +0100 Message-Id: <20221219131918.446587-1-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org MSM8992 uses the same mutex hardware as MSM8994. This was wrong from the start, but never presented as an issue until the sfpb compatible was given different driver data. Fixes: 6a6d1978f9c0 ("arm64: dts: msm8992 SoC and LG Bullhead (Nexus 5X) support") Reported-by: Eugene Lepshy Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/msm8992.dtsi | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8992.dtsi b/arch/arm64/boot/dts/qcom/msm8992.dtsi index 10adb4986ef1..02fc3795dbfd 100644 --- a/arch/arm64/boot/dts/qcom/msm8992.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8992.dtsi @@ -37,10 +37,6 @@ &rpmcc { compatible = "qcom,rpmcc-msm8992", "qcom,rpmcc"; }; -&tcsr_mutex { - compatible = "qcom,sfpb-mutex"; -}; - &timer { interrupts = , , From patchwork Mon Dec 19 13:19:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 635745 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 F380DC46467 for ; Mon, 19 Dec 2022 13:19:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231926AbiLSNTb (ORCPT ); Mon, 19 Dec 2022 08:19:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232080AbiLSNT3 (ORCPT ); Mon, 19 Dec 2022 08:19:29 -0500 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10786FD25 for ; Mon, 19 Dec 2022 05:19:26 -0800 (PST) Received: by mail-lf1-x133.google.com with SMTP id q6so13563607lfm.10 for ; Mon, 19 Dec 2022 05:19:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PuTm8winyF6vQ9ZUYWHIldSVWTLw8cyqmI/px190J20=; b=dyUWL/VRrHv39/YQyes7wxUz7DJGIuejeh7WTRpPTtcolJc5xaDKqFzMorIAv3y+Vj U0EEO+B4rX8CSLCgAf+4z7rBHp9u95Hochvs3wUy8QS0tpqBbwUJ7UwqBSeXi7CmLk7N MDiVdDSc0+HnskRKbXBBQUD6ekAlS7s6NLF3f5sELfYYL1DW3v28pHdLCf3wACKoYeWH IF+kkHhDqFtJiApvXo9OnM6EQUnqwqL0QBH8xyBMCl4ewfu7jJKhf0T9rfB87yxEd2Uy krAfXcAABsUivSXvAxCBkkilvoN65JNabt2K6o/4n3fKTS/ljES0rrD+Ty3gniN3drIZ CFWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PuTm8winyF6vQ9ZUYWHIldSVWTLw8cyqmI/px190J20=; b=Pqyv5hJpt+BE9pcFkA11TKBQYnKbGE434XpFoXhReI9BFlBldVQUM9SpFYHHjQytTw VXoZfFwud4nOcmLkcdbDDMcQu69OimMg/ihYCDP5DoN0HNaMn7iaiywFQHLZT+yEnzMX O0C+zLPN+G57afmRvEl7smtJgF+UkxV4ni53yRK0VWy4f+jpavG+ZuVt0d3sJ+XoOg2q HfkjhJY0tj/0NI2U8HME4K/hREooMBc/54KAXrV8GXhBU+o1Vev7FhnwNEPbw2eLjW4G BkIrKln0VDE3CPWSBd6ORH1zXLv6S6Stk1FmGTYAxQs5JBahJlUE/L6zN+IeHmEu2BwP M51g== X-Gm-Message-State: ANoB5pl0dYShovuIYn+J8EgZ9WqptOTzs9wDUtOUGDbpbb/qjMI3UXeb Ba0/KjBhnkIOls9jJ5K4EGSqaU1aUtUgdtAH X-Google-Smtp-Source: AA0mqf7o8ZFA4nXhz2FfebZRlhT7eYPDcMN43kI9LXbZdTusfoCm+jEO8ImJ2S5EHRHZ7ECcM9Lxdw== X-Received: by 2002:a05:6512:3772:b0:4b5:7762:5df2 with SMTP id z18-20020a056512377200b004b577625df2mr11434689lft.36.1671455963943; Mon, 19 Dec 2022 05:19:23 -0800 (PST) Received: from localhost.localdomain (abxh44.neoplus.adsl.tpnet.pl. [83.9.1.44]) by smtp.gmail.com with ESMTPSA id z15-20020a056512370f00b004b581ab4c77sm1099501lfr.78.2022.12.19.05.19.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Dec 2022 05:19:23 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Eugene Lepshy , Rob Herring , Krzysztof Kozlowski , Jeremy McNicoll , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Kees Cook , Tony Luck , "Guilherme G. Piccoli" , linux-hardening@vger.kernel.org Subject: [PATCH 2/2] arm64: dts: qcom: msm8992-libra: Fix the memory map Date: Mon, 19 Dec 2022 14:19:18 +0100 Message-Id: <20221219131918.446587-2-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221219131918.446587-1-konrad.dybcio@linaro.org> References: <20221219131918.446587-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The memory map was wrong. Fix it to prevent the device from randomly rebooting. Fixes: 0f5cdb31e850 ("arm64: dts: qcom: Add Xiaomi Libra (Mi 4C) device tree") Signed-off-by: Konrad Dybcio --- .../boot/dts/qcom/msm8992-xiaomi-libra.dts | 77 +++++++++++++++---- 1 file changed, 60 insertions(+), 17 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8992-xiaomi-libra.dts b/arch/arm64/boot/dts/qcom/msm8992-xiaomi-libra.dts index b242c272d2af..fcca1ba94da6 100644 --- a/arch/arm64/boot/dts/qcom/msm8992-xiaomi-libra.dts +++ b/arch/arm64/boot/dts/qcom/msm8992-xiaomi-libra.dts @@ -11,6 +11,12 @@ #include #include +/delete-node/ &adsp_mem; +/delete-node/ &audio_mem; +/delete-node/ &mpss_mem; +/delete-node/ &peripheral_region; +/delete-node/ &rmtfs_mem; + / { model = "Xiaomi Mi 4C"; compatible = "xiaomi,libra", "qcom,msm8992"; @@ -70,25 +76,67 @@ reserved-memory { #size-cells = <2>; ranges; - /* This is for getting crash logs using Android downstream kernels */ - ramoops@dfc00000 { - compatible = "ramoops"; - reg = <0x0 0xdfc00000 0x0 0x40000>; - console-size = <0x10000>; - record-size = <0x10000>; - ftrace-size = <0x10000>; - pmsg-size = <0x20000>; + memory_hole: hole@6400000 { + reg = <0 0x06400000 0 0x600000>; + no-map; + }; + + memory_hole2: hole2@6c00000 { + reg = <0 0x06c00000 0 0x2400000>; + no-map; + }; + + mpss_mem: mpss@9000000 { + reg = <0 0x09000000 0 0x5a00000>; + no-map; + }; + + tzapp: tzapp@ea00000 { + reg = <0 0x0ea00000 0 0x1900000>; + no-map; + }; + + mdm_rfsa_mem: mdm-rfsa@ca0b0000 { + reg = <0 0xca0b0000 0 0x10000>; + no-map; + }; + + rmtfs_mem: rmtfs@ca100000 { + compatible = "qcom,rmtfs-mem"; + reg = <0 0xca100000 0 0x180000>; + no-map; + + qcom,client-id = <1>; }; - modem_region: modem_region@9000000 { - reg = <0x0 0x9000000 0x0 0x5a00000>; + audio_mem: audio@cb400000 { + reg = <0 0xcb000000 0 0x400000>; + no-mem; + }; + + qseecom_mem: qseecom@cb400000 { + reg = <0 0xcb400000 0 0x1c00000>; + no-mem; + }; + + adsp_rfsa_mem: adsp-rfsa@cd000000 { + reg = <0 0xcd000000 0 0x10000>; no-map; }; - tzapp: modem_region@ea00000 { - reg = <0x0 0xea00000 0x0 0x1900000>; + sensor_rfsa_mem: sensor-rfsa@cd010000 { + reg = <0 0xcd010000 0 0x10000>; no-map; }; + + ramoops@dfc00000 { + compatible = "ramoops"; + reg = <0 0xdfc00000 0 0x40000>; + console-size = <0x10000>; + record-size = <0x10000>; + ftrace-size = <0x10000>; + pmsg-size = <0x20000>; + }; }; }; @@ -130,11 +178,6 @@ &blsp2_uart2 { status = "okay"; }; -&peripheral_region { - reg = <0x0 0x7400000 0x0 0x1c00000>; - no-map; -}; - &pm8994_spmi_regulators { VDD_APC0: s8 { regulator-min-microvolt = <680000>;