From patchwork Wed Mar 1 17:42:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 94728 Delivered-To: patch@linaro.org Received: by 10.140.20.113 with SMTP id 104csp1913095qgi; Wed, 1 Mar 2017 09:43:19 -0800 (PST) X-Received: by 10.98.216.202 with SMTP id e193mr10170295pfg.80.1488390199103; Wed, 01 Mar 2017 09:43:19 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h16si5170504pli.228.2017.03.01.09.43.18; Wed, 01 Mar 2017 09:43:19 -0800 (PST) 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 S1752855AbdCARnS (ORCPT + 9 others); Wed, 1 Mar 2017 12:43:18 -0500 Received: from mail-qk0-f194.google.com ([209.85.220.194]:36355 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752602AbdCARnR (ORCPT ); Wed, 1 Mar 2017 12:43:17 -0500 Received: by mail-qk0-f194.google.com with SMTP id u188so12511918qkc.3 for ; Wed, 01 Mar 2017 09:43:17 -0800 (PST) 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=iVuDvFMM2Y4THVozKw/bCFX9ee2F55I+HdSO5VP+tHI=; b=BRGY0ftCCFhPpOTuizFwZIKn9LxY4J0hnJLe2us5LJ4spIeRTZ6oCYtzhPWnrBte9Y aeWbnyLlcGIXB/crICE73ZWaKU0ZWSF6Lkn+lfXiCSnA+rYrIJlc6jksEXcBsk1mvLtT AA/BAKCx2iXietmjPxMgxNr5lp1czcWTuM8M4+5oDzfFwszcSka74NSjER+Mh5zMeJeq Cri0+DMM63iQkK0hSFtZJ08X3YGFxEh/yUMjuRIOVI2qSn7GkAotLn6XNVzC+03QC+NP WEfT7XuYyY4ZOU6AalOOAavQBf0eAzt7BfyKVf2vjw01qkTa5S9b7YbH19u1Y7Vf2L2o Y0KA== 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=iVuDvFMM2Y4THVozKw/bCFX9ee2F55I+HdSO5VP+tHI=; b=qH/+sZvyE20/4Om1ROE8euT1vvs8KvyGPK5HGeQ4219gZXdi/wwDdXRakW6OfOtDZK /yjG9xgdq7MhFMWhE7AuQn+Ic6ecXu2D1J1xTK28A15isObZ/g5KaJXMmbYG+SaBIN/6 so4RCuZSc5O1x9YX70q7SbJcprh9DBRgdKYxBtGebBKupkhB7SwjCSQ9AbdX6/W7Mnrh 0NGDoffr4pdUnhvNv109nRnrYm0Kt7J9DmfHV/YxKV7I9PLcdVU7nqn14Um1NhZl+5IM 5lEHk0UZrzRXFBXOAvCKm4dMAK16E67IbzVudV39fNUIK9tGiIwmeMdl0X2KCQFIuHYB eljg== X-Gm-Message-State: AMke39labWt+zrH5rsvQn1uBskeGejkjPPREMJxMPei5hAfK4nhGUB4X0/9LrS/TK1W4Eg== X-Received: by 10.55.162.204 with SMTP id l195mr10636052qke.272.1488390196496; Wed, 01 Mar 2017 09:43:16 -0800 (PST) Received: from localhost ([2601:184:4780:aac0:25f8:dd96:a084:785a]) by smtp.gmail.com with ESMTPSA id 21sm3604604qkh.14.2017.03.01.09.43.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 01 Mar 2017 09:43:15 -0800 (PST) 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: Wed, 1 Mar 2017 12:42:51 -0500 Message-Id: <20170301174258.14618-3-robdclark@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170301174258.14618-1-robdclark@gmail.com> References: <20170301174258.14618-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-64.c | 42 ++++++++++++++++++++++++++++++++++++++++++ drivers/firmware/qcom_scm.c | 12 ++++++++++++ drivers/firmware/qcom_scm.h | 6 ++++++ include/linux/qcom_scm.h | 2 ++ 4 files changed, 62 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-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..c46c3c2 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) From patchwork Wed Mar 1 17:42:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 94729 Delivered-To: patch@linaro.org Received: by 10.140.20.113 with SMTP id 104csp1913136qgi; Wed, 1 Mar 2017 09:43:24 -0800 (PST) X-Received: by 10.99.105.66 with SMTP id e63mr10134008pgc.104.1488390204099; Wed, 01 Mar 2017 09:43:24 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h16si5170504pli.228.2017.03.01.09.43.23; Wed, 01 Mar 2017 09:43:24 -0800 (PST) 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 S1752879AbdCARnX (ORCPT + 9 others); Wed, 1 Mar 2017 12:43:23 -0500 Received: from mail-yw0-f196.google.com ([209.85.161.196]:35134 "EHLO mail-yw0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752602AbdCARnW (ORCPT ); Wed, 1 Mar 2017 12:43:22 -0500 Received: by mail-yw0-f196.google.com with SMTP id l16so4564672ywb.2 for ; Wed, 01 Mar 2017 09:43:21 -0800 (PST) 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=wSNfrICQ9nkYII1xjEEWLwB5sHyejwyxKs5VXPOcd90=; b=eMm6dZhBUBnos2dDsv6+MNgcoQSrMZd43KisrV1UYpO2vA3dSJxM2/IOpF1GkmkX4K EIKuijCsF4D34AO1U8zSjQ/1gLJ1M/NYynrN9Ep8ejkMvaS+JB9iNJpuwNNnhaY/YTAF Rz46eB4FuQ8/McsnjuD/Mo+kkNFMS8ZZhkisVdrlJ0n8gEWXqlBAcsroDfXsM8BhgdwY 4SMJinxe2K4yKZUfqsIEmJLvns7MbwSIuEfxPiNvQbbLNIDMDgQ4oQ/p5waaxrY5k0Ob RfYqVHoE/n40FaH/oreAtDujRNx/r7F5TUPrh+WwgcSyLFORgTAEd4wUbTxWznKpMoDR vUpA== 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=wSNfrICQ9nkYII1xjEEWLwB5sHyejwyxKs5VXPOcd90=; b=Z6AGECZugAaT7nixqCDfPD/w6O8RABM2vaLhsoRr0XE4oXs03gcYKXP3o/b3IrAQNc L/DjU0TXX1/Z/0C9AmSB1z1Z50t0ZWjNs/ZYyluVESBClyZ+dWEz/IzURKm8B99dYKEK bbgEzhvC3egb4c//qUQHnhqDRx5juk8JQhQeE2ZZcUej+jA6eKgcYv+CrZIO0A1/1xGr IfbtNz0RU933JvVovEm95A0Lx+iCpEKPiefosvlCCQmP/bXqqOhuLt4u9abbjj904deS CJ4lTujJzrtMdHAoCEr4+cciwzXfJFkC0esocf1iCZ8ueyvvPVloMV2XEdbCjhCab2Yl 1RWw== X-Gm-Message-State: AMke39kZa5NAkNldR14yrprDJcZQDDwpnb1FiaaNUve8QNZI6uQkrXbHQCCqwR5U0wX2Jg== X-Received: by 10.237.56.135 with SMTP id k7mr12031067qte.42.1488390200940; Wed, 01 Mar 2017 09:43:20 -0800 (PST) Received: from localhost ([2601:184:4780:aac0:25f8:dd96:a084:785a]) by smtp.gmail.com with ESMTPSA id 27sm3580400qkx.3.2017.03.01.09.43.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 01 Mar 2017 09:43:20 -0800 (PST) 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: Wed, 1 Mar 2017 12:42:55 -0500 Message-Id: <20170301174258.14618-7-robdclark@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170301174258.14618-1-robdclark@gmail.com> References: <20170301174258.14618-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 bassicaly get the secure page table size, allocate memory and return back 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 5d3bb63..082ece7 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; @@ -693,6 +738,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; @@ -731,6 +787,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 Wed Mar 1 17:42:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 94730 Delivered-To: patch@linaro.org Received: by 10.140.20.113 with SMTP id 104csp1913176qgi; Wed, 1 Mar 2017 09:43:27 -0800 (PST) X-Received: by 10.98.220.200 with SMTP id c69mr10061593pfl.60.1488390207886; Wed, 01 Mar 2017 09:43:27 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h16si5170504pli.228.2017.03.01.09.43.27; Wed, 01 Mar 2017 09:43:27 -0800 (PST) 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 S1752902AbdCARn1 (ORCPT + 9 others); Wed, 1 Mar 2017 12:43:27 -0500 Received: from mail-qk0-f196.google.com ([209.85.220.196]:36423 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752889AbdCARnY (ORCPT ); Wed, 1 Mar 2017 12:43:24 -0500 Received: by mail-qk0-f196.google.com with SMTP id u188so12512578qkc.3 for ; Wed, 01 Mar 2017 09:43:23 -0800 (PST) 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=d0AJb4NANdkKl169ebVKsxfs1SSM/xVKO0NZoJN6e7DTaHLBG5E/kTlMlm1ltUMdxa VCcGEDmBDT+STTdp9tK/23uKVwkDp+FnGrbjTZ0gY6uJv7PSXds/QbvV7EBpsofctM5b uMpWvucrqbuXeQiiv2VVmpe5GvFouEz7Q2ZSWRcUmMsuXSEITbd5qrr9DM8xqnBNM+OG 7nzpK0a9d6MrBX0MgtzQBOFqct/4SxT0EqSPdFJraKKAe8hvHln+2gFg4vZBQyCmiP7n gdjmkyIgqG7sXiW5HRwkXc9DUQ2Ka/rXhc9pQH7AFyXb1aGg5ymX0d2gq48LThqWzj25 x2Fw== 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=WGFi/3cHHSxtHzGGXG0XieGSScHgemG4xA/4TAblR8wCWRn1BGcAPeS35Oy+Mx/02U NXwvdmwj4+x8Lc1w82rN1qviDyZqbE36l+KbmTJj2mQJnqeVc1SZFu9d8PB6kGfbMnr5 twhvdHYe2dUmV3VaL69d4OZH6DPA7FCY+4nePs6X015mb0Cl2b41LVBbQs9rK5DdPLUp I57iifD4sctyFBBH6auET/7hx/DlS7WdiNw/nlpydavkByrdmuu8uzSThgoXCdF4YWNQ Pw5kKiU1UuRO1qOJ1bN8GuM0mew3VHuahljRksLsEi0F4yUxKSb09Yi2zzsa/f/wBnIM 0TaA== X-Gm-Message-State: AMke39n8ZWw5gFK6HMqQ3giuHPVoxC6y1n1oKWSDPiGewNGBg+7jjIlz8txdY98I4Sjrtg== X-Received: by 10.55.160.65 with SMTP id j62mr11240423qke.249.1488390203027; Wed, 01 Mar 2017 09:43:23 -0800 (PST) Received: from localhost ([2601:184:4780:aac0:25f8:dd96:a084:785a]) by smtp.gmail.com with ESMTPSA id b66sm2901463qkj.19.2017.03.01.09.43.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 01 Mar 2017 09:43:22 -0800 (PST) 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: Wed, 1 Mar 2017 12:42:57 -0500 Message-Id: <20170301174258.14618-9-robdclark@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170301174258.14618-1-robdclark@gmail.com> References: <20170301174258.14618-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 {