From patchwork Fri May 10 04:34:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 163830 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:142:0:0:0:0 with SMTP id j2csp1875163ilr; Thu, 9 May 2019 21:34:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqyPhHzTFMwUYgx+gG6y52SQESzkJ45VZeE2QAf9k31obg+zCNl/wq2y2/YSefrN4n7N0NVp X-Received: by 2002:a17:902:bc4b:: with SMTP id t11mr2876920plz.255.1557462897840; Thu, 09 May 2019 21:34:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557462897; cv=none; d=google.com; s=arc-20160816; b=JRF+xQ7mJjG8XhuVJaTg9Ex4wUKMQYq4GzDOjHY3q1pGH9upboQrWCoO7WFFNbbwBr /Na/5q7rsMDDIjgQE0JTrVy9zMFp2/9+CVukPBG4lto5qB7+txl2gwMmRUiETS+E7KJN XwzKdaoQC5sBMOrkMsIzqEVyqmRTGwpbV2mZKj/nS24lXEFX9a1wxK/45QcvOzAAQnS/ 0wJaSSnnGd1seR2kLHnI7yrJBB08wr7xvv0/3fu9P0UR0JneSnkbcUyzJXEHcguGt5Tv x7cVvWqM3Rrec9ME/xBUOPsyJTCY5LvnUpzVV1+TPhc5tBDC1ObVGP5WS/JzYyvVFk0b S3HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=7D9fT9nrITboyJ+SOXix9/gHXfGWOiHJwaPk2qVUU3c=; b=hZJ/yB8gg5ysoXdCwSjF/jFZumdimPl3ZDzJxo5IUTlb9Y+wX5MCeD5BwBx6JuWJeF XtlQAI9dXj/iwXVQnxKuLQN0E35GvqIVohvFPNpmJmWFAR5N9QGSdIhyX9XxZNfnOj+3 1eoAqE9Z/nY5G4+qrG8di3KAbdd+OeKJp7OUAs7K2sHA0ljwoJbQESoXnLzHmGq2SOjs C3qPeSbDA5WpQDIOmkvYPa45tIi4fA5lJf3uLsgcObCxNRjUTC6wAbeBXbRMyO+v40xU jlLobkw0UkwEl4skcw/h9+CQO9wSG6wEjwvLMF1WF3qYZDZvedkt2xTZ4whzUCgz8dhv QXjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YTMOEM9o; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id g13si6009935pgs.161.2019.05.09.21.34.57; Thu, 09 May 2019 21:34:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YTMOEM9o; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 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 S1727193AbfEJEe4 (ORCPT + 15 others); Fri, 10 May 2019 00:34:56 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:40484 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727048AbfEJEe2 (ORCPT ); Fri, 10 May 2019 00:34:28 -0400 Received: by mail-pf1-f193.google.com with SMTP id u17so2500494pfn.7 for ; Thu, 09 May 2019 21:34:27 -0700 (PDT) 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; bh=7D9fT9nrITboyJ+SOXix9/gHXfGWOiHJwaPk2qVUU3c=; b=YTMOEM9o3me4VlRS+ZfA4B///ON/wFOPFUMHSfZWcslGeKldYyWK8bbE6t9cha00Jv 5TMhjzu3Y4+hciowkOsucL14c+gFUxPYBx50CA+ZvCqWkYSkfpcnSGhdFx8ld8ZI0PLT rGzjFgde4ZnB2nwF9UDUYK4pZfry4RfWgHkTRVqoXWFFVpbiatqDUcpLNKCBeNchyeW9 u3kRpzwlD5al65AgnOyDxe9IiKb14Hw0vRR3mUejE+G3niYqda3Dxr3dwvJuXK3BO62w HPtHTQPseVN9tFLUNWGJ9B7kEUd4hInGRgGgPJnUlU24d5GkbVrpV8PjrHB6cmyLcoEM gnVw== 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; bh=7D9fT9nrITboyJ+SOXix9/gHXfGWOiHJwaPk2qVUU3c=; b=LjlBdy97pDs8SKC5gAH3ehQFZsKyfpdpbwVjwstqQGxDIGaSKqgorK16Jv4/TXuD8y NRaMAZOVzutvZ8H06g48y1/9KFeCodBZIzJ86fn9WDh34+XzjdMRyYQ7KmKhC6Wpizht FHCblRdeVWdYEWZ6n3bjEOk6H9QQZerP3uFs4VmkNcKwb8k2xTqlrlM1Gn8RST6sOPgk qEa2b3lfxVD6cl6oQFwJi2csSLo8eqWPLvcljNUp5dwXOp/I1raJ2gg4Ih5iylJLADCQ JoGTgMJBPHKugw02lCniCtoMdYEi2wQwLzPoWhlNsNdvt4nQhsg8FbIBtj8VymL+9OGA njNg== X-Gm-Message-State: APjAAAWiaVmys+5EZwtYjqNbT0dwgEiMFLW2yA5meY4Os5h1oqh1irRi nlAqofsYlFJzSlH/rfHW3/FI1A== X-Received: by 2002:a63:4621:: with SMTP id t33mr10954607pga.246.1557462867214; Thu, 09 May 2019 21:34:27 -0700 (PDT) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id s17sm4785317pfm.149.2019.05.09.21.34.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 21:34:26 -0700 (PDT) From: Bjorn Andersson To: Ohad Ben-Cohen , Bjorn Andersson Cc: Andy Gross , David Brown , Rob Herring , Mark Rutland , linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/8] remoteproc: qcom: qdsp6-adsp: Add support for QCS404 CDSP Date: Thu, 9 May 2019 21:34:15 -0700 Message-Id: <20190510043421.31393-3-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20190510043421.31393-1-bjorn.andersson@linaro.org> References: <20190510043421.31393-1-bjorn.andersson@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Move the clock list to adsp_pil_data, make the pdc_reset optional and make the driver directly enable the xo, sleep and core clocks. The three clocks are previously toggled through the clock controller, but that means the same hardware block needs to be mapped in both drivers. Making the remoteproc driver enable the clocks is a nop when using the clock controller, but allow us to remove the clocks from the clock controller. Signed-off-by: Bjorn Andersson --- drivers/remoteproc/qcom_q6v5_adsp.c | 73 ++++++++++++++++++++++------- 1 file changed, 55 insertions(+), 18 deletions(-) -- 2.18.0 diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c index 1f3ef9ee493c..e953886b2eb7 100644 --- a/drivers/remoteproc/qcom_q6v5_adsp.c +++ b/drivers/remoteproc/qcom_q6v5_adsp.c @@ -46,11 +46,9 @@ #define LPASS_PWR_ON_REG 0x10 #define LPASS_HALTREQ_REG 0x0 -/* list of clocks required by ADSP PIL */ -static const char * const adsp_clk_id[] = { - "sway_cbcr", "lpass_ahbs_aon_cbcr", "lpass_ahbm_aon_cbcr", - "qdsp6ss_xo", "qdsp6ss_sleep", "qdsp6ss_core", -}; +#define QDSP6SS_XO_CBCR 0x38 +#define QDSP6SS_CORE_CBCR 0x20 +#define QDSP6SS_SLEEP_CBCR 0x3c struct adsp_pil_data { int crash_reason_smem; @@ -59,6 +57,9 @@ struct adsp_pil_data { const char *ssr_name; const char *sysmon_name; int ssctl_id; + + const char **clk_ids; + int num_clks; }; struct qcom_adsp { @@ -75,7 +76,7 @@ struct qcom_adsp { void __iomem *qdsp6ss_base; struct reset_control *pdc_sync_reset; - struct reset_control *cc_lpass_restart; + struct reset_control *restart; struct regmap *halt_map; unsigned int halt_lpass; @@ -143,7 +144,7 @@ static int qcom_adsp_shutdown(struct qcom_adsp *adsp) /* Assert the LPASS PDC Reset */ reset_control_assert(adsp->pdc_sync_reset); /* Place the LPASS processor into reset */ - reset_control_assert(adsp->cc_lpass_restart); + reset_control_assert(adsp->restart); /* wait after asserting subsystem restart from AOSS */ usleep_range(200, 300); @@ -153,7 +154,7 @@ static int qcom_adsp_shutdown(struct qcom_adsp *adsp) /* De-assert the LPASS PDC Reset */ reset_control_deassert(adsp->pdc_sync_reset); /* Remove the LPASS reset */ - reset_control_deassert(adsp->cc_lpass_restart); + reset_control_deassert(adsp->restart); /* wait after de-asserting subsystem restart from AOSS */ usleep_range(200, 300); @@ -192,6 +193,15 @@ static int adsp_start(struct rproc *rproc) goto disable_power_domain; } + /* Enable the XO clock */ + writel(1, adsp->qdsp6ss_base + QDSP6SS_XO_CBCR); + + /* Enable the QDSP6SS sleep clock */ + writel(1, adsp->qdsp6ss_base + QDSP6SS_SLEEP_CBCR); + + /* Enable the QDSP6 core clock */ + writel(1, adsp->qdsp6ss_base + QDSP6SS_CORE_CBCR); + /* Program boot address */ writel(adsp->mem_phys >> 4, adsp->qdsp6ss_base + RST_EVB_REG); @@ -280,8 +290,9 @@ static const struct rproc_ops adsp_ops = { .load = adsp_load, }; -static int adsp_init_clock(struct qcom_adsp *adsp) +static int adsp_init_clock(struct qcom_adsp *adsp, const char **clk_ids) { + int num_clks = 0; int i, ret; adsp->xo = devm_clk_get(adsp->dev, "xo"); @@ -292,32 +303,39 @@ static int adsp_init_clock(struct qcom_adsp *adsp) return ret; } - adsp->num_clks = ARRAY_SIZE(adsp_clk_id); + for (i = 0; clk_ids[i]; i++) + num_clks++; + + adsp->num_clks = num_clks; adsp->clks = devm_kcalloc(adsp->dev, adsp->num_clks, sizeof(*adsp->clks), GFP_KERNEL); if (!adsp->clks) return -ENOMEM; for (i = 0; i < adsp->num_clks; i++) - adsp->clks[i].id = adsp_clk_id[i]; + adsp->clks[i].id = clk_ids[i]; return devm_clk_bulk_get(adsp->dev, adsp->num_clks, adsp->clks); } static int adsp_init_reset(struct qcom_adsp *adsp) { - adsp->pdc_sync_reset = devm_reset_control_get_exclusive(adsp->dev, + adsp->pdc_sync_reset = devm_reset_control_get_optional_exclusive(adsp->dev, "pdc_sync"); if (IS_ERR(adsp->pdc_sync_reset)) { dev_err(adsp->dev, "failed to acquire pdc_sync reset\n"); return PTR_ERR(adsp->pdc_sync_reset); } - adsp->cc_lpass_restart = devm_reset_control_get_exclusive(adsp->dev, - "cc_lpass"); - if (IS_ERR(adsp->cc_lpass_restart)) { - dev_err(adsp->dev, "failed to acquire cc_lpass restart\n"); - return PTR_ERR(adsp->cc_lpass_restart); + adsp->restart = devm_reset_control_get_optional_exclusive(adsp->dev, "restart"); + + /* Fall back to the old "cc_lpass" if "restart" is absent */ + if (!adsp->restart) + adsp->restart = devm_reset_control_get_exclusive(adsp->dev, "cc_lpass"); + + if (IS_ERR(adsp->restart)) { + dev_err(adsp->dev, "failed to acquire restart\n"); + return PTR_ERR(adsp->restart); } return 0; @@ -415,7 +433,7 @@ static int adsp_probe(struct platform_device *pdev) if (ret) goto free_rproc; - ret = adsp_init_clock(adsp); + ret = adsp_init_clock(adsp, desc->clk_ids); if (ret) goto free_rproc; @@ -479,9 +497,28 @@ static const struct adsp_pil_data adsp_resource_init = { .ssr_name = "lpass", .sysmon_name = "adsp", .ssctl_id = 0x14, + .clk_ids = (const char*[]) { + "sway_cbcr", "lpass_ahbs_aon_cbcr", "lpass_ahbm_aon_cbcr", + "qdsp6ss_xo", "qdsp6ss_sleep", "qdsp6ss_core", NULL + }, + .num_clks = 7, +}; + +static const struct adsp_pil_data cdsp_resource_init = { + .crash_reason_smem = 601, + .firmware_name = "cdsp.mdt", + .ssr_name = "cdsp", + .sysmon_name = "cdsp", + .ssctl_id = 0x17, + .clk_ids = (const char*[]) { + "sway", "tbu", "bimc", "ahb_aon", "q6ss_slave", "q6ss_master", + "q6_axim", NULL + }, + .num_clks = 7, }; static const struct of_device_id adsp_of_match[] = { + { .compatible = "qcom,qcs404-cdsp-pil", .data = &cdsp_resource_init }, { .compatible = "qcom,sdm845-adsp-pil", .data = &adsp_resource_init }, { }, }; From patchwork Fri May 10 04:34:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 163824 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:142:0:0:0:0 with SMTP id j2csp1874806ilr; Thu, 9 May 2019 21:34:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqypI59zW87H9hDeuzPiCJXlsN6Yu3O/cyZ7xDCla0ZK5j17ZDHrR5yJWtIH3SMh2XC2DysI X-Received: by 2002:aa7:8252:: with SMTP id e18mr11050718pfn.105.1557462872079; Thu, 09 May 2019 21:34:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557462872; cv=none; d=google.com; s=arc-20160816; b=0o1g/61X2+qjxeoW6zI8gUD/O7lMKS7pNSdf20Oro4ayoSPIlmuDr7xgbghiH/4mrY 2EU/zGOlP9IeS/ELuqrtJ9IsOsuiGYVu6SMlDhykBKbVtfRlwCNXyvDdcswlOzo5zhEL P17SZ3VxFs4q9ruDmGcpKNn+yO4Sw/9sr2xAiHqy7oUDDr5jwNukGv+rohC3IvOO7+gF qZVvuFarctkJNMgQ/Hnrdg0M/fq2baBn96TZa5S7kzfniMyluqBanjtJSXTwjqG9/ubZ 5QKEcHsr77HMqmoSRGcIqQBI0aCHX5yzY4KHaGk0QmPSzgtt2qNbFW/hBSH4y+vWafQP wgzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=qrYyI34a2DrOth+hiWVN5F0vACg7lAzQS8qPwj8GUmo=; b=mNpmikI4Kmwj4AYHgOby/j03r+iP7uyT5m80/pKkr30eec1PIgBZ7HpWDSBOHfXEHN CFZef9kMZdRDr2thVld+hPomJ2CjrIVLPPJ5A5aut1qlUh7tYtFcZcSrsWsdc4lILadA 9Ipw98Ms41nob6ke0qehZDsT8o2yYN2dTK/k2u5KtDGcpOr5RwqPrVxgZ6WW3lb6xOHM eM8Sh/MmGbFpE+b3KPT0fPem08qHAbKLsZ3t5TRr2E/XFDftoJ3CUDqAyIJHsZZO1QgQ SFhW5pPzRs+rZ/uPpA6FOD7OjwQ9XSEG8wDyz/taS1X3nM7aDocpNJqPhqxZupZFURsG QyIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZRVaUHLN; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id e61si5818437plb.123.2019.05.09.21.34.31; Thu, 09 May 2019 21:34:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZRVaUHLN; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 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 S1727096AbfEJEea (ORCPT + 15 others); Fri, 10 May 2019 00:34:30 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:43606 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727094AbfEJEea (ORCPT ); Fri, 10 May 2019 00:34:30 -0400 Received: by mail-pg1-f195.google.com with SMTP id t22so2342029pgi.10 for ; Thu, 09 May 2019 21:34:29 -0700 (PDT) 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; bh=qrYyI34a2DrOth+hiWVN5F0vACg7lAzQS8qPwj8GUmo=; b=ZRVaUHLNPW6p1FLWaGVN/da/ZjxPgu+rw7RcTq3l/7O/33OhV8thgylQga3AuS+a6f 3z/PHJoE/5j4bkpbyXoGaGFwvgdNlIrSVfCXGQGwQDVS2O70mOh0MNv8uHTsVWYpLZLz TToRHI2AMmNh60wkrZi3rwL+vv8gh7KHoa/ElmWJbRdlxKoJIa7+6jk1+xigXYHuOKV2 BFEEz7XWHPhYdBqWqrS+c/pzM+0Wxkz1YYClOSkCB4oluGcmjVx+sQyEPWiVdkZmpyth qWZAhYR00AGSYrpjriIyJpL56prX03ls+3oV56ZVrT5YtqyeT52ZHpMXZbcA6SyGR8JJ NOHQ== 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; bh=qrYyI34a2DrOth+hiWVN5F0vACg7lAzQS8qPwj8GUmo=; b=PLjX10u6yxnYqJLAik+R/T0fCj9HBxIF65IGyUOCZ/j8rbmpd7TpoUDW7I9iSB8t+4 gWllbAo7jALILlOjiDNkGpDVOT7Q/TMuhZdapfoFD/ujG1pXrOrAgL1G2uEQyeS36W0y AR7A92mmjALn5TdePyxWUXUR9OxoLDGlPILjjsJvtdg7avZnjMfaGi2oHU0BvOg2Osne irK0RYEuPfFuaitNz0GwvL5s7PpykEqY3xYITSaFZ8RAjRvJ5hDvIhPvDyOi7CSy9zDO XXDmieBXPpoaRFwzycj/ewbcSbx2DGx5EN8nROb3YASIXTsqk4c9XOgsVyjNwqmKM8N5 drnw== X-Gm-Message-State: APjAAAW7ye5/0xOH6tOsQX44XQZVeCRc0gMJtnLkuxkl7/umt/3g+DWX h8JlF/DDcQtHCIpC/ZFpY924/Q== X-Received: by 2002:a63:e417:: with SMTP id a23mr10743392pgi.224.1557462869465; Thu, 09 May 2019 21:34:29 -0700 (PDT) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id s17sm4785317pfm.149.2019.05.09.21.34.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 21:34:28 -0700 (PDT) From: Bjorn Andersson To: Andy Gross , David Brown Cc: Ohad Ben-Cohen , Rob Herring , Mark Rutland , linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/8] arm64: dts: qcom: qcs404: Add TCSR node Date: Thu, 9 May 2019 21:34:17 -0700 Message-Id: <20190510043421.31393-5-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20190510043421.31393-1-bjorn.andersson@linaro.org> References: <20190510043421.31393-1-bjorn.andersson@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The bus halt registers in TCSR are referenced as a syscon device, add these so that we can reference them from the remoteproc nodes. Signed-off-by: Bjorn Andersson --- arch/arm64/boot/dts/qcom/qcs404.dtsi | 5 +++++ 1 file changed, 5 insertions(+) -- 2.18.0 diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi index f422d6e9cb3a..3eb6089c8024 100644 --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi @@ -415,6 +415,11 @@ reg = <0x01905000 0x20000>; }; + tcsr: syscon@1937000 { + compatible = "syscon"; + reg = <0x01937000 0x25000>; + }; + spmi_bus: spmi@200f000 { compatible = "qcom,spmi-pmic-arb"; reg = <0x0200f000 0x001000>, From patchwork Fri May 10 04:34:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 163828 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:142:0:0:0:0 with SMTP id j2csp1875037ilr; Thu, 9 May 2019 21:34:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqz7iQEF/vwRp1wpWC5KeuX3tg3Gx/bZN+UlnLeL7FaUmQJfQ8ZWF387mRiiltDRUmMsFYoF X-Received: by 2002:a63:9a52:: with SMTP id e18mr10880257pgo.335.1557462889642; Thu, 09 May 2019 21:34:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557462889; cv=none; d=google.com; s=arc-20160816; b=g621taYILHFZwBXuijK+j55v71nXOSW8vJgf4vdDrqmlGegnszGdzRtbue+YSQiFbw 9d3u42IKq+NN3T0CVQrCcCGxVZdYlmVoY3Zozj7yYqjdQw/MJm3k9pXZLTsgOxRbFp9z 2NiYHcsRWz2uOYXAv7NYmzpoVEK+emo+6OlBAr8fud8Vvp7kCCwAfs5trhcUy546sigr BF6uYMJ1cG3moiWPjIxDqsF7B9jF6SbkJEH9PcTei4ZhjPkWxxD/6mbZfDAsqjXLJyta 8qq9qatozlc8UuE8YrjmpYOLhEhrJp6yj6ejzfG8yfM3H+oJzbelCnoI2V1iQ++pTRiZ b5Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=env9uxGf/YDPrGif/zsypWijN3KnRmxh8/WUWaV7Q78=; b=OM6F26I6YhR/pXmsmPwx3S8F7F9yw7zBSBvDqY2fQ7UAXczr5fpnu9tysJHY/0M8zQ ptzA1LFvSJt2/6vcGNUBEnqUze7eINdC9OVpVi1fV67R3ehH4ZNnX4gDkqfQ9qPhYQ1k BbujcPBosriBPkgdRKNvn4RZ3/rAngsBjGhnaz8hofafK0ImHX+erciW2yI7S+1DPLjD 4XRxI5p54JqEcuPr2HaKzEWRM5wuo3Z/YmNciJb3OkPrDiGJTDrElKsik14Ten/9BAME UFJ1VbmPIPwdiXGUpoFXeNEv7c6NN6c5v5X+V2IVoxafXhXCtc3oSNfEgy5wt+hTRSSm USHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gJFQozyC; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id t21si5864597plr.366.2019.05.09.21.34.49; Thu, 09 May 2019 21:34:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gJFQozyC; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 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 S1727178AbfEJEes (ORCPT + 15 others); Fri, 10 May 2019 00:34:48 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:42294 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727112AbfEJEec (ORCPT ); Fri, 10 May 2019 00:34:32 -0400 Received: by mail-pl1-f193.google.com with SMTP id x15so2189076pln.9 for ; Thu, 09 May 2019 21:34:32 -0700 (PDT) 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; bh=env9uxGf/YDPrGif/zsypWijN3KnRmxh8/WUWaV7Q78=; b=gJFQozyCmLkFapzpMYtWgmMIKnFeSmlXAAB8gAHcmU4aMPu874ZBoNT8dE4DLSMqCu Cq962ZaYtdy00rzlcyufkbBtBbLBbsgrIHb3BqgltfSIKzJXi4UGq+TDuzkHXC9IRTgb uU+gizZdExvTL7G1wGmcciBpgyTULL8Okovt90c4II4jOIOUOPvbOm+DA2vdG0bpz7RQ CVT1imO5xr0dIWCu/EsZJPRBtmkscsM4O5cnjyA+LJwGRPrmbT9lyOSVOy1aWjgKip8p uoQMG8IsUtdY3eEQFfydA6ytSixZkowVJj2oUEQuMr0E3SoJsBBlclgbW+3E1UL3qdrI WD0A== 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; bh=env9uxGf/YDPrGif/zsypWijN3KnRmxh8/WUWaV7Q78=; b=D80bZ1J/WXGjA322o5AKCweGVTbMEatYkc6+J1EtklJRrM7lcYxx3oOkfKmKK7hmos hjz9kmCSTXEXMp88NC6pBIzG51nE9HO3LldaKp8SyEsdoeTBaTipvcTo0NGqBbLCgj9t 8cxCb1PFpxuDVReITcv2xtBx9BiuoHjXUcimPctEi9SaIeZskak6fM/Zk8P58ObCsylW 2mEeG/FBtY03oSA0+c29fFfWsZD1g5z0hJI542R9Kxn5p/a5MQOS+CFHog22UL9GWhlM TtiwJ6AIV4n9TuFXvGhzuQJEGNfUCGmrY+D6RPFO+jYHfeUn8+lw6i2Z7wzJ83L6u/Zh hNiw== X-Gm-Message-State: APjAAAUQJZhtbr8S4IlAUOZTROLb3XleTwDVwQ3FGeVy2A71Xh+0+yHD 2BHgKaKCxwSV3ULKkqDwI91Utw== X-Received: by 2002:a17:902:56e:: with SMTP id 101mr10360710plf.142.1557462871562; Thu, 09 May 2019 21:34:31 -0700 (PDT) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id s17sm4785317pfm.149.2019.05.09.21.34.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 21:34:31 -0700 (PDT) From: Bjorn Andersson To: Andy Gross , David Brown Cc: Ohad Ben-Cohen , Rob Herring , Mark Rutland , linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 6/8] arm64: dts: qcom: qcs404: Move lpass and q6 into soc Date: Thu, 9 May 2019 21:34:19 -0700 Message-Id: <20190510043421.31393-7-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20190510043421.31393-1-bjorn.andersson@linaro.org> References: <20190510043421.31393-1-bjorn.andersson@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Although we don't describe lpass and wcss with all the details needed to control them in a Trustzone-less environment, move them under soc in order to tidy up the structure and prepare for describing them fully. Signed-off-by: Bjorn Andersson --- arch/arm64/boot/dts/qcom/qcs404.dtsi | 126 ++++++++++++++------------- 1 file changed, 64 insertions(+), 62 deletions(-) -- 2.18.0 diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi index 896f95817f23..b213f6acad76 100644 --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi @@ -82,68 +82,6 @@ method = "smc"; }; - remoteproc_adsp: remoteproc-adsp { - compatible = "qcom,qcs404-adsp-pas"; - - interrupts-extended = <&intc GIC_SPI 293 IRQ_TYPE_EDGE_RISING>, - <&adsp_smp2p_in 0 IRQ_TYPE_EDGE_RISING>, - <&adsp_smp2p_in 1 IRQ_TYPE_EDGE_RISING>, - <&adsp_smp2p_in 2 IRQ_TYPE_EDGE_RISING>, - <&adsp_smp2p_in 3 IRQ_TYPE_EDGE_RISING>; - interrupt-names = "wdog", "fatal", "ready", - "handover", "stop-ack"; - - clocks = <&xo_board>; - clock-names = "xo"; - - memory-region = <&adsp_fw_mem>; - - qcom,smem-states = <&adsp_smp2p_out 0>; - qcom,smem-state-names = "stop"; - - status = "disabled"; - - glink-edge { - interrupts = ; - - qcom,remote-pid = <2>; - mboxes = <&apcs_glb 8>; - - label = "adsp"; - }; - }; - - remoteproc_wcss: remoteproc-wcss { - compatible = "qcom,qcs404-wcss-pas"; - - interrupts-extended = <&intc GIC_SPI 153 IRQ_TYPE_EDGE_RISING>, - <&wcss_smp2p_in 0 IRQ_TYPE_EDGE_RISING>, - <&wcss_smp2p_in 1 IRQ_TYPE_EDGE_RISING>, - <&wcss_smp2p_in 2 IRQ_TYPE_EDGE_RISING>, - <&wcss_smp2p_in 3 IRQ_TYPE_EDGE_RISING>; - interrupt-names = "wdog", "fatal", "ready", - "handover", "stop-ack"; - - clocks = <&xo_board>; - clock-names = "xo"; - - memory-region = <&wlan_fw_mem>; - - qcom,smem-states = <&wcss_smp2p_out 0>; - qcom,smem-state-names = "stop"; - - status = "disabled"; - - glink-edge { - interrupts = ; - - qcom,remote-pid = <1>; - mboxes = <&apcs_glb 16>; - - label = "wcss"; - }; - }; - reserved-memory { #address-cells = <2>; #size-cells = <2>; @@ -458,6 +396,38 @@ #interrupt-cells = <4>; }; + remoteproc_wcss: remoteproc@7400000 { + compatible = "qcom,qcs404-wcss-pas"; + reg = <0x07400000 0x4040>; + + interrupts-extended = <&intc GIC_SPI 153 IRQ_TYPE_EDGE_RISING>, + <&wcss_smp2p_in 0 IRQ_TYPE_EDGE_RISING>, + <&wcss_smp2p_in 1 IRQ_TYPE_EDGE_RISING>, + <&wcss_smp2p_in 2 IRQ_TYPE_EDGE_RISING>, + <&wcss_smp2p_in 3 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "wdog", "fatal", "ready", + "handover", "stop-ack"; + + clocks = <&xo_board>; + clock-names = "xo"; + + memory-region = <&wlan_fw_mem>; + + qcom,smem-states = <&wcss_smp2p_out 0>; + qcom,smem-state-names = "stop"; + + status = "disabled"; + + glink-edge { + interrupts = ; + + qcom,remote-pid = <1>; + mboxes = <&apcs_glb 16>; + + label = "wcss"; + }; + }; + sdcc1: sdcc@7804000 { compatible = "qcom,sdhci-msm-v5"; reg = <0x07804000 0x1000>, <0x7805000 0x1000>; @@ -843,6 +813,38 @@ status = "disabled"; }; }; + + remoteproc_adsp: remoteproc@c700000 { + compatible = "qcom,qcs404-adsp-pas"; + reg = <0x0c700000 0x4040>; + + interrupts-extended = <&intc GIC_SPI 293 IRQ_TYPE_EDGE_RISING>, + <&adsp_smp2p_in 0 IRQ_TYPE_EDGE_RISING>, + <&adsp_smp2p_in 1 IRQ_TYPE_EDGE_RISING>, + <&adsp_smp2p_in 2 IRQ_TYPE_EDGE_RISING>, + <&adsp_smp2p_in 3 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "wdog", "fatal", "ready", + "handover", "stop-ack"; + + clocks = <&xo_board>; + clock-names = "xo"; + + memory-region = <&adsp_fw_mem>; + + qcom,smem-states = <&adsp_smp2p_out 0>; + qcom,smem-state-names = "stop"; + + status = "disabled"; + + glink-edge { + interrupts = ; + + qcom,remote-pid = <2>; + mboxes = <&apcs_glb 8>; + + label = "adsp"; + }; + }; }; timer {