From patchwork Mon Sep 11 17:41:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13379953 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 0F938CA0EC0 for ; Mon, 11 Sep 2023 21:26:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343833AbjIKVMt (ORCPT ); Mon, 11 Sep 2023 17:12:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243769AbjIKRmR (ORCPT ); Mon, 11 Sep 2023 13:42:17 -0400 Received: from mo4-p01-ob.smtp.rzone.de (mo4-p01-ob.smtp.rzone.de [85.215.255.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13104CE; Mon, 11 Sep 2023 10:42:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694454122; cv=none; d=strato.com; s=strato-dkim-0002; b=XOhVEomkO2KtspCvui5R+lw/tBgeDwWv6+/7mz8HQA8dMw2kM9V80s/quyucNrPcfI CszpN3VWMDys+SSGQ1RjGSJoNzrLlsiFImaQU//7Ja79LfH0QaxWP5vmpqGHPqKYf4+k pkM/Kya5ofPsXYZvlnHQosd+wHU9beRMPKQtDBVH8qKpkiD4i8jeU0Z0sxdLC/A1fUA9 deBNm6dFKuBc5bXaLZs3+SY710A9tfzYOvDgYTJ14/2e6nrN9icqzy3+kx/CT8Q2kZXE pt6XZvF0cWU/RUTs6p57QGrTlB1R4RiiIYVL+lgxg4+MGYBXrSUMUruAHlGeKAlo40sN +h9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1694454122; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=4pQuP3sI5WLCQf048Q7dFj6HEPnKaK4qRToh3MKGbFY=; b=SCVv+zAEN8pskdSByR1Z0O8VLzyPZ3wn8180teqGstsveWX765wFcCGOP5UYA4z3u7 bxvW9+2FxeiIBy0fvYeQH/7qMj2ckYTUIOffq1I1mOcQGvqVz93l/dd0TB7FFotkQ3xW TahLddEyWqzGPyLEzst+WJhg3Dwn6THrdhkQ3k7KFPjpEwvRSJhmhuU5VBYUK8AmVly+ kIsGBPIRPkSqPC70q7Q2rsIP8g8Syz+s2opT9Wv/nFvam/ELwBkiqG2yh6oVljWArcxc a7zh8m3RNf5Rr7qRDWL4scVL5NcBY+l42oYd/rFHswtchHrOGYZN1KoCRyZxNLaxJwPH oPzg== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo01 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1694454122; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=4pQuP3sI5WLCQf048Q7dFj6HEPnKaK4qRToh3MKGbFY=; b=ZjvACTKqtVouxsbATtaveTQZe4J7zWildWqlaIkQFpZh3Ks380FJqyVogC6ecsag1m EekChMCnHzvLKVD25tSViFGCkn0hCf00e7syc4CLlgSivZIJqfoF0fNpDmID4WYeH+3Y lGlps3DVjmXNrfgkDillzua3f/UYI57Dc8bMwxZzp+Wc9jOj19oASYtWkFLb3YU6n/cp VP9+itba10TJ6jfkPz/qZ4Bbt+3ejNN46bf2I5kfKGmoMkDHqGBjq/eVzZXM2I9AqDKh +SgHg/iac3mlCF5lsdfHJsmVcXMVnC+XrBWT+/Fb7Yl6YsgfrlOzmUXGlbOzhU4Sz/ho 7C6w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1694454122; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=4pQuP3sI5WLCQf048Q7dFj6HEPnKaK4qRToh3MKGbFY=; b=gdY7MP6yrDSXrpt/bqE472QkRexCIXb5fJyXA8GDisKSYYupdWP2xw0ElmdF4tu5s+ S5kOx4XMrErFEkJHG1BQ== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4l38TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id 60372az8BHg2awL (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 11 Sep 2023 19:42:02 +0200 (CEST) From: Stephan Gerhold Date: Mon, 11 Sep 2023 19:41:43 +0200 Subject: [PATCH 1/9] arm64: dts: qcom: msm8916: Disable venus by default MIME-Version: 1.0 Message-Id: <20230911-msm8916-rmem-v1-1-b7089ec3e3a1@gerhold.net> References: <20230911-msm8916-rmem-v1-0-b7089ec3e3a1@gerhold.net> In-Reply-To: <20230911-msm8916-rmem-v1-0-b7089ec3e3a1@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Stephan Gerhold X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Venus needs firmware that is usually signed with a device-specific key. There are also devices that might not need it (especially during bring-up), so let's follow more recent SoCs and disable it by default. Enable it explicitly for all current devices except msm8916-mtp. That one has just UART enabled currently so it cannot really benefit from Venus. Signed-off-by: Stephan Gerhold Reviewed-by: Bryan O'Donoghue --- arch/arm64/boot/dts/qcom/apq8016-sbc.dts | 4 ++++ arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts | 4 ++++ arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts | 4 ++++ arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts | 4 ++++ arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts | 4 ++++ arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts | 4 ++++ arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts | 4 ++++ arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts | 4 ++++ arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi | 4 ++++ arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi | 4 ++++ arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi | 4 ++++ arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts | 4 ++++ arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi | 4 ++++ arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts | 4 ++++ arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +- 15 files changed, 57 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts index 4f5541e9be0e..c13230217c3c 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts @@ -364,6 +364,10 @@ &usb_hs_phy { extcon = <&usb_id>; }; +&venus { + status = "okay"; +}; + &wcnss { status = "okay"; firmware-name = "qcom/apq8016/wcnss.mbn"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts b/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts index 84723c9b73b4..1d1af1260938 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts @@ -155,6 +155,10 @@ &usb_hs_phy { extcon = <&usb_id>; }; +&venus { + status = "okay"; +}; + &wcnss { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts b/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts index 47da738661bf..e130f19fdccf 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts @@ -192,6 +192,10 @@ &usb_hs_phy { extcon = <&usb_id>; }; +&venus { + status = "okay"; +}; + &wcnss { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts b/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts index 92f695481769..6f38e765ed3c 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts @@ -160,6 +160,10 @@ &usb_hs_phy { extcon = <&usb_id>; }; +&venus { + status = "okay"; +}; + &wcnss { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts b/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts index 4aeeee24cedc..1d1113958625 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts @@ -150,6 +150,10 @@ &usb_hs_phy { extcon = <&usb_id>; }; +&venus { + status = "okay"; +}; + &wcnss { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts b/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts index 484e488a5eca..c46df67b4d10 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts @@ -328,6 +328,10 @@ &usb_hs_phy { extcon = <&usb_id>; }; +&venus { + status = "okay"; +}; + &wcnss { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts index 3892ad4f639a..a0bb8de54fb6 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts @@ -259,6 +259,10 @@ &usb_hs_phy { extcon = <&pm8916_usbin>; }; +&venus { + status = "okay"; +}; + &wcnss { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts index d73294af1a06..919677969b3e 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts @@ -146,6 +146,10 @@ &usb_hs_phy { extcon = <&usb_id>; }; +&venus { + status = "okay"; +}; + &wcnss { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi index 019bf73178fa..5f78004a24bd 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi @@ -284,6 +284,10 @@ &usb_hs_phy { extcon = <&muic>; }; +&venus { + status = "okay"; +}; + &tlmm { accel_int_default: accel-int-default-state { pins = "gpio115"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi index 54d648972d35..06602db25e5f 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi @@ -158,6 +158,10 @@ &usb_hs_phy { extcon = <&pm8916_usbin>; }; +&venus { + status = "okay"; +}; + &wcnss { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi index cb0e4a7faf91..9897089d2243 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi @@ -138,6 +138,10 @@ &usb_hs_phy { extcon = <&muic>; }; +&venus { + status = "okay"; +}; + &wcnss { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts index eaf877378937..286ba7bb2b5a 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts @@ -359,6 +359,10 @@ &usb_hs_phy { extcon = <&muic>; }; +&venus { + status = "okay"; +}; + &wcnss { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi index 004a129a2ee2..c759c0544dd9 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi @@ -115,6 +115,10 @@ &usb_hs_phy { extcon = <&pm8916_usbin>; }; +&venus { + status = "okay"; +}; + &wcnss { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts index 8e238976ab1c..82ed50610b24 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts @@ -189,6 +189,10 @@ &usb_hs_phy { extcon = <&usb_id>; }; +&venus { + status = "okay"; +}; + &wcnss { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 33fb65d73104..f093ab83938d 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -1797,7 +1797,7 @@ venus: video-codec@1d00000 { clock-names = "core", "iface", "bus"; iommus = <&apps_iommu 5>; memory-region = <&venus_mem>; - status = "okay"; + status = "disabled"; video-decoder { compatible = "venus-decoder"; From patchwork Mon Sep 11 17:41:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13379836 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 607C1CA0EC3 for ; Mon, 11 Sep 2023 21:18:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241505AbjIKVKZ (ORCPT ); Mon, 11 Sep 2023 17:10:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243770AbjIKRmS (ORCPT ); Mon, 11 Sep 2023 13:42:18 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00955CF; Mon, 11 Sep 2023 10:42:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694454122; cv=none; d=strato.com; s=strato-dkim-0002; b=l5I2ENrYi6G07PG5/vyOfElCYpYYv4JP6NQpStcDR0AhkXYy0iXLbEQYVWFtj/dmlk LVuyQ0qenwY4GezmAxy8psGQy0/aaVkH40iYcoF5ZWo+niS9Ylw+JqDX6mcnpCYqYMlE sR2hmrC2DnncY+8hahU8wt5+JLbpKqa18pVAQ0KtGC9aYKHHkLw5XB33XEXK/ZllPAgn yPw6pLzvwYw6g9zdZZ5rff5gVFJIBYTuIh70/jsU7AK2pHjr/GuWdk5Z8ew+cj5CpdzZ VIUBqZ97hmmBf9ReSoSp25OR1/gIiqLJzZro71YKDeETN7Pe3p1coVzLRXeYLQxwHRL9 pXoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1694454122; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=dW9YirrLJkurT02lSzzl3uY0O9p2Eb+8xKry61dJ4Wk=; b=kLnbAx2yY+5POTDRNdSBUcIoVFfmH6x6qyVjA2Q76M44gBOQculOObU+5Eq6OVfT8u 3aK84s82bUg1hOZAYzCu01RFBF2N/VczAVj74uYuT9i6gwYjGJrccRvnGorDH69P97bW ZVWppxf+1ooxObi95XeO4fL+26bxn7LYyavZoLYhmqGVHcyaiz39fSg0wgwYe5EJCh/C ch3vpmynbtc+hnKffmdH/DB4dGs1tfyTeLRKNCsbnK5OknxKHXa6vivPArkRDEHmSf/p gTPNiJsO90s5pyk8cx7dENHFJ+S1a0jexuYQC+cfiCVYNOhrzHJzt/tiHnkA5jGfHbWk C4jA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1694454122; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=dW9YirrLJkurT02lSzzl3uY0O9p2Eb+8xKry61dJ4Wk=; b=C7q7Z7FmmkzY9pZPeCQsiOasQpz9pYn7gtFZUDmb997x+JFXCkp2IAw7BZDHUCfxVk /Gd3x5qs6Jqz/0DY+DrKTDjbnu8QVgO5OMzqcfw51GU3GVlqDRlOvWyhg7dEcIt9xODO zUiUWWXKZYEU25+5+gpVFbPN7+p93ZD564duhH0s5W6gllOmLazKMvMGL9dZ4xJHitm9 JBr7DAqz6Zww4g2g8mg3LIEBo41BEn2AhirDdrr2mcOSA82gFSHGYuAj15DIoU+NCTex Ne/lga1rSE8MUKYAhXpFCitOOTROyNbMV1aWYut08zqVXNK0a38b4GtI2FyXsjFL49OV zbfA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1694454122; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=dW9YirrLJkurT02lSzzl3uY0O9p2Eb+8xKry61dJ4Wk=; b=yYR7J5HQRuzYW5zy/wEoUz92ghM0g/paZpimiv8tsH+GYmY9ftm3k1xyV8fQcn22uL iNwbZRkuvKSODBTcscDg== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4l38TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id 60372az8BHg2awM (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 11 Sep 2023 19:42:02 +0200 (CEST) From: Stephan Gerhold Date: Mon, 11 Sep 2023 19:41:44 +0200 Subject: [PATCH 2/9] arm64: dts: qcom: msm8916/39: Disable GPU by default MIME-Version: 1.0 Message-Id: <20230911-msm8916-rmem-v1-2-b7089ec3e3a1@gerhold.net> References: <20230911-msm8916-rmem-v1-0-b7089ec3e3a1@gerhold.net> In-Reply-To: <20230911-msm8916-rmem-v1-0-b7089ec3e3a1@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Stephan Gerhold X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org MSM8916/39 do not need signed GPU firmware so it is generally okay to have it enabled by default. However, currently the GPU does not work without also enabling MDSS and it's questionable if someone would really need it without a display in practice. For consistency let's follow newer SoCs and disable the GPU by default. Enable it for all existing devices that already have &mdss enabled. Signed-off-by: Stephan Gerhold Reviewed-by: Bryan O'Donoghue --- arch/arm64/boot/dts/qcom/apq8016-sbc.dts | 4 ++++ arch/arm64/boot/dts/qcom/apq8039-t2.dts | 4 ++++ arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi | 4 ++++ arch/arm64/boot/dts/qcom/msm8916.dtsi | 3 ++- arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts | 4 ++++ arch/arm64/boot/dts/qcom/msm8939.dtsi | 3 ++- 6 files changed, 20 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts index c13230217c3c..bd68f4793acd 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts @@ -230,6 +230,10 @@ &camss { status = "okay"; }; +&gpu { + status = "okay"; +}; + &lpass { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/apq8039-t2.dts b/arch/arm64/boot/dts/qcom/apq8039-t2.dts index 027d1da7e81d..f591d6e78d6e 100644 --- a/arch/arm64/boot/dts/qcom/apq8039-t2.dts +++ b/arch/arm64/boot/dts/qcom/apq8039-t2.dts @@ -131,6 +131,10 @@ &blsp_uart2 { status = "okay"; }; +&gpu { + status = "okay"; +}; + &lpass { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi index 5f78004a24bd..15d2486cdb45 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi @@ -239,6 +239,10 @@ &blsp_uart2 { status = "okay"; }; +&gpu { + status = "okay"; +}; + &mdss { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index f093ab83938d..0257cbbb4971 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -1750,7 +1750,7 @@ cci_i2c0: i2c-bus@0 { }; }; - gpu@1c00000 { + gpu: gpu@1c00000 { compatible = "qcom,adreno-306.0", "qcom,adreno"; reg = <0x01c00000 0x20000>; reg-names = "kgsl_3d0_reg_memory"; @@ -1773,6 +1773,7 @@ gpu@1c00000 { power-domains = <&gcc OXILI_GDSC>; operating-points-v2 = <&gpu_opp_table>; iommus = <&gpu_iommu 1>, <&gpu_iommu 2>; + status = "disabled"; gpu_opp_table: opp-table { compatible = "operating-points-v2"; diff --git a/arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts b/arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts index 89b6aebba404..cb893345c44b 100644 --- a/arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts +++ b/arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts @@ -39,6 +39,10 @@ usb_id: usb-id { }; }; +&gpu { + status = "okay"; +}; + &mdss { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/msm8939.dtsi b/arch/arm64/boot/dts/qcom/msm8939.dtsi index 6e24f0f2374f..b0a64e468629 100644 --- a/arch/arm64/boot/dts/qcom/msm8939.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8939.dtsi @@ -1395,7 +1395,7 @@ mdss_dsi1_phy: phy@1aa0300 { }; }; - gpu@1c00000 { + gpu: gpu@1c00000 { compatible = "qcom,adreno-405.0", "qcom,adreno"; reg = <0x01c00000 0x10000>; reg-names = "kgsl_3d0_reg_memory"; @@ -1418,6 +1418,7 @@ gpu@1c00000 { power-domains = <&gcc OXILI_GDSC>; operating-points-v2 = <&opp_table>; iommus = <&gpu_iommu 1>, <&gpu_iommu 2>; + status = "disabled"; opp_table: opp-table { compatible = "operating-points-v2"; From patchwork Mon Sep 11 17:41:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13379856 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 9C4D2CA0EC4 for ; Mon, 11 Sep 2023 21:19:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343575AbjIKVLy (ORCPT ); Mon, 11 Sep 2023 17:11:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243771AbjIKRmS (ORCPT ); Mon, 11 Sep 2023 13:42:18 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20809DD; Mon, 11 Sep 2023 10:42:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694454122; cv=none; d=strato.com; s=strato-dkim-0002; b=N+TVBgIMChzsBZC3X8e8tF6LFurwrcV9H4sAi16wP5rwpYNDgx0cS8Ll+kVPQXwNne bomDRWC/Tk6yPye9riPSXcOnwJPrqAO87g/HTFxBMIJUstqb1Tp312sZxdi/asrrLKp8 5lqbKgXjOl4C1sgoe5VvULGyOLTZljkM4lySYlC/mRABcuDBXYtXXHRUfA/TvbDwv3D8 jRC6wqQ7v3ILJLrxFh+pruzedRp15Fr29tjB06FCuhellMpEqyciHtfiuLUAm2j77ScS I3IsNP0UhRp29+MG075qo+kyiJJedxmp1wivjS8oKDhFsyvdJZdHLqYrlWyiMmnIfMck loZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1694454122; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=sj0xOwwGDhfTex5d/nIzyWMG4KtbTUJUlLMa7VStVX0=; b=mXvELaDCNUlDWrdjiJA24pnEkthpAbJIktMa/eoHwX9/XHLqmVDwQV60EkVV4gk2wB 6YrQ1tFKllPwoleXksuRaKrS2JtfMOkVGPB9tIDeB728z+YocjtYT2/wGlTGXnmfmIrW VJfJjzUNyhw9heYpTksSy4qJ60jhcrm+CmIfJsLgms27hALnIMmwdGnNY4M3JjDAu+Jv jrCu+cvxdIN5Fd6RV0nblriK1oBIfkwTQoCucTX8275O1HX/UQ6Q8T2YNnEGpEL1TK8w WzDQcJdpzvxQsBIlDOrHRpeKG4/R8XfMzzylhgonyl4roZcfMrNMhmDxbUzmtEo3IfNg nJ0Q== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1694454122; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=sj0xOwwGDhfTex5d/nIzyWMG4KtbTUJUlLMa7VStVX0=; b=dNoWz1K3EZ/2kh+w1mls3jZ6T0RTa3TacGvuHNBBF4o50lo7Kwon0Q6q5KOJsWLy4N dYkVkYKpYEMYp2uF2U6ZA1Inu+HQ6J07+6nqdHrz3n8EAmKZ3EJOVbUD7KsuTcPpMMru jfkNk5FnEliNBmYohb73hol8vC0klxOnU6xm4cdCYxyV0bfbiUMUXWeXEDMIBRlf1YxU +qibEhO6gBSUFgDWV9esdmlmfW+O76S19z0DcdGDENwQWuXkPCCLTAl5yJrwoyPzL6Df KwfuZ/r7JQrBy21AkYtTgQ8WJjnzJHOn4Dfh7cXhlCf7e5SHT6D5UCUIL8TTGTp18xmG eShg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1694454122; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=sj0xOwwGDhfTex5d/nIzyWMG4KtbTUJUlLMa7VStVX0=; b=33/99UBYStpOUYO0vR8YtdjMeMV5KPgSsotHpIfo6I5ucD7cJjWCS5/g8Djy75DpyP 90Gu13Gk/T2ajBEo7iAQ== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4l38TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id 60372az8BHg2awN (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 11 Sep 2023 19:42:02 +0200 (CEST) From: Stephan Gerhold Date: Mon, 11 Sep 2023 19:41:45 +0200 Subject: [PATCH 3/9] arm64: dts: qcom: msm8916-ufi: Drop gps_mem for now MIME-Version: 1.0 Message-Id: <20230911-msm8916-rmem-v1-3-b7089ec3e3a1@gerhold.net> References: <20230911-msm8916-rmem-v1-0-b7089ec3e3a1@gerhold.net> In-Reply-To: <20230911-msm8916-rmem-v1-0-b7089ec3e3a1@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Stephan Gerhold X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org gps_mem is needed by the modem firmware for GPS to work. However, it is accessed via QMI memshare [1] which is not available upstream yet. Until it lands upstream reserving this does not provide any advantage. [1]: https://lore.kernel.org/linux-arm-msm/20210319172321.22248-1-nikitos.tr@gmail.com/ Signed-off-by: Stephan Gerhold Reviewed-by: Bryan O'Donoghue --- arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi | 5 ----- 1 file changed, 5 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi index c759c0544dd9..69f268db4df9 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi @@ -22,11 +22,6 @@ mpss_mem: mpss@86800000 { reg = <0x0 0x86800000 0x0 0x5500000>; no-map; }; - - gps_mem: gps@8bd00000 { - reg = <0x0 0x8bd00000 0x0 0x200000>; - no-map; - }; }; gpio-keys { From patchwork Mon Sep 11 17:41:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13379891 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 0F421CA0ECA for ; Mon, 11 Sep 2023 21:20:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344218AbjIKVNe (ORCPT ); Mon, 11 Sep 2023 17:13:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243775AbjIKRmT (ORCPT ); Mon, 11 Sep 2023 13:42:19 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [81.169.146.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 308E61BB; Mon, 11 Sep 2023 10:42:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694454123; cv=none; d=strato.com; s=strato-dkim-0002; b=eTb0gE9hU8uBDBkpRRFbKGEuQ2RS1XoW45bbfW/aqGrghAmUJqN27msK+Sn7jDYL9j OF/Xo9bjunBJXqDX1RYIdsxHsnKxKJyMEt01k7OL8zhRpkU/7FaX0PblT9+bkctOSOOm U5bD6cPQ7GjTg05ZVCaWPjBcEn+Qpzg2z3xvIJviyIpBsA+j74ipmxbTElAoktEpg+A/ Q3ICuEcyczDXvbLMLzNunQmfVPc/cEJVDZ1adRYWNZI7LR+chFtssdMeh1UKBXclYLwx MF+qYQNnrThY12DHi3925VUpfdKxtBb0Pyx59Vto8LZj/0wJ5U3wBmSlE0dg3s7RGF+V m+Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1694454123; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=53ctMRM8ae+O8gJORVGlhrL6VfPj4kCfzWruA73aqMI=; b=Qw3ftjW9e+rPBAXCpZ2kwGvvgZVLriLV47hqLOzHnk9nH1K/2POga+DzkXKGrgzYwY xmDwXaQfvi8XPhQQvOP9gHUWGFale4KmaGvFn7pCZL++d0tm9pDSuFEoKJGerUpLImi5 b7u9cIQRdHEbRAF7LV40VvLC6v16BeEf7KSsGgkpM8mIi88z9plGtnpFxcX0OmWWsNha UFwtqs/1AMvdaGNHXbCPUX4Q72oZEmXFZebnUH05MPNDEr5IFfcfqOfzaiek+GiXnFWy f1RRjTzVdwiuJ5hN3T78GO+gj003NBS68XGOBsNyH4Y/4JFzY+YzMEIq6bceHaMQu8RA fTFA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1694454123; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=53ctMRM8ae+O8gJORVGlhrL6VfPj4kCfzWruA73aqMI=; b=B/g1M8tzFu5ZMhydu2fK9KclEHt/rWeXPwf3VkQzyA7o3/qQdDpFmPSnCH05Q72kyd 4jsqzE+CehyIrU3YLa9O6sV+a5qD2oqzEuF9sEPuNM1FkT2Ju06CJ38D6uSucIkp8MqA jlfrmQkQl0JsUbUE74BjtmlUmkXTZhwB8jXGclp4klbc6iZaasnGT8CKb2ChcHZ2d3o/ ugEVtxl1bzvjN/rXitDLJpfPR1/5S+fxY2xEbuUeQqofvsks3H8ZnMAJgM/xJzAKgfGU BNozXZxUop2HZCcsYSwehG0ar+Sxm0CE+JTk3kn7zzq3WQIo+RQijAK4u9zf4WB8PYID 8oIQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1694454123; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=53ctMRM8ae+O8gJORVGlhrL6VfPj4kCfzWruA73aqMI=; b=vFB0HqYAUyPKZY/BAlA8jKRJyuQobCDHMjcUhiayunLFegR2BReZxQq7yJDBqWhJZx bEwOHmFuYbwAAdY9A5AQ== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4l38TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id 60372az8BHg3awO (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 11 Sep 2023 19:42:03 +0200 (CEST) From: Stephan Gerhold Date: Mon, 11 Sep 2023 19:41:46 +0200 Subject: [PATCH 4/9] arm64: dts: qcom: msm8916: Reserve firmware memory dynamically MIME-Version: 1.0 Message-Id: <20230911-msm8916-rmem-v1-4-b7089ec3e3a1@gerhold.net> References: <20230911-msm8916-rmem-v1-0-b7089ec3e3a1@gerhold.net> In-Reply-To: <20230911-msm8916-rmem-v1-0-b7089ec3e3a1@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Stephan Gerhold X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Most of the reserved firmware memory on MSM8916 can be relocated when respecting the required alignment. To avoid having to precompute the reserved memory regions in every board DT, describe the actual requirements (size, alignment, alloc-ranges) using the dynamic reserved memory allocation. This approach has several advantages: 1. We can define "templates" for the reserved memory regions in msm8916.dtsi and keep only device-specific details in the board DT. This is useful for the "mpss" region size for example, which varies from device to device. It is no longer necessary to redefine all firmware regions to shift their addresses. 2. When some of the functionality (e.g. WCNSS, Modem, Venus) is not enabled or needed for a device, the reserved memory can stay disabled, freeing up the unused reservation for Linux. 3. Devices with special requirements for one of the firmware regions are handled automatically. For example, msm8916-longcheer-l8150 has non-relocatable "wcnss" firmware that must be loaded exactly at address 0x8b600000. When this is defined as a static region, the other dynamic allocations automatically adjust to a different place with suitable alignment. All in all this approach significantly reduces the boilerplate necessary to define the different firmware regions, and makes it easier to enable functionality on the different devices. Signed-off-by: Stephan Gerhold --- .../boot/dts/qcom/msm8916-longcheer-l8150.dts | 9 +++++++-- arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi | 11 ++++------- arch/arm64/boot/dts/qcom/msm8916.dtsi | 22 ++++++++++++++++++---- 3 files changed, 29 insertions(+), 13 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts index a0bb8de54fb6..503155aefa55 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts @@ -23,9 +23,14 @@ chosen { stdout-path = "serial0"; }; + /* + * For some reason, the signed wcnss firmware is not relocatable. + * It must be loaded at 0x8b600000. All other firmware is relocatable, + * so place wcnss at the fixed address and then all other firmware + * regions will be automatically allocated at a fitting place. + */ reserved-memory { - /* wcnss.mdt is not relocatable, so it must be loaded at 0x8b600000 */ - /delete-node/ wcnss@89300000; + /delete-node/ wcnss; wcnss_mem: wcnss@8b600000 { reg = <0x0 0x8b600000 0x0 0x600000>; diff --git a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi index 69f268db4df9..1d92c2e57216 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi @@ -17,13 +17,6 @@ chosen { stdout-path = "serial0"; }; - reserved-memory { - mpss_mem: mpss@86800000 { - reg = <0x0 0x86800000 0x0 0x5500000>; - no-map; - }; - }; - gpio-keys { compatible = "gpio-keys"; @@ -91,6 +84,10 @@ &mpss { status = "okay"; }; +&mpss_mem { + reg = <0x0 0x86800000 0x0 0x5500000>; +}; + &pm8916_usbin { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 0257cbbb4971..c237f3e48c86 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -74,17 +74,31 @@ rfsa@867e0000 { }; mpss_mem: mpss@86800000 { + /* + * The memory region for the mpss firmware is generally + * relocatable and could be allocated dynamically. + * However, many firmware versions tend to fail when + * loaded to some special addresses, so it is hard to + * define reliable alloc-ranges. + * + * alignment = <0x0 0x400000>; + * alloc-ranges = <0x0 0x86800000 0x0 0x8000000>; + */ reg = <0x0 0x86800000 0x0 0x2b00000>; no-map; }; - wcnss_mem: wcnss@89300000 { - reg = <0x0 0x89300000 0x0 0x600000>; + wcnss_mem: wcnss { + size = <0x0 0x600000>; + alignment = <0x0 0x100000>; + alloc-ranges = <0x0 0x86800000 0x0 0x8000000>; no-map; }; - venus_mem: venus@89900000 { - reg = <0x0 0x89900000 0x0 0x600000>; + venus_mem: venus { + size = <0x0 0x600000>; + alignment = <0x0 0x100000>; + alloc-ranges = <0x0 0x86800000 0x0 0x8000000>; no-map; }; From patchwork Mon Sep 11 17:41:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13379876 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 3BD85CA0EC3 for ; Mon, 11 Sep 2023 21:19:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343734AbjIKVMY (ORCPT ); Mon, 11 Sep 2023 17:12:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243772AbjIKRmS (ORCPT ); Mon, 11 Sep 2023 13:42:18 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38E681BE; Mon, 11 Sep 2023 10:42:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694454123; cv=none; d=strato.com; s=strato-dkim-0002; b=pDIPJkfT0cEwV+CoJX1B2IhRFQVzbhnEubgz0fbw7JKMAHGgMFmMUEfQ0PxYPEfuFy f97F3YjsLFoGbYfCT+WcNN8q2cQFXCk0RXpW0IKifBbGPeyQLQwPN/mjLczcAXDZbIGF X+Nhnp6rrbBGXlqqWdwH8qI8m35eOS4wYOwODeLXahR40yD0oxx3AFqKuDIr+iyggD9U q5Ed7swSvyPBKF9Qw9iFCX0IeJGRibgXFk4aV8CCdUp8dCGsgjuk9rx7ge4R4Mand99R Uz0L80+65P3Zc/rEDsvh0gNX7q/RID7VWSkOHCMnTmuoxeE32Eb8jr9EGoOBn/+1/tU+ j/Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1694454123; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=ShrofkfKMpSbFwfO0X9kQ0kj/RhvfPGBMpcNqkTeAQY=; b=OwPd+XEoTvILtvWUZKerhxLMAtcgSLF/bQ6Ezba+oRErMPlCV50C24JJENuHDK38Vp D/UmfA5aYhM3Gl37naN7qbmu8XZAzN9PGSr3Ex2zUdpZjCnRncv+nxn51MgM0/OzYusc y5hMp8BPk/XFG9ohaFW98TlXsy8vRt2mAg6QYio3Hc075werX9CtsiIxelUo2B4j6CSf AW3H+uDGKzzin8Z5F4kaVx64S2vX0LmcSPMGZOjT/gxi++AHyREZKxvw6hlsZLZUggz2 8XJ8H3f2VsglzFdnYbj6W8CtCiABKF4qXwdEwP9bHsNf7g9Y9t/FY5S2gcGgN/9OkGjw NAgw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1694454123; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=ShrofkfKMpSbFwfO0X9kQ0kj/RhvfPGBMpcNqkTeAQY=; b=cTu+U7/cbGgiC4zutzo34fDlTA7hu0MQMI9+9Xu935vADnzVVd0RM/ipYbNiOymwlA 0FGEfXIvV0C99Uu0BHoY9wWTBJRPEPStYC3jNZ2VyHgK0fXzGWYzCUqFTC0Bxif5gSCA Qb91km8vNWj5CC5zUs0K4eADQUMx6q3zREXouB46VT7WE126vgrK2UUamo84kgUAIKcK jOFY/tzZBUshIpZdY3cdmAahY1JYiTzKxXza+MMZTmMNpmYUiIHpJjuZz1GC5uIkfdzk RBp16ie2GPzaFiYViZap//Jefw9NuW14oP+aBwUlIJTYq+KcUKq7t3ZcW80wLe6G2SB8 zJDw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1694454123; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=ShrofkfKMpSbFwfO0X9kQ0kj/RhvfPGBMpcNqkTeAQY=; b=JAlTjNjQ613e4IXroFSc7IoKPDGm64/AH0KUJ+YoSZhkkalxaoExrTIFngkwm/d9u/ +/NNq77RfC5TlqIT1WBQ== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4l38TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id 60372az8BHg3awP (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 11 Sep 2023 19:42:03 +0200 (CEST) From: Stephan Gerhold Date: Mon, 11 Sep 2023 19:41:47 +0200 Subject: [PATCH 5/9] arm64: dts: qcom: msm8916: Reserve MBA memory dynamically MIME-Version: 1.0 Message-Id: <20230911-msm8916-rmem-v1-5-b7089ec3e3a1@gerhold.net> References: <20230911-msm8916-rmem-v1-0-b7089ec3e3a1@gerhold.net> In-Reply-To: <20230911-msm8916-rmem-v1-0-b7089ec3e3a1@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Stephan Gerhold X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org At a first glance the MBA memory region on MSM8916 looks intentionally placed at the fixed address 0x8ea00000. This is what the ELF headers of the firmware specify as base address, and the typical Qualcomm-specific bits suggest the binary is not relocatable. However, on a closer look this is pointless: Unlike other firmware images the hardware expects to have the raw ELF image loaded to the MBA region, including the ELF header (without parsing it at all). This means that we actually just load the ELF header (not the code!) at 0x8ea00000. The real LOAD segments follow at arbitrary aligned addresses depending on the structure of the ELF binary. In practice it looks like we can use an arbitrary 1 MiB-aligned region for MBA. The downstream/vendor kernel just allocates this dynamically at an arbitrary (aligned) address. Drop the pointless fixed address and use the new dynamic reserved memory mechanism to allocate a region close to the others. This reduces gaps in the memory map and provides Linux with more contiguous memory. Signed-off-by: Stephan Gerhold Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index c237f3e48c86..38f6c8ea605a 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -102,9 +102,11 @@ venus_mem: venus { no-map; }; - mba_mem: mba@8ea00000 { + mba_mem: mba { + size = <0x0 0x100000>; + alignment = <0x0 0x100000>; + alloc-ranges = <0x0 0x86800000 0x0 0x8000000>; no-map; - reg = <0 0x8ea00000 0 0x100000>; }; }; From patchwork Mon Sep 11 17:41:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13379833 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 9C397CA0EC3 for ; Mon, 11 Sep 2023 21:17:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240708AbjIKVKX (ORCPT ); Mon, 11 Sep 2023 17:10:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243773AbjIKRmS (ORCPT ); Mon, 11 Sep 2023 13:42:18 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27E341A7; Mon, 11 Sep 2023 10:42:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694454123; cv=none; d=strato.com; s=strato-dkim-0002; b=jb7zf8OTlRokZeA43Vsusc/wSRwJZ3ko79ZM8bSJ95dC1zSdaZ5tJi8rK8lP7C8Qdi CDtbg2Q/9mh04Q637R6u6h6ilIQJRhxS3AoGXBfUub2ekGV7YRmuGGDuJsLNbH38z8HB QXmkEp/sKL19FnnTQR9zMxp+O0GRkdhb16SbcVrBMnhcLfgWof0pYJWMz7tnw7szdqTv ZtnvxIMrUMnUS6vXTgBqOwkL4q9+8CA+7TiDvbTZOEa2LdPEPgZ45+3QMjgjKtFCB7UD Q5Lsmg0yYEwGgIUnlrxlPMYrYO+Tm6V3/2dh59z6+6ifVEKtY4r5C3Eg3UV3yaUtBv6p z+xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1694454123; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=zid5A9mrDBDiMz5qTZXzLHu4gdhlVK+coBW08Vfgozg=; b=G/xPkPmAmQPZ4Vbeqn0UE3Uu9K/dz45fNrbmmOlYx1UHSYiCwwfTlzK3kEPQuE89cq KrYYHd6/MvCNl5HFmDbjY/ZbB+fK92zixGwPz/b0DdsVyMJeO4V7KVn3RJ2lm7SQgIuo 3IFVyf2Ir95Ud/FzGwF3Tonm3OdEdcdv7MOmHIlGYM5lv5+559KrHNWZ0K8qoox889bS 7cY0fGfGGmkclMcIIjTRbcd9mC6/HJgpit1JOw5wLIHp3l1GOlQSGAXNZ8X/jJGtBdv7 51dXH2ebKq6OKAPaY6hTQUoaIqB+X4p0/XsY420844gN3JNY5bDwvT+zySNI1jjuQU3p WIrQ== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1694454123; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=zid5A9mrDBDiMz5qTZXzLHu4gdhlVK+coBW08Vfgozg=; b=TpAc71yn1FFhuqSQOLqpkGZW4TAC2wn+WSljMx3nYPRreob2+Mt1XO7u8LwWcK2WZb 59Nyps+3TlvzVFDYTWRlPApTQt3Tmp3uR5BquDgsBpDyU/4sb6yj9ushrFna7Atg4pdd wWdP3tTCJ9hIE1P1NFry2WICJrW6mxXkgXK6QVY0t+U6EzdDwkVXqiAJnjSn1elzZ300 YHjJByniSObpw8SNM+z2ZrQGJx8Ttddc5gKh3NxSVThiLY81BWQAfZkqVZ8d/DNb/CSe xk1MkVda0hSbEYA1Cw/vl5/mtbpv2pPBIXRNKV+iqIWMi0L/Nr71uuLxXNolVoX1v/2p k0aQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1694454123; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=zid5A9mrDBDiMz5qTZXzLHu4gdhlVK+coBW08Vfgozg=; b=GkdhUeCrXpn+AfGZxQjWI8DA4aETARMIqcwCcXXKAeOH80wEbW6qxNk2bBbZjsfESE J2oPEVjmnWQAqfwuVXDA== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4l38TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id 60372az8BHg3awQ (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 11 Sep 2023 19:42:03 +0200 (CEST) From: Stephan Gerhold Date: Mon, 11 Sep 2023 19:41:48 +0200 Subject: [PATCH 6/9] arm64: dts: qcom: msm8939: Reserve firmware memory dynamically MIME-Version: 1.0 Message-Id: <20230911-msm8916-rmem-v1-6-b7089ec3e3a1@gerhold.net> References: <20230911-msm8916-rmem-v1-0-b7089ec3e3a1@gerhold.net> In-Reply-To: <20230911-msm8916-rmem-v1-0-b7089ec3e3a1@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Stephan Gerhold X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Follow the example of MSM8916 and reserve the firmware memory regions dynamically to allow boards to define only the device-specific parts. Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/msm8939.dtsi | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8939.dtsi b/arch/arm64/boot/dts/qcom/msm8939.dtsi index b0a64e468629..ebea6de1177b 100644 --- a/arch/arm64/boot/dts/qcom/msm8939.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8939.dtsi @@ -346,22 +346,38 @@ rfsa@867e0000 { }; mpss_mem: mpss@86800000 { + /* + * The memory region for the mpss firmware is generally + * relocatable and could be allocated dynamically. + * However, many firmware versions tend to fail when + * loaded to some special addresses, so it is hard to + * define reliable alloc-ranges. + * + * alignment = <0x0 0x400000>; + * alloc-ranges = <0x0 0x86800000 0x0 0x8000000>; + */ reg = <0x0 0x86800000 0x0 0x5500000>; no-map; }; - wcnss_mem: wcnss@8bd00000 { - reg = <0x0 0x8bd00000 0x0 0x600000>; + wcnss_mem: wcnss { + size = <0x0 0x600000>; + alignment = <0x0 0x100000>; + alloc-ranges = <0x0 0x86800000 0x0 0x8000000>; no-map; }; - venus_mem: venus@8c300000 { - reg = <0x0 0x8c300000 0x0 0x800000>; + venus_mem: venus { + size = <0x0 0x800000>; + alignment = <0x0 0x100000>; + alloc-ranges = <0x0 0x86800000 0x0 0x8000000>; no-map; }; - mba_mem: mba@8cb00000 { - reg = <0x0 0x8cb00000 0x0 0x100000>; + mba_mem: mba { + size = <0x0 0x100000>; + alignment = <0x0 0x100000>; + alloc-ranges = <0x0 0x86800000 0x0 0x8000000>; no-map; }; }; From patchwork Mon Sep 11 17:41:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13379918 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 8DAAACA0ECF for ; Mon, 11 Sep 2023 21:21:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344843AbjIKVOw (ORCPT ); Mon, 11 Sep 2023 17:14:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243778AbjIKRmV (ORCPT ); Mon, 11 Sep 2023 13:42:21 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.80]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95E94CCC; Mon, 11 Sep 2023 10:42:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694454124; cv=none; d=strato.com; s=strato-dkim-0002; b=H6WN+5g2fon5HCZwh24XC8ppe5UUbXP710b1xt2gk9iyUF3LwUyFnhtOobLaGjFu3Y 6Hryt2gIBBYP5FWKfUjj2vJnDwIYWNQniP07eFGxDDM9WXm0bxqG5wKf2EfAI2rdmGeE JY61u+IfwyshRtpQvAEhdZ351IIPf7X2xJGrqyQFPyXX6qBVYjFa+LEg6nedk1aQzO1A ZenCYwAI2DaeNhMN1KFqRu83TCeAORJOeTfeRYyI8GZeMCmXFJafUV5ZharFu2ZysHJn WcuGNBnvsIbVEmsIuh1QbzvgvIz1aWGwnGmy0csVhel8DDzbVstDnINWS94xO4qnmHjR +KwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1694454124; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=P4Dwi4/5beXuX8qW3vf++EWtOQ4RCdZB/xmssOAW4VY=; b=YJ2CjPlsUCWSnMhhk5zTwXgdibLX+HnxDvNzzyZP9wH5DYAyAnJkfr8WxLmSKCzu00 lew4TLzEohsf9rReCrnbejkvXhSZhhponFkj21f64ywtgVelGkMXzA87ebxPJsPK6LNH fV4JQHzOvmG7iCmRYX7RHFa+dpKOninsiLn43QoyX+RC/lwCODkD69CWZ7K1z8yoJarR Jc9FPLSeCP5/muKpflnwCuP6fnYEpvu60W8KXZGVmsB2QG0WqgCCN1dPorE08S0nekev 04de1pBOpjZazOpgDiELlselVycB3pEqlD/zWn1fGZ5QEIIWL4km3uJNyO+u/XXkEA0a nC0w== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1694454123; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=P4Dwi4/5beXuX8qW3vf++EWtOQ4RCdZB/xmssOAW4VY=; b=IEgc4HOo3RLYrQx7nCqFo8OeccXfSiLDmLHV8McqgShvw69NreqFcJoxPVHMjfGc92 H5hGQIYhWt791yyckCam5nzb8b+D/qpU9gupVeo/vu5LFhyEn3RZg03GEGxAmHuPe08E uOJCv8bQ8ik86R6+M3ClL4lDcN1fjVomL61daivgE3H1KHYxr4nG8wk80VpeavnGOQGg oVA2hhYp54egx3LIUID1zYWkV61GwU34CSg5sh6+p551GOcfIeUyfIbNkUqqw7ueV241 ck39eoIPqXWwJUZgk7sYJhLsBOGPFFRHjxYutgoIuJwoiXVW0MIX3TxLjJvwJmlOEg4O MtLg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1694454123; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=P4Dwi4/5beXuX8qW3vf++EWtOQ4RCdZB/xmssOAW4VY=; b=qHBRHblbRGcYCIWPPRfXBsq7ibyvJfRgH/ijVawDM8eInZymzqtTSHi0j54cmcKxrt SWD8e9DB96s19KtFcXAw== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4l38TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id 60372az8BHg3awR (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 11 Sep 2023 19:42:03 +0200 (CEST) From: Stephan Gerhold Date: Mon, 11 Sep 2023 19:41:49 +0200 Subject: [PATCH 7/9] arm64: dts: qcom: msm8916/39: Disable unneeded firmware reservations MIME-Version: 1.0 Message-Id: <20230911-msm8916-rmem-v1-7-b7089ec3e3a1@gerhold.net> References: <20230911-msm8916-rmem-v1-0-b7089ec3e3a1@gerhold.net> In-Reply-To: <20230911-msm8916-rmem-v1-0-b7089ec3e3a1@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Stephan Gerhold X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Now that we no longer have fixed addresses for the firmware memory regions, disable them by default and only enable them together with the actual user in the board DT. This frees up unnecessary reserved memory for boards that do not use some of the remoteprocs and allows moving selected device-specific properties (such as firmware size) to the board-specific DT part in the next step. Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/apq8016-sbc.dts | 16 ++++++++++++++++ arch/arm64/boot/dts/qcom/apq8039-t2.dts | 4 ++++ arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts | 8 ++++++++ arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts | 8 ++++++++ arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts | 8 ++++++++ arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts | 8 ++++++++ arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts | 8 ++++++++ arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts | 8 ++++++++ arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts | 8 ++++++++ .../boot/dts/qcom/msm8916-samsung-a2015-common.dtsi | 4 ++++ arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dts | 4 ++++ arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts | 4 ++++ .../boot/dts/qcom/msm8916-samsung-e2015-common.dtsi | 4 ++++ arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi | 8 ++++++++ arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi | 8 ++++++++ arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts | 8 ++++++++ arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi | 13 +++++++++++++ arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts | 8 ++++++++ arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 ++++ arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts | 4 ++++ .../boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts | 4 ++++ arch/arm64/boot/dts/qcom/msm8939.dtsi | 4 ++++ 22 files changed, 153 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts index bd68f4793acd..ae510c5ec830 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts @@ -242,6 +242,10 @@ &lpass_codec { status = "okay"; }; +&mba_mem { + status = "okay"; +}; + &mdss { status = "okay"; }; @@ -257,6 +261,10 @@ &mpss { firmware-name = "qcom/apq8016/mba.mbn", "qcom/apq8016/modem.mbn"; }; +&mpss_mem { + status = "okay"; +}; + &pm8916_codec { status = "okay"; clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>; @@ -372,6 +380,10 @@ &venus { status = "okay"; }; +&venus_mem { + status = "okay"; +}; + &wcnss { status = "okay"; firmware-name = "qcom/apq8016/wcnss.mbn"; @@ -385,6 +397,10 @@ &wcnss_iris { compatible = "qcom,wcn3620"; }; +&wcnss_mem { + status = "okay"; +}; + /* Enable CoreSight */ &cti0 { status = "okay"; }; &cti1 { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/apq8039-t2.dts b/arch/arm64/boot/dts/qcom/apq8039-t2.dts index f591d6e78d6e..4f82bb668616 100644 --- a/arch/arm64/boot/dts/qcom/apq8039-t2.dts +++ b/arch/arm64/boot/dts/qcom/apq8039-t2.dts @@ -395,3 +395,7 @@ &wcnss { &wcnss_iris { compatible = "qcom,wcn3680"; }; + +&wcnss_mem { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts b/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts index 1d1af1260938..57a74eea1005 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts @@ -159,6 +159,10 @@ &venus { status = "okay"; }; +&venus_mem { + status = "okay"; +}; + &wcnss { status = "okay"; }; @@ -167,6 +171,10 @@ &wcnss_iris { compatible = "qcom,wcn3620"; }; +&wcnss_mem { + status = "okay"; +}; + &tlmm { accel_int_default: accel-int-default-state { pins = "gpio115"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts b/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts index e130f19fdccf..aa4c1ab1e673 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts @@ -196,6 +196,10 @@ &venus { status = "okay"; }; +&venus_mem { + status = "okay"; +}; + &wcnss { status = "okay"; }; @@ -204,6 +208,10 @@ &wcnss_iris { compatible = "qcom,wcn3620"; }; +&wcnss_mem { + status = "okay"; +}; + &tlmm { accel_int_default: accel-int-default-state { pins = "gpio31"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts b/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts index 6f38e765ed3c..a8be6ff66893 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts @@ -164,6 +164,10 @@ &venus { status = "okay"; }; +&venus_mem { + status = "okay"; +}; + &wcnss { status = "okay"; }; @@ -172,6 +176,10 @@ &wcnss_iris { compatible = "qcom,wcn3620"; }; +&wcnss_mem { + status = "okay"; +}; + &tlmm { gpio_keys_default: gpio-keys-default-state { pins = "gpio107", "gpio117"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts b/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts index 1d1113958625..b748d140b52e 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts @@ -154,6 +154,10 @@ &venus { status = "okay"; }; +&venus_mem { + status = "okay"; +}; + &wcnss { status = "okay"; }; @@ -162,6 +166,10 @@ &wcnss_iris { compatible = "qcom,wcn3620"; }; +&wcnss_mem { + status = "okay"; +}; + &tlmm { camera_flash_default: camera-flash-default-state { pins = "gpio31", "gpio32"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts b/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts index c46df67b4d10..bf7fc89dd106 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts @@ -332,6 +332,10 @@ &venus { status = "okay"; }; +&venus_mem { + status = "okay"; +}; + &wcnss { status = "okay"; }; @@ -340,6 +344,10 @@ &wcnss_iris { compatible = "qcom,wcn3620"; }; +&wcnss_mem { + status = "okay"; +}; + &tlmm { accel_irq_default: accel-irq-default-state { pins = "gpio115"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts index 503155aefa55..47d1c5cb13f4 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts @@ -268,6 +268,10 @@ &venus { status = "okay"; }; +&venus_mem { + status = "okay"; +}; + &wcnss { status = "okay"; }; @@ -276,6 +280,10 @@ &wcnss_iris { compatible = "qcom,wcn3620"; }; +&wcnss_mem { + status = "okay"; +}; + &tlmm { accel_int_default: accel-int-default-state { pins = "gpio116"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts index 919677969b3e..41cadb906b98 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts @@ -150,6 +150,10 @@ &venus { status = "okay"; }; +&venus_mem { + status = "okay"; +}; + &wcnss { status = "okay"; }; @@ -158,6 +162,10 @@ &wcnss_iris { compatible = "qcom,wcn3620"; }; +&wcnss_mem { + status = "okay"; +}; + &tlmm { button_backlight_default: button-backlight-default-state { pins = "gpio17"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi index 15d2486cdb45..0b29132b74e1 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi @@ -292,6 +292,10 @@ &venus { status = "okay"; }; +&venus_mem { + status = "okay"; +}; + &tlmm { accel_int_default: accel-int-default-state { pins = "gpio115"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dts index e5a569698c4f..f5a808369518 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dts @@ -120,6 +120,10 @@ &wcnss_iris { compatible = "qcom,wcn3620"; }; +&wcnss_mem { + status = "okay"; +}; + &tlmm { panel_vdd3_default: panel-vdd3-default-state { pins = "gpio9"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts index 388482a1e3d9..391befa22bb4 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts @@ -71,6 +71,10 @@ &wcnss_iris { compatible = "qcom,wcn3660b"; }; +&wcnss_mem { + status = "okay"; +}; + &tlmm { tkey_en_default: tkey-en-default-state { pins = "gpio97"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi index 6f65fd4b3ed3..0824ab041d80 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi @@ -83,6 +83,10 @@ &wcnss_iris { compatible = "qcom,wcn3620"; }; +&wcnss_mem { + status = "okay"; +}; + &tlmm { tkey_en_default: tkey-en-default-state { pins = "gpio97"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi index 06602db25e5f..c19cf20d7427 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi @@ -162,6 +162,10 @@ &venus { status = "okay"; }; +&venus_mem { + status = "okay"; +}; + &wcnss { status = "okay"; }; @@ -170,6 +174,10 @@ &wcnss_iris { compatible = "qcom,wcn3660b"; }; +&wcnss_mem { + status = "okay"; +}; + &tlmm { accel_int_default: accel-int-default-state { pins = "gpio115"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi index 9897089d2243..62692d2c32d5 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi @@ -142,6 +142,10 @@ &venus { status = "okay"; }; +&venus_mem { + status = "okay"; +}; + &wcnss { status = "okay"; }; @@ -150,6 +154,10 @@ &wcnss_iris { compatible = "qcom,wcn3620"; }; +&wcnss_mem { + status = "okay"; +}; + &tlmm { gpio_hall_sensor_default: gpio-hall-sensor-default-state { pins = "gpio52"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts index 286ba7bb2b5a..68da2a2d3077 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts @@ -363,6 +363,10 @@ &venus { status = "okay"; }; +&venus_mem { + status = "okay"; +}; + &wcnss { status = "okay"; }; @@ -371,6 +375,10 @@ &wcnss_iris { compatible = "qcom,wcn3660b"; }; +&wcnss_mem { + status = "okay"; +}; + &tlmm { fg_alert_default: fg-alert-default-state { pins = "gpio121"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi index 1d92c2e57216..c77ed04bb6c3 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi @@ -80,12 +80,17 @@ &gcc { clocks = <&xo_board>, <&sleep_clk>, <0>, <0>, <0>, <0>, <0>; }; +&mba_mem { + status = "okay"; +}; + &mpss { status = "okay"; }; &mpss_mem { reg = <0x0 0x86800000 0x0 0x5500000>; + status = "okay"; }; &pm8916_usbin { @@ -111,6 +116,10 @@ &venus { status = "okay"; }; +&venus_mem { + status = "okay"; +}; + &wcnss { status = "okay"; }; @@ -119,6 +128,10 @@ &wcnss_iris { compatible = "qcom,wcn3620"; }; +&wcnss_mem { + status = "okay"; +}; + &tlmm { /* pins are board-specific */ button_default: button-default-state { diff --git a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts index 82ed50610b24..419f35c1fc92 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts @@ -193,6 +193,10 @@ &venus { status = "okay"; }; +&venus_mem { + status = "okay"; +}; + &wcnss { status = "okay"; }; @@ -201,6 +205,10 @@ &wcnss_iris { compatible = "qcom,wcn3620"; }; +&wcnss_mem { + status = "okay"; +}; + &tlmm { camera_flash_default: camera-flash-default-state { pins = "gpio31", "gpio32"; diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 38f6c8ea605a..8457472c9ad8 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -86,6 +86,7 @@ mpss_mem: mpss@86800000 { */ reg = <0x0 0x86800000 0x0 0x2b00000>; no-map; + status = "disabled"; }; wcnss_mem: wcnss { @@ -93,6 +94,7 @@ wcnss_mem: wcnss { alignment = <0x0 0x100000>; alloc-ranges = <0x0 0x86800000 0x0 0x8000000>; no-map; + status = "disabled"; }; venus_mem: venus { @@ -100,6 +102,7 @@ venus_mem: venus { alignment = <0x0 0x100000>; alloc-ranges = <0x0 0x86800000 0x0 0x8000000>; no-map; + status = "disabled"; }; mba_mem: mba { @@ -107,6 +110,7 @@ mba_mem: mba { alignment = <0x0 0x100000>; alloc-ranges = <0x0 0x86800000 0x0 0x8000000>; no-map; + status = "disabled"; }; }; diff --git a/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts b/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts index ba652909d162..fccd8fec8b8f 100644 --- a/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts +++ b/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts @@ -352,6 +352,10 @@ &wcnss_iris { compatible = "qcom,wcn3660b"; }; +&wcnss_mem { + status = "okay"; +}; + &tlmm { accel_int_default: accel-int-default-state { pins = "gpio115"; diff --git a/arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts b/arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts index cb893345c44b..eeb4d578c6fa 100644 --- a/arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts +++ b/arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts @@ -91,3 +91,7 @@ &wcnss { &wcnss_iris { compatible = "qcom,wcn3660"; }; + +&wcnss_mem { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8939.dtsi b/arch/arm64/boot/dts/qcom/msm8939.dtsi index ebea6de1177b..c50f6d828fed 100644 --- a/arch/arm64/boot/dts/qcom/msm8939.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8939.dtsi @@ -358,6 +358,7 @@ mpss_mem: mpss@86800000 { */ reg = <0x0 0x86800000 0x0 0x5500000>; no-map; + status = "disabled"; }; wcnss_mem: wcnss { @@ -365,6 +366,7 @@ wcnss_mem: wcnss { alignment = <0x0 0x100000>; alloc-ranges = <0x0 0x86800000 0x0 0x8000000>; no-map; + status = "disabled"; }; venus_mem: venus { @@ -372,6 +374,7 @@ venus_mem: venus { alignment = <0x0 0x100000>; alloc-ranges = <0x0 0x86800000 0x0 0x8000000>; no-map; + status = "disabled"; }; mba_mem: mba { @@ -379,6 +382,7 @@ mba_mem: mba { alignment = <0x0 0x100000>; alloc-ranges = <0x0 0x86800000 0x0 0x8000000>; no-map; + status = "disabled"; }; }; From patchwork Mon Sep 11 17:41:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13379899 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 81B7BCA0ED9 for ; Mon, 11 Sep 2023 21:20:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344391AbjIKVN7 (ORCPT ); Mon, 11 Sep 2023 17:13:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243776AbjIKRmT (ORCPT ); Mon, 11 Sep 2023 13:42:19 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80A79CC3; Mon, 11 Sep 2023 10:42:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694454124; cv=none; d=strato.com; s=strato-dkim-0002; b=X/XuP2Nx1SMc88icfHpmoSqa7hCnjIumPmX/AohoFcFRMwPGl5Fv+E7g+O+iC7sENs 0SXkdnebhqWi6EzCNFIYXXX2yU7zwbl2/M3MR9FrZ5VnFDO3L/OLCYjU+HopHoYXZ7eX MTPv6DIYVRJLvSOiI5xYBX8k3DlXeKQtoRDDoG08bmYSyHYBjqF2omyaBkruaEfZcbTP zhtHXYPn/RIo1BURE4xcFKaKTiHyoIsguEuWG6o4/+Ui3BeBww3cEb2hl+lZtg3gKTvE RUF6CludLBUh0uk5CCjpm5h2oCkilRdF/TwJQM8Pb00/LoBInknH1mzw3AioT2/BRXzD bnXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1694454124; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=FYqygZxToenRNHUlAQbQ38YDoGCcQBs/RUIH46z7j6k=; b=fA4kaPJ+tzelg6jwOu4LYLmbX4NAD1vN6RI04bPTyx5i7F/0yCRtf2+B53fzx802if PXKFJCe38sErNo+tuokGMX/ehaR+HRL4YuD51qrMJyMmRs39WRGA8FaK2Jvhpb8p9Kt3 Ci6nbqCQiBrUQg25ToxMokiM9AmLWXkL7F3cXdgSiEkCVRfrhcoM8FtnIYJbqddH/+9R TKkHtXGLCJD9MCKlEDmZj1WvJYSlSFOJNykIgK3pHDDH2EZJYQaPMhNCL8mbwZ/r1g4H 2OQOoel7HQDJnwpbe5wBcTM/9feBE5uIbRUswxHhWx/QfFcHcLbN3cG+9NbfDWpKaQTK VRIg== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1694454124; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=FYqygZxToenRNHUlAQbQ38YDoGCcQBs/RUIH46z7j6k=; b=BEwHyORmDQuqLulEBLG3pO7MtMiqJ1I/0HR/9AB9d8QTr4/MpplyzKCWwN0s5VIv22 piv9X0ToREwHBuoeHbuosTfbEI8UZjgodTWg/OoRn7fI+SJJwiyYIYAI4N2qFREZcaGC On2j8wUsgz+5XvlXHc+jnrL30MZ1/rIN39j3wPYnO+1BskrWwgcEGRaJhAYjy8JR9zAY sHxgyh+i9XTZknv0DO1hwnyWPpe1JgKUZl4aje5thk5wKbwuiaFpXU+5/zxQc52kWxxX 8AqqjKW2v3FIO5L1fN5pIg7FD58RauVGPkwudXrdlo+7/377DvM1lBf2LZXlCWMbXh96 yl6A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1694454124; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=FYqygZxToenRNHUlAQbQ38YDoGCcQBs/RUIH46z7j6k=; b=gj8iSLefgty9qVWRT42C9ntujIQMW6Cnuj1heOLznr4s4EmvxBs2aQ1nPH3A3nIxuy hn4Jfbs4s8z7sHM26EDg== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4l38TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id 60372az8BHg4awS (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 11 Sep 2023 19:42:04 +0200 (CEST) From: Stephan Gerhold Date: Mon, 11 Sep 2023 19:41:50 +0200 Subject: [PATCH 8/9] arm64: dts: qcom: msm8916/39: Move mpss_mem size to boards MIME-Version: 1.0 Message-Id: <20230911-msm8916-rmem-v1-8-b7089ec3e3a1@gerhold.net> References: <20230911-msm8916-rmem-v1-0-b7089ec3e3a1@gerhold.net> In-Reply-To: <20230911-msm8916-rmem-v1-0-b7089ec3e3a1@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Stephan Gerhold X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The modem firmware size is typically highly device-specific. The current size of the mpss_mem region in msm8916.dtsi (0x2b00000) only works for some APQ8016 devices without full-featured modem, such as the DragonBoard 410c. The full modem firmware is typically about twice as large (~45 MiB -> ~90 MiB) but also varies by a few MiB from device to device. Since these devices are quite memory-constrained nowadays it's important to minimize the unnecessary memory reservations. Make it clear that each board needs to specify the necessary mpss_mem size by replacing the DB410c-specific size in msm8916.dtsi with a simple comment. &mpss_mem is disabled by default so it's fine to leave some properties up to the boards if they want to enable it. Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/apq8016-sbc.dts | 1 + arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8939.dtsi | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts index ae510c5ec830..3381550a5c9e 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts @@ -263,6 +263,7 @@ &mpss { &mpss_mem { status = "okay"; + reg = <0x0 0x86800000 0x0 0x2b00000>; }; &pm8916_codec { diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 8457472c9ad8..4d867078388d 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -84,7 +84,7 @@ mpss_mem: mpss@86800000 { * alignment = <0x0 0x400000>; * alloc-ranges = <0x0 0x86800000 0x0 0x8000000>; */ - reg = <0x0 0x86800000 0x0 0x2b00000>; + reg = <0x0 0x86800000 0x0 0>; /* size is device-specific */ no-map; status = "disabled"; }; diff --git a/arch/arm64/boot/dts/qcom/msm8939.dtsi b/arch/arm64/boot/dts/qcom/msm8939.dtsi index c50f6d828fed..ba177725f3d7 100644 --- a/arch/arm64/boot/dts/qcom/msm8939.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8939.dtsi @@ -356,7 +356,7 @@ mpss_mem: mpss@86800000 { * alignment = <0x0 0x400000>; * alloc-ranges = <0x0 0x86800000 0x0 0x8000000>; */ - reg = <0x0 0x86800000 0x0 0x5500000>; + reg = <0x0 0x86800000 0x0 0>; /* size is device-specific */ no-map; status = "disabled"; }; From patchwork Mon Sep 11 17:41:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13379902 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 83B07CA0EC5 for ; Mon, 11 Sep 2023 21:20:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344409AbjIKVOB (ORCPT ); Mon, 11 Sep 2023 17:14:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243777AbjIKRmT (ORCPT ); Mon, 11 Sep 2023 13:42:19 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EFDECCA; Mon, 11 Sep 2023 10:42:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694454124; cv=none; d=strato.com; s=strato-dkim-0002; b=TJuivGTS3gMxi5ijhqwVUJeLNISoDTTiT3MsrM6c1j0tjn82/GwgyP9eRBviFA2lVT uqrCyxLqtKrI/80KxZUQ5wCKY9rIqO6WMNiR8FdsOL1XycbXRTlvL0pjhcSvH+0YzIPt 2vbEOtkmMfBZgssQitCcXVfiQ1x6NZunDTGeOpEkoF/aE3IxEK7CO+5mmCF2nsDhRLSE F5BheBYWfy6VWs3XC89p4jmTpu+8QtSJ9jrGXpkDGEF0qYwLjU1JprbeTaDn8QCybVcA nxZiJRRH4hOa5PwUcdqKDiI0YOEyrq38oWWGBIzASSTgyVvkCQjtBrSUqWdqOYprAVk0 V39A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1694454124; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=X9g3iLRlx0W4EEcfM/wQIFM4jrKGu03h91oMBbwEEnI=; b=cOSaW32QlXsRyHrpKdR0Us3CKu71L3IGKLBJFmRI4twZZeo6nLl1r6IFC/P+VyA+iw LBj2X8p0ef35XKDnmaeGot42/57fKjYZBj0NswANTxwnPO6lrKVF9T226SZnx3+iNtPs HWPLTlYTnNMh+waejffOfNITbs59/A0mc5nbYw4MbbNJ09OiE2OLVj2x5jsXVAakvxV5 J//7Ai9nPT6+kKzNXkgoTnXXmklkDjOVXNzTaWMxMDk4amLIDD2Nq71gF8CWymAFiLiz gCtlX3HubcEYqJSm3cNXhrkhLq07gSDxWTxNoUj2JkYkH0AXO5ICciNE6dyHrTjScIRw 9WqQ== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1694454124; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=X9g3iLRlx0W4EEcfM/wQIFM4jrKGu03h91oMBbwEEnI=; b=X5aPviOXyTunGLrwQyT1ha+CUOS6d362nT5VmGxeIK9HNxb0usGyfA6xi6ZZrYYS6M K+qFFeqa1LhnG/jQ+Sz9uVESDikUdi+uGPSFNqVtFGgFmIquXL86+2yJ347HqAjjM3p1 lR+h+VtrYDUz4Ejp37r5cekCOwo59YYa1BN221HJY2KHuqVctRL5EF0JeVw7VsxKlv8W TCBiKt/YT2JGl6usBNehe2yyrke2OIDn+8SpW+jGGJHNkap/Ii3pTl/EN/yeY3sQ3eiE NtNlQ8F1SUW3YT+GiBujI6LJg4JB5G+xL98fjfAY8xcNCyQTJqttw6n1lUH9i5cGvHw8 fyIw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1694454124; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=X9g3iLRlx0W4EEcfM/wQIFM4jrKGu03h91oMBbwEEnI=; b=eXFpZQt4NxVxMB2pXdOMBy5tkxMLYb4O/SuY+8f/LAEd/lT1yxit2nQFLyWEkFvm71 wOV48+m2XXv37zxZRvBw== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4l38TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id 60372az8BHg4awT (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 11 Sep 2023 19:42:04 +0200 (CEST) From: Stephan Gerhold Date: Mon, 11 Sep 2023 19:41:51 +0200 Subject: [PATCH 9/9] arm64: dts: qcom: msm8916/39: Fix venus memory size MIME-Version: 1.0 Message-Id: <20230911-msm8916-rmem-v1-9-b7089ec3e3a1@gerhold.net> References: <20230911-msm8916-rmem-v1-0-b7089ec3e3a1@gerhold.net> In-Reply-To: <20230911-msm8916-rmem-v1-0-b7089ec3e3a1@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Stephan Gerhold X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Both MSM8916 and MSM8939 have unnecessarily large reservations for the venus firmware for some reason. According to the ELF headers and downstream [1] 5 MiB is enough. Let's set the minimum size as default. With the dynamic reserved memory allocations boards can easily override this if needed, although in practice there does not seem to be any device with a different venus firmware size. [1]: https://git.codelinaro.org/clo/la/kernel/msm-3.10/-/blame/LA.BR.1.2.9.1-02310-8x16.0/arch/arm/boot/dts/qcom/msm8939-common.dtsi#L69 Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8939.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 4d867078388d..1e94e26b8fb0 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -98,7 +98,7 @@ wcnss_mem: wcnss { }; venus_mem: venus { - size = <0x0 0x600000>; + size = <0x0 0x500000>; alignment = <0x0 0x100000>; alloc-ranges = <0x0 0x86800000 0x0 0x8000000>; no-map; diff --git a/arch/arm64/boot/dts/qcom/msm8939.dtsi b/arch/arm64/boot/dts/qcom/msm8939.dtsi index ba177725f3d7..715c86c217c5 100644 --- a/arch/arm64/boot/dts/qcom/msm8939.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8939.dtsi @@ -370,7 +370,7 @@ wcnss_mem: wcnss { }; venus_mem: venus { - size = <0x0 0x800000>; + size = <0x0 0x500000>; alignment = <0x0 0x100000>; alloc-ranges = <0x0 0x86800000 0x0 0x8000000>; no-map;