From patchwork Tue Mar 14 15:18:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 95301 Delivered-To: patch@linaro.org Received: by 10.140.89.134 with SMTP id v6csp306419qgd; Tue, 14 Mar 2017 08:19:34 -0700 (PDT) X-Received: by 10.99.24.88 with SMTP id 24mr44663337pgy.54.1489504773907; Tue, 14 Mar 2017 08:19:33 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w7si15009954pgw.107.2017.03.14.08.19.33; Tue, 14 Mar 2017 08:19:33 -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=neutral (body hash did not verify) header.i=@gmail.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750815AbdCNPTc (ORCPT + 9 others); Tue, 14 Mar 2017 11:19:32 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:35026 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753339AbdCNPSg (ORCPT ); Tue, 14 Mar 2017 11:18:36 -0400 Received: by mail-qt0-f195.google.com with SMTP id r5so10378899qtb.2 for ; Tue, 14 Mar 2017 08:18:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MMRMtI187uKG3dzSHDYeKs83IlYmQWlhTSLY0Ljyxkg=; b=nrVeE8SkfhAjBMRiXpdhHKa2FlP2oWXWn7AJupik73DECR7ELJycK4R89XsBo4uQ6N 1CUd6iEaHGoAaXT7bpmL0umNDrVdfOLF2J+1RfvabRXbFwAb0bRIYru9Ajf/2Usdv3n/ 8AcwyJNIZHcozDADvuSlSA76Zz0GPl/2RphsKU11nQ05XMs8sxlu0eajTLLgqPrh15le SNb5KELH7oaRuhZ4kU+i9McGfJF2u0VuVz1MJ8Htl+rGwWiYAESQLzge6a8TVAjd0pOK 1LoBipi6mM3pxBDjl7TclDz8d+6iZFlYlvH24zavIAcySJmdBnsBNL1yYUM4NwKykus+ MeIw== 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=MMRMtI187uKG3dzSHDYeKs83IlYmQWlhTSLY0Ljyxkg=; b=rw8VYbE8M34fDCZ6v+wkvWh/TjBVLkGuyBRgLkJuTHuy7fHaqmD55pTRcS4ecgT7nf 6Bw5d3l7PHBd64XEafMJC7CIUV2tU/9yaLg2LWyqHd0LuG++xprPGgD53K4tpRQjXQDo Bf2uAvkh7CKIHbrewsOlcG7bvgXGVYxIx6bda5kGxs1Y0xbB5B3EkQ12AVHrFq70ru5p cWFl9B2YfsUG15LT1vvLjzv/vI6vWIAfFs4souvNXJOlTlBWXz02yRtx63PHvdlvsnNT c2nGjKXOP826MBJlwk2ISUS3/LqnsElqxie9mXa+VphGL+zFaw5vBU3RvrQquWvrNruV a+WA== X-Gm-Message-State: AMke39kdpWXFufkgmk4e/NKHKTxLUO00IU7FQTDYsAzNKBAxBEcYJy866kdS36kj15agJQ== X-Received: by 10.200.52.65 with SMTP id v1mr41222501qtb.166.1489504715237; Tue, 14 Mar 2017 08:18:35 -0700 (PDT) Received: from localhost ([2601:184:4780:aac0:25f8:dd96:a084:785a]) by smtp.gmail.com with ESMTPSA id q31sm14566230qta.22.2017.03.14.08.18.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Mar 2017 08:18:34 -0700 (PDT) From: Rob Clark To: iommu@lists.linux-foundation.org Cc: linux-arm-msm@vger.kernel.org, Robin Murphy , Will Deacon , Sricharan , Mark Rutland , Stanimir Varbanov , Rob Clark Subject: [PATCH 2/9] firmware: qcom_scm: add two scm calls for iommu secure page table Date: Tue, 14 Mar 2017 11:18:04 -0400 Message-Id: <20170314151811.17234-3-robdclark@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170314151811.17234-1-robdclark@gmail.com> References: <20170314151811.17234-1-robdclark@gmail.com> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Stanimir Varbanov Those two new SCM calls are needed from qcom-iommu driver in order to initialize secure iommu page table. Signed-off-by: Stanimir Varbanov Signed-off-by: Rob Clark --- drivers/firmware/qcom_scm-32.c | 12 ++++++++++++ drivers/firmware/qcom_scm-64.c | 42 ++++++++++++++++++++++++++++++++++++++++++ drivers/firmware/qcom_scm.c | 12 ++++++++++++ drivers/firmware/qcom_scm.h | 6 ++++++ include/linux/qcom_scm.h | 4 ++++ 5 files changed, 76 insertions(+) -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/firmware/qcom_scm-32.c b/drivers/firmware/qcom_scm-32.c index 722e65a..93e3b96 100644 --- a/drivers/firmware/qcom_scm-32.c +++ b/drivers/firmware/qcom_scm-32.c @@ -584,3 +584,15 @@ int __qcom_scm_restore_sec_cfg(struct device *dev, u32 device_id, { return -ENODEV; } + +int __qcom_scm_iommu_secure_ptbl_size(struct device *dev, u32 spare, + size_t *size) +{ + return -ENODEV; +} + +int __qcom_scm_iommu_secure_ptbl_init(struct device *dev, u64 addr, u32 size, + u32 spare) +{ + return -ENODEV; +} diff --git a/drivers/firmware/qcom_scm-64.c b/drivers/firmware/qcom_scm-64.c index 550e3a3..6e6d561 100644 --- a/drivers/firmware/qcom_scm-64.c +++ b/drivers/firmware/qcom_scm-64.c @@ -397,3 +397,45 @@ int __qcom_scm_restore_sec_cfg(struct device *dev, u32 device_id, u32 spare) return ret ? : res.a1; } + +int __qcom_scm_iommu_secure_ptbl_size(struct device *dev, u32 spare, + size_t *size) +{ + struct qcom_scm_desc desc = {0}; + struct arm_smccc_res res; + int ret; + + desc.args[0] = spare; + desc.arginfo = QCOM_SCM_ARGS(1); + + ret = qcom_scm_call(dev, QCOM_SCM_SVC_MP, + QCOM_SCM_IOMMU_SECURE_PTBL_SIZE, &desc, &res); + + if (size) + *size = res.a1; + + return ret ? : res.a2; +} + +int __qcom_scm_iommu_secure_ptbl_init(struct device *dev, u64 addr, u32 size, + u32 spare) +{ + struct qcom_scm_desc desc = {0}; + struct arm_smccc_res res; + int ret; + + desc.args[0] = addr; + desc.args[1] = size; + desc.args[2] = spare; + desc.arginfo = QCOM_SCM_ARGS(3, QCOM_SCM_RW, QCOM_SCM_VAL, + QCOM_SCM_VAL); + + ret = qcom_scm_call(dev, QCOM_SCM_SVC_MP, + QCOM_SCM_IOMMU_SECURE_PTBL_INIT, &desc, &res); + + /* the pg table has been initialized already, ignore the error */ + if (ret == -EPERM) + ret = 0; + + return ret; +} diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c index ae1f473..bb16510 100644 --- a/drivers/firmware/qcom_scm.c +++ b/drivers/firmware/qcom_scm.c @@ -321,6 +321,18 @@ int qcom_scm_restore_sec_cfg(u32 device_id, u32 spare) } EXPORT_SYMBOL(qcom_scm_restore_sec_cfg); +int qcom_scm_iommu_secure_ptbl_size(u32 spare, size_t *size) +{ + return __qcom_scm_iommu_secure_ptbl_size(__scm->dev, spare, size); +} +EXPORT_SYMBOL(qcom_scm_iommu_secure_ptbl_size); + +int qcom_scm_iommu_secure_ptbl_init(u64 addr, u32 size, u32 spare) +{ + return __qcom_scm_iommu_secure_ptbl_init(__scm->dev, addr, size, spare); +} +EXPORT_SYMBOL(qcom_scm_iommu_secure_ptbl_init); + /** * qcom_scm_is_available() - Checks if SCM is available */ diff --git a/drivers/firmware/qcom_scm.h b/drivers/firmware/qcom_scm.h index 31fc732..9bea691 100644 --- a/drivers/firmware/qcom_scm.h +++ b/drivers/firmware/qcom_scm.h @@ -89,5 +89,11 @@ static inline int qcom_scm_remap_error(int err) #define QCOM_SCM_RESTORE_SEC_CFG 2 extern int __qcom_scm_restore_sec_cfg(struct device *dev, u32 device_id, u32 spare); +#define QCOM_SCM_IOMMU_SECURE_PTBL_SIZE 3 +#define QCOM_SCM_IOMMU_SECURE_PTBL_INIT 4 +extern int __qcom_scm_iommu_secure_ptbl_size(struct device *dev, u32 spare, + size_t *size); +extern int __qcom_scm_iommu_secure_ptbl_init(struct device *dev, u64 addr, + u32 size, u32 spare); #endif diff --git a/include/linux/qcom_scm.h b/include/linux/qcom_scm.h index 22017f5d..e538047 100644 --- a/include/linux/qcom_scm.h +++ b/include/linux/qcom_scm.h @@ -41,6 +41,8 @@ extern void qcom_scm_cpu_power_down(u32 flags); extern u32 qcom_scm_get_version(void); extern int qcom_scm_set_remote_state(u32 state, u32 id); extern int qcom_scm_restore_sec_cfg(u32 device_id, u32 spare); +extern int qcom_scm_iommu_secure_ptbl_size(u32 spare, size_t *size); +extern int qcom_scm_iommu_secure_ptbl_init(u64 addr, u32 size, u32 spare); #else static inline int qcom_scm_set_cold_boot_addr(void *entry, const cpumask_t *cpus) @@ -69,5 +71,7 @@ static inline u32 qcom_scm_get_version(void) { return 0; } static inline u32 qcom_scm_set_remote_state(u32 state,u32 id) { return -ENODEV; } static inline int qcom_scm_restore_sec_cfg(u32 device_id, u32 spare) { return -ENODEV; } +static inline int qcom_scm_iommu_secure_ptbl_size(u32 spare, size_t *size) { return -ENODEV; } +static inline int qcom_scm_iommu_secure_ptbl_init(u64 addr, u32 size, u32 spare) { return -ENODEV; } #endif #endif From patchwork Tue Mar 14 15:18:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 95300 Delivered-To: patch@linaro.org Received: by 10.140.89.134 with SMTP id v6csp306130qgd; Tue, 14 Mar 2017 08:18:51 -0700 (PDT) X-Received: by 10.99.116.10 with SMTP id p10mr43686553pgc.74.1489504731428; Tue, 14 Mar 2017 08:18:51 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d125si15070688pfg.72.2017.03.14.08.18.51; Tue, 14 Mar 2017 08:18:51 -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=neutral (body hash did not verify) header.i=@gmail.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751142AbdCNPSt (ORCPT + 9 others); Tue, 14 Mar 2017 11:18:49 -0400 Received: from mail-qt0-f196.google.com ([209.85.216.196]:35074 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751015AbdCNPSr (ORCPT ); Tue, 14 Mar 2017 11:18:47 -0400 Received: by mail-qt0-f196.google.com with SMTP id r5so10379322qtb.2 for ; Tue, 14 Mar 2017 08:18:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BHc+F3uGpbA45hFmpbgGr9e7yHE5eIhqlJcvroganvM=; b=bvYLwrIA59OBMwZ7adTXv/pLEpyHLAXYsV8HyOdv1vlc16Yv2a0L3xRfFT6xkX0kdC GArlVqtR9epgtGekUYOfrdgKvKloVf4lFrsGP6VggwJKGUysbpPYielpsML/30h76Pi7 WriDfSRFFThJ2ZQwpd3hteaLay5A6OoQ2xC0xBLk+hHn4RGRC93RA/iepwr0jpghMAOr 7u+C8dIGHdytpSpRkqZWZXQXcV35mDQgidFGd+LZruUvBIoiQL8Bnc7wVITNgG3S8JHy M3U0O0IWJzmC6apmrluOn6EzF8sZEisqp5DMfT5CU9Od7nH/SsFeLr6mwyiZB4x2OeUF kgtw== 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=BHc+F3uGpbA45hFmpbgGr9e7yHE5eIhqlJcvroganvM=; b=t4OwWMm1kLseZ77E20gf/F3f3e5jtWcFDQTXT7f7piax/7bi3R51/3aZK7a/iSZHzR uFJwGcmi9wE96hF1fHLPdmBEPiNH2v4nS/WHgM76czrIMvePjDgvwopDngw5jJht4vm4 jHNL0YfMVO5gkyreK8oRDkZDGPhPOjwMGi5ICfaECF5xAkCi9EdNL3+fM/7hY9HZF+cD fF8Ft3Hkr4fW3B23OvE0zGwRLahWqBBGg/DjbNUp1DmDwimSO4rRO1Bu6XqF7GYKm7jY eOY7Ju9cZ7pKo7YyeQVzf2XvxQ5ov6esHEQA8WO1ZrcA0xFQy8TwQv+mbeBkTB60mTFN 1Tsw== X-Gm-Message-State: AMke39kjVlHDy7oSSpZELGZ66JBrUxr2yL9omw4KIy0IGgqOfhE+ujfwIIRrHKE6JJ5DiQ== X-Received: by 10.200.48.209 with SMTP id w17mr41976093qta.179.1489504720629; Tue, 14 Mar 2017 08:18:40 -0700 (PDT) Received: from localhost ([2601:184:4780:aac0:25f8:dd96:a084:785a]) by smtp.gmail.com with ESMTPSA id c19sm14595587qtc.29.2017.03.14.08.18.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Mar 2017 08:18:39 -0700 (PDT) From: Rob Clark To: iommu@lists.linux-foundation.org Cc: linux-arm-msm@vger.kernel.org, Robin Murphy , Will Deacon , Sricharan , Mark Rutland , Stanimir Varbanov , Rob Clark Subject: [PATCH 6/9] iommu: qcom: initialize secure page table Date: Tue, 14 Mar 2017 11:18:08 -0400 Message-Id: <20170314151811.17234-7-robdclark@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170314151811.17234-1-robdclark@gmail.com> References: <20170314151811.17234-1-robdclark@gmail.com> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Stanimir Varbanov This basically gets the secure page table size, allocates memory for secure pagetables and passes the physical address to the trusted zone. Signed-off-by: Stanimir Varbanov Signed-off-by: Rob Clark --- drivers/iommu/qcom_iommu.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/iommu/qcom_iommu.c b/drivers/iommu/qcom_iommu.c index 6b7adbf..743a628 100644 --- a/drivers/iommu/qcom_iommu.c +++ b/drivers/iommu/qcom_iommu.c @@ -608,6 +608,51 @@ static void qcom_iommu_disable_clocks(struct qcom_iommu_dev *qcom_iommu) clk_disable_unprepare(qcom_iommu->iface_clk); } +static int qcom_iommu_sec_ptbl_init(struct device *dev) +{ + size_t psize = 0; + unsigned int spare = 0; + void *cpu_addr; + dma_addr_t paddr; + unsigned long attrs; + static bool allocated = false; + int ret; + + if (allocated) + return 0; + + ret = qcom_scm_iommu_secure_ptbl_size(spare, &psize); + if (ret) { + dev_err(dev, "failed to get iommu secure pgtable size (%d)\n", + ret); + return ret; + } + + dev_info(dev, "iommu sec: pgtable size: %zu\n", psize); + + attrs = DMA_ATTR_NO_KERNEL_MAPPING; + + cpu_addr = dma_alloc_attrs(dev, psize, &paddr, GFP_KERNEL, attrs); + if (!cpu_addr) { + dev_err(dev, "failed to allocate %zu bytes for pgtable\n", + psize); + return -ENOMEM; + } + + ret = qcom_scm_iommu_secure_ptbl_init(paddr, psize, spare); + if (ret) { + dev_err(dev, "failed to init iommu pgtable (%d)\n", ret); + goto free_mem; + } + + allocated = true; + return 0; + +free_mem: + dma_free_attrs(dev, psize, cpu_addr, paddr, attrs); + return ret; +} + static int qcom_iommu_ctx_probe(struct platform_device *pdev) { struct qcom_iommu_ctx *ctx; @@ -688,6 +733,17 @@ static struct platform_driver qcom_iommu_ctx_driver = { }; module_platform_driver(qcom_iommu_ctx_driver); +static bool qcom_iommu_has_secure_context(struct qcom_iommu_dev *qcom_iommu) +{ + struct device_node *child; + + for_each_child_of_node(qcom_iommu->dev->of_node, child) + if (of_device_is_compatible(child, "qcom,msm-iommu-v1-sec")) + return true; + + return false; +} + static int qcom_iommu_device_probe(struct platform_device *pdev) { struct qcom_iommu_dev *qcom_iommu; @@ -724,6 +780,14 @@ static int qcom_iommu_device_probe(struct platform_device *pdev) return -ENODEV; } + if (qcom_iommu_has_secure_context(qcom_iommu)) { + ret = qcom_iommu_sec_ptbl_init(dev); + if (ret) { + dev_err(dev, "cannot init secure pg table(%d)\n", ret); + return ret; + } + } + platform_set_drvdata(pdev, qcom_iommu); /* register context bank devices, which are child nodes: */ From patchwork Tue Mar 14 15:18:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 95299 Delivered-To: patch@linaro.org Received: by 10.140.89.134 with SMTP id v6csp306111qgd; Tue, 14 Mar 2017 08:18:48 -0700 (PDT) X-Received: by 10.99.109.14 with SMTP id i14mr44288369pgc.102.1489504728638; Tue, 14 Mar 2017 08:18:48 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d125si15070688pfg.72.2017.03.14.08.18.48; Tue, 14 Mar 2017 08:18:48 -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=neutral (body hash did not verify) header.i=@gmail.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753379AbdCNPSq (ORCPT + 9 others); Tue, 14 Mar 2017 11:18:46 -0400 Received: from mail-qt0-f194.google.com ([209.85.216.194]:35092 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753376AbdCNPSo (ORCPT ); Tue, 14 Mar 2017 11:18:44 -0400 Received: by mail-qt0-f194.google.com with SMTP id r5so10379467qtb.2 for ; Tue, 14 Mar 2017 08:18:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VYBmF3Cm4ePAbYPE4dZP/h5k6Q2oUqP3l8EkezQonuo=; b=ELr00So+pGVHMUdZ0Fy9sKXus9djX3aJqYAKAjQv4+mBMZDWImubceBkud7nrfXIZ7 We8AP/hhpFxUxoDtZMsc11hIYZ+JyTRZMvTGHgQI+CxcDTkWa6jmc6t6jFJj71BXKg7M wte3Xqiz21QMOEGdPN9zHkkYLfDnlq7Bk39LlGE58o0LWq0XwKmt6+bYcIWzjFuyVOcq prNAhSAx5y01OQuqcTKGfsCQ+aTe7rEPLEkNhL2sAMele6zZgBBWWw5G/pjsIDsISqpM 3XjI2kLaAdXq73lkg2O4TShk1qe/HoDLUC5nv1ofppB929F6LgYGfuFFdYTKB4qlJNCU 0FxQ== 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=VYBmF3Cm4ePAbYPE4dZP/h5k6Q2oUqP3l8EkezQonuo=; b=HopnjnP48kuwqUczJbvQdWNnqwvA9att83f5Tp0RHIws+Fcsxol0eYXfkQpZjYNoUp 0b4vj3vrr3EkRfnxRuXA2MmuP6FgM8I07JEX/fg+IT248Q5rv0/xd3TMRDNuaNYEBZqa r2OM/P1oAqe3wJ1GUmC8FNrUqnnWeg5eaNTPb4iQoGuguQgSAQA9NegP/UettC0xqrLn +8Lg6ISyiGc8A/8CRNwCdWz9CZW1tMbnI1YnRtoKXae2bYxMimJnIm6NOcSJYNkd7YEP ta+zYwaWiPguwhm8DVQbKqzPTaRpTKCrCe8t1gzTs47hvp8mlDya6K1Q1vPiJ0GTqUEM WuKg== X-Gm-Message-State: AMke39k4YNKTmVR6QFob+fROPgrvO+BH/7ScXg8riT7G0PqfJJPcJJwLC97TpZ/PfwkCBg== X-Received: by 10.200.40.210 with SMTP id j18mr41263932qtj.272.1489504723129; Tue, 14 Mar 2017 08:18:43 -0700 (PDT) Received: from localhost ([2601:184:4780:aac0:25f8:dd96:a084:785a]) by smtp.gmail.com with ESMTPSA id n84sm14577448qki.42.2017.03.14.08.18.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Mar 2017 08:18:42 -0700 (PDT) From: Rob Clark To: iommu@lists.linux-foundation.org Cc: linux-arm-msm@vger.kernel.org, Robin Murphy , Will Deacon , Sricharan , Mark Rutland , Stanimir Varbanov , Rob Clark Subject: [PATCH 8/9] ARM64: DT: add video codec devicetree node Date: Tue, 14 Mar 2017 11:18:10 -0400 Message-Id: <20170314151811.17234-9-robdclark@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170314151811.17234-1-robdclark@gmail.com> References: <20170314151811.17234-1-robdclark@gmail.com> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Stanimir Varbanov Signed-off-by: Stanimir Varbanov Signed-off-by: Rob Clark --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index b0daf39..7bcf4cd 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -88,6 +88,13 @@ no-map; }; + venus_mem: venus@89900000 { + compatible = "shared-dma-pool"; + reg = <0x0 0x89900000 0x0 0x800000>; + alignment = <0x1000>; + no-map; + }; + mba_mem: mba@8ea00000 { no-map; reg = <0 0x8ea00000 0 0x100000>; @@ -1190,6 +1197,27 @@ }; }; }; + + venus: video-codec@1d00000 { + compatible = "qcom,msm8916-venus"; + reg = <0x01d00000 0xff000>; + interrupts = ; + power-domains = <&gcc VENUS_GDSC>; + clocks = <&gcc GCC_VENUS0_VCODEC0_CLK>, + <&gcc GCC_VENUS0_AHB_CLK>, + <&gcc GCC_VENUS0_AXI_CLK>; + clock-names = "core", "iface", "bus"; + memory-region = <&venus_mem>; + status = "okay"; + + video-decoder { + compatible = "venus-decoder"; + }; + + video-encoder { + compatible = "venus-encoder"; + }; + }; }; smd {