From patchwork Thu Aug 12 09:17:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sai Prakash Ranjan X-Patchwork-Id: 496195 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 6B508C4338F for ; Thu, 12 Aug 2021 09:18:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4B19261038 for ; Thu, 12 Aug 2021 09:18:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235317AbhHLJSq (ORCPT ); Thu, 12 Aug 2021 05:18:46 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:42379 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235942AbhHLJSp (ORCPT ); Thu, 12 Aug 2021 05:18:45 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1628759901; h=Content-Transfer-Encoding: MIME-Version: References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=pf9qlGCYLgP7q13sUOhEyb3wxcVhVGD2t4et5bvkFb0=; b=SEjmRMLUK5HKkTdFF2icWP1y1WS9BEtTabxsFB1scIYWxn0zN2sFLFnBtCEPYXG6Qr0O9PYy gVsvSV5XfIgLdcL2EitOzFaW/1SXGP/3U5l58XjhBhdmYbXoKTqM9BkBiZowThqAWzacs/7v tvfrCjey4qbi7G++6NtxJCb/c3c= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI1YmJiNiIsICJkZXZpY2V0cmVlQHZnZXIua2VybmVsLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n02.prod.us-east-1.postgun.com with SMTP id 6114e75691487ad520d0a6e1 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 12 Aug 2021 09:18:14 GMT Sender: saiprakash.ranjan=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id D49C1C43144; Thu, 12 Aug 2021 09:18:13 +0000 (UTC) Received: from blr-ubuntu-253.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: saiprakash.ranjan) by smtp.codeaurora.org (Postfix) with ESMTPSA id A2687C43460; Thu, 12 Aug 2021 09:18:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org A2687C43460 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=saiprakash.ranjan@codeaurora.org From: Sai Prakash Ranjan To: Andy Gross , Bjorn Andersson , Rob Herring Cc: devicetree@vger.kernel.org, Stephen Boyd , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Rajendra Nayak , Sibi Sankar , Sai Prakash Ranjan Subject: [PATCH 1/3] soc: qcom: Add download mode support Date: Thu, 12 Aug 2021 14:47:40 +0530 Message-Id: <8282b67c332fdda1f5768578a91bff5a9975df05.1628757036.git.saiprakash.ranjan@codeaurora.org> X-Mailer: git-send-email 2.29.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add support for download mode on QTI platforms with SDI (System Debug Image) enabled firmware. SDI checks for the download mode cookies set by the kernel to decide on whether to enter download mode or not. Additionally, SDI needs to be disabled in case of normal reboot to prevent entering download mode for every reboot and is enabled for for crash reboots such as kernel panic and other crashes such as watchdog bite/NOC errors handled by other entities like secure world. Signed-off-by: Sai Prakash Ranjan --- MAINTAINERS | 7 ++ drivers/soc/qcom/Kconfig | 10 ++ drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/download_mode.c | 152 +++++++++++++++++++++++++++++++ 4 files changed, 170 insertions(+) create mode 100644 drivers/soc/qcom/download_mode.c diff --git a/MAINTAINERS b/MAINTAINERS index a61f4f3b78a9..e51226f11bce 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -15327,6 +15327,13 @@ L: linux-arm-msm@vger.kernel.org S: Maintained F: drivers/crypto/qce/ +QUALCOMM DOWNLOAD MODE DRIVER +M: Sai Prakash Ranjan +L: linux-arm-msm@vger.kernel.org +S: Maintained +F: Documentation/devicetree/bindings/arm/msm/qcom,dload-mode.yaml +F: drivers/soc/qcom/download_mode.c + QUALCOMM EMAC GIGABIT ETHERNET DRIVER M: Timur Tabi L: netdev@vger.kernel.org diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig index 79b568f82a1c..dc41fcfc4ac8 100644 --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig @@ -42,6 +42,16 @@ config QCOM_CPR To compile this driver as a module, choose M here: the module will be called qcom-cpr +config QCOM_DLOAD_MODE + tristate "QCOM Download Mode support" + depends on ARCH_QCOM || COMPILE_TEST + help + Say Y here to enable support for download mode on QTI platforms. + + Download mode driver configures the download mode cookies and SDI + (System Debug Image) required to collect ramdump for post-mortem + debug on Qualcomm Technologies, Inc. platforms. + config QCOM_GENI_SE tristate "QCOM GENI Serial Engine Driver" depends on ARCH_QCOM || COMPILE_TEST diff --git a/drivers/soc/qcom/Makefile b/drivers/soc/qcom/Makefile index ad675a6593d0..674520c9828e 100644 --- a/drivers/soc/qcom/Makefile +++ b/drivers/soc/qcom/Makefile @@ -4,6 +4,7 @@ obj-$(CONFIG_QCOM_AOSS_QMP) += qcom_aoss.o obj-$(CONFIG_QCOM_GENI_SE) += qcom-geni-se.o obj-$(CONFIG_QCOM_COMMAND_DB) += cmd-db.o obj-$(CONFIG_QCOM_CPR) += cpr.o +obj-$(CONFIG_QCOM_DLOAD_MODE) += download_mode.o obj-$(CONFIG_QCOM_GSBI) += qcom_gsbi.o obj-$(CONFIG_QCOM_MDT_LOADER) += mdt_loader.o obj-$(CONFIG_QCOM_OCMEM) += ocmem.o diff --git a/drivers/soc/qcom/download_mode.c b/drivers/soc/qcom/download_mode.c new file mode 100644 index 000000000000..519fdbe8669b --- /dev/null +++ b/drivers/soc/qcom/download_mode.c @@ -0,0 +1,152 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2021, The Linux Foundation. All rights reserved. + */ + +#include +#include +#include +#include +#include +#include +#include + +#define DLOAD_MODE_COOKIE1 0xe47b337d +#define DLOAD_MODE_COOKIE2 0xce14091a + +struct qcom_dload_mode { + void __iomem *dload_mode; + void __iomem *sdi_disable; + bool in_panic; +}; + +static struct qcom_dload_mode *dmode; + +static int dload_mode_reboot_notifier(struct notifier_block *self, + unsigned long v, void *p) +{ + /* + * Don't enter download mode for normal reboot, so clear the + * download mode cookie and disable SDI. + */ + if (!dmode->in_panic) { + writel(0, dmode->dload_mode); + writel(1, dmode->sdi_disable); + } + + return NOTIFY_DONE; +} + +static int dload_mode_panic_notifier(struct notifier_block *self, + unsigned long v, void *p) +{ + dmode->in_panic = true; + + return NOTIFY_DONE; +} + +static struct notifier_block dload_mode_reboot_nb = { + .notifier_call = dload_mode_reboot_notifier, +}; + +static struct notifier_block dload_mode_panic_nb = { + .notifier_call = dload_mode_panic_notifier, +}; + +static void qcom_unset_dload_mode(void) +{ + writel(0, dmode->dload_mode); + writel(0, dmode->dload_mode + sizeof(u32)); +} + +static void qcom_set_dload_mode(void) +{ + writel(DLOAD_MODE_COOKIE1, dmode->dload_mode); + writel(DLOAD_MODE_COOKIE2, dmode->dload_mode + sizeof(u32)); +} + +static int __init qcom_dload_mode_init(void) +{ + struct resource imem, sdi_base; + struct of_phandle_args args; + struct device_node *np; + int ret; + + dmode = kzalloc(sizeof(*dmode), GFP_KERNEL); + if (!dmode) + return -ENOMEM; + + np = of_find_compatible_node(NULL, NULL, "qcom,dload-mode"); + if (!np) + return -ENOENT; + + ret = of_address_to_resource(np, 0, &imem); + if (ret < 0) + return ret; + + ret = of_parse_phandle_with_fixed_args(np, + "qcom,sdi-disable-regs", + 2, 0, &args); + of_node_put(np); + if (ret < 0) { + pr_err("Failed to parse sdi-disable-regs\n"); + return -EINVAL; + } + + ret = of_address_to_resource(args.np, 0, &sdi_base); + of_node_put(args.np); + if (ret < 0) + return ret; + + dmode->dload_mode = ioremap(imem.start, resource_size(&imem)); + if (!dmode->dload_mode) { + pr_err("Failed to map download mode region\n"); + return -ENOMEM; + } + + dmode->sdi_disable = ioremap(sdi_base.start + args.args[0], args.args[1]); + if (!dmode->sdi_disable) { + pr_err("Failed to map sdi disable region\n"); + return -ENOMEM; + } + + ret = atomic_notifier_chain_register(&panic_notifier_list, + &dload_mode_panic_nb); + if (ret) { + pr_err("Failed to register panic notifier: %d\n", ret); + return ret; + } + + ret = register_reboot_notifier(&dload_mode_reboot_nb); + if (ret) { + pr_err("Failed to register reboot notifier: %d\n", ret); + return ret; + } + + /* + * Set the download mode cookies here so that after this point on + * any crash handled either by kernel or other crashes such as + * watchdog bite handled by other entities like secure world, + * download mode is entered. + */ + qcom_set_dload_mode(); + + return 0; +} +device_initcall(qcom_dload_mode_init); + +static void __exit qcom_dload_mode_exit(void) +{ + qcom_unset_dload_mode(); + unregister_reboot_notifier(&dload_mode_reboot_nb); + atomic_notifier_chain_unregister(&panic_notifier_list, + &dload_mode_panic_nb); + iounmap(dmode->sdi_disable); + iounmap(dmode->dload_mode); + kfree(dmode); + dmode = NULL; +} +module_exit(qcom_dload_mode_exit); + +MODULE_DESCRIPTION("Qualcomm Technologies, Inc. Download Mode driver"); +MODULE_LICENSE("GPL v2"); From patchwork Thu Aug 12 09:17:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sai Prakash Ranjan X-Patchwork-Id: 496194 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 6D6A0C4338F for ; Thu, 12 Aug 2021 09:18:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 52DC46101E for ; Thu, 12 Aug 2021 09:18:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235396AbhHLJTE (ORCPT ); Thu, 12 Aug 2021 05:19:04 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:10727 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235395AbhHLJTB (ORCPT ); Thu, 12 Aug 2021 05:19:01 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1628759916; h=Content-Transfer-Encoding: MIME-Version: References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=H9BL987TXxQr8icEZmvAmp/XVAdMz0I11U/9lBuccFU=; b=iS/uSkFJ/KIC30ZgUFl2GVUAWTV/QTUOC/T+yGP1PNMI/n0rXoKc+LWgbfN8GTqyM27bN8ba QmYlsq5QfAqBf5WEKb9ze1SRMHouMqGmGs8/ZGzQoGqMBvg3RjWnpdfsKYnw3NUUUoPweDa5 ciAnCx0JxtKIv6z3KUxzB1ViEVI= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI1YmJiNiIsICJkZXZpY2V0cmVlQHZnZXIua2VybmVsLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n01.prod.us-east-1.postgun.com with SMTP id 6114e75b66ff107904654f72 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 12 Aug 2021 09:18:19 GMT Sender: saiprakash.ranjan=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id AC8B7C43149; Thu, 12 Aug 2021 09:18:18 +0000 (UTC) Received: from blr-ubuntu-253.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: saiprakash.ranjan) by smtp.codeaurora.org (Postfix) with ESMTPSA id C7A6AC4360C; Thu, 12 Aug 2021 09:18:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org C7A6AC4360C Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=saiprakash.ranjan@codeaurora.org From: Sai Prakash Ranjan To: Andy Gross , Bjorn Andersson , Rob Herring Cc: devicetree@vger.kernel.org, Stephen Boyd , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Rajendra Nayak , Sibi Sankar , Sai Prakash Ranjan Subject: [PATCH 2/3] dt-bindings: msm: Add QTI download mode support binding Date: Thu, 12 Aug 2021 14:47:41 +0530 Message-Id: <217c22d40e0a9db713e2a55623408eca88166897.1628757036.git.saiprakash.ranjan@codeaurora.org> X-Mailer: git-send-email 2.29.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add device tree binding for QTI download mode cookies region found in IMEM. Signed-off-by: Sai Prakash Ranjan --- .../bindings/arm/msm/qcom,dload-mode.yaml | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/msm/qcom,dload-mode.yaml diff --git a/Documentation/devicetree/bindings/arm/msm/qcom,dload-mode.yaml b/Documentation/devicetree/bindings/arm/msm/qcom,dload-mode.yaml new file mode 100644 index 000000000000..90b9b6a9b75e --- /dev/null +++ b/Documentation/devicetree/bindings/arm/msm/qcom,dload-mode.yaml @@ -0,0 +1,53 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/msm/qcom,dload-mode.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Download Mode binding + +maintainers: + - Sai Prakash Ranjan + +description: + Qualcomm download mode cookies memory region in IMEM is used by SDI + (System Debug Image) firmware to determine whether to enter download + mode or not to collect ramdump for post mortem debug. + +properties: + compatible: + const: qcom,dload-mode + + reg: + maxItems: 1 + + qcom,sdi-disable-regs: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: + Phandle reference to a syscon representing TCSR followed by the + offset and length for SDI disable register. + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + imem@146aa000 { + compatible = "simple-mfd"; + reg = <0x146aa000 0x2000>; + + #address-cells = <1>; + #size-cells = <1>; + + ranges = <0 0x146aa000 0x2000>; + + dload-mode@1c00 { + compatible = "qcom,dload-mode"; + reg = <0x1c00 0x1000>; + qcom,sdi-disable-regs = <&tcsr_regs 0x3a000 0x4>; + }; + }; +... From patchwork Thu Aug 12 09:17:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sai Prakash Ranjan X-Patchwork-Id: 496772 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 6D6CEC432BE for ; Thu, 12 Aug 2021 09:18:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 42227610A4 for ; Thu, 12 Aug 2021 09:18:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236023AbhHLJTE (ORCPT ); Thu, 12 Aug 2021 05:19:04 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:42379 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235396AbhHLJTC (ORCPT ); Thu, 12 Aug 2021 05:19:02 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1628759917; h=Content-Transfer-Encoding: MIME-Version: References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=6DoUioO1YYcblLi7ZvqwIBjq9xPyO/yESMdoeOHtecE=; b=nOtdmrnnSq42csHffGDScnq6PqbsJRCeUXcIX7h+l7IAwQXzfRewfSJLperSyW6PNhcX5cda ebX/qaJhYM1oPGkSAf21GdG5zfrG4SA5PUOwmVxHqDTwCpcY1A9a3Qin2Orvt8e7mTXKSeCe j/iPMjWanRl4AZMrredOOAczfuc= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI1YmJiNiIsICJkZXZpY2V0cmVlQHZnZXIua2VybmVsLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n04.prod.us-east-1.postgun.com with SMTP id 6114e75f7ee604097727d58c (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 12 Aug 2021 09:18:23 GMT Sender: saiprakash.ranjan=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 8AF8DC43217; Thu, 12 Aug 2021 09:18:22 +0000 (UTC) Received: from blr-ubuntu-253.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: saiprakash.ranjan) by smtp.codeaurora.org (Postfix) with ESMTPSA id 8544FC43146; Thu, 12 Aug 2021 09:18:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 8544FC43146 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=saiprakash.ranjan@codeaurora.org From: Sai Prakash Ranjan To: Andy Gross , Bjorn Andersson , Rob Herring Cc: devicetree@vger.kernel.org, Stephen Boyd , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Rajendra Nayak , Sibi Sankar , Sai Prakash Ranjan Subject: [PATCH 3/3] arm64: dts: qcom: sc7180: Add IMEM, pil info and download mode region Date: Thu, 12 Aug 2021 14:47:42 +0530 Message-Id: <39064a2db95ccc2cb5eef003569bef2de651c8ed.1628757036.git.saiprakash.ranjan@codeaurora.org> X-Mailer: git-send-email 2.29.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add IMEM, pil info and download mode DT nodes for SC7180 SoC which will help in the post-mortem debug. Signed-off-by: Sai Prakash Ranjan --- arch/arm64/boot/dts/qcom/sc7180.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi index 47b20ba69057..f2957db166e9 100644 --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi @@ -3222,6 +3222,27 @@ spmi_bus: spmi@c440000 { cell-index = <0>; }; + imem@146aa000 { + compatible = "simple-mfd"; + reg = <0 0x146aa000 0 0x2000>; + + #address-cells = <1>; + #size-cells = <1>; + + ranges = <0 0 0x146aa000 0x2000>; + + pil-reloc@94c { + compatible = "qcom,pil-reloc-info"; + reg = <0x94c 0xc8>; + }; + + dload-mode@1c00 { + compatible = "qcom,dload-mode"; + reg = <0x1c00 0x1000>; + qcom,sdi-disable-regs = <&tcsr_regs 0x3a000 0x4>; + }; + }; + apps_smmu: iommu@15000000 { compatible = "qcom,sc7180-smmu-500", "arm,mmu-500"; reg = <0 0x15000000 0 0x100000>;