From patchwork Tue Feb 9 16:09:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 379440 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FA38C433DB for ; Tue, 9 Feb 2021 16:10:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D366164EBD for ; Tue, 9 Feb 2021 16:10:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232693AbhBIQKd (ORCPT ); Tue, 9 Feb 2021 11:10:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232588AbhBIQKa (ORCPT ); Tue, 9 Feb 2021 11:10:30 -0500 Received: from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com [IPv6:2607:f8b0:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DEF3C06174A for ; Tue, 9 Feb 2021 08:09:49 -0800 (PST) Received: by mail-oi1-x22b.google.com with SMTP id r75so6338867oie.11 for ; Tue, 09 Feb 2021 08:09:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZYKZ1+uVc7Mc/n2GPg1IchJB3wg4MYFyQPOLFn54wW0=; b=Fzwg8xypvGHSIYsgR32AcfLaKVaAwFDnuK1asXOr+AYW2OaiqVxG5Wh95tdKB9/AF3 GZ1pTiQLBDuFuL2GUaYu1egY8zvdVuE8vu/Y4gEqTbIUUq9fo7/D2IEWO0ZRTi8srXff U5tSYriry0a2GVL8X1v9Vc7VzgZ0o5pICueyjfoOf7auet+TM9rgJ36PPcKyQGdfsilX p5d3g5dD297QF29etUYpVbM4HU9Zz5Mjb8eGmjhFqHmHxZzj0dvM5vCoj0ca+JcWQjTS yLoZHKnxYuHFqG2HvtYgBKA9ZRQAjjzhuKRq3f/XsyDlKrqBhC97K6q3fpWaUnxzKRWB O00g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZYKZ1+uVc7Mc/n2GPg1IchJB3wg4MYFyQPOLFn54wW0=; b=lM0LwiMXBMkzlfKXnBko9Z+AhLSZNuo+Rdii+LqliDk7l91xmfIgCwNI6RpYc8/sTX nb9IWMpvF9BPInw+feGCj5icDh4Va+7xrnUqBHszk2Jt+rbUNzezKIaE3NnhkmvjgvUu f8puAGgDbETKrGy3CmatW5sHEnVwkll1WRvsQLkxDmvkPWejd7PID8StVe+rlC+JiJWc WXWc8oC0n1agBMablDbqCsS/f4GuYNC4nFaWS8Ua/nASw2f5DqPjuQY70twYiW1oChXs g++u8bHp/DAOCCw/wcYCacvve2Ge2m8ziS4UgKaC6n+QUxhpm50V3N1zm09qbRbIPIiu eZIQ== X-Gm-Message-State: AOAM532rrh62tZJdNqColBLxQFkbK/xoZgPRs7GhD+pNscwwKU/QewLJ eqAq8PznGLyjBm9kLNRRMMclsLTsZfvjlw== X-Google-Smtp-Source: ABdhPJzHP3tU5hePO3BPizaHbWnSHk2wUjVZtoP4s1lr2bCfGYzf1TxSzo9bhzvV31QEIG84FSigyA== X-Received: by 2002:aca:1906:: with SMTP id l6mr2871230oii.101.1612886988762; Tue, 09 Feb 2021 08:09:48 -0800 (PST) Received: from builder.lan (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id k4sm2725967ots.24.2021.02.09.08.09.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 08:09:47 -0800 (PST) From: Bjorn Andersson To: Andy Gross , Bjorn Andersson , Rob Herring , Doug Anderson Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] arm64: dts: qcom: sdm845: Move reserved-memory to devices Date: Tue, 9 Feb 2021 10:09:45 -0600 Message-Id: <20210209160946.29382-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The reserved-memory regions used for carrying firmware to be run on the various cores and co-processors in a Qualcomm platform differs in size, placement and presence based on each device's feature set and security configuration. Rather than providing some basic set that works on the MTP and then piecemeal patch this up on the various devices, push the configuration of these regions out to the individual device dts files. Signed-off-by: Bjorn Andersson --- arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 89 +++++++++++++------ arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 85 ++++++++++++++++++ arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 87 ++++++++++++++++++ .../boot/dts/qcom/sdm845-oneplus-common.dtsi | 78 +++++++++++++++- .../boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 45 ++++++---- arch/arm64/boot/dts/qcom/sdm845.dtsi | 83 ----------------- .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 86 ++++++++++++++++++ 7 files changed, 428 insertions(+), 125 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi b/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi index 216a74f0057c..2f44785d1af0 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi @@ -153,36 +153,66 @@ panel_in_edp: endpoint { * all modifications to the memory map (from sdm845.dtsi) in one place. */ -/* - * Our mpss_region is 8MB bigger than the default one and that conflicts - * with venus_mem and cdsp_mem. - * - * For venus_mem we'll delete and re-create at a different address. - * - * cdsp_mem isn't used on cheza right now so we won't bother re-creating it; but - * that also means we need to delete cdsp_pas. - */ -/delete-node/ &venus_mem; -/delete-node/ &cdsp_mem; -/delete-node/ &cdsp_pas; -/delete-node/ &gpu_mem; - -/* Increase the size from 120 MB to 128 MB */ -&mpss_region { - reg = <0 0x8e000000 0 0x8000000>; -}; - -/* Increase the size from 2MB to 8MB */ -&rmtfs_mem { - reg = <0 0x88f00000 0 0x800000>; -}; - / { reserved-memory { + tz_mem: memory@86200000 { + reg = <0 0x86200000 0 0x2d00000>; + no-map; + }; + + rmtfs_mem: memory@88f00000 { + compatible = "qcom,rmtfs-mem"; + reg = <0 0x88f00000 0 0x800000>; + no-map; + + qcom,client-id = <1>; + qcom,vmid = <15>; + }; + + ipa_fw_mem: memory@8c400000 { + reg = <0 0x8c400000 0 0x10000>; + no-map; + }; + + ipa_gsi_mem: memory@8c410000 { + reg = <0 0x8c410000 0 0x5000>; + no-map; + }; + + adsp_mem: memory@8c500000 { + reg = <0 0x8c500000 0 0x1a00000>; + no-map; + }; + + wlan_msa_mem: memory@8df00000 { + reg = <0 0x8df00000 0 0x100000>; + no-map; + }; + + mpss_region: memory@8e000000 { + reg = <0 0x8e000000 0 0x8000000>; + no-map; + }; + venus_mem: memory@96000000 { reg = <0 0x96000000 0 0x500000>; no-map; }; + + mba_region: memory@96500000 { + reg = <0 0x96500000 0 0x200000>; + no-map; + }; + + slpi_mem: memory@96700000 { + reg = <0 0x96700000 0 0x1400000>; + no-map; + }; + + spss_mem: memory@97b00000 { + reg = <0 0x97b00000 0 0x100000>; + no-map; + }; }; }; @@ -206,7 +236,6 @@ flash@0 { }; }; - &apps_rsc { pm8998-rpmh-regulators { compatible = "qcom,pm8998-rpmh-regulators"; @@ -645,6 +674,14 @@ &adreno_smmu { &mss_pil { iommus = <&apps_smmu 0x781 0x0>, <&apps_smmu 0x724 0x3>; + + mba { + memory-region = <&mba_region>; + }; + + mpss { + memory-region = <&mpss_region>; + }; }; &pm8998_pwrkey { @@ -850,6 +887,7 @@ &usb_2_qmpphy { &wifi { status = "okay"; + memory-region = <&wlan_msa_mem>; vdd-0.8-cx-mx-supply = <&src_pp800_l5a >; vdd-1.8-xo-supply = <&pp1800_l7a_wcn3990>; @@ -1321,6 +1359,7 @@ config { }; &venus { + memory-region = <&venus_mem>; video-firmware { iommus = <&apps_smmu 0x10b2 0x0>; }; diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts index c4ac6f5dc008..0c175685c135 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts @@ -157,6 +157,77 @@ cam3_avdd_2v8: reg_cam3_avdd_2v8 { vin-supply = <&vbat>; }; + reserved-memory { + tz_mem: memory@86200000 { + reg = <0 0x86200000 0 0x2d00000>; + no-map; + }; + + rmtfs_mem: memory@88f00000 { + compatible = "qcom,rmtfs-mem"; + reg = <0 0x88f00000 0 0x200000>; + no-map; + + qcom,client-id = <1>; + qcom,vmid = <15>; + }; + + ipa_fw_mem: memory@8c400000 { + reg = <0 0x8c400000 0 0x10000>; + no-map; + }; + + ipa_gsi_mem: memory@8c410000 { + reg = <0 0x8c410000 0 0x5000>; + no-map; + }; + + gpu_mem: memory@8c415000 { + reg = <0 0x8c415000 0 0x2000>; + no-map; + }; + + wlan_msa_mem: memory@8df00000 { + reg = <0 0x8df00000 0 0x100000>; + no-map; + }; + + mpss_region: memory@8e000000 { + reg = <0 0x8e000000 0 0x7800000>; + no-map; + }; + + adsp_mem: memory@8c500000 { + reg = <0 0x8c500000 0 0x1a00000>; + no-map; + }; + + venus_mem: memory@95800000 { + reg = <0 0x95800000 0 0x500000>; + no-map; + }; + + cdsp_mem: memory@95d00000 { + reg = <0 0x95d00000 0 0x800000>; + no-map; + }; + + mba_region: memory@96500000 { + reg = <0 0x96500000 0 0x200000>; + no-map; + }; + + slpi_mem: memory@96700000 { + reg = <0 0x96700000 0 0x1400000>; + no-map; + }; + + spss_mem: memory@97b00000 { + reg = <0 0x97b00000 0 0x100000>; + no-map; + }; + }; + pcie0_3p3v_dual: vldo-3v3-regulator { compatible = "regulator-fixed"; regulator-name = "VLDO_3V3"; @@ -244,6 +315,7 @@ vph_pwr: vph-pwr-regulator { &adsp_pas { status = "okay"; + memory-region = <&adsp_mem>; firmware-name = "qcom/sdm845/adsp.mdt"; }; @@ -390,6 +462,7 @@ vreg_bob: bob { &cdsp_pas { status = "okay"; + memory-region = <&cdsp_mem>; firmware-name = "qcom/sdm845/cdsp.mdt"; }; @@ -492,6 +565,14 @@ &mdss_mdp { &mss_pil { status = "okay"; firmware-name = "qcom/sdm845/mba.mbn", "qcom/sdm845/modem.mbn"; + + mba { + memory-region = <&mba_region>; + }; + + mpss { + memory-region = <&mpss_region>; + }; }; &pcie0 { @@ -999,6 +1080,10 @@ &ufs_mem_phy { vdda-pll-supply = <&vreg_l26a_1p2>; }; +&venus { + memory-region = <&venus_mem>; +}; + &wcd9340{ pinctrl-0 = <&wcd_intr_default>; pinctrl-names = "default"; diff --git a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts index 1372fe8601f5..aab598011c04 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts @@ -23,6 +23,77 @@ chosen { stdout-path = "serial0:115200n8"; }; + reserved-memory { + tz_mem: memory@86200000 { + reg = <0 0x86200000 0 0x2d00000>; + no-map; + }; + + rmtfs_mem: memory@88f00000 { + compatible = "qcom,rmtfs-mem"; + reg = <0 0x88f00000 0 0x200000>; + no-map; + + qcom,client-id = <1>; + qcom,vmid = <15>; + }; + + ipa_fw_mem: memory@8c400000 { + reg = <0 0x8c400000 0 0x10000>; + no-map; + }; + + ipa_gsi_mem: memory@8c410000 { + reg = <0 0x8c410000 0 0x5000>; + no-map; + }; + + gpu_mem: memory@8c415000 { + reg = <0 0x8c415000 0 0x2000>; + no-map; + }; + + wlan_msa_mem: memory@8df00000 { + reg = <0 0x8df00000 0 0x100000>; + no-map; + }; + + mpss_region: memory@8e000000 { + reg = <0 0x8e000000 0 0x7800000>; + no-map; + }; + + adsp_mem: memory@8c500000 { + reg = <0 0x8c500000 0 0x1a00000>; + no-map; + }; + + venus_mem: memory@95800000 { + reg = <0 0x95800000 0 0x500000>; + no-map; + }; + + cdsp_mem: memory@95d00000 { + reg = <0 0x95d00000 0 0x800000>; + no-map; + }; + + mba_region: memory@96500000 { + reg = <0 0x96500000 0 0x200000>; + no-map; + }; + + slpi_mem: memory@96700000 { + reg = <0 0x96700000 0 0x1400000>; + no-map; + }; + + spss_mem: memory@97b00000 { + reg = <0 0x97b00000 0 0x100000>; + no-map; + }; + }; + vph_pwr: vph-pwr-regulator { compatible = "regulator-fixed"; regulator-name = "vph_pwr"; @@ -50,6 +121,7 @@ vreg_s4a_1p8: pm8998-smps4 { &adsp_pas { status = "okay"; + memory-region = <&adsp_mem>; firmware-name = "qcom/sdm845/adsp.mdt"; }; @@ -351,6 +423,7 @@ vreg_s3c_0p6: smps3 { &cdsp_pas { status = "okay"; + memory-region = <&cdsp_mem>; firmware-name = "qcom/sdm845/cdsp.mdt"; }; @@ -459,6 +532,14 @@ &mdss_mdp { &mss_pil { status = "okay"; firmware-name = "qcom/sdm845/mba.mbn", "qcom/sdm845/modem.mbn"; + + mba { + memory-region = <&mba_region>; + }; + + mpss { + memory-region = <&mpss_region>; + }; }; &qupv3_id_1 { @@ -558,8 +639,14 @@ &usb_2_qmpphy { vdda-pll-supply = <&vdda_usb2_ss_core>; }; +&venus { + memory-region = <&venus_mem>; +}; + &wifi { status = "okay"; + memory-region = <&wlan_msa_mem>; + vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>; vdd-1.8-xo-supply = <&vreg_l7a_1p8>; vdd-1.3-rfa-supply = <&vreg_l17a_1p3>; diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi index 8f617f7b6d34..721d34ce1e39 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi @@ -15,8 +15,6 @@ #include "pm8998.dtsi" #include "pmi8998.dtsi" -/delete-node/ &rmtfs_mem; - / { aliases { hsuart0 = &uart6; @@ -46,6 +44,66 @@ vol-up { }; reserved-memory { + tz_mem: memory@86200000 { + reg = <0 0x86200000 0 0x2d00000>; + no-map; + }; + + ipa_fw_mem: memory@8c400000 { + reg = <0 0x8c400000 0 0x10000>; + no-map; + }; + + ipa_gsi_mem: memory@8c410000 { + reg = <0 0x8c410000 0 0x5000>; + no-map; + }; + + gpu_mem: memory@8c415000 { + reg = <0 0x8c415000 0 0x2000>; + no-map; + }; + + adsp_mem: memory@8c500000 { + reg = <0 0x8c500000 0 0x1a00000>; + no-map; + }; + + wlan_msa_mem: memory@8df00000 { + reg = <0 0x8df00000 0 0x100000>; + no-map; + }; + + mpss_region: memory@8e000000 { + reg = <0 0x8e000000 0 0x7800000>; + no-map; + }; + + venus_mem: memory@95800000 { + reg = <0 0x95800000 0 0x500000>; + no-map; + }; + + cdsp_mem: memory@95d00000 { + reg = <0 0x95d00000 0 0x800000>; + no-map; + }; + + mba_region: memory@96500000 { + reg = <0 0x96500000 0 0x200000>; + no-map; + }; + + slpi_mem: memory@96700000 { + reg = <0 0x96700000 0 0x1400000>; + no-map; + }; + + spss_mem: memory@97b00000 { + reg = <0 0x97b00000 0 0x100000>; + no-map; + }; + /* * The rmtfs memory region in downstream is 'dynamically allocated' * but given the same address every time. Hard code it as this address is @@ -125,6 +183,7 @@ ts_1p8_supply: ts-1p8-regulator { &adsp_pas { status = "okay"; + memory-region = <&adsp_mem>; firmware-name = "qcom/sdm845/oneplus6/adsp.mbn"; }; @@ -291,6 +350,7 @@ vreg_s3c_0p6: smps3 { &cdsp_pas { status = "okay"; + memory-region = <&cdsp_mem>; firmware-name = "qcom/sdm845/oneplus6/cdsp.mbn"; }; @@ -399,6 +459,14 @@ &mdss_mdp { &mss_pil { status = "okay"; firmware-name = "qcom/sdm845/oneplus6/mba.mbn", "qcom/sdm845/oneplus6/modem.mbn"; + + mba { + memory-region = <&mba_region>; + }; + + mpss { + memory-region = <&mpss_region>; + }; }; &pm8998_gpio { @@ -612,8 +680,14 @@ mux { }; }; +&venus { + memory-region = <&venus_mem>; +}; + &wifi { status = "okay"; + memory-region = <&wlan_msa_mem>; + vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>; vdd-1.8-xo-supply = <&vreg_l7a_1p8>; vdd-1.3-rfa-supply = <&vreg_l17a_1p3>; diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts index 86cbae63eaf7..a9a54273c1b4 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts @@ -9,21 +9,6 @@ #include "pm8998.dtsi" #include "pmi8998.dtsi" -/* - * Delete following upstream (sdm845.dtsi) reserved - * memory mappings which are different in this device. - */ -/delete-node/ &tz_mem; -/delete-node/ &adsp_mem; -/delete-node/ &wlan_msa_mem; -/delete-node/ &mpss_region; -/delete-node/ &venus_mem; -/delete-node/ &cdsp_mem; -/delete-node/ &mba_region; -/delete-node/ &slpi_mem; -/delete-node/ &spss_mem; -/delete-node/ &rmtfs_mem; - / { model = "Xiaomi Pocophone F1"; compatible = "xiaomi,beryllium", "qcom,sdm845"; @@ -57,6 +42,21 @@ tz_mem: memory@86200000 { no-map; }; + ipa_fw_mem: memory@8c400000 { + reg = <0 0x8c400000 0 0x10000>; + no-map; + }; + + ipa_gsi_mem: memory@8c410000 { + reg = <0 0x8c410000 0 0x5000>; + no-map; + }; + + gpu_mem: memory@8c415000 { + reg = <0 0x8c415000 0 0x2000>; + no-map; + }; + adsp_mem: memory@8c500000 { reg = <0 0x8c500000 0 0x1e00000>; no-map; @@ -119,6 +119,7 @@ vreg_s4a_1p8: vreg-s4a-1p8 { &adsp_pas { status = "okay"; + memory-region = <&adsp_mem>; firmware-name = "qcom/sdm845/adsp.mdt"; }; @@ -197,6 +198,7 @@ vreg_l26a_1p2: ldo26 { &cdsp_pas { status = "okay"; + memory-region = <&cdsp_mem>; firmware-name = "qcom/sdm845/cdsp.mdt"; }; @@ -218,6 +220,14 @@ zap-shader { &mss_pil { status = "okay"; firmware-name = "qcom/sdm845/mba.mbn", "qcom/sdm845/modem.mdt"; + + mba { + memory-region = <&mba_region>; + }; + + mpss { + memory-region = <&mpss_region>; + }; }; &pm8998_gpio { @@ -345,8 +355,13 @@ &usb_1_qmpphy { vdda-pll-supply = <&vreg_l1a_0p875>; }; +&venus { + memory-region = <&venus_mem>; +}; + &wifi { status = "okay"; + memory-region = <&wlan_msa_mem>; vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>; vdd-1.8-xo-supply = <&vreg_l7a_1p8>; diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 454f794af547..084f5471eddf 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -104,20 +104,6 @@ smem_mem: memory@86000000 { no-map; }; - tz_mem: memory@86200000 { - reg = <0 0x86200000 0 0x2d00000>; - no-map; - }; - - rmtfs_mem: memory@88f00000 { - compatible = "qcom,rmtfs-mem"; - reg = <0 0x88f00000 0 0x200000>; - no-map; - - qcom,client-id = <1>; - qcom,vmid = <15>; - }; - qseecom_mem: memory@8ab00000 { reg = <0 0x8ab00000 0 0x1400000>; no-map; @@ -127,61 +113,6 @@ camera_mem: memory@8bf00000 { reg = <0 0x8bf00000 0 0x500000>; no-map; }; - - ipa_fw_mem: memory@8c400000 { - reg = <0 0x8c400000 0 0x10000>; - no-map; - }; - - ipa_gsi_mem: memory@8c410000 { - reg = <0 0x8c410000 0 0x5000>; - no-map; - }; - - gpu_mem: memory@8c415000 { - reg = <0 0x8c415000 0 0x2000>; - no-map; - }; - - adsp_mem: memory@8c500000 { - reg = <0 0x8c500000 0 0x1a00000>; - no-map; - }; - - wlan_msa_mem: memory@8df00000 { - reg = <0 0x8df00000 0 0x100000>; - no-map; - }; - - mpss_region: memory@8e000000 { - reg = <0 0x8e000000 0 0x7800000>; - no-map; - }; - - venus_mem: memory@95800000 { - reg = <0 0x95800000 0 0x500000>; - no-map; - }; - - cdsp_mem: memory@95d00000 { - reg = <0 0x95d00000 0 0x800000>; - no-map; - }; - - mba_region: memory@96500000 { - reg = <0 0x96500000 0 0x200000>; - no-map; - }; - - slpi_mem: memory@96700000 { - reg = <0 0x96700000 0 0x1400000>; - no-map; - }; - - spss_mem: memory@97b00000 { - reg = <0 0x97b00000 0 0x100000>; - no-map; - }; }; cpus { @@ -766,8 +697,6 @@ adsp_pas: remoteproc-adsp { clocks = <&rpmhcc RPMH_CXO_CLK>; clock-names = "xo"; - memory-region = <&adsp_mem>; - qcom,smem-states = <&adsp_smp2p_out 0>; qcom,smem-state-names = "stop"; @@ -865,8 +794,6 @@ cdsp_pas: remoteproc-cdsp { clocks = <&rpmhcc RPMH_CXO_CLK>; clock-names = "xo"; - memory-region = <&cdsp_mem>; - qcom,smem-states = <&cdsp_smp2p_out 0>; qcom,smem-state-names = "stop"; @@ -2987,14 +2914,6 @@ mss_pil: remoteproc@4080000 { <&rpmhpd SDM845_MSS>; power-domain-names = "load_state", "cx", "mx", "mss"; - mba { - memory-region = <&mba_region>; - }; - - mpss { - memory-region = <&mpss_region>; - }; - glink-edge { interrupts = ; label = "modem"; @@ -3851,7 +3770,6 @@ venus: video-codec@aa00000 { "vcodec1_core", "vcodec1_bus"; iommus = <&apps_smmu 0x10a0 0x8>, <&apps_smmu 0x10b0 0x0>; - memory-region = <&venus_mem>; interconnects = <&mmss_noc MASTER_VIDEO_P0 0 &mem_noc SLAVE_EBI1 0>, <&gladiator_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_VENUS_CFG 0>; interconnect-names = "video-mem", "cpu-cfg"; @@ -4775,7 +4693,6 @@ wifi: wifi@18800000 { status = "disabled"; reg = <0 0x18800000 0 0x800000>; reg-names = "membase"; - memory-region = <&wlan_msa_mem>; clock-names = "cxo_ref_clk_pin"; clocks = <&rpmhcc RPMH_RF_CLK2>; interrupts = diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts index 43e33a1359d1..9c2ab377faf1 100644 --- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts +++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts @@ -59,6 +59,77 @@ panel_in_edp: endpoint { }; }; + reserved-memory { + tz_mem: memory@86200000 { + reg = <0 0x86200000 0 0x2d00000>; + no-map; + }; + + rmtfs_mem: memory@88f00000 { + compatible = "qcom,rmtfs-mem"; + reg = <0 0x88f00000 0 0x200000>; + no-map; + + qcom,client-id = <1>; + qcom,vmid = <15>; + }; + + ipa_fw_mem: memory@8c400000 { + reg = <0 0x8c400000 0 0x10000>; + no-map; + }; + + ipa_gsi_mem: memory@8c410000 { + reg = <0 0x8c410000 0 0x5000>; + no-map; + }; + + gpu_mem: memory@8c415000 { + reg = <0 0x8c415000 0 0x2000>; + no-map; + }; + + adsp_mem: memory@8c500000 { + reg = <0 0x8c500000 0 0x1a00000>; + no-map; + }; + + wlan_msa_mem: memory@8df00000 { + reg = <0 0x8df00000 0 0x100000>; + no-map; + }; + + mpss_region: memory@8e000000 { + reg = <0 0x8e000000 0 0x7800000>; + no-map; + }; + + venus_mem: memory@95800000 { + reg = <0 0x95800000 0 0x500000>; + no-map; + }; + + cdsp_mem: memory@95d00000 { + reg = <0 0x95d00000 0 0x800000>; + no-map; + }; + + mba_region: memory@96500000 { + reg = <0 0x96500000 0 0x200000>; + no-map; + }; + + slpi_mem: memory@96700000 { + reg = <0 0x96700000 0 0x1400000>; + no-map; + }; + + spss_mem: memory@97b00000 { + reg = <0 0x97b00000 0 0x100000>; + no-map; + }; + }; + sn65dsi86_refclk: sn65dsi86-refclk { compatible = "fixed-clock"; #clock-cells = <0>; @@ -75,6 +146,7 @@ backlight: backlight { &adsp_pas { firmware-name = "qcom/LENOVO/81JL/qcadsp850.mbn"; + memory-region = <&adsp_mem>; status = "okay"; }; @@ -284,6 +356,7 @@ vreg_lvs2a_1p8: lvs2 { &cdsp_pas { firmware-name = "qcom/LENOVO/81JL/qccdsp850.mbn"; + memory-region = <&cdsp_mem>; status = "okay"; }; @@ -437,6 +510,14 @@ &mdss_mdp { &mss_pil { firmware-name = "qcom/LENOVO/81JL/qcdsp1v2850.mbn", "qcom/LENOVO/81JL/qcdsp2850.mbn"; + + mba { + memory-region = <&mba_region>; + }; + + mpss { + memory-region = <&mpss_region>; + }; }; &qup_i2c10_default { @@ -696,6 +777,10 @@ &usb_2_qmpphy { vdda-pll-supply = <&vdda_usb2_ss_core>; }; +&venus { + memory-region = <&venus_mem>; +}; + &wcd9340{ pinctrl-0 = <&wcd_intr_default>; pinctrl-names = "default"; @@ -731,6 +816,7 @@ right_spkr: wsa8810-right{ &wifi { status = "okay"; + memory-region = <&wlan_msa_mem>; vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>; vdd-1.8-xo-supply = <&vreg_l7a_1p8>; From patchwork Tue Feb 9 16:09:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 379358 Delivered-To: patch@linaro.org Received: by 2002:a02:b18a:0:0:0:0:0 with SMTP id t10csp360688jah; Tue, 9 Feb 2021 08:10:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJw7jjGIsvRnjF2DpBgf02zvdzoJDN65AUJGBbBdGg84h9vdxsLb/hwYqueFeWSG7anQlm37 X-Received: by 2002:a17:906:3850:: with SMTP id w16mr8216476ejc.286.1612887038804; Tue, 09 Feb 2021 08:10:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612887038; cv=none; d=google.com; s=arc-20160816; b=NFjc/jBhBJtFF5REtMK1l7v/gvtvLpBvV3vzOJBNjwssnZbqrcabOI7PxIWHiLdNTK 9cs0O6PZb3usNrs+JVP7h8hrkiVMOQa6iRzgJKEzdyxOOwOuvs+Zp3AzPg1kA5VMBG0C 1Cld4I0dxGclnosBk3Emo05MKeFWVDFwJN2NjQuK7M33oougvttpWqSRvFLbgsU+N0TF AxvqU3Eu815gHvejjK5ON9nulUv2eZgryBoqOJ/BKWgZTNWoGkK9Cua3gU432OrNNFGh KAA6nMFvaAZ/FzNEncy2WH73SJiR6QLvzGcn+4/SzkZT/yL3ahifNoTvoNxOcj5/42uR NxtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4/inwIB/bagSTME5nAGqiwX4oeNlpTqINvLjf+dIyzg=; b=Qln3Qaw7TCVdfKRLcEVKRRDP6t43yimTF5MiZtvCTMFKHJfYZtxmgHWRDybA+6ihOv IAmAmEy50ilTshrz2k38iXilyVW3X6IsWYC0TGs1dsvg8nEwSEyl63CDJDvFj4pWiUm2 mxywZgKuCXn+j9yT6DQwnYEzdml41Z0JC9FtpFdH3WN0dCe9aCnKaAWcSfzaBtwcWaX9 0K3xaGEyZlgf3QxRmasbFVHxYpkLTGc2NngbsPJnSlfq7wSPcFYL/qFEVttLYZ1UUv+U V9ileoX4S9mio8/UnOtWapJACNuklU8D5ZbRn5O8rRY+rtdXXVf0/4PmNh3r5Ebjo2BK +Y1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aTuaZb6p; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ho34si9083012ejc.343.2021.02.09.08.10.36; Tue, 09 Feb 2021 08:10:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aTuaZb6p; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232630AbhBIQKe (ORCPT + 16 others); Tue, 9 Feb 2021 11:10:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232614AbhBIQKa (ORCPT ); Tue, 9 Feb 2021 11:10:30 -0500 Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E095C0613D6 for ; Tue, 9 Feb 2021 08:09:50 -0800 (PST) Received: by mail-ot1-x329.google.com with SMTP id y11so17947477otq.1 for ; Tue, 09 Feb 2021 08:09:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4/inwIB/bagSTME5nAGqiwX4oeNlpTqINvLjf+dIyzg=; b=aTuaZb6pOYgSh7gL+OPQi1FSFbm73knDRD5yGvNdtv8Uacz+GfBTOZQ6Tn5ksK7UN3 b5axrpCr90QYxVSyOP4a1/eOl3Wz5Y7aLKuwF4eqwbNVcERHaIM1mhKr2HY/wGG2UAyD K609NjpuCtYQmznAkIvbat5B2JVeccB7i6uC+CTWS6pOJOPBEVBKC0vZ/qj/R+TPmGGb CgHyMOV6p6tAIWl8/llVLy5P0at8AacIaGShbAaKcMeffgBCiwkdBhw12NWXBMb7l5fT jTRDM68XS6J0MfPge8ogaOdulB9CwCHHlBJvTfBVglCAbVJDuFNa0GXZT7C3KNSv2Uh1 UTQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4/inwIB/bagSTME5nAGqiwX4oeNlpTqINvLjf+dIyzg=; b=BVr3ItZCb0d9weTOuipUfjIXRXhKzxu3A0u/J0ggn2AgXEr+b+jwlYB58f2oLbNRT2 L+uufVMeB1IBxprYN0ELyHJPswNKOyX8uoDnzwIqpE9BUPyNP/8y5KBMaRoncT1GRvm8 NnuayXkrndm72h2icQRIhxxTdG/0n03RlbFA31kcbmLK2UNhVdaG1rOHw14SEughQaLo yjM5aQgpBmstzxvnQVFAJc8z60id8hT7yQt0yACbT9yCRc16MdyWfc8DLGMGCfRQbzlg r+CfULHxl30aT24SSn4ru3pApY+Lvp33Ct6A/oq5dpMngAzZP4KGXyfz6OWU3OdCzi8O z/Hw== X-Gm-Message-State: AOAM530MsUd7M6ZBkgFMIzzQsQonAqZeINFHdrfucwZCCTVjIijnxo+p FsiHMivblaMMGRaTL4yIHnY0Lw== X-Received: by 2002:a9d:21ca:: with SMTP id s68mr16333016otb.164.1612886989714; Tue, 09 Feb 2021 08:09:49 -0800 (PST) Received: from builder.lan (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id k4sm2725967ots.24.2021.02.09.08.09.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 08:09:49 -0800 (PST) From: Bjorn Andersson To: Andy Gross , Bjorn Andersson , Rob Herring Cc: Doug Anderson , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] arm64: dts: qcom: sdm850-yoga: Enable IPA Date: Tue, 9 Feb 2021 10:09:46 -0600 Message-Id: <20210209160946.29382-2-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210209160946.29382-1-bjorn.andersson@linaro.org> References: <20210209160946.29382-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The ipa_fws.elf found in the Lenovo Yoga C630 isn't packed like the one found in e.g. the MTP, so it doesn't fit in the "standard" ipa_fws memory region. Further more, authentication of ipa_fws at the usual base address is rejected by the Peripheral Authentication Service (in TrustZone), so some shuffling and trial and error was used to come up with acceptable regions. With this in order, enable the IPA device. Signed-off-by: Bjorn Andersson --- .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) -- 2.30.0 diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts index 9c2ab377faf1..4dd5820b3b31 100644 --- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts +++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts @@ -74,28 +74,23 @@ rmtfs_mem: memory@88f00000 { qcom,vmid = <15>; }; - ipa_fw_mem: memory@8c400000 { - reg = <0 0x8c400000 0 0x10000>; + wlan_msa_mem: memory@8c400000 { + reg = <0 0x8c400000 0 0x100000>; no-map; }; - ipa_gsi_mem: memory@8c410000 { - reg = <0 0x8c410000 0 0x5000>; + gpu_mem: memory@8c515000 { + reg = <0 0x8c515000 0 0x2000>; no-map; }; - gpu_mem: memory@8c415000 { - reg = <0 0x8c415000 0 0x2000>; + ipa_fw_mem: memory@8c517000 { + reg = <0 0x8c517000 0 0x5a000>; no-map; }; - adsp_mem: memory@8c500000 { - reg = <0 0x8c500000 0 0x1a00000>; - no-map; - }; - - wlan_msa_mem: memory@8df00000 { - reg = <0 0x8df00000 0 0x100000>; + adsp_mem: memory@8c600000 { + reg = <0 0x8c600000 0 0x1a00000>; no-map; }; @@ -500,6 +495,11 @@ ecsh: hid@5c { }; }; +&ipa { + status = "okay"; + memory-region = <&ipa_fw_mem>; +}; + &mdss { status = "okay"; };